@kindly/react-chat 2.81.8 → 2.81.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","react-dom","pusher-js","prop-types"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):e.kindlyChat=t(e.react,e["react-dom"],e["pusher-js"],e["prop-types"])}(globalThis,(e,t,n,r)=>(()=>{var o={15:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{color:t="#FFF",...n}=e;return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M15.25 10.75L12 14.25L8.75 10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}},27:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,n)=>{let[r,i]=n;return{...e,...o()(t).call(t,r)?{}:{[r]:i}}},{})}}},46:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var o,i,a,c;if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):h(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},85:(e,t,n)=>{"use strict";n(9828);var r=n(1100),o=n(8900),i=n(1811),a=n(6625);for(var s in r)i(o[s],s),a[s]=a.Array},86:(e,t,n)=>{"use strict";var r=n(4713),o=n(1003),i=n(8655),a=n(3508);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,function(e){return r(n,this)},{arity:1})}},164:(e,t,n)=>{"use strict";var r=n(9098),o=n(4713),i=n(4871),a=n(3410),s=n(2769),l=n(1926),c=n(3671),u=n(3491),d=n(1811),f=n(3999),p=n(3508),h=n(8655),g=n(6625),m=n(2621),b=a.PROPER,v=a.CONFIGURABLE,y=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,w=h("iterator"),k="keys",C="values",S="entries",_=function(){return this};e.exports=function(e,t,n,a,h,m,A){l(n,t,a);var E,T,j,I=function(e){if(e===h&&M)return M;if(!x&&e&&e in P)return P[e];switch(e){case k:case C:case S:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",L=!1,P=e.prototype,N=P[w]||P["@@iterator"]||h&&P[h],M=!x&&N||I(h),z="Array"===t&&P.entries||N;if(z&&(E=c(z.call(new e)))!==Object.prototype&&E.next&&(i||c(E)===y||(u?u(E,y):s(E[w])||p(E,w,_)),d(E,O,!0,!0),i&&(g[O]=_)),b&&h===C&&N&&N.name!==C&&(!i&&v?f(P,"name",C):(L=!0,M=function(){return o(N,this)})),h)if(T={values:I(C),keys:m?M:I(k),entries:I(S)},A)for(j in T)(x||L||!(j in P))&&p(P,j,T[j]);else r({target:t,proto:!0,forced:x||L},T);return i&&!A||P[w]===M||p(P,w,M,{name:h}),g[t]=M,T}},166:(e,t,n)=>{"use strict";function r(e){return e.touches||e.originalEvent.touches}n.d(t,{A:()=>i});let o=null;const i=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:e=>{const t=r(e)[0];o=t.clientX},handleTouchMove:e=>{if(!o)return;const a=r(e)[0].clientX;t(o-a>5?n+1:n-1,i),o=null},handleTouchEnd:()=>{o=null}}}},209:(e,t,n)=>{"use strict";function r(e,t){if(!e)return;const n=[t,"en"].find(t=>t&&e[t]);return n?e[n]:void 0}n.d(t,{A:()=>r})},262:(e,t,n)=>{"use strict";var r=n(2769);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},339:(e,t,n)=>{"use strict";n.d(t,{Mx:()=>m,z5:()=>b,gm:()=>g,JL:()=>h});var r=n(904),o=n(5352),i=n(7551),a=n.n(i);var s=n(9990);var l=n(8833),c=n(7152);const u=new class{constructor(){a()(this,"locked",!1),a()(this,"waiters",[])}async acquire(){if(this.locked)return new Promise(e=>{this.waiters.push(e)}).then(()=>{this.locked=!0});this.locked=!0}release(){if(this.waiters.length>0){const e=this.waiters.shift();e&&e()}else this.locked=!1}},d=e=>async(t,n)=>{try{return await u.acquire(),await e(t,n)}finally{u.release()}},f=async(e,t)=>{const{auth:{jwt:n},connection:{token:r},environment:{PAT_HOST:i}}=t();if(n){const{headers:t}=(0,s.A)({jwt:n,token:r},{withCurrentUrl:!0});try{await e((0,l.et)(`${i}/chatbubble/${o.Ak}/auth/chat/invalidate`,{method:"POST",headers:t}))}catch(e){console.error("Failed to invalidate auth token:",e)}}return e({type:c.zZ}),!0};let p=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return d(async(t,n)=>{var r,i;if(null===e)return!0;p=e;const a=n(),u=null===(r=a.connection)||void 0===r?void 0:r.token,d=null===(i=a.environment)||void 0===i?void 0:i.PAT_HOST;if(!u)return!1;const{headers:f}=(0,s.A)({token:u},{withCurrentUrl:!0});try{const{data:n,status:r}=await t((0,l.et)(`${d}/chatbubble/${o.Ak}/auth/identify`,{method:"POST",headers:f,body:e}));return r>=200&&r<400&&(t({type:c.qQ,...n}),p=null,!0)}catch(e){return console.error("Identity submission failed:",e),!1}})},g=e=>async(t,n)=>{p=e;const{connection:{token:r}}=n();r&&t(h(p))},m=()=>d(async(e,t)=>{var n,i,a;const u=t(),d=null===(n=u.chatbubble)||void 0===n?void 0:n.chatId,p=null===(i=u.connection)||void 0===i?void 0:i.token,h=null===(a=u.environment)||void 0===a?void 0:a.PAT_HOST,{getAuthToken:g}=r.Z;if(!d||!g)return await f(e,t),!1;let m;try{if(m=await g(d),!m)throw new Error("No JWT returned")}catch(n){return console.error("Chatbubble auth failed:",n),await f(e,t),!1}try{const{headers:t}=(0,s.A)({jwt:m,token:p},{withCurrentUrl:!0}),n=await e((0,l.et)(`${h}/chatbubble/${o.Ak}/auth/chat`,{method:"POST",headers:t}));return!(null==n||!n.data||(e({type:c.K_,jwt:m,avatarUrl:n.data.avatar_url,fullName:n.data.full_name}),0))}catch(n){return console.error("Server authentication failed:",n),await f(e,t),!1}}),b=()=>async(e,t)=>{var n,o,i;const a=t();if(null===(n=a.auth)||void 0===n||!n.isAuthenticated)return null;const s=null===(o=a.auth)||void 0===o?void 0:o.jwt,{getAuthToken:l}=r.Z;l&&function(e){const t=function(e){if(!e)return null;const t=e.match(/^[A-Za-z0-9-_=]+\.([A-Za-z0-9-_=]+)\.?[A-Za-z0-9-_.+/=]*$/);if(!t)return null;try{return JSON.parse(window.atob(t[1]))}catch(e){return null}}(e);return!t||t.exp-Math.floor((new Date).getTime()/1e3)<30}(s)&&await e(m());const c=t();return null!==(i=c.auth)&&void 0!==i&&i.isAuthenticated?{Authorization:`Bearer ${c.auth.jwt}`}:null}},340:(e,t,n)=>{"use strict";n.d(t,{A:()=>h}),n(9155);var r=n(5758),o=n(3649),i=n(1304),a=n(5134),s=n(8418),l=n(1197);const c=l.Ay.div.withConfig({componentId:"sc-embwe2-0"})(["font-weight:500;"]),u=l.Ay.div.withConfig({componentId:"sc-embwe2-1"})(["display:flex;flex-direction:column;justify-content:space-between;gap:24px;flex:1;"]),d=l.Ay.div.withConfig({componentId:"sc-embwe2-2"})(["display:flex;flex-direction:column;gap:8px;font-size:var(--_kindlychat-font-size-sm);line-height:20px;color:var(--panel-background-white-black-contrast-1743170834);"]),f=l.Ay.div.withConfig({componentId:"sc-embwe2-3"})(["display:grid;grid-template-columns:1fr 1fr;gap:8px;"]);var p=n(1085);const h=()=>{const{feedbackToSubmit:e}=(0,o.A)(),t=(0,a.jL)();return null!=e&&e.timeout?(0,p.jsxs)(u,{children:[(0,p.jsxs)(d,{children:[(0,p.jsx)(c,{children:e.timeout.title}),(0,p.jsx)("div",{children:e.timeout.message})]}),(0,p.jsxs)(f,{children:[(0,p.jsx)(r.A,{isSecondaryButton:!0,onClick:()=>{t((0,i.wQ)("FEEDBACK")),t((0,i.zn)(null)),t((0,s.ZG)("timeout"))},children:e.timeout.end_conversation_text}),(0,p.jsx)(r.A,{onClick:()=>{t((0,s.Dz)()),t((0,i.zn)(null))},children:e.timeout.continue_conversation_text})]})]}):null}},353:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{size:t=24,fill:n="#333333"}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M12 4.75L4.75 8C4.75 8 4 19.25 12 19.25C20 19.25 19.25 8 19.25 8L12 4.75Z",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.75 12.75L11 14.25L14.25 9.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},437:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>u,G8:()=>l,NR:()=>c});var r=n(9749),o=n.n(r),i=n(674),a=n(4557);const s={maximum:"max",minimum:"min"},l=e=>{const t={},n=e.map(e=>Object.entries(e).reduce((e,t)=>{let[n,r]=t;return e[s[n]||n]=r,e},{}));for(let e=0;e<n.length;e+=1){var r;const s=Object.keys(n[e]),l=null===(r=n[e].texts)||void 0===r?void 0:r.text;s.forEach(r=>{var s;o()(s=Object.values(a.ZF)).call(s,r)&&(t[(0,i.A)(r)]={value:n[e][r],...l&&{message:l}})})}return t},c=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;r&&"object"==typeof r&&"value"in r&&!("text"in r)&&(t[n]=r.value)}),t},u=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},459:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},480:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},485:(e,t,n)=>{"use strict";n.d(t,{A8:()=>r,E7:()=>i,wk:()=>o});const r="BOT_STARTED_TYPING",o="BOT_STOPPED_TYPING",i="MIMIR_STARTED_SEARCHING"},493:(e,t,n)=>{"use strict";var r=n(4713),o=n(262),i=n(6281),a=n(4674),s=n(9258),l=n(8655),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=a(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},541:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>J,Ng:()=>Z,Pj:()=>re,d4:()=>le,wA:()=>ie});var r=n(9155),o=n(5919),i=r.version.startsWith("19"),a=Symbol.for(i?"react.transitional.element":"react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=p,y=m;function x(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,u,d,f=!1;return function(p,h){return f?function(f,p){const h=!i(p,l),g=!o(f,s,p,l);return s=f,l=p,h&&g?(c=e(s,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):h?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):g?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}(p,h):(s=p,l=h,c=e(s,l),u=t(r,l),d=n(c,u,l),f=!0,d)}}function w(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function k(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function C(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=k(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=k(o),o=r(t,n)),o},r}}function S(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _(e,t,n){return{...n,...e,...t}}var A={notify(){},get:()=>[]};function E(e,t){let n,r=A,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=A)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var T=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),j=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),I=(()=>T||j?r.useLayoutEffect:r.useEffect)();function O(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function L(e,t){if(O(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!O(e[n[r]],t[n[r]]))return!1;return!0}var P={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},N={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z={[v]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[y]:M};function R(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case a:switch(e=e.type){case l:case u:case c:case h:case g:return e;default:switch(e=e&&e.$$typeof){case f:case p:case b:case m:case d:return e;default:return t}}case s:return t}}}(e)===m?M:z[e.$$typeof]||P}var $=Object.defineProperty,D=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,U=Object.prototype;function V(e,t){if("string"!=typeof t){if(U){const n=H(t);n&&n!==U&&V(e,n)}let n=D(t);F&&(n=n.concat(F(t)));const r=R(e),o=R(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(N[a]||o&&o[a]||r&&r[a])){const n=B(t,a);try{$(e,a,n)}catch(e){}}}}return e}var W=Symbol.for("react-redux-context"),G="undefined"!=typeof globalThis?globalThis:{};function q(){if(!r.createContext)return{};const e=G[W]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var K=q(),Y=[null,null];function X(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Q(e,t){return e===t}var Z=function(e,t,n,{pure:o,areStatesEqual:i=Q,areOwnPropsEqual:a=L,areStatePropsEqual:s=L,areMergedPropsEqual:l=L,forwardRef:c=!1,context:u=K}={}){const d=u,f=function(e){return e?"function"==typeof e?C(e):S(e,"mapStateToProps"):w(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?w(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?C(e):S(e,"mapDispatchToProps"):w(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):S(e,"mergeProps"):()=>_}(n),g=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:g,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:h,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function u(t){const[n,i,a]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),s=r.useMemo(()=>d,[n,d]),l=r.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(l)&&Boolean(l.store),f=c?t.store:l.store,p=u?l.getServerState:f.getState,h=r.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return x(t(e,o),n(e,o),r(e,o),e,o)}(f.dispatch,o),[f]),[m,b]=r.useMemo(()=>{if(!g)return Y;const e=E(f,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[f,c,l]),v=r.useMemo(()=>c?l:{...l,subscription:m},[c,l,m]),y=r.useRef(void 0),w=r.useRef(a),k=r.useRef(void 0),C=r.useRef(!1),S=r.useRef(!1),_=r.useRef(void 0);I(()=>(S.current=!0,()=>{S.current=!1}),[]);const A=r.useMemo(()=>()=>k.current&&a===w.current?k.current:h(f.getState(),a),[f,a]),T=r.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,f=null;const p=()=>{if(d||!s.current)return;const e=t.getState();let n,p;try{n=r(e,o.current)}catch(e){p=e,f=e}p||(f=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}(g,f,m,h,w,y,C,S,k,b,e):()=>{},[m]);var j,O;let L;j=X,O=[w,y,C,a,k,b],I(()=>j(...O),undefined);try{L=r.useSyncExternalStore(T,A,p?()=>h(p(),a):A)}catch(e){throw _.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${_.current.stack}\n\n`),e}I(()=>{_.current=void 0,k.current=void 0,y.current=L});const P=r.useMemo(()=>r.createElement(e,{...L,ref:i}),[i,e,L]);return r.useMemo(()=>g?r.createElement(s.Provider,{value:v},P):P,[s,P,v])}const m=r.memo(u);if(m.WrappedComponent=e,m.displayName=u.displayName=n,c){const t=r.forwardRef(function(e,t){return r.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,V(t,e)}return V(m,e)}},J=function(e){const{children:t,context:n,serverState:o,store:i}=e,a=r.useMemo(()=>{const e=E(i);return{store:i,subscription:e,getServerState:o?()=>o:void 0}},[i,o]),s=r.useMemo(()=>i.getState(),[i]);I(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=n||K;return r.createElement(l.Provider,{value:a},t)};function ee(e=K){return function(){return r.useContext(e)}}var te=ee();function ne(e=K){const t=e===K?te:ee(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var re=ne();function oe(e=K){const t=e===K?re:ne(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ie=oe(),ae=(e,t)=>e===t;function se(e=K){const t=e===K?te:ee(e),n=(e,n={})=>{const{equalityFn:i=ae}="function"==typeof n?{equalityFn:n}:n,a=t(),{store:s,subscription:l,getServerState:c}=a,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(l.addNestedSub,s.getState,c||s.getState,u,i);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var le=se()},660:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(9155),o=n(5352),i=n(1197),a=n(8663);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");return 3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`),t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`};var l=n(7638);const c=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-0"})(["display:flex;flex-direction:column;position:relative;width:100%;"," background-color:",";"],e=>{let{$isForm:t}=e;return t?"padding: 12px 0 16px;":(0,i.AH)(["border-radius:6px;padding:12px 12px 16px 12px;box-shadow:0px 1px 5px 1px rgba(0,0,0,0.08);"])},e=>{let{theme:t}=e;return t.panelBackground}),u=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-1"})(["padding:0px 8px 0px 0px;font-size:var(--_kindlychat-font-size-p);"]),d=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:12px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,a.w5)(t.background,"#FFFFFF","#000000")}),f=i.Ay.span.withConfig({componentId:"sc-1mhxo2t-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-p);"]),p=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-4"})(["position:relative;display:flex;flex:1;border:1px solid ",";border-radius:25px;"],e=>{let{theme:t}=e;return(0,a.w5)(t.panelBackground,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")}),h=(0,i.AH)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-6px;border:1px solid rgba(0,0,0,0.2);box-shadow:0 1px 4px 0 rgba(0,0,0,0.08);"],e=>{let{theme:t}=e;return t.buttonBackground}),g=(e,t,n)=>(e-n)/(t-n)*100,m=i.Ay.input.attrs(e=>{let{theme:t,value:n,max:r,min:o}=e;return{style:{background:`linear-gradient(to right, ${t.buttonBackground} 0%, ${t.buttonBackground} ${g(n,r,o)}%, ${s((0,a.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} ${g(n,r,o)}%, ${s((0,a.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} 100%)`}}}).withConfig({componentId:"sc-1mhxo2t-5"})(["cursor:pointer;"," &[type='range']{appearance:none;width:100%;border-radius:25px;height:8px;margin:0;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:8px;cursor:pointer;border-radius:25px;}}"],l.jq,h,h);var b=n(437),v=n(1085);const y=function(e){let{from:t,to:n,value:i=1,affix:a,affixValue:s,step:l=1,onChange:h,name:g,field:y,ariaLabel:x,validators:w=[],hasController:k}=e;const C=(0,b.G8)(w),S=(0,r.useMemo)(()=>{var e;const n=parseFloat(String(t));return Number.isNaN(n)?null===(e=C.min)||void 0===e?void 0:e.value:n},[t,C]),_=(0,r.useMemo)(()=>{var e;const t=parseFloat(String(n));return Number.isNaN(t)?null===(e=C.max)||void 0===e?void 0:e.value:t},[n,C]),[A,E]=(0,r.useState)(((e,t,n)=>t<e?e+n:t)(l,i,S));return(0,v.jsxs)(c,{$isForm:!!k,children:[(0,v.jsxs)(d,{$isForm:!!k,children:[a===o.rc.PREFIX&&(0,v.jsx)(u,{children:s}),(0,v.jsx)(f,{children:A}),a===o.rc.SUFFIX&&(0,v.jsx)(u,{children:s})]}),(0,v.jsx)(p,{children:(0,v.jsx)(m,{type:"range",name:g,step:l,min:S,max:_,value:A,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(h&&h(e.target.value),null!=y&&y.onChange&&y.onChange(e),E(e.target.value))},"aria-label":x})})]})}},674:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},701:(e,t,n)=>{"use strict";var r=n(6100),o=n(2137),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},748:(e,t,n)=>{var r=n(7354);e.exports=function(e,t,n){r(e,t),t.set(e,n)},e.exports.__esModule=!0,e.exports.default=e.exports},776:(e,t,n)=>{"use strict";n.d(t,{Y_:()=>g,kS:()=>b,fe:()=>m,mR:()=>v,vJ:()=>p,NS:()=>h});var r=n(904),o=n(9990);const i=(e,t)=>{const{type:n}=e;let r;return"Form"===n?r=(e=>{let{title:t,body_text:n,input_label:r,input_placeholder:o,languageCode:i}=e;return{sections:[{title:t[i],description:n[i]},{form:{input:{label:r[i],placeholder:o[i],required:!0},button:{title:"Send skjema",icon:"icon",type:"submit"}}}]}})({...e,languageCode:t}):"Product"===n?r=(e=>{var t;let{title:n,body_text:r,button_text:o,button_link:i,carousel_title:a,image_carousel:s,languageCode:l}=e;return{sections:[{title:n[l],description:r[l],buttons:[{label:o[l],value:i[l],button_type:"link",is_active:!0}]},{products:{title:a[l],items:null===(t=s[l])||void 0===t?void 0:t.map(e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:i,link_text:a,link_url:s,price:l}=e;return{title:t,image:o,linkText:a,linkUrl:s,productUrl:i,altText:n,description:r,price:l}})}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:i}=e;return{sections:[{title:t[i],description:n[i]},{link:{text:r[i],location:o[i]}}]}})({...e,languageCode:t}):"Multiple choice"===n?r=(e=>{let{title:t,body_text:n,button_blocks:r,languageCode:o}=e;return{sections:[{title:t[o],description:n[o]},{choices:{buttons:r.map(e=>{let{button_text:t,dialogue_id:n}=e;return{text:t[o],triggerDialogue:n}})}}]}})({...e,languageCode:t}):"Custom"===n&&(r={}),r};var a=n(339),s=n(8833),l=n(5352),c=n(9449),u=n(7559),d=n(3178);const f=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.find(e=>{let{is_primary:t}=e;return t}),o=n||r.code;return e.enabled[o]},p=e=>{let{slug:t,eventType:n,label:i}=e;return async(e,d)=>{if(!t||!n)return;const{supportedLanguages:p}=r.Z,{nudges:h}=d().bot,{currentLanguage:g}=d().chatbubble,m=(e=>{var t,n,r,o,i;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]})(h),b=m.find(e=>e.slug===t&&f(e,p,g));b&&(e({type:u.wX,slug:t}),n!==u.MO&&n!==u.oE||await e((e=>{let{targetNudge:t,eventType:n,label:r,currentLanguage:i}=e;return async(e,u)=>{const{botKey:d}=u().chatbubble,{PAT_HOST:f}=u().environment,{token:p}=u().connection,h=await e((0,a.z5)());e((0,s.et)(`${f}/chatbubble/${l.Ak}/nudge/`,{method:"POST",body:{session_id:(0,c.U)(),nudge_id:t.id,action:n,type:t.type,label:r||null,language_code:i},...(0,o.A)({botKey:d,token:p},{withCurrentUrl:!0,extra:h})}))}})({targetNudge:b,eventType:n,label:i,currentLanguage:g})))}},h=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(p({slug:o,eventType:u.MO,label:e}))},g=(e,t)=>(n,r)=>{const{show:o,isCustom:i,slug:a,trackEvent:s}=r().nudge;if(o){if(n({type:u.X2}),i){var l;const e=document.getElementById("kindly-custom-nudge");e&&(null===(l=e.parentNode)||void 0===l||l.removeChild(e))}s&&n(p({slug:a,eventType:e?u.MO:u.X2,label:t}))}},m=e=>{let{nudgeLayout:t,slug:n,trackEvent:o}=e;return(e,a)=>{var s,c,h,g,m,b,v;const{supportedLanguages:y}=r.Z,{nudges:x}=a().bot,{currentLanguage:w}=a().chatbubble,{show:k}=a().pushMessages,C=null==t?void 0:t.language;let S,_=null!==(s=null==t?void 0:t.webhook)&&void 0!==s?s:null,A=null!==(c=null==t?void 0:t.dialogueId)&&void 0!==c?c:null,E=t;const T=y.find(e=>{let{is_primary:t}=e;return t}),j=[...null!==(h=null==x?void 0:x.form_nudges)&&void 0!==h?h:[],...null!==(g=null==x?void 0:x.custom_nudges)&&void 0!==g?g:[],...null!==(m=null==x?void 0:x.product_nudges)&&void 0!==m?m:[],...null!==(b=null==x?void 0:x.text_nudges)&&void 0!==b?b:[],...null!==(v=null==x?void 0:x.multiple_choice_nudges)&&void 0!==v?v:[]],I=C||w||(null==T?void 0:T.code),O=n||t.slug;if(O){var L,P,N,M,z,R,$;if(S=j.filter(e=>e.slug===O)[0],void 0===S)return;if(A=null!==(L=null===(P=S)||void 0===P?void 0:P.dialogue_id)&&void 0!==L?L:A,_=null!==(N=null===(M=S)||void 0===M?void 0:M.webhook)&&void 0!==N?N:_,E=i(S,I),E.sections=[...null!==(z=null===(R=E)||void 0===R?void 0:R.sections)&&void 0!==z?z:[],...null!==($=null==t?void 0:t.sections)&&void 0!==$?$:[]],E.backdrop=null==t?void 0:t.backdrop,!f(S,y,I))return void console.warn("Nudge is disabled for the current language:",I)}else console.error("Please set up a nudge in the platform to get a slug!");o&&e(p({slug:O,eventType:u.wv})),k&&e({type:d.a_}),e({slug:O,type:u.wv,nudgeLayout:E,dialogue:A,webhook:_,nudgeType:l.MK.TEMPLATE,trackEvent:o})}},b=e=>{let{content:t,slug:n,onRendered:r,trackEvent:o}=e;return(e,i)=>{const{show:a}=i().pushMessages;o&&e(p({slug:n,eventType:u.un})),a&&e({type:d.a_}),e({type:u.un,content:t,slug:n,onRendered:r,nudgeType:l.MK.CUSTOM})}},v=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopup_time:r}=t,o=i(t,n);r<=0||(r&&0!==r?setTimeout(()=>e({type:u.wv,nudgeLayout:o,slug:t.slug}),r):e({type:u.wv,nudgeLayout:o,slug:t.slug}))}}},786:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function s(e,t,n){const r=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(i)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(r)}const l=function(e,t,n){return!r.randomUUID||t||e?s(e,t,n):r.randomUUID()}},814:(e,t,n)=>{"use strict";var r=n(2769),o=n(459),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},824:(e,t,n)=>{"use strict";n.d(t,{FH:()=>M,lN:()=>I,mN:()=>Ae,xI:()=>z});var r=n(9155),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,a=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!a(e)&&!Array.isArray(e)&&s(e)&&!i(e),c=e=>l(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(f&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||l(e)&&d(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=p(e[t]));return r}var h=e=>/^\w*$/.test(e),g=e=>void 0===e,m=e=>Array.isArray(e)?e.filter(Boolean):[],b=e=>m(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,n)=>{if(!t||!l(e))return n;const r=(h(t)?[t]:b(t)).reduce((e,t)=>a(e)?e:e[t],e);return g(r)||r===e?g(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e,x=e=>"function"==typeof e,w=(e,t,n)=>{let r=-1;const o=h(t)?[t]:b(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=l(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};const k={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},C={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},S="pattern",_="required",A=r.createContext(null);A.displayName="HookFormControlContext";const E=()=>r.useContext(A);var T=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==C.all&&(t._proxyFormState[o]=!r||C.all),n&&(n[o]=!0),e[o]}});return o};const j="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function I(e){const t=E(),{control:n=t,disabled:o,name:i,exact:a}=e||{},[s,l]=r.useState(n._formState),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return j(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!o&&l({...n._formState,...e})}}),[i,o,a]),r.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>T(s,n,c.current,!1),[s,n])}var O=e=>"string"==typeof e,L=(e,t,n,r,o)=>O(e)?(r&&t.watch.add(e),v(n,e,o)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),v(n,e))):(r&&(t.watchAll=!0),n),P=e=>a(e)||!s(e);function N(e,t,n=new WeakSet){if(P(e)||P(t))return Object.is(e,t);if(i(e)&&i(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const a of r){const r=e[a];if(!o.includes(a))return!1;if("ref"!==a){const e=t[a];if(i(r)&&i(e)||l(r)&&l(e)||Array.isArray(r)&&Array.isArray(e)?!N(r,e,n):!Object.is(r,e))return!1}}return!0}function M(e){const t=E(),{control:n=t,name:o,defaultValue:i,disabled:a,exact:s,compute:l}=e||{},c=r.useRef(i),u=r.useRef(l),d=r.useRef(void 0),f=r.useRef(n),p=r.useRef(o);u.current=l;const[h,g]=r.useState(()=>{const e=n._getWatch(o,c.current);return u.current?u.current(e):e}),m=r.useCallback(e=>{const t=L(o,n._names,e||n._formValues,!1,c.current);return u.current?u.current(t):t},[n._formValues,n._names,o]),b=r.useCallback(e=>{if(!a){const t=L(o,n._names,e||n._formValues,!1,c.current);if(u.current){const e=u.current(t);N(e,d.current)||(g(e),d.current=e)}else g(t)}},[n._formValues,n._names,a,o]);j(()=>(f.current===n&&N(p.current,o)||(f.current=n,p.current=o,b()),n._subscribe({name:o,formState:{values:!0},exact:s,callback:e=>{b(e.values)}})),[n,s,o,b]),r.useEffect(()=>n._removeUnmounted());const v=f.current!==n,y=p.current,x=r.useMemo(()=>{if(a)return null;const e=!v&&!N(y,o);return v||e?m():null},[a,v,o,y,m]);return null!==x?x:h}const z=e=>e.render(function(e){const t=E(),{name:n,disabled:o,control:i=t,shouldUnregister:a,defaultValue:s,exact:l=!0}=e,d=u(i._names.array,n),f=r.useMemo(()=>v(i._formValues,n,v(i._defaultValues,n,s)),[i,n,s]),h=M({control:i,name:n,defaultValue:f,exact:l}),m=I({control:i,name:n,exact:l}),b=r.useRef(e),C=r.useRef(void 0),S=r.useRef(i.register(n,{...e.rules,value:h,...y(e.disabled)?{disabled:e.disabled}:{}}));b.current=e;const _=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(m.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(m.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(m.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(m.validatingFields,n)},error:{enumerable:!0,get:()=>v(m.errors,n)}}),[m,n]),A=r.useCallback(e=>S.current.onChange({target:{value:c(e),name:n},type:k.CHANGE}),[n]),T=r.useCallback(()=>S.current.onBlur({target:{value:v(i._formValues,n),name:n},type:k.BLUR}),[n,i._formValues]),j=r.useCallback(e=>{const t=v(i._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>x(e.focus)&&e.focus(),select:()=>x(e.select)&&e.select(),setCustomValidity:t=>x(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>x(e.reportValidity)&&e.reportValidity()})},[i._fields,n]),O=r.useMemo(()=>({name:n,value:h,...y(o)||m.disabled?{disabled:m.disabled||o}:{},onChange:A,onBlur:T,ref:j}),[n,o,m.disabled,A,T,j,h]);return r.useEffect(()=>{const e=i._options.shouldUnregister||a,t=C.current;t&&t!==n&&!d&&i.unregister(t),i.register(n,{...b.current.rules,...y(b.current.disabled)?{disabled:b.current.disabled}:{}});const r=(e,t)=>{const n=v(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=p(v(i._options.defaultValues,n,b.current.defaultValue));w(i._defaultValues,n,e),g(v(i._formValues,n))&&w(i._formValues,n,e)}return!d&&i.register(n),C.current=n,()=>{(d?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,d,a]),r.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),r.useMemo(()=>({field:O,formState:m,fieldState:_}),[O,m,_])}(e));r.createContext(null).displayName="HookFormContext";var R=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},$=e=>Array.isArray(e)?e:[e],D=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function F(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&l(o)&&i){const e=F(o,i);l(e)&&(n[r]=e)}else e[r]&&(n[r]=i)}return n}var B=e=>l(e)&&!Object.keys(e).length,H=e=>"file"===e.type,U=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},V=e=>"select-multiple"===e.type,W=e=>"radio"===e.type,G=e=>W(e)||o(e),q=e=>U(e)&&e.isConnected;function K(e,t){const n=Array.isArray(t)?t:h(t)?[t]:b(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=g(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,i=n[o];return r&&delete r[i],0!==o&&(l(r)&&B(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!g(e[t]))return!1;return!0}(r))&&K(e,n.slice(0,-1)),e}var Y=e=>{for(const t in e)if(x(e[t]))return!0;return!1};function X(e){return Array.isArray(e)||l(e)&&!Y(e)}function Q(e,t={}){for(const n in e){const r=e[n];X(r)?(t[n]=Array.isArray(r)?[]:{},Q(r,t[n])):g(r)||(t[n]=!0)}return t}function Z(e,t,n){n||(n=Q(t));for(const r in e){const o=e[r];if(X(o))g(t)||P(n[r])?n[r]=Q(o,Array.isArray(o)?[]:{}):Z(o,a(t)?{}:t[r],n[r]);else{const e=t[r];n[r]=!N(o,e)}}return n}const J={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!g(e[0].attributes.value)?g(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:J}return J},ne=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>g(e)?e:t?""===e?NaN:e?+e:e:n&&O(e)?new Date(e):r?r(e):e;const re={isValid:!1,value:null};var oe=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,re):re;function ie(e){const t=e.ref;return H(t)?t.files:W(t)?oe(e.refs).value:V(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?te(e.refs).value:ne(g(t.value)?e.ref.value:t.value,e)}var ae=(e,t,n,r)=>{const o={};for(const n of e){const e=v(t,n);e&&w(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},se=e=>e instanceof RegExp,le=e=>g(e)?e:se(e)?e.source:l(e)?se(e.value)?e.value.source:e.value:e,ce=e=>({isOnSubmit:!e||e===C.onSubmit,isOnBlur:e===C.onBlur,isOnChange:e===C.onChange,isOnAll:e===C.all,isOnTouch:e===C.onTouched});const ue="AsyncFunction";var de=e=>!!e&&!!e.validate&&!!(x(e.validate)&&e.validate.constructor.name===ue||l(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ue)),fe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pe=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const he=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=v(e,o);if(n){const{_f:e,...i}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(he(i,t))break}else if(l(i)&&he(i,t))break}}};function ge(e,t,n){const r=v(e,n);if(r||h(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=v(t,r),a=v(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};if(a&&a.root&&a.root.type)return{name:`${r}.root`,error:a.root};o.pop()}return{name:n}}var me=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return B(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||C.all))},be=(e,t,n)=>!e||!t||e===t||$(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),ve=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),ye=(e,t)=>!m(v(e,t)).length&&K(e,t),xe=(e,t,n)=>{const r=$(v(e,n));return w(r,"root",t[n]),w(e,n,r),e};function we(e,t,n="validate"){if(O(e)||Array.isArray(e)&&e.every(O)||y(e)&&!e)return{type:n,message:O(e)?e:"",ref:t}}var ke=e=>l(e)&&!se(e)?e:{value:e,message:""},Ce=async(e,t,n,r,i,s)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:p,min:h,max:m,pattern:b,validate:w,name:k,valueAsNumber:C,mount:A}=e._f,E=v(n,k);if(!A||t.has(k))return{};const T=u?u[0]:c,j=e=>{i&&T.reportValidity&&(T.setCustomValidity(y(e)?"":e||""),T.reportValidity())},I={},L=W(c),P=o(c),N=L||P,M=(C||H(c))&&g(c.value)&&g(E)||U(c)&&""===c.value||""===E||Array.isArray(E)&&!E.length,z=R.bind(null,k,r,I),$=(e,t,n,r="maxLength",o="minLength")=>{const i=e?t:n;I[k]={type:e?r:o,message:i,ref:c,...z(e?r:o,i)}};if(s?!Array.isArray(E)||!E.length:d&&(!N&&(M||a(E))||y(E)&&!E||P&&!te(u).isValid||L&&!oe(u).isValid)){const{value:e,message:t}=O(d)?{value:!!d,message:d}:ke(d);if(e&&(I[k]={type:_,message:t,ref:T,...z(_,t)},!r))return j(t),I}if(!(M||a(h)&&a(m))){let e,t;const n=ke(m),o=ke(h);if(a(E)||isNaN(E)){const r=c.valueAsDate||new Date(E),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==c.type,s="week"==c.type;O(n.value)&&E&&(e=a?i(E)>i(n.value):s?E>n.value:r>new Date(n.value)),O(o.value)&&E&&(t=a?i(E)<i(o.value):s?E<o.value:r<new Date(o.value))}else{const r=c.valueAsNumber||(E?+E:E);a(n.value)||(e=r>n.value),a(o.value)||(t=r<o.value)}if((e||t)&&($(!!e,n.message,o.message,"max","min"),!r))return j(I[k].message),I}if((f||p)&&!M&&(O(E)||s&&Array.isArray(E))){const e=ke(f),t=ke(p),n=!a(e.value)&&E.length>+e.value,o=!a(t.value)&&E.length<+t.value;if((n||o)&&($(n,e.message,t.message),!r))return j(I[k].message),I}if(b&&!M&&O(E)){const{value:e,message:t}=ke(b);if(se(e)&&!E.match(e)&&(I[k]={type:S,message:t,ref:c,...z(S,t)},!r))return j(t),I}if(w)if(x(w)){const e=we(await w(E,n),T);if(e&&(I[k]={...e,...z("validate",e.message)},!r))return j(e.message),I}else if(l(w)){let e={};for(const t in w){if(!B(e)&&!r)break;const o=we(await w[t](E,n),T,t);o&&(e={...o,...z(t,o.message)},j(o.message),r&&(I[k]=e))}if(!B(e)&&(I[k]={ref:T,...e},!r))return I}return j(!0),I};const Se={mode:C.onSubmit,reValidateMode:C.onChange,shouldFocusError:!0};function _e(e={}){let t,n={...Se,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:x(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},s={},d=(l(n.defaultValues)||l(n.values))&&p(n.defaultValues||n.values)||{},h=n.shouldUnregister?{}:p(d),b={action:!1,mount:!1,watch:!1,keepIsValid:!1},S={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={...A};let T={...E};const j={array:D(),state:D()},I=n.criteriaMode===C.all,P=async e=>{if(!b.keepIsValid&&!n.disabled&&(E.isValid||T.isValid||e)){let e;n.resolver?(e=B((await W()).errors),M()):e=await Y(s,!0),e!==r.isValid&&j.state.next({isValid:e})}},M=(e,t)=>{!n.disabled&&(E.isValidating||E.validatingFields||T.isValidating||T.validatingFields)&&((e||Array.from(S.mount)).forEach(e=>{e&&(t?w(r.validatingFields,e,t):K(r.validatingFields,e))}),j.state.next({validatingFields:r.validatingFields,isValidating:!B(r.validatingFields)}))},z=(e,t,n,r)=>{const o=v(s,e);if(o){const i=v(h,e,g(n)?v(d,e):n);g(i)||r&&r.defaultChecked||t?w(h,e,t?i:ie(o._f)):J(e,i),b.mount&&!b.action&&P()}},R=(e,t,o,i,a)=>{let s=!1,l=!1;const c={name:e};if(!n.disabled){if(!o||i){(E.isDirty||T.isDirty)&&(l=r.isDirty,r.isDirty=c.isDirty=X(),s=l!==c.isDirty);const n=N(v(d,e),t);l=!!v(r.dirtyFields,e),n?K(r.dirtyFields,e):w(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||(E.dirtyFields||T.dirtyFields)&&l!==!n}if(o){const t=v(r.touchedFields,e);t||(w(r.touchedFields,e,o),c.touchedFields=r.touchedFields,s=s||(E.touchedFields||T.touchedFields)&&t!==o)}s&&a&&j.state.next(c)}return s?c:{}},W=async e=>(M(e,!0),await n.resolver(h,n.context,ae(e||S.mount,s,n.criteriaMode,n.shouldUseNativeValidation))),Y=async(t,o,i={valid:!0})=>{for(const a in t){const s=t[a];if(s){const{_f:t,...a}=s;if(t){const a=S.array.has(t.name),l=s._f&&de(s._f);l&&E.validatingFields&&M([t.name],!0);const c=await Ce(s,S.disabled,h,I,n.shouldUseNativeValidation&&!o,a);if(l&&E.validatingFields&&M([t.name]),c[t.name]&&(i.valid=!1,o||e.shouldUseNativeValidation))break;!o&&(v(c,t.name)?a?xe(r.errors,c,t.name):w(r.errors,t.name,c[t.name]):K(r.errors,t.name))}!B(a)&&await Y(a,o,i)}}return i.valid},X=(e,t)=>!n.disabled&&(e&&t&&w(h,e,t),!N(ue(),d)),Q=(e,t,n)=>L(e,S,{...b.mount?h:g(t)?d:O(e)?{[e]:t}:t},n,t),J=(e,t,n={})=>{const r=v(s,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&w(h,e,ne(t,n)),i=U(n.ref)&&a(t)?"":t,V(n.ref)?[...n.ref.options].forEach(e=>e.selected=i.includes(e.value)):n.refs?o(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(i)?e.checked=!!i.find(t=>t===e.value):e.checked=i===e.value||!!i)}):n.refs.forEach(e=>e.checked=e.value===i):H(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||j.state.next({name:e,values:p(h)})))}(n.shouldDirty||n.shouldTouch)&&R(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&se(e)},ee=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const o=t[r],a=e+"."+r,c=v(s,a);(S.array.has(e)||l(o)||c&&!c._f)&&!i(o)?ee(a,o,n):J(a,o,n)}},te=(e,t,n={})=>{const o=v(s,e),i=S.array.has(e),l=p(t);w(h,e,l),i?(j.array.next({name:e,values:p(h)}),(E.isDirty||E.dirtyFields||T.isDirty||T.dirtyFields)&&n.shouldDirty&&j.state.next({name:e,dirtyFields:Z(d,h),isDirty:X(e,l)})):!o||o._f||a(l)?J(e,l,n):ee(e,l,n),pe(e,S)?j.state.next({...r,name:e,values:p(h)}):j.state.next({name:b.mount?e:void 0,values:p(h)})},re=async e=>{b.mount=!0;const o=e.target;let a=o.name,l=!0;const u=v(s,a),d=e=>{l=Number.isNaN(e)||i(e)&&isNaN(e.getTime())||N(e,v(h,a,e))},f=ce(n.mode),g=ce(n.reValidateMode);if(u){let i,m;const b=o.type?ie(u._f):c(e),x=e.type===k.BLUR||e.type===k.FOCUS_OUT,C=!fe(u._f)&&!n.resolver&&!v(r.errors,a)&&!u._f.deps||ve(x,v(r.touchedFields,a),r.isSubmitted,g,f),A=pe(a,S,x);w(h,a,b),x?o&&o.readOnly||(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const O=R(a,b,x),L=!B(O)||A;if(!x&&j.state.next({name:a,type:e.type,values:p(h)}),C)return(E.isValid||T.isValid)&&("onBlur"===n.mode?x&&P():x||P()),L&&j.state.next({name:a,...A?{}:O});if(!x&&A&&j.state.next({...r}),n.resolver){const{errors:e}=await W([a]);if(M([a]),d(b),l){const t=ge(r.errors,s,a),n=ge(e,s,t.name||a);i=n.error,a=n.name,m=B(e)}}else M([a],!0),i=(await Ce(u,S.disabled,h,I,n.shouldUseNativeValidation))[a],M([a]),d(b),l&&(i?m=!1:(E.isValid||T.isValid)&&(m=await Y(s,!0)));l&&(u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&se(u._f.deps),((e,o,i,a)=>{const s=v(r.errors,e),l=(E.isValid||T.isValid)&&y(o)&&r.isValid!==o;var c;if(n.delayError&&i?(c=()=>((e,t)=>{w(r.errors,e,t),j.state.next({errors:r.errors})})(e,i),t=e=>{clearTimeout(_),_=setTimeout(c,e)},t(n.delayError)):(clearTimeout(_),t=null,i?w(r.errors,e,i):K(r.errors,e)),(i?!N(s,i):s)||!B(a)||l){const t={...a,...l&&y(o)?{isValid:o}:{},errors:r.errors,name:e};r={...r,...t},j.state.next(t)}})(a,m,i,O))}},oe=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},se=async(e,t={})=>{let o,i;const a=$(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await W(e);if(M(e),e)for(const n of e){const e=v(t,n);e?w(r.errors,n,e):K(r.errors,n)}else r.errors=t;return t})(g(e)?e:a);o=B(t),i=e?!a.some(e=>v(t,e)):o}else e?(i=(await Promise.all(a.map(async e=>{const t=v(s,e);return await Y(t&&t._f?{[e]:t}:t)}))).every(Boolean),(i||r.isValid)&&P()):i=o=await Y(s);return j.state.next({...!O(e)||(E.isValid||T.isValid)&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!i&&he(s,oe,e?a:S.mount),i},ue=(e,t)=>{let n={...b.mount?h:d};return t&&(n=F(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),g(e)?n:O(e)?v(n,e):e.map(e=>v(n,e))},we=(e,t)=>({invalid:!!v((t||r).errors,e),isDirty:!!v((t||r).dirtyFields,e),error:v((t||r).errors,e),isValidating:!!v(r.validatingFields,e),isTouched:!!v((t||r).touchedFields,e)}),ke=(e,t,n)=>{const o=(v(s,e,{_f:{}})._f||{}).ref,i=v(r.errors,e)||{},{ref:a,message:l,type:c,...u}=i;w(r.errors,e,{...u,...t,ref:o}),j.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},_e=e=>j.state.subscribe({next:t=>{be(e.name,t.name,e.exact)&&me(t,e.formState||E,Pe,e.reRenderRoot)&&e.callback({values:{...h},...r,...t,defaultValues:d})}}).unsubscribe,Ae=(e,t={})=>{for(const o of e?$(e):S.mount)S.mount.delete(o),S.array.delete(o),t.keepValue||(K(s,o),K(h,o)),!t.keepError&&K(r.errors,o),!t.keepDirty&&K(r.dirtyFields,o),!t.keepTouched&&K(r.touchedFields,o),!t.keepIsValidating&&K(r.validatingFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&K(d,o);j.state.next({values:p(h)}),j.state.next({...r,...t.keepDirty?{isDirty:X()}:{}}),!t.keepIsValid&&P()},Ee=({disabled:e,name:t})=>{if(y(e)&&b.mount||e||S.disabled.has(t)){const n=S.disabled.has(t)!==!!e;e?S.disabled.add(t):S.disabled.delete(t),n&&b.mount&&!b.action&&P()}},Te=(e,t={})=>{let r=v(s,e);const o=y(t.disabled)||y(n.disabled);return w(s,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),S.mount.add(e),r?Ee({disabled:y(t.disabled)?t.disabled:n.disabled,name:e}):z(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:le(t.min),max:le(t.max),minLength:le(t.minLength),maxLength:le(t.maxLength),pattern:le(t.pattern)}:{},name:e,onChange:re,onBlur:re,ref:o=>{if(o){Te(e,t),r=v(s,e);const n=g(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,i=G(n),a=r._f.refs||[];if(i?a.find(e=>e===n):n===r._f.ref)return;w(s,e,{_f:{...r._f,...i?{refs:[...a.filter(q),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),z(e,!1,void 0,n)}else r=v(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(S.array,e)||!b.action)&&S.unMount.add(e)}}},je=()=>n.shouldFocusError&&he(s,oe,S.mount),Ie=(e,t)=>async o=>{let i;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=p(h);if(j.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await W();M(),r.errors=e,a=p(t)}else await Y(s);if(S.disabled.size)for(const e of S.disabled)K(a,e);if(K(r.errors,"root"),B(r.errors)){j.state.next({errors:{}});try{await e(a,o)}catch(e){i=e}}else t&&await t({...r.errors},o),je(),setTimeout(je);if(j.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(r.errors)&&!i,submitCount:r.submitCount+1,errors:r.errors}),i)throw i},Oe=(e,t={})=>{const o=e?p(e):d,i=p(o),a=B(e),l=a?d:i;if(t.keepDefaultValues||(d=o),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...S.mount,...Object.keys(Z(d,h))]);for(const t of Array.from(e)){const e=v(r.dirtyFields,t),n=v(h,t),o=v(l,t);e&&!g(n)?w(l,t,n):e||g(o)||te(t,o)}}else{if(f&&g(e))for(const e of S.mount){const t=v(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(U(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of S.mount)te(e,v(l,e));else s={}}h=n.shouldUnregister?t.keepDefaultValues?p(d):{}:p(l),j.array.next({values:{...l}}),j.state.next({values:{...l}})}S={mount:t.keepDirtyValues?S.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!E.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!B(l),b.watch=!!n.shouldUnregister,b.keepIsValid=!!t.keepIsValid,b.action=!1,t.keepErrors||(r.errors={}),j.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!a&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||N(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:a?{}:t.keepDirtyValues?t.keepDefaultValues&&h?Z(d,h):r.dirtyFields:t.keepDefaultValues&&e?Z(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:d})},Le=(e,t)=>Oe(x(e)?e(h):e,{...n.resetOptions,...t}),Pe=e=>{r={...r,...e}},Ne={control:{register:Te,unregister:Ae,getFieldState:we,handleSubmit:Ie,setError:ke,_subscribe:_e,_runSchema:W,_updateIsValidating:M,_focusError:je,_getWatch:Q,_getDirty:X,_setValid:P,_setFieldArray:(e,t=[],o,i,a=!0,l=!0)=>{if(i&&o&&!n.disabled){if(b.action=!0,l&&Array.isArray(v(s,e))){const t=o(v(s,e),i.argA,i.argB);a&&w(s,e,t)}if(l&&Array.isArray(v(r.errors,e))){const t=o(v(r.errors,e),i.argA,i.argB);a&&w(r.errors,e,t),ye(r.errors,e)}if((E.touchedFields||T.touchedFields)&&l&&Array.isArray(v(r.touchedFields,e))){const t=o(v(r.touchedFields,e),i.argA,i.argB);a&&w(r.touchedFields,e,t)}(E.dirtyFields||T.dirtyFields)&&(r.dirtyFields=Z(d,h)),j.state.next({name:e,isDirty:X(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else w(h,e,t)},_setDisabledField:Ee,_setErrors:e=>{r.errors=e,j.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>m(v(b.mount?h:d,e,n.shouldUnregister?v(d,e,[]):[])),_reset:Oe,_resetDefaultValues:()=>x(n.defaultValues)&&n.defaultValues().then(e=>{Le(e,n.resetOptions),j.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of S.unMount){const t=v(s,e);t&&(t._f.refs?t._f.refs.every(e=>!q(e)):!q(t._f.ref))&&Ae(e)}S.unMount=new Set},_disableForm:e=>{y(e)&&(j.state.next({disabled:e}),he(s,(t,n)=>{const r=v(s,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:j,_proxyFormState:E,get _fields(){return s},get _formValues(){return h},get _state(){return b},set _state(e){b=e},get _defaultValues(){return d},get _names(){return S},set _names(e){S=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(b.mount=!0,T={...T,...e.formState},_e({...e,formState:{...A,...e.formState}})),trigger:se,register:Te,handleSubmit:Ie,watch:(e,t)=>x(e)?j.state.subscribe({next:n=>"values"in n&&e(Q(void 0,t),n)}):Q(e,t,!0),setValue:te,getValues:ue,reset:Le,resetField:(e,t={})=>{v(s,e)&&(g(t.defaultValue)?te(e,p(v(d,e))):(te(e,t.defaultValue),w(d,e,p(t.defaultValue))),t.keepTouched||K(r.touchedFields,e),t.keepDirty||(K(r.dirtyFields,e),r.isDirty=t.defaultValue?X(e,p(v(d,e))):X()),t.keepError||(K(r.errors,e),E.isValid&&P()),j.state.next({...r}))},clearErrors:e=>{e&&$(e).forEach(e=>K(r.errors,e)),j.state.next({errors:e?r.errors:{}})},unregister:Ae,setError:ke,setFocus:(e,t={})=>{const n=v(s,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&x(e.select)&&e.select()})}},getFieldState:we};return{...Ne,formControl:Ne}}function Ae(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[o,i]=r.useState({isDirty:!1,isValidating:!1,isLoading:x(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:x(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!x(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=_e(e);t.current={...r,formState:o}}const a=t.current.control;return a._options=e,j(()=>{const e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),r.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),r.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),r.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),r.useEffect(()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();e!==o.isDirty&&a._subjects.state.next({isDirty:e})}},[a,o.isDirty]),r.useEffect(()=>{var t;e.values&&!N(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),(null===(t=a._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||a._setValid(),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),r.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=r.useMemo(()=>T(o,a),[a,o]),t.current}},850:(e,t,n)=>{"use strict";n.d(t,{$A:()=>l,B3:()=>u,CE:()=>d,HD:()=>f,I$:()=>g,Zw:()=>p,dl:()=>m});var r=n(1197),o=n(8048),i=n(8832),a=n(1708),s=n(8663);const l=56,c=r.Ay.div.withConfig({componentId:"sc-4a24dm-0"})(["display:flex;align-items:center;"]),u=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-1"})(["height:","px;text-align:left;padding:12px 14px 12px 12px;align-items:center;color:#fff;min-width:100%;z-index:",";justify-content:space-between;background:",";background-color:",";box-shadow:0 3px 4px -1px ",";"],l,a.vI.headerIndex,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor),d=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-2"})(["overflow:hidden;gap:8px;"]),f=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-3"})(["align-items:center;gap:12px;"]),p=(0,r.Ay)(o.H2).withConfig({componentId:"sc-4a24dm-4"})(["margin:0;margin-right:",";margin-left:",";text-transform:none;letter-spacing:normal;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.3;color:",";font-size:var(--_kindlychat-font-size-m);flex:1;"],e=>{let{$isTextDirectionRtl:t}=e;return t?"0":"8px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"8px":"0"},e=>e.theme.headerText),h=(e,t)=>`\n background: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`,g=(0,r.Ay)(i.$n).withConfig({componentId:"sc-4a24dm-5"})(["height:28px;width:28px;display:flex;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-h4);padding:0;"," svg{fill:none;path{stroke:",";}}&:hover{","}&:active{","}&[inert]{opacity:0.5;}"],e=>{let{theme:t}=e;return h(t,"0.08")},e=>{let{theme:t}=e;return t.headerText},e=>{let{theme:t}=e;return h(t,"0.12")},e=>{let{theme:t}=e;return h(t,"0.16")}),m=r.Ay.div.withConfig({componentId:"sc-4a24dm-6"})(["border-radius:6px;display:inline-block;width:32px;height:32px;",""],e=>e.$avatar?`\n background-image: url(${e.$avatar});\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n `:"")},877:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},893:(e,t,n)=>{"use strict";function r(e,t,n){let r=null,o=[];const i=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n&&o.push(a),r&&clearTimeout(r),r=setTimeout(()=>{if(n){const t=o.slice(1).reduce((e,t)=>n(t,e),o[0]);e(...t),o=[]}else e(...a)},t)};return i.cancel=()=>{r&&clearTimeout(r),o=[]},i}n.d(t,{A:()=>r})},904:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(5677),o=n.n(r),i=n(748),a=n.n(i),s=n(7551),l=n.n(s),c=n(5791),u=n.n(c),d=n(8803),f=n.n(d),p=n(4665),h=n.n(p),g=n(9155),m=n(5873),b=n(1197),v=n(8191),y=n(9011);const x=/Edge?\/(9[89]|\d{3,})\.\d+(\.\d+|)|Firefox\/(9[7-9]|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9[89]|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(8[3-9]|9\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[3-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(14[6-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[3-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(1[7-9]|[2-9]\d|\d{3,})\.\d+/;var w=n(9514);const k=(0,b.DU)([":host{all:initial;}",""],e=>e.styles);var C=n(1085);const S=(0,g.lazy)(()=>Promise.resolve().then(n.bind(n,1717)));let _;const A=(0,g.forwardRef)((e,t)=>{let{botKey:n,options:r,setKindlyChatRef:o}=e;const[i,a]=(0,g.useState)(r);function s(e,t){i[e]!==t&&(void 0===_||_===e?(0,w.flushSync)(()=>{a(n=>({...n,[e]:t}))}):a(n=>({...n,[e]:t})),_=e)}return(0,g.useImperativeHandle)(t,()=>({setOption:s,state:i})),(0,C.jsxs)(g.Suspense,{fallback:"",children:[(0,C.jsx)(S,{setKindlyChatRef:o,botKey:n,options:i}),(0,C.jsx)(k,{styles:r.styles})]})});A.displayName="KindlyChatAPI";const E=A;var T;const j={},I="tab-visibility",O="bubble-visibility";var L=new WeakMap,P=new WeakMap,N=new WeakMap,M=new WeakSet,z=new WeakMap,R=new WeakMap;class ${constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o()(this,M),l()(this,"WINDOW_NAME","kindlyChat"),l()(this,"API_NODE_ID","kindly-chat-api"),l()(this,"SCRIPT_NODE_ID","kindly-chat"),l()(this,"VERSION","2.81.8"),l()(this,"APIRoot",null),a()(this,L,null),l()(this,"kindlyChat",null),l()(this,"botKey",void 0),l()(this,"options",{}),l()(this,"error",null),a()(this,P,null),a()(this,N,null),l()(this,"shadowRoot",null),l()(this,"showBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(L,e))||void 0===t||t.setOption("bubbleHidden",!1),e.options.bubbleHidden=!1,n&&(null===(r=u()(N,e))||void 0===r||r.postMessage({type:O,payload:{visible:!0}}))}),l()(this,"hideBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(L,e))||void 0===t||t.setOption("bubbleHidden",!0),e.options.bubbleHidden=!0,n&&(null===(r=u()(N,e))||void 0===r||r.postMessage({type:O,payload:{visible:!1}}))}),l()(this,"openChat",()=>{this.kindlyChat.openChat()}),l()(this,"closeChat",()=>{this.kindlyChat.closeChat()}),l()(this,"restartChat",e=>{this.kindlyChat.restartChat(e)}),l()(this,"getState",e=>u()(L,this).state[e]),l()(this,"setRootRef",e=>{f()(L,this,e)}),l()(this,"setNewContext",e=>{this.kindlyChat.setNewContext(e)}),l()(this,"getContext",async()=>this.kindlyChat.getContext()),l()(this,"setNewBannerMessage",async(e,t)=>this.kindlyChat.setNewBannerMessage(e,t)),l()(this,"setNewLabel",e=>{this.kindlyChat.setNewLabel(e)}),l()(this,"setKindlyChatRef",e=>{this.kindlyChat=e}),l()(this,"triggerDialogue",(e,t)=>{this.kindlyChat.triggerDialogue(e,t)}),l()(this,"sendMessage",(e,t)=>{this.kindlyChat.sendMessage(e,t)}),l()(this,"showNudge",e=>{let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;this.kindlyChat.showNudge({nudgeLayout:t,slug:n,trackEvent:r})}),l()(this,"showCustomNudge",e=>{let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;this.kindlyChat.showCustomNudge({content:t,slug:n,onRendered:r,trackEvent:o})}),l()(this,"getNudges",()=>this.kindlyChat.getNudges()),l()(this,"closeNudge",function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.kindlyChat.closeNudge(t,n,r)}),l()(this,"nudgeCompletion",e=>{let{slug:t}=e;this.kindlyChat.nudgeCompletion(t)}),l()(this,"triggerCtaEvent",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e.kindlyChat.triggerCtaEvent(t)}),l()(this,"identifyUser",e=>{this.kindlyChat.identifyUser(e)}),l()(this,"cancelHandover",()=>{this.kindlyChat.cancelHandover()}),l()(this,"authenticate",e=>{e?this.kindlyChat.setGetAuthToken(e):console.error("Kindly Chat: No getAuthToken function provided. Kindly Chat will not be authenticated.")}),l()(this,"deauthenticate",()=>{this.kindlyChat.setGetAuthToken()}),a()(this,z,()=>{if(u()(P,this)&&u()(P,this).unmount(),f()(P,this,null),this.shadowRoot){const e=this.shadowRoot.querySelector("style");e&&this.shadowRoot.removeChild(e)}}),a()(this,R,(e,t)=>{if(!this.shadowRoot){const t=window.document.createElement("div"),n=e.appendChild(t);this.shadowRoot=n.attachShadow({mode:"open"})}u()(P,this)||f()(P,this,(0,m.createRoot)(this.shadowRoot)),u()(P,this).render((0,C.jsx)(b.ID,{target:this.shadowRoot,children:(0,C.jsx)(E,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:t,options:this.options})}))}),l()(this,"render",()=>{this.error||(this.APIRoot?this.botKey?this.options.shadowDom&&HTMLElement.prototype.attachShadow?u()(R,this).call(this,this.APIRoot,this.botKey):(u()(P,this)||f()(P,this,(0,m.createRoot)(this.APIRoot)),u()(P,this).render((0,C.jsx)(E,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:this.botKey,options:this.options}))):console.error("Cannot call render() without a bot key."):console.error("Cannot call render() on uninitialized Kindly Chat."))}),window.addEventListener("error",e=>{var t,n;if(null!==(t=e.filename)&&void 0!==t&&t.startsWith("http://localhost:8081")&&(null===(n=e.message)||void 0===n||!n.startsWith("Script error."))){const t=new XMLHttpRequest;t.open("POST",`https://bot.kindly.ai/chatbubble/${v.Ak}/log`),t.setRequestHeader("content-type","application/json"),t.send(JSON.stringify((0,y.A)({level:"error",error:e.error,extra:{fromEventListener:!0,filename:e.filename,lineno:e.lineno,colno:e.colno,eventmessage:e.message}}),(e,t)=>void 0===t?null:t))}}),h()(M,this,D).call(this,t,n)){if(!function(){const e={ResizeObserver:"undefined"!=typeof ResizeObserver,HTMLDialogElement:"undefined"!=typeof HTMLDialogElement,BroadcastChannel:"undefined"!=typeof BroadcastChannel};return Object.values(e).every(Boolean)}()){const e="Browser does not support features required for Kindly Chat to work.";return console.warn(e),void(this.error=new Error(e))}h()(M,this,B).call(this,this.options.target),h()(M,this,F).call(this)}}get isBrowserCompatible(){const{userAgent:e}=window.navigator;return x.test(e)}get open(){return this.kindlyChat.getActivityStatus()}}function D(e,t){const{botKey:n,...r}=h()(M,this,H).call(this);if(this.botKey=e||window.kindlyBotKey||n||void 0,!this.botKey){const e='Could not initialize Kindly Chat without bot key. Tried window.kindlyBotKey, data attribute "data-bot-key" and property "botKey".';return console.error(e),!1}return this.options={...T.defaultOptions,...window.kindlyOptions,...r,...t},!0}function F(){this.botKey&&(f()(N,this,new BroadcastChannel(`kindly-chat-${this.botKey}`)),u()(N,this).onmessage=e=>{switch(e.data.type){case I:e.data.payload.visible&&u()(z,this).call(this);break;case O:e.data.payload.visible?this.showBubble():this.hideBubble()}},document.addEventListener("visibilitychange",()=>{var e,t;document.hidden?null===(e=u()(N,this))||void 0===e||e.postMessage({type:I,payload:{visible:!1}}):(null===(t=u()(N,this))||void 0===t||t.postMessage({type:I,payload:{visible:!0}}),u()(P,this)||(this.options.isFromMultitab=!0,this.render()))}))}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(window[this.WINDOW_NAME]){const e="Kindly Chat does not support multiple instances on the same page";return console.warn(e),void(this.error=new Error(e))}if(window[this.WINDOW_NAME]=this,!document.getElementById(this.API_NODE_ID)){let t;if(this.APIRoot=document.createElement("div"),this.APIRoot.id=this.API_NODE_ID,e){const n=document.getElementById(e),r=e&&n&&"function"==typeof(null==n?void 0:n.appendChild);t=r?n:document.body,e&&!r&&console.warn(`Render target element with id="${e}" not found in DOM, falling back to document.body`)}else t=document.body;t.appendChild(this.APIRoot)}}function H(){const e=document.getElementById(this.SCRIPT_NODE_ID);if(!e)return console.warn(`Could not find element with id="${this.SCRIPT_NODE_ID}" in DOM, not loading data attributes.`),{};const t={...null==e?void 0:e.dataset};["bubbleHidden","shadowDom"].forEach(n=>{const r=`data-${n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;e.hasAttribute(r)&&(t[n]=!0)});const n=e.getAttribute("nonce");return n&&(t.nonce=n),t}T=$,l()($,"defaultOptions",{bubbleHidden:!1,shadowDom:!1,styles:"",target:null,renderedBy:"API",isFromMultitab:!1})},908:(e,t,n)=>{"use strict";var r=n(9932);e.exports=Array.isArray||function(e){return"Array"===r(e)}},914:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(9749),o=n.n(r),i=n(9155),a=n.n(i),s=n(1197),l=n(1708),c=n(8663);const u=s.Ay.div.withConfig({componentId:"sc-av36lj-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;&.no-margin{margin:0;}"]),d=s.Ay.label.withConfig({componentId:"sc-av36lj-1"})(["font-size:var(--_kindlychat-font-size-sm);margin:4px 0;font-weight:500;color:var(--panel-background-white-black-contrast-1743170834);"]),f=s.Ay.div.withConfig({componentId:"sc-av36lj-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF",l.qd.textColorLight)});var p=n(824),h=n(3551);const g=[h.pd.name,h.Gb.name,h.Ap.name,p.xI.name,h.cS.name,h.l6.name,h.ZH.name,h.TM.name];var m=n(1085);const b=function(e){let{className:t,children:n,label:r=null,htmlFor:i=null,helperText:s=null,required:l=!1}=e;const c=a().Children.toArray(n);(!c.length||c.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${c.length}`);const p=c[0];if(p&&"function"==typeof p.type){const e=p.type.displayName||p.type.name;null!=g&&o()(g).call(g,e)||console.error(`InputWrapper child can only be one of the following: ${g.join(", ")}`)}return(0,m.jsxs)(u,{className:t,children:[r&&(0,m.jsxs)(d,{htmlFor:i||"",children:[r,l?(0,m.jsx)(m.Fragment,{children:"*"}):""]}),n,s&&(0,m.jsx)(f,{children:s})]})}},928:(e,t,n)=>{"use strict";n(4531)("match")},946:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>_});var r=n(9155),o=n(541),i=n(1308),a=n(6739),s=n(1304),l=n(8278),c=n(4174),u=n(1197),d=n(5394),f=n(8832),p=n(1708);const h=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-0"})(["display:flex;flex-direction:row;position:absolute;bottom:4px;padding-right:12px;right:calc(100% - 12px);background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";border-radius:7px;pointer-events:auto;",";"],p.Tj.shadowColorDark,e=>!e.$active&&(0,u.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),g=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-1"})(["z-index:1;bottom:2px;transition:all 0.2s ease;display:flex;flex-direction:row;"," ",";"],e=>e.$active&&e.$fullscreenMode&&"z-index: -1;",e=>!e.$active&&(0,u.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),m=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-2"})(["padding:2px;border-radius:7px;z-index:1;display:flex;min-width:max-content;justify-content:center;",";"],d.JP),b=(0,u.Ay)(f.N_).withConfig({componentId:"sc-1g1jmh4-3"})(["color:#757575;margin:0;cursor:pointer;font-size:var(--_kindlychat-font-size-sm);font-weight:500;text-decoration:none;&:hover{text-decoration:underline;}"]),v=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-4"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),y=(0,u.Ay)(f.$n).withConfig({componentId:"sc-1g1jmh4-5"})(["display:flex;position:relative;align-items:center;padding:12px;transition:all 0.15s ease;&:hover{background:#",";background-color:#",";svg path{fill:#000;}&:after{border-left-color:#000;}}"," ",""],p.Tj.grayColor,p.Tj.grayColor,e=>e.$active&&`\n background: #${p.Tj.grayColor};\n background-color: #${p.Tj.grayColor};\n `,e=>e.$tail&&"\n &:after {\n content: '';\n position: absolute;\n right: -6px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #ccc;\n }\n ");var x=n(2362),w=n(9270),k=n(5134);const C=1e3;var S=n(1085);function _(e){let{active:t}=e;const[n,u]=(0,r.useState)(!1),{admin:d}=(0,o.d4)(l.$P),{supportedLanguages:f}=(0,a.A)(),{fullscreenMode:p}=(0,o.d4)(l.Od),{inspectorOpen:_}=(0,o.d4)(l.qV),A=(0,o.wA)(),E=(0,r.useCallback)(()=>{A((0,s.uz)())},[A]);return function(){var e,t;const n=(0,k.jL)(),{admin:o}=(0,k.GV)(l.$P),{chatMessages:i}=(0,k.GV)(l.DZ)||[],a=null===(e=i.filter(e=>!(null!=e&&e.from_bot)).slice(-1))||void 0===e||null===(t=e[0])||void 0===t?void 0:t.message,s=(0,x.A)(e=>{n((0,w.y2)(e))},C),c=(0,r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&a&&s(a)},[a,s]);(0,r.useEffect)(()=>{if(o)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[c,o])}(),(0,S.jsxs)(h,{$active:t,children:[n&&t&&(0,S.jsx)(m,{children:f.map(e=>(0,S.jsx)(y,{title:`Restart ${e.name_local}`,onClick:()=>{return t=e.code,A((0,s.L4)(t)),void u(!1);var t},children:(0,S.jsx)(b,{children:e.code.toUpperCase()})},e.code))}),(0,S.jsxs)(g,{$active:t,$hasInspector:d,$fullscreenMode:p,children:[d&&(0,S.jsx)(v,{children:(0,S.jsx)(y,{onClick:E,title:_?"Close chat inspector":"Open chat inspector",children:_?(0,S.jsx)(i.V$,{}):(0,S.jsx)(i.bM,{})})}),(0,S.jsx)(v,{children:(0,S.jsx)(y,{title:"Restart chat",onClick:()=>{f.length>1?u(!n):c.A.getInstance().getConnection().restart(!0)},$active:n,$tail:f.length>1,children:(0,S.jsx)(i.fN,{width:15,height:15})})})]})]})}},960:(e,t,n)=>{"use strict";var r=n(9098),o=n(701),i=n(6281),a=n(459),s=n(8141),l=n(2044),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(o(c,e))return c[e]}})},1003:(e,t,n)=>{"use strict";var r=n(8099),o=n(8900),i=n(2769),a=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},1005:(e,t,n)=>{"use strict";var r=n(3273),o=n(4574),i=n(8130),a=function(e){return function(t,n,a){var s=r(t),l=i(s);if(0===l)return!e&&-1;var c,u=o(a,l);if(e&&n!=n){for(;l>u;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1019:(e,t,n)=>{"use strict";n(3855);var r=n(2856);e.exports=r("String","includes")},1037:(e,t,n)=>{"use strict";var r=n(8655),o=n(9989).f,i=r("metadata"),a=Function.prototype;void 0===a[i]&&o(a,i,{value:null})},1080:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},1085:(e,t,n)=>{"use strict";e.exports=n(3578)},1100:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},1139:(e,t,n)=>{"use strict";var r=n(8407),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},1197:(e,t,n)=>{"use strict";n.d(t,{ID:()=>Ot,Dx:()=>Bt,NP:()=>Ut,DU:()=>Jt,AH:()=>Kt,Ay:()=>Qt,i7:()=>en,DP:()=>Ht});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var i=n(9155),a=n.n(i),s=n(2146),l=n.n(s),c="-ms-",u="-moz-",d="-webkit-",f="comm",p="rule",h="decl",g="@import",m="@keyframes",b="@layer",v=Math.abs,y=String.fromCharCode,x=Object.assign;function w(e){return e.trim()}function k(e,t){return(e=t.exec(e))?e[0]:e}function C(e,t,n){return e.replace(t,n)}function S(e,t,n){return e.indexOf(t,n)}function _(e,t){return 0|e.charCodeAt(t)}function A(e,t,n){return e.slice(t,n)}function E(e){return e.length}function T(e){return e.length}function j(e,t){return t.push(e),e}function I(e,t){return e.filter(function(e){return!k(e,t)})}var O=1,L=1,P=0,N=0,M=0,z="";function R(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:O,column:L,length:a,return:"",siblings:s}}function $(e,t){return x(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function D(e){for(;e.root;)e=$(e.root,{children:[e]});j(e,e.siblings)}function F(){return M=N>0?_(z,--N):0,L--,10===M&&(L=1,O--),M}function B(){return M=N<P?_(z,N++):0,L++,10===M&&(L=1,O++),M}function H(){return _(z,N)}function U(){return N}function V(e,t){return A(z,e,t)}function W(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function G(e){return w(V(N-1,Y(91===e?e+2:40===e?e+1:e)))}function q(e){for(;(M=H())&&M<33;)B();return W(e)>2||W(M)>3?"":" "}function K(e,t){for(;--t&&B()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return V(e,U()+(t<6&&32==H()&&32==B()))}function Y(e){for(;B();)switch(M){case e:return N;case 34:case 39:34!==e&&39!==e&&Y(M);break;case 40:41===e&&Y(e);break;case 92:B()}return N}function X(e,t){for(;B()&&e+M!==57&&(e+M!==84||47!==H()););return"/*"+V(t,N-1)+"*"+y(47===e?e:B())}function Q(e){for(;!W(H());)B();return V(e,N)}function Z(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function J(e,t,n,r){switch(e.type){case b:if(e.children.length)break;case g:case h:return e.return=e.return||e.value;case f:return"";case m:return e.return=e.value+"{"+Z(e.children,r)+"}";case p:if(!E(e.value=e.props.join(",")))return""}return E(n=Z(e.children,r))?e.return=e.value+"{"+n+"}":""}function ee(e,t,n){switch(function(e,t){return 45^_(e,0)?(((t<<2^_(e,0))<<2^_(e,1))<<2^_(e,2))<<2^_(e,3):0}(e,t)){case 5103:return d+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return d+e+e;case 4789:return u+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return d+e+u+e+c+e+e;case 5936:switch(_(e,t+11)){case 114:return d+e+c+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return d+e+c+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return d+e+c+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return d+e+c+e+e;case 6165:return d+e+c+"flex-"+e+e;case 5187:return d+e+C(e,/(\w+).+(:[^]+)/,d+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return d+e+c+"flex-item-"+C(e,/flex-|-self/g,"")+(k(e,/flex-|baseline/)?"":c+"grid-row-"+C(e,/flex-|-self/g,""))+e;case 4675:return d+e+c+"flex-line-pack"+C(e,/align-content|flex-|-self/g,"")+e;case 5548:return d+e+c+C(e,"shrink","negative")+e;case 5292:return d+e+c+C(e,"basis","preferred-size")+e;case 6060:return d+"box-"+C(e,"-grow","")+d+e+c+C(e,"grow","positive")+e;case 4554:return d+C(e,/([^-])(transform)/g,"$1"+d+"$2")+e;case 6187:return C(C(C(e,/(zoom-|grab)/,d+"$1"),/(image-set)/,d+"$1"),e,"")+e;case 5495:case 3959:return C(e,/(image-set\([^]*)/,d+"$1$`$1");case 4968:return C(C(e,/(.+:)(flex-)?(.*)/,d+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+d+e+e;case 4200:if(!k(e,/flex-|baseline/))return c+"grid-column-align"+A(e,t)+e;break;case 2592:case 3360:return c+C(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,k(e.props,/grid-\w+-end/)})?~S(e+(n=n[t].value),"span",0)?e:c+C(e,"-start","")+e+c+"grid-row-span:"+(~S(n,"span",0)?k(n,/\d+/):+k(n,/\d+/)-+k(e,/\d+/))+";":c+C(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return k(e.props,/grid-\w+-start/)})?e:c+C(C(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return C(e,/(.+)-inline(.+)/,d+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(e)-1-t>6)switch(_(e,t+1)){case 109:if(45!==_(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch",0)?ee(C(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return C(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return c+n+":"+r+s+(o?c+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===_(e,t+6))return C(e,":",":"+d)+e;break;case 6444:switch(_(e,45===_(e,14)?18:11)){case 120:return C(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===_(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return C(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=ee(e.value,e.length,n));case m:return Z([$(e,{value:C(e.value,"@","@"+d)})],r);case p:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(k(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":D($(e,{props:[C(t,/:(read-\w+)/,":"+u+"$1")]})),D($(e,{props:[t]})),x(e,{props:I(n,r)});break;case"::placeholder":D($(e,{props:[C(t,/:(plac\w+)/,":"+d+"input-$1")]})),D($(e,{props:[C(t,/:(plac\w+)/,":"+u+"$1")]})),D($(e,{props:[C(t,/:(plac\w+)/,c+"input-$1")]})),D($(e,{props:[t]})),x(e,{props:I(n,r)})}return""})}}function ne(e){return function(e){return z="",e}(re("",null,null,null,[""],e=function(e){return O=L=1,P=E(z=e),N=0,[]}(e),0,[0],e))}function re(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,g=1,m=1,b=1,x=0,w="",k=o,A=i,T=r,I=w;m;)switch(h=x,x=B()){case 40:if(108!=h&&58==_(I,d-1)){-1!=S(I+=C(G(x),"&","&\f"),"&\f",v(c?s[c-1]:0))&&(b=-1);break}case 34:case 39:case 91:I+=G(x);break;case 9:case 10:case 13:case 32:I+=q(h);break;case 92:I+=K(U()-1,7);continue;case 47:switch(H()){case 42:case 47:j(ie(X(B(),U()),t,n,l),l);break;default:I+="/"}break;case 123*g:s[c++]=E(I)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+u:-1==b&&(I=C(I,/\f/g,"")),p>0&&E(I)-d&&j(p>32?ae(I+";",r,n,d-1,l):ae(C(I," ","")+";",r,n,d-2,l),l);break;case 59:I+=";";default:if(j(T=oe(I,t,n,c,u,o,s,w,k=[],A=[],d,i),i),123===x)if(0===u)re(I,t,T,T,k,i,d,s,A);else switch(99===f&&110===_(I,3)?100:f){case 100:case 108:case 109:case 115:re(e,T,T,r&&j(oe(e,T,T,0,0,o,s,w,o,k=[],d,A),A),o,A,d,s,r?k:A);break;default:re(I,T,T,T,[""],A,0,s,A)}}c=u=p=0,g=b=1,w=I="",d=a;break;case 58:d=1+E(I),p=h;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==F())continue;switch(I+=y(x),x*g){case 38:b=u>0?1:(I+="\f",-1);break;case 44:s[c++]=(E(I)-1)*b,b=1;break;case 64:45===H()&&(I+=G(B())),f=H(),u=d=E(w=I+=Q(U())),x++;break;case 45:45===h&&2==E(I)&&(g=0)}}return i}function oe(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,h=0===o?i:[""],g=T(h),m=0,b=0,y=0;m<r;++m)for(var x=0,k=A(e,f+1,f=v(b=a[m])),S=e;x<g;++x)(S=w(b>0?h[x]+" "+k:C(k,/&\f/g,h[x])))&&(l[y++]=S);return R(e,t,n,0===o?p:s,l,c,u,d)}function ie(e,t,n,r){return R(e,t,n,f,y(M),A(e,2,-2),0,r)}function ae(e,t,n,r,o){return R(e,t,n,h,A(e,0,r),A(e,r+1,-1),r,o)}var se={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le=n(9907),ce=void 0!==le&&void 0!==le.env&&(le.env.REACT_APP_SC_ATTR||le.env.SC_ATTR)||"data-styled",ue="active",de="data-styled-version",fe="6.1.19",pe="/*!sc*/\n",he="undefined"!=typeof window&&"undefined"!=typeof document,ge=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==le.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&le.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.SC_DISABLE_SPEEDY&&""!==le.env.SC_DISABLE_SPEEDY&&"false"!==le.env.SC_DISABLE_SPEEDY&&le.env.SC_DISABLE_SPEEDY),me={},be=(new Set,Object.freeze([])),ve=Object.freeze({});function ye(e,t,n){return void 0===n&&(n=ve),e.theme!==n.theme&&e.theme||t||n.theme}var xe=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),we=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ke=/(^-|-$)/g;function Ce(e){return e.replace(we,"-").replace(ke,"")}var Se=/(a)(d)/gi,_e=52,Ae=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ee(e){var t,n="";for(t=Math.abs(e);t>_e;t=t/_e|0)n=Ae(t%_e)+n;return(Ae(t%_e)+n).replace(Se,"$1-$2")}var Te,je=5381,Ie=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Oe=function(e){return Ie(je,e)};function Le(e){return Ee(Oe(e)>>>0)}function Pe(e){return"string"==typeof e&&!0}var Ne="function"==typeof Symbol&&Symbol.for,Me=Ne?Symbol.for("react.memo"):60115,ze=Ne?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fe=((Te={})[ze]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Te[Me]=De,Te);function Be(e){return("type"in(t=e)&&t.type.$$typeof)===Me?De:"$$typeof"in e?Fe[e.$$typeof]:Re;var t}var He=Object.defineProperty,Ue=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,We=Object.getOwnPropertyDescriptor,Ge=Object.getPrototypeOf,qe=Object.prototype;function Ke(e,t,n){if("string"!=typeof t){if(qe){var r=Ge(t);r&&r!==qe&&Ke(e,r,n)}var o=Ue(t);Ve&&(o=o.concat(Ve(t)));for(var i=Be(e),a=Be(t),s=0;s<o.length;++s){var l=o[s];if(!(l in $e||n&&n[l]||a&&l in a||i&&l in i)){var c=We(t,l);try{He(e,l,c)}catch(e){}}}}return e}function Ye(e){return"function"==typeof e}function Xe(e){return"object"==typeof e&&"styledComponentId"in e}function Qe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ze(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Je(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function et(e,t,n){if(void 0===n&&(n=!1),!n&&!Je(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=et(e[r],t[r]);else if(Je(t))for(var r in t)e[r]=et(e[r],t[r]);return e}function tt(e,t){Object.defineProperty(e,"toString",{value:t})}function nt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var rt=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw nt(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(pe);return t},e}(),ot=new Map,it=new Map,at=1,st=function(e){if(ot.has(e))return ot.get(e);for(;it.has(at);)at++;var t=at++;return ot.set(e,t),it.set(t,e),t},lt=function(e,t){at=t+1,ot.set(e,t),it.set(t,e)},ct="style[".concat(ce,"][").concat(de,'="').concat(fe,'"]'),ut=new RegExp("^".concat(ce,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),dt=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},ft=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(pe),o=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var l=s.match(ut);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(lt(u,c),dt(e,u,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(s)}}},pt=function(e){for(var t=document.querySelectorAll(ct),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(ce)!==ue&&(ft(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function ht(){return n.nc}var gt=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(ce,"]")));return t[t.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(ce,ue),r.setAttribute(de,fe);var a=ht();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},mt=function(){function e(e){this.element=gt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw nt(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),bt=function(){function e(e){this.element=gt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),vt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),yt=he,xt={isServer:!he,useCSSOMInjection:!ge},wt=function(){function e(e,t,n){void 0===e&&(e=ve),void 0===t&&(t={});var o=this;this.options=r(r({},xt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&he&&yt&&(yt=!1,pt(this)),tt(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return it.get(e)}(n);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(n);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(ce,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(pe)},i=0;i<n;i++)o(i);return r}(o)})}return e.registerId=function(e){return st(e)},e.prototype.rehydrate=function(){!this.server&&he&&pt(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new vt(n):t?new mt(n):new bt(n)}(this.options),new rt(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(st(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(st(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(st(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),kt=/&/g,Ct=/^\s*\/\/.*$/gm;function St(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=St(e.children,t)),e})}function _t(e){var t,n,r,o=void 0===e?ve:e,i=o.options,a=void 0===i?ve:i,s=o.plugins,l=void 0===s?be:s,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=l.slice();u.push(function(e){e.type===p&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(kt,n).replace(r,c))}),a.prefix&&u.push(te),u.push(J);var d=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(Ct,""),c=ne(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=St(c,a.namespace));var d,f,p,h=[];return Z(c,(d=u.concat((p=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&p(e)})),f=T(d),function(e,t,n,r){for(var o="",i=0;i<f;i++)o+=d[i](e,t,n,r)||"";return o})),h};return d.hash=l.length?l.reduce(function(e,t){return t.name||nt(15),Ie(e,t.name)},je).toString():"",d}var At=new wt,Et=_t(),Tt=a().createContext({shouldForwardProp:void 0,styleSheet:At,stylis:Et}),jt=(Tt.Consumer,a().createContext(void 0));function It(){return(0,i.useContext)(Tt)}function Ot(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=It().styleSheet,s=(0,i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),c=(0,i.useMemo)(function(){return _t({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,i.useEffect)(function(){l()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:c}},[e.shouldForwardProp,s,c]);return a().createElement(Tt.Provider,{value:u},a().createElement(jt.Provider,{value:c},e.children))}var Lt=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Et);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,tt(this,function(){throw nt(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Et),this.name+e.hash},e}(),Pt=function(e){return e>="A"&&e<="Z"};function Nt(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Pt(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Mt=function(e){return null==e||!1===e||""===e},zt=function(e){var t,n,r=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!Mt(a)&&(Array.isArray(a)&&a.isCss||Ye(a)?r.push("".concat(Nt(i),":"),a,";"):Je(a)?r.push.apply(r,o(o(["".concat(i," {")],zt(a),!1),["}"],!1)):r.push("".concat(Nt(i),": ").concat((t=i,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in se||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Rt(e,t,n,r){return Mt(e)?[]:Xe(e)?[".".concat(e.styledComponentId)]:Ye(e)?!Ye(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:Rt(e(t),t,n,r):e instanceof Lt?n?(e.inject(n,r),[e.getName(r)]):[e]:Je(e)?zt(e):Array.isArray(e)?Array.prototype.concat.apply(be,e.map(function(e){return Rt(e,t,n,r)})):[e.toString()];var o}function $t(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ye(n)&&!Xe(n))return!1}return!0}var Dt=Oe(fe),Ft=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&$t(e),this.componentId=t,this.baseHash=Ie(Dt,t),this.baseStyle=n,wt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Qe(r,this.staticRulesId);else{var o=Ze(Rt(this.rules,e,t,n)),i=Ee(Ie(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=Qe(r,i),this.staticRulesId=i}else{for(var s=Ie(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=Ze(Rt(u,e,t,n));s=Ie(s,d+c),l+=d}}if(l){var f=Ee(s>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=Qe(r,f)}}return r},e}(),Bt=a().createContext(void 0);function Ht(){var e=(0,i.useContext)(Bt);if(!e)throw nt(18);return e}function Ut(e){var t=a().useContext(Bt),n=(0,i.useMemo)(function(){return function(e,t){if(!e)throw nt(14);if(Ye(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw nt(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?a().createElement(Bt.Provider,{value:n},e.children):null}Bt.Consumer;var Vt={};function Wt(e,t,n){var o=Xe(e),s=e,l=!Pe(e),c=t.attrs,u=void 0===c?be:c,d=t.componentId,f=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Ce(e);Vt[n]=(Vt[n]||0)+1;var r="".concat(n,"-").concat(Le(fe+n+Vt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,p=t.displayName,h=void 0===p?function(e){return Pe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):p,g=t.displayName&&t.componentId?"".concat(Ce(t.displayName),"-").concat(t.componentId):t.componentId||f,m=o&&s.attrs?s.attrs.concat(u).filter(Boolean):u,b=t.shouldForwardProp;if(o&&s.shouldForwardProp){var v=s.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;b=function(e,t){return v(e,t)&&y(e,t)}}else b=v}var x=new Ft(n,g,o?s.componentStyle:void 0);function w(e,t){return function(e,t,n){var o=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,f=a().useContext(Bt),p=It(),h=e.shouldForwardProp||p.shouldForwardProp,g=ye(t,f,l)||ve,m=function(e,t,n){for(var o,i=r(r({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=Ye(o=e[a])?o(i):o;for(var l in s)i[l]="className"===l?Qe(i[l],s[l]):"style"===l?r(r({},i[l]),s[l]):s[l]}return t.className&&(i.className=Qe(i.className,t.className)),i}(o,t,g),b=m.as||d,v={};for(var y in m)void 0===m[y]||"$"===y[0]||"as"===y||"theme"===y&&m.theme===g||("forwardedAs"===y?v.as=m.forwardedAs:h&&!h(y,b)||(v[y]=m[y]));var x=function(e,t){var n=It();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,m),w=Qe(c,u);return x&&(w+=" "+x),m.className&&(w+=" "+m.className),v[Pe(b)&&!xe.has(b)?"class":"className"]=w,n&&(v.ref=n),(0,i.createElement)(b,v)}(k,e,t)}w.displayName=h;var k=a().forwardRef(w);return k.attrs=m,k.componentStyle=x,k.displayName=h,k.shouldForwardProp=b,k.foldedComponentIds=o?Qe(s.foldedComponentIds,s.styledComponentId):"",k.styledComponentId=g,k.target=o?s.target:e,Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)et(e,o[r],!0);return e}({},s.defaultProps,e):e}}),tt(k,function(){return".".concat(k.styledComponentId)}),l&&Ke(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function Gt(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}new Set;var qt=function(e){return Object.assign(e,{isCss:!0})};function Kt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Ye(e)||Je(e))return qt(Rt(Gt(be,o([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Rt(r):qt(Rt(Gt(r,t)))}function Yt(e,t,n){if(void 0===n&&(n=ve),!t)throw nt(1,t);var i=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,n,Kt.apply(void 0,o([r],i,!1)))};return i.attrs=function(o){return Yt(e,t,r(r({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},i.withConfig=function(o){return Yt(e,t,r(r({},n),o))},i}var Xt=function(e){return Yt(Wt,e)},Qt=Xt;xe.forEach(function(e){Qt[e]=Xt(e)});var Zt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=$t(e),wt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Ze(Rt(this.rules,t,n,r)),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&wt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Jt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Kt.apply(void 0,o([e],t,!1)),s="sc-global-".concat(Le(JSON.stringify(i))),l=new Zt(i,s),c=function(e){var t=It(),n=a().useContext(Bt),r=a().useRef(t.styleSheet.allocateGSInstance(s)).current;return t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),a().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return l.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,t,n,o,i){if(l.isStatic)l.renderStyles(e,me,n,i);else{var a=r(r({},t),{theme:ye(t,o,c.defaultProps)});l.renderStyles(e,a,n,i)}}return a().memo(c)}function en(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Ze(Kt.apply(void 0,o([e],t,!1))),i=Le(r);return new Lt(i,r)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=ht(),r=Ze([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat(de,'="').concat(fe,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw nt(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw nt(2);var n=e.instance.toString();if(!n)return[];var o=((t={})[ce]="",t[de]=fe,t.dangerouslySetInnerHTML={__html:n},t),i=ht();return i&&(o.nonce=i),[a().createElement("style",r({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new wt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw nt(2);return a().createElement(Ot,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw nt(3)}})(),"__sc-".concat(ce,"__")},1203:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},1210:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(7013),a=n(4713),s=n(6100),l=n(1203),c=n(2769),u=n(6281),d=n(5148),f=n(7785),p=n(4603),h=String,g=o("JSON","stringify"),m=s(/./.exec),b=s("".charAt),v=s("".charCodeAt),y=s("".replace),x=s(1.1.toString),w=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,S=!p||l(function(){var e=o("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),_=l(function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")}),A=function(e,t){var n=d(arguments),r=f(t);if(c(r)||void 0!==e&&!u(e))return n[1]=function(e,t){if(c(r)&&(t=a(r,this,h(e),t)),!u(t))return t},i(g,null,n)},E=function(e,t,n){var r=b(n,t-1),o=b(n,t+1);return m(k,e)&&!m(C,o)||m(C,e)&&!m(k,r)?"\\u"+x(v(e,0),16):e};g&&r({target:"JSON",stat:!0,arity:3,forced:S||_},{stringify:function(e,t,n){var r=d(arguments),o=i(S?A:g,null,r);return _&&"string"==typeof o?y(o,w,E):o}})},1226:(e,t,n)=>{"use strict";n.d(t,{A:()=>y}),n(9155);var r=n(824),o=n(3949),i=n(1197),a=n(8787),s=n(8832),l=n(1708),c=n(8663),u=n(8668);const d=i.Ay.div.withConfig({componentId:"sc-4y6b4p-0"})(["position:relative;display:flex;"]),f=(0,i.Ay)(o.A).withConfig({componentId:"sc-4y6b4p-1"})([""," max-height:unset;white-space:unset;text-overflow:unset;padding-right:unset;"," color:var(--panel-background-white-black-contrast-1743170834);min-height:","px;outline-offset:-4px;@media ","{max-height:unset;}"," "," &:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}"],s.hF,e=>{let{theme:t}=e;return(0,a.Mo)(t.panelBackground,.08)},e=>{let{$minHeight:t}=e;return t},l.jO.maxTablet,(0,u.A)()&&(0,i.AH)(["max-height:unset;"]),e=>{let{$hasMaxLength:t}=e;if(t)return"padding-bottom: 24px;"},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},a.sF,e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFF","#000")});var p=n(2816),h=n(2016),g=n(7376),m=n(8853),b=n(437),v=n(1085);const y=function(e){var t,n,o;let{autoComplete:i="off",name:a,register:s,validators:l,control:c,id:u,setError:y,clearErrors:x,trigger:w,...k}=e;const C=(0,b.G8)(l),{ref:S,onChange:_,...A}=s?s(a,C):{},{errors:E,isSubmitted:T}=(0,r.lN)({name:a,control:c}),j=(0,g.A)({name:a,trigger:w,control:c,setError:y,clearErrors:x});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(d,{children:[(0,v.jsx)(f,{autoComplete:i,name:a,minRows:2,$hasMaxLength:!(null===(t=C.maxLength)||void 0===t||!t.value),id:u||a,...(0,b.NR)(C),...A&&{...A},onChange:e=>{null==_||_(e),j(e)},ref:S,"aria-errormessage":`error_${a}`,"aria-invalid":!(0,m.A)(E)&&T,...k}),!(null===(n=C.maxLength)||void 0===n||!n.value)&&c&&a&&(0,v.jsx)(p.A,{position:"bottom",fieldName:a,control:c,maxLength:null===(o=C.maxLength)||void 0===o?void 0:o.value})]}),(0,v.jsx)(h.A,{control:c,name:a})]})}},1249:(e,t,n)=>{"use strict";var r=n(1003),o=n(4531),i=n(1811);o("toStringTag"),i(r("Symbol"),"Symbol")},1268:(e,t,n)=>{"use strict";var r=n(6100),o=0,i=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},1304:(e,t,n)=>{"use strict";n.d(t,{oI:()=>C.oI,Sz:()=>u.Sz,B:()=>p.B,Mx:()=>l.Mx,UB:()=>p.UB,cL:()=>r.cL,RY:()=>u.RY,Bd:()=>k.Bd,Rh:()=>p.Rh,eG:()=>p.eG,mN:()=>p.mN,_e:()=>p._e,Fe:()=>w.F,pK:()=>i,Y_:()=>S.Y_,gQ:()=>C.gQ,wQ:()=>p.wQ,ky:()=>p.ky,VK:()=>p.VK,z5:()=>l.z5,SD:()=>x,gm:()=>l.gm,Rm:()=>u.Rm,Mm:()=>p.Mm,ZS:()=>p.ZS,lQ:()=>p.lQ,tM:()=>k.tM,aP:()=>k.aP,c9:()=>u.c9,Zn:()=>k.Zn,j3:()=>k.j3,Ln:()=>p.Ln,L4:()=>p.L4,zn:()=>p.zn,Bu:()=>k.Bu,nI:()=>p.nI,F3:()=>g,pA:()=>k.pA,Aw:()=>v,tD:()=>y,Dc:()=>s,kS:()=>S.kS,ob:()=>p.ob,ku:()=>C.ku,cC:()=>w.c,fe:()=>S.fe,i1:()=>p.i1,VP:()=>C.VP,mR:()=>S.mR,y2:()=>k.y2,V$:()=>p.V$,uz:()=>m,yM:()=>f,vJ:()=>S.vJ,qJ:()=>k.qJ,et:()=>u.et,zh:()=>k.zh,m8:()=>u.m8,R7:()=>u.R7,Mb:()=>r.Mb,mw:()=>r.mw});var r=n(8317),o=n(4961);const i=()=>e=>{e({type:o.u2})};var a=n(3821);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n=>{n({type:a.Y,payload:{text:e}}),t>0&&setTimeout(()=>n({type:a.n}),t)}};var l=n(339),c=n(9990),u=n(8833),d=n(5352);const f=e=>async(t,n)=>{const{PAT_HOST:r}=n().environment,{botKey:o,currentLanguage:i}=n().chatbubble,{token:a}=n().connection,s=await t((0,l.z5)());t((0,u.et)(`${r}/chatbubble/${d.Ak}/conversion/`,{method:"POST",body:{is_order:e,language_code:i},...(0,c.A)({botKey:o,token:a},{withCurrentUrl:!0,extra:s})}))};var p=n(6834),h=(n(4390),n(8689));const g=e=>({type:h.ye,chatMessageId:e}),m=()=>({type:h.vK});var b=n(7639);const v=e=>t=>{t({type:b.s,context:e})},y=e=>(t,n)=>{if("string"!=typeof e)throw new Error("label needs to be a string, received "+typeof e);t({type:b.T,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:i}}=n();r&&t((0,u.et)(`${o}/chatbubble/${d.Ak}/update_labels`,{method:"POST",body:{labels:i},...(0,c.A)({token:r})}))},x=()=>async(e,t)=>{const{connection:{token:n,botKey:r},environment:{PAT_HOST:o},local:{context:i}}=t();let a={...i};if(n){const t=await e((0,u.et)(`${o}/chatbubble/${d.Ak}/context`,{method:"get",...(0,c.A)({token:n,botKey:r})}));null!=t&&t.data&&(a={...t.data,...a})}return a};var w=n(5392),k=n(9270),C=n(7474),S=n(776)},1305:(e,t,n)=>{"use strict";var r=n(8684);e.exports=r},1308:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>y,A6:()=>o,fl:()=>i,US:()=>a,gp:()=>h,WI:()=>b,Gr:()=>m,V$:()=>l,bM:()=>s,T4:()=>v,U:()=>f,qY:()=>g,gR:()=>c,fN:()=>p,qx:()=>u,Ze:()=>d}),n(9155);var r=n(1085);function o(e){let{fill:t="none",stroke:n="white",...o}=e;return(0,r.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,r.jsx)("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"})})}function i(e){let{fill:t="none",stroke:n="white",...o}=e;return(0,r.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,r.jsx)("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"})})}function a(e){let{color:t,...n}=e;return(0,r.jsxs)("svg",{...n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function s(e){let{width:t="16px",height:n="12px",fill:o="rgb(0, 105, 255)"}=e;return(0,r.jsx)("svg",{width:t,height:n,viewBox:"0 0 16 12",children:(0,r.jsx)("path",{d:"M8 12c3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3C14.4 3.1 11.6 0 8 0 4.4 0 1.6 3.1.4 4.9c-.5.7-.5 1.6 0 2.2C1.6 8.9 4.4 12 8 12zm0-9c1.7 0 3 1.3 3 3S9.7 9 8 9 5 7.7 5 6s1.3-3 3-3z",fill:o})})}function l(e){let{width:t="16px",height:n="16px",fill:o="rgb(0, 105, 255)"}=e;return(0,r.jsx)("svg",{width:t,height:n,children:(0,r.jsx)("g",{fill:o,children:(0,r.jsx)("path",{d:"M14.6 5.6l-8.2 8.2c.5.1 1.1.2 1.6.2 3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3-.2-.3-.6-.7-1-1.2zM14.3.3L11.6 3C10.5 2.4 9.3 2 8 2 4.4 2 1.6 5.1.4 6.9c-.5.7-.5 1.6 0 2.2.5.8 1.4 1.8 2.4 2.7L.3 14.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l14-14c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0zm-9 9C5.1 8.9 5 8.5 5 8c0-1.7 1.3-3 3-3 .5 0 .9.1 1.3.3l-4 4z"})})})}function c(e){let{...t}=e;return(0,r.jsx)("svg",{...t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function u(e){return(0,r.jsxs)("svg",{...e,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#a)",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",children:(0,r.jsx)("path",{d:"M4.75 4.75 19.25 12l-14.5 7.25L8.25 12l-3.5-7.25ZM8.5 12h2.75"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"a",children:(0,r.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function d(e){return(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M5.62117 14.9627L6.72197 15.1351C7.53458 15.2623 8.11491 16.0066 8.05506 16.8451L7.97396 17.9816C7.95034 18.3127 8.12672 18.6244 8.41885 18.7686L9.23303 19.1697C9.52516 19.3139 9.87399 19.2599 10.1126 19.0352L10.9307 18.262C11.5339 17.6917 12.4646 17.6917 13.0685 18.262L13.8866 19.0352C14.1252 19.2608 14.4733 19.3139 14.7662 19.1697L15.5819 18.7678C15.8733 18.6244 16.0489 18.3135 16.0253 17.9833L15.9441 16.8451C15.8843 16.0066 16.4646 15.2623 17.2772 15.1351L18.378 14.9627C18.6985 14.9128 18.9568 14.6671 19.0292 14.3433L19.23 13.4428C19.3025 13.119 19.1741 12.7831 18.9064 12.5962L17.9875 11.9526C17.3095 11.4774 17.1024 10.5495 17.5119 9.82051L18.067 8.83299C18.2284 8.54543 18.2017 8.18538 17.9993 7.92602L17.4363 7.2035C17.2339 6.94413 16.8969 6.83701 16.5867 6.93447L15.5221 7.26794C14.7355 7.51441 13.8969 7.1012 13.5945 6.31908L13.1866 5.26148C13.0669 4.95218 12.7748 4.7492 12.4496 4.75L11.5472 4.75242C11.222 4.75322 10.9307 4.95782 10.8126 5.26793L10.4149 6.31344C10.1157 7.1004 9.27319 7.51683 8.4842 7.26874L7.37553 6.92078C7.0645 6.82251 6.72591 6.93044 6.52355 7.19142L5.96448 7.91474C5.76212 8.17652 5.73771 8.53738 5.90228 8.82493L6.47 9.81487C6.88812 10.5446 6.68339 11.4814 6.00149 11.9591L5.0936 12.5954C4.82588 12.7831 4.69754 13.119 4.76998 13.442L4.97077 14.3425C5.04242 14.6671 5.30069 14.9128 5.62117 14.9627Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13.5911 10.4089C14.4696 11.2875 14.4696 12.7125 13.5911 13.5911C12.7125 14.4696 11.2875 14.4696 10.4089 13.5911C9.53036 12.7125 9.53036 11.2875 10.4089 10.4089C11.2875 9.53036 12.7125 9.53036 13.5911 10.4089Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function f(e){let{crop:t=!1,width:n=24,height:o=24,...i}=e;const a=t?"4 4 16 16":"0 0 24 24";return(0,r.jsxs)("svg",{width:n,height:o,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:a,...i,children:[(0,r.jsx)("path",{d:"M12.75 19.25L16 12.75L19.25 19.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14 17.25H18",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4.75 6.75H13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 6.5V4.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.25 6.75C11.25 6.75 11.25 9.25 9.25 11.25C7.25 13.25 4.75 13.25 4.75 13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M12.25 13.25C12.25 13.25 9.75 13.25 7.75 11.25C7.34551 10.8455 6.75 9.75 6.75 9.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]})}function p(e){return(0,r.jsx)("svg",{...e,viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M8.7.2l.7 6.4 2.1-2.1A5.01 5.01 0 018 13a5.01 5.01 0 01-3.5-8.5c.6-.6 1.4-1.1 2.3-1.3l-.6-1.9C5 1.6 3.9 2.2 3 3.1A7.06 7.06 0 003 13c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L15 .9 8.7.2z",fill:"#0069ff",fillRule:"evenodd"})})}function h(e){return(0,r.jsxs)("svg",{...e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M3.16675 4.49998V11.5C3.16675 12.2364 3.7637 12.8333 4.50008 12.8333H11.5001C12.2365 12.8333 12.8334 12.2364 12.8334 11.5V4.49998C12.8334 3.7636 12.2365 3.16665 11.5001 3.16665H4.50008C3.7637 3.16665 3.16675 3.7636 3.16675 4.49998Z",stroke:"white",strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"})]})}const g=function(e){let{color:t="white",...n}=e;return(0,r.jsxs)("svg",{...n,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M11.1667 8.83333L12.0001 8C13.1047 6.89539 13.1047 5.10456 12.0001 3.99999C10.8955 2.89543 9.10468 2.89543 8.00008 3.99999L7.16675 4.83333",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4.83315 7.16666L3.99981 8C2.89525 9.1046 2.89525 10.8954 3.99981 12C5.10438 13.1046 6.89521 13.1046 7.99981 12L8.83315 11.1667",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.5 6.5L6.5 9.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"})]})};function m(e){let{size:t=24,color:n="#333",className:o}=e;return(0,r.jsxs)("svg",{width:t,height:t,className:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{children:"External link, opens in a new tab"}),(0,r.jsx)("path",{d:"M17.25 15.25V6.75H8.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M17 7L6.75 17.25",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function b(e){return(0,r.jsxs)("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M6.87348 6.87347C9.70478 4.04217 14.2952 4.04217 17.1265 6.87347C19.9578 9.70477 19.9578 14.2952 17.1265 17.1265C14.2952 19.9578 9.70478 19.9578 6.87348 17.1265C4.04218 14.2952 4.04218 9.70477 6.87348 6.87347Z",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2981 9.7019L9.7019 14.2981",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2981 14.2981L9.7019 9.7019",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const v=function(e){let{color:t,...n}=e;return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("g",{clipPath:"url(#clip0_519_2415)",children:(0,r.jsx)("path",{d:"M19.1139 19.1612C18.2263 19.2692 17.4673 19.4161 16.704 19.4427C15.4118 19.4878 14.1095 19.5471 12.8248 19.4387C10.2337 19.2202 7.90467 18.3755 6.23998 16.1792C3.04902 11.9685 5.4046 5.64697 10.5428 4.64327C14.6026 3.85025 18.3702 6.42302 19.0886 10.5352C19.4999 12.8902 18.8789 14.9851 17.3057 16.7773C17.2046 16.8925 17.1038 17.0077 16.9725 17.1577C17.8893 18.0155 18.6031 18.6834 19.1139 19.1612Z",stroke:t,strokeWidth:"1.5"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_519_2415",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:t})})})]})},y=function(e){return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M12 15H12.01",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M5.41136 10.4033L10.4033 5.41136C11.2852 4.52955 12.7148 4.52955 13.5967 5.41136L18.5886 10.4033C19.4705 11.2852 19.4705 12.7148 18.5886 13.5967L13.5967 18.5886C12.7148 19.4705 11.2852 19.4705 10.4033 18.5886L5.41136 13.5967C4.52955 12.7148 4.52955 11.2852 5.41136 10.4033Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M12 8.75V12.25",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},1314:(e,t,n)=>{"use strict";var r=n(8900),o=n(2769),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},1330:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203);e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},1342:(e,t,n)=>{"use strict";n(8293)},1355:(e,t,n)=>{"use strict";var r=n(8655);t.f=r},1363:(e,t,n)=>{var r=n(2471).default,o=n(3230);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},1395:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(9932),a=Object,s=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?s(e,""):a(e)}:a},1452:(e,t,n)=>{"use strict";e.exports=n(5262)},1576:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5352);const o=e=>{const t=(null!=e?e:"").toUpperCase();return"LINK"===t?r.lP.EXTERNAL_LINK:"TAKEOVER_REQUEST"===t?r.lP.HANDOVER_REQUEST:t}},1669:(e,t,n)=>{"use strict";n(4531)("metadata")},1708:(e,t,n)=>{"use strict";n.d(t,{AV:()=>a,CM:()=>o,FR:()=>p,HM:()=>h,J:()=>s,Nl:()=>f,Nz:()=>d,Tj:()=>r,jO:()=>c,mb:()=>l,qd:()=>i,vI:()=>u});const r={darkColor:"#2c2c2c",primaryColor:"#0069ff",grayColor:"#edeeef",errorColor:"#fa4d1e",warningColor:"#ffca3a",successColor:"#50e39b",shadowColor:"rgba(0, 0, 0, 0.15)",shadowColorDark:"rgba(0, 0, 0, 0.3)",borderColorLight:"#ebebeb",borderColorDarkGray:"#d2d5d7",white:"#ffffff"},o={0:"#f7fafc",5:"#f4f7fa",10:"#f1f4f8",15:"#edf0f4",20:"#e8ecf1",30:"#dbe0e6",40:"#c8cfd8",50:"#afb8c4",60:"#8f9aaa",70:"#6a778a",80:"#445265",90:"#232f41",100:"#0c141f"},i={textColor:"#333333",textColorLight:"#757575"},a={dark:"#0D0D0D",light:"#F2F2F2"},s={extraSmall:"var(--_kindlychat-font-size-xs)",small:"var(--_kindlychat-font-size-sm)",p:"var(--_kindlychat-font-size-p)",h2:"var(--_kindlychat-font-size-h2)",h3:"var(--_kindlychat-font-size-h3)",h4:"var(--_kindlychat-font-size-h4)",h5:"var(--_kindlychat-font-size-m)",input:"var(--_kindlychat-font-size-input)"},l={tablet:"768px",phone:"500px"},c={minTablet:`(min-width: calc(${l.tablet} + 1px))`,maxTablet:`(max-width: ${l.tablet})`,maxPhone:`(max-width: ${l.phone})`,maxPhoneHeight:"(max-height: 760px)"},u={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},d={width:190},f={icon:"10px",wrapper:"6px"},p={button:"0px 1px 4px 0px rgba(0, 0, 0, 0.08)",card:"0 0 1px 0 rgba(0, 0, 0, 0.24), 0 2px 6px 0 rgba(0, 0, 0, 0.04)",level2:"0px 4px 8px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.16), 0px 8px 48px 0px rgba(0, 0, 0, 0.06)"},h={sunglow:"#FFF1CC",sunglowDark:"#4D3800",pomegranate:"#FFD7CC",pomegranateDark:"#4D1000"}},1715:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(e).reduce((e,n)=>{let[r,i]=n;return{...e,...o()(t).call(t,r)?{[r]:i}:{}}},{})}},1717:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>he});var r,o,i=n(9749),a=n.n(i),s=n(9155),l=n(541),c=n(1197),u=n(904),d=n(5880),f=n(4097),p=n(3473),h=n(1304),g=n(5134),m=n(1085),b=Object.create,v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyNames,w=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,C=(r=(e,t)=>{var r,o;r=e,o=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,o=2*r,i=new WeakMap,a=function(e,t){return function(i){var a=t.get(i),s=void 0===a?i.size:a<o?a+1:0;if(!i.has(s))return e(i,s);if(i.size<r){for(;i.has(s);)s=Math.floor(Math.random()*o);return e(i,s)}if(i.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(s);)s=Math.floor(Math.random()*n);return e(i,s)}}((t=i,function(e,n){return t.set(e,n),n}),i),s=function(e){return function(t){var n=e(t);return t.add(n),n}}(a);e.addUniqueNumber=s,e.generateUniqueNumber=a},"object"==typeof e&&typeof t<"u"?o(e):"function"==typeof define&&n.amdO?define(["exports"],o):o((r=typeof globalThis<"u"?globalThis:r||self).fastUniqueNumbers={})},()=>(o||r((o={exports:{}}).exports,o),o.exports));s.Component;((e,t,n)=>{n=null!=e?b(w(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of x(t))!k.call(e,n)&&undefined!==n&&v(e,n,{get:()=>t[n],enumerable:!(r=y(t,n))||r.enumerable})})(e&&e.__esModule?n:v(n,"default",{value:e,enumerable:!0}),e)})(C());var S="object"==(typeof window>"u"?"undefined":typeof window),_={setTimeout:S?setTimeout.bind(window):setTimeout,clearTimeout:S?clearTimeout.bind(window):clearTimeout,setInterval:S?setInterval.bind(window):setInterval,clearInterval:S?clearInterval.bind(window):clearInterval},A={},E=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,A[e]=A[e]||[],A[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),_.setTimeout(()=>{window.localStorage.removeItem(n)},500),A[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=A[this.name].indexOf(this);A[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}};function T(){return Math.random().toString(36).substring(2)}var j=class{options;channel;token=T();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>_.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{_.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",o),n()};t=_.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let o=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",o)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>_.clearInterval(e))}catch{}}}},I=class{channel;options;elector;token=T();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;if(this.options=e,this.channel=new E(t),this.registry.set(this.token,1),e.leaderElection){let e={fallbackInterval:2e3,responseTime:100};this.elector=new j(this.channel,e),this.elector.waitForLeadership()}this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},O=S?document:null,L=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function P(e,t){let n=0;return function(...r){let o=(new Date).getTime();if(!(o-n<t))return n=o,e(...r)}}var N=()=>Date.now(),M=2147483647;function z({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=O,events:o=L,timers:i,immediateEvents:a=[],onPresenceChange:l=()=>{},onPrompt:c=()=>{},onIdle:u=()=>{},onActive:d=()=>{},onAction:f=()=>{},onMessage:p=()=>{},debounce:h=0,throttle:g=0,eventsThrottle:m=200,startOnMount:b=!0,startManually:v=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:k=0,leaderElection:C=!1,disabled:A=!1}={}){let E=(0,s.useRef)(N()),T=(0,s.useRef)(N()),j=(0,s.useRef)(null),z=(0,s.useRef)(null),R=(0,s.useRef)(0),$=(0,s.useRef)(0),D=(0,s.useRef)(0),F=(0,s.useRef)(0),B=(0,s.useRef)(!1),H=(0,s.useRef)(!1),U=(0,s.useRef)(!1),V=(0,s.useRef)(!0),W=(0,s.useRef)(!1),G=(0,s.useRef)(null),q=(0,s.useRef)(null),K=(0,s.useRef)(e),Y=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=M)throw new Error(`❌ The value for the timeout property must fit in a 32 bit signed integer, ${M}.`);if(t>=M)throw new Error(`❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ${M}.`);if(n>=M)throw new Error(`❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${M}.`);if(n>=e)throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(K.current=e-n,Y.current=n):(K.current=e,Y.current=t),!V.current){if(v||A)return;B.current&&(oe.current(null,De),q.current&&q.current.active()),ye()}},[e,t,n,v,A]);let X=(0,s.useRef)(y);(0,s.useEffect)(()=>{X.current=y},[y]);let Q=(0,s.useRef)(a),Z=(0,s.useRef)(r),J=(0,s.useRef)([...new Set([...o,...a]).values()]),ee=(0,s.useRef)(A);(0,s.useEffect)(()=>{ee.current=A,!V.current&&(A?ke():v||ye())},[A]);let te=(0,s.useRef)(l);(0,s.useEffect)(()=>{te.current=l},[l]);let ne=(0,s.useRef)(c);(0,s.useEffect)(()=>{ne.current=c},[c]);let re=(0,s.useRef)(u);(0,s.useEffect)(()=>{re.current=u},[u]);let oe=(0,s.useRef)(d);(0,s.useEffect)(()=>{oe.current=d},[d]);let ie=(0,s.useRef)(f);(0,s.useEffect)(()=>{ie.current=f},[f]);let ae=(0,s.useRef)(p);(0,s.useEffect)(()=>{ae.current=p},[p]);let se=(0,s.useMemo)(()=>{let e=(e,t)=>ie.current(e,t);return h>0?function(e,t){let n;function r(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):g>0?P(e,g):e},[g,h]),le=(0,s.useRef)();(0,s.useEffect)(()=>{x&&k&&(le.current=P(()=>{q.current.active()},k))},[x,k]);let ce=()=>{null!==G.current&&(_.clearTimeout(G.current),G.current=null)},ue=(e,t=!0)=>{ce(),G.current=_.setTimeout(he,e||K.current),t&&(z.current=N())},de=e=>{!H.current&&!B.current&&(ne.current(e,De),te.current({type:"active",prompted:!0},De)),F.current=0,D.current=N(),H.current=!0,ue(Y.current,!1)},fe=()=>{ce(),B.current||(re.current(null,De),te.current({type:"idle"},De)),B.current=!0,j.current=N(),X.current?ve():H.current&&(D.current=0,H.current=!1)},pe=e=>{ce(),(B.current||H.current)&&(oe.current(e,De),te.current({type:"active",prompted:!1},De)),H.current=!1,D.current=0,B.current=!1,R.current+=N()-j.current,$.current+=N()-j.current,be(),ue()},he=e=>{if(!B.current){se.cancel&&se.cancel();let t=N()-z.current;return K.current+Y.current<t||!(Y.current>0)||H.current?void(q.current?q.current.idle():fe()):void(q.current?q.current.prompt():de(e))}q.current?q.current.active():pe(e)},ge=e=>{if(!b&&!z.current&&(z.current=N(),oe.current(null,De)),se(e,De),H.current)return;if(ce(),!B.current&&Q.current.includes(e.type))return void he(e);let t=N()-z.current;B.current&&!y||!B.current&&t>=K.current?he(e):(U.current=!1,F.current=0,D.current=0,ue(),x&&k&&le.current())},me=(0,s.useRef)(ge);(0,s.useEffect)(()=>{let e=W.current;e&&ve(),me.current=m>0?P(ge,m):ge,e&&be()},[m,g,h,ie,x,k]);let be=()=>{S&&Z.current&&(W.current||(J.current.forEach(e=>{Z.current.addEventListener(e,me.current,{capture:!0,passive:!0})}),W.current=!0))},ve=(e=!1)=>{S&&Z.current&&(W.current||e)&&(J.current.forEach(e=>{Z.current.removeEventListener(e,me.current,{capture:!0})}),W.current=!1)},ye=(0,s.useCallback)(e=>!ee.current&&(ce(),be(),B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,q.current&&!e&&q.current.start(),ue(),!0),[G,B,ee,K,q]),xe=(0,s.useCallback)(e=>!ee.current&&(ce(),be(),T.current=N(),R.current+=N()-j.current,$.current+=N()-j.current,R.current=0,B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,q.current&&!e&&q.current.reset(),v||ue(),!0),[G,B,K,v,ee,q]),we=(0,s.useCallback)(e=>!ee.current&&(ce(),be(),(B.current||H.current)&&pe(),B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,T.current=N(),q.current&&!e&&q.current.activate(),ue(),!0),[G,B,H,ee,K,q]),ke=(0,s.useCallback)((e=!1)=>!ee.current&&!U.current&&(F.current=Ie(),U.current=!0,ve(),ce(),q.current&&!e&&q.current.pause(),!0),[G,ee,q]),Ce=(0,s.useCallback)((e=!1)=>!(ee.current||!U.current||(U.current=!1,H.current||be(),B.current||ue(F.current),D.current&&(D.current=N()),q.current&&!e&&q.current.resume(),0)),[G,K,ee,F,q]),Se=(0,s.useCallback)((e,t)=>(q.current?(t&&ae.current(e,De),q.current.message(e)):t&&ae.current(e,De),!0),[p]),_e=(0,s.useCallback)(()=>B.current,[B]),Ae=(0,s.useCallback)(()=>H.current,[H]),Ee=(0,s.useCallback)(()=>q.current?q.current.isLeader:null,[q]),Te=(0,s.useCallback)(()=>q.current?q.current.isLastActive:null,[q]),je=(0,s.useCallback)(()=>q.current?q.current.token:null,[q]),Ie=(0,s.useCallback)(()=>{if(U.current)return F.current;let e=F.current?F.current:Y.current+K.current,t=z.current?N()-z.current:0,n=Math.floor(e-t);return n<0?0:Math.abs(n)},[K,Y,H,F,z]),Oe=(0,s.useCallback)(()=>Math.round(N()-T.current),[T]),Le=(0,s.useCallback)(()=>Math.round(N()-E.current),[E]),Pe=(0,s.useCallback)(()=>j.current?new Date(j.current):null,[j]),Ne=(0,s.useCallback)(()=>z.current?new Date(z.current):null,[z]),Me=(0,s.useCallback)(()=>B.current?Math.round(N()-j.current+R.current):Math.round(R.current),[j,R]),ze=(0,s.useCallback)(()=>B.current?Math.round(N()-j.current+$.current):Math.round($.current),[j,$]),Re=(0,s.useCallback)(()=>{let e=Math.round(Oe()-Me());return e>=0?e:0},[j,R]),$e=(0,s.useCallback)(()=>{let e=Math.round(Le()-ze());return e>=0?e:0},[j,R]);(0,s.useEffect)(()=>{if(h>0&&g>0)throw new Error("❌ onAction can either be throttled or debounced, not both.");i&&function(e){_.setTimeout=e.setTimeout,_.clearTimeout=e.clearTimeout,_.setInterval=e.setInterval,_.clearInterval=e.clearInterval}(i);let e=()=>{q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)};return S&&window.addEventListener("beforeunload",e),()=>{S&&window.removeEventListener("beforeunload",e),q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)}},[]),(0,s.useEffect)(()=>{q.current&&q.current.close(),q.current=x?new I({channelName:w,leaderElection:C,onPrompt:()=>{de()},onIdle:()=>{fe()},onActive:()=>{pe()},onMessage:e=>{ae.current(e,De)},start:ye,reset:xe,activate:we,pause:ke,resume:Ce}):null},[x,w,C,ne,re,oe,ae,ye,xe,ke,Ce]),(0,s.useEffect)(()=>{V.current||(ce(),ve(!0)),!v&&!A&&(b?ye():be())},[v,b,A,V]),(0,s.useEffect)(()=>{if(!V.current){let e=[...new Set([...o,...a]).values()];if(ve(),J.current=e,Z.current=r,Q.current=a,v||A)return;b?ye():be()}},[r,JSON.stringify(o),JSON.stringify(a),V,A,v,b]),(0,s.useEffect)(()=>{V.current&&(V.current=!1)},[V]);let De={message:Se,start:ye,reset:xe,activate:we,pause:ke,resume:Ce,isIdle:_e,isPrompted:Ae,isLeader:Ee,isLastActiveTab:Te,getTabId:je,getRemainingTime:Ie,getElapsedTime:Oe,getTotalElapsedTime:Le,getLastIdleTime:Pe,getLastActiveTime:Ne,getIdleTime:Me,getTotalIdleTime:ze,getActiveTime:Re,getTotalActiveTime:$e,setOnPresenceChange:e=>{l=e,te.current=e},setOnPrompt:e=>{c=e,ne.current=e},setOnIdle:e=>{u=e,re.current=e},setOnActive:e=>{d=e,oe.current=e},setOnAction:e=>{f=e,ie.current=e},setOnMessage:e=>{p=e,ae.current=e}};return De}(0,s.createContext)(null).Consumer;const R=function(e){return(0,s.forwardRef)(function(t,n){let r=z({...t});return"function"==typeof n?n(r):n&&(n.current=r),(0,m.jsx)(e,{...t,...r})})}(e=>{let{children:t}=e;return t});var $=n(8278),D=n(5352);var F=n(5626);const B="kindly-last-conversion-timestamp",H=()=>{const e=(0,g.jL)(),{conversionPageUrl:t,hasInteraction:n}=(0,l.d4)($.Od),r=(()=>{const[e,t]=(0,s.useState)(!1),{conversionPageUrl:n}=(0,l.d4)($.Od),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=(0,s.useState)(null);if(!n)return null;const i=setInterval(()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(o(e),clearInterval(i))},500);return r})(0,{enable:null==n?void 0:n.match(/klarna/gi)}),o=(0,s.useRef)(void 0),i=(0,s.useCallback)(e=>{var n;const r=e.getAttribute("src")||"",o=function(e){try{return JSON.parse(e)}catch(e){return console.error("Failed to parse JSON:",e),null}}((null===(n=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===n?void 0:n[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&t(!0)},[]);return(0,s.useEffect)(()=>{r&&!o.current&&(i(r),o.current=setInterval(()=>i(r),500))},[r,o,i]),(0,s.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e})(),o=(0,s.useCallback)(()=>{if((t=localStorage.getItem(B))&&!(Date.now()-Number(t)>D.M3))return;var t;const r=!n;localStorage.setItem(B,String(Date.now())),e((0,h.yM)(r))},[e,n]);(0,s.useEffect)(()=>{r&&o()},[o,r]),(0,s.useEffect)(()=>{null!=t&&t.trim()&&(0,F.A)(window.location.href,t)&&o()},[o,t])};var U=n(8418),V=n(3649),W=n(9159);const G=`\n${n(4785).n}\n .kindly-overflow-hidden {\n overflow: hidden !important;\n }\n`;var q=n(7559),K=n(776);const Y=function(){const e=document.createElement("div");e.style.fontSize="initial",document.documentElement.appendChild(e);const t=getComputedStyle(e).fontSize;return document.documentElement.removeChild(e),parseFloat(t)}(),X=(0,c.DU)(["#kindly-root{font-size:initial;pointer-events:none;--_kindlychat-font-size-xs:calc(","px * 0.7);--_kindlychat-font-size-sm:calc(","px * 0.75);--_kindlychat-font-size-m:","px;--_kindlychat-font-size-p:calc(","px * 0.9);--_kindlychat-font-size-h4:calc(","px * 1.2);--_kindlychat-font-size-h3:calc(","px * 1.4);--_kindlychat-font-size-h2:calc(","px * 1.6);--_kindlychat-font-size-input:","px;}"],Y,Y,Y,Y,Y,Y,Y,Math.max(16,Y));var Q=n(1708);const Z=e=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,h,g,m,b,v,y,x,w,k,C,S,_;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatbubbleText:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chatbubble_text)&&void 0!==n?n:Q.AV.dark,background:null!==(o=null==e||null===(i=e.style)||void 0===i?void 0:i.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(a=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==a?a:"#0069ff",buttonBackground:null!==(l=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==l?l:"#0069ff",secondaryButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_secondary_button_background)&&void 0!==u?u:"#ffffff",bubbleButtonBackground:null!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_bubble_button_background)&&void 0!==f?f:"#0069ff",buttonText:null!==(h=null==e||null===(g=e.style)||void 0===g?void 0:g.color_button_text)&&void 0!==h?h:"#ffffff",headerBackground:null!==(m=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_background)&&void 0!==m?m:"#0069ff",headerText:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_header_text)&&void 0!==v?v:"#ffffff",userMessageBackground:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_user_message_background)&&void 0!==x?x:"#f5f5f5",botMessageBackground:null!==(k=null==e||null===(C=e.style)||void 0===C?void 0:C.color_bot_message_background)&&void 0!==k?k:"#f5f5f5",panelBackground:null!==(S=null==e||null===(_=e.style)||void 0===_?void 0:_.color_panel_background)&&void 0!==S?S:"#ffffff"}};var J=n(4174),ee=n(8668);function te(e){let{settings:t}=e;const n=(0,g.jL)(),{inPlatform:r}=(0,l.d4)($.$P);return H(),function(){var e,t,n;const{feedbackToDisplay:r}=(0,V.A)(),o=(0,g.jL)(),{chatHasStarted:i,active:a}=(0,g.GV)($.$P),l=(0,W.A)(r),c=(0,s.useCallback)(()=>{r&&i&&(o((0,U.WG)({ratingSystem:r.rating_scale.rating_system,triggerType:r.trigger_type,formTitle:r.form_title,timeout:r.timeout,step:"RATING_SCALE"})),o(a?(0,h.zn)("FEEDBACK_END_CHAT"):(0,h.ku)()))},[r,i,a,o]),{start:u,reset:d,pause:f}=z({onIdle:c,timeout:1e3*((null==r||null===(e=r.timeout)||void 0===e?void 0:e.duration)||10),startManually:!0,disabled:!(null!=r&&null!==(t=r.timeout)&&void 0!==t&&t.enabled)});(0,s.useEffect)(()=>{var e;(null==l?void 0:l.id)!==(null==r?void 0:r.id)&&(f(),d(),null!=r&&null!==(e=r.timeout)&&void 0!==e&&e.enabled&&i&&u())},[null==r?void 0:r.id,null==r||null===(n=r.timeout)||void 0===n?void 0:n.enabled,null==l?void 0:l.id,i,d,u,f]),(0,s.useEffect)(()=>{i&&r||(f(),d())},[i,r,d,f])}(),(0,s.useEffect)(()=>{var e;null===(e=t.chatbubble)||void 0===e||!e.autopopup||(0,ee.A)()||r||setTimeout(()=>n((0,h.UB)()),t.chatbubble.autopopup_time)},[n,r,t]),(0,m.jsx)(p.A,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick})}let ne=!1,re=null;const oe=(0,s.forwardRef)((e,t)=>{let{botKey:r,settings:o,initialChatLanguage:i}=e;return re||(re=(0,g.Ay)({botKey:r,settings:o,initialChatLanguage:i})),(0,s.useEffect)(()=>()=>{re=null,J.A.getInstance().destroy(!0)},[]),function(){const{nonce:e}=u.Z;(0,s.useEffect)(()=>{const t=document.createElement("style");t.setAttribute("data-kindly-styles","true"),t.textContent=G,e&&t.setAttribute("nonce",e);try{return document.querySelector('style[data-kindly-styles="true"]')||document.head.appendChild(t),()=>{try{const e=document.querySelector('style[data-kindly-styles="true"]');e&&document.head.contains(e)&&document.head.removeChild(e)}catch(e){console.error("Error removing Kindly styles:",e)}}}catch(e){return void console.error("Error injecting Kindly styles:",e)}},[])}(),(0,s.useImperativeHandle)(t,()=>({getActivityStatus:()=>re.getState().chatbubble.active,openChat(){re.dispatch((0,h.lQ)({source:"programmatic"}))},closeChat(){re.dispatch((0,h.Rh)({source:"programmatic"}))},restartChat(){let{openChat:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{openChat:!1};J.A.getInstance().getConnection().restart(e)},triggerDialogue(e,t){var n;"no"===(null==t||null===(n=t.languageCode)||void 0===n?void 0:n.toLowerCase())&&(t.languageCode="nb"),re.dispatch((0,h.zh)(e,t))},sendMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.trim(),r="user"===t.sender,o=!1===t.openChat,{newContext:i}=t;r&&n&&re.dispatch((0,h.y2)(n,void 0,i,void 0,void 0,{shouldOpenChat:!o}))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;re.dispatch((0,h.fe)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;re.dispatch((0,h.kS)({content:t,slug:n,onRendered:r,trackEvent:o}))},getNudges:()=>re.getState().bot.nudges,closeNudge(e,t){re.dispatch((0,h.Y_)(e,t))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(re.dispatch((0,K.vJ)({slug:e,eventType:q.oE})),re.dispatch({type:q.Kd,slug:e}),sessionStorage.setItem("kindly-nudge-completion","true"))},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;re.dispatch((0,K.NS)(e))},identifyUser(e){re.dispatch((0,h.gm)(e))},setNewContext(e){re.dispatch((0,h.Aw)(e))},getContext:()=>re.dispatch((0,h.SD)()),setNewBannerMessage(e,t){re.dispatch((0,h.cC)(e,t||(null==e?void 0:e.message)))},setNewLabel(e){re.dispatch((0,h.tD)(e))},cancelHandover(){re.dispatch((0,h.cL)())},setGetAuthToken(e){u.Z.getAuthToken=e,re.dispatch((0,h.Mx)())}})),(0,s.useEffect)(()=>{(0,d.NY)(o)},[o]),(0,s.useEffect)(()=>{const{persistStateLifespan:e}=re.getState().bot;if(-1===e||e>0)return;let t=!1;const n=()=>{t||(t=!0,re.dispatch((0,h.R7)(r)))};window.onbeforeunload=n,window.onunload=n},[r,o,re]),(0,s.useEffect)(()=>{!ne&&o.track_utm&&(ne=!0,Promise.resolve().then(n.bind(n,8070)).then(e=>{let{default:t}=e;const n=t();n&&re.dispatch((0,h.Aw)({...n}))}))},[o,re]),window.Cypress&&(window.store=re),(0,m.jsx)(l.Kq,{store:re,children:(0,m.jsxs)(c.NP,{theme:Z(o),children:[(0,m.jsx)(X,{}),(0,m.jsx)(f.A,{errorPoint:"inside ChatContainer",displayError:!1,children:(o.user_idle_timeout_seconds||0)>0?(0,m.jsx)(R,{onIdle:()=>re.dispatch((0,h.ZS)()),onActive:()=>re.dispatch((0,h.Mm)(o.id)),timeout:1e3*(o.user_idle_timeout_seconds||0),children:(0,m.jsx)(te,{settings:o})}):(0,m.jsx)(te,{settings:o})})]})})});oe.displayName="ChatContainer";const ie=oe;var ae=n(9449),se=n(9466);function le(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,i)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(a=>{setTimeout(()=>{t<=1?i(a):le(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,i)},n)})})}async function ce(e,t,n){const r=(0,ae.U)(),o=`${e}/settings/${t}.json?version=2.81.8&${[ae.B]}=${r}`;return le(()=>fetch(o,{...n&&{signal:n.signal}}).then(async e=>{const t=await e.json();return{status:e.status,statusText:e.statusText,ok:e.ok,data:t}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}let ue=!1;const de=e=>e.split("-")[0],fe=(e,t)=>{const n=e.find(e=>e===t);if(n)return n;const r=de(t);return e.find(e=>de(e)===r)},pe=function(e,t){return!!a()(t).call(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function he(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const i=function(e,t){const[n,r]=(0,s.useState)(t||{});return(0,s.useEffect)(()=>{const n=new AbortController;return ue?r(e=>(0,se.A)(e,t)):(async()=>{try{var o;const i=await ce((null===(o=t.environment)||void 0===o?void 0:o.SETTINGS_HOST)||"https://chat.kindlycdn.com",e,n),{welcome_page:a,in_chat_notification:s,notifications:l,settings:{supported_languages:c,compliance_settings:u,...d},...f}=i.data,p={...f,...d,...l,supportedLanguages:c,welcomePage:a,inChatNotification:s,complianceSettings:u};r(e=>(0,se.A)((0,se.A)(p,e),{...t}))}catch(e){var i,a;const t=null!==(i=e.response)&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.error?e.response.data.error:e;"signal is aborted without reason"!==t.message&&console.error("Kindly chat failed to initialize.",t)}})(),ue=!0,()=>{n.abort()}},[e,t]),(0,s.useEffect)(()=>()=>{ue=!1},[]),n}(n,o);if(!i.id)return null;const{inPlatform:l,fullscreenMode:c,language:d,focusTrapOnFullView:f,supportedLanguages:p,getAuthToken:h,nonce:g,complianceSettings:b,welcomePage:v,markets:y,market:x}=i;u.Z.language=d,u.Z.supportedLanguages=p,u.Z.feedbackSettings=l?{}:i.feedback_settings,u.Z.focusTrapOnFullView=f,u.Z.fullscreenMode=c,u.Z.getAuthToken=h,u.Z.nonce=g,u.Z.complianceSettings=b,u.Z.welcomePage=v,u.Z.markets=y,u.Z.market="string"==typeof x&&a()(y).call(y,x)?x:y[0];const w=u.Z.language,k=function(e,t){var n,r,o;const i=e.map(e=>e.code),a=null==t?void 0:t.toLowerCase();if(0===e.length)return;if(1===i.length)return i[0];if(a){const e=fe(i,a);if(e)return e}const s=null===(n=document.documentElement.lang)||void 0===n?void 0:n.toLowerCase(),l=fe(i,s);if(l)return l;const c=null===(r=window.navigator.language)||void 0===r?void 0:r.toLowerCase(),u=fe(i,c);if(u)return u;return(null===(o=window.navigator.languages)||void 0===o?void 0:o.flatMap(e=>{const t=fe(i,e.toLowerCase());return t?[t]:[]})[0])||e.find(e=>e.is_primary).code.toLowerCase()}(u.Z.supportedLanguages.filter(e=>e.is_active),w);if(!k)return console.error("Impossible to determine initial Chat language, make sure you have at least one language active for the Bot"),null;const C=(null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081",S=[C?new URL(C).hostname:void 0,"*.kindly.ai","demokind.ly","*.demokind.ly",...i.chatbubble.domains].filter(Boolean);return i.chatbubble.inPlatform||pe(window.location.hostname,S)?(0,m.jsx)(ie,{ref:r,botKey:n,settings:i,initialChatLanguage:k}):(console.error(`Domain ${window.location.hostname} is not allowed to load Kindly Chat. Please check your bot settings if you think this is a mistake.`),null)}},1726:(e,t,n)=>{"use strict";var r=n(5161);e.exports=r},1780:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},1810:(e,t,n)=>{"use strict";var r=n(5279);e.exports=r},1811:(e,t,n)=>{"use strict";var r=n(4904),o=n(9989).f,i=n(3999),a=n(701),s=n(9559),l=n(8655)("toStringTag");e.exports=function(e,t,n,c){var u=n?e:e&&e.prototype;u&&(a(u,l)||o(u,l,{configurable:!0,value:t}),c&&!r&&i(u,"toString",s))}},1814:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(9155);var r=n(1197),o=n(5394);const i=r.Ay.div.withConfig({componentId:"sc-1a2z22o-0"})(["display:flex;align-items:center;justify-content:center;border-radius:100px;transition:all cubic-bezier(0.61,0.1,0.42,0.9) 150ms;min-height:18px;background-color:transparent;",""],e=>{let{$minHeight:t}=e;return t&&`min-height: ${t}px;`}),a=r.Ay.span.withConfig({componentId:"sc-1a2z22o-1"})(["width:6px;height:6px;opacity:0;border-radius:50%;background:",";background-color:",";&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){margin:0 5px;animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>e.theme.buttonText,e=>e.theme.buttonText,o.Zm,o.Zm,o.Zm);var s=n(1085);function l(e){let{loading:t=!1,isCheckbox:n=!1,flat:r,minHeight:o}=e;return(0,s.jsxs)(i,{$minHeight:o,$flat:r,$isCheckbox:n,$loading:t,children:[(0,s.jsx)(a,{}),(0,s.jsx)(a,{}),(0,s.jsx)(a,{})]})}},1818:(e,t,n)=>{"use strict";n(4531)("unscopables")},1918:(e,t,n)=>{"use strict";var r=n(9098),o=n(1203),i=n(908),a=n(262),s=n(2137),l=n(8130),c=n(5657),u=n(4492),d=n(4417),f=n(3121),p=n(8655),h=n(5547),g=p("isConcatSpreadable"),m=h>=51||!o(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),b=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!m||!f("concat")},{concat:function(e){var t,n,r,o,i,a=s(this),f=d(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(b(i=-1===t?a:arguments[t]))for(o=l(i),c(p+o),n=0;n<o;n++,p++)n in i&&u(f,p,i[n]);else c(p+1),u(f,p++,i);return f.length=p,f}})},1926:(e,t,n)=>{"use strict";var r=n(2621).IteratorPrototype,o=n(5780),i=n(480),a=n(1811),s=n(6625),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},1949:e=>{"use strict";e.exports=r},1966:(e,t,n)=>{"use strict";var r=n(2937),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},1970:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(904);function o(e){const{access_request_text:t,acceptance_text:n,revoke_permission_text:o,description_text_html:i,enabled:a,require_agreement:s,button_text:l}=r.Z.complianceSettings[e]||{};return{isEnabled:a,accessRequestText:t,acceptanceText:n,revokePermissionText:o,descriptionTextHtml:i,requireAgreement:s,buttonText:l}}},2002:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(701),a=n(1139),s=n(8141),l=n(2044),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,u[n]=t,n}})},2016:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(824),o=n(1708);const i=n(1197).Ay.div.withConfig({componentId:"sc-xuun63-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:var(--_kindlychat-font-size-sm);"," right:0;left:auto;color:var(--panel-background-white-black-contrast-1743170834);max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";svg path{stroke:var(--panel-background-white-black-contrast-1743170834);}"],e=>{let{$show:t}=e;return t&&"margin-top: 4px;"},e=>{let{$show:t}=e;return t?"120px":"0px"},e=>{let{$show:t}=e;return t?1:0},e=>{let{$show:t}=e;return t?"480ms":0});var a=n(1085);function s(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,a.jsxs)("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("path",{d:"M4.952 16.354l5.263-10.497c.738-1.472 2.839-1.472 3.576 0l5.258 10.497a2 2 0 01-1.788 2.896H6.741a2 2 0 01-1.789-2.896z",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r})]})}var l=n(4557);const c=function(e){var t,n,c,u;let{name:d,control:f}=e;const{errors:p,isSubmitted:h}=(0,r.lN)({name:d,control:f}),g=(null===(t=p[d])||void 0===t?void 0:t.type)!==l.k1.CUSTOM&&((null===(n=p[d])||void 0===n?void 0:n.message)||(null===(c=p[`browser_error_${d}`])||void 0===c?void 0:c.message)||(null!==(u=p[d])&&void 0!==u&&u.ref&&"validationMessage"in p[d].ref?p[d].ref.validationMessage:void 0));return(0,a.jsxs)(i,{$show:Boolean(g&&h),id:`error_${d}`,children:[(0,a.jsx)(s,{width:16,height:16,color:o.Tj.errorColor}),"string"==typeof g?g:""]})}},2044:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},2100:(e,t,n)=>{"use strict";n(4531)("patternMatch")},2137:(e,t,n)=>{"use strict";var r=n(5426),o=Object;e.exports=function(e){return o(r(e))}},2146:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},2279:(e,t,n)=>{"use strict";var r=n(8900);n(1811)(r.JSON,"JSON",!0)},2320:(e,t,n)=>{"use strict";n(4531)("asyncIterator")},2327:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(2876),o=n(2016),i=n(7376),a=n(4557),s=n(437),l=n(1085);const c=function(e){let{name:t,label:n,control:c,validators:u,register:d,id:f,value:p,isLast:h,inputType:g,setError:m,clearErrors:b,trigger:v,...y}=e,x={};u&&(x=(0,s.G8)(u));const w=(0,i.A)({name:t,control:c,trigger:v,setError:m,clearErrors:b}),{ref:k,onChange:C,...S}=d&&t?d(t,x):{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.hl,{htmlFor:f,children:[(0,l.jsx)(r.eo,{ref:k,name:t,type:g,id:f,value:p,...(0,s.NR)(x),...S&&{...S},onChange:e=>{null==C||C(e),w(e)},...y}),(0,l.jsx)(r.r6,{$inputType:g,$isForm:!!d,children:(0,l.jsx)(r.FC,{$inputType:g,viewBox:"0 0 24 24",children:g===a.cJ.CHECKBOX?(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"}):(0,l.jsx)("circle",{cx:"12",cy:"13",r:"5"})})}),n&&(0,l.jsx)(r.Ko,{$isForm:!!d,children:n})]}),h&&t&&(0,l.jsx)(o.A,{name:t,control:c})]})}},2362:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=(e,t)=>{const n=(0,r.useRef)(void 0);return(0,r.useCallback)(function(){var r;const o=Date.now()-(null!==(r=n.current)&&void 0!==r?r:0)<t;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];if(o){var l;const e=a[0];return void(null==e||null===(l=e.preventDefault)||void 0===l||l.call(e))}e(...a),n.current=Date.now()},[t,e])}},2471:(e,t,n)=>{var r=n(3844),o=n(5216);function i(t){return e.exports=i="function"==typeof r&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},2492:()=>{},2621:(e,t,n)=>{"use strict";var r,o,i,a=n(1203),s=n(2769),l=n(262),c=n(5780),u=n(3671),d=n(3508),f=n(8655),p=n(4871),h=f("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):g=!0),!l(r)||a(function(){var e={};return r[h].call(e)!==e})?r={}:p&&(r=c(r)),s(r[h])||d(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},2760:(e,t,n)=>{"use strict";n.d(t,{MN:()=>o,nG:()=>a,oZ:()=>i,vP:()=>r});const r="SHOW_IN_CHAT_NOTIFICATION",o="REPLACE_IN_CHAT_NOTIFICATION",i="DISMISS_IN_CHAT_NOTIFICATION",a="DELETE_IN_CHAT_NOTIFICATION"},2769:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2816:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(824),o=n(1197),i=n(1708),a=n(8663);const s=o.Ay.div.withConfig({componentId:"sc-1lavw6k-0"})(["position:absolute;right:8px;font-size:var(--_kindlychat-font-size-sm);color:",";",""],e=>{let{theme:t}=e;return(0,a.w5)(t.panelBackground,"#FFFFFF",i.qd.textColorLight)},e=>{let{$position:t}=e;return"top"===t?(0,o.AH)(["top:4px;right:16px;"]):"bottom"===t?(0,o.AH)(["top:auto;bottom:4px;right:16px;"]):(0,o.AH)(["right:8px;top:50%;transform:translateY(-50%);"])});var l=n(1085);function c(e){let{fieldName:t,maxLength:n,control:o,position:i="middle"}=e;const a=(0,r.FH)({control:o,name:t});return(0,l.jsx)(s,{$position:i,children:`${(null==a?void 0:a.length)||0}/${n}`})}},2848:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9155),o=n(541),i=n(8278),a=n(3906),s=n(6739);function l(){const{text:e}=(0,o.d4)(i.Od),{currentLanguageCode:t}=(0,s.A)();return(0,r.useMemo)(()=>(0,a.A)(e,t),[t,e])}},2856:(e,t,n)=>{"use strict";var r=n(8900),o=n(8099);e.exports=function(e,t){var n=o[e+"Prototype"],i=n&&n[t];if(i)return i;var a=r[e],s=a&&a.prototype;return s&&s[t]}},2871:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2876:(e,t,n)=>{"use strict";n.d(t,{B2:()=>d,FC:()=>a,Ko:()=>u,eo:()=>c,hl:()=>l,r6:()=>s});var r=n(1197),o=n(8663),i=n(4557);const a=r.Ay.svg.withConfig({componentId:"sc-1av4ah8-0"})(["fill:",";stroke:",";stroke-width:2px;position:relative;top:-1px;"],e=>{let{$inputType:t,theme:n}=e;return t===i.cJ.CHECKBOX?"none":n.buttonText},e=>{let{theme:t}=e;return t.buttonText}),s=r.Ay.div.withConfig({componentId:"sc-1av4ah8-1"})(["display:inline-block;width:",";height:",";border-radius:",";background:transparent;border:1px solid ",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"3px":"50%"},e=>{let{theme:t,$isForm:n}=e;return n?(0,o.w5)(t.panelBackground,"rgba(255,255,255, 0.2)","rgba(0,0,0, 0.2)"):(0,o.w5)(t.background,"rgba(255,255,255, 0.2)","rgba(0,0,0, 0.2)")},e=>{let{theme:{buttonBackground:t}}=e;return(0,o.SW)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},a),l=r.Ay.label.withConfig({componentId:"sc-1av4ah8-2"})(["cursor:pointer;display:flex;justify-content:flex-start;align-items:center;&:hover > ","{border:1px solid ",";}"],s,e=>{let{theme:t,$isForm:n}=e;return n?(0,o.w5)(t.panelBackground,"rgba(255,255,255, 1)","rgba(0,0,0, 1)"):(0,o.w5)(t.background,"rgba(255,255,255, 1)","rgba(0,0,0, 1)")}),c=r.Ay.input.withConfig({componentId:"sc-1av4ah8-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}&:focus-within ~ ","{outline:1px solid ",";}"],s,e=>{let{theme:{buttonBackground:t}}=e;return t},a,e=>{let{theme:{buttonBackground:t}}=e;return(e=>(0,r.i7)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)},s,e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),u=r.Ay.div.withConfig({componentId:"sc-1av4ah8-4"})(["font-size:var(--_kindlychat-font-size-p);font-weight:400;margin:0 28px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,o.w5)(t.background,"#FFFFFF","#000000")}),d=r.Ay.div.withConfig({componentId:"sc-1av4ah8-5"})(["margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;"])},2894:(e,t,n)=>{"use strict";var r=n(6100),o=n(2769),i=n(3753),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2937:(e,t,n)=>{"use strict";var r=n(262);e.exports=function(e){return r(e)||null===e}},2991:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(5396)})},2996:(e,t,n)=>{"use strict";n(4531)("replaceAll")},3057:e=>{"use strict";e.exports=function(e){return null==e}},3115:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find(e=>{let{id:t}=e;return n===t||r===t})}},3121:(e,t,n)=>{"use strict";var r=n(1203),o=n(8655),i=n(5547),a=o("species");e.exports=function(e){return i>=51||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},3131:()=>{},3178:(e,t,n)=>{"use strict";n.d(t,{a1:()=>i,a_:()=>r,l:()=>o});const r="DISMISS_PUSH_MESSAGE",o="SHOW_PUSH_MESSAGE",i="RESET_PUSH_MESSAGES"},3230:(e,t,n)=>{var r=n(6939),o=n(2471).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var n=e[r];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3243:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n(541),i=n(8278);function a(){const{nudges:e}=(0,o.d4)(i.Od);return(0,r.useMemo)(()=>{var t,n,r,o,i;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]},[e])}},3273:(e,t,n)=>{"use strict";var r=n(1395),o=n(5426);e.exports=function(e){return r(o(e))}},3395:(e,t,n)=>{"use strict";n(9828),n(7935),n(3832),n(5799);var r=n(1355);e.exports=r.f("iterator")},3407:(e,t,n)=>{"use strict";var r=n(7312);n(1037),n(1342),n(5687),n(1669),e.exports=r},3410:(e,t,n)=>{"use strict";var r=n(5024),o=n(701),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},3436:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=e=>{var t;if(!e)return!1;e=e.toLowerCase();try{const t=new Intl.Locale(e);if("function"==typeof t.getTextInfo)return"rtl"===t.getTextInfo().direction}catch{}return o()(t=["ar","he","fa","ur","ps","dv","syr","yi"]).call(t,e.split("-")[0])}},3473:(e,t,n)=>{"use strict";n.d(t,{X:()=>Re,A:()=>De});var r=n(9155),o=n.n(r),i=n(541),a=n(1308),s=n(1197),l=n(340),c=n(2848),u=n(1304),d=n(8278),f=n(1708),p=n(7912),h=n(8663),g=n(5394);const m=(0,s.AH)(["& > div,& > svg{z-index:3;}& > div{position:relative;display:flex;justify-content:center;align-items:center;}&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background-color:",";border-radius:48px;transition:all 0.2s ease;}&:hover{transition:border 240ms;background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:before{box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;transition:all 0.2s ease;filter:brightness(0.92);}}&:focus,&:active{background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:after{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;transition:border 240ms;border-radius:48px;content:'';}}@media ","{&:before{border-radius:0px;","}&:focus,&:active{&:after{border-radius:0px;","}}}"],e=>{let{$background:t}=e;return t||""},f.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"},e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),b=s.Ay.div.withConfig({componentId:"sc-9dlu7b-0"})(["pointer-events:auto;max-width:250px;box-shadow:0px 4px 8px 0px rgba(0,0,0,0.04),0px 0px 1px 0px rgba(0,0,0,0.16),0px 8px 48px 0px rgba(0,0,0,0.06);padding:6px 6px 6px 16px;justify-self:flex-end;border-radius:48px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;position:relative;z-index:2;transition:border 240ms;cursor:pointer;height:100%;color:",";"," @media ","{padding:0px 6px 0px 16px;box-shadow:none;border-right:1px solid rgba(0,0,0,0.08);border-radius:0px;","}"],e=>{let{$background:t}=e;return(0,h.w5)(t||"","#F2F2F2","#0D0D0D")},m,f.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),v=s.Ay.div.withConfig({componentId:"sc-9dlu7b-1"})(["margin-right:8px;font-size:var(--_kindlychat-font-size-p);padding-top:9px;padding-bottom:9px;font-weight:500;"]),y=s.Ay.div.withConfig({componentId:"sc-9dlu7b-2"})(["display:flex;flex-direction:column-reverse;align-items:flex-end;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);transform-origin:bottom right;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"," @media ","{flex-direction:row;gap:0 !important;max-width:calc( 100vw - ","px );overflow-x:auto;transform-origin:right;overscroll-behavior:none;","}"],e=>{let{$open:t,$iconsCount:n}=e;return t?(0,s.AH)(["gap:8px;max-height:","px;opacity:1;transform:scale(1);"],n?60*n:0):(0,s.AH)(["gap:0px;max-height:0px;opacity:0;transform:scale(0.36);pointer-events:none;user-select:none;"])},f.jO.maxPhone,e=>{let{$buttonWidth:t}=e;return(t||0)+148},e=>{let{$open:t}=e;return!t&&(0,s.AH)(["max-width:0;"])}),x=s.Ay.div.withConfig({componentId:"sc-9dlu7b-3"})(["width:36px;height:36px;border-radius:50%;overflow:hidden;"]),w=s.Ay.img.withConfig({componentId:"sc-9dlu7b-4"})(["width:100%;height:100%;object-fit:cover;"]),k=s.Ay.div.withConfig({componentId:"sc-9dlu7b-5"})(["",";position:relative;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);"," display:grid;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}@media ","{display:flex;padding-left:16px;gap:0;pointer-events:all;&::before{width:100vw;height:458px;}}"],g.JP,e=>{let{$open:t}=e;return t?(0,s.AH)(["gap:8px;"]):(0,s.AH)(["gap:0;"])},f.jO.maxPhone),C=s.Ay.button.withConfig({componentId:"sc-9dlu7b-6"})(["outline:none;pointer-events:auto;justify-self:flex-end;margin-right:8px;border-radius:50%;overflow:hidden;display:flex;flex-direction:row;border:0;width:28px;height:28px;background-color:",";box-shadow:",";z-index:2;cursor:pointer;position:relative;"," justify-content:center;align-items:center;padding:0;@media ","{align-self:center;min-width:28px;margin-right:",";}"],e=>{let{$background:t}=e;return t||""},f.FR.level2,m,f.jO.maxPhone,e=>{let{$open:t}=e;return t?"8px;":"16px"});var S=n(4785),_=n(8832);const A=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-0"})(["z-index:",";border-radius:14px;background:",";background-color:",";margin-bottom:16px;box-shadow:",";",";@media ","{margin-left:20px;","}@media ","{margin-left:16px;}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},f.FR.level2,g.JP,f.jO.maxTablet,e=>{let{$bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"},f.jO.maxPhone),E=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-1"})(["width:max-content;max-width:360px;min-width:60px;padding:12px;pointer-events:auto;@media ","{width:unset;max-width:100%;}"],f.jO.maxPhone),T=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-2"})(["display:flex;cursor:pointer;align-items:center;"]),j=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin-right:15px;background:",";background-position:center;background-size:cover;background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),I=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-4"})(["margin:0;color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:var(--_kindlychat-font-size-p);}"],e=>{let{theme:t}=e;return(0,h.w5)(t.background,f.AV.light,f.AV.dark)},S.m.default,f.jO.maxTablet),O=(0,s.Ay)(_.$n).withConfig({componentId:"sc-1ihr6s7-5"})(["pointer-events:auto;z-index:",";display:flex;padding:4px;border-radius:50%;background:",";background-color:",";align-self:flex-end;margin-bottom:8px;",";",";&:before{background:",";background-color:",";}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground},g.JP,m,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground}),L=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-6"})(["display:flex;flex-direction:column;"]);var P=n(1085);function N(e){let{agent:t}=e;const{agent_joined_text:n}=(0,c.A)();return(0,P.jsxs)(T,{children:[(0,P.jsx)(j,{style:{backgroundImage:`url(${t.avatar})`}}),(0,P.jsxs)(I,{children:[(0,P.jsx)("span",{children:t.name||"An agent"})," ",n]})]})}function M(e){let{text:t}=e;return(0,P.jsx)(T,{children:(0,P.jsx)(I,{dangerouslySetInnerHTML:{__html:t}})})}const z=function(e){let{settings:t}=e;const{bubbleSize:n}=(0,i.d4)(d.Od),{agent:o,show:c,text:g,type:m}=(0,i.d4)(d.zD),b=(0,i.wA)(),v=(0,p.A)(t,"zIndex",15),y=(0,s.DP)(),x=(0,r.useMemo)(()=>(0,h.w5)(y.background||y.buttonBackground||"#fff",f.AV.light,f.AV.dark),[y.background,y.buttonBackground]);return null===g&&"feedback"!==m?null:(0,P.jsxs)(L,{children:[(0,P.jsx)(O,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),b((0,u.gQ)())},type:"button",$zIndex:v,children:(0,P.jsx)(a.US,{color:x,width:20,height:20})}),(0,P.jsx)(A,{$bubbleSize:n,"aria-hidden":c?"false":"true","aria-label":"Chat bot push message",onClick:()=>b((0,u.lQ)()),role:"complementary",$zIndex:v,children:(0,P.jsxs)(E,{children:[m===u.oI.MESSAGE&&(0,P.jsx)(M,{text:g}),m===u.oI.HANDOVER&&(0,P.jsx)(N,{agent:o}),m===u.oI.FEEDBACK&&(0,P.jsx)(l.A,{})]})})]})};var R=n(5352);const $=(0,s.AH)(["width:",";height:",";object-fit:cover;border-radius:50%;transition:all 300ms ease;user-select:none;@media ","{","}"],e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},f.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?(0,s.AH)(["width:36px;height:36px;animation:none;"]):(0,s.AH)(["width:44px !important;height:44px !important;animation:none;"])}),D=s.Ay.img.withConfig({componentId:"sc-15ijr09-0"})(["",""],$),F=(0,s.Ay)(a.T4).attrs(e=>({color:e.theme.chatbubbleText})).withConfig({componentId:"sc-15ijr09-1"})(["",""],$),B=(e,t)=>{if(e)return e;switch(t){case R.Ns.EASTER:return"http://localhost:8081/src/assets/images/KindlyBlobEaster.416354e85b59801cd8f65529358b4e44.png";case R.Ns.PRIDE:return"http://localhost:8081/src/assets/images/KindlyBlobPride.c2ba2b3e79a5f9136a5293758623b7ab.png";case R.Ns.CHRISTMAS:return"http://localhost:8081/src/assets/images/KindlyBlobXmas.73597f52e165fee513b384bc70e98314.png";default:return null}},H=function(e){let{showGlobalIcons:t,isGlobalIconsDelayed:n}=e;const{seasonalAppearance:r,bubbleAvatar:o,bubbleSize:a}=(0,i.d4)(d.Od),{active:s}=(0,i.d4)(d.$P),{open:l}=(0,i.d4)(d.o3);return r||o?(0,P.jsx)(D,{"data-testid":"chat-bubble-logo",$globalIconsOpen:l,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:s,$smallBubble:"SMALL"===a,src:B(o,r),alt:""}):(0,P.jsx)(F,{"data-testid":"chat-bubble-logo",$globalIconsOpen:l,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:s,$smallBubble:"SMALL"===a})};var U=n(6739);const V=(0,s.AH)(["white-space:nowrap;font-family:",";font-size:var(--_kindlychat-font-size-m);font-weight:500;"],S.m.default),W=s.Ay.div.withConfig({componentId:"sc-sdddjp-0"})(["position:absolute;left:-10000px;top:auto;user-select:none;pointer-events:none;visibility:hidden;",""],V),G=(0,r.forwardRef)((e,t)=>{var n;const{text:r,chatbubbleTextEnabled:o}=(0,i.d4)(d.Od),{currentLanguageCode:a}=(0,U.A)(),s=null===(n=r.chatbubble_text)||void 0===n?void 0:n[(null==a?void 0:a.split("-")[0])||"en"];return s&&o?(0,P.jsx)(W,{ref:t,"aria-hidden":"true",children:s}):null});G.displayName="HiddenButton";const q=G,K=e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case R.Ns.EASTER:return f.HM.sunglow;case R.Ns.CHRISTMAS:return f.HM.pomegranate;default:return f.Tj.white}return t.bubbleButtonBackground||t.buttonBackground},Y=s.Ay.div.withConfig({componentId:"sc-1kk1ok5-0"})(["margin-left:8px;margin-right:8px;transition:all 300ms ease;width:auto;max-width:","px;white-space:nowrap;"," color:",";@media ","{font-size:"," !important;}"],e=>{let{$buttonWidth:t}=e;return t},e=>{let{$globalIconsOpen:t,$active:n,$isGlobalIconsDelayed:r,$showGlobalIcons:o}=e;return n?(0,s.AH)(["max-width:0;margin-left:0;margin-right:0;"]):t&&void 0!==r&&!r||t&&o&&r?(0,s.AH)(["font-size:var(--_kindlychat-font-size-p);"]):(0,s.AH)(["font-size:var(--_kindlychat-font-size-m);"])},e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case R.Ns.EASTER:return f.HM.sunglowDark;case R.Ns.CHRISTMAS:return f.HM.pomegranateDark;default:return f.AV.dark}const r=(0,h.w5)(t.bubbleButtonBackground,f.AV.light,f.AV.dark);return t.chatbubbleText||r},f.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?f.J.p:f.J.h5}),X=s.Ay.span.withConfig({componentId:"sc-1kk1ok5-1"})(["transition:opacity 150ms ease;opacity:",";",""],e=>{let{$active:t}=e;return t&&0},e=>{let{$active:t}=e;return!t&&"transition-delay: 150ms;"}),Q=s.Ay.div.withConfig({componentId:"sc-1kk1ok5-2"})(["display:flex;flex-direction:row;z-index:1;align-items:center;"]),Z=s.Ay.button.withConfig({componentId:"sc-1kk1ok5-3"})(["justify-self:flex-end;overflow:visible;display:flex;justify-content:center;align-items:center;cursor:pointer;pointer-events:auto;flex-direction:row;padding:","px;border-radius:",";border:none;box-shadow:",";position:relative;transition:all 0.25s;&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background:",";border-radius:",";transition:all 0.2s ease;}&:after{content:'';left:2px;top:2px;position:absolute;width:calc(100% - 4px);height:calc(100% - 4px);background:",";border-radius:",";transition:all 0.2s ease;}&:hover{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}&:focus{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}@media ","{padding:","px !important;}@media ","{","}"],e=>{let{$hasButtonText:t,$globalIconsOpen:n,$showGlobalIcons:r,$active:o,$isGlobalIconsDelayed:i}=e;return t?o?6:""+(n&&void 0!==i&&!i||n&&r&&i?6:8):""+(o||n&&void 0!==i&&!i||n&&r&&i?6:8)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{let{$active:t}=e;return t?`0px 1px 5px 1px ${f.Tj.shadowColorDark}`:f.FR.level2},e=>{let{$bubbleOutline:t,theme:n,background:r,$seasonalAppearance:o}=e;return o?K({theme:n||{},$seasonalAppearance:o}):r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{const t={theme:e.theme||{},$seasonalAppearance:e.$seasonalAppearance};return K(t)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},f.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?6:8},f.jO.maxPhone,e=>{let{$globalIconsOpen:t,$showGlobalIcons:n}=e;return t&&n&&"\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n &:before, &:after {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n "}),J=(0,s.AH)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]);function ee(e){var t;let{showGlobalIcons:n,isGlobalIconsDelayed:o}=e;const{bubbleOutline:a,text:s,seasonalAppearance:l,chatbubbleTextEnabled:c,bubbleSize:f}=(0,i.d4)(d.Od),{currentLanguage:p,active:h,isChatFullWindow:g}=(0,i.d4)(d.$P),[m,b]=(0,r.useState)(0),{open:v}=(0,i.d4)(d.o3),y=(0,i.wA)(),x=(0,r.useRef)(null),w=null===(t=s.chatbubble_text)||void 0===t?void 0:t[(null==p?void 0:p.split("-")[0])||"en"];(0,r.useEffect)(()=>{var e;w&&c&&x.current&&b(null===(e=x.current)||void 0===e?void 0:e.clientWidth)},[w,c]);const k=h?"Close chat":"Open chat";return(0,P.jsx)(Z,{"aria-label":k,"aria-controls":"ChatButtonContainer",title:k,type:"button",$active:h,$globalIconsOpen:v,$isGlobalIconsDelayed:o,$showGlobalIcons:n,onClick:()=>y(h?(0,u.Rh)():(0,u.lQ)()),"data-testid":"chat-bubble-button","data-cy":"chat-bubble-button",$hasButtonText:!!w,$bubbleOutline:!!a,$smallBubble:"SMALL"===f,$seasonalAppearance:l,inert:!!g,children:(0,P.jsxs)(Q,{children:[!!w&&c&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(q,{ref:x}),m&&(0,P.jsx)(Y,{$buttonWidth:m,$active:h,$globalIconsOpen:v,$showGlobalIcons:n,$isGlobalIconsDelayed:o,$seasonalAppearance:l,$smallBubble:"SMALL"===f,children:(0,P.jsx)(X,{$active:h,children:w})})]}),(0,P.jsx)(H,{showGlobalIcons:n,isGlobalIconsDelayed:o})]})})}s.Ay.div.withConfig({componentId:"sc-1kk1ok5-4"})(["",";opacity:1;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");",";"],J,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),s.Ay.div.withConfig({componentId:"sc-1kk1ok5-5"})(["position:relative;",";"],J);const te=o().memo(ee);let ne,re,oe=!1;try{const e=window.AudioContext||window.webkitAudioContext;e&&(ne=new e)}catch(e){console.warn("AudioContext is not supported in this environment:",e)}async function ie(){var e;if(ne){if(!oe)try{oe=!0,re||(re=await async function(){if(!ne)throw new Error("AudioContext is not supported");const e=await fetch("http://localhost:8081/src/assets/audio/newagent.442793eb7365abe2d4df421936fd9e6b.mp3"),t=await e.arrayBuffer();return ne.decodeAudioData(t)}()),"suspended"===ne.state&&await ne.resume(),await(e=re,ne?new Promise(t=>{const n=ne.createBufferSource();n.buffer=e,n.connect(ne.destination),n.onended=()=>t(),n.start()}):Promise.reject(new Error("AudioContext is not supported")))}catch(e){console.error("Could not play notification sound:",e)}finally{oe=!1}}else console.warn("AudioContext is not supported, cannot play notification sound")}var ae=n(9159);const se=()=>{const{takenOver:e}=(0,i.d4)(d.MA),t=(0,ae.A)(e),{chatMessages:n}=(0,i.d4)(d.DZ),{active:o}=(0,i.d4)(d.$P),a=(0,ae.A)(n);(0,r.useEffect)(()=>{if(void 0!==t&&t!==e&&e&&ie(),a&&n.length>a.length){const e=n[n.length-1];e&&(e.from_bot||"SYSTEM"===e.sender)&&("visible"===document.visibilityState&&o||ie())}},[e,n.length,o])};var le=n(9749),ce=n.n(le),ue=n(5134),de=n(209),fe=n(5626);const pe=()=>{const[e,t]=(0,r.useState)(document.location.href);return(0,r.useEffect)(()=>{const n=()=>{setTimeout(()=>{e!==document.location.href&&t(document.location.href)},0)},r=setInterval(n,200),{navigation:o}=window;return o&&o.addEventListener&&(o.addEventListener("navigate",n),clearInterval(r)),()=>{o&&o.removeEventListener?o.removeEventListener("navigate",n):clearInterval(r)}},[e]),e},he=(e,t)=>Object.entries(e).reduce((n,r)=>{let[o,i]=r;return{...n,[o]:(0,de.A)(i,t),url:e.url,autopopup_time:e.autopopup_time}},{}),ge=[];var me=n(8668);const be=(0,s.AH)(["bottom:0px;right:0px;left:0;top:0px;"]),ve=s.Ay.div.withConfig({componentId:"sc-m0hsz7-0"})(["position:fixed;bottom:calc(",");right:calc(",");"," z-index:",";"," font-family:",";transform:",";transition:transform 0.3s ease;*{box-sizing:border-box;",";}"," "," --panel-background-white-black-contrast-1743170834:",";--chat-modal-background-white-black-contrast-1755953876:",";"],e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:R.bF.bottom}`},e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.right)&&void 0!==t?t:R.bF.right}`},e=>{let{$fullscreen:t,$active:n}=e;return t&&n&&be},e=>(e.$zIndex||0)+5,e=>{let{$active:t}=e;return t&&(0,me.A)()&&be},e=>{let{theme:t}=e;return null!=t&&t.customFont?t.customFont:S.m.default},e=>{let{$shouldHideUI:t}=e;return t?"translateX(420px)":"none"},e=>{let{theme:t}=e;return(null==t?void 0:t.customFont)&&`font-family: ${t.customFont}`},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,s.AH)(["@media ","{bottom:2.5%;top:2.5%;right:5%;left:5%;border-radius:6px;box-shadow:",";}"],f.jO.maxTablet,f.FR.level2)},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&n&&(0,s.AH)(["@media ","{bottom:0;top:0;right:0;left:0;}"],f.jO.maxTablet)},e=>{let{theme:t}=e;return(0,h.w5)(t.panelBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,h.w5)(t.background,"#FFFFFF","#000000")}),ye=s.Ay.div.withConfig({componentId:"sc-m0hsz7-1"})(["display:flex;flex-direction:row;justify-content:flex-end;position:relative;",""],e=>{let{$active:t}=e;return t&&(0,s.AH)(["@media ","{opacity:0;user-select:none;pointer-events:none;}"],f.jO.maxTablet)}),xe=s.Ay.div.withConfig({componentId:"sc-m0hsz7-2"})(["margin-bottom:24px;transform-origin:bottom right;height:100%;"," transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);@media ","{","}@media ","{","}"],e=>{let{$active:t,$fullscreenMode:n,$duration:r=300}=e;return n?"":t?(0,s.AH)(["transform:scale(1) translateY(0);opacity:1;transition:","ms ease;"],r):(0,s.AH)(["transform:scale(0.24) translateY(200px);opacity:0;transition:","ms ease;"],r)},f.jO.maxPhone,e=>{let{$active:t}=e;return!t&&"width: 0;"},f.jO.maxTablet,e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,s.AH)(["border-radius:6px;overflow:hidden;"])}),we=s.Ay.div.withConfig({componentId:"sc-m0hsz7-3"})(["height:15px;width:15px;z-index:50;right:0;top:0;position:absolute;border-radius:100px;background:",";background-color:",";",";"],f.Tj.errorColor,f.Tj.errorColor,g.cr),ke=s.Ay.div.withConfig({componentId:"sc-m0hsz7-4"})(["display:grid;gap:8px;position:relative;@media ","{gap:0px;"," ","}"],f.jO.maxPhone,e=>{let{$showGlobalIcons:t}=e;return t&&"grid-template-columns: auto auto;"},e=>{let{$showGlobalIcons:t,$globalIconsOpen:n}=e;return t&&n&&"\n &::before { \n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n content: '';\n background: rgba(0, 0, 0, 0.1);\n filter: blur(100px);\n }"}),Ce=s.Ay.button.withConfig({componentId:"sc-m0hsz7-5"})(["all:unset;position:fixed;display:flex;width:12px;height:24px;right:0;bottom:calc("," + 15px);align-items:center;justify-content:center;background:#fff;border:1px solid #e0e0e0;border-radius:4px 0 0 4px;transition:background 0.2s;cursor:pointer;&:hover{background:#f5f5f5;}&:focus-visible{outline:1px solid #0066cc;}"],e=>{var t;let{position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:R.bF.bottom}`});var Se=n(3243),_e=n(7559),Ae=n(5880);const Ee=function(e){let{color:t,...n}=e;return(0,P.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",...n,children:(0,P.jsx)("path",{d:"M4.75 5.75h14.5M4.75 18.25h14.5M4.75 12h14.5",stroke:t||"#0D0D0D",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})};function Te(e){var t,n,o;let{icons:s,settings:l}=e;const c=(0,i.wA)(),{currentLanguage:p,renderedBy:g}=(0,i.d4)(d.$P),{open:m}=(0,i.d4)(d.o3),[S,_]=(0,r.useState)();return(0,P.jsxs)(k,{$open:m,$seasonalAppearance:l.seasonal_appearance,children:[(0,P.jsx)(q,{ref:e=>{null!=e&&e.clientWidth&&!S&&_(e.clientWidth)}}),(0,P.jsx)(C,{onClick:()=>{c((0,u.nI)({open:!m}))},$seasonalAppearance:l.seasonal_appearance,$open:m,$background:null===(t=l.style)||void 0===t?void 0:t.color_global_icons_button_background,"aria-label":m?"Close menu":"Open menu",children:m?(0,P.jsx)(a.US,{width:20,height:20,color:(0,h.w5)((null===(n=l.style)||void 0===n?void 0:n.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)}):(0,P.jsx)(Ee,{width:20,height:20,color:(0,h.w5)((null===(o=l.style)||void 0===o?void 0:o.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)})}),(0,P.jsx)(y,{$buttonWidth:S,$iconsCount:s.length,$open:m,children:s.map((e,t)=>{var n;return(0,P.jsx)(b,{$isLast:0===t,$background:null===(n=l.style)||void 0===n?void 0:n.color_global_icons_button_background,onClick:()=>(async e=>{let{id:t,title:n,altText:r,imageUrl:o,buttonType:i,buttonAction:a}=e;(0,Ae.n6)({type:"trigger-globalicon",icon:{id:t,title:n,altText:r,imageUrl:o,type:i,action:a},renderedBy:g}),"DIALOGUE"===i&&await c((0,u.zh)(a,{languageCode:p,openChat:!0,tempId:void 0,responsePromise:void 0})),"NUDGE"===i&&await c((0,u.fe)({slug:a,nudgeLayout:void 0,trackEvent:!0})),"URL"===i&&window.open(a,"_blank")})(e),children:(0,P.jsxs)("div",{children:[(0,P.jsx)(v,{children:e.title}),e.imageUrl&&(0,P.jsx)(x,{children:(0,P.jsx)(w,{src:e.imageUrl,alt:e.altText})})]})},e.id)})})]})}const je=o().memo(Te);let Ie,Oe=function(e){return e.USER_INACTIVITY="USER_INACTIVITY",e.USER_SCROLLING="USER_SCROLLING",e}({}),Le=function(e){return e.BOTH="BOTH",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e}({}),Pe=!1;const Ne=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,8805))),Me=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,4079))),ze=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,946))),Re=300;let $e;function De(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:o,onNudgeFormSubmit:s,chatSettings:l}=e;const c=(0,i.wA)(),{active:f,inPlatform:h,currentLanguage:g,chatHasStarted:m}=(0,i.d4)(d.$P),[b,v]=(0,r.useState)(f),{show:y}=(0,i.d4)(d.zD),{show:x,nudgeLayout:w}=(0,i.d4)(d.G0),{bubbleNotification:k,position:C,fullscreenMode:S}=(0,i.d4)(d.Od),{showBubbleNotification:_}=(0,i.d4)(d.Cv),{open:A}=(0,i.d4)(d.o3),E=(0,p.A)(l,"fullscreenMode",!1),[T,j]=(0,r.useState)(!1),{globalIcons:I,isGlobalIconsDelayed:O}=function(e,t,n){var o;const a=pe(),{currentLanguage:s,globalIconsState:l,inPlatform:c}=(0,i.d4)(d.$P),f=(0,i.wA)(),[p,h]=(0,r.useState)(),g=(0,r.useCallback)(()=>{if(!c&&e.global_icons_enabled&&e.global_icons)return e.global_icons.filter(e=>e.enabled[s]).reduce((e,t)=>{let{url:n,enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l}=t;return n.forEach(t=>{e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:t})}),n.length||e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:""}),e},[]).sort((e,t)=>e.url.length<t.url.length?1:-1).find(e=>{var t,n;if(!(0,me.A)()&&ce()(t=e.trigger_on_device).call(t,Le.DESKTOP)||(0,me.A)()&&ce()(n=e.trigger_on_device).call(n,Le.MOBILE))return(0,fe.A)(a,e.url)})},[c,e.global_icons,e.global_icons_enabled,s,a]),m=(0,r.useMemo)(()=>g(),[g]);(0,r.useEffect)(()=>{Pe&&e.global_icons_enabled&&h(m)},[t,m,e.global_icons_enabled]);const b=(0,r.useCallback)(e=>{const t=e.target;t.documentElement&&m&&(t.documentElement.scrollHeight-t.documentElement.clientHeight)*(m.trigger_after/100)<t.documentElement.scrollTop&&(h(m),Pe=!0)},[m]);return(0,r.useEffect)(()=>{p&&Pe&&Ie&&e.global_icons_enabled&&(Ie.removeEventListener("scroll",b),Ie=null)},[p,b,e.global_icons_enabled]),(0,r.useEffect)(()=>{var t;return!Pe&&e.global_icons_enabled&&(null===m&&h(void 0),m)&&(m.trigger_rule===Oe.USER_INACTIVITY&&(m.trigger_after>0&&!ce()(t=l.seenDelayedPages).call(t,m.url)?setTimeout(()=>{h(m),f((0,u.nI)({...l,seenDelayedPages:[...l.seenDelayedPages,m.url]})),Pe=!0},1e3*m.trigger_after):(h(m),Pe=!0)),m.trigger_rule!==Oe.USER_SCROLLING||Ie||(Ie=n instanceof Element?n:window.document,Ie.addEventListener("scroll",b))),()=>{Ie&&(Ie.removeEventListener("scroll",b),Ie=null)}},[e,s,n,f,l,m,b]),{globalIcons:p,isGlobalIconsDelayed:!ce()(o=l.seenDelayedPages).call(o,null==m?void 0:m.url)&&m&&m.trigger_after>0}}(l,f),L=(0,me.A)(),N=(0,p.A)(l,"zIndex",R.DP);(0,r.useEffect)(()=>{f&&_&&c((0,u.pK)()),f&&y&&c((0,u.gQ)())},[_,f,L,c,y]),se(),function(){const e=(0,ue.jL)(),[t,n]=(0,r.useState)("/"),[o,a]=(0,r.useState)(!1),{shownNudges:s}=(0,i.d4)(d.$P),l=(0,Se.A)();(0,r.useEffect)(()=>{n(window.location.href),null!=s&&s.length&&!o&&Array.from(new Set(s).values()).map(e=>l.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>(0,fe.A)(t,e.analytics_completion_page_path)).forEach(t=>{a(!0),e((0,u.vJ)({slug:t.slug,eventType:_e.oE})),e({type:_e.Kd,slug:t.slug})})},[e,t,l,s,o])}(),function(){const e=(0,ue.jL)(),{currentLanguageCode:t}=(0,U.A)(),{active:n,chatHasStarted:o}=(0,i.d4)(d.$P),{pushGreetingsEnabled:a,pushGreetings:s}=(0,i.d4)(d.Od),{dismissedMessages:l}=(0,i.d4)(d.zD),c=pe();(0,r.useEffect)(()=>{if(!a||!s||n||!t||o)return;const r=()=>(e,t)=>{const{show:n}=t().pushMessages;ge.length&&(n||(ge[0].autopopup_time>0?setTimeout(()=>{e((0,u.VP)(ge[0])),ge.shift()},ge[0].autopopup_time):(e((0,u.VP)(ge[0])),ge.shift())),ge.length&&setTimeout(()=>e(r()),Math.max(ge[0].autopopup_time,2e3)))};s.map(e=>he(e,t)).filter(e=>e.enabled&&!ce()(l).call(l,e.title)&&(0,fe.A)(c,e.url)).sort((e,t)=>t.url.length-e.url.length).forEach(e=>ge.push(e)),e(r())},[n,t,a,s,e,o,l,c])}(),function(){const e=(0,ue.jL)(),{currentLanguageCode:t}=(0,U.A)(),{active:n}=(0,ue.GV)(d.$P),{nudges:o}=(0,ue.GV)(d.Od),{show:i,hasBeenDismissed:a,slug:s}=(0,ue.GV)(d.G0),l=pe(),c=null==o?void 0:o.text_nudges;(0,r.useEffect)(()=>{!n&&t&&(null==c?void 0:c.length)>0&&(null!=c?c:[]).forEach(n=>!(i||a&&n.slug===s)&&!(!(0,fe.A)(l,n.url_trigger)||!n.enabled[t])&&e((0,u.mR)({nudge:n,languageCode:t})))},[n,t,e,l,c])}();const M=!f&&y&&!t,$=I&&!f&&!x&&l.global_icons_enabled&&!M,D=(0,ae.A)(f);return(0,r.useEffect)(()=>{!f&&D?($e&&clearTimeout($e),$e=setTimeout(()=>v(f),Re+10)):D!==f&&($e&&clearTimeout($e),v(f))},[D,f]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(ve,{$fullscreen:!!E,$active:f,$chatHasStarted:m,$inPlatform:h,$position:C,$zIndex:N,$shouldHideUI:T,id:"kindly-root",children:[(0,P.jsx)(xe,{$chatHasStarted:m,$fullscreenMode:S,$active:f,$duration:Re,children:b&&(0,P.jsx)(r.Suspense,{fallback:"",children:(0,P.jsx)(Ne,{settings:l})})}),M&&(0,P.jsx)(z,{settings:l}),x&&w&&(0,P.jsx)(r.Suspense,{fallback:"",children:(0,P.jsx)(Me,{hidden:t,layout:w,onDismiss:n,onNewsletterSubmit:s,onProductClick:o})}),(0,P.jsxs)(ye,{$inPlatform:h,$position:C,$zIndex:N,id:"ChatButtonContainer",$active:f,lang:g,children:[!f&&k&&_&&(0,P.jsx)(we,{}),!t&&(0,P.jsxs)(ke,{$showGlobalIcons:$,$globalIconsOpen:A,children:[h&&(0,P.jsx)(r.Suspense,{fallback:"",children:(0,P.jsx)(ze,{active:f})}),$&&(0,P.jsx)(je,{icons:I.icons,settings:l}),(0,P.jsx)(te,{showGlobalIcons:!!$,isGlobalIconsDelayed:O})]})]})]}),h&&(0,P.jsx)(Ce,{onClick:()=>j(e=>!e),children:T?(0,P.jsx)(a.A6,{stroke:"black"}):(0,P.jsx)(a.fl,{stroke:"black"})})]})}},3489:(e,t,n)=>{"use strict";var r=n(1003);e.exports=r("document","documentElement")},3491:(e,t,n)=>{"use strict";var r=n(3574),o=n(262),i=n(5426),a=n(1966);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3508:(e,t,n)=>{"use strict";var r=n(3999);e.exports=function(e,t,n,o){return o&&o.enumerable?e[t]=n:r(e,t,n),e}},3521:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(2769),a=n(8407),s=n(1003),l=n(2894),c=function(){},u=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.test(c),h=function(e){if(!i(e))return!1;try{return u(c,[],e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!u||o(function(){var e;return h(h.call)||!h(Object)||!h(function(){e=!0})||e})?g:h},3531:(e,t,n)=>{"use strict";var r=n(8900).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},3551:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>r.A,cS:()=>k.A,ZH:()=>ee,pd:()=>x,l6:()=>E,Ap:()=>w.A,TM:()=>te.A});var r=n(2327),o=n(9155),i=n(824),a=n(1197),s=n(8787),l=n(1708),c=n(8663),u=n(7638);const d=a.Ay.div.withConfig({componentId:"sc-5nmogf-0"})(["position:relative;display:flex;"]),f=a.Ay.div.withConfig({componentId:"sc-5nmogf-1"})(["padding:0 4px;position:absolute;top:50%;transform:translateY(-50%);font-size:var(--_kindlychat-font-size-p);display:"," ",";"],e=>{let{$show:t}=e;return t?"block;":"none;"},e=>{let{$adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}),p=a.Ay.input.withConfig({componentId:"sc-5nmogf-2"})([""," color:var(--panel-background-white-black-contrast-1743170834);padding:10px 16px;"," font-size:var(--_kindlychat-font-size-p);border-radius:18px;border:1px solid transparent;flex:1;&:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}text-size-adjust:","%;",""],e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)},e=>{let{$adornmentWidth:t,$adornmentPosition:n,$hasMaxLength:r}=e;if("end"===n&&!r&&t)return`padding-right: ${t+10}px;`;if("start"===n&&t){let e=`padding-left: ${t+10}px;`;return r&&(e+="padding-right: 48px;"),e}return r?"padding-right: 56px;":void 0},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFF","#000")},(0,s.L9)(l.J.p),u.jq);var h=n(2816),g=n(2016),m=n(7376),b=n(8853),v=n(437),y=n(1085);const x=function(e){var t,n,r,a,s;let{autoComplete:l="off",name:c,type:u="text",register:x,validators:w,control:k,id:C,setError:S,clearErrors:_,trigger:A,adornment:E,adornmentPosition:T="end",...j}=e;const I=(0,v.G8)(w),O=(0,o.useRef)(null),{ref:L,onChange:P,...N}=x?x(c,I):{},[,M]=(0,o.useState)(!1),{errors:z,isSubmitted:R}=(0,i.lN)({name:c,control:k}),$=(0,m.A)({name:c,trigger:A,control:k,setError:S,clearErrors:_});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(d,{children:[E&&(0,y.jsx)(f,{ref:e=>{O.current=e,M(!0)},$show:!(null!==(t=I.maxLength)&&void 0!==t&&t.value&&"end"===T),$adornmentPosition:T,children:E}),(0,y.jsx)(p,{autoComplete:l,name:c,type:u.toLowerCase(),$adornmentPosition:T,$adornmentWidth:null===(n=O.current)||void 0===n?void 0:n.clientWidth,$hasMaxLength:!(null===(r=I.maxLength)||void 0===r||!r.value),id:C||c,...(0,v.NR)(I),...N&&{...N},onChange:e=>{null==P||P(e),$(e)},ref:L,"aria-errormessage":`error_${c}`,"aria-invalid":!(0,b.A)(z)&&R,...j}),!(null===(a=I.maxLength)||void 0===a||!a.value)&&k&&c&&(0,y.jsx)(h.A,{fieldName:c,control:k,maxLength:null===(s=I.maxLength)||void 0===s?void 0:s.value})]}),(0,y.jsx)(g.A,{control:k,name:c})]})};var w=n(660),k=n(7279),C=n(15);const S=a.Ay.div.withConfig({componentId:"sc-1ncnj7t-0"})(["position:relative;display:flex;"]),_=a.Ay.select.withConfig({componentId:"sc-1ncnj7t-1"})(["background-color:",";color:",";padding:9px 16px;padding-right:42px;border-radius:18px;border:1px solid transparent;outline:none;flex:1;display:inline-block;appearance:none;text-indent:1px;text-overflow:'';max-width:100%;& option{color:initial;}",""],e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)},e=>{let{theme:t,$isPlaceholder:n}=e;return n?(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):(0,c.w5)(t.panelBackground,"#FFFFFF","#000000")},u.jq),A=a.Ay.div.withConfig({componentId:"sc-1ncnj7t-2"})(["position:absolute;right:20px;top:6px;width:10px;height:6px;pointer-events:none;user-select:none;svg path{stroke:",";}"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF","#000000")}),E=function(e){let{name:t,register:n,validators:r,control:o,id:a,setError:s,clearErrors:l,trigger:c,options:u,...d}=e;const f=(0,v.G8)(r),{ref:p,onChange:h,...b}=n?n(t,f):{},x=(0,i.FH)({name:t,control:o}),w=(0,m.A)({name:t,trigger:c,control:o,setError:s,clearErrors:l});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(S,{children:[(0,y.jsxs)(_,{name:t,type:"select",$isPlaceholder:""===x,id:a||t,...(0,v.NR)(f),...b&&{...b},onChange:e=>{null==h||h(e),w(e)},ref:p,...d,children:[d.placeholder&&(0,y.jsx)("option",{value:"",disabled:!0,hidden:!0,children:d.placeholder}),null==u?void 0:u.map((e,n)=>(0,y.jsx)("option",{value:e.value,children:e.label},`select-${t}-${e.id||n}`))]}),(0,y.jsx)(A,{children:(0,y.jsx)(C.A,{color:"#445265"})})]}),(0,y.jsx)(g.A,{control:o,name:t})]})};var T=n(9749),j=n.n(T),I=n(541),O=n(1308),L=n(9154),P=n(5765),N=n(5352),M=n(8964),z=n(6739),R=n(9159),$=n(8278),D=n(8256),F=n(209);const B=a.Ay.div.withConfig({componentId:"sc-ansydw-0"})(["position:relative;display:flex;flex-direction:column;"]),H=a.Ay.label.withConfig({componentId:"sc-ansydw-1"})(["padding:","px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;flex:1;border-radius:6px;color:var(--panel-background-white-black-contrast-1743170834);border:1px dashed ",";"," "," ",""],e=>{let{$hasError:t}=e;return t?13:24},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,t.buttonBackground,"rgba(0, 0, 0, 0.12)")},e=>{let{$hasError:t}=e;return t&&(0,a.AH)(["background-color:#f9ef94 !important;border:1px solid #f9ef94 !important;"])},u.jq,e=>{let{theme:t,$isOver:n}=e;return n&&(0,s.Mo)(t.panelBackground,.08)}),U=a.Ay.span.withConfig({componentId:"sc-ansydw-2"})(["font-size:var(--_kindlychat-font-size-sm);font-weight:500;pointer-events:none;line-height:16px;"]),V=a.Ay.input.withConfig({componentId:"sc-ansydw-3"})(["width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;"]),W=a.Ay.span.withConfig({componentId:"sc-ansydw-4"})(["color:",";"],e=>{let{theme:t}=e;return t.buttonBackground}),G=a.Ay.div.withConfig({componentId:"sc-ansydw-5"})(["margin-top:8px;display:flex;flex-direction:row;font-size:var(--_kindlychat-font-size-sm);color:var(--panel-background-white-black-contrast-1743170834);& svg > path{stroke:var(--panel-background-white-black-contrast-1743170834);}"]),q=a.Ay.div.withConfig({componentId:"sc-ansydw-6"})(["display:flex;flex-direction:column;& > div{word-break:normal;overflow-wrap:anywhere;}"]),K=a.Ay.div.withConfig({componentId:"sc-ansydw-7"})(["font-size:var(--_kindlychat-font-size-sm);"]),Y=a.Ay.div.withConfig({componentId:"sc-ansydw-8"})(["display:flex;flex-direction:row;align-items:center;margin-bottom:4px;line-height:16px;"]);var X=n(9933);const Q=e=>e.split(/\[(.*?)\]/).map((e,t)=>t%2!=0?(0,y.jsx)(W,{children:e},`file-${e}`):(0,y.jsxs)("span",{children:[" ",e]},`file-${e}`)),Z=e=>{if(e.length){const t=new DataTransfer;return e.forEach(e=>{t.items.add(e)}),t}},J=(e,t)=>{let[...n]=e,[...r]=t;const o=n;return r.forEach(e=>{o.some(t=>e.name===t.name&&e.size===t.size)||o.push(e)}),o},ee=function(e){var t,n,r,a;let{name:s,label:l,register:c,validators:u,control:d,id:f,setError:p,trigger:h,setValue:x,clearErrors:w,accept:k=N.oY,...C}=e;const{text:S}=(0,I.d4)($.Od),{currentLanguageCode:_}=(0,z.A)(),A=(0,v.G8)(u),E=(0,o.useRef)(null),T=(0,o.useCallback)(e=>e.length>5?"You can upload up to 5 files at a time.":"",[]),W=(0,o.useCallback)(e=>{if(e.length){const t=k.split(",").map(e=>e.replace("/*",""));if([...e].some(e=>!t.some(t=>e.name.endsWith(t))&&!j()(t).call(t,e.type.substring(0,e.type.indexOf("/")))))return`${(0,F.A)(S.file_supported_types,_)}: ${k}`}return""},[k,_,S.file_supported_types]),ee=(0,o.useCallback)(e=>e.length&&[...e].some(e=>e.size/D.aO>D.W7)?`${(0,F.A)(S.file_maximum_size,_)}: ${(0,D.B$)(D.W7*D.aO)}`:"",[_,S.file_maximum_size]),{ref:te,...ne}=c?c(s,A):{ref:void 0},re=(0,o.useRef)(null),{errors:oe,isSubmitted:ie}=(0,i.lN)({name:s,control:d}),ae=(0,R.A)(oe),se=(0,m.A)({name:s,trigger:h,control:d,setError:p,clearErrors:w}),[,le]=(0,o.useState)(null),[ce,ue]=(0,o.useState)([]),[de,fe]=(0,o.useState)(!1);return(0,M.A)("dragover",e=>{e.preventDefault()},re.current),(0,M.A)("dragenter",e=>{e.preventDefault(),fe(!0)},re.current),(0,M.A)("dragleave",e=>{e.preventDefault(),fe(!1)},re.current),(0,M.A)("drop",e=>{e.preventDefault();const t=J(ce,e.dataTransfer.files),n=W(e.dataTransfer.files)||T(t)||ee(e.dataTransfer.files);if(n)return null==p?void 0:p(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Z(t);return null==x||x(s,null==r?void 0:r.files,{shouldValidate:!0}),E.current&&null!=r&&r.files.length&&(E.current.files=r.files),fe(!1),!0},re.current),(0,M.A)("change",e=>{e.preventDefault();const t=J(ce,e.target.files),n=T(t)||ee(e.target.files);if(n)return null==p?void 0:p(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Z(t);return E.current&&null!=r&&r.files.length&&(E.current.files=r.files),se(e),!0},E.current),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(B,{children:[(0,y.jsxs)(H,{"aria-describedby":f||s,ref:e=>{re.current=e,le(void 0)},$hasError:(null==oe?void 0:oe[s])&&"required"!==(null==oe||null===(t=oe[s])||void 0===t?void 0:t.type),$isOver:de,htmlFor:f||s,children:[(null===(n=oe||ae)||void 0===n||null===(r=n[s])||void 0===r?void 0:r.message)&&(0,y.jsxs)(Y,{children:[(0,y.jsx)(O.Fc,{width:18,height:18}),(0,y.jsx)(K,{children:null===(a=(oe||ae)[s])||void 0===a?void 0:a.message})]}),(0,y.jsx)(U,{children:Q(l)}),(0,y.jsx)(V,{multiple:!0,accept:k,name:s,type:"file",id:f||s,...(0,v.NR)(A),...ne&&{...ne},ref:e=>{E.current=e,te&&te(e)},"aria-errormessage":`error_${s}`,"aria-invalid":!(0,b.A)(oe)&&ie,"aria-hidden":"true",...C})]}),(0,y.jsxs)(G,{children:[(0,F.A)(S.file_limitation,_),(0,y.jsx)(P.A,{text:(0,y.jsxs)(q,{children:[(0,y.jsxs)("div",{children:[(0,F.A)(S.file_maximum_size,_),": ",(0,D.B$)(D.W7*D.aO)]}),(0,y.jsxs)("div",{children:[(0,F.A)(S.file_supported_types,_),": ",k]})]}),position:"top",children:(0,y.jsx)(L.A,{width:18,height:18})})]})]}),(0,y.jsx)(g.A,{control:d,name:s}),ce.map((e,t)=>(0,y.jsx)(X.A,{file:e,onRemove:()=>{const e=[...ce];e.splice(t,1),ue(e),null==x||x(s,e.length?e:void 0,{shouldValidate:!0})}},`${e.name}-${e.size}}`))]})};var te=n(1226)},3574:(e,t,n)=>{"use strict";var r=n(6100),o=n(814);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},3578:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},3592:(e,t,n)=>{"use strict";var r=n(5297);e.exports=r},3649:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9749),o=n.n(r),i=n(5134),a=n(8418),s=n(9602);function l(){var e;const{currentLanguage:t}=(0,i.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:n,hasRequestedHandoverAtLeastOnce:r}=(0,i.GV)(e=>{let{agent:t}=e;return t}),{feedbackToSubmit:l,feedbacksAlreadyDisplayed:c}=(0,i.GV)(a.CJ),{botConversationFeedback:u,handoverConversationFeedback:d}=(0,s.A)(t),f=null===(e=null==u?void 0:u.allow_bot_feedback_after_handover_feedback)||void 0===e||e,p=u&&!o()(c).call(c,"bot_conversation")&&(!r||f);return{feedbackToDisplay:d&&n?d:p?u:null,feedbackToSubmit:l}}},3671:(e,t,n)=>{"use strict";var r=n(701),o=n(2769),i=n(2137),a=n(4275),s=n(2871),l=a("IE_PROTO"),c=Object,u=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=i(e);if(r(t,l))return t[l];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?u:null}},3678:(e,t,n)=>{"use strict";var r=n(1003),o=n(6100),i=r("Symbol"),a=i.keyFor,s=o(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==a(s(e))}catch(e){return!1}}},3753:(e,t,n)=>{"use strict";var r=n(4871),o=n(8900),i=n(7525),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.46.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},3773:(e,t,n)=>{"use strict";var r=n(908),o=n(3521),i=n(262),a=n(8655)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===s||r(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},3821:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r,n:()=>o});const r="ANNOUNCEMENT_SHOW",o="ANNOUNCEMENT_HIDE"},3832:(e,t,n)=>{"use strict";var r=n(5571).charAt,o=n(1139),i=n(8417),a=n(164),s=n(877),l="String Iterator",c=i.set,u=i.getterFor(l);a(String,"String",function(e){c(this,{type:l,string:o(e),index:0})},function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?s(void 0,!0):(e=r(n,o),t.index+=e.length,s(e,!1))})},3844:(e,t,n)=>{"use strict";e.exports=n(5994)},3855:(e,t,n)=>{"use strict";var r=n(9098),o=n(6100),i=n(5947),a=n(5426),s=n(1139),l=n(4240),c=o("".indexOf);r({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},3860:(e,t,n)=>{"use strict";n(4531)("matcher")},3906:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(209);function o(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[n,o]=e;return[n,"string"==typeof o?o:(0,r.A)(o,t)]}))}},3949:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>v});var o=n(9155),i=n.n(o),a=o.useLayoutEffect,s=function(e,t){"function"!=typeof e?e.current=t:e(t)},l={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},c=function(e){Object.keys(l).forEach(function(t){e.style.setProperty(t,l[t],"important")})},u=null,d=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize},f=function(){},p=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],h=!!document.documentElement.currentStyle;function g(e,t,n){var r,s,l=(r=n,s=i().useRef(r),a(function(){s.current=r}),s);o.useLayoutEffect(function(){var n=function(e){return l.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var m=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b=function(e,t){var n,a=e.cacheMeasurements,l=e.maxRows,b=e.minRows,v=e.onChange,y=void 0===v?f:v,x=e.onHeightChange,w=void 0===x?f:x,k=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,m),C=void 0!==k.value,S=o.useRef(null),_=function(e,t){var n=i().useRef();return i().useCallback(function(r){e.current=r,n.current&&s(n.current,null),n.current=t,t&&s(t,r)},[t])}(S,t),A=o.useRef(0),E=o.useRef(),T=function(){var e=S.current,t=a&&E.current?E.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,p.reduce(function(e,t){return e[t]=n[t],e},{})),o=r.boxSizing;return""===o?null:(h&&"border-box"===o&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){E.current=t;var n=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),u||((u=document.createElement("textarea")).setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),c(u)),null===u.parentNode&&document.body.appendChild(u);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(e){var t=e;u.style[t]=a[t]}),c(u),u.value=t;var l=d(u,e);u.value=t,l=d(u,e),u.value="x";var f=u.scrollHeight-o,p=f*n;"border-box"===s&&(p=p+o+i),l=Math.max(p,l);var h=f*r;return"border-box"===s&&(h=h+o+i),[l=Math.min(h,l),f]}(t,e.value||e.placeholder||"x",b,l),r=n[0],o=n[1];A.current!==r&&(A.current=r,e.style.setProperty("height",r+"px","important"),w(r,{rowHeight:o}))}};return o.useLayoutEffect(T),function(e,t){g(document.body,"reset",function(n){e.current.form===n.target&&t()})}(S,function(){if(!C){var e=S.current.value;requestAnimationFrame(function(){var t=S.current;t&&e!==t.value&&T()})}}),g(window,"resize",T),n=T,g(document.fonts,"loadingdone",n),o.createElement("textarea",r({},k,{onChange:function(e){C||T(),y(e)},ref:_}))},v=o.forwardRef(b)},3999:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},4047:(e,t,n)=>{"use strict";var r=n(9155),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,a=n)}var i,a,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var p=i(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},4079:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ke});var r=n(9155),o=n(541),i=n(1197);const a=i.Ay.div.withConfig({componentId:"sc-104frbp-0"})(["display:block;top:-100vh;left:-100vw;height:200vh;width:200vw;position:fixed;cursor:pointer;transition:all ease 1200ms;background:",";opacity:",";z-index:",";"],e=>{let{$backdrop:t}=e;return t.color||"#000"},e=>{let{$backdrop:t}=e;return t.opacity||.5},e=>{let{$backdrop:t}=e;return t.zIndex||-1});var s=n(1085);function l(e){let{backdrop:t,onClick:n}=e;return(0,s.jsx)(a,{onClick:n,$backdrop:t})}var c=n(5352),u=n(1304),d=n(8278),f=n(6739),p=n(3906),h=n(3243);function g(e){let{slug:t}=e;const[n,o]=(0,r.useState)({}),[i,a]=(0,r.useState)(!0),s=(0,h.A)(),{currentLanguageCode:l}=(0,f.A)();return(0,r.useEffect)(()=>{let e={};const n=s.find(e=>e.slug===t);var r;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=(0,p.A)(t,l);e[t.slug]=n.value}):e=(0,p.A)(n,l),a(Boolean(null==n||null===(r=n.text_blocks)||void 0===r?void 0:r.length)),o(e))},[s,l,t]),{textContent:n,hasTextContent:i}}const m=function(){const e=window.kindlyChat.APIRoot,t=(0,r.useRef)(e),{content:n,slug:i,onRendered:a}=(0,o.d4)(d.G0),{currentLanguageCode:s}=(0,f.A)(),{textContent:l,hasTextContent:c}=g({slug:i});return(0,r.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof n?n(l):n;if(c&&0===Object.keys(l).length)return;const r=document.createElement("div");r.innerHTML=e,t.current.appendChild(r),r.setAttribute("id","kindly-custom-nudge"),"function"==typeof a&&a(r)},[n,s,i,l,a,c]),null};var b=n(1949),v=n.n(b),y=n(1308);const x=i.Ay.div.withConfig({componentId:"sc-28ma63-0"})(["margin:24px;display:flex;flex-direction:column;"]);function w(e){let{html:t,slug:n}=e;const{textContent:r}=g({slug:n});return(0,s.jsx)(x,{children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}})})}var k=n(9338);const C=i.Ay.div.withConfig({componentId:"sc-1y03ray-0"})(["margin:24px;display:flex;flex-direction:column;"]),S=i.Ay.h2.withConfig({componentId:"sc-1y03ray-1"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:0 0 16px 0;"]),_=i.Ay.p.withConfig({componentId:"sc-1y03ray-2"})(["line-height:22px;margin:0px;"]),A=i.Ay.a.withConfig({componentId:"sc-1y03ray-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var E=n(7559),T=n(776);function j(e){let{buttons:t,slug:n}=e;const i=(0,o.wA)(),a=t.length>0,l=(0,r.useCallback)(()=>{i((0,T.vJ)({slug:n,eventType:E.MO}))},[i,n]);return a?(0,s.jsx)(C,{children:t.map((e,t)=>(0,s.jsx)(k.A,{button:e,isNudge:!0,onClick:l},`${e.value}-${t}`))}):null}function I(e){let{title:t,description:n,link:i,slug:a}=e;const l=(0,o.wA)(),c=(0,r.useCallback)(e=>{e.preventDefault(),l((0,T.vJ)({slug:a,eventType:E.MO})),window.location.href=e.target.getAttribute("href")},[a]);return(0,s.jsxs)(C,{children:[t&&(0,s.jsx)(S,{children:t}),n&&(0,s.jsx)(_,{children:n}),(null==i?void 0:i.location)&&(null==i?void 0:i.text)&&(0,s.jsx)(A,{href:i.location,onClick:c,children:i.text})]})}var O=n(8787);const L=i.Ay.div.withConfig({componentId:"sc-cguh8u-0"})(["margin:24px;display:flex;flex-direction:column;"]),P=i.Ay.div.withConfig({componentId:"sc-cguh8u-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=i.Ay.div.withConfig({componentId:"sc-cguh8u-2"})(["display:flex;flex-direction:column;"]),M=i.Ay.label.withConfig({componentId:"sc-cguh8u-3"})(["font-size:var(--_kindlychat-font-size-m);line-height:19px;margin-left:8px;margin-bottom:8px;"]),z=i.Ay.input.withConfig({componentId:"sc-cguh8u-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:var(--_kindlychat-font-size-p);background:rgba(0,0,0,0.08);background-color:rgba(0,0,0,0.08);&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],O.sF),R=i.Ay.button.withConfig({componentId:"sc-cguh8u-5"})(["cursor:pointer;box-shadow:none;height:44px;width:44px;padding:0;display:flex;align-items:center;justify-content:center;border:none;border-radius:100px;background:",";background-color:",";transition:opacity 0.1s ease-in;"," &:hover{opacity:0.8;}svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:",";}}"],e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,O.sF,e=>e.theme.buttonText);function $(e){let{buttonContent:t}=e;return(0,s.jsx)(R,{role:"button",title:t.title,type:"submit",children:(0,s.jsx)(y.qx,{width:24,height:24})})}function D(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:i,placeholder:a,required:l}=r;return(0,s.jsxs)(N,{children:[(0,s.jsx)(M,{children:o}),(0,s.jsx)(z,{"aria-label":a,name:o,placeholder:a,type:i||"text",value:t,onChange:e=>n(e.target.value),required:l})]})}var F=n(8833);function B(e){let{form:t,onNewsletterSubmit:n,slug:i}=e;const a=(0,o.wA)(),{dialogue:l,webhook:c}=(0,o.d4)(d.G0),{primaryLanguageCode:p,currentLanguageCode:h}=(0,f.A)(),[g,m]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),{success:y}=t;return(0,s.jsx)(L,{children:b&&y?(0,s.jsx)(_,{children:y}):(0,s.jsx)("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),m(""),!g.trim())return!1;if(l&&a((0,u.zh)(l,{openChat:!0,languageCode:h||p})),c){const t={event:e,email:g};a((0,F.et)(c,{method:"POST",body:t}))}if("function"==typeof n)try{n(e,g)}catch(e){console.error(e)}return a((0,u.vJ)({slug:i,eventType:E.MO})),v(!0)},children:(0,s.jsxs)(P,{children:[(0,s.jsx)(D,{value:g,setValue:m,inputContent:t.input}),(0,s.jsx)($,{buttonContent:t.button})]})})})}const H=i.Ay.div.withConfig({componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=i.Ay.div.withConfig({componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var V=n(5758);function W(e){let{choices:t,slug:n}=e;const r=(0,o.wA)(),{primaryLanguageCode:i,currentLanguageCode:a}=(0,f.A)(),{buttons:l}=t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(U,{}),(0,s.jsx)(H,{children:l.map(e=>{let{text:t,triggerDialogue:o}=e;return(0,s.jsx)(V.A,{text:t,onClick:()=>{return e=o,r((0,u.zh)(e,{openChat:!0,languageCode:a||i})),void r((0,T.vJ)({slug:n,eventType:E.MO,label:e}));var e}},`${t}-${o}`)})})]})}var G=n(166);v().shape({id:v().string.isRequired,title:v().string,description:v().string,image:v().string.isRequired,price:v().string});var q=n(1708),K=n(4785);const Y=i.Ay.a.withConfig({componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),X=i.Ay.div.withConfig({componentId:"sc-20xwq1-1"})(["display:flex;padding:2px;flex-direction:column;align-items:flex-start;overflow:hidden;"," @media ","{margin-right:16px;margin-bottom:3px;box-shadow:0px 1px 3px 0px ",";border-radius:8px;overflow:hidden;max-width:201px;&:first-child{margin-left:24px;}}"],O.sF,q.jO.maxPhone,q.Tj.shadowColor),Q=i.Ay.img.withConfig({componentId:"sc-20xwq1-2"})(["width:155px;height:155px;object-fit:cover;border-radius:8px;margin-bottom:8px;@media ","{width:201px;height:201px;border-radius:0;margin-bottom:0;}"],q.jO.maxPhone),Z=i.Ay.div.withConfig({componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.jO.maxPhone),J=(0,i.AH)(["font-size:var(--_kindlychat-font-size-p);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),ee=i.Ay.a.withConfig({componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;"],J),te=i.Ay.button.withConfig({componentId:"sc-20xwq1-5"})([""," padding:6px 0;border:none;cursor:pointer;margin-top:8px;width:100%;display:flex;align-items:center;justify-content:center;border-radius:100px;color:",";background:",";background-color:",";font-family:",";"],J,e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,K.m.default),ne=i.Ay.h3.withConfig({componentId:"sc-20xwq1-6"})([""," font-weight:500;"],J),re=i.Ay.p.withConfig({componentId:"sc-20xwq1-7"})([""," font-weight:400;"],J),oe=i.Ay.div.withConfig({componentId:"sc-20xwq1-8"})([""," font-weight:500;"],J);function ie(e){let{to:t,text:n,onClick:r}=e;return t?(0,s.jsx)(ee,{onClick:r,href:t,children:n}):(0,s.jsx)(te,{onClick:r,children:n})}const ae=function(e){var t,n,r,o,i,a;let{product:l,onProductClick:c}=e;const u=null!==(t=null==l?void 0:l.image)&&void 0!==t&&t,d=null!==(n=null==l?void 0:l.title)&&void 0!==n&&n,f=null!==(r=null==l?void 0:l.productUrl)&&void 0!==r&&r,p=null!==(o=null==l?void 0:l.description)&&void 0!==o&&o,h=(null==l?void 0:l.price)||!1,g=null!==(i=null==l?void 0:l.linkText)&&void 0!==i&&i,m=null!==(a=null==l?void 0:l.linkUrl)&&void 0!==a&&a;return(0,s.jsxs)(X,{children:[(0,s.jsxs)(Y,{href:f,children:[u&&(0,s.jsx)(Q,{src:u,alt:d}),(0,s.jsxs)(Z,{children:[d&&(0,s.jsx)(ne,{children:d}),p&&(0,s.jsx)(re,{children:p}),h&&(0,s.jsx)(oe,{children:h})]})]}),g&&(0,s.jsx)(ie,{to:m,text:g,onClick:e=>{if("function"==typeof c)try{c(e,l)}catch(e){console.error(e)}}})]})},se=i.Ay.div.withConfig({componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.jO.maxPhone),le=i.Ay.div.withConfig({componentId:"sc-vfg4fr-1"})(["position:relative;overflow:hidden;> div{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;grid-gap:14px;transform:translate(0);",";}"],e=>e.active&&"\n position: relative;\n width: 1000%;\n display: flex;\n grid-gap: 0px;\n "),ce=i.Ay.h2.withConfig({componentId:"sc-vfg4fr-2"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.jO.maxPhone);var ue=n(5516);const de=function(e){var t,n;let{section:o,onProductClick:i}=e;const{width:a}=(()=>{const[e,t]=(0,r.useState)({width:void 0,height:void 0});return(0,r.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),l=parseInt(q.mb.phone.replace("px",""),10),c=null!==(t=null==o?void 0:o.items)&&void 0!==t?t:[],u=null!==(n=null==o?void 0:o.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:o=!0}=e;const[i,a]=(0,r.useState)(0),[s,l]=(0,r.useState)(0);return(0,r.useEffect)(()=>{t>=n&&o&&l(0)},[t,n,s,o]),{setIndex:(0,r.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;a(e),l(o)},[t,n]),imageIndex:i,carouselPosition:s}})({windowWidth:a,phoneWidth:l}),{handleTouchStart:h,handleTouchMove:g,handleTouchEnd:m}=(0,G.A)({carousel:c,index:f,setIndex:d});return(0,s.jsxs)(se,{children:[u&&(0,s.jsx)(ce,{children:u}),(0,s.jsx)(le,{active:a<l,children:(0,s.jsx)(ue.A,{carouselPosition:p,onTouchStart:h,onTouchMove:g,onTouchEnd:m,children:c.map(e=>(0,s.jsx)(ae,{product:e,onProductClick:i},e.id))})})]})},fe=e=>e||{location:"",text:""};function pe(e){var t,n;let{section:r,slug:i,onProductClick:a,onNewsletterSubmit:l}=e;const c=(0,o.wA)(),u=null!==(t=null==r?void 0:r.title)&&void 0!==t?t:"",d=null!==(n=null==r?void 0:r.description)&&void 0!==n?n:"",f=null==r?void 0:r.buttons,p=null==r?void 0:r.products,h=null==r?void 0:r.choices,g=null==r?void 0:r.form,m=null==r?void 0:r.link,b=null==r?void 0:r.html;return(0,s.jsxs)(s.Fragment,{children:[(u||d||m)&&(0,s.jsx)(I,{title:u,description:d,link:fe(m),slug:i}),f&&(0,s.jsx)(j,{buttons:f,slug:i}),h&&(0,s.jsx)(W,{choices:h,slug:i}),p&&(0,s.jsx)(de,{section:p,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?c((0,T.vJ)({slug:i,eventType:E.MO,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof a)try{a(e,t)}catch(e){console.error(e)}}}),g&&(0,s.jsx)(B,{form:g,onNewsletterSubmit:l,slug:i}),b&&(0,s.jsx)(w,{html:b,slug:i})]})}function he(e){var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:i}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>(0,s.jsx)(pe,{section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:i},`section-${t}`))}var ge=n(5394),me=n(8832);const be=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-0"})(["right:20px;bottom:",";z-index:10;position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";pointer-events:auto;",";",";@media ","{",";z-index:16;box-shadow:0 -3px 15px 1px ",";}"],e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"},q.Tj.shadowColor,ge.JP,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},q.jO.maxPhone,e=>{let{modal:t}=e;return!t&&"\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 14px 14px 0 0;"},q.Tj.shadowColor),ve=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-1"})(["position:relative;padding:0px;max-width:380px;width:100%;max-height:calc(100vh - 150px);overflow-y:auto;",";@media ","{min-width:380px;}@media ","{min-width:100%;}"],e=>{let{modal:t}=e;return t&&"box-sizing: border-box"},q.jO.minTablet,q.jO.maxPhone),ye=(0,i.Ay)(me.$n).withConfig({componentId:"sc-1k0o2t4-2"})(["top:8px;right:8px;z-index:15;display:flex;padding:0;border-radius:100px;position:absolute;&:hover{opacity:0.8;}svg path{stroke:black;}@media ","{",";}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"top: 2px; right: 0;":"top: 8px; right: 8px;"}),xe=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-3"})(["position:absolute;background:#fff;width:100%;height:100%;left:0;right:0;top:0;bottom:0;border-radius:14px;@media ","{border-radius:",";}&:before{content:'';width:50px;height:calc(100% - 8px);background:",";position:absolute;z-index:-1;top:4px;left:-4px;border-radius:25px;@media ","{width:calc(100% - 8px);height:50px;top:-4px;left:4px;}}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"14px":"14px 14px 0 0"},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},q.jO.maxPhone),we=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:i,onProductClick:a,onNewsletterSubmit:l}=e;return(0,s.jsxs)(be,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-testid":"nudge-container","data-cy":"nudge-container","data-story":"NudgeContainer",children:[(0,s.jsx)(xe,{}),(0,s.jsx)(ye,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:i,type:"button","data-testid":"close-nudge-button","data-cy":"close-nudge-button",children:(0,s.jsx)(y.US,{width:25,height:25})}),(0,s.jsx)(ve,{children:(0,s.jsx)(he,{layout:o,slug:r,onProductClick:a,onNewsletterSubmit:l})})]})};function ke(e){var t;let{hidden:n,layout:r,onDismiss:i,onProductClick:a,onNewsletterSubmit:f}=e;const{show:p,nudgeType:h,slug:g}=(0,o.d4)(d.G0),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,v=(0,o.wA)(),y=e=>{if(e.stopPropagation(),v((0,u.Y_)()),"function"==typeof i)try{i(e)}catch(e){console.error(e)}};return(0,s.jsxs)(s.Fragment,{children:[b&&(0,s.jsx)(l,{backdrop:b,onClick:y}),h===c.MK.TEMPLATE&&(0,s.jsx)(we,{show:p,layout:r,slug:g,onDismiss:y,onProductClick:a,onNewsletterSubmit:f,bubbleHidden:n}),h===c.MK.CUSTOM&&(0,s.jsx)(m,{})]})}},4097:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var r=n(9155),o=n(541),i=n(1304),a=n(1308),s=n(5758),l=n(5134),c=n(1197),u=n(1708);const d=(0,c.AH)(["border-radius:100px;background-color:",";"],u.Tj.grayColor),f=c.Ay.div.withConfig({componentId:"sc-769ymc-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),p=c.Ay.div.withConfig({componentId:"sc-769ymc-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],u.Tj.shadowColor),h=c.Ay.div.withConfig({componentId:"sc-769ymc-2"})(["height:20px;width:110px;margin-left:20px;",""],d),g=c.Ay.div.withConfig({componentId:"sc-769ymc-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),m=c.Ay.span.withConfig({componentId:"sc-769ymc-4"})(["font-size:var(--_kindlychat-font-size-p);margin:16px 0 24px 0;",";"],e=>e.$heading&&"font-size: var(--_kindlychat-font-size-h4); font-weight: 400;\n margin: 0"),b=c.Ay.div.withConfig({componentId:"sc-769ymc-5"})(["height:","px;min-width:","px;",""],e=>e.$size,e=>e.$size,d),v=c.Ay.div.withConfig({componentId:"sc-769ymc-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],u.Tj.grayColor),y=c.Ay.div.withConfig({componentId:"sc-769ymc-7"})(["height:40px;width:100%;margin-right:20px;",""],d);var x=n(850),w=n(1085);const k=function(){const e=(0,l.jL)(),t=(0,r.useCallback)(()=>{e((0,i.ky)())},[e]);return(0,w.jsxs)(f,{children:[(0,w.jsxs)(p,{children:[(0,w.jsx)(b,{$size:30}),(0,w.jsx)(h,{}),(0,w.jsx)(x.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-testid":"close-chat-button",children:(0,w.jsx)(a.US,{width:25,height:25})})]}),(0,w.jsxs)(g,{children:[(0,w.jsx)(m,{$heading:!0,children:"Oh no..."}),(0,w.jsx)(m,{children:"We were unable to load the chat. Please refresh or try again later."}),(0,w.jsx)(s.A,{onClick:t,children:"Refresh chat"})]}),(0,w.jsxs)(v,{children:[(0,w.jsx)(y,{}),(0,w.jsx)(b,{$size:40})]})]})};class C extends r.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return e?{hasError:!0}:{}}componentDidCatch(e,t){var n;const{dispatch:r,errorPoint:o}=this.props,a=`Component tree crashed ${o}: ${e.message}`,s={errorName:e.name,errorMessage:e.message,errorStack:e.stack,point:o,componentStack:null==t||null===(n=t.componentStack)||void 0===n?void 0:n.trim()};r((0,i.Rm)({message:a,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?(0,w.jsx)(k,{}):e?null:t}}const S=(0,o.Ng)()(C)},4119:(e,t,n)=>{"use strict";n(4531)("species")},4174:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(7551),o=n.n(r),i=n(9749),a=n.n(i),s=n(5352),l=n(1080),c=n(9990),u=n(9982),d=n(3115),f=n(8094),p=n(6122),h=n(6885),g=n(8833);const m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n.replace(/_\w/g,e=>e[1].toUpperCase())]:r}},{})},b=e=>{let{status:t}=e;return t!==s.Le.PROCESSING},v=()=>async(e,t)=>{const{agent:{takenOver:n,requestedHandoverAt:r,handoverWaitTimeEstimate:o,handoverQueuePosition:i},chatbubble:{startedAt:a,chatHasStarted:v},connection:{token:y},environment:{PAT_HOST:x},messages:{attachments:w,buttonClicks:k,chatMessages:C,messageSentTime:S}}=t();if(!y||!v)return;const[_]=C.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[A]=w.filter(b).slice(-1),E=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=_?_:{},null!=A?A:{})||S||a;if(!E)throw new Error("No timestamp found for latest messages");const T=await e((0,g.et)(`${x}/chatbubble/${s.Ak}/latest?timestamp=${E}`,{method:"GET",...(0,c.A)({token:y})},{onError:t=>{var n;403===(null===(n=t.response)||void 0===n?void 0:n.status)?(console.warn(`/chatbubble/${s.Ak}/latest returned 403, starting new chat`),e({type:p.MO,error:403}),N.getInstance().getConnection().restart(!0)):console.error(t)}}));if(!T||!T.data)return;const{chatMessages:j,buttonClicks:I=[],takenOver:O,requestedHandoverAt:L,attachments:P,externalHandoverState:M,handoverWaitTimeEstimate:z,handoverQueuePosition:R}=T.data;if(!Array.isArray(j))return;const $=(0,d.A)(C),D=(0,l.A)(k),F=j.filter($),B=I.map(m).filter(D);var H,U;return e((e=>async(t,n)=>{if((null==e?void 0:e.length)>0)return;const{attachments:r=[]}=n().messages,{newAttachments:o=[],updated:i=[]}=(0,u.A)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>{let{sender:t,status:n}=e;return t===s.bS.USER||n===s.Le.CLEAN})}(e),e=>r.find((e=>{let{id:t,temporaryId:n}=e;return e=>{let{id:r,temporaryId:o}=e;return t&&t===r||n&&n===o}})(e))?"updated":"newAttachments");o.length>0&&t({type:f.Os,data:{attachments:o}}),i.length>0&&t({type:f.tS,data:{attachments:i}})})(P)),n!==O&&e({type:h.II,data:{taken_over:O,supports_attachment:null==M?void 0:M.supports_attachment,requested_handover_at:L}}),r!==L&&e({type:h.nz,data:{requested_handover_at:L,handover_wait_time_estimate:z,handover_queue_position:R}}),o===z&&i===R||e({type:h.AQ,data:{handover_wait_time_estimate:z,handover_queue_position:R}}),(H=F,U="created",(H||[]).slice().sort((e,t)=>e[U]<t[U]?-1:1)).forEach(t=>{e({type:f.tq,data:t})}),B.forEach(t=>e({type:f.Y6,buttonClick:t})),T.data};var y=n(46),x=n(1304),w=n(339),k=n(4390);let C=function(e){return e[e.CONNECTED=0]="CONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.DISCONNECTED=2]="DISCONNECTED",e}({});class S extends y.EventEmitter{constructor(e){super(),o()(this,"store",null),o()(this,"dispatch",null),o()(this,"unsubscribeStore",()=>{}),o()(this,"state",C.DISCONNECTED),o()(this,"previousUserIsIdle",null),o()(this,"providerName",void 0),this.store=e;const{dispatch:t}=e;this.dispatch=t,this.storeSubscribe()}getConnectionState(){return this.state}setState(e){var t;this.state!==e&&(this.state=e,e===C.CONNECTED&&(null===(t=this.dispatch)||void 0===t||t.call(this,v())))}async handleIdleState(e){this.previousUserIsIdle!==e&&(this.emit("idle-state-changed",e),this.previousUserIsIdle=e),e&&this.state===C.CONNECTED&&this.destroy()}async handleStoreSubscribe(){const e=this.getState();if(!e)return;const{chatbubble:{chatHasStarted:t,userIsIdle:n},messages:{messageSentTime:r,chatMessages:o},bot:{persistStateLifespan:i},connection:{token:a}}=e,s=function(e){let{chatHasStarted:t,token:n,chatMessages:r,messageSentTime:o,persistStateLifespan:i}=e;return!(!(t&&n&&r&&r.length>0)||o)||function(e){let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!1;if(0===n)return!0;const e=new Date(t);return new Date(e.getTime()+1e3*n)<new Date}return!1}({messageSentTime:o,persistStateLifespan:i})}({chatHasStarted:t,token:a,chatMessages:o,messageSentTime:r,persistStateLifespan:i}),l=t&&a&&this.state!==C.CONNECTED&&this.state!==C.CONNECTING&&!n;await this.handleIdleState(n),s?this.endChat():l&&await this.connect()}async storeSubscribe(){var e;await this.handleStoreSubscribe(),this.unsubscribeStore=null===(e=this.store)||void 0===e?void 0:e.subscribe(this.handleStoreSubscribe.bind(this))}getState(){const{getState:e}=this.store||{};return!!e&&e()}getToken(){const e=this.getState();if(!e)return!1;const{connection:t}=e;return t.token}async connect(){let{shouldGreet:e,triggerConfig:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!window.navigator.onLine||this.state===C.CONNECTING||this.state===C.CONNECTED)return;this.setState(C.CONNECTING);const n=this.getState();if(!n)return;const{connection:{token:r},chatbubble:{chatHasStarted:o,userIsIdle:i}}=n;i||(r||await this.connectToBackend(t||{shouldGreet:e||o}),await this.connectToServer())}destroy(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;this.state!==C.DISCONNECTED&&(this.disconnect(),e&&(null===(t=this.unsubscribeStore)||void 0===t||t.call(this)),this.previousUserIsIdle=null,this.setState(C.DISCONNECTED))}async connectToBackend(e){try{var t;await(null===(t=this.dispatch)||void 0===t?void 0:t.call(this,(0,k.m)(e)))}catch(e){console.error("Failed to connect to backend:",e)}}endChat(){var e;const{chatbubble:t}=this.getState()||{},{botKey:n}=t||{};null===(e=this.dispatch)||void 0===e||e.call(this,(0,g.zX)(n)),this.destroy(!0)}async restart(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===C.CONNECTED||e){const r=this.getState(),{botKey:o,active:i}=(null==r?void 0:r.chatbubble)||{};var t,n;if(o&&await(null===(t=this.dispatch)||void 0===t?void 0:t.call(this,(0,g.zX)(o,e))),this.destroy(!1),e)i||null===(n=this.dispatch)||void 0===n||n.call(this,(0,x.lQ)()),await this.connect()}else console.warn(`Cannot restart connection: connection state ${C[this.state]}`)}async connectToServer(){var e,t;this.getToken()&&(await(null===(e=this.dispatch)||void 0===e?void 0:e.call(this,(0,w.JL)())),await(null===(t=this.dispatch)||void 0===t?void 0:t.call(this,(0,w.Mx)())),this.connectToProvider())}emitError(e){this.emit("error",e)}emitSuccess(){this.emit("connected")}}class _{constructor(){o()(this,"providers",new Map)}register(e,t){this.providers.set(e,t)}createProvider(e,t){const n=this.providers.get(e);if(!n)throw new Error(`Unknown provider type: ${e}. Available providers: ${this.getSupportedProviders().join(", ")}`);return n(t)}getSupportedProviders(){return Array.from(this.providers.keys())}hasProvider(e){return this.providers.has(e)}}var A=n(4953),E=n.n(A),T=n(4497);class j extends S{constructor(e){super(e),o()(this,"providerName","PusherRedux"),o()(this,"config",void 0),o()(this,"pendingFunctions",void 0),o()(this,"pusherLocalStorageKey","pusherTransportEncrypted"),o()(this,"boundPusherConnected",void 0),o()(this,"boundPusherConnecting",void 0),o()(this,"boundPusherDisconnected",void 0),o()(this,"boundPusherUnavailable",void 0),o()(this,"boundPusherFailed",void 0),o()(this,"boundPusherError",void 0),o()(this,"subscribePusherChannels",()=>{if(!this.store)return void this.emitError(new Error("Pusher store is not initialized"));const e=this.getToken();e?(this.config.channelName=`private-chatbubble-${e}`,Object.entries(T.u_).forEach(e=>{let[t,n]=e;this.subscribe(this.config.channelName,t,n)})):this.emitError(new Error("Pusher token is not initialized"))}),this.config={socket:null,options:null,subscriptions:{},channelName:""},this.pendingFunctions=[],this.boundPusherConnected=this.pusherConnected.bind(this),this.boundPusherConnecting=this.pusherConnecting.bind(this),this.boundPusherDisconnected=this.pusherDisconnected.bind(this),this.boundPusherUnavailable=this.pusherUnavailable.bind(this),this.boundPusherFailed=this.pusherFailed.bind(this),this.boundPusherError=this.pusherError.bind(this)}static getInstance(e){if(!j.pusherInstance){if(!e)throw new Error("Store is required to create a new connection");j.pusherInstance=new j(e)}return j.pusherInstance}connectToProvider(){try{const e=this.getState();if(!e)throw new Error("State is not initialized");const{bot:{disabledTransports:t},connection:{token:n},environment:{VERSION:r,PAT_HOST:o}}=e,i=JSON.parse(window.localStorage.getItem(this.pusherLocalStorageKey)||"{}");t.indexOf("ws")<0&&i&&"ws"!==i.transport&&window.localStorage.removeItem(this.pusherLocalStorageKey),this.initialisePusher({channelAuthorization:{transport:"ajax",endpoint:`${o}/chatbubble/${s.Ak}/auth/pusher`,headers:{"kindly-chatbubble-token":n,"Current-Url":window.location.href,"kindly-chat-version":r}},cluster:"eu",disableStats:!0,pongTimeout:7500,disabledTransports:t}),this.subscribePusherChannels()}catch(e){this.emitError(e)}}pusherAction(e){const t={type:e.actionType};return e.channelName&&(t.channel=e.channelName),e.eventName&&(t.event=e.eventName),e.data&&(t.data=e.data),e.additionalParams&&(t.additionalParams=e.additionalParams),t}runPending(){for(;this.state===C.CONNECTED&&this.pendingFunctions.length>0;){const e=this.pendingFunctions.shift();e&&e()}}addToQueue(e){this.pendingFunctions.push(e)}pusherConnected(){this.setState(C.CONNECTED),this.runPending(),this.emitSuccess()}pusherConnecting(){this.setState(C.CONNECTING)}pusherDisconnected(){this.setState(C.DISCONNECTED)}pusherUnavailable(){this.setState(C.DISCONNECTED)}pusherFailed(){this.setState(C.DISCONNECTED),this.emitError(new Error("Pusher connection failed. Channel not supported."))}pusherError(e){this.setState(C.DISCONNECTED),this.emitError(e)}bindToPusherConnectionEvents(){this.config.socket?(this.config.socket.connection.bind("connected",this.boundPusherConnected),this.config.socket.connection.bind("connecting",this.boundPusherConnecting),this.config.socket.connection.bind("disconnected",this.boundPusherDisconnected),this.config.socket.connection.bind("unavailable",this.boundPusherUnavailable),this.config.socket.connection.bind("failed",this.boundPusherFailed),this.config.socket.connection.bind("error",this.boundPusherError)):this.emitError(new Error("Pusher socket is not initialized"))}unbindFromPusherConnectionEvents(){this.config.socket&&(this.config.socket.connection.unbind("connected",this.boundPusherConnected),this.config.socket.connection.unbind("connecting",this.boundPusherConnecting),this.config.socket.connection.unbind("disconnected",this.boundPusherDisconnected),this.config.socket.connection.unbind("unavailable",this.boundPusherUnavailable),this.config.socket.connection.unbind("failed",this.boundPusherFailed),this.config.socket.connection.unbind("error",this.boundPusherError))}initialisePusher(e){var t;const n=null===(t=this.getState().environment)||void 0===t?void 0:t.PUSHER_KEY;n?(this.config.socket=new(E())(n,e),this.config.socket.connection.bind("error",e=>{const t=(null==e?void 0:e.message)||"Unknown connection error";this.emitError(new Error(`Pusher connection error: ${t}`))}),this.bindToPusherConnectionEvents()):this.emitError(new Error("Pusher API key is not initialized"))}subscribe(e,t,n,r){this.addToQueue(()=>{try{var o;if("connected"===(null===(o=this.config.socket)||void 0===o?void 0:o.connection.state)){const o=this.config.socket.channel(e)||this.config.socket.subscribe(e);if(o.bind("pusher:subscription_error",t=>{const n=(null==t?void 0:t.message)||"Unknown subscription error";this.emitError(new Error(`Pusher subscription error for channel ${e}: ${n}`))}),this.config.subscriptions[e]||(this.config.subscriptions[e]={}),this.config.subscriptions[e][t]||(this.config.subscriptions[e][t]={}),!this.config.subscriptions[e][t][n]){const i=o=>{var i;null===(i=this.dispatch)||void 0===i||i.call(this,this.pusherAction({actionType:n,channelName:e,eventName:t,data:o,additionalParams:r}))};this.config.subscriptions[e][t][n]=i,o.bind(t,i)}}}catch(n){throw new Error(`Failed to subscribe to Pusher channel ${e} and event ${t}`)}})}unsubscribe(e,t,n){this.addToQueue(()=>{try{if(this.config.socket){const r=this.config.socket.channel(e);if(!r)return void console.error(`Not subscribed to '${e}'`);const o=this.config.subscriptions[e];if(!o)return void console.error(`No subscription in '${e}'`);const i=o[t];if(!i)return void console.error(`Not subscribed event '${t}' from '${e}'`);const a=i[n];if(!a)return void console.error(`Handler for ${n} not found for event '${t}' from '${e}'`);r.unbind(t,a),delete i[n]}}catch(e){}})}unsubscribePusherChannels(){this.store&&this.config.socket&&this.state===C.CONNECTED&&(Object.entries(T.u_).forEach(e=>{let[t,n]=e;this.unsubscribe(this.config.channelName,t,n)}),this.runPending())}disconnect(){this.config.socket&&(this.unsubscribePusherChannels(),this.unbindFromPusherConnectionEvents(),this.config.socket.disconnect(),this.config.socket=null),this.pendingFunctions=[]}static resetInstance(){j.pusherInstance&&j.pusherInstance.disconnect(),j.pusherInstance=null}}o()(j,"pusherInstance",null);const I=j;class O extends S{constructor(e){var t;super(e),o()(this,"providerName","Sse"),o()(this,"evtSource",null),o()(this,"pingChecker",null),o()(this,"lastPingTime",0),o()(this,"botKey",""),o()(this,"boundHandleConnected",void 0),o()(this,"boundHandleError",void 0),o()(this,"sseEventHandler",e=>{let t,{data:n,type:r}=e;try{t=JSON.parse(n)}catch(e){return void this.emitError(new Error("Failed to parse SSE message: "+(e instanceof Error?e.message:String(e))))}finally{var o;null===(o=this.dispatch)||void 0===o||o.call(this,{type:T.u_[r],data:t})}}),o()(this,"pingHandler",()=>{this.lastPingTime=Date.now()});const n=this.getState();null!=n&&null!==(t=n.chatbubble)&&void 0!==t&&t.botKey?this.botKey=n.chatbubble.botKey:this.emitError(new Error("SSE: Unable to retrieve botKey from state")),this.boundHandleConnected=this.handleConnected.bind(this),this.boundHandleError=this.handleError.bind(this)}static getInstance(e){if(!O.sseInstance){if(!e)throw new Error("SSE: Store is required to create a new connection");O.sseInstance=new O(e)}return O.sseInstance}subscribeToSseChannels(){var e;Object.keys(T.u_).forEach(e=>{this.evtSource&&this.evtSource.addEventListener(e,this.sseEventHandler)}),null===(e=this.evtSource)||void 0===e||e.addEventListener("ping",this.pingHandler),this.lastPingTime=Date.now(),this.pingChecker=setInterval(()=>{Date.now()-this.lastPingTime>35e3&&(console.warn("Connection may be stale. Reconnecting..."),this.disconnect(),this.connectToProvider())},5e3)}unsubscribeToSseChannels(){var e;Object.keys(T.u_).forEach(e=>{this.evtSource&&this.evtSource.removeEventListener(e,this.sseEventHandler)}),null===(e=this.evtSource)||void 0===e||e.removeEventListener("ping",this.pingHandler)}handleConnected(){this.setState(C.CONNECTED),this.subscribeToSseChannels(),this.emitSuccess()}handleError(e){var t;if((null===(t=this.evtSource)||void 0===t?void 0:t.readyState)===EventSource.CONNECTING)this.setState(C.CONNECTING);else{var n,r,o,i;const e=null!==(n=null===(r=this.evtSource)||void 0===r?void 0:r.readyState)&&void 0!==n?n:"unknown",t=null!==(o=null===(i=this.evtSource)||void 0===i?void 0:i.url)&&void 0!==o?o:"unknown";this.emitError(new Error(`SSE connection failed: readyState=${e}, url=${t}`))}}handleEvtSourceStates(){this.evtSource&&(this.evtSource.addEventListener("open",this.boundHandleConnected),this.evtSource.addEventListener("error",this.boundHandleError))}handleEventSourceDisconnectingStates(){this.evtSource&&(this.evtSource.removeEventListener("open",this.boundHandleConnected),this.evtSource.removeEventListener("error",this.boundHandleError))}connectToProvider(){const e=this.getState();if(!e)return;const{environment:{PAT_HOST:t},connection:{token:n}}=e;this.disconnect(),this.evtSource=new EventSource(`${t}/chatbubble/v2/sse?token=${n}&botKey=${this.botKey}`),this.handleEvtSourceStates()}disconnect(){this.evtSource&&(this.handleEventSourceDisconnectingStates(),this.unsubscribeToSseChannels(),this.evtSource.close(),this.evtSource=null,this.pingChecker&&(clearInterval(this.pingChecker),this.pingChecker=null)),this.lastPingTime=0}static resetInstance(){O.sseInstance&&O.sseInstance.disconnect(),O.sseInstance=null}}o()(O,"sseInstance",null);const L=O;class P{constructor(e){o()(this,"connection",null),o()(this,"isInitialized",!1),o()(this,"erroredProviders",window.WebSocket?["Sse"]:["PusherRedux","Sse"]),o()(this,"store",null),o()(this,"providerFactory",void 0),o()(this,"getLatestTimeout",null),o()(this,"_currentPollingInterval",null),o()(this,"expectingReply",!1),o()(this,"userIsIdle",!1),o()(this,"handleIdleStateChanged",e=>{this.userIsIdle=e,this.updatePollingStrategy()}),o()(this,"handleConnectionError",e=>{var t;if(!this.connection||!this.store||a()(t=this.erroredProviders).call(t,this.connection.providerName))return;const n=this.connection.providerName;this.erroredProviders.push(n);const r=this.providerFactory.getSupportedProviders().find(e=>{var t;return!a()(t=this.erroredProviders).call(t,e)});r&&setTimeout(()=>{var e;if(!this.connection)return;const t=this.connection.getToken();this.connection.off("error",this.handleConnectionError),this.connection.off("connected",this.handleConnectionSuccess),this.connection.off("idle-state-changed",this.handleIdleStateChanged),this.connection.destroy(!0),this.connection=null,!a()(e=this.erroredProviders).call(e,r)&&t&&(this.connection=this.createProvider(r),this.monitorConnection(),this.connection.connect())},0)}),o()(this,"handleConnectionSuccess",()=>{this.userIsIdle=!1,this.connection&&this.updatePollingStrategy()}),this.providerFactory=e||this.createDefaultProviderFactory()}createDefaultProviderFactory(){const e=new _;return e.register("Sse",e=>L.getInstance(e)),e.register("PusherRedux",e=>I.getInstance(e)),e}static getInstance(e){return P.instance||(P.instance=new P(e)),P.instance}initialize(e){if(this.isInitialized)throw new Error("Connection has already been initialized.");if(!e)throw new Error("Store must be provided for Connection initialization.");this.store=e;try{var t,n;const r=e.getState(),o=null!==(t=null==r||null===(n=r.bot)||void 0===n?void 0:n.sseEnabled)&&void 0!==t&&t?"Sse":"PusherRedux";this.connection=this.createProvider(o),this.isInitialized=!0,this.monitorConnection()}catch(e){throw this.isInitialized=!1,this.connection=null,new Error(`Failed to initialize connection: ${e instanceof Error?e.message:String(e)}`)}}createProvider(e){if(!this.store)throw new Error("Store is not available to create a provider");return this.providerFactory.createProvider(e,this.store)}async monitorConnection(){this.connection&&(this.connection.on("error",this.handleConnectionError),this.connection.on("connected",this.handleConnectionSuccess),this.connection.on("idle-state-changed",this.handleIdleStateChanged),this.updatePollingStrategy())}getConnection(){if(!this.isInitialized||!this.connection)throw new Error("Connection is not initialized or initialization failed. Call initialize() first.");return this.connection}getIsInitialized(){return this.isInitialized}setExpectingReply(e){this.expectingReply!==e&&(this.expectingReply=e,this.updatePollingStrategy())}clearGetLatestTimeout(){null!==this.getLatestTimeout&&(clearTimeout(this.getLatestTimeout),this.getLatestTimeout=null)}poll(e){this.store&&null!==this._currentPollingInterval&&(this.clearGetLatestTimeout(),this.getLatestTimeout=setTimeout(async()=>{var e,t;if(null===this._currentPollingInterval)return;const n=null!==(e=this._currentPollingInterval)&&void 0!==e?e:s.a0.CONNECTED;await(null===(t=this.store)||void 0===t?void 0:t.dispatch(v())),this.poll(n)},e))}updatePollingStrategy(){if(!this.connection)return;const e=this.getPollingInterval();this.startPolling(e)}getPollingInterval(){return this.connection?this.userIsIdle?s.a0.IDLE:this.connection.getConnectionState()===C.CONNECTED?this.expectingReply?s.a0.EXPECTING_REPLY:s.a0.CONNECTED:s.a0.ERRORED:s.a0.CONNECTED}startPolling(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.a0.CONNECTED;this._currentPollingInterval!==e&&(this._currentPollingInterval=e,this.poll(e))}stopPolling(){this.clearGetLatestTimeout(),this._currentPollingInterval=null}destroy(e){this.stopPolling(),this.connection&&(this.connection.off("error",this.handleConnectionError),this.connection.off("connected",this.handleConnectionSuccess),this.connection.off("idle-state-changed",this.handleIdleStateChanged),this.connection.destroy(e),this.isInitialized=!1,this.connection=null),L.resetInstance(),I.resetInstance(),P.instance=null}}o()(P,"instance",null);const N=P},4240:(e,t,n)=>{"use strict";var r=n(8655)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},4275:(e,t,n)=>{"use strict";var r=n(8141),o=n(1268),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},4317:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r({}.isPrototypeOf)},4356:(e,t,n)=>{"use strict";n(9504),n(7424);var r=n(1355);e.exports=r.f("toPrimitive")},4358:(e,t,n)=>{"use strict";var r=n(9989);e.exports=function(e,t,n){return r.f(e,t,n)}},4390:(e,t,n)=>{"use strict";n.d(t,{m:()=>h});var r=n(904),o=n(7931),i=n(5352),a=n(9990),s=n(1970),l=n(8833),c=n(485),u=n(6122),d=n(6606),f=n(8094),p=n(6834);const h=e=>{let{triggerDialogueSlug:t,languageCode:n,shouldGreet:h=!0}=e;return async(e,g)=>{var m,b,v;const{local:{context:y,labels:x},chatbubble:{botKey:w,currentLanguage:k,complianceWasShownInWelcomePage:C},environment:{PAT_HOST:S},bot:{includeDisabledLanguages:_}}=g();h&&e({type:c.A8});const A=n||k,E=(new Date).toISOString(),T=await e((0,l.et)(`${S}/chatbubble/${i.Ak}/connect`,{method:"POST",body:{labels:x,context:y,language_code:A,market:r.Z.market,trigger_dialogue_slug:t,include_disabled_languages:_,should_greet:h,include_greeting:!0,tz:null===Intl||void 0===Intl||null===(m=Intl.DateTimeFormat)||void 0===m||null===(b=m.call(Intl))||void 0===b||null===(v=b.resolvedOptions())||void 0===v?void 0:v.timeZone},...(0,a.A)({botKey:w},{withCurrentUrl:!0,withVersion:!0})}));if(!T)throw new Error("No response from connectToBackend");const{token:j,chat_id:I,created:O,all_greetings_hide_input:L,greeting:P,live_translation_system_dialogue:N}=T.data;e({type:c.wk}),e({type:d.n,token:j,chatId:I,allGreetingsHideInput:L}),e({type:u.nm,startedAt:O}),e((0,l.TP)(E));const M="NONE"!==r.Z.welcomePage.type,{isEnabled:z,descriptionTextHtml:R,requireAgreement:$}=(0,s.A)(A);return!z||$||C&&M||e({type:f.z2,payload:{message:R,system_dialogue_message_type:o.zV.COMPLIANCE}}),z&&$&&!C&&e((0,p.zn)("COMPLIANCE")),N&&e({type:f.tq,data:N}),P&&e({type:f.tq,data:P}),j}}},4399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?n(e)?e.length?"array":"void":typeof e:"void"};var n=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},4417:(e,t,n)=>{"use strict";var r=n(3773);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},4492:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=function(e,t,n){r?o.f(e,t,i(0,n)):e[t]=n}},4497:(e,t,n)=>{"use strict";n.d(t,{WJ:()=>c,uV:()=>l,u_:()=>s});var r=n(6885),o=n(485),i=n(8689),a=n(8094);const s={"mimir-started-searching":o.E7,agent_started_typing:r.M_,agent_stopped_typing:r.MU,"message-attachments-updated":a.tS,message:a.tq,"new-attachments":a.Os,"pattern-context-match":i.jE,takeover:r.II,bot_started_typing:o.A8,bot_stopped_typing:o.wk},l={WARNING:"WARNING"},c={OFFLINE:{en:"You seem to be offline, please check your internet connection",nb:"Du ser ut til å være frakoblet internett, vennligst sjekk tilgangen din"}}},4517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};return t.forEach(function(t){var r=e[t];r&&(n[t]=r)}),n},e.exports=t.default},4518:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5352);function o(){let{type:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(null!=e?e:"").split("/");return(null==t?void 0:t[0])===r.sl.IMAGE?r.sl.IMAGE:(null==t?void 0:t[0])===r.sl.VIDEO?r.sl.VIDEO:(null==t?void 0:t[1])===r.sl.PDF?r.sl.PDF:t.slice(-1)[0]}},4531:(e,t,n)=>{"use strict";var r=n(8099),o=n(701),i=n(1355),a=n(9989).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},4543:(e,t,n)=>{"use strict";var r=n(5024),o=n(4713),i=n(7161),a=n(480),s=n(3273),l=n(5341),c=n(701),u=n(9665),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=l(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[t])}},4557:(e,t,n)=>{"use strict";n.d(t,{KN:()=>o,ZF:()=>i,cJ:()=>r,k1:()=>a});const r={TEXT:"TEXT",CHECKBOX:"CHECKBOX",RANGE:"RANGE",EMAIL:"EMAIL",NUMBER:"NUMBER",SELECT:"SELECT",RADIO:"RADIO",FILE:"FILE",TEXTAREA:"TEXTAREA"},o={ACTIVE:"ACTIVE",SUBMITTED:"SUBMITTED",CANCELED:"CANCELED",UNANSWERED:"UNANSWERED",ERRORED:"ERRORED"},i={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"},a={CUSTOM:"custom",BROWSER:"browser"}},4572:(e,t,n)=>{"use strict";var r=n(9344),o=n(814),i=n(1780),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4574:(e,t,n)=>{"use strict";var r=n(9903),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},4603:(e,t,n)=>{"use strict";var r=n(5547),o=n(1203),i=n(8900).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4665:e=>{e.exports=function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")},e.exports.__esModule=!0,e.exports.default=e.exports},4668:(e,t,n)=>{"use strict";n.d(t,{Dw:()=>p,Er:()=>d,Fu:()=>f,ue:()=>c});var r=n(7251),o=n(6122),i=n(6606),a=n(8094),s=n(7559),l=n(9245);const c={active:!1,allGreetingsHideInput:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},botKey:null,chatHasStarted:!1,chatId:null,contactDetailsButton:null,currentLanguage:"en",currentlyPoppedUp:!1,disabledTransports:[],wasActiveOnLoad:!1,error:null,globalIconsState:{seenDelayedPages:[],open:!0},hideInputField:!1,inPlatform:!1,isChatFullWindow:!1,complianceWasRevoked:!1,complianceWasShownInWelcomePage:!1,currentModal:null,overlayViews:[],previouslyPoppedUp:!1,renderedBy:"REACT",shownNudges:[],startedAt:null,uploadButtonWasClicked:null,userIsIdle:!1},u=(0,r.Z0)({name:"chatBubble",initialState:c,reducers:{setComplianceWasShownInWelcomePage:(e,t)=>{e.complianceWasShownInWelcomePage=t.payload.wasShown},setComplianceWasRevoked:(e,t)=>{e.complianceWasRevoked=t.payload.wasRevoked}},extraReducers:e=>e.addCase(o.MO,(e,t)=>{e.error=t.payload.error}).addCase(o.M2,(e,t)=>{e.currentLanguage=t.payload.code}).addCase(o.CB,(e,t)=>{e.botKey=t.payload.botKey||e.botKey,e.chatId=c.chatId,e.error=c.error,e.complianceWasShownInWelcomePage=c.complianceWasShownInWelcomePage,e.currentModal=c.currentModal,e.overlayViews=c.overlayViews,e.hideInputField=c.hideInputField,e.userIsIdle=c.userIsIdle}).addCase(i.n,(e,t)=>{e.chatId=t.payload.chatId,e.allGreetingsHideInput=t.payload.allGreetingsHideInput,e.currentModal=c.currentModal,e.overlayViews=c.overlayViews}).addCase(o.d$,(e,t)=>{e.chatHasStarted=t.payload.chatHasStarted,e.userIsIdle=!t.payload.chatHasStarted&&e.userIsIdle}).addCase(a.tq,(e,t)=>{const n=e.hideInputField&&"USER"===t.payload.data.sender;e.chatHasStarted=!0,e.hideInputField=!!n||t.payload.data.chatbubble_hide_input_field}).addCase(o.kA,e=>{e.active=!0,e.userIsIdle=!1}).addCase(o.uS,e=>{e.active=!1}).addCase(o.hn,e=>{e.previouslyPoppedUp=!0,e.currentlyPoppedUp=!0}).addCase(a.IM,e=>e).addCase(o.nm,(e,t)=>{e.startedAt=t.payload.startedAt}).addCase(o.HW,(e,t)=>{e.userIsIdle=t.payload.userIsIdle}).addCase(o.Eg,(e,t)=>{e.contactDetailsButton=t.payload.button}).addCase(o.t1,e=>{e.contactDetailsButton=null}).addCase(s.wX,(e,t)=>{e.shownNudges=(e.shownNudges||[]).concat(t.payload.slug)}).addCase(o.FZ,(e,t)=>{e.attachments.buttonClicked=(+new Date).toString(),e.attachments.exchangeId=t.payload.button.value}).addCase(o.TF,(e,t)=>{e.attachments.files=t.payload.files}).addCase(o.Q4,e=>{e.attachments.exchangeId=null,e.attachments.buttonClicked=null,e.attachments.files=[]}).addCase(o.YR,e=>{e.attachments.buttonClicked=null}).addCase(s.Kd,(e,t)=>{e.shownNudges=(e.shownNudges||[]).filter(e=>e!==t.payload.slug)}).addCase(o.uA,(e,t)=>{e.globalIconsState={...e.globalIconsState,...t.payload.state}}).addCase(o.Xu,(e,t)=>{e.currentModal=t.payload.currentModal}).addCase(o.XM,(e,t)=>{e.isChatFullWindow=t.payload.isChatFullWindow}).addCase(o.wM,(e,t)=>{e.overlayViews=[...e.overlayViews,t.payload.view]}).addCase(o.SO,e=>{e.overlayViews=[]}).addCase(o.nX,e=>{e.overlayViews=e.overlayViews.slice(0,-1)}).addCase(l.S.rejected,e=>{e.currentModal=null,e.overlayViews=e.overlayViews.filter(e=>"FEEDBACK"!==e)})}),{setComplianceWasShownInWelcomePage:d,setComplianceWasRevoked:f}=u.actions,p=u.reducer},4674:(e,t,n)=>{"use strict";var r=n(814),o=n(3057);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},4713:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},4785:(e,t,n)=>{"use strict";n.d(t,{n:()=>o,m:()=>r});const r={default:"'IBMPlex', 'Helvetica Neue', Helvetica, Arial, sans-serif",KindlySans:"KindlySans"},o="\n@font-face {\n font-family: 'KindlySans';\n src: url(http://localhost:8081/src/assets/fonts/KindlySans-Regular.65d6f01a87841a240c37cd04c52f3c2f.otf) format('OpenType');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 400;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.2c412e2f77ae69aa2154613095be7130.ttf) format('truetype');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 500;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.c4877bdfa15aef22d9255288b16899c5.ttf) format('truetype');\n}\n"},4871:e=>{"use strict";e.exports=!0},4901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y});var r=n(9155),o=n.n(r);const i=e=>(0,r.isValidElement)(e)&&(e=>(0,r.isValidElement)(e)&&Boolean(e.props.children))(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||(0,r.isValidElement)(t),!1),a=(e,t)=>r.Children.toArray(e).map((e,n,o)=>(0,r.isValidElement)(e)&&i(e)?t((0,r.cloneElement)(e,{...e.props,children:a(e.props.children,t)})):t(e,n,o)),s=a;var l=n(824),c=n(1197),u=n(1085);function d(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,u.jsx)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",children:(0,u.jsx)("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}var f=n(5758),p=n(1708),h=n(3551),g=n(914),m=n(7638),b=n(437);const v=(e,t)=>o().cloneElement(e,t),y=function(e){let{defaultValues:t,children:n,onSubmit:i,shouldUnregister:a,clearOnSubmit:y=!1,className:x,sendButtonTitle:w="Submit",cancelButtonTitle:k="Cancel",ariaLabel:C,onCancel:S}=e;const{register:_,handleSubmit:A,getValues:E,reset:T,control:j,setError:I,trigger:O,clearErrors:L,setValue:P,formState:{isSubmitting:N,isSubmitted:M}}=(0,l.mN)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onChange"}),{buttonText:z}=(0,r.useContext)(c.Dx)||{buttonText:p.Tj.white},R=async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await i(e,I),y&&T()}catch(e){throw T(),e}};return(0,u.jsxs)(m.lV,{onSubmit:A(R),"aria-label":C,$isSubmitted:M,className:x,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.metaKey||e.ctrlKey?A(R)():e.target.click())},noValidate:!0,children:[s(n,e=>e?o().isValidElement(e)?(e=>{var t,n,r,o,i,a;return e?null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.hasController?(0,u.jsx)(l.xI,{control:j,render:t=>v(e,{...e.props,...t}),rules:(0,b.G8)(e.props.validators),...e.props},e.key):v(e,{register:_,setError:I,clearErrors:L,trigger:O,control:j,...e.type&&"string"!=typeof e.type&&e.type.name===h.ZH.name&&{setValue:P}}):(null!=e&&e.type&&"string"!=typeof e.type?e.type.name:null)===g.A.name?v(e,{placeholder:null===(n=e.props)||void 0===n||null===(r=n.children)||void 0===r||null===(o=r[0])||void 0===o||null===(i=o.props)||void 0===i?void 0:i.placeholder_text,...!(null!==(a=e.props)&&void 0!==a&&a.htmlFor)&&{htmlFor:e.props.slug}}):e:null})(e):e:null),(0,u.jsxs)(m.dg,{children:[(0,u.jsx)(f.A,{disabled:N,onClick:()=>{const e=E();S&&S(e)},text:k,isSecondaryButton:!0}),(0,u.jsx)(f.A,{type:"submit",icon:(0,u.jsx)(d,{color:z,width:16,height:16}),loading:N,text:w,"data-testid":"form-submit-button"})]})]})}},4904:(e,t,n)=>{"use strict";var r={};r[n(8655)("toStringTag")]="z",e.exports="[object z]"===String(r)},4953:e=>{"use strict";e.exports=n},4961:(e,t,n)=>{"use strict";n.d(t,{Wh:()=>r,Zb:()=>o,u2:()=>i});const r="SHOW_TAB_NOTIFICATION",o="SHOW_BUBBLE_NOTIFICATION",i="DISMISS_NOTIFICATIONS"},5024:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},5116:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},5134:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Te,jL:()=>je,GV:()=>Ie,CU:()=>Oe});var r={};n.r(r),n.d(r,{agent:()=>P,alerts:()=>M,announcement:()=>$,auth:()=>B,bot:()=>b.Ay,connection:()=>V,environment:()=>y,inChatNotification:()=>K,inspector:()=>Q,local:()=>ee,messages:()=>fe,nudge:()=>ge,pushMessages:()=>ye});var o=n(7251),i=n(541),a=n(5546),s=n.n(a),l=n(904);const c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return t.reverse().slice(1).reduce((e,t)=>t(e),t[0](...arguments))}};var u=n(4174),d=n(9466);function f(e,t,n){return(0,d.A)(e,function(e,t){return e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{})}(t,n))}var p=n(7912),h=n(3436),g=n(8668),m=n(5352),b=n(8129);const v={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return"ENVIRONMENT_OVERRIDE"===t.type?{...e,...t.env}:e};var x=n(4668);const w=(e,t)=>{var n,r;return{...b.ue,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,chatbubbleTextEnabled:e.use_chatbubble_text,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?m.Lb.NONE:e.welcomePage.type,maintenanceAlert:e.maintenance_alert,maintenanceAlertEnabled:!t&&((null===(n=e.maintenance_alert)||void 0===n?void 0:n.alert_enabled)||!1),pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,disabledTransports:e.disabled_transports,text:e.text,bubbleSize:e.bubble_size,isTextDirectionRtl:e.text_right_to_left,realtimeAnalytics:e.chatbubble.realtime_analytics,inputLimitEnabled:e.chatbubble.input_limit_enabled,inputLimit:e.chatbubble.input_limit||140,hideHeader:e.hideHeader||!1,bubbleAvatar:e.chatbubble.icon_avatar_image||e.bubbleAvatar||null,replyInQueueEnabled:null!==(r=e.reply_in_queue_enabled)&&void 0!==r?r:b.ue.replyInQueueEnabled,position:{...m.bF,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||m.DP,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,nudges:e.nudges||[],handoverMode:e.handover_mode,conversionPageUrl:e.conversion_page_url,whitelabelEnabled:e.whitelabel_enabled,sseEnabled:e.sse_enabled||!window.WebSocket}};function k(e){let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:i,environment:a,renderedBy:s},initialChatLanguage:l}=e;return{bot:w(n,o),chatbubble:{...x.ue,botKey:t,inPlatform:o,admin:i,renderedBy:s||"REACT",currentLanguage:l},local:{context:r,labels:[]},environment:{...v,VERSION:"2.81.8",...a}}}var C=n(9602),S=n(6885),_=n(8094),A=n(4961),E=n(6122),T=n(1304);var j=n(485);const I={[j.A8]:{stopType:j.wk,reducer:"bot"},[S.M_]:{stopType:S.MU,reducer:"agent"}};let O;const L={name:void 0,isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!1,supportsAttachment:!1,handoverWaitTimeEstimate:void 0},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _.tq:return{...e,name:t.data.name||e.name,isTyping:!1};case S.M_:return{...e,isTyping:!0};case S.MU:return{...e,isTyping:!1};case S.c6:return{...e,userIsTyping:!0};case S.we:return{...e,userIsTyping:!1};case S.II:{const n=Boolean(t.data.requested_handover_at&&!t.data.taken_over),r=Boolean(t.data.taken_over&&!e.takenOver),o=Boolean(!t.data.taken_over&&e.requestedHandoverAt),i=Boolean(!t.data.taken_over&&e.takenOver),a=Boolean(t.data.supports_attachment),s=t.data.requested_handover_at,l=t.data.handover_wait_time_estimate,c=t.data.handover_queue_position;return n?{...e,requestedHandoverAt:s,hasRequestedHandoverAtLeastOnce:!0,takenOver:!1,takeoverClosed:!1,handoverWaitTimeEstimate:l,handoverQueuePosition:c}:r?{...e,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!0,takenOver:!0,isTyping:!1,supportsAttachment:a,takeoverClosed:!1,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:i||o?{...e,requestedHandoverAt:void 0,takenOver:!1,isTyping:!1,supportsAttachment:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:e}case S.nz:return{...e,requestedHandoverAt:void 0===t.data.requested_handover_at?e.requestedHandoverAt:t.data.requested_handover_at,takeoverClosed:Boolean(t.data.closed)};case S.AQ:return{...e,handoverWaitTimeEstimate:t.data.handover_wait_time_estimate,handoverQueuePosition:t.data.handover_queue_position};case S.MM:return{...e,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case E.CB:return{...e,requestedHandoverAt:L.requestedHandoverAt,hasRequestedHandoverAtLeastOnce:L.hasRequestedHandoverAtLeastOnce};default:return e}},N={showTabNotification:!1,showBubbleNotification:!1},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _.tq:return t.data.from_bot&&"SYSTEM"!==t.data.sender?{...e,showTabNotification:!0}:e;case A.Wh:return{...e,showTabNotification:!0};case A.Zb:return{...e,showBubbleNotification:!0};case A.u2:return{...N};default:return e}};var z=n(3821);const R={show:!1,text:null,url:null,type:null},$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case z.Y:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case z.n:return R;default:return e}};var D=n(7152);const F={isAuthenticated:!1,jwt:null,avatarUrl:null,fullName:null},B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D.K_:return{...e,isAuthenticated:!0,jwt:t.jwt,avatarUrl:t.avatarUrl,fullName:t.fullName};case D.qQ:return{...e,avatarUrl:t.avatar_url,fullName:t.full_name,email:t.email,phoneNumber:t.phone_number,userId:t.user_id};case D.zZ:return{...e,...F};default:return e}};var H=n(6606);const U={token:null},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case H.n:return{...e,token:t.token};case E.CB:return{...e,token:null};default:return e}};var W=n(2760);const G={notifications:[]},q={content:"",dismissed:!1,once:!1},K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case W.vP:return{...e,notifications:[...e.notifications,{...q,id:t.id,buttonText:t.buttonText,buttonHref:t.buttonHref,content:t.content,icon:t.icon,once:t.once}]};case W.MN:{const n=e.notifications.findIndex(e=>e.id===t.id);if(-1===n)return e;const r=[...e.notifications];return r[n]={id:t.id,content:t.content,buttonHref:t.buttonHref,buttonText:t.buttonText,icon:t.icon,once:t.once},{...e,notifications:r}}case W.nG:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};case W.oZ:{const n=e.notifications.find(e=>e.id===t.id);return{...e,notifications:[...e.notifications.filter(e=>e.id!==t.id),{...n,dismissed:!0}]}}default:return e}};var Y=n(8689);const X={inspectorOpen:!1,currentMessageId:null},Q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y.ye:return{...e,currentMessageId:t.chatMessageId};case Y.vK:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};var Z=n(7639);const J={context:{},labels:[]},ee=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Z.s:return{...e,context:{...e.context,...t.context}};case Z.T:return{...e,labels:[...new Set([...e.labels,t.label])]};case E.CB:return{...e,labels:[]};default:return e}};var te=n(9749),ne=n.n(te),re=n(1080),oe=n(674);const ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,oe.A)(n)]:r}},{})};var ae=n(3115),se=n(1715);const le={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null,forms:{}},ce=e=>{let{id:t}=e;return t},ue=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},de=(e,t,n)=>e.map(e=>t(e)?n(e):e),fe=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,i=arguments.length>1?arguments[1]:void 0;switch(i.type){case _.tq:{const{chatMessages:e}=o,{data:t}=i;if((0,ae.A)(e)(t)){const n={...t};return n.key||=n.id,f(o,"chatMessages",[...e,n])}const n=e.findIndex(e=>{let{id:n}=e;return n===t.id});if(t.key||=t.id,-1===n)return o;const r=[...e.slice(0,n),t,...e.slice(n+1)];return{...o,chatMessages:r}}case _.z2:{const e=((e,t)=>{const n=(new Date).toISOString();return{id:n,created:n,message:"",event_message:e,from_bot:!0,sender:"SYSTEM",exchange_type:"system-dialogue",system_dialogue_message_type:t}})(i.payload.message,i.payload.system_dialogue_message_type),{chatMessages:t}=o;return{...o,chatMessages:[...t,e]}}case E.CB:return le;case _.fg:{const{chatbubble_temporary_id:e,id:t}=i.data,n=n=>{var r;let{id:o}=n;return ne()(r=[e,t]).call(r,o)},r=e=>({...e,message:i.data.message});return{...o,chatMessages:de(o.chatMessages,n,r)}}case _.se:return{...o,messageSentTime:i.messageSentTime};case _.pz:{var a;const{created:e,id:t,temporaryId:n}=i,{chatMessages:r}=o,s=null!==(a=null==i?void 0:i.status)&&void 0!==a?a:null,l=r.findIndex(e=>{let{id:t}=e;return t===n});if(l<0)return o;const c=r[l],u={...c,created:e||(null==c?void 0:c.created),id:t||(null==c?void 0:c.id),status:s},d=r.map((e,t)=>t!==l?e:u);return{...o,chatMessages:d}}case Y.jE:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=i.data,r=n=>{let{id:r}=n;return r===e||r===t},a=e=>({...e,pattern_context_match:n});return{...o,chatMessages:de(o.chatMessages,r,a)}}case _.Y6:var s;return(0,re.A)(o.buttonClicks)(i.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],i.buttonClick]}:o;case _.kU:return{...o,lastMessageSeen:(0,se.A)(i,["id","index"])};case _.Os:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=i.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(ie))||[]]};case _.wP:{const e=ie(i.attachment),t=ue(e),n=t=>({...t,...e});return{...o,attachments:de(o.attachments,t,n)}}case _.tS:{var l;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=i.data,r=e.map(ie),a=(null!==(l=o.attachments)&&void 0!==l?l:[]).map(e=>{const t=r.find(ue(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},i=e=>({...e,id:n,attachment_ids:r.map(ce)});s=de(o.chatMessages,e,i)}return{...o,attachments:a,chatMessages:s}}case _.QA:return null!==(r=i.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[i.formData.formKey]:i.formData}}:o;default:return o}};var pe=n(7559);const he={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:m.MK.TEMPLATE,hasBeenDismissed:!1},ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pe.X2:return{...e,show:!1,nudgeLayout:{},hasBeenDismissed:!0};case pe.wv:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:m.MK.TEMPLATE,trackEvent:t.trackEvent,hasBeenDismissed:!1};case pe.un:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:m.MK.CUSTOM,trackEvent:t.trackEvent,hasBeenDismissed:!1};default:return e}};var me=n(3178),be=n(7474);const ve={show:!1,text:null,agent:null,dismissed:!1,type:be.oI.MESSAGE,dismissedMessages:[],taken_over:!1},ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case S.II:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:be.oI.HANDOVER}:e;case _.tq:return(0,g.A)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:be.oI.MESSAGE};case me.l:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case me.a_:return{...e,show:!1,dismissed:!0};case me.a1:return ve;default:return e}};var xe=n(8418);const we=e=>{let{url:t,...n}=e;return(t||"").startsWith("data:")?n:{...n,url:t}},ke=e=>e?()=>e=>({bot:{hasInteraction:e.bot.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{name:e.agent.name}}):()=>e=>({alerts:{showBubbleNotification:e.alerts.showBubbleNotification},agent:{name:e.agent.name,takenOver:e.agent.takenOver,supportsAttachment:e.agent.supportsAttachment,hasRequestedHandoverAtLeastOnce:e.agent.hasRequestedHandoverAtLeastOnce},bot:{hasInteraction:e.bot.hasInteraction,isTextDirectionRtl:e.bot.isTextDirectionRtl},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:x.ue.currentlyPoppedUp,allGreetingsHideInput:x.ue.allGreetingsHideInput,contactDetailsButton:x.ue.contactDetailsButton,attachments:x.ue.attachments,isChatFullWindow:void 0,overlayViews:e.chatbubble.overlayViews.filter(e=>"FEEDBACK"===e),shownNudges:e.chatbubble.shownNudges,renderedBy:void 0,userIsIdle:void 0},connection:{token:e.connection.token},feedback:{...e.feedback},local:{labels:e.local.labels},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(we),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages}}),Ce=e=>t=>{let{active:n}=t.chatbubble;const r=(0,g.A)();return e.isFromMultitab||(n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!r)||Boolean(e.chatbubble.keep_open_mobile&&r))),(0,d.A)(t,{chatbubble:{active:n}})},Se=e=>{var t;if((0,p.A)(e,"bot.includeDisabledLanguages",!1))return e;const n=null==e||null===(t=e.chatbubble)||void 0===t?void 0:t.currentLanguage,r=l.Z.supportedLanguages.some(e=>{let{code:t}=e;return t===n}),o=l.Z.supportedLanguages.find(e=>{let{is_primary:t}=e;return t});if(!o)throw new Error("Impossible state: primary language not found");return r?e:(0,d.A)(e,{chatbubble:{currentLanguage:o.code}})},_e=e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=(0,d.A)(t,n),e.reduce((e,t)=>{let[n,r]=t;return f(e,n,r)},r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t}))},Ae=e=>t=>{var n,r;const o=null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).pop(),i=null!==(r=null==o?void 0:o.chat_live_translation_language_code)&&void 0!==r?r:null==o?void 0:o.chat_language_code,a=null!=i?i:e;return(0,d.A)(t,{chatbubble:{currentLanguage:a},bot:{isTextDirectionRtl:(0,h.A)(a)}})},Ee=[e=>t=>async n=>{const{agent:{takenOver:r},chatbubble:{currentLanguage:o}}=e.getState();if(n.type===S.II){const{handoverConversationFeedback:t,preloadFeedbackImages:i}=(0,C.A)(o);r&&!1===n.data.taken_over&&t&&(i("handover_conversation"),e.dispatch((0,T.ob)(t)))}if(n.type!==_.tq)return t(n);const{from_bot:i,sender:a,was_anonymized:s,exchange_type:l,triggered_chat_start:c,chat_language_code:d,chat_live_translation_language_code:f}=n.data,p=f||d;if(n.type===_.tq){if(i&&a!==m.bS.USER){const e=u.A.getInstance();e.getIsInitialized()&&e.setExpectingReply(!1)}(0,g.A)()&&i&&a!==m.bS.SYSTEM&&e.dispatch({type:A.Zb})}if("greeting"===l||c)o!==p&&t({type:E.M2,payload:{code:p}});else if(i&&p&&o!==p){var h;const{text:n}=e.getState().bot,r=null===(h=n.language_switch_notification)||void 0===h?void 0:h[p];r&&e.dispatch((0,T.cC)({content:r,buttonText:void 0,buttonHref:void 0,icon:"language"},m.Jm.LANGUAGE_SWITCH)),t({type:E.M2,payload:{code:p}})}if(i||!s)return t(n);t({type:_.fg,data:n.data})},e=>t=>async n=>{const r=I[n.type];var o;return r&&(clearTimeout(O),O=setTimeout(()=>{e.getState()[r.reducer].isTyping&&t({type:r.stopType})},1e3*((null===(o=n.data)||void 0===o?void 0:o.TTL)||10))),n.type!==j.wk&&n.type!==S.MU||clearTimeout(O),t(n)},()=>e=>t=>{e("payload"in t?t:{...t,payload:{...t}})}];function Te(e){let{botKey:t,settings:n,persist:i=!0,initialChatLanguage:a,initialStateModifier:l}=e;const{inPlatform:f}=n,p=!n.inPlatform&&0===n.chatbubble.persist_state_lifespan_seconds,h=`kindly-chat-${t}`,g=ke(p),m=c(Se,Ae(a),Ce(n),_e({inPlatform:f,botKey:t})),b=i?s()(null,{key:h,slicer:g,merge:m}):e=>e;let v=k({botKey:t,settings:n,initialChatLanguage:a});l&&(v=(0,d.A)(v,l));const y=(0,o.U1)({reducer:{...r,feedback:xe.Ay,chatbubble:x.Dw},preloadedState:v,middleware:e=>e().concat(...Ee),enhancers:e=>e().concat(b),devTools:!1});return u.A.getInstance().getIsInitialized()||u.A.getInstance().initialize(y),y}const je=i.wA.withTypes(),Ie=i.d4.withTypes(),Oe=i.Pj.withTypes()},5148:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r([].slice)},5161:(e,t,n)=>{"use strict";var r=n(4317),o=n(8341),i=n(1019),a=Array.prototype,s=String.prototype;e.exports=function(e){var t=e.includes;return e===a||r(a,e)&&t===a.includes?o:"string"==typeof e||e===s||r(s,e)&&t===s.includes?i:t}},5216:(e,t,n)=>{"use strict";e.exports=n(6586)},5241:e=>{"use strict";e.exports={}},5262:(e,t,n)=>{"use strict";var r=n(6735);e.exports=r},5279:(e,t,n)=>{"use strict";var r=n(4356);e.exports=r},5297:(e,t,n)=>{"use strict";n(6925);var r=n(8099).Object,o=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(o.sham=!0)},5341:(e,t,n)=>{"use strict";var r=n(493),o=n(6281);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},5352:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r.Ak,DP:()=>g,Gi:()=>l,Ii:()=>y,Je:()=>x,Jm:()=>v,Lb:()=>o,Le:()=>d,M3:()=>h,MK:()=>u,Ns:()=>p,T5:()=>s,a0:()=>a,bF:()=>m,bS:()=>i,dT:()=>r.dT,fl:()=>r.fl,gH:()=>r.gH,lP:()=>c,oY:()=>w,rc:()=>b,sl:()=>f});var r=n(8191);const o=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),i=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),a=Object.freeze({IDLE:3e4,CONNECTED:1e4,EXPECTING_REPLY:3001,ERRORED:3e3}),s=Object.freeze({1e3:"250",800:"178",600:"124"}),l=Object.freeze({GREETING:"GREETING",FALLBACK:"FALLBACK",PATTERN_MATCH:"PATTERN_MATCH",KEYWORD_EXACT_MATCH:"KEYWORD_EXACT_MATCH",KEYWORD_MENTION:"KEYWORD_MENTION",SAMPLE_MATCH:"SAMPLE_MATCH",TRIGGER_DIALOGUE:"TRIGGER_DIALOGUE",ZODIAC:"ZODIAC",MIMIR:"MIMIR",WEBHOOK:"WEBHOOK",INTENT_MATCH:"INTENT_MATCH"}),c=Object.freeze({QUICK_REPLY:"QUICK_REPLY",EXTERNAL_LINK:"EXTERNAL_LINK",EMAIL:"EMAIL",PHONE:"PHONE",HANDOVER_REQUEST:"HANDOVER_REQUEST",PRIVACY_EXPORT:"PRIVACY_EXPORT",PRIVACY_DELETE:"PRIVACY_DELETE",DIALOGUE_TRIGGER:"DIALOGUE_TRIGGER",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER",END_CHAT:"END_CHAT"}),u=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),d=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),f=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text",VIDEO:"video"}),p=(Object.freeze({DISABLED:"DISABLED",PLATFORM:"PLATFORM",EXTERNAL:"EXTERNAL"}),Object.freeze({PRIDE:"PRIDE",EASTER:"EASTER",CHRISTMAS:"CHRISTMAS"})),h=(Object.freeze({NO_SPLIT:"X",SPLIT_A:"A",SPLIT_B:"B",NO_SPLIT_LABEL:void 0}),18e5),g=5e3,m=Object.freeze({bottom:"16px",right:"16px"}),b=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"}),v=Object.freeze({MAINTENANCE:"MAINTENANCE",LANGUAGE_SWITCH:"LANGUAGE_SWITCH"}),y=(Object.freeze({WEBHOOK:"WEBHOOK",PLUGIN:"PLUGIN",STANDARD:"STANDARD"}),Object.freeze({HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"})),x=Object.freeze({CUSTOM_INTEGRATION:"app",EMAIL:"email",FB_MESSENGER:"facebook",SDK_ANDROID:"android",SDK_IOS:"ios",SLACK:"slack",TEST:"test",WEB:"web",WEB_MOBILE:"mobile"}),w=[".pdf",".heic","image/*","video/*","text/html","text/csv","text/xml","text/json","text/markdown","text/calendar","text/plain","text/tab-separated-values"].join(",")},5392:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,c:()=>o});var r=n(2760);const o=(e,t)=>(n,o)=>{var i,a;const{content:s,buttonHref:l,buttonText:c,icon:u,once:d}=e,f=null===(i=o().inChatNotification)||void 0===i||null===(a=i.notifications)||void 0===a?void 0:a.find(e=>e.id===t);f?s!==f.content&&n({type:r.MN,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t}):n({type:r.vP,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t})},i=e=>(t,n)=>{var o,i;const a=null===(o=n().inChatNotification)||void 0===o||null===(i=o.notifications)||void 0===i?void 0:i.find(t=>t.id===e);a&&(a.once?t({type:r.oZ,id:e}):t({type:r.nG,id:e}))}},5394:(e,t,n)=>{"use strict";n.d(t,{AK:()=>v,JP:()=>y,Zm:()=>p,cr:()=>b,jB:()=>g,qL:()=>o,vW:()=>i,yu:()=>m});var r=n(1197);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["animation-timing-function:ease;animation-iteration-count:1;animation-fill-mode:forwards;animation-duration:","ms;"],e)},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["height:0;width:0;padding:0;transition:width 0.1ms ease ","ms,padding 0.1ms ease ","ms,height 0.1ms ease ","ms;"],e,e,e)},a=(0,r.i7)(["0%{opacity:0;transform:translateY(-10px);}100%{opacity:1;transform:translateY(0);}"]),s=(0,r.i7)(["0%{opacity:0;transform:translateY(10px);}100%{opacity:1;transform:translateY(0);}"]),l=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:1;transform:translateX(0);}"]),c=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:0.8;transform:translateX(0);}"]),u=(0,r.i7)(["0%{opacity:0;transform:translateX(15px);}100%{opacity:1;transform:translateX(0);}"]),d=(0,r.i7)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),f=(0,r.i7)(["0%{opacity:0;}100%{opacity:1;}"]),p=(0,r.i7)(["50%{opacity:0.5;}"]),h=((0,r.i7)(["50%{opacity:0.2;}"]),(0,r.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"])),g=(0,r.AH)([""," animation-name:",""],o(),f),m=(0,r.AH)([""," animation-name:",""],o(),a),b=(0,r.AH)([""," animation-name:",""],o(),s),v=(0,r.AH)([""," animation-name:",""],o(),l),y=((0,r.AH)([""," animation-name:",""],o(),c),(0,r.AH)([""," animation-name:",""],o(),u));(0,r.AH)([""," animation-name:",""],o(),d),(0,r.AH)(["animation:1.8s "," infinite 0.3s;"],h)},5396:(e,t,n)=>{"use strict";for(var r=n(8141),o=n(1003),i=n(6100),a=n(6281),s=n(8655),l=o("Symbol"),c=l.isWellKnownSymbol,u=o("Object","getOwnPropertyNames"),d=i(l.prototype.valueOf),f=r("wks"),p=0,h=u(l),g=h.length;p<g;p++)try{var m=h[p];a(l[m])&&s(m)}catch(e){}e.exports=function(e){if(c&&c(e))return!0;try{for(var t=d(e),n=0,r=u(f),o=r.length;n<o;n++)if(f[r[n]]==t)return!0}catch(e){}return!1}},5426:(e,t,n)=>{"use strict";var r=n(3057),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},5516:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(9155);const r=n(1197).Ay.div.withConfig({componentId:"sc-1bvmkry-0"})(["transition:all 0.3s ease-in-out;"]);var o=n(1085);function i(e){let{children:t,carouselPosition:n,onTouchEnd:i,onTouchMove:a,onTouchStart:s}=e;return(0,o.jsx)(r,{onTouchStart:s,onTouchEnd:i,onTouchMove:a,style:{transform:`translateX(${n}px)`},children:t})}},5522:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(3678)})},5546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var n=r({key:"redux",merge:a.default,slicer:i.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,l=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,i){"function"==typeof r&&void 0===i&&(i=r,r=void 0);var a=void 0,d=void 0;try{a=u(localStorage.getItem(o)),d=s(r,a)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,i),p=l(e);return f.subscribe(function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,c(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}}),f}}};var i=o(n(8639)),a=o(n(7487));e.exports=t.default},5547:(e,t,n)=>{"use strict";var r,o,i=n(8900),a=n(3531),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},5571:(e,t,n)=>{"use strict";var r=n(6100),o=n(9903),i=n(1139),a=n(5426),s=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(e){return function(t,n){var r,u,d=i(a(t)),f=o(n),p=d.length;return f<0||f>=p?e?"":void 0:(r=l(d,f))<55296||r>56319||f+1===p||(u=l(d,f+1))<56320||u>57343?e?s(d,f):r:e?c(d,f,f+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},5626:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=new Map,o=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})},i=(e,t,n,i)=>{if(e=o(e,"inputs"),0===(t=o(t,"patterns")).length)return[];const a=(t=t.map(e=>((e,t)=>{const n="s"+((t={caseSensitive:!1,...t}).caseSensitive?"":"i"),o=e+"|"+n;if(r.has(o))return r.get(o);const i="!"===e[0];i&&(e=e.slice(1)),e=(e=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e=e.replaceAll(String.raw`\*`,"__ESCAPED_STAR__").replaceAll("\\\\","__ESCAPED_BACKSLASH__").replaceAll(/\\(.)/g,"$1")).replaceAll(String.raw`\*`,".*")).replaceAll("__ESCAPED_STAR__",String.raw`\*`).replaceAll("__ESCAPED_BACKSLASH__","\\\\");const a=new RegExp(`^${e}$`,n);return a.negated=i,r.set(o,a),a})(e,n))).filter(e=>e.negated),s=t.filter(e=>!e.negated),{allPatterns:l}=n||{},c=[];if(l&&i&&a.length>1&&0===s.length){for(const t of e)for(const e of a)if(e.test(t))return[];return e.slice(0,1)}for(const t of e){let e=!1;for(const n of a)if(n.test(t)){e=!0;break}if(!e){if(0===s.length)c.push(t);else if(l){const e=Array.from({length:s.length},()=>!1);for(const[n,r]of s.entries())r.test(t)&&(e[n]=!0);e.every(Boolean)&&c.push(t)}else{let e=!1;for(const n of s)if(n.test(t)){e=!0;break}e&&c.push(t)}if(i&&c.length>0)break}}return c},a=(e,t)=>{if(!t||""===t)return!0;const n=e.endsWith("/")&&e.length>1?e.slice(0,-1):e,r=t.endsWith("/")&&t.length>1?t.slice(0,-1):t;let o=n;if(null!=r&&r.startsWith("/"))try{o=new URL(n).pathname}catch{o=n}return i(o,r,undefined,!0).length>0}},5650:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1576);const o=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t},i=e=>{let{button_type:t,...n}=e;return{...n,button_type:o(t),category:(0,r.A)(t)}}},5657:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},5664:(e,t,n)=>{"use strict";n(4531)("dispose")},5677:(e,t,n)=>{var r=n(7354);e.exports=function(e,t){r(e,t),t.add(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5687:(e,t,n)=>{"use strict";n(5664)},5758:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(9155),o=n.n(r),i=n(6738),a=n(6848),s=n(1814),l=n(1085);function c(e,t){const{href:n,target:r,children:o,icon:c,text:u,loading:d=!1,isCheckbox:f=!1,type:p="button",onClick:h=i.A,cy:g,isSecondaryButton:m=!1,flat:b,disabled:v,selected:y,...x}=e,w=e=>{d?e.preventDefault():h(e)};return n?(0,l.jsx)(a.rK,{ref:t,href:n,target:r,$isCheckbox:f,onClick:w,$loading:d,$isSecondaryButton:m,...x,children:d?(0,l.jsx)(s.A,{flat:x.flat,isCheckbox:f,loading:d}):(0,l.jsxs)(a.EE,{children:[(0,l.jsx)(a.T3,{children:o||u}),(0,l.jsx)(a.Tu,{children:c})]})}):(0,l.jsx)(a.Ef,{ref:t,onClick:w,$isCheckbox:f,type:p,$loading:d,"data-testid":g,$isSecondaryButton:m,$flat:b,$disabled:v,$selected:y,...x,children:d?(0,l.jsx)(s.A,{flat:x.flat,isCheckbox:f,loading:d}):(0,l.jsxs)(a.EE,{children:[(0,l.jsx)(a.T3,{children:o||u}),(0,l.jsx)(a.Tu,{children:c})]})})}const u=o().forwardRef(c);u.displayName="Button";const d=u},5765:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n(1197),i=n(8663);const a=o.Ay.div.withConfig({componentId:"sc-1vynzdk-0"})(["visibility:hidden;padding:4px 8px;font-size:var(--_kindlychat-font-size-sm);background-color:",";color:",";border-radius:6px;z-index:99999;position:absolute;width:max-content;word-break:normal;overflow-wrap:anywhere;",""],e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(255, 255, 255, 0.9)","rgba(0, 0, 0, 0.9)")},e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(0, 0, 0, 0.8)","rgba(255, 255, 255, 0.8)")},e=>{let{$position:t}=e;switch(t){case"top":default:return"bottom: 100%;";case"bottom":return"top: 100%;"}}),s=o.Ay.div.withConfig({componentId:"sc-1vynzdk-1"})(["display:flex;flex-direction:row;align-items:center;position:relative;&:hover ","{visibility:visible;}"],a);var l=n(1085);const c=function(e){let{children:t,text:n,position:o="top",testId:i="tooltip"}=e;const c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{!function(){var e,t;const n=window.document.getElementById("chat-body-container")||window.kindlyChat.shadowRoot.getElementById("chat-body-container"),r=null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect(),o=null==n?void 0:n.getBoundingClientRect();if(!r||!n)return;const{x:i,y:a,left:s,width:l,height:u}=r||{x:0,y:0,left:0,width:0,height:0},{x:d,y:f,width:p,height:h=0}=o||{x:0,y:0,width:0,height:0};if(null===(t=c.current)||void 0===t||t.style.setProperty("max-width",p-40+"px"),i+l>d+p){var g;const e=d+p,t=Math.abs(e-s-40);null===(g=c.current)||void 0===g||g.style.setProperty("right",`-${t}px`)}else{var m,b;null===(m=c.current)||void 0===m||m.style.setProperty("left","50%"),null===(b=c.current)||void 0===b||b.style.setProperty("transform","translateX(-50%)")}var v,y,x,w;a-f<u&&(null===(v=c.current)||void 0===v||v.style.setProperty("top","100%"),null===(y=c.current)||void 0===y||y.style.setProperty("bottom","auto")),a+u>f+h&&(null===(x=c.current)||void 0===x||x.style.setProperty("top","auto"),null===(w=c.current)||void 0===w||w.style.setProperty("bottom","100%"))}()},[o]),(0,l.jsxs)(s,{"data-testid":i,children:[t,(0,l.jsx)(a,{ref:c,"data-testid":`${i}-text`,$position:o,children:n})]})}},5777:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5780:(e,t,n)=>{"use strict";var r,o=n(7235),i=n(7389),a=n(9683),s=n(5241),l=n(3489),c=n(9619),u=n(4275),d="prototype",f="script",p=u("IE_PROTO"),h=function(){},g=function(e){return"<"+f+">"+e+"</"+f+">"},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;b="undefined"!=typeof document?document.domain&&r?m(r):(t=c("iframe"),n="java"+f+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):m(r);for(var o=a.length;o--;)delete b[d][a[o]];return b()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[p]=e):n=b(),void 0===t?n:i.f(n,t)}},5785:(e,t,n)=>{"use strict";var r=n(9098),o=n(4603),i=n(1203),a=n(7313),s=n(2137);r({target:"Object",stat:!0,forced:!o||i(function(){a.f(1)})},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},5791:(e,t,n)=>{var r=n(4665);e.exports=function(e,t){return e.get(r(e,t))},e.exports.__esModule=!0,e.exports.default=e.exports},5799:(e,t,n)=>{"use strict";n(4531)("iterator")},5813:(e,t,n)=>{"use strict";var r=n(1810);e.exports=r},5851:()=>{},5873:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6974)},5880:(e,t,n)=>{"use strict";n.d(t,{GJ:()=>a,NY:()=>l,fz:()=>c,n6:()=>d,tf:()=>u});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",i=function(e,t,n,i){var a,s;let l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(-1!==r.indexOf(e)&&Boolean(i)&&function(e,t,n){const r=`on${t.charAt(0).toUpperCase()+t.slice(1)}`;if("function"!=typeof e)return void console.warn(`Provided setting '${r}' is not a function.`);console.warn(`kindlyOptions.${r} is deprecated in favor of standard event handlers. ${o}`);const i=Object.values(n);try{e(...i)}catch(e){console.error(e)}}(i,e,t),"API"!==n)return!0;if(null===(a=window)||void 0===a||null===(s=a.kindlyChat)||void 0===s||!s.APIRoot)return console.warn("No APIRoot when rendered using kindly-chat API"),!0;"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;return window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0,cancelable:l}))};function a(e,t,n,r){e&&i("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function l(e){!1===s&&(s=!0,i("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const c=e=>{let{button:t,buttonType:n,chatLog:r,event:i,handlers:a,lastMessage:s,renderedBy:l}=e,c=!1;const u=null==a?void 0:a[n];if(u){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(u(i,t,s,r,n))}catch(e){console.error(e)}}var d;return"API"===l&&(c=!(null!==(d=window.kindlyChat)&&void 0!==d&&d.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:t,lastMessage:s,chatLog:r,buttonType:n},bubbles:!0,cancelable:!0})))),c};function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{source:n="user",storeState:r}=arguments.length>2?arguments[2]:void 0;const{chatbubble:{chatId:o,renderedBy:a}}=r,s={...t,chatId:o,source:n,type:e};return i("ui",s,a,void 0,!1)}const d=e=>{var t;let{type:n,icon:r,renderedBy:o}=e;return"API"!==o||!(null!==(t=window.kindlyChat)&&void 0!==t&&t.APIRoot.dispatchEvent(new CustomEvent("kindly:globalicon",{detail:{type:n,icon:r},bubbles:!0,cancelable:!0})))}},5919:(e,t,n)=>{"use strict";e.exports=n(4047)},5947:(e,t,n)=>{"use strict";var r=n(7752),o=TypeError;e.exports=function(e){if(r(e))throw new o("The method doesn't accept regular expressions");return e}},5994:(e,t,n)=>{"use strict";var r=n(3407);n(5522),n(7524),n(8448),n(8013),n(9437),n(2991),n(3860),n(6251),n(2100),n(2996),e.exports=r},6100:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},6122:(e,t,n)=>{"use strict";n.d(t,{CB:()=>r,Eg:()=>p,FZ:()=>h,HW:()=>u,M2:()=>o,MO:()=>v,Q4:()=>m,SO:()=>k,TF:()=>g,XM:()=>x,Xu:()=>c,YR:()=>b,d$:()=>d,hn:()=>s,kA:()=>a,nX:()=>C,nm:()=>l,t1:()=>f,uA:()=>y,uS:()=>i,wM:()=>w});const r="START_OVER",o="SET_LANGUAGE",i="CLOSE_CHATBUBBLE",a="OPEN_CHATBUBBLE",s="POPPED_UP",l="SET_STARTED_AT",c="SET_CURRENT_MODAL",u="SET_USER_IS_IDLE",d="SET_CHAT_HAS_STARTED",f="HIDE_CONTACT_DETAILS",p="SHOW_CONTACT_DETAILS",h="ATTACHMENT_BUTTON_CLICKED",g="SET_ATTACHMENT_FILES",m="CLEAR_ATTACHMENT_FILES",b="ATTACHMENT_PROMPT_SHOWED",v="SET_ERROR",y="SET_GLOBAL_ICONS_STATE",x="SET_CHAT_FULL_WINDOW",w="DISPLAY_OVERLAY_VIEW",k="CLOSE_OVERLAY_VIEW",C="SHOW_PREVIOUS_OVERLAY_VIEW"},6189:(e,t,n)=>{"use strict";n(1918),n(7935),n(9239),n(8293),n(2320),n(3131),n(5664),n(8749),n(6836),n(5799),n(928),n(9850),n(6457),n(6789),n(4119),n(7501),n(7424),n(1249),n(1818),n(2279),n(5851),n(2492);var r=n(8099);e.exports=r.Symbol},6251:(e,t,n)=>{"use strict";n(4531)("metadataKey")},6281:(e,t,n)=>{"use strict";var r=n(1003),o=n(2769),i=n(4317),a=n(7460),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},6310:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,g=!1,m=!1,b=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function k(e){if(m=!1,w(e),!g)if(null!==r(c))g=!0,S||(S=!0,C());else{var t=r(u);null!==t&&L(k,t.startTime-e)}}var C,S=!1,_=-1,A=5,E=-1;function T(){return!(!b&&t.unstable_now()-E<A)}function j(){if(b=!1,S){var e=t.unstable_now();E=e;var n=!0;try{e:{g=!1,m&&(m=!1,y(_),_=-1),h=!0;var i=p;try{t:{for(w(e),f=r(c);null!==f&&!(f.expirationTime>e&&T());){var a=f.callback;if("function"==typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){f.callback=s,w(e),n=!0;break t}f===r(c)&&o(c),w(e)}else o(c);f=r(c)}if(null!==f)n=!0;else{var l=r(u);null!==l&&L(k,l.startTime-e),n=!1}}break e}finally{f=null,p=i,h=!1}n=void 0}}finally{n?C():S=!1}}}if("function"==typeof x)C=function(){x(j)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,O=I.port2;I.port1.onmessage=j,C=function(){O.postMessage(null)}}else C=function(){v(j,0)};function L(e,n){_=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(m?(y(_),_=-1):m=!0,L(k,i-a))):(e.sortIndex=s,n(c,e),g||h||(g=!0,S||(S=!0,C()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},6457:(e,t,n)=>{"use strict";n(4531)("replace")},6586:(e,t,n)=>{"use strict";var r=n(1305);e.exports=r},6606:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r="NEW_TOKEN"},6625:e=>{"use strict";e.exports={}},6735:(e,t,n)=>{"use strict";var r=n(3592);e.exports=r},6738:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>{}},6739:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(541),o=n(904),i=n(8278);function a(){var e;const{supportedLanguages:t}=o.Z,{includeDisabledLanguages:n}=(0,r.d4)(i.Od),{currentLanguage:a}=(0,r.d4)(i.$P),s=null===(e=t.find(e=>{let{is_primary:t}=e;return t}))||void 0===e?void 0:e.code;if(!s)throw new Error("No primary language found in supported languages");const l=t.filter(e=>{let{is_active:t}=e;return t});return{primaryLanguageCode:s,currentLanguageCode:a,supportedLanguages:n?t:l}}},6789:(e,t,n)=>{"use strict";n(4531)("search")},6834:(e,t,n)=>{"use strict";n.d(t,{jz:()=>A,B:()=>T,UB:()=>k,Rh:()=>v,eG:()=>g,mN:()=>P,_e:()=>M,wQ:()=>h,ky:()=>y,VK:()=>N,Mm:()=>S,ZS:()=>C,lQ:()=>w,Ln:()=>E,L4:()=>b,w7:()=>L,zn:()=>I,nI:()=>j,ob:()=>O,i1:()=>m,V$:()=>_});var r=n(5880),o=n(5352),i=n(9449),a=n(4174),s=n(9990),l=n(8833),c=n(6122),u=n(3178),d=n(7559),f=n(4961),p=n(8418);const h=e=>(t,n)=>{const r=n().chatbubble.overlayViews[n().chatbubble.overlayViews.length-1];e&&r!==e&&t({type:c.wM,view:e})},g=()=>e=>{e({type:c.SO})},m=()=>e=>{e({type:c.nX})},b=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(n,r)=>{const{chatHasStarted:i}=r().chatbubble,{takenOver:u}=r().agent,{token:d}=r().connection,{PAT_HOST:f}=r().environment;if(n({type:c.M2,payload:{code:e}}),t||!i||u){if(i&&!await n((0,l.et)(`${f}/chatbubble/${o.Ak}/language_switch/`,{method:"POST",body:{languageCode:e},headers:(0,s.A)({token:d}).headers}))){const{currentLanguage:e}=r().chatbubble;n({type:c.M2,payload:{code:e}})}}else a.A.getInstance().getConnection().restart(!0)}},v=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{(0,r.tf)("close-chatbubble",void 0,{storeState:n(),source:e}),t({type:c.uS})}},y=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t=>{a.A.getInstance().getConnection().restart(e),t(g())}},x=()=>(e,t)=>{const{chatbubble:{chatHasStarted:n}}=t();if(!n){e({type:c.d$,chatHasStarted:!0});const t=a.A.getInstance();if(!t.getIsInitialized())return void console.warn("Connection not initialized when starting chat. Ensure Connection.initialize() is called in createStore before any chat actions.");t.getConnection().connect({shouldGreet:!0})}},w=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const{pushMessages:i,alerts:a,bot:s,nudge:l,chatbubble:{chatHasStarted:p},bot:{welcomePageType:h}}=n(),g=!p&&h!==o.Lb.NONE;(0,r.tf)("open-chatbubble",{value:{nextPage:g?"welcome-page":"chat"}},{storeState:n(),source:e}),i.show&&t({type:u.a_}),l.show&&t({type:d.X2}),(a.showTabNotification||a.showBubbleNotification)&&t({type:f.u2}),t({type:c.kA}),s.welcomePage&&s.welcomePageType!==o.Lb.NONE||t(x())}},k=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(w({source:"programmatic"})),e({type:c.hn}))},C=()=>e=>{e({type:c.HW,userIsIdle:!0})},S=e=>(e,t)=>{const{userIsIdle:n}=t().chatbubble;n&&e({type:c.HW,userIsIdle:!1})},_=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:i}}=n();(null==i||null===(r=i.contact_details)||void 0===r?void 0:r.contact_type)===(null==e||null===(o=e.contact_details)||void 0===o?void 0:o.contact_type)?t({type:c.t1}):t({type:c.Eg,button:e})},A=e=>t=>{t({type:c.FZ,button:e})},E=e=>t=>{0===e.length?t({type:c.Q4}):t({type:c.TF,files:e})},T=()=>e=>{e({type:c.YR})},j=e=>t=>{t({type:c.uA,state:e})},I=e=>t=>{t({type:c.Xu,currentModal:e})},O=e=>(t,n)=>{setTimeout(()=>{const{feedback:{feedbackToSubmit:r},chatbubble:{chatHasStarted:o}}=n();o&&!r&&(t((0,p.WG)({ratingSystem:e.rating_scale.rating_system,triggerType:e.trigger_type,formTitle:e.form_title,step:"RATING_SCALE"})),t(I("FEEDBACK_END_HANDOVER")))},2e3)},L=e=>t=>{t({type:c.XM,isChatFullWindow:e})},P=()=>e=>{e(g()),e(x())},N=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return async(n,r)=>{let a=e?await e:null;if(!a){const{connection:{token:e},environment:{PAT_HOST:n}}=r(),l=`${n}/chatbubble/${o.Ak}/privacy/export/${t}`,{headers:c}=(0,s.A)({token:e}),u={method:"GET",headers:{...c,"kindly-chat-version":"2.81.8",[i.B]:(0,i.U)()}};a=await(async(e,t)=>{let n;return fetch(e,{...t,headers:{"Content-Type":"application/json","kindly-chat-version":"2.81.8",[i.B]:(0,i.U)(),...t.headers},body:JSON.stringify(t.body)}).then(e=>{var t;if(!e.ok)throw new Error(e.statusText);const r=e.headers.get("Content-Disposition");return n=null==r||null===(t=r.split(/;(.+)/)[1])||void 0===t?void 0:t.split(/=(.+)/)[1],n=n.toLowerCase().startsWith("utf-8''")?decodeURIComponent(n.replace(/utf-8''/i,"")):n.replace(/['"]/g,""),e.blob()}).then(e=>{var t;const r=window.URL.createObjectURL(e),o=((null===(t=window.kindlyChat)||void 0===t?void 0:t.shadowRoot)||window.document).getElementById("chatContainer"),i=document.createElement("a");i.href=r,i.download=n,o.appendChild(i),i.click(),i.remove()})})(l,u)}}},M=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:i},environment:{PAT_HOST:a}}=n(),u=`${a}/chatbubble/${o.Ak}/privacy/delete/`,d=e?await e:await t((0,l.et)(u,{method:"DELETE",...(0,s.A)({token:r})}));200===(null==d?void 0:d.status)&&(t({type:c.CB,botKey:i,keepOpen:!0}),t(h("DELETED_CHAT")))}}},6836:(e,t,n)=>{"use strict";n(4531)("isConcatSpreadable")},6848:(e,t,n)=>{"use strict";n.d(t,{EE:()=>d,Ef:()=>h,T3:()=>f,Tu:()=>p,rK:()=>g});var r=n(1197),o=n(4785),i=n(8832),a=n(1708),s=n(8663);const l=(0,r.AH)(["box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;@supports (background-color:hsl(from black h s l)){background-color:hsl(from var(--button-background-1741866936) h s calc(l * 0.88));}@supports not (background-color:hsl(from black h s l)){filter:brightness(0.9);}"]),c=(0,r.AH)(["--button-background-1741866936:",";--button-color-1741866936:",";position:relative;display:flex;font-weight:normal;color:var(--button-color-1741866936);background-color:var(--button-background-1741866936);box-shadow:",";opacity:",";justify-content:",";align-items:center;text-align:center;transition:all 0.2s ease;"," outline:none;@media (pointer:coarse){user-select:none;-webkit-touch-callout:none;}&:active,&:hover,&:focus-visible{","}&:focus-visible{&::after{content:'';position:absolute;inset:3px;border-radius:4px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?e.panelBackground:n?e.secondaryButtonBackground:e.buttonBackground)(t,n,r)},e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?(0,s.w5)(e.panelBackground,a.AV.light,a.AV.dark):n?(0,s.w5)(e.secondaryButtonBackground,a.AV.light,a.AV.dark):e.buttonText)(t,n,r)},e=>{let{$flat:t,$disabled:n}=e;return t||n?"none":"0 1px 4px 0 rgba(0, 0, 0, 0.08)"},e=>{let{$loading:t}=e;return t?.6:1},e=>{let{$isCheckbox:t}=e;return t?"flex-start":"center"},e=>e.$selected&&l,l),u=(0,r.AH)(["",";padding:8px 12px;font-size:var(--_kindlychat-font-size-p);max-width:100%;font-family:",";& svg{margin-left:",";}&:disabled{opacity:0.5;cursor:not-allowed;}"],c,e=>{let{theme:t}=e;return t.customFont?t.customFont:o.m.default},e=>{let{$isCheckbox:t}=e;return t?"0px":"6px"}),d=r.Ay.span.withConfig({componentId:"sc-1jzjzva-0"})(["display:flex;max-width:100%;justify-content:center;align-items:center;"]),f=r.Ay.span.withConfig({componentId:"sc-1jzjzva-1"})(["overflow-wrap:normal;text-overflow:ellipsis;overflow:hidden;"]),p=r.Ay.span.withConfig({componentId:"sc-1jzjzva-2"})(["display:inline-flex;align-items:center;justify-content:center;"]),h=(0,r.Ay)(i.$n).withConfig({componentId:"sc-1jzjzva-3"})(["",""],u),g=r.Ay.a.withConfig({componentId:"sc-1jzjzva-4"})([""," "," text-decoration:none;"],i.k5,u)},6865:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{title:t="File attachment",...n}=e;return(0,r.jsxs)("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("path",{d:"m19.25 11.951-6.117 5.91c-1.917 1.852-5.027 1.852-6.945 0a4.632 4.632 0 0 1 .018-6.729L8.36 9.075m0 0 .493-.471m-.493.47 3.491-3.372c1.313-1.268 3.44-1.268 4.752 0a3.17 3.17 0 0 1-.012 4.603l-3.238 3.095M8.36 9.075l-.417.403m5.41 3.922.367-.354m-.367.354-2.47 2.387a1.86 1.86 0 0 1-2.565 0 1.711 1.711 0 0 1 0-2.479l4.727-4.566",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]})}},6885:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>u,II:()=>s,MM:()=>a,MU:()=>o,M_:()=>r,c6:()=>l,nz:()=>i,we:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",i="HANDOVER_REQUESTED",a="HANDOVER_CANCELLED",s="HANDOVER",l="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="UPDATE_HANDOVER_QUEUE"},6925:(e,t,n)=>{"use strict";var r=n(9098),o=n(5024),i=n(9989).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},6939:(e,t,n)=>{"use strict";e.exports=n(5813)},6974:(e,t,n)=>{"use strict";var r=n(9907),o=n(7967),i=n(9155),a=n(9514);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function c(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function u(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(s(188))}function f(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=f(e)))return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope");var E=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var T=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var j=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function L(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case b:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList";case E:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case m:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:L(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return L(e(t))}catch(e){}}return null}var P=Array.isArray,N=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},R=[],$=-1;function D(e){return{current:e}}function F(e){0>$||(e.current=R[$],R[$]=null,$--)}function B(e,t){$++,R[$]=e.current,e.current=t}var H,U,V=D(null),W=D(null),G=D(null),q=D(null);function K(e,t){switch(B(G,t),B(W,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=vd(t=bd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(V),B(V,e)}function Y(){F(V),F(W),F(G)}function X(e){null!==e.memoizedState&&B(q,e);var t=V.current,n=vd(t,e.type);t!==n&&(B(W,e),B(V,n))}function Q(e){W.current===e&&(F(V),F(W)),q.current===e&&(F(q),df._currentValue=z)}function Z(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",U=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+U}var J=!1;function ee(e,t){if(!e||J)return"";J=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],s=i[1];if(a&&s){var l=a.split("\n"),c=s.split("\n");for(o=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===l.length||o===c.length)for(r=l.length-1,o=c.length-1;1<=r&&0<=o&&l[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(l[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||l[r]!==c[o]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Z(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return Z(e.type);case 16:return Z("Lazy");case 13:return e.child!==t&&null!==t?Z("Suspense Fallback"):Z("Suspense");case 19:return Z("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return Z("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var re=Object.prototype.hasOwnProperty,oe=o.unstable_scheduleCallback,ie=o.unstable_cancelCallback,ae=o.unstable_shouldYield,se=o.unstable_requestPaint,le=o.unstable_now,ce=o.unstable_getCurrentPriorityLevel,ue=o.unstable_ImmediatePriority,de=o.unstable_UserBlockingPriority,fe=o.unstable_NormalPriority,pe=o.unstable_LowPriority,he=o.unstable_IdlePriority,ge=o.log,me=o.unstable_setDisableYieldValue,be=null,ve=null;function ye(e){if("function"==typeof ge&&me(e),ve&&"function"==typeof ve.setStrictMode)try{ve.setStrictMode(be,e)}catch(e){}}var xe=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(we(e)/ke|0)|0},we=Math.log,ke=Math.LN2,Ce=256,Se=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~i)?o=Ae(r):0!==(a&=s)?o=Ae(a):n||0!==(n=s&~e)&&(o=Ae(n)):0!==(s=r&~i)?o=Ae(s):0!==a?o=Ae(a):n||0!==(n=r&~e)&&(o=Ae(n)),0===o?0:0!==t&&t!==o&&0===(t&i)&&((i=o&-o)>=(n=t&-t)||32===i&&4194048&n)?t:o}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ie(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Le(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Ne(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Me(e,t){var n=t&-t;return 0!==((n=42&n?1:ze(n))&(e.suspendedLanes|t))?0:n}function ze(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Re(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function $e(){var e=M.p;return 0!==e?e:void 0===(e=window.event)?32:_f(e.type)}function De(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Fe=Math.random().toString(36).slice(2),Be="__reactFiber$"+Fe,He="__reactProps$"+Fe,Ue="__reactContainer$"+Fe,Ve="__reactEvents$"+Fe,We="__reactListeners$"+Fe,Ge="__reactHandles$"+Fe,qe="__reactResources$"+Fe,Ke="__reactMarker$"+Fe;function Ye(e){delete e[Be],delete e[He],delete e[Ve],delete e[We],delete e[Ge]}function Xe(e){var t=e[Be];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Be]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=zd(e);null!==e;){if(n=e[Be])return n;e=zd(e)}return t}n=(e=n).parentNode}return null}function Qe(e){if(e=e[Be]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Ze(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(s(33))}function Je(e){var t=e[qe];return t||(t=e[qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ke]=!0}var tt=new Set,nt={};function rt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var it=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),at={},st={};function lt(e,t,n){if(o=t,re.call(st,o)||!re.call(at,o)&&(it.test(o)?st[o]=!0:(at[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ft(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function pt(e){if(!e._valueTracker){var t=ft(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ft(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var mt=/[\n"\\]/g;function bt(e){return e.replace(mt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function vt(e,t,n,r,o,i,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?xt(e,a,dt(t)):null!=n?xt(e,a,dt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=i&&(e.defaultChecked=!!i),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function yt(e,t,n,r,o,i,a,s){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return void pt(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a),pt(e)}function xt(e,t,n){"number"===t&&gt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function kt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Ct(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(s(92));if(P(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),pt(e)}function St(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function At(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||_t.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Et(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(s(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&At(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&At(e,i,t[i])}function Tt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return It.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Lt(){}var Pt=null;function Nt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Mt=null,zt=null;function Rt(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[He]||null;if(!o)throw Error(s(90));vt(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ht(r)}break e;case"textarea":kt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var $t=!1;function Dt(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(null!==Mt||null!==zt)&&(Jc(),Mt&&(t=Mt,e=zt,zt=Mt=null,Rt(t),e)))for(t=0;t<e.length;t++)Rt(e[t])}}function Ft(e,t){var n=e.stateNode;if(null===n)return null;var r=n[He]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(s(231,t,typeof n));return n}var Bt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ht=!1;if(Bt)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch(e){Ht=!1}var Vt=null,Wt=null,Gt=null;function qt(){if(Gt)return Gt;var e,t,n=Wt,r=n.length,o="value"in Vt?Vt.value:Vt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Gt=o.slice(e,1<t?1-t:void 0)}function Kt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Xt(){return!1}function Qt(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Yt:Xt,this.isPropagationStopped=Xt,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Zt,Jt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Qt(tn),rn=p({},tn,{view:0,detail:0}),on=Qt(rn),an=p({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Zt=e.screenX-en.screenX,Jt=e.screenY-en.screenY):Jt=Zt=0,en=e),Zt)},movementY:function(e){return"movementY"in e?e.movementY:Jt}}),sn=Qt(an),ln=Qt(p({},an,{dataTransfer:0})),cn=Qt(p({},rn,{relatedTarget:0})),un=Qt(p({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Qt(p({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),fn=Qt(p({},tn,{data:0})),pn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=gn[e])&&!!t[e]}function bn(){return mn}var vn=Qt(p({},rn,{key:function(e){if(e.key){var t=pn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Kt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?hn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bn,charCode:function(e){return"keypress"===e.type?Kt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Kt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),yn=Qt(p({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=Qt(p({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bn})),wn=Qt(p({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=Qt(p({},an,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Cn=Qt(p({},tn,{newState:0,oldState:0})),Sn=[9,13,27,32],_n=Bt&&"CompositionEvent"in window,An=null;Bt&&"documentMode"in document&&(An=document.documentMode);var En=Bt&&"TextEvent"in window&&!An,Tn=Bt&&(!_n||An&&8<An&&11>=An),jn=String.fromCharCode(32),In=!1;function On(e,t){switch(e){case"keyup":return-1!==Sn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ln(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Pn=!1,Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function zn(e,t,n,r){Mt?zt?zt.push(r):zt=[r]:Mt=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rn=null,$n=null;function Dn(e){Yu(e,0)}function Fn(e){if(ht(Ze(e)))return e}function Bn(e,t){if("change"===e)return t}var Hn=!1;if(Bt){var Un;if(Bt){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Un=Vn}else Un=!1;Hn=Un&&(!document.documentMode||9<document.documentMode)}function Gn(){Rn&&(Rn.detachEvent("onpropertychange",qn),$n=Rn=null)}function qn(e){if("value"===e.propertyName&&Fn($n)){var t=[];zn(t,$n,e,Nt(e)),Dt(Dn,t)}}function Kn(e,t,n){"focusin"===e?(Gn(),$n=n,(Rn=t).attachEvent("onpropertychange",qn)):"focusout"===e&&Gn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Fn($n)}function Xn(e,t){if("click"===e)return Fn(t)}function Qn(e,t){if("input"===e||"change"===e)return Fn(t)}var Zn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Jn(e,t){if(Zn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!re.call(t,o)||!Zn(e[o],t[o]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ir=Bt&&"documentMode"in document&&11>=document.documentMode,ar=null,sr=null,lr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==ar||ar!==gt(r)||(r="selectionStart"in(r=ar)&&or(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},lr&&Jn(lr,r)||(lr=r,0<(r=rd(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},hr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return pr[e]=n[t];return e}Bt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var mr=gr("animationend"),br=gr("animationiteration"),vr=gr("animationstart"),yr=gr("transitionrun"),xr=gr("transitionstart"),wr=gr("transitioncancel"),kr=gr("transitionend"),Cr=new Map,Sr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Cr.set(e,t),rt(t,[e])}Sr.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof r&&"function"==typeof r.emit)return void r.emit("uncaughtException",e);console.error(e)},Er=[],Tr=0,jr=0;function Ir(){for(var e=Tr,t=jr=Tr=0;t<e;){var n=Er[t];Er[t++]=null;var r=Er[t];Er[t++]=null;var o=Er[t];Er[t++]=null;var i=Er[t];if(Er[t++]=null,null!==r&&null!==o){var a=r.pending;null===a?o.next=o:(o.next=a.next,a.next=o),r.pending=o}0!==i&&Nr(n,o,i)}}function Or(e,t,n,r){Er[Tr++]=e,Er[Tr++]=t,Er[Tr++]=n,Er[Tr++]=r,jr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Lr(e,t,n,r){return Or(e,t,n,r),Mr(e)}function Pr(e,t){return Or(e,null,null,t),Mr(e)}function Nr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(o=!0)),e=i,i=i.return;return 3===e.tag?(i=e.stateNode,o&&null!==t&&(o=31-xe(n),null===(r=(e=i.hiddenUpdates)[o])?e[o]=[t]:r.push(t),t.lane=536870912|n),i):null}function Mr(e){if(50<Vc)throw Vc=0,Wc=null,Error(s(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var zr={};function Rr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(e,t,n,r){return new Rr(e,t,n,r)}function Dr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fr(e,t){var n=e.alternate;return null===n?((n=$r(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Br(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hr(e,t,n,r,o,i){var a=0;if(r=e,"function"==typeof e)Dr(e)&&(a=1);else if("string"==typeof e)a=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,V.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case E:return(e=$r(31,n,t,o)).elementType=E,e.lanes=i,e;case b:return Ur(n.children,o,i,t);case v:a=8,o|=24;break;case y:return(e=$r(12,n,t,2|o)).elementType=y,e.lanes=i,e;case C:return(e=$r(13,n,t,o)).elementType=C,e.lanes=i,e;case S:return(e=$r(19,n,t,o)).elementType=S,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:a=10;break e;case x:a=9;break e;case k:a=11;break e;case _:a=14;break e;case A:a=16,r=null;break e}a=29,n=Error(s(130,null===e?"null":typeof e,"")),r=null}return(t=$r(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ur(e,t,n,r){return(e=$r(7,e,r,t)).lanes=n,e}function Vr(e,t,n){return(e=$r(6,e,null,t)).lanes=n,e}function Wr(e){var t=$r(18,null,null,0);return t.stateNode=e,t}function Gr(e,t,n){return(t=$r(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qr=new WeakMap;function Kr(e,t){if("object"==typeof e&&null!==e){var n=qr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},qr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Yr=[],Xr=0,Qr=null,Zr=0,Jr=[],eo=0,to=null,no=1,ro="";function oo(e,t){Yr[Xr++]=Zr,Yr[Xr++]=Qr,Qr=e,Zr=t}function io(e,t,n){Jr[eo++]=no,Jr[eo++]=ro,Jr[eo++]=to,to=e;var r=no;e=ro;var o=32-xe(r)-1;r&=~(1<<o),n+=1;var i=32-xe(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,no=1<<32-xe(t)+o|n<<o|r,ro=i+e}else no=1<<i|n<<o|r,ro=e}function ao(e){null!==e.return&&(oo(e,1),io(e,1,0))}function so(e){for(;e===Qr;)Qr=Yr[--Xr],Yr[Xr]=null,Zr=Yr[--Xr],Yr[Xr]=null;for(;e===to;)to=Jr[--eo],Jr[eo]=null,ro=Jr[--eo],Jr[eo]=null,no=Jr[--eo],Jr[eo]=null}function lo(e,t){Jr[eo++]=no,Jr[eo++]=ro,Jr[eo++]=to,no=t.id,ro=t.overflow,to=e}var co=null,uo=null,fo=!1,po=null,ho=!1,go=Error(s(519));function mo(e){throw ko(Kr(Error(s(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),go}function bo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Be]=e,t[He]=r,n){case"dialog":Xu("cancel",t),Xu("close",t);break;case"iframe":case"object":case"embed":Xu("load",t);break;case"video":case"audio":for(n=0;n<qu.length;n++)Xu(qu[n],t);break;case"source":Xu("error",t);break;case"img":case"image":case"link":Xu("error",t),Xu("load",t);break;case"details":Xu("toggle",t);break;case"input":Xu("invalid",t),yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xu("invalid",t);break;case"textarea":Xu("invalid",t),Ct(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||cd(t.textContent,n)?(null!=r.popover&&(Xu("beforetoggle",t),Xu("toggle",t)),null!=r.onScroll&&Xu("scroll",t),null!=r.onScrollEnd&&Xu("scrollend",t),null!=r.onClick&&(t.onclick=Lt),t=!0):t=!1,t||mo(e,!0)}function vo(e){for(co=e.return;co;)switch(co.tag){case 5:case 31:case 13:return void(ho=!1);case 27:case 3:return void(ho=!0);default:co=co.return}}function yo(e){if(e!==co)return!1;if(!fo)return vo(e),fo=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||yd(e.type,e.memoizedProps)),t=!t),t&&uo&&mo(e),vo(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));uo=Md(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));uo=Md(e)}else 27===n?(n=uo,Ad(e.type)?(e=Nd,Nd=null,uo=e):uo=n):uo=co?Pd(e.stateNode.nextSibling):null;return!0}function xo(){uo=co=null,fo=!1}function wo(){var e=po;return null!==e&&(null===Ic?Ic=e:Ic.push.apply(Ic,e),po=null),e}function ko(e){null===po?po=[e]:po.push(e)}var Co=D(null),So=null,_o=null;function Ao(e,t,n){B(Co,t._currentValue),t._currentValue=n}function Eo(e){e._currentValue=Co.current,F(Co)}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jo(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){var i=o.dependencies;if(null!==i){var a=o.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=o;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),To(i.return,n,e),r||(a=null);break e}i=l.next}}else if(18===o.tag){if(null===(a=o.return))throw Error(s(341));a.lanes|=n,null!==(i=a.alternate)&&(i.lanes|=n),To(a,n,e),a=null}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}function Io(e,t,n,r){e=null;for(var o=t,i=!1;null!==o;){if(!i)if(524288&o.flags)i=!0;else if(262144&o.flags)break;if(10===o.tag){var a=o.alternate;if(null===a)throw Error(s(387));if(null!==(a=a.memoizedProps)){var l=o.type;Zn(o.pendingProps.value,a.value)||(null!==e?e.push(l):e=[l])}}else if(o===q.current){if(null===(a=o.alternate))throw Error(s(387));a.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(null!==e?e.push(df):e=[df])}o=o.return}null!==e&&jo(t,e,n,r),t.flags|=262144}function Oo(e){for(e=e.firstContext;null!==e;){if(!Zn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Lo(e){So=e,_o=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Po(e){return Mo(So,e)}function No(e,t){return null===So&&Lo(e),Mo(e,t)}function Mo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===_o){if(null===e)throw Error(s(308));_o=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _o=_o.next=t;return n}var zo="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ro=o.unstable_scheduleCallback,$o=o.unstable_NormalPriority,Do={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new zo,data:new Map,refCount:0}}function Bo(e){e.refCount--,0===e.refCount&&Ro($o,function(){e.controller.abort()})}var Ho=null,Uo=0,Vo=0,Wo=null;function Go(){if(0===--Uo&&null!==Ho){null!==Wo&&(Wo.status="fulfilled");var e=Ho;Ho=null,Vo=0,Wo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var qo=N.S;N.S=function(e,t){Pc=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ho){var n=Ho=[];Uo=0,Vo=Hu(),Wo={status:"pending",value:void 0,then:function(e){n.push(e)}}}Uo++,t.then(Go,Go)}(0,t),null!==qo&&qo(e,t)};var Ko=D(null);function Yo(){var e=Ko.current;return null!==e?e:hc.pooledCache}function Xo(e,t){B(Ko,null===t?Ko.current:t.pool)}function Qo(){var e=Yo();return null===e?null:{parent:Do._currentValue,pool:e}}var Zo=Error(s(460)),Jo=Error(s(474)),ei=Error(s(542)),ti={then:function(){}};function ni(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ri(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Lt,Lt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw si(e=t.reason),e;default:if("string"==typeof t.status)t.then(Lt,Lt);else{if(null!==(e=hc)&&100<e.shellSuspendCounter)throw Error(s(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw si(e=t.reason),e}throw ii=t,Zo}}function oi(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw ii=e,Zo;throw e}}var ii=null;function ai(){if(null===ii)throw Error(s(459));var e=ii;return ii=null,e}function si(e){if(e===Zo||e===ei)throw Error(s(483))}var li=null,ci=0;function ui(e){var t=ci;return ci+=1,null===li&&(li=[]),ri(li,e,t)}function di(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fi(e,t){if(t.$$typeof===h)throw Error(s(525));throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(e,t){return(e=Fr(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Vr(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===b?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===A&&oi(i)===t.type)?(di(t=o(t,n.props),n),t.return=e,t):(di(t=Hr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gr(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Ur(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Vr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case g:return di(n=Hr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case m:return(t=Gr(t,e.mode,n)).return=e,t;case A:return f(e,t=oi(t),n)}if(P(t)||I(t))return(t=Ur(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,ui(t),n);if(t.$$typeof===w)return f(e,No(e,t),n);fi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case g:return n.key===o?c(e,t,n,r):null;case m:return n.key===o?u(e,t,n,r):null;case A:return p(e,t,n=oi(n),r)}if(P(n)||I(n))return null!==o?null:d(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,ui(n),r);if(n.$$typeof===w)return p(e,t,No(e,n),r);fi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case g:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case m:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return h(e,t,n,r=oi(r),o)}if(P(r)||I(r))return d(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return h(e,t,n,ui(r),o);if(r.$$typeof===w)return h(e,t,n,No(t,r),o);fi(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===b&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case g:e:{for(var y=u.key;null!==c;){if(c.key===y){if((y=u.type)===b){if(7===c.tag){n(l,c.sibling),(d=o(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===y||"object"==typeof y&&null!==y&&y.$$typeof===A&&oi(y)===c.type){n(l,c.sibling),di(d=o(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===b?((d=Ur(u.props.children,l.mode,d,u.key)).return=l,l=d):(di(d=Hr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return a(l);case m:e:{for(y=u.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=o(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Gr(u,l.mode,d)).return=l,l=d}return a(l);case A:return v(l,c,u=oi(u),d)}if(P(u))return function(o,a,s,l){for(var c=null,u=null,d=a,g=a=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var b=p(o,d,s[g],l);if(null===b){null===d&&(d=m);break}e&&d&&null===b.alternate&&t(o,d),a=i(b,a,g),null===u?c=b:u.sibling=b,u=b,d=m}if(g===s.length)return n(o,d),fo&&oo(o,g),c;if(null===d){for(;g<s.length;g++)null!==(d=f(o,s[g],l))&&(a=i(d,a,g),null===u?c=d:u.sibling=d,u=d);return fo&&oo(o,g),c}for(d=r(d);g<s.length;g++)null!==(m=h(d,o,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),a=i(m,a,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(o,e)}),fo&&oo(o,g),c}(l,c,u,d);if(I(u)){if("function"!=typeof(y=I(u)))throw Error(s(150));return function(o,a,l,c){if(null==l)throw Error(s(151));for(var u=null,d=null,g=a,m=a=0,b=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(b=g,g=null):b=g.sibling;var y=p(o,g,v.value,c);if(null===y){null===g&&(g=b);break}e&&g&&null===y.alternate&&t(o,g),a=i(y,a,m),null===d?u=y:d.sibling=y,d=y,g=b}if(v.done)return n(o,g),fo&&oo(o,m),u;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=f(o,v.value,c))&&(a=i(v,a,m),null===d?u=v:d.sibling=v,d=v);return fo&&oo(o,m),u}for(g=r(g);!v.done;m++,v=l.next())null!==(v=h(g,o,m,v.value,c))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),a=i(v,a,m),null===d?u=v:d.sibling=v,d=v);return e&&g.forEach(function(e){return t(o,e)}),fo&&oo(o,m),u}(l,c,u=y.call(u),d)}if("function"==typeof u.then)return v(l,c,ui(u),d);if(u.$$typeof===w)return v(l,c,No(l,u),d);fi(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=o(c,u)).return=l,l=d):(n(l,c),(d=Vr(u,l.mode,d)).return=l,l=d),a(l)):n(l,c)}return function(e,t,n,r){try{ci=0;var o=v(e,t,n,r);return li=null,o}catch(t){if(t===Zo||t===ei)throw t;var i=$r(29,t,null,e.mode);return i.lanes=r,i.return=e,i}}}var hi=pi(!0),gi=pi(!1),mi=!1;function bi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Mr(e),Nr(e,null,n),t}return Or(e,r,t,n),Mr(e)}function wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}function ki(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ci=!1;function Si(){if(Ci&&null!==Wo)throw Wo}function _i(e,t,n,r){Ci=!1;var o=e.updateQueue;mi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var f=-536870913&s.lane,h=f!==s.lane;if(h?(mc&f)===f:(r&f)===f){0!==f&&f===Vo&&(Ci=!0),null!==u&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var g=e,m=s;f=t;var b=n;switch(m.tag){case 1:if("function"==typeof(g=m.payload)){d=g.call(b,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=m.payload)?g.call(b,d,f):g))break e;d=p({},d,f);break e;case 2:mi=!0}}null!==(f=s.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=o.callbacks)?o.callbacks=[f]:h.push(f))}else h={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null===i&&(o.shared.lanes=0),Sc|=a,e.lanes=a,e.memoizedState=d}}function Ai(e,t){if("function"!=typeof e)throw Error(s(191,e));e.call(t)}function Ei(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ai(n[e],t)}var Ti=D(null),ji=D(0);function Ii(e,t){B(ji,e=kc),B(Ti,t),kc=e|t.baseLanes}function Oi(){B(ji,kc),B(Ti,Ti.current)}function Li(){kc=ji.current,F(Ti),F(ji)}var Pi=D(null),Ni=null;function Mi(e){var t=e.alternate;B(Fi,1&Fi.current),B(Pi,e),null===Ni&&(null===t||null!==Ti.current||null!==t.memoizedState)&&(Ni=e)}function zi(e){B(Fi,Fi.current),B(Pi,e),null===Ni&&(Ni=e)}function Ri(e){22===e.tag?(B(Fi,Fi.current),B(Pi,e),null===Ni&&(Ni=e)):$i()}function $i(){B(Fi,Fi.current),B(Pi,Pi.current)}function Di(e){F(Pi),Ni===e&&(Ni=null),F(Fi)}var Fi=D(0);function Bi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Od(n)||Ld(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hi=0,Ui=null,Vi=null,Wi=null,Gi=!1,qi=!1,Ki=!1,Yi=0,Xi=0,Qi=null,Zi=0;function Ji(){throw Error(s(321))}function ea(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function ta(e,t,n,r,o,i){return Hi=i,Ui=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=null===e||null===e.memoizedState?ms:bs,Ki=!1,i=n(r,o),Ki=!1,qi&&(i=ra(t,n,r,o)),na(e),i}function na(e){N.H=gs;var t=null!==Vi&&null!==Vi.next;if(Hi=0,Wi=Vi=Ui=null,Gi=!1,Xi=0,Qi=null,t)throw Error(s(300));null===e||Ps||null!==(e=e.dependencies)&&Oo(e)&&(Ps=!0)}function ra(e,t,n,r){Ui=e;var o=0;do{if(qi&&(Qi=null),Xi=0,qi=!1,25<=o)throw Error(s(301));if(o+=1,Wi=Vi=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}N.H=vs,i=t(n,r)}while(qi);return i}function oa(){var e=N.H,t=e.useState()[0];return t="function"==typeof t.then?ua(t):t,e=e.useState()[0],(null!==Vi?Vi.memoizedState:null)!==e&&(Ui.flags|=1024),t}function ia(){var e=0!==Yi;return Yi=0,e}function aa(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function sa(e){if(Gi){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Gi=!1}Hi=0,Wi=Vi=Ui=null,qi=!1,Xi=Yi=0,Qi=null}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wi?Ui.memoizedState=Wi=e:Wi=Wi.next=e,Wi}function ca(){if(null===Vi){var e=Ui.alternate;e=null!==e?e.memoizedState:null}else e=Vi.next;var t=null===Wi?Ui.memoizedState:Wi.next;if(null!==t)Wi=t,Vi=e;else{if(null===e){if(null===Ui.alternate)throw Error(s(467));throw Error(s(310))}e={memoizedState:(Vi=e).memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},null===Wi?Ui.memoizedState=Wi=e:Wi=Wi.next=e}return Wi}function ua(e){var t=Xi;return Xi+=1,null===Qi&&(Qi=[]),e=ri(Qi,e,t),t=Ui,null===(null===Wi?t.memoizedState:Wi.next)&&(t=t.alternate,N.H=null===t||null===t.memoizedState?ms:bs),e}function da(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ua(e);if(e.$$typeof===w)return Po(e)}throw Error(s(438,String(e)))}function fa(e){var t=null,n=Ui.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ui.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=T;return t.index++,n}function pa(e,t){return"function"==typeof t?t(e):t}function ha(e){return ga(ca(),Vi,e)}function ga(e,t,n){var r=e.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,null===o)e.memoizedState=i;else{var l=a=null,c=null,u=t=o.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(mc&f)===f:(Hi&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Vo&&(d=!0);else{if((Hi&p)===p){u=u.next,p===Vo&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,a=i):c=c.next=f,Ui.lanes|=p,Sc|=p}f=u.action,Ki&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=p,a=i):c=c.next=p,Ui.lanes|=f,Sc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?a=i:c.next=l,!Zn(i,e.memoizedState)&&(Ps=!0,d&&null!==(n=Wo)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=c,r.lastRenderedState=i}return null===o&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ma(e){var t=ca(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);Zn(i,t.memoizedState)||(Ps=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ba(e,t,n){var r=Ui,o=ca(),i=fo;if(i){if(void 0===n)throw Error(s(407));n=n()}else n=t();var a=!Zn((Vi||o).memoizedState,n);if(a&&(o.memoizedState=n,Ps=!0),o=o.queue,Ha(xa.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==Wi&&1&Wi.memoizedState.tag){if(r.flags|=2048,Ra(9,{destroy:void 0},ya.bind(null,r,o,n,t),null),null===hc)throw Error(s(349));i||127&Hi||va(r,t,n)}return n}function va(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ui.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ya(e,t,n,r){t.value=n,t.getSnapshot=r,wa(t)&&ka(e)}function xa(e,t,n){return n(function(){wa(t)&&ka(e)})}function wa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch(e){return!0}}function ka(e){var t=Pr(e,2);null!==t&&Kc(t,0,2)}function Ca(e){var t=la();if("function"==typeof e){var n=e;if(e=n(),Ki){ye(!0);try{n()}finally{ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:e},t}function Sa(e,t,n,r){return e.baseState=n,ga(e,Vi,"function"==typeof r?r:pa)}function _a(e,t,n,r,o){if(fs(e))throw Error(s(485));if(null!==(e=t.action)){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==N.T?n(!0):i.isTransition=!1,r(i),null===(n=t.pending)?(i.next=t.pending=i,Aa(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Aa(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=N.T,a={};N.T=a;try{var s=n(o,r),l=N.S;null!==l&&l(a,s),Ea(e,t,s)}catch(n){ja(e,t,n)}finally{null!==i&&null!==a.types&&(i.types=a.types),N.T=i}}else try{Ea(e,t,i=n(o,r))}catch(n){ja(e,t,n)}}function Ea(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ta(e,t,n)},function(n){return ja(e,t,n)}):Ta(e,t,n)}function Ta(e,t,n){t.status="fulfilled",t.value=n,Ia(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Aa(e,n)))}function ja(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ia(t),t=t.next}while(t!==r)}e.action=null}function Ia(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oa(e,t){return t}function La(e,t){if(fo){var n=hc.formState;if(null!==n){e:{var r=Ui;if(fo){if(uo){t:{for(var o=uo,i=ho;8!==o.nodeType;){if(!i){o=null;break t}if(null===(o=Pd(o.nextSibling))){o=null;break t}}o="F!"===(i=o.data)||"F"===i?o:null}if(o){uo=Pd(o.nextSibling),r="F!"===o.data;break e}}mo(r)}r=!1}r&&(t=n[0])}}return(n=la()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:t},n.queue=r,n=cs.bind(null,Ui,r),r.dispatch=n,r=Ca(!1),i=ds.bind(null,Ui,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=la()).queue=o,n=_a.bind(null,Ui,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Pa(e){return Na(ca(),Vi,e)}function Na(e,t,n){if(t=ga(e,t,Oa)[0],e=ha(pa)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ua(t)}catch(e){if(e===Zo)throw ei;throw e}else r=t;var o=(t=ca()).queue,i=o.dispatch;return n!==t.memoizedState&&(Ui.flags|=2048,Ra(9,{destroy:void 0},Ma.bind(null,o,n),null)),[r,i,e]}function Ma(e,t){e.action=t}function za(e){var t=ca(),n=Vi;if(null!==n)return Na(t,n,e);ca(),t=t.memoizedState;var r=(n=ca()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ra(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ui.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $a(){return ca().memoizedState}function Da(e,t,n,r){var o=la();Ui.flags|=e,o.memoizedState=Ra(1|t,{destroy:void 0},n,void 0===r?null:r)}function Fa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=o.memoizedState.inst;null!==Vi&&null!==r&&ea(r,Vi.memoizedState.deps)?o.memoizedState=Ra(t,i,n,r):(Ui.flags|=e,o.memoizedState=Ra(1|t,i,n,r))}function Ba(e,t){Da(8390656,8,e,t)}function Ha(e,t){Fa(2048,8,e,t)}function Ua(e){var t=ca().memoizedState;return function(e){Ui.flags|=4;var t=Ui.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&pc)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Va(e,t){return Fa(4,2,e,t)}function Wa(e,t){return Fa(4,4,e,t)}function Ga(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function qa(e,t,n){n=null!=n?n.concat([e]):null,Fa(4,4,Ga.bind(null,t,e),n)}function Ka(){}function Ya(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ea(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ea(t,r[1]))return r[0];if(r=e(),Ki){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r}function Qa(e,t,n){return void 0===n||1073741824&Hi&&!(261930&mc)?e.memoizedState=t:(e.memoizedState=n,e=qc(),Ui.lanes|=e,Sc|=e,n)}function Za(e,t,n,r){return Zn(n,t)?n:null!==Ti.current?(e=Qa(e,n,r),Zn(e,t)||(Ps=!0),e):42&Hi&&(!(1073741824&Hi)||261930&mc)?(e=qc(),Ui.lanes|=e,Sc|=e,t):(Ps=!0,e.memoizedState=n)}function Ja(e,t,n,r,o){var i=M.p;M.p=0!==i&&8>i?i:8;var a,s,l,c=N.T,u={};N.T=u,ds(e,!1,t,n);try{var d=o(),f=N.S;null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?us(e,t,(a=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Gc()):us(e,t,r,Gc())}catch(n){us(e,t,{then:function(){},status:"rejected",reason:n},Gc())}finally{M.p=i,null!==c&&null!==u.types&&(c.types=u.types),N.T=c}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(s(476));var o=ns(e).queue;Ja(e,o,t,z,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:z},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Gc())}function os(){return Po(df)}function is(){return ca().memoizedState}function as(){return ca().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Gc(),r=xi(t,e=yi(n),n);return null!==r&&(Kc(r,0,n),wi(r,t,n)),t={cache:Fo()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Gc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fs(e)?ps(t,n):null!==(n=Lr(e,t,n,r))&&(Kc(n,0,r),hs(n,t,r))}function cs(e,t,n){us(e,t,n,Gc())}function us(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fs(e))ps(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Zn(s,a))return Or(e,t,o,0),null===hc&&Ir(),!1}catch(e){}if(null!==(n=Lr(e,t,o,r)))return Kc(n,0,r),hs(n,t,r),!0}return!1}function ds(e,t,n,r){if(r={lane:2,revertLane:Hu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(s(479))}else null!==(t=Lr(e,n,r,2))&&Kc(t,0,2)}function fs(e){var t=e.alternate;return e===Ui||null!==t&&t===Ui}function ps(e,t){qi=Gi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hs(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}var gs={readContext:Po,use:da,useCallback:Ji,useContext:Ji,useEffect:Ji,useImperativeHandle:Ji,useLayoutEffect:Ji,useInsertionEffect:Ji,useMemo:Ji,useReducer:Ji,useRef:Ji,useState:Ji,useDebugValue:Ji,useDeferredValue:Ji,useTransition:Ji,useSyncExternalStore:Ji,useId:Ji,useHostTransitionStatus:Ji,useFormState:Ji,useActionState:Ji,useOptimistic:Ji,useMemoCache:Ji,useCacheRefresh:Ji};gs.useEffectEvent=Ji;var ms={readContext:Po,use:da,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:Ba,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Da(4194308,4,Ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){Da(4,2,e,t)},useMemo:function(e,t){var n=la();t=void 0===t?null:t;var r=e();if(Ki){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=la();if(void 0!==n){var o=n(t);if(Ki){ye(!0);try{n(t)}finally{ye(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=ls.bind(null,Ui,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},la().memoizedState=e},useState:function(e){var t=(e=Ca(e)).queue,n=cs.bind(null,Ui,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ka,useDeferredValue:function(e,t){return Qa(la(),e,t)},useTransition:function(){var e=Ca(!1);return e=Ja.bind(null,Ui,e.queue,!0,!1),la().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ui,o=la();if(fo){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===hc)throw Error(s(349));127&mc||va(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ba(xa.bind(null,r,i,e),[e]),r.flags|=2048,Ra(9,{destroy:void 0},ya.bind(null,r,i,n,t),null),n},useId:function(){var e=la(),t=hc.identifierPrefix;if(fo){var n=ro;t="_"+t+"R_"+(n=(no&~(1<<32-xe(no)-1)).toString(32)+n),0<(n=Yi++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Zi++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:os,useFormState:La,useActionState:La,useOptimistic:function(e){var t=la();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,Ui,!0,n),n.dispatch=t,[e,t]},useMemoCache:fa,useCacheRefresh:function(){return la().memoizedState=ss.bind(null,Ui)},useEffectEvent:function(e){var t=la(),n={impl:e};return t.memoizedState=n,function(){if(2&pc)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},bs={readContext:Po,use:da,useCallback:Ya,useContext:Po,useEffect:Ha,useImperativeHandle:qa,useInsertionEffect:Va,useLayoutEffect:Wa,useMemo:Xa,useReducer:ha,useRef:$a,useState:function(){return ha(pa)},useDebugValue:Ka,useDeferredValue:function(e,t){return Za(ca(),Vi.memoizedState,e,t)},useTransition:function(){var e=ha(pa)[0],t=ca().memoizedState;return["boolean"==typeof e?e:ua(e),t]},useSyncExternalStore:ba,useId:is,useHostTransitionStatus:os,useFormState:Pa,useActionState:Pa,useOptimistic:function(e,t){return Sa(ca(),0,e,t)},useMemoCache:fa,useCacheRefresh:as};bs.useEffectEvent=Ua;var vs={readContext:Po,use:da,useCallback:Ya,useContext:Po,useEffect:Ha,useImperativeHandle:qa,useInsertionEffect:Va,useLayoutEffect:Wa,useMemo:Xa,useReducer:ma,useRef:$a,useState:function(){return ma(pa)},useDebugValue:Ka,useDeferredValue:function(e,t){var n=ca();return null===Vi?Qa(n,e,t):Za(n,Vi.memoizedState,e,t)},useTransition:function(){var e=ma(pa)[0],t=ca().memoizedState;return["boolean"==typeof e?e:ua(e),t]},useSyncExternalStore:ba,useId:is,useHostTransitionStatus:os,useFormState:za,useActionState:za,useOptimistic:function(e,t){var n=ca();return null!==Vi?Sa(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fa,useCacheRefresh:as};function ys(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:p({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=Ua;var xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gc(),o=yi(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Kc(t,0,r),wi(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gc(),o=yi(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Kc(t,0,r),wi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gc(),r=yi(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xi(e,r,n))&&(Kc(t,0,n),wi(t,e,n))}};function ws(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Jn(n,r)&&Jn(o,i))}function ks(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function Cs(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=p({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}function Ss(e){Ar(e)}function _s(e){console.error(e)}function As(e){Ar(e)}function Es(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ts(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function js(e,t,n){return(n=yi(n)).tag=3,n.payload={element:null},n.callback=function(){Es(e,t)},n}function Is(e){return(e=yi(e)).tag=3,e}function Os(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Ts(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Ts(t,n,r),"function"!=typeof o&&(null===zc?zc=new Set([this]):zc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ls=Error(s(461)),Ps=!1;function Ns(e,t,n,r){t.child=null===e?gi(t,null,n,r):hi(t,e.child,n,r)}function Ms(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Lo(t),r=ta(e,t,n,a,i,o),s=ia(),null===e||Ps?(fo&&s&&ao(t),t.flags|=1,Ns(e,t,r,o),t.child):(aa(e,t,o),ol(e,t,o))}function zs(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Dr(i)||void 0!==i.defaultProps||null!==n.compare?((e=Hr(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Rs(e,t,i,r,o))}if(i=e.child,!il(e,o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Jn)(a,r)&&e.ref===t.ref)return ol(e,t,o)}return t.flags|=1,(e=Fr(i,r)).ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Jn(i,r)&&e.ref===t.ref){if(Ps=!1,t.pendingProps=r=i,!il(e,o))return t.lanes=e.lanes,ol(e,t,o);131072&e.flags&&(Ps=!0)}}return Vs(e,t,n,r,o)}function $s(e,t,n,r){var o=r.children,i=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(i=null!==i?i.baseLanes|n:n,null!==e){for(r=t.child=e.child,o=0;null!==r;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return Fs(e,t,i,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Fs(e,t,null!==i?i.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Xo(0,null!==i?i.cachePool:null),null!==i?Ii(t,i):Oi(),Ri(t)}else null!==i?(Xo(0,i.cachePool),Ii(t,i),$i(),t.memoizedState=null):(null!==e&&Xo(0,null),Oi(),$i());return Ns(e,t,o,n),t.child}function Ds(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fs(e,t,n,r,o){var i=Yo();return i=null===i?null:{parent:Do._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Xo(0,null),Oi(),Ri(t),null!==e&&Io(e,t,r,!0),t.childLanes=o,null}function Bs(e,t){return(t=Js({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Hs(e,t,n){return hi(t,e.child,null,n),(e=Bs(t,t.pendingProps)).flags|=2,Di(t),t.memoizedState=null,e}function Us(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(s(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Vs(e,t,n,r,o){return Lo(t),n=ta(e,t,n,r,void 0,o),r=ia(),null===e||Ps?(fo&&r&&ao(t),t.flags|=1,Ns(e,t,n,o),t.child):(aa(e,t,o),ol(e,t,o))}function Ws(e,t,n,r,o,i){return Lo(t),t.updateQueue=null,n=ra(t,r,n,o),na(e),r=ia(),null===e||Ps?(fo&&r&&ao(t),t.flags|=1,Ns(e,t,n,i),t.child):(aa(e,t,i),ol(e,t,i))}function Gs(e,t,n,r,o){if(Lo(t),null===t.stateNode){var i=zr,a=n.contextType;"object"==typeof a&&null!==a&&(i=Po(a)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=xs,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},bi(t),a=n.contextType,i.context="object"==typeof a&&null!==a?Po(a):zr,i.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(ys(t,n,a,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(a=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),a!==i.state&&xs.enqueueReplaceState(i,i.state,null),_i(t,r,i,o),Si(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var s=t.memoizedProps,l=Cs(n,s);i.props=l;var c=i.context,u=n.contextType;a=zr,"object"==typeof u&&null!==u&&(a=Po(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s||c!==a)&&ks(t,i,r,a),mi=!1;var f=t.memoizedState;i.state=f,_i(t,r,i,o),Si(),c=t.memoizedState,s||f!==c||mi?("function"==typeof d&&(ys(t,n,d,r),c=t.memoizedState),(l=mi||ws(t,n,l,r,f,c,a))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,vi(e,t),u=Cs(n,a=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,l=zr,"object"==typeof c&&null!==c&&(l=Po(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(a!==d||f!==l)&&ks(t,i,r,l),mi=!1,f=t.memoizedState,i.state=f,_i(t,r,i,o),Si();var p=t.memoizedState;a!==d||f!==p||mi||null!==e&&null!==e.dependencies&&Oo(e.dependencies)?("function"==typeof s&&(ys(t,n,s,r),p=t.memoizedState),(u=mi||ws(t,n,u,r,f,p,l)||null!==e&&null!==e.dependencies&&Oo(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Us(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=hi(t,e.child,null,o),t.child=hi(t,null,n,o)):Ns(e,t,n,o),t.memoizedState=i.state,e=t.child):e=ol(e,t,o),e}function qs(e,t,n,r){return xo(),t.flags|=256,Ns(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ys(e){return{baseLanes:e,cachePool:Qo()}}function Xs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Ec),e}function Qs(e,t,n){var r,o=t.pendingProps,i=!1,a=!!(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&!!(2&Fi.current)),r&&(i=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(fo){if(i?Mi(t):$i(),(e=uo)?null!==(e=null!==(e=Id(e,ho))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw mo(t);return Ld(e)?t.lanes=32:t.lanes=536870912,null}var l=o.children;return o=o.fallback,i?($i(),l=Js({mode:"hidden",children:l},i=t.mode),o=Ur(o,i,n,null),l.return=t,o.return=t,l.sibling=o,t.child=l,(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Ks,Ds(null,o)):(Mi(t),Zs(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(a)256&t.flags?(Mi(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?($i(),t.child=e.child,t.flags|=128,t=null):($i(),l=o.fallback,i=t.mode,o=Js({mode:"visible",children:o.children},i),(l=Ur(l,i,n,null)).flags|=2,o.return=t,l.return=t,o.sibling=l,t.child=o,hi(t,e.child,null,n),(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Ks,t=Ds(null,o));else if(Mi(t),Ld(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(o=Error(s(419))).stack="",o.digest=r,ko({value:o,source:null,stack:null}),t=el(e,t,n)}else if(Ps||Io(e,t,n,!1),r=0!==(n&e.childLanes),Ps||r){if(null!==(r=hc)&&0!==(o=Me(r,n))&&o!==c.retryLane)throw c.retryLane=o,Pr(e,o),Kc(r,0,o),Ls;Od(l)||au(),t=el(e,t,n)}else Od(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,uo=Pd(l.nextSibling),co=t,fo=!0,po=null,ho=!1,null!==e&&lo(t,e),(t=Zs(t,o.children)).flags|=4096);return t}return i?($i(),l=o.fallback,i=t.mode,u=(c=e.child).sibling,(o=Fr(c,{mode:"hidden",children:o.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Fr(u,l):(l=Ur(l,i,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,Ds(null,o),o=t.child,null===(l=e.child.memoizedState)?l=Ys(n):(null!==(i=l.cachePool)?(c=Do._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Qo(),l={baseLanes:l.baseLanes|n,cachePool:i}),o.memoizedState=l,o.childLanes=Xs(e,r,n),t.memoizedState=Ks,Ds(e.child,o)):(Mi(t),e=(n=e.child).sibling,(n=Fr(n,{mode:"visible",children:o.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Zs(e,t){return(t=Js({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Js(e,t){return(e=$r(22,e,null,t)).lanes=0,e}function el(e,t,n){return hi(t,e.child,null,n),(e=Zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function nl(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.treeForkCount=i)}function rl(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var a=Fi.current,s=!!(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,B(Fi,a),Ns(e,t,r,n),r=fo?Zr:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Bi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),nl(t,!1,o,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Bi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}nl(t,!0,n,null,i,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Sc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Io(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Fr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function il(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Oo(e))}function al(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ps=!0;else{if(!(il(e,n)||128&t.flags))return Ps=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ao(0,Do,e.memoizedState.cache),xo();break;case 27:case 5:X(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ao(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,zi(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Mi(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Qs(e,t,n):(Mi(t),null!==(e=ol(e,t,n))?e.sibling:null);Mi(t);break;case 19:var o=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Io(e,t,n,!1),r=0!==(n&t.childLanes)),o){if(r)return rl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),B(Fi,Fi.current),r)break;return null;case 22:return t.lanes=0,$s(e,t,n,t.pendingProps);case 24:Ao(0,Do,e.memoizedState.cache)}return ol(e,t,n)}(e,t,n);Ps=!!(131072&e.flags)}else Ps=!1,fo&&1048576&t.flags&&io(t,Zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=oi(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var o=e.$$typeof;if(o===k){t.tag=11,t=Ms(null,t,e,r,n);break e}if(o===_){t.tag=14,t=zs(null,t,e,r,n);break e}}throw t=L(e)||e,Error(s(306,t,""))}Dr(e)?(r=Cs(e,r),t.tag=1,t=Gs(null,t,e,r,n)):(t.tag=0,t=Vs(null,t,e,r,n))}return t;case 0:return Vs(e,t,t.type,t.pendingProps,n);case 1:return Gs(e,t,r=t.type,o=Cs(r,t.pendingProps),n);case 3:e:{if(K(t,t.stateNode.containerInfo),null===e)throw Error(s(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,vi(e,t),_i(t,r,null,n);var a=t.memoizedState;if(r=a.cache,Ao(0,Do,r),r!==i.cache&&jo(t,[Do],n,!0),Si(),r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=qs(e,t,r,n);break e}if(r!==o){ko(o=Kr(Error(s(424)),t)),t=qs(e,t,r,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,uo=Pd(e.firstChild),co=t,fo=!0,po=null,ho=!0,n=gi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xo(),r===o){t=ol(e,t,n);break e}Ns(e,t,r,n)}t=t.child}return t;case 26:return Us(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:fo||(n=t.type,e=t.pendingProps,(r=md(G.current).createElement(n))[Be]=t,r[He]=e,fd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),null===e&&fo&&(r=t.stateNode=Rd(t.type,t.pendingProps,G.current),co=t,ho=!0,o=uo,Ad(t.type)?(Nd=o,uo=Pd(r.firstChild)):uo=o),Ns(e,t,t.pendingProps.children,n),Us(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&fo&&((o=r=uo)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(null==o.href||""===o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===i)return e}if(null===(e=Pd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,ho))?(t.stateNode=r,co=t,uo=Pd(r.firstChild),ho=!1,o=!0):o=!1),o||mo(t)),X(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,r=i.children,yd(o,i)?r=null:null!==a&&yd(o,a)&&(t.flags|=32),null!==t.memoizedState&&(o=ta(e,t,oa,null,null,n),df._currentValue=o),Us(e,t),Ns(e,t,r,n),t.child;case 6:return null===e&&fo&&((e=n=uo)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Pd(e.nextSibling)))return null}return e}(n,t.pendingProps,ho))?(t.stateNode=n,co=t,uo=null,e=!0):e=!1),e||mo(t)),null;case 13:return Qs(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=hi(t,null,r,n):Ns(e,t,r,n),t.child;case 11:return Ms(e,t,t.type,t.pendingProps,n);case 7:return Ns(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ns(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ao(0,t.type,r.value),Ns(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Lo(t),r=r(o=Po(o)),t.flags|=1,Ns(e,t,r,n),t.child;case 14:return zs(e,t,t.type,t.pendingProps,n);case 15:return Rs(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,o=!!(128&t.flags);if(t.flags&=-129,null===e){if(fo){if("hidden"===r.mode)return e=Bs(t,r),t.lanes=536870912,Ds(null,e);if(zi(t),(e=uo)?null!==(e=null!==(e=Id(e,ho))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw mo(t);return t.lanes=536870912,null}return Bs(t,r)}var i=e.memoizedState;if(null!==i){var a=i.dehydrated;if(zi(t),o)if(256&t.flags)t.flags&=-257,t=Hs(e,t,n);else{if(null===t.memoizedState)throw Error(s(558));t.child=e.child,t.flags|=128,t=null}else if(Ps||Io(e,t,n,!1),o=0!==(n&e.childLanes),Ps||o){if(null!==(r=hc)&&0!==(a=Me(r,n))&&a!==i.retryLane)throw i.retryLane=a,Pr(e,a),Kc(r,0,a),Ls;au(),t=Hs(e,t,n)}else e=i.treeContext,uo=Pd(a.nextSibling),co=t,fo=!0,po=null,ho=!1,null!==e&&lo(t,e),(t=Bs(t,r)).flags|=4096;return t}return(e=Fr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return $s(e,t,n,t.pendingProps);case 24:return Lo(t),r=Po(Do),null===e?(null===(o=Yo())&&(o=hc,i=Fo(),o.pooledCache=i,i.refCount++,null!==i&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},bi(t),Ao(0,Do,o)):(0!==(e.lanes&n)&&(vi(e,t),_i(t,null,null,n),Si()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=o),Ao(0,Do,r)):(r=i.cache,Ao(0,Do,r),r!==o.cache&&jo(t,[Do],n,!0))),Ns(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,o){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&o)===o)if(e.stateNode.complete)e.flags|=8192;else{if(!ru())throw ii=ti,Jo;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!of(t)){if(!ru())throw ii=ti,Jo;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ie():536870912,e.lanes|=t,Tc|=t)}function dl(e,t){if(!fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=65011712&o.subtreeFlags,r|=65011712&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pl(e,t,n){var r=t.pendingProps;switch(so(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Eo(Do),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(yo(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wo())),fl(t),null;case 26:var o=t.type,i=t.memoizedState;return null===e?(sl(t),null!==i?(fl(t),cl(t,i)):(fl(t),ll(t,o,0,0,n))):i?i!==e.memoizedState?(sl(t),fl(t),cl(t,i)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),fl(t),ll(t,o,0,0,n)),null;case 27:if(Q(t),n=G.current,o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}e=V.current,yo(t)?bo(t):(e=Rd(o,r,n),t.stateNode=e,sl(t))}return fl(t),null;case 5:if(Q(t),o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}if(i=V.current,yo(t))bo(t);else{var a=md(G.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":(i=a.createElement("div")).innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof r.is?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"==typeof r.is?a.createElement(o,{is:r.is}):a.createElement(o)}}i[Be]=t,i[He]=r;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)i.appendChild(a.stateNode);else if(4!==a.tag&&27!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(fd(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return fl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=G.current,yo(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=co))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Be]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cd(e.nodeValue,n)))||mo(t,!0)}else(e=md(e).createTextNode(r))[Be]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=yo(t),null!==n){if(null===e){if(!r)throw Error(s(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(557));e[Be]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Di(t),t):(Di(t),null);if(128&t.flags)throw Error(s(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=yo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(s(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(s(317));o[Be]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),o=!1}else o=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return 256&t.flags?(Di(t),t):(Di(t),null)}return Di(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(o=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return Y(),null===e&&Ju(t.stateNode.containerInfo),fl(t),null;case 10:return Eo(t.type),fl(t),null;case 19:if(F(Fi),null===(r=t.memoizedState))return fl(t),null;if(o=!!(128&t.flags),null===(i=r.rendering))if(o)dl(r,!1);else{if(0!==Cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=Bi(e))){for(t.flags|=128,dl(r,!1),e=i.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Br(n,e),n=n.sibling;return B(Fi,1&Fi.current|2),fo&&oo(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Nc&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Bi(i))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!fo)return fl(t),null}else 2*le()-r.renderingStartTime>Nc&&536870912!==n&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Fi.current,B(Fi,o?1&n|2:1&n),fo&&oo(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return Di(t),Li(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&ul(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&F(Ko),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Eo(Do),fl(t),null;case 25:case 30:return null}throw Error(s(156,t.tag))}function hl(e,t){switch(so(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Eo(Do),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Q(t),null;case 31:if(null!==t.memoizedState){if(Di(t),null===t.alternate)throw Error(s(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Di(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return F(Fi),null;case 4:return Y(),null;case 10:return Eo(t.type),null;case 22:case 23:return Di(t),Li(),null!==e&&F(Ko),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Eo(Do),null;default:return null}}function gl(e,t){switch(so(t),t.tag){case 3:Eo(Do),Y();break;case 26:case 27:case 5:Q(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Di(t);break;case 13:Di(t);break;case 19:F(Fi);break;case 10:Eo(t.type);break;case 22:case 23:Di(t),Li(),null!==e&&F(Ko);break;case 24:Eo(Do)}}function ml(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(e){Cu(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,o=t;var l=n,c=s;try{c()}catch(e){Cu(o,l,e)}}}r=r.next}while(r!==i)}}catch(e){Cu(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ei(t,n)}catch(t){Cu(e,e.return,t)}}}function yl(e,t,n){n.props=Cs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Cu(e,t,n)}}function xl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){Cu(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){Cu(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){Cu(e,t,n)}else n.current=null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Cu(e,e.return,t)}}function Cl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,l=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(h)||ud(e,t,h,null,r,f)}}for(var p in r){var h=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":i=h;break;case"name":o=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":a=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(s(137,t));break;default:h!==f&&ud(e,t,p,h,r,f)}}return void vt(e,a,l,c,u,d,i,o);case"select":for(i in h=a=l=p=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":h=c;default:r.hasOwnProperty(i)||ud(e,t,i,null,r,c)}for(o in r)if(i=r[o],c=n[o],r.hasOwnProperty(o)&&(null!=i||null!=c))switch(o){case"value":p=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:i!==c&&ud(e,t,o,i,r,c)}return t=l,n=a,r=h,void(null!=p?wt(e,!!n,p,!1):!!r!=!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in h=p=null,n)if(o=n[l],n.hasOwnProperty(l)&&null!=o&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:ud(e,t,l,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(null!=o||null!=i))switch(a){case"value":p=o;break;case"defaultValue":h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(s(91));break;default:o!==i&&ud(e,t,a,o,r,i)}return void kt(e,p,h);case"option":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:ud(e,t,g,null,r,p));for(c in r)p=r[c],h=n[c],!r.hasOwnProperty(c)||p===h||null==p&&null==h||("selected"===c?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:ud(e,t,c,p,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m)&&ud(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(s(137,t));break;default:ud(e,t,u,p,r,h)}return;default:if(Tt(t)){for(var b in n)p=n[b],n.hasOwnProperty(b)&&void 0!==p&&!r.hasOwnProperty(b)&&dd(e,t,b,void 0,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||dd(e,t,d,p,r,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&ud(e,t,v,null,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||null==p&&null==h||ud(e,t,f,p,r,h)}(r,e.type,n,t),r[He]=t}catch(t){Cu(e,e.return,t)}}function Sl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _l(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Lt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function El(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(El(e,t,n),e=e.sibling;null!==e;)El(e,t,n),e=e.sibling}function Tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);fd(t,r,n),t[Be]=e,t[He]=n}catch(t){Cu(e,e.return,t)}}var jl=!1,Il=!1,Ol=!1,Ll="function"==typeof WeakSet?WeakSet:Set,Pl=null;function Nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Kl(e,n),4&r&&ml(5,n);break;case 1:if(Kl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){Cu(n,n.return,e)}else{var o=Cs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Cu(n,n.return,e)}}64&r&&vl(n),512&r&&xl(n,n.return);break;case 3:if(Kl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ei(e,t)}catch(e){Cu(n,n.return,e)}}break;case 27:null===t&&4&r&&Tl(n);case 26:case 5:Kl(e,n),null===t&&4&r&&kl(n),512&r&&xl(n,n.return);break;case 12:Kl(e,n);break;case 31:Kl(e,n),4&r&&Fl(e,n);break;case 13:Kl(e,n),4&r&&Bl(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Eu.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||jl)){t=null!==t&&null!==t.memoizedState||Il,o=jl;var i=Il;jl=r,(Il=t)&&!i?Xl(e,n,!!(8772&n.subtreeFlags)):Kl(e,n),jl=o,Il=i}break;case 30:break;default:Kl(e,n)}}function Ml(e){var t=e.alternate;null!==t&&(e.alternate=null,Ml(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ye(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var zl=null,Rl=!1;function $l(e,t,n){for(n=n.child;null!==n;)Dl(e,t,n),n=n.sibling}function Dl(e,t,n){if(ve&&"function"==typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(be,n)}catch(e){}switch(n.tag){case 26:Il||wl(n,t),$l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Il||wl(n,t);var r=zl,o=Rl;Ad(n.type)&&(zl=n.stateNode,Rl=!1),$l(e,t,n),$d(n.stateNode),zl=r,Rl=o;break;case 5:Il||wl(n,t);case 6:if(r=zl,o=Rl,zl=null,$l(e,t,n),Rl=o,null!==(zl=r))if(Rl)try{(9===zl.nodeType?zl.body:"HTML"===zl.nodeName?zl.ownerDocument.body:zl).removeChild(n.stateNode)}catch(e){Cu(n,t,e)}else try{zl.removeChild(n.stateNode)}catch(e){Cu(n,t,e)}break;case 18:null!==zl&&(Rl?(Ed(9===(e=zl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Uf(e)):Ed(zl,n.stateNode));break;case 4:r=zl,o=Rl,zl=n.stateNode.containerInfo,Rl=!0,$l(e,t,n),zl=r,Rl=o;break;case 0:case 11:case 14:case 15:bl(2,n,t),Il||bl(4,n,t),$l(e,t,n);break;case 1:Il||(wl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&yl(n,t,r)),$l(e,t,n);break;case 21:$l(e,t,n);break;case 22:Il=(r=Il)||null!==n.memoizedState,$l(e,t,n),Il=r;break;default:$l(e,t,n)}}function Fl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{Uf(e)}catch(e){Cu(t,t.return,e)}}}function Bl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{Uf(e)}catch(e){Cu(t,t.return,e)}}function Hl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ll),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ll),t;default:throw Error(s(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tu.bind(null,e,t);t.then(r,r)}})}function Ul(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r],i=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 27:if(Ad(l.type)){zl=l.stateNode,Rl=!1;break e}break;case 5:zl=l.stateNode,Rl=!1;break e;case 3:case 4:zl=l.stateNode.containerInfo,Rl=!0;break e}l=l.return}if(null===zl)throw Error(s(160));Dl(i,a,o),zl=null,Rl=!1,null!==(i=o.alternate)&&(i.return=null),o.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wl(t,e),t=t.sibling}var Vl=null;function Wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ul(t,e),Gl(e),4&r&&(bl(3,e,e.return),ml(3,e),bl(5,e,e.return));break;case 1:Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),64&r&&jl&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var o=Vl;if(Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),4&r){var i=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":(!(i=o.getElementsByTagName("title")[0])||i[Ke]||i[Be]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),fd(i,r,n),i[Be]=e,et(i),r=i;break e;case"link":var a=nf("link","href",o).get(r+(n.href||""));if(a)for(var l=0;l<a.length;l++)if((i=a[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){a.splice(l,1);break t}fd(i=o.createElement(r),r,n),o.head.appendChild(i);break;case"meta":if(a=nf("meta","content",o).get(r+(n.content||"")))for(l=0;l<a.length;l++)if((i=a[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){a.splice(l,1);break t}fd(i=o.createElement(r),r,n),o.head.appendChild(i);break;default:throw Error(s(468,r))}i[Be]=e,et(i),r=i}e.stateNode=r}else rf(o,e.type,e.stateNode);else e.stateNode=Qd(o,r,e.memoizedProps);else i!==r?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===r?rf(o,e.type,e.stateNode):Qd(o,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Cl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),null!==n&&4&r&&Cl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),32&e.flags){o=e.stateNode;try{St(o,"")}catch(t){Cu(e,e.return,t)}}4&r&&null!=e.stateNode&&Cl(e,o=e.memoizedProps,null!==n?n.memoizedProps:o),1024&r&&(Ol=!0);break;case 6:if(Ul(t,e),Gl(e),4&r){if(null===e.stateNode)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Cu(e,e.return,t)}}break;case 3:if(tf=null,o=Vl,Vl=Bd(t.containerInfo),Ul(t,e),Vl=o,Gl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Uf(t.containerInfo)}catch(t){Cu(e,e.return,t)}Ol&&(Ol=!1,ql(e));break;case 4:r=Vl,Vl=Bd(e.stateNode.containerInfo),Ul(t,e),Gl(e),Vl=r;break;case 12:default:Ul(t,e),Gl(e);break;case 31:case 19:Ul(t,e),Gl(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r));break;case 13:Ul(t,e),Gl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Lc=le()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r));break;case 22:o=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=jl,d=Il;if(jl=u||o,Il=d||c,Ul(t,e),Il=d,jl=u,Gl(e),8192&r)e:for(t=e.stateNode,t._visibility=o?-2&t._visibility:1|t._visibility,o&&(null===n||c||jl||Il||Yl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,o)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,p=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){Cu(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=o?"":c.memoizedProps}catch(e){Cu(c,c.return,e)}}}else if(18===t.tag){if(null===n){c=t;try{var h=c.stateNode;o?Td(h,!0):Td(c.stateNode,!1)}catch(e){Cu(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,Hl(e,n));case 30:case 21:}}function Gl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(Sl(r)){n=r;break}r=r.return}if(null==n)throw Error(s(160));switch(n.tag){case 27:var o=n.stateNode;El(e,_l(e),o);break;case 5:var i=n.stateNode;32&n.flags&&(St(i,""),n.flags&=-33),El(e,_l(e),i);break;case 3:case 4:var a=n.stateNode.containerInfo;Al(e,_l(e),a);break;default:throw Error(s(161))}}catch(t){Cu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ql(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ql(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Kl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Nl(e,t.alternate,t),t=t.sibling}function Yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Yl(t);break;case 1:wl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&yl(t,t.return,n),Yl(t);break;case 27:$d(t.stateNode);case 26:case 5:wl(t,t.return),Yl(t);break;case 22:null===t.memoizedState&&Yl(t);break;default:Yl(t)}e=e.sibling}}function Xl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:Xl(o,i,n),ml(4,i);break;case 1:if(Xl(o,i,n),"function"==typeof(o=(r=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(e){Cu(r,r.return,e)}if(null!==(o=(r=i).updateQueue)){var s=r.stateNode;try{var l=o.shared.hiddenCallbacks;if(null!==l)for(o.shared.hiddenCallbacks=null,o=0;o<l.length;o++)Ai(l[o],s)}catch(e){Cu(r,r.return,e)}}n&&64&a&&vl(i),xl(i,i.return);break;case 27:Tl(i);case 26:case 5:Xl(o,i,n),n&&null===r&&4&a&&kl(i),xl(i,i.return);break;case 12:Xl(o,i,n);break;case 31:Xl(o,i,n),n&&4&a&&Fl(o,i);break;case 13:Xl(o,i,n),n&&4&a&&Bl(o,i);break;case 22:null===i.memoizedState&&Xl(o,i,n),xl(i,i.return);break;case 30:break;default:Xl(o,i,n)}t=t.sibling}}function Ql(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Bo(n))}function Zl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e))}function Jl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,r),t=t.sibling}function ec(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Jl(e,t,n,r),2048&o&&ml(9,t);break;case 1:case 31:case 13:default:Jl(e,t,n,r);break;case 3:Jl(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e)));break;case 12:if(2048&o){Jl(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,s=i.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){Cu(t,t.return,e)}}else Jl(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,null!==t.memoizedState?2&i._visibility?Jl(e,t,n,r):nc(e,t):2&i._visibility?Jl(e,t,n,r):(i._visibility|=2,tc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&o&&Ql(a,t);break;case 24:Jl(e,t,n,r),2048&o&&Zl(t.alternate,t)}}function tc(e,t,n,r,o){for(o=o&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var i=e,a=t,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:tc(i,a,s,l,o),ml(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?2&u._visibility?tc(i,a,s,l,o):nc(i,a):(u._visibility|=2,tc(i,a,s,l,o)),o&&2048&c&&Ql(a.alternate,a);break;case 24:tc(i,a,s,l,o),o&&2048&c&&Zl(a.alternate,a);break;default:tc(i,a,s,l,o)}t=t.sibling}}function nc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:nc(n,r),2048&o&&Ql(r.alternate,r);break;case 24:nc(n,r),2048&o&&Zl(r.alternate,r);break;default:nc(n,r)}t=t.sibling}}var rc=8192;function oc(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;null!==e;)ic(e,t,n),e=e.sibling}function ic(e,t,n){switch(e.tag){case 26:oc(e,t,n),e.flags&rc&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var o=Gd(r.href),i=t.querySelector(qd(o));if(i)return null!==(t=i._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=sf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,void et(i);i=t.ownerDocument||t,r=Kd(r),(o=Dd.get(o))&&Jd(r,o),et(i=i.createElement("link"));var a=i;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),fd(i,"link",r),n.instance=i}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=sf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Vl,e.memoizedState,e.memoizedProps);break;case 5:default:oc(e,t,n);break;case 3:case 4:var r=Vl;Vl=Bd(e.stateNode.containerInfo),oc(e,t,n),Vl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rc,rc=16777216,oc(e,t,n),rc=r):oc(e,t,n))}}function ac(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function sc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Pl=r,uc(r,e)}ac(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&bl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Pl=r,uc(r,e)}ac(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:bl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==Pl;){var n=Pl;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Bo(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Pl=r;else e:for(n=e;null!==Pl;){var o=(r=Pl).sibling,i=r.return;if(Ml(r),r===n){Pl=null;break e}if(null!==o){o.return=i,Pl=o;break e}Pl=i}}}var dc={getCacheForType:function(e){var t=Po(Do),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Po(Do).controller.signal}},fc="function"==typeof WeakMap?WeakMap:Map,pc=0,hc=null,gc=null,mc=0,bc=0,vc=null,yc=!1,xc=!1,wc=!1,kc=0,Cc=0,Sc=0,_c=0,Ac=0,Ec=0,Tc=0,jc=null,Ic=null,Oc=!1,Lc=0,Pc=0,Nc=1/0,Mc=null,zc=null,Rc=0,$c=null,Dc=null,Fc=0,Bc=0,Hc=null,Uc=null,Vc=0,Wc=null;function Gc(){return 2&pc&&0!==mc?mc&-mc:null!==N.T?Hu():$e()}function qc(){if(0===Ec)if(536870912&mc&&!fo)Ec=536870912;else{var e=Se;!(3932160&(Se<<=1))&&(Se=262144),Ec=e}return null!==(e=Pi.current)&&(e.flags|=32),Ec}function Kc(e,t,n){(e!==hc||2!==bc&&9!==bc)&&null===e.cancelPendingCommit||(tu(e,0),Zc(e,mc,Ec,!1)),Le(e,n),2&pc&&e===hc||(e===hc&&(!(2&pc)&&(_c|=n),4===Cc&&Zc(e,mc,Ec,!1)),Mu(e))}function Yc(e,t,n){if(6&pc)throw Error(s(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||Te(e,t),o=r?function(e,t){var n=pc;pc|=2;var r=ou(),o=iu();hc!==e||mc!==t?(Mc=null,Nc=le()+500,tu(e,t)):xc=Te(e,t);e:for(;;)try{if(0!==bc&&null!==gc){t=gc;var i=vc;t:switch(bc){case 1:bc=0,vc=null,fu(e,t,i,1);break;case 2:case 9:if(ni(i)){bc=0,vc=null,du(t);break}t=function(){2!==bc&&9!==bc||hc!==e||(bc=7),Mu(e)},i.then(t,t);break e;case 3:bc=7;break e;case 4:bc=5;break e;case 7:ni(i)?(bc=0,vc=null,du(t)):(bc=0,vc=null,fu(e,t,i,7));break;case 5:var a=null;switch(gc.tag){case 26:a=gc.memoizedState;case 5:case 27:var l=gc;if(a?of(a):l.stateNode.complete){bc=0,vc=null;var c=l.sibling;if(null!==c)gc=c;else{var u=l.return;null!==u?(gc=u,pu(u)):gc=null}break t}}bc=0,vc=null,fu(e,t,i,5);break;case 6:bc=0,vc=null,fu(e,t,i,6);break;case 8:eu(),Cc=6;break e;default:throw Error(s(462))}}cu();break}catch(t){nu(e,t)}return _o=So=null,N.H=r,N.A=o,pc=n,null!==gc?0:(hc=null,mc=0,Ir(),Cc)}(e,t):su(e,t,!0),i=r;;){if(0===o){xc&&!r&&Zc(e,t,0,!1);break}if(n=e.current.alternate,!i||Qc(n)){if(2===o){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=0!=(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var l=e;o=jc;var c=l.current.memoizedState.isDehydrated;if(c&&(tu(l,a).flags|=256),2!==(a=su(l,a,!1))){if(wc&&!c){l.errorRecoveryDisabledLanes|=i,_c|=i,o=4;break e}i=Ic,Ic=o,null!==i&&(null===Ic?Ic=i:Ic.push.apply(Ic,i))}o=a}if(i=!1,2!==o)continue}}if(1===o){tu(e,0),Zc(e,t,0,!0);break}e:{switch(r=e,i=o){case 0:case 1:throw Error(s(345));case 4:if((4194048&t)!==t)break;case 6:Zc(r,t,Ec,!yc);break e;case 2:Ic=null;break;case 3:case 5:break;default:throw Error(s(329))}if((62914560&t)===t&&10<(o=Lc+300-le())){if(Zc(r,t,Ec,!yc),0!==Ee(r,0,!0))break e;Fc=t,r.timeoutHandle=wd(Xc.bind(null,r,n,Ic,Mc,Oc,t,Ec,_c,Tc,yc,i,"Throttled",-0,0),o)}else Xc(r,n,Ic,Mc,Oc,t,Ec,_c,Tc,yc,i,null,-0,0)}break}o=su(e,t,!1),i=!1}Mu(e)}function Xc(e,t,n,r,o,i,a,s,l,c,u,d,f,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){ic(t,i,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lt});var h=(62914560&i)===i?Lc-le():(4194048&i)===i?Pc-le():0;if(null!==(h=function(e,t){return e.stylesheets&&0===e.count&&cf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===af&&(af=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],i=o.transferSize,a=o.initiatorType,s=o.duration;if(i&&s&&pd(a)){for(a=0,s=o.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&pd(d)&&(a+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(i+a)/(o.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var o=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&cf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}(d,h)))return Fc=i,e.cancelPendingCommit=h(gu.bind(null,e,t,i,n,r,o,a,s,l,u,d,null,f,p)),void Zc(e,i,a,!c)}gu(e,t,i,n,r,o,a,s,l)}function Qc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Zn(i(),o))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zc(e,t,n,r){t&=~Ac,t&=~_c,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-xe(o),a=1<<i;r[i]=-1,o&=~a}0!==n&&Pe(e,n,t)}function Jc(){return!!(6&pc)||(zu(0,!1),!1)}function eu(){if(null!==gc){if(0===bc)var e=gc.return;else _o=So=null,sa(e=gc),li=null,ci=0,e=gc;for(;null!==e;)gl(e.alternate,e),e=e.return;gc=null}}function tu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,kd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Fc=0,eu(),hc=e,gc=n=Fr(e.current,null),mc=t,bc=0,vc=null,yc=!1,xc=Te(e,t),wc=!1,Tc=Ec=Ac=_c=Sc=Cc=0,Ic=jc=null,Oc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-xe(r),i=1<<o;t|=e[o],r&=~i}return kc=t,Ir(),n}function nu(e,t){Ui=null,N.H=gs,t===Zo||t===ei?(t=ai(),bc=3):t===Jo?(t=ai(),bc=4):bc=t===Ls?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,vc=t,null===gc&&(Cc=1,Es(e,Kr(t,e.current)))}function ru(){var e=Pi.current;return null===e||((4194048&mc)===mc?null===Ni:!!((62914560&mc)===mc||536870912&mc)&&e===Ni)}function ou(){var e=N.H;return N.H=gs,null===e?gs:e}function iu(){var e=N.A;return N.A=dc,e}function au(){Cc=4,yc||(4194048&mc)!==mc&&null!==Pi.current||(xc=!0),!(134217727&Sc)&&!(134217727&_c)||null===hc||Zc(hc,mc,Ec,!1)}function su(e,t,n){var r=pc;pc|=2;var o=ou(),i=iu();hc===e&&mc===t||(Mc=null,tu(e,t)),t=!1;var a=Cc;e:for(;;)try{if(0!==bc&&null!==gc){var s=gc,l=vc;switch(bc){case 8:eu(),a=6;break e;case 3:case 2:case 9:case 6:null===Pi.current&&(t=!0);var c=bc;if(bc=0,vc=null,fu(e,s,l,c),n&&xc){a=0;break e}break;default:c=bc,bc=0,vc=null,fu(e,s,l,c)}}lu(),a=Cc;break}catch(t){nu(e,t)}return t&&e.shellSuspendCounter++,_o=So=null,pc=r,N.H=o,N.A=i,null===gc&&(hc=null,mc=0,Ir()),a}function lu(){for(;null!==gc;)uu(gc)}function cu(){for(;null!==gc&&!ae();)uu(gc)}function uu(e){var t=al(e.alternate,e,kc);e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function du(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ws(n,t,t.pendingProps,t.type,void 0,mc);break;case 11:t=Ws(n,t,t.pendingProps,t.type.render,t.ref,mc);break;case 5:sa(t);default:gl(n,t),t=al(n,t=gc=Br(t,kc),kc)}e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function fu(e,t,n,r){_o=So=null,sa(t),li=null,ci=0;var o=t.return;try{if(function(e,t,n,r,o){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Io(t,n,o,!0),null!==(n=Pi.current)){switch(n.tag){case 31:case 13:return null===Ni?au():null===n.alternate&&0===Cc&&(Cc=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Su(e,r,o)),!1;case 22:return n.flags|=65536,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Su(e,r,o)),!1}throw Error(s(435,n.tag))}return Su(e,r,o),au(),!1}if(fo)return null!==(t=Pi.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==go&&ko(Kr(e=Error(s(422),{cause:r}),n))):(r!==go&&ko(Kr(t=Error(s(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,o&=-o,e.lanes|=o,r=Kr(r,n),ki(e,o=js(e.stateNode,r,o)),4!==Cc&&(Cc=2)),!1;var i=Error(s(520),{cause:r});if(i=Kr(i,n),null===jc?jc=[i]:jc.push(i),4!==Cc&&(Cc=2),null===t)return!0;r=Kr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,ki(n,e=js(n.stateNode,r,e)),!1;case 1:if(t=n.type,i=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===i||"function"!=typeof i.componentDidCatch||null!==zc&&zc.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,Os(o=Is(o),e,n,r),ki(n,o),!1}n=n.return}while(null!==n);return!1}(e,o,t,n,mc))return Cc=1,Es(e,Kr(n,e.current)),void(gc=null)}catch(t){if(null!==o)throw gc=o,t;return Cc=1,Es(e,Kr(n,e.current)),void(gc=null)}32768&t.flags?(fo||1===r?e=!0:xc||536870912&mc?e=!1:(yc=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=Pi.current)&&13===r.tag&&(r.flags|=16384)),hu(t,e)):pu(t)}function pu(e){var t=e;do{if(32768&t.flags)return void hu(t,yc);e=t.return;var n=pl(t.alternate,t,kc);if(null!==n)return void(gc=n);if(null!==(t=t.sibling))return void(gc=t);gc=t=e}while(null!==t);0===Cc&&(Cc=5)}function hu(e,t){do{var n=hl(e.alternate,e);if(null!==n)return n.flags&=32767,void(gc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(gc=e);gc=e=n}while(null!==e);Cc=6,gc=null}function gu(e,t,n,r,o,i,a,l,c){e.cancelPendingCommit=null;do{xu()}while(0!==Rc);if(6&pc)throw Error(s(327));if(null!==t){if(t===e.current)throw Error(s(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-xe(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Pe(e,r,0),0!==i&&0===o&&0!==e.tag&&(e.suspendedLanes|=i&~(a&~t))}(e,n,i|=jr,a,l,c),e===hc&&(gc=hc=null,mc=0),Dc=t,$c=e,Fc=n,Bc=i,Hc=o,Uc=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,oe(fe,function(){return wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=N.T,N.T=null,o=M.p,M.p=2,a=pc,pc|=4;try{!function(e,t){if(e=e.containerInfo,hd=vf,or(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==o&&3!==f.nodeType||(l=a+o),f!==i||0!==r&&3!==f.nodeType||(c=a+r),3===f.nodeType&&(a+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++d===r&&(c=a),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(gd={focusedElem:e,selectionRange:n},vf=!1,Pl=t;null!==Pl;)if(e=(t=Pl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Pl=e;else for(;null!==Pl;){switch(i=(t=Pl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(o=e[n]).ref.impl=o.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==i){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var g=Cs(n.type,o);e=r.getSnapshotBeforeUpdate(g,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Cu(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))jd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jd(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(s(163))}if(null!==(e=t.sibling)){e.return=t.return,Pl=e;break}Pl=t.return}}(e,t)}finally{pc=a,M.p=o,N.T=r}}Rc=1,mu(),bu(),vu()}}function mu(){if(1===Rc){Rc=0;var e=$c,t=Dc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=N.T,N.T=null;var r=M.p;M.p=2;var o=pc;pc|=4;try{Wl(t,e);var i=gd,a=rr(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(a!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&or(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),h=s.textContent.length,g=Math.min(l.start,h),m=void 0===l.end?g:Math.min(l.end,h);!p.extend&&g>m&&(a=m,m=g,g=a);var b=tr(s,g),v=tr(s,m);if(b&&v&&(1!==p.rangeCount||p.anchorNode!==b.node||p.anchorOffset!==b.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(b.node,b.offset),p.removeAllRanges(),g>m?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}vf=!!hd,gd=hd=null}finally{pc=o,M.p=r,N.T=n}}e.current=t,Rc=2}}function bu(){if(2===Rc){Rc=0;var e=$c,t=Dc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=N.T,N.T=null;var r=M.p;M.p=2;var o=pc;pc|=4;try{Nl(e,t.alternate,t)}finally{pc=o,M.p=r,N.T=n}}Rc=3}}function vu(){if(4===Rc||3===Rc){Rc=0,se();var e=$c,t=Dc,n=Fc,r=Uc;10256&t.subtreeFlags||10256&t.flags?Rc=5:(Rc=0,Dc=$c=null,yu(e,e.pendingLanes));var o=e.pendingLanes;if(0===o&&(zc=null),Re(n),t=t.stateNode,ve&&"function"==typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(be,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==r){t=N.T,o=M.p,M.p=2,N.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];i(s.value,{componentStack:s.stack})}}finally{N.T=t,M.p=o}}3&Fc&&xu(),Mu(e),o=e.pendingLanes,261930&n&&42&o?e===Wc?Vc++:(Vc=0,Wc=e):Vc=0,zu(0,!1)}}function yu(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Bo(t))}function xu(){return mu(),bu(),vu(),wu()}function wu(){if(5!==Rc)return!1;var e=$c,t=Bc;Bc=0;var n=Re(Fc),r=N.T,o=M.p;try{M.p=32>n?32:n,N.T=null,n=Hc,Hc=null;var i=$c,a=Fc;if(Rc=0,Dc=$c=null,Fc=0,6&pc)throw Error(s(331));var l=pc;if(pc|=4,lc(i.current),ec(i,i.current,a,n),pc=l,zu(0,!1),ve&&"function"==typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(be,i)}catch(e){}return!0}finally{M.p=o,N.T=r,yu(e,t)}}function ku(e,t,n){t=Kr(n,t),null!==(e=xi(e,t=js(e.stateNode,t,2),2))&&(Le(e,2),Mu(e))}function Cu(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zc||!zc.has(r))){e=Kr(n,e),null!==(r=xi(t,n=Is(2),2))&&(Os(n,r,t,e),Le(r,2),Mu(r));break}}t=t.return}}function Su(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(wc=!0,o.add(n),e=_u.bind(null,e,t,n),t.then(e,e))}function _u(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hc===e&&(mc&n)===n&&(4===Cc||3===Cc&&(62914560&mc)===mc&&300>le()-Lc?!(2&pc)&&tu(e,0):Ac|=n,Tc===mc&&(Tc=0)),Mu(e)}function Au(e,t){0===t&&(t=Ie()),null!==(e=Pr(e,t))&&(Le(e,t),Mu(e))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),Au(e,n)}var ju=null,Iu=null,Ou=!1,Lu=!1,Pu=!1,Nu=0;function Mu(e){e!==Iu&&null===e.next&&(null===Iu?ju=Iu=e:Iu=Iu.next=e),Lu=!0,Ou||(Ou=!0,Sd(function(){6&pc?oe(ue,Ru):$u()}))}function zu(e,t){if(!Pu&&Lu){Pu=!0;do{for(var n=!1,r=ju;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-xe(42|e)+1)-1,i=201326741&(i&=o&~(a&~s))?201326741&i|1:i?2|i:0}0!==i&&(n=!0,Bu(r,i))}else i=mc,!(3&(i=Ee(r,r===hc?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,i)||(n=!0,Bu(r,i));r=r.next}}while(n);Pu=!1}}function Ru(){$u()}function $u(){Lu=Ou=!1;var e,t=0;0!==Nu&&((e=window.event)&&"popstate"===e.type?e!==xd&&(xd=e,1):(xd=null,0))&&(t=Nu);for(var n=le(),r=null,o=ju;null!==o;){var i=o.next,a=Du(o,n);0===a?(o.next=null,null===r?ju=i:r.next=i,null===i&&(Iu=r)):(r=o,(0!==t||3&a)&&(Lu=!0)),o=i}0!==Rc&&5!==Rc||zu(t,!1),0!==Nu&&(Nu=0)}function Du(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var a=31-xe(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=je(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(n=mc,n=Ee(e,e===(t=hc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===bc||9===bc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Te(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),Re(n)){case 2:case 8:n=de;break;case 32:default:n=fe;break;case 268435456:n=he}return r=Fu.bind(null,e),n=oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Fu(e,t){if(0!==Rc&&5!==Rc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=mc;return 0===(r=Ee(e,e===hc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Yc(e,r,t),Du(e,le()),null!=e.callbackNode&&e.callbackNode===n?Fu.bind(null,e):null)}function Bu(e,t){if(xu())return null;Yc(e,t,!0)}function Hu(){if(0===Nu){var e=Vo;0===e&&(e=Ce,!(261888&(Ce<<=1))&&(Ce=256)),Nu=e}return Nu}function Uu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function Vu(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Wu=0;Wu<Sr.length;Wu++){var Gu=Sr[Wu];_r(Gu.toLowerCase(),"on"+(Gu[0].toUpperCase()+Gu.slice(1)))}_r(mr,"onAnimationEnd"),_r(br,"onAnimationIteration"),_r(vr,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(yr,"onTransitionRun"),_r(xr,"onTransitionStart"),_r(wr,"onTransitionCancel"),_r(kr,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ku=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qu));function Yu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(e){Ar(e)}o.currentTarget=null,i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(e){Ar(e)}o.currentTarget=null,i=l}}}}function Xu(e,t){var n=t[Ve];void 0===n&&(n=t[Ve]=new Set);var r=e+"__bubble";n.has(r)||(ed(t,e,2,!1),n.add(r))}function Qu(e,t,n){var r=0;t&&(r|=4),ed(n,e,r,t)}var Zu="_reactListening"+Math.random().toString(36).slice(2);function Ju(e){if(!e[Zu]){e[Zu]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Ku.has(t)||Qu(t,!1,e),Qu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Zu]||(t[Zu]=!0,Qu("selectionchange",!1,t))}}function ed(e,t,n,r){switch(_f(t)){case 2:var o=yf;break;case 8:o=xf;break;default:o=wf}n=o.bind(null,t,n,e),o=void 0,!Ht||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function td(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&a.stateNode.containerInfo===o)return;a=a.return}for(;null!==s;){if(null===(a=Xe(s)))return;if(5===(c=a.tag)||6===c||26===c||27===c){r=i=a;continue e}s=s.parentNode}}r=r.return}Dt(function(){var r=i,o=Nt(n),a=[];e:{var s=Cr.get(e);if(void 0!==s){var c=nn,u=e;switch(e){case"keypress":if(0===Kt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=xn;break;case mr:case br:case vr:c=un;break;case kr:c=wn;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=kn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=yn;break;case"toggle":case"beforetoggle":c=Cn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),p=d?null!==s?s+"Capture":null:s;d=[];for(var h,g=r;null!==g;){var m=g;if(h=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===h||null===p||null!=(m=Ft(g,p))&&d.push(nd(g,m,h)),f)break;g=g.return}0<d.length&&(s=new c(s,u,null,n,o),a.push({event:s,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Pt||!(u=n.relatedTarget||n.fromElement)||!Xe(u)&&!u[Ue])&&(c||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Xe(u):null)&&(f=l(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=sn,m="onMouseLeave",p="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(d=yn,m="onPointerLeave",p="onPointerEnter",g="pointer"),f=null==c?s:Ze(c),h=null==u?s:Ze(u),(s=new d(m,g+"leave",c,n,o)).target=f,s.relatedTarget=h,m=null,Xe(o)===r&&((d=new d(p,g+"enter",u,n,o)).target=h,d.relatedTarget=f,m=d),f=m,c&&u)e:{for(d=od,g=u,h=0,m=p=c;m;m=d(m))h++;m=0;for(var b=g;b;b=d(b))m++;for(;0<h-m;)p=d(p),h--;for(;0<m-h;)g=d(g),m--;for(;h--;){if(p===g||null!==g&&p===g.alternate){d=p;break e}p=d(p),g=d(g)}d=null}else d=null;null!==c&&id(a,s,c,d,!1),null!==u&&null!==f&&id(a,f,u,d,!0)}if("select"===(c=(s=r?Ze(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var v=Bn;else if(Mn(s))if(Hn)v=Qn;else{v=Yn;var y=Kn}else!(c=s.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?r&&Tt(r.elementType)&&(v=Bn):v=Xn;switch(v&&(v=v(e,r))?zn(a,v,n,o):(y&&y(e,s,r),"focusout"===e&&r&&"number"===s.type&&null!=r.memoizedProps.value&&xt(s,"number",s.value)),y=r?Ze(r):window,e){case"focusin":(Mn(y)||"true"===y.contentEditable)&&(ar=y,sr=r,lr=null);break;case"focusout":lr=sr=ar=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ur(a,n,o);break;case"selectionchange":if(ir)break;case"keydown":case"keyup":ur(a,n,o)}var x;if(_n)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Pn?On(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Tn&&"ko"!==n.locale&&(Pn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Pn&&(x=qt()):(Wt="value"in(Vt=o)?Vt.value:Vt.textContent,Pn=!0)),0<(y=rd(r,w)).length&&(w=new fn(w,e,null,n,o),a.push({event:w,listeners:y}),(x||null!==(x=Ln(n)))&&(w.data=x))),(x=En?function(e,t){switch(e){case"compositionend":return Ln(t);case"keypress":return 32!==t.which?null:(In=!0,jn);case"textInput":return(e=t.data)===jn&&In?null:e;default:return null}}(e,n):function(e,t){if(Pn)return"compositionend"===e||!_n&&On(e,t)?(e=qt(),Gt=Wt=Vt=null,Pn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(w=rd(r,"onBeforeInput")).length&&(y=new fn("onBeforeInput","beforeinput",null,n,o),a.push({event:y,listeners:w}),y.data=x),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var i=Uu((o[He]||null).action),a=r.submitter;a&&null!==(t=(t=a[He]||null)?Uu(t.formAction):a.getAttribute("formAction"))&&(i=t,a=null);var s=new nn("action","action",null,r,o);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Nu){var e=a?Vu(o,a):new FormData(o);ts(n,{pending:!0,data:e,method:o.method,action:i},null,e)}}else"function"==typeof i&&(s.preventDefault(),e=a?Vu(o,a):new FormData(o),ts(n,{pending:!0,data:e,method:o.method,action:i},i,e))},currentTarget:o}]})}}(a,e,r,n,o)}Yu(a,t)})}function nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rd(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;if(5!==(o=o.tag)&&26!==o&&27!==o||null===i||(null!=(o=Ft(e,n))&&r.unshift(nd(e,o,i)),null!=(o=Ft(e,t))&&r.push(nd(e,o,i))),3===e.tag)return r;e=e.return}return[]}function od(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function id(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,o?null!=(c=Ft(n,i))&&a.unshift(nd(n,c,l)):o||null!=(c=Ft(n,i))&&a.push(nd(n,c,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ad=/\r\n?/g,sd=/\u0000|\uFFFD/g;function ld(e){return("string"==typeof e?e:""+e).replace(ad,"\n").replace(sd,"")}function cd(e,t){return t=ld(t),ld(e)===t}function ud(e,t,n,r,o,i){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||St(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&St(e,""+r);break;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":Et(e,r,i);break;case"data":if("object"!==t){ct(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof i&&("formAction"===n?("input"!==t&&ud(e,t,"name",o.name,o,null),ud(e,t,"formEncType",o.formEncType,o,null),ud(e,t,"formMethod",o.formMethod,o,null),ud(e,t,"formTarget",o.formTarget,o,null)):(ud(e,t,"encType",o.encType,o,null),ud(e,t,"method",o.method,o,null),ud(e,t,"target",o.target,o,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Lt);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Ot(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xu("beforetoggle",e),Xu("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&lt(e,n=jt.get(n)||n,r)}}function dd(e,t,n,r,o,i){switch(n){case"style":Et(e,r,i);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(s(60));e.innerHTML=n}}break;case"children":"string"==typeof r?St(e,r):("number"==typeof r||"bigint"==typeof r)&&St(e,""+r);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Lt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),"function"==typeof(i=null!=(i=e[He]||null)?i[n]:null)&&e.removeEventListener(t,i,o),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o)))}}function fd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xu("error",e),Xu("load",e);var r,o=!1,i=!1;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(null!=a)switch(r){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:ud(e,t,r,a,n,null)}}return i&&ud(e,t,"srcSet",n.srcSet,n,null),void(o&&ud(e,t,"src",n.src,n,null));case"input":Xu("invalid",e);var l=r=a=i=null,c=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var d=n[o];if(null!=d)switch(o){case"name":i=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(s(137,t));break;default:ud(e,t,o,d,n,null)}}return void yt(e,r,l,c,u,a,i,!1);case"select":for(i in Xu("invalid",e),o=a=r=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":r=l;break;case"defaultValue":a=l;break;case"multiple":o=l;default:ud(e,t,i,l,n,null)}return t=r,n=a,e.multiple=!!o,void(null!=t?wt(e,!!o,t,!1):null!=n&&wt(e,!!o,n,!0));case"textarea":for(a in Xu("invalid",e),r=i=o=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]))switch(a){case"value":o=l;break;case"defaultValue":i=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(s(91));break;default:ud(e,t,a,l,n,null)}return void Ct(e,o,i,r);case"option":for(c in n)n.hasOwnProperty(c)&&null!=(o=n[c])&&("selected"===c?e.selected=o&&"function"!=typeof o&&"symbol"!=typeof o:ud(e,t,c,o,n,null));return;case"dialog":Xu("beforetoggle",e),Xu("toggle",e),Xu("cancel",e),Xu("close",e);break;case"iframe":case"object":Xu("load",e);break;case"video":case"audio":for(o=0;o<qu.length;o++)Xu(qu[o],e);break;case"image":Xu("error",e),Xu("load",e);break;case"details":Xu("toggle",e);break;case"embed":case"source":case"link":Xu("error",e),Xu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(o=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:ud(e,t,u,o,n,null)}return;default:if(Tt(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(o=n[d])&&dd(e,t,d,o,n,void 0);return}}for(l in n)n.hasOwnProperty(l)&&null!=(o=n[l])&&ud(e,t,l,o,n,null)}function pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var hd=null,gd=null;function md(e){return 9===e.nodeType?e:e.ownerDocument}function bd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function yd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xd=null,wd="function"==typeof setTimeout?setTimeout:void 0,kd="function"==typeof clearTimeout?clearTimeout:void 0,Cd="function"==typeof Promise?Promise:void 0,Sd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Cd?function(e){return Cd.resolve(null).then(e).catch(_d)}:wd;function _d(e){setTimeout(function(){throw e})}function Ad(e){return"head"===e}function Ed(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)||"/&"===n){if(0===r)return e.removeChild(o),void Uf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)$d(e.ownerDocument.documentElement);else if("head"===n){$d(n=e.ownerDocument.head);for(var i=n.firstChild;i;){var a=i.nextSibling,s=i.nodeName;i[Ke]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===i.rel.toLowerCase()||n.removeChild(i),i=a}}else"body"===n&&$d(e.ownerDocument.body);n=o}while(n);Uf(t)}function Td(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function jd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":jd(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Id(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Pd(e.nextSibling)))return null}return e}function Od(e){return"$?"===e.data||"$~"===e.data}function Ld(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Pd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Nd=null;function Md(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Pd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function zd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Rd(e,t,n){switch(t=md(n),e){case"html":if(!(e=t.documentElement))throw Error(s(452));return e;case"head":if(!(e=t.head))throw Error(s(453));return e;case"body":if(!(e=t.body))throw Error(s(454));return e;default:throw Error(s(451))}}function $d(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Dd=new Map,Fd=new Set;function Bd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=M.d;M.d={f:function(){var e=Hd.f(),t=Jc();return e||t},r:function(e){var t=Qe(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):Hd.r(e)},D:function(e){Hd.D(e),Vd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Vd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=Ud;if(r&&e&&t){var o='link[rel="preload"][as="'+bt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+bt(n.imageSizes)+'"]')):o+='[href="'+bt(e)+'"]';var i=o;switch(t){case"style":i=Gd(e);break;case"script":i=Yd(e)}Dd.has(i)||(e=p({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Dd.set(i,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(qd(i))||"script"===t&&r.querySelector(Xd(i))||(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=Ud;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+bt(r)+'"][href="'+bt(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Yd(e)}if(!Dd.has(i)&&(e=p({rel:"modulepreload",href:e},t),Dd.set(i,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xd(i)))return}fd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=Ud;if(n&&e){var r=Je(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Xd(o)))||(e=p({src:e,async:!0},t),(t=Dd.get(o))&&ef(e,t),et(i=n.createElement("script")),fd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}},S:function(e,t,n){Hd.S(e,t,n);var r=Ud;if(r&&e){var o=Je(r).hoistableStyles,i=Gd(e);t=t||"default";var a=o.get(i);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(qd(i)))s.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Dd.get(i))&&Jd(e,n);var l=a=r.createElement("link");et(l),fd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Zd(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},o.set(i,a)}}},M:function(e,t){Hd.M(e,t);var n=Ud;if(n&&e){var r=Je(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Xd(o)))||(e=p({src:e,async:!0,type:"module"},t),(t=Dd.get(o))&&ef(e,t),et(i=n.createElement("script")),fd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}};var Ud="undefined"==typeof document?null:document;function Vd(e,t,n){var r=Ud;if(r&&"string"==typeof t&&t){var o=bt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),Fd.has(o)||(Fd.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wd(e,t,n,r){var o,i,a,l,c=(c=G.current)?Bd(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Gd(n.href),(r=(n=Je(c).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Gd(n.href);var u=Je(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(qd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Dd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dd.set(e,n),u||(o=c,i=e,a=n,l=d.state,o.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=o.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),fd(i,"link",a),et(i),o.head.appendChild(i))))),t&&null===r)throw Error(s(528,""));return d}if(t&&null!==r)throw Error(s(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Yd(n),(r=(n=Je(c).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Gd(e){return'href="'+bt(e)+'"'}function qd(e){return'link[rel="stylesheet"]['+e+"]"}function Kd(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Yd(e){return'[src="'+bt(e)+'"]'}function Xd(e){return"script[async]"+e}function Qd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var o=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),fd(r,"style",o),Zd(r,n.precedence,e),t.instance=r;case"stylesheet":o=Gd(n.href);var i=e.querySelector(qd(o));if(i)return t.state.loading|=4,t.instance=i,et(i),i;r=Kd(n),(o=Dd.get(o))&&Jd(r,o),et(i=(e.ownerDocument||e).createElement("link"));var a=i;return a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),fd(i,"link",r),t.state.loading|=4,Zd(i,n.precedence,e),t.instance=i;case"script":return i=Yd(n.src),(o=e.querySelector(Xd(i)))?(t.instance=o,et(o),o):(r=n,(o=Dd.get(i))&&ef(r=p({},n),o),et(o=(e=e.ownerDocument||e).createElement("script")),fd(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Zd(r,n.precedence,e));return t.instance}function Zd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)i=s;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Jd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function ef(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var tf=null;function nf(e,t,n){if(null===tf){var r=new Map,o=tf=new Map;o.set(n,r)}else(r=(o=tf).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[Ke]||i[Be]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var a=i.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(i):r.set(a,[i])}}return r}function rf(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function of(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var af=0;function sf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)cf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var lf=null;function cf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,lf=new Map,t.forEach(uf,e),lf=null,sf.call(e))}function uf(e,t){if(!(4&t.state.loading)){var n=lf.get(e);if(n)var r=n.get(null);else{n=new Map,lf.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(o=t.instance).getAttribute("data-precedence"),(i=n.get(a)||r)===r&&n.set(null,o),n.set(a,o),this.count++,r=sf.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var df={$$typeof:w,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function ff(e,t,n,r,o,i,a,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oe(0),this.hiddenUpdates=Oe(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function pf(e,t,n,r,o,i){o=function(e){return e?e=zr:zr}(o),null===r.context?r.context=o:r.pendingContext=o,(r=yi(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=xi(e,r,t))&&(Kc(n,0,t),wi(n,e,t))}function hf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gf(e,t){hf(e,t),(e=e.alternate)&&hf(e,t)}function mf(e){if(13===e.tag||31===e.tag){var t=Pr(e,67108864);null!==t&&Kc(t,0,67108864),gf(e,67108864)}}function bf(e){if(13===e.tag||31===e.tag){var t=Gc(),n=Pr(e,t=ze(t));null!==n&&Kc(n,0,t),gf(e,t)}}var vf=!0;function yf(e,t,n,r){var o=N.T;N.T=null;var i=M.p;try{M.p=2,wf(e,t,n,r)}finally{M.p=i,N.T=o}}function xf(e,t,n,r){var o=N.T;N.T=null;var i=M.p;try{M.p=8,wf(e,t,n,r)}finally{M.p=i,N.T=o}}function wf(e,t,n,r){if(vf){var o=kf(r);if(null===o)td(e,t,r,Cf,n),Nf(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Ef=Mf(Ef,e,t,n,r,o),!0;case"dragenter":return Tf=Mf(Tf,e,t,n,r,o),!0;case"mouseover":return jf=Mf(jf,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return If.set(i,Mf(If.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Of.set(i,Mf(Of.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Nf(e,r),4&t&&-1<Pf.indexOf(e)){for(;null!==o;){var i=Qe(o);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var a=Ae(i.pendingLanes);if(0!==a){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-xe(a);s.entanglements[1]|=l,a&=~l}Mu(i),!(6&pc)&&(Nc=le()+500,zu(0,!1))}}break;case 31:case 13:null!==(s=Pr(i,2))&&Kc(s,0,2),Jc(),gf(i,2)}if(null===(i=kf(r))&&td(e,t,r,Cf,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else td(e,t,r,null,n)}}function kf(e){return Sf(e=Nt(e))}var Cf=null;function Sf(e){if(Cf=null,null!==(e=Xe(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cf=e,null}function _f(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case de:return 8;case fe:case pe:return 32;case he:return 268435456;default:return 32}default:return 32}}var Af=!1,Ef=null,Tf=null,jf=null,If=new Map,Of=new Map,Lf=[],Pf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Nf(e,t){switch(e){case"focusin":case"focusout":Ef=null;break;case"dragenter":case"dragleave":Tf=null;break;case"mouseover":case"mouseout":jf=null;break;case"pointerover":case"pointerout":If.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Of.delete(t.pointerId)}}function Mf(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=Qe(t))&&mf(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function zf(e){var t=Xe(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=c(n)))return e.blockedOn=t,void De(e.priority,function(){bf(n)})}else if(31===t){if(null!==(t=u(n)))return e.blockedOn=t,void De(e.priority,function(){bf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Rf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=kf(e.nativeEvent);if(null!==n)return null!==(t=Qe(n))&&mf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Pt=r,n.target.dispatchEvent(r),Pt=null,t.shift()}return!0}function $f(e,t,n){Rf(e)&&n.delete(t)}function Df(){Af=!1,null!==Ef&&Rf(Ef)&&(Ef=null),null!==Tf&&Rf(Tf)&&(Tf=null),null!==jf&&Rf(jf)&&(jf=null),If.forEach($f),Of.forEach($f)}function Ff(e,t){e.blockedOn===t&&(e.blockedOn=null,Af||(Af=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Df)))}var Bf=null;function Hf(e){Bf!==e&&(Bf=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Bf===e&&(Bf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if("function"!=typeof r){if(null===Sf(r||n))continue;break}var i=Qe(n);null!==i&&(e.splice(t,3),t-=3,ts(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Uf(e){function t(t){return Ff(t,e)}null!==Ef&&Ff(Ef,e),null!==Tf&&Ff(Tf,e),null!==jf&&Ff(jf,e),If.forEach(t),Of.forEach(t);for(var n=0;n<Lf.length;n++){var r=Lf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Lf.length&&null===(n=Lf[0]).blockedOn;)zf(n),null===n.blockedOn&&Lf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[He]||null;if("function"==typeof i)a||Hf(n);else if(a){var s=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[He]||null)s=a.formAction;else if(null!==Sf(o))continue}else s=a.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),Hf(n)}}}function Vf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return o=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==o&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==o&&(o(),o=null)}}}function Wf(e){this._internalRoot=e}function Gf(e){this._internalRoot=e}Gf.prototype.render=Wf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));pf(t.current,Gc(),e,t,null,null)},Gf.prototype.unmount=Wf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;pf(e.current,2,null,e,null,null),Jc(),t[Ue]=null}},Gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lf.length&&0!==t&&t<Lf[n].priority;n++);Lf.splice(n,0,e),0===n&&zf(e)}};var qf=i.version;if("19.2.3"!==qf)throw Error(s(527,qf,"19.2.3"));M.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return d(o),e;if(i===r)return d(o),t;i=i.sibling}throw Error(s(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?f(e):null)?null:e.stateNode};var Kf={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.3"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yf.isDisabled&&Yf.supportsFiber)try{be=Yf.inject(Kf),ve=Yf}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(s(299));var n,r=!1,o="",i=Ss,a=_s,l=As;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=function(e,t,n,r,o,i,a,s,l,c,u,d){return e=new ff(e,t,n,a,l,c,u,d,s),t=1,!0===i&&(t|=24),i=$r(3,null,null,t),e.current=i,i.stateNode=e,(t=Fo()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},bi(i),e}(e,1,!1,null,0,r,o,null,i,a,l,Vf),e[Ue]=t.current,Ju(e),new Wf(t)}},7013:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},7041:(e,t,n)=>{"use strict";n.d(t,{A:()=>le}),n(9155);const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:u}=Object,{apply:d,construct:f}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),f||(f=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const p=T(Array.prototype.forEach),h=T(Array.prototype.lastIndexOf),g=T(Array.prototype.pop),m=T(Array.prototype.push),b=T(Array.prototype.splice),v=T(String.prototype.toLowerCase),y=T(String.prototype.toString),x=T(String.prototype.match),w=T(String.prototype.replace),k=T(String.prototype.indexOf),C=T(String.prototype.trim),S=T(Object.prototype.hasOwnProperty),_=T(RegExp.prototype.test),A=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f(E,t)});var E;function T(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return d(e,t,r)}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;o&&o(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(i(t)||(t[r]=e),o=e)}e[o]=!0}return e}function I(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function O(e){const t=u(null);for(const[n,o]of r(e))S(e,n)&&(Array.isArray(o)?t[n]=I(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=O(o):t[n]=o);return t}function L(e,t){for(;null!==e;){const n=s(e,t);if(n){if(n.get)return T(n.get);if("function"==typeof n.value)return T(n.value)}e=a(e)}return function(){return null}}const P=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=l(["#text"]),F=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=c(/<%[\w\W]*|[\w\W]*%>/gm),G=c(/\$\{[\w\W]*/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),K=c(/^aria-[\-\w]+$/),Y=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:K,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:J,DATA_ATTR:q,DOCTYPE_NAME:Z,ERB_EXPR:W,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:V,TMPLIT_EXPR:G});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const i=o,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:d,Element:f,NodeFilter:E,NamedNodeMap:T=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:I,DOMParser:V,trustedTypes:W}=t,G=f.prototype,q=L(G,"cloneNode"),K=L(G,"remove"),X=L(G,"nextSibling"),Q=L(G,"childNodes"),J=L(G,"parentNode");if("function"==typeof c){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ne,re="";const{implementation:oe,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:se}=o,{importNode:le}=i;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&oe&&void 0!==oe.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:fe,DATA_ATTR:pe,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:be}=ee;let{IS_ALLOWED_URI:ve}=ee,ye=null;const xe=j({},[...P,...N,...M,...R,...D]);let we=null;const ke=j({},[...F,...B,...H,...U]);let Ce=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,_e=null;const Ae=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,Te=!0,je=!1,Ie=!0,Oe=!1,Le=!0,Pe=!1,Ne=!1,Me=!1,ze=!1,Re=!1,$e=!1,De=!0,Fe=!1,Be=!0,He=!1,Ue={},Ve=null;const We=j({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ge=null;const qe=j({},["audio","video","img","source","image","track"]);let Ke=null;const Ye=j({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Je=Ze,et=!1,tt=null;const nt=j({},[Xe,Qe,Ze],y);let rt=j({},["mi","mo","mn","ms","mtext"]),ot=j({},["annotation-xml"]);const it=j({},["title","style","font","a","script"]);let at=null;const st=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ut=o.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=O(e),at=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===at?y:v,ye=S(e,"ALLOWED_TAGS")?j({},e.ALLOWED_TAGS,lt):xe,we=S(e,"ALLOWED_ATTR")?j({},e.ALLOWED_ATTR,lt):ke,tt=S(e,"ALLOWED_NAMESPACES")?j({},e.ALLOWED_NAMESPACES,y):nt,Ke=S(e,"ADD_URI_SAFE_ATTR")?j(O(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,Ge=S(e,"ADD_DATA_URI_TAGS")?j(O(qe),e.ADD_DATA_URI_TAGS,lt):qe,Ve=S(e,"FORBID_CONTENTS")?j({},e.FORBID_CONTENTS,lt):We,Se=S(e,"FORBID_TAGS")?j({},e.FORBID_TAGS,lt):O({}),_e=S(e,"FORBID_ATTR")?j({},e.FORBID_ATTR,lt):O({}),Ue=!!S(e,"USE_PROFILES")&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,$e=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||Y,Je=e.NAMESPACE||Ze,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Te=!1),Re&&(ze=!0),Ue&&(ye=j({},D),we=[],!0===Ue.html&&(j(ye,P),j(we,F)),!0===Ue.svg&&(j(ye,N),j(we,B),j(we,U)),!0===Ue.svgFilters&&(j(ye,M),j(we,B),j(we,U)),!0===Ue.mathMl&&(j(ye,R),j(we,H),j(we,U))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ae.tagCheck=e.ADD_TAGS:(ye===xe&&(ye=O(ye)),j(ye,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ae.attributeCheck=e.ADD_ATTR:(we===ke&&(we=O(we)),j(we,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&j(Ke,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ve===We&&(Ve=O(Ve)),j(Ve,e.FORBID_CONTENTS,lt)),e.ADD_FORBID_CONTENTS&&(Ve===We&&(Ve=O(Ve)),j(Ve,e.ADD_FORBID_CONTENTS,lt)),Be&&(ye["#text"]=!0),Pe&&j(ye,["html","head","body"]),ye.table&&(j(ye,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(W,a)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));l&&l(e),ct=e}},pt=j({},[...N,...M,...z]),ht=j({},[...R,...$]),gt=function(e){m(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){K(e)}},mt=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||Re)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Je===Ze&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Je===Ze)try{t=(new V).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Je,"template",null);try{t.documentElement.innerHTML=et?re:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Je===Ze?se.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return ie.call(e.ownerDocument||e,e,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof T)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof d&&e instanceof d};function wt(e,t,r){p(e,e=>{e.call(n,t,r,ct)})}const kt=function(e){let t=null;if(wt(ce.beforeSanitizeElements,e,null),yt(e))return gt(e),!0;const r=lt(e.nodeName);if(wt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:ye}),Le&&e.hasChildNodes()&&!xt(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Le&&8===e.nodeType&&_(/<[/\w]/g,e.data))return gt(e),!0;if(!(Ae.tagCheck instanceof Function&&Ae.tagCheck(r))&&(!ye[r]||Se[r])){if(!Se[r]&&St(r)){if(Ce.tagNameCheck instanceof RegExp&&_(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Be&&!Ve[r]){const t=J(e)||e.parentNode,n=Q(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=q(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,X(e))}}return gt(e),!0}return e instanceof f&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=v(e.tagName),r=v(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(pt[n]):e.namespaceURI===Xe?t.namespaceURI===Ze?"math"===n:t.namespaceURI===Qe?"math"===n&&ot[r]:Boolean(ht[n]):e.namespaceURI===Ze?!(t.namespaceURI===Qe&&!ot[r])&&!(t.namespaceURI===Xe&&!rt[r])&&!ht[n]&&(it[n]||!pt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,p([ue,de,fe],e=>{t=w(t,e," ")}),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ce.afterSanitizeElements,e,null),!1):(gt(e),!0)},Ct=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Te&&!_e[t]&&_(pe,t));else if(Ee&&_(he,t));else if(Ae.attributeCheck instanceof Function&&Ae.attributeCheck(t,e));else if(!we[t]||_e[t]){if(!(St(e)&&(Ce.tagNameCheck instanceof RegExp&&_(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&_(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&_(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Ke[t]);else if(_(ve,w(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==k(n,"data:")||!Ge[e])if(je&&!_(ge,w(n,me,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&x(e,be)},_t=function(e){wt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,c=lt(a),u=l;let d="value"===a?u:C(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(ce.uponSanitizeAttribute,e,r),d=r.attrValue,!Fe||"id"!==c&&"name"!==c||(mt(a,e),d="user-content-"+d),Le&&_(/((--!?|])>)|<\/(style|title|textarea)/i,d)){mt(a,e);continue}if("attributename"===c&&x(d,"href")){mt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){mt(a,e);continue}if(!Ie&&_(/\/>/i,d)){mt(a,e);continue}Oe&&p([ue,de,fe],e=>{d=w(d,e," ")});const f=lt(e.nodeName);if(Ct(f,c,d)){if(ne&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(s);else switch(W.getAttributeType(f,c)){case"TrustedHTML":d=ne.createHTML(d);break;case"TrustedScriptURL":d=ne.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),yt(e)?gt(e):g(n.removed)}catch(t){mt(a,e)}}else mt(a,e)}wt(ce.afterSanitizeAttributes,e,null)},At=function e(t){let n=null;const r=vt(t);for(wt(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(ce.uponSanitizeShadowNode,n,null),kt(n),_t(n),n.content instanceof s&&e(n.content);wt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ne||ft(t),n.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||Se[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)r=bt("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!ze&&!Oe&&!Pe&&-1===e.indexOf("<"))return ne&&$e?ne.createHTML(e):e;if(r=bt(e),!r)return ze?null:$e?re:""}r&&Me&&gt(r.firstChild);const c=vt(He?e:r);for(;a=c.nextNode();)kt(a),_t(a),a.content instanceof s&&At(a.content);if(He)return e;if(ze){if(Re)for(l=ae.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(we.shadowroot||we.shadowrootmode)&&(l=le.call(i,l,!0)),l}let u=Pe?r.outerHTML:r.innerHTML;return Pe&&ye["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(Z,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Oe&&p([ue,de,fe],e=>{u=w(u,e," ")}),ne&&$e?ne.createHTML(u):u},n.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},n.clearConfig=function(){ct=null,Ne=!1},n.isValidAttribute=function(e,t,n){ct||ft({});const r=lt(e),o=lt(t);return Ct(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&m(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=h(ce[e],t);return-1===n?void 0:b(ce[e],n,1)[0]}return g(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const re=["form","input"],oe=["target"],ie=["action"];function ae(e){return ne.sanitize(e,{ADD_ATTR:oe,FORBID_ATTR:ie,FORBID_TAGS:re,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}})}var se=n(1085);function le(e){return(0,se.jsx)("div",{dangerouslySetInnerHTML:{__html:ae(e)}})}},7133:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(5352);const o=(e,t,n)=>{if(e.storagePath&&e.status===r.Le.CLEAN)return`${t}/chatbubble/${r.Ak}/attachment/${e.storagePath}?token=${n}`}},7150:(e,t,n)=>{"use strict";var r=n(9932),o=n(3273),i=n(5116).f,a=n(5148),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},7152:(e,t,n)=>{"use strict";n.d(t,{K_:()=>i,qQ:()=>o,zZ:()=>r});const r="UNAUTHENTICATED",o="IDENTIFIED",i="AUTHENTICATED"},7161:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7235:(e,t,n)=>{"use strict";var r=n(262),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},7251:(e,t,n)=>{"use strict";n.d(t,{U1:()=>Le,zD:()=>Fe,Z0:()=>Ge});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),i=Symbol.for("immer-state");function a(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var s=Object,l=s.getPrototypeOf,c="constructor",u="prototype",d="configurable",f="enumerable",p="writable",h="value",g=e=>!!e&&!!e[i];function m(e){return!!e&&(y(e)||_(e)||!!e[o]||!!e[c]?.[o]||A(e)||E(e))}var b=s[u][c].toString(),v=new WeakMap;function y(e){if(!e||!T(e))return!1;const t=l(e);if(null===t||t===s[u])return!0;const n=s.hasOwnProperty.call(t,c)&&t[c];if(n===Object)return!0;if(!j(n))return!1;let r=v.get(n);return void 0===r&&(r=Function.toString.call(n),v.set(n,r)),r===b}function x(e,t,n=!0){0===w(e)?(n?Reflect.ownKeys(e):s.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function w(e){const t=e[i];return t?t.type_:_(e)?1:A(e)?2:E(e)?3:0}var k=(e,t,n=w(e))=>2===n?e.has(t):s[u].hasOwnProperty.call(e,t),C=(e,t,n=w(e))=>2===n?e.get(t):e[t],S=(e,t,n,r=w(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},_=Array.isArray,A=e=>e instanceof Map,E=e=>e instanceof Set,T=e=>"object"==typeof e,j=e=>"function"==typeof e,I=e=>"boolean"==typeof e,O=e=>e.copy_||e.base_,L=e=>e.modified_?e.copy_:e.base_;function P(e,t){if(A(e))return new Map(e);if(E(e))return new Set(e);if(_(e))return Array[u].slice.call(e);const n=y(e);if(!0===t||"class_only"===t&&!n){const t=s.getOwnPropertyDescriptors(e);delete t[i];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i[p]&&(i[p]=!0,i[d]=!0),(i.get||i.set)&&(t[o]={[d]:!0,[p]:!0,[f]:i[f],[h]:e[o]})}return s.create(l(e),t)}{const t=l(e);if(null!==t&&n)return{...e};const r=s.create(t);return s.assign(r,e)}}function N(e,t=!1){return z(e)||g(e)||!m(e)||(w(e)>1&&s.defineProperties(e,{set:M,add:M,clear:M,delete:M}),s.freeze(e),t&&x(e,(e,t)=>{N(t,!0)},!1)),e}var M={[h]:function(){a(2)}};function z(e){return null===e||!T(e)||s.isFrozen(e)}var R="MapSet",$="Patches",D="ArrayMethods",F={};function B(e){const t=F[e];return t||a(0),t}var H,U=e=>!!F[e],V=()=>H;function W(e,t){t&&(e.patchPlugin_=B($),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function G(e){q(e),e.drafts_.forEach(Y),e.drafts_=null}function q(e){e===H&&(H=e.parent_)}var K=e=>H={drafts_:[],parent_:H,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:U(R)?B(R):void 0,arrayMethodsPlugin_:U(D)?B(D):void 0};function Y(e){const t=e[i];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function X(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[i].modified_&&(G(t),a(4)),m(e)&&(e=Q(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[i].base_,e,t)}else e=Q(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&N(t,n)}(t,e,!0),G(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function Q(e,t){if(z(t))return t;const n=t[i];if(!n)return re(t,e.handledSet_,e);if(!J(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);ne(n,e)}return n.copy_}function Z(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var J=(e,t)=>e.scope_===t,ee=[];function te(e,t,n,r){const o=O(e),i=e.type_;if(void 0!==r&&C(o,r,i)===t)return void S(o,r,n,i);if(!e.draftLocations_){const t=e.draftLocations_=new Map;x(o,(e,n)=>{if(g(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??ee;for(const e of a)S(o,e,n,i)}function ne(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Z(e)}}function re(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||g(e)||t.has(e)||!m(e)||z(e)||(t.add(e),x(e,(r,o)=>{if(g(o)){const t=o[i];if(J(t,n)){const n=L(t);S(e,r,n,e.type_),Z(t)}}else m(o)&&re(o,t,n)})),e}var oe={get(e,t){if(t===i)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const o=O(e);if(!k(o,t,e.type_))return function(e,t,n){const r=se(t,n);return r?h in r?r[h]:r.get?.call(e.draft_):void 0}(e,o,t);const a=o[t];if(e.finalized_||!m(a))return a;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===ae(e.base_,t)){ce(e);const n=1===e.type_?+t:t,r=ue(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in O(e),ownKeys:e=>Reflect.ownKeys(O(e)),set(e,t,n){const r=se(O(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=ae(O(e),t),s=r?.[i];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((o=n)===(a=r)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==n||k(e.base_,t,e.type_)))return!0;ce(e),le(e)}var o,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(g(n)){const o=n[i];J(o,r)&&o.callbacks_.push(function(){ce(e);const r=L(o);te(e,n,r,t)})}else m(n)&&e.callbacks_.push(function(){const o=O(e);3===e.type_?o.has(n)&&re(n,r.handledSet_,r):C(o,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&re(C(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(ce(e),void 0!==ae(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),le(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=O(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[p]:!0,[d]:1!==e.type_||"length"!==t,[f]:r[f],[h]:n[t]}:r},defineProperty(){a(11)},getPrototypeOf:e=>l(e.base_),setPrototypeOf(){a(12)}},ie={};for(let e in oe){let t=oe[e];ie[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function ae(e,t){const n=e[i];return(n?O(n):e)[t]}function se(e,t){if(!(t in e))return;let n=l(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=l(n)}}function le(e){e.modified_||(e.modified_=!0,e.parent_&&le(e.parent_))}function ce(e){e.copy_||(e.assigned_=new Map,e.copy_=P(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ue(e,t,n,r){const[o,i]=A(t)?B(R).proxyMap_(t,n):E(t)?B(R).proxySet_(t,n):function(e,t){const n=_(e),r={type_:n?1:0,scope_:t?t.scope_:V(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=oe;n&&(o=[r],i=ie);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??V()).drafts_.push(o),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const o=t;if(!o||!J(o,r))return;r.mapSetPlugin_?.fixSetContents(o);const i=L(o);te(e,o.draft_??o,i,n),ne(o,r)})}(n,i,r):i.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:t}=e;i.modified_&&t&&t.generatePatches_(i,[],e)}),o}function de(e){if(!m(e)||z(e))return e;const t=e[i];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=P(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=P(e,!0);return x(n,(e,t)=>{S(n,e,de(t))},r),t&&(t.finalized_=!1),n}ie.deleteProperty=function(e,t){return ie.set.call(this,e,t,void 0)},ie.set=function(e,t,n){return oe.set.call(this,e[0],t,n,e[0])};var fe=(new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(j(e)&&!j(t)){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let o;if(j(t)||a(6),void 0===n||j(n)||a(7),m(e)){const r=K(this),i=ue(0,e,void 0);let a=!0;try{o=t(i),a=!1}finally{a?G(r):q(r)}return W(r,n),X(o,r)}if(!e||!T(e)){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&N(o,!0),n){const t=[],r=[];B($).generateReplacementPatches_(e,o,{patches_:t,inversePatches_:r}),n(t,r)}return o}a(1)},this.produceWithPatches=(e,t)=>{if(j(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},I(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),I(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),I(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;m(e)||a(8),g(e)&&(g(t=e)||a(10),e=de(t));const n=K(this),r=ue(0,e,void 0);return r[i].isManual_=!0,q(n),r}finishDraft(e,t){const n=e&&e[i];n&&n.isManual_||a(9);const{scope_:r}=n;return W(r,t),X(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=B($).applyPatches_;return g(e)?r(e,t):this.produce(e,e=>r(e,t))}}).produce;function pe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var he=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ge=()=>Math.random().toString(36).substring(7).split("").join("."),me={INIT:`@@redux/INIT${ge()}`,REPLACE:`@@redux/REPLACE${ge()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ge()}`};function be(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ve(e,t,n){if("function"!=typeof e)throw new Error(pe(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(pe(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(pe(1));return n(ve)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error(pe(3));return o}function d(e){if("function"!=typeof e)throw new Error(pe(4));if(l)throw new Error(pe(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(pe(6));t=!1,c(),a.delete(n),i=null}}}function f(e){if(!be(e))throw new Error(pe(7));if(void 0===e.type)throw new Error(pe(8));if("string"!=typeof e.type)throw new Error(pe(17));if(l)throw new Error(pe(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return f({type:me.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(pe(10));r=e,f({type:me.REPLACE})},[he]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(pe(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[he](){return this}}}}}function ye(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function xe(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var we=xe(),ke=xe,Ce=(n(9907),"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ye:ye.apply(null,arguments)}),Se=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function _e(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Ye(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return be(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var Ae=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Ee(e){return m(e)?fe(e,()=>{}):e}function Te(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var je=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new Ae;return t&&("boolean"==typeof t?i.push(we):i.push(ke(t.extraArgument))),i},Ie=e=>t=>{setTimeout(t,e)},Oe=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new Ae(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ie(10):"callback"===e.type?e.queueNotification:Ie(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,i=!o,i&&(a||(a=!0,l(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function Le(e){const t=je(),{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!be(n))throw new Error(Ye(1));l=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:me.INIT}))throw new Error(pe(12));if(void 0===n(void 0,{type:me.PROBE_UNKNOWN_ACTION()}))throw new Error(pe(13))})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],l=n[s],c=e[s],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(pe(14));a[s]=u,i=i||u!==c}return i=i||r.length!==Object.keys(e).length,i?a:e}}(n)}c="function"==typeof r?r(t):t();let u=ye;o&&(u=Ce({trace:!1,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(pe(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=ye(...s)(o.dispatch),{...o,dispatch:i}}}(...c),f=Oe(d);return ve(l,a,u(..."function"==typeof s?s(f):f()))}function Pe(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Ye(28));if(r in t)throw new Error(Ye(29));return t[r]=n,o},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),o),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function Ne(...e){return t=>e.some(e=>((e,t)=>Se(e)?e.match(t):e(t))(e,t))}var Me=["name","message","stack","code"],ze=class{constructor(e,t){this.payload=e,this.meta=t}_type},Re=class{constructor(e,t){this.payload=e,this.meta=t}_type},$e=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Me)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},De="External signal was aborted",Fe=(()=>{function e(e,t,n){const r=_e(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=_e(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),i=_e(e+"/rejected",(e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||$e)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(s,l,c)=>{const u=n?.idGenerator?n.idGenerator(e):((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),d=new AbortController;let f,p;function h(e){p=e,d.abort()}a&&(a.aborted?h(De):a.addEventListener("abort",()=>h(De),{once:!0}));const g=async function(){let a;try{let i=n?.condition?.(e,{getState:l,extra:c});if(null!==(g=i)&&"object"==typeof g&&"function"==typeof g.then&&(i=await i),!1===i||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f,{once:!0})});s(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:l,extra:c}))),a=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new ze(e,t),fulfillWithValue:(e,t)=>new Re(e,t)})).then(t=>{if(t instanceof ze)throw t;return t instanceof Re?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof ze?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{f&&d.signal.removeEventListener("abort",f)}var g;return n&&!n.dispatchConditionRejection&&i.match(a)&&a.meta.condition||s(a),a}();return Object.assign(g,{abort:h,requestId:u,arg:e,unwrap:()=>g.then(Be)})}},{pending:o,rejected:i,fulfilled:r,settled:Ne(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Be(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var He=Symbol.for("rtk-slice-createasyncthunk");function Ue(e,t){return`${e}/${t}`}function Ve({creators:e}={}){const t=e?.asyncThunk?.[He];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(Ye(11));const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Ye(12));if(n in a.sliceCaseReducersByType)throw new Error(Ye(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function l(){const[t={},n=[],r]="function"==typeof e.extraReducers?Pe(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e){let t,[i,s,l]=Pe(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>Ee(e());else{const n=Ee(e);t=()=>n}function c(e=t(),n){let r=[i[n.type],...s.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[l]),r.reduce((e,t)=>{if(t){if(g(e)){const r=t(e,n);return void 0===r?e:r}if(m(e))return fe(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return c.getInitialState=t,c}(e.initialState)}i.forEach(r=>{const i=o[r],a={reducerName:r,type:Ue(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Ye(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?_e(e,a):_e(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Ye(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||qe,pending:s||qe,rejected:l||qe,settled:c||qe})}(a,i,s,t)});const c=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=l()),f(e,t)}function h(){return f||(f=l()),f.getInitialState()}function b(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=Te(d,r,h)),o}function o(t=c){const r=Te(u,n,()=>new WeakMap);return Te(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=We(i,t,()=>Te(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...b(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...v,...b(o,!0)}}};return v}}function We(e,t,n,r){function o(o,...i){let a=t(o);return void 0===a&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Ge=Ve();function qe(){}var{assign:Ke}=Object;function Ye(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},7279:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),i=n(2327),a=n(2876),s=n(1085);function l(e){let{name:t,control:n,options:r,validators:o,register:l,inputType:c,setError:u,clearErrors:d,trigger:f}=e;return(0,s.jsx)(s.Fragment,{children:r.map((e,p)=>(0,s.jsx)(a.B2,{children:(0,s.jsx)(i.A,{inputType:c,validators:o,register:l,value:e.value,label:e.label,id:e.id,name:t,control:n,setError:u,clearErrors:d,trigger:f,isLast:p===r.length-1})},`${e.value}_${p}`))})}const c=o().memo(l)},7312:(e,t,n)=>{"use strict";var r=n(6189);n(85),e.exports=r},7313:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},7354:e=>{e.exports=function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")},e.exports.__esModule=!0,e.exports.default=e.exports},7376:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(824),o=n(4557);let i;const a=e=>{let{trigger:t,control:n,name:a,setError:s,clearErrors:l}=e;const{errors:c,isSubmitted:u}=n?(0,r.lN)({name:a,control:n}):{errors:{},isSubmitted:!1};return e=>{var r;if(!n)return;const d={...c},f=e.target;if(null!=f&&f.validationMessage&&(null===(r=c[a])||void 0===r?void 0:r.message)!==(null==f?void 0:f.validationMessage)&&s?s(`browser_error_${a}`,{type:o.k1.BROWSER,message:f.validationMessage},{shouldFocus:!0}):l&&l(`browser_error_${a}`),u&&t){const e=d[`browser_error_${a}`];"email"===f.type&&!e&&f.value.endsWith(".")?i=setTimeout(()=>{t(a)},1e3):(i&&clearTimeout(i),t(a))}}}},7389:(e,t,n)=>{"use strict";var r=n(5024),o=n(1330),i=n(9989),a=n(7235),s=n(3273),l=n(8364);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=l(t),c=o.length,u=0;c>u;)i.f(e,n=o[u++],r[n]);return e}},7424:(e,t,n)=>{"use strict";var r=n(4531),o=n(86);r("toPrimitive"),o()},7460:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7474:(e,t,n)=>{"use strict";n.d(t,{VP:()=>a,gQ:()=>s,ku:()=>i,oI:()=>o});var r=n(3178);const o={HANDOVER:"handover",MESSAGE:"message",FEEDBACK:"feedback"},i=()=>(e,t)=>{const{show:n,dismissed:i}=t().pushMessages;i||n||e({type:r.l,pushMessageType:o.FEEDBACK})},a=e=>t=>{const{title:n,message:i}=e;t({type:r.l,pushMessageTitle:n,pushMessageType:o.MESSAGE,pushMessageText:i})},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:r.a_})}},7487:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return t?n({},e,t):e},e.exports=t.default},7501:(e,t,n)=>{"use strict";n(4531)("split")},7524:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(5396)})},7525:(e,t,n)=>{"use strict";var r=n(8900),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},7551:(e,t,n)=>{var r=n(1452),o=n(1363);e.exports=function(e,t,n){return(t=o(t))in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},7559:(e,t,n)=>{"use strict";n.d(t,{Kd:()=>c,MO:()=>a,X2:()=>r,oE:()=>s,un:()=>i,wX:()=>l,wv:()=>o});const r="DISMISS_NUDGE",o="SHOW_NUDGE",i="SHOW_CUSTOM_NUDGE",a="CTA_CLICK",s="SESSION_COMPLETION",l="COUNT_NUDGE",c="DISCOUNT_NUDGE"},7603:(e,t,n)=>{"use strict";var r=n(9098),o=n(1005).includes,i=n(1203),a=n(8137);r({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},7636:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5650);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.A)}}},7638:(e,t,n)=>{"use strict";n.d(t,{_H:()=>a,dg:()=>c,jq:()=>i,lV:()=>s,zE:()=>l});var r=n(1197),o=n(8663);const i=(0,r.AH)(["&:focus-within{outline:1px solid ",";}"],e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),a=r.Ay.div.withConfig({componentId:"sc-1n2166t-0"})(["padding:12px;box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);border-radius:6px;margin:3px 0 2px;background:",";background-color:",";"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return t.panelBackground}),s=r.Ay.form.withConfig({componentId:"sc-1n2166t-1"})(["display:flex;flex-direction:column;flex:1;",""],e=>{let{$isSubmitted:t}=e;return t?"*:invalid {\n border: 1px solid var(--panel-background-white-black-contrast-1743170834);\n }":"*:invalid {\n border: 1px solid transparent;\n }"}),l=r.Ay.div.withConfig({componentId:"sc-1n2166t-2"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;display:flex;align-items:center;color:var(--panel-background-white-black-contrast-1743170834);& > svg{margin-right:4px;& > path{stroke:var(--panel-background-white-black-contrast-1743170834);}}"]),c=r.Ay.div.withConfig({componentId:"sc-1n2166t-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:16px;& > button{&:last-child{margin-left:12px;}}"])},7639:(e,t,n)=>{"use strict";n.d(t,{T:()=>o,s:()=>r});const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},7752:(e,t,n)=>{"use strict";var r=n(262),o=n(9932),i=n(8655)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===o(e))}},7785:(e,t,n)=>{"use strict";var r=n(6100),o=n(908),i=n(2769),a=n(9932),s=n(1139),l=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||l(n,s(c))}var u=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<u;r++)if(n[r]===e)return t}}}},7912:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t,n)=>{var r;return null!==(r=t.split(".").reduce((e,t)=>e?e[t]:void 0,e))&&void 0!==r?r:n}},7931:(e,t,n)=>{"use strict";n.d(t,{Y$:()=>v,zV:()=>y,Ay:()=>x}),n(9155);var r=n(1085);function o(e){let{color:t="#333333",size:n=24}=e;return(0,r.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M6.75012 4.75C5.64555 4.75 4.75012 5.64543 4.75012 6.75V14.25C4.75012 15.3546 5.64555 16.25 6.75012 16.25H10.7501C11.3024 16.25 11.7501 16.6977 11.7501 17.25V19.25L14.9057 16.6955C15.2617 16.4073 15.706 16.25 16.1641 16.25H17.2501C18.3547 16.25 19.2501 15.3546 19.2501 14.25V6.75C19.2501 5.64543 18.3547 4.75 17.2501 4.75H6.75012Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 8.90015H14.95",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.9751 8.725V7.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13.55 8.90015C13.55 8.90015 13.55 10.6501 12.15 12.0501C10.75 13.4501 9 13.4501 9 13.4501",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2504 13.4502C14.2504 13.4502 12.5004 13.4502 11.1004 12.0502C10.8172 11.7671 10.4004 11.0002 10.4004 11.0002",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}var i=n(353);const a=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_144_28508)",children:[(0,r.jsx)("path",{d:"M6.5 5.83398L8.83333 8.00065M8.83333 8.00065L6.5 10.1673M8.83333 8.00065H3",stroke:t,strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M6.5 3.16602H11.5C12.2364 3.16602 12.8333 3.76297 12.8333 4.49935V11.4993C12.8333 12.2357 12.2364 12.8327 11.5 12.8327H6.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_144_28508",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})},s=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsxs)("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("path",{d:"M9.6875 5.10352L11.7292 6.99935L9.6875 8.89518",stroke:t,strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.583 7H6.77051",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.39551 2.77148H4.43717C3.79284 2.77148 3.27051 3.29382 3.27051 3.93815V10.0632C3.27051 10.7075 3.79284 11.2298 4.43717 11.2298H9.39551",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"})]})},l=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M4.36766 10.3092L4.04067 10.72L4.36766 10.3092ZM7.14551 11.7529C7.43546 11.7529 7.67051 11.5178 7.67051 11.2279C7.67051 10.9379 7.43546 10.7029 7.14551 10.7029V11.7529ZM10.7038 7.14453C10.7038 7.43448 10.9389 7.66953 11.2288 7.66953C11.5188 7.66953 11.7538 7.43448 11.7538 7.14453H10.7038ZM7.14551 9.7112C7.43546 9.7112 7.67051 9.47615 7.67051 9.1862C7.67051 8.89625 7.43546 8.6612 7.14551 8.6612V9.7112ZM9.54134 11.2279L9.13802 11.564C9.25642 11.706 9.44083 11.7753 9.62349 11.7464C9.80615 11.7175 9.96011 11.5946 10.0288 11.4228L9.54134 11.2279ZM11.6146 8.95896C11.8113 8.74591 11.798 8.41376 11.5849 8.21709C11.3719 8.02043 11.0397 8.03371 10.8431 8.24677L11.6146 8.95896ZM9.00716 9.76677C8.82154 9.54402 8.49049 9.51393 8.26774 9.69955C8.045 9.88517 8.0149 10.2162 8.20052 10.439L9.00716 9.76677ZM3.29551 6.9987C3.29551 4.95298 4.95395 3.29453 6.99967 3.29453V2.24453C4.37405 2.24453 2.24551 4.37308 2.24551 6.9987H3.29551ZM6.99967 3.29453C9.0454 3.29453 10.7038 4.95298 10.7038 6.9987H11.7538C11.7538 4.37308 9.62529 2.24453 6.99967 2.24453V3.29453ZM7.78717 6.41536C7.78717 6.85028 7.43459 7.20286 6.99967 7.20286V8.25286C8.01449 8.25286 8.83717 7.43018 8.83717 6.41536H7.78717ZM6.99967 7.20286C6.56476 7.20286 6.21217 6.85028 6.21217 6.41536H5.16217C5.16217 7.43018 5.98486 8.25286 6.99967 8.25286V7.20286ZM6.21217 6.41536C6.21217 5.98045 6.56476 5.62786 6.99967 5.62786V4.57786C5.98486 4.57786 5.16217 5.40055 5.16217 6.41536H6.21217ZM6.99967 5.62786C7.43459 5.62786 7.78717 5.98045 7.78717 6.41536H8.83717C8.83717 5.40055 8.01449 4.57786 6.99967 4.57786V5.62786ZM4.74663 10.6726C5.3153 10.0794 6.11405 9.7112 6.99967 9.7112V8.6612C5.81624 8.6612 4.74718 9.15479 3.9887 9.94589L4.74663 10.6726ZM6.99967 10.7029C6.1277 10.7029 5.32737 10.4022 4.69465 9.89849L4.04067 10.72C4.85255 11.3663 5.8817 11.7529 6.99967 11.7529V10.7029ZM4.69465 9.89849C3.84111 9.21898 3.29551 8.17271 3.29551 6.9987H2.24551C2.24551 8.50608 2.94767 9.84981 4.04067 10.72L4.69465 9.89849ZM6.99967 11.7529H7.14551V10.7029H6.99967V11.7529ZM10.7038 6.9987V7.14453H11.7538V6.9987H10.7038ZM6.99967 9.7112H7.14551V8.6612H6.99967V9.7112ZM10.0288 11.4228C10.2872 10.7769 10.6811 10.1608 11.0197 9.69804C11.1875 9.46874 11.3383 9.28164 11.4465 9.15264C11.5005 9.08822 11.5438 9.03852 11.5729 9.00553C11.5875 8.98904 11.5985 8.97675 11.6056 8.9689C11.6091 8.96497 11.6117 8.96216 11.6132 8.9605C11.614 8.95966 11.6145 8.95912 11.6147 8.95886C11.6148 8.95873 11.6149 8.95867 11.6149 8.95869C11.6149 8.9587 11.6148 8.95873 11.6148 8.95877C11.6148 8.95879 11.6147 8.95884 11.6147 8.95885C11.6147 8.9589 11.6146 8.95896 11.2288 8.60286C10.8431 8.24677 10.843 8.24683 10.8429 8.2469C10.8429 8.24693 10.8428 8.24701 10.8428 8.24707C10.8427 8.24719 10.8426 8.24733 10.8424 8.24748C10.8421 8.2478 10.8418 8.24819 10.8413 8.24865C10.8405 8.24957 10.8394 8.2508 10.838 8.25231C10.8352 8.25534 10.8314 8.25955 10.8266 8.26489C10.8169 8.27558 10.8032 8.29085 10.7859 8.31043C10.7513 8.34958 10.7022 8.40608 10.642 8.4779C10.5217 8.62136 10.3561 8.82683 10.1723 9.078C9.80778 9.57623 9.35803 10.2725 9.05389 11.0329L10.0288 11.4228ZM8.20052 10.439L9.13802 11.564L9.94466 10.8918L9.00716 9.76677L8.20052 10.439Z",fill:t})})};var c=n(1304),u=n(5134),d=n(1197),f=n(5394),p=n(8663);const h=d.Ay.div.withConfig({componentId:"sc-1ilvrss-0"})(["width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;",";margin-bottom:8px;@media (prefers-reduced-motion){animation:none;}"],f.AK),g=d.Ay.div.withConfig({componentId:"sc-1ilvrss-1"})(["max-width:80%;display:flex;"]),m=d.Ay.span.withConfig({componentId:"sc-1ilvrss-2"})(["font-size:var(--_kindlychat-font-size-sm);text-align:center;color:",";& > div{display:inline;}& > svg{font-size:var(--_kindlychat-font-size-m);margin-right:4px;vertical-align:text-top;min-width:20px;display:inline;}"],e=>{let{theme:t}=e;return(0,p.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")});var b=n(7041);const v={REVOKE_PERMISSION:"revoke-permission"},y={COMPLIANCE:"frontend_system_message_compliance_text"};function x(e){let{chatMessage:t}=e;const n=(0,u.jL)();let d=null;switch(t.system_dialogue_message_type.toLowerCase()){case"start":d=(0,r.jsx)(a,{width:16,height:16});break;case"end":d=(0,r.jsx)(s,{width:16,height:16});break;case"agent_assigned":d=(0,r.jsx)(l,{width:16,height:16});break;case"live_translation_start":case"live_translation_end":d=(0,r.jsx)(o,{size:16});break;case y.COMPLIANCE:d=(0,r.jsx)(i.A,{size:16})}return(0,r.jsx)(h,{children:(0,r.jsx)(g,{onClick:e=>{const t=e.target;if(!t)return;const r=t.closest("[data-kindly-action]");r&&(e.preventDefault(),r.getAttribute("data-kindly-action")===v.REVOKE_PERMISSION&&n(c.c9))},children:(0,r.jsxs)(m,{children:[d,(0,b.A)(t.event_message)]})})})}},7935:()=>{},7967:(e,t,n)=>{"use strict";e.exports=n(6310)},8013:(e,t,n)=>{"use strict";n(4531)("observable")},8048:(e,t,n)=>{"use strict";n.d(t,{H2:()=>l,H3:()=>c,H5:()=>u,cp:()=>d,fz:()=>a,mt:()=>s});var r=n(1197),o=n(4785),i=n(1708);const a=r.Ay.p.withConfig({componentId:"sc-128z1ys-0"})(["color:",";font-size:var(--_kindlychat-font-size-p);font-weight:normal;line-height:20px;font-family:",";word-break:normal;overflow-wrap:anywhere;"],i.Tj.darkColor,o.m.default),s=(0,r.Ay)(a).withConfig({componentId:"sc-128z1ys-1"})(["font-size:var(--_kindlychat-font-size-xs);opacity:0.6;"]),l=r.Ay.h2.withConfig({componentId:"sc-128z1ys-2"})(["color:",";font-size:var(--_kindlychat-font-size-h2);font-weight:normal;margin:0 0 30px;line-height:30px;font-family:",";"],i.Tj.darkColor,o.m.default),c=r.Ay.h3.withConfig({componentId:"sc-128z1ys-3"})(["color:",";font-size:var(--_kindlychat-font-size-h3);font-weight:normal;line-height:30px;margin:0 0 15px;font-family:",";"],i.Tj.darkColor,o.m.default),u=(r.Ay.h4.withConfig({componentId:"sc-128z1ys-4"})(["color:",";font-size:var(--_kindlychat-font-size-h4);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.h5.withConfig({componentId:"sc-128z1ys-5"})(["color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;margin:0 0 10px;line-height:24px;font-family:",";"],i.Tj.darkColor,o.m.default)),d=(r.Ay.h6.withConfig({componentId:"sc-128z1ys-6"})(["color:",";font-size:var(--font-size-h6);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.span.withConfig({componentId:"sc-128z1ys-7"})(["color:",";font-family:",";opacity:1;a{color:",";text-decoration:none;&:hover,&:focus,&:active,&:visited{color:",";}}"],i.Tj.primaryColor,o.m.KindlySans,i.Tj.primaryColor,i.Tj.primaryColor))},8068:(e,t,n)=>{"use strict";function r(e,t){return"number"!=typeof(null==e?void 0:e.length)||e.length!==(null==t?void 0:t.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):e.map((e,n)=>[e,t[n]])}n.d(t,{A:()=>r})},8070:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(9749),o=n.n(r);const i="kindly-chat-utm",a=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);function s(){const e=new URLSearchParams(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&o()(a).call(a,n.toUpperCase().substring(4))?{...e,[n]:r}:e},{});if(0===Object.keys(t).length){const e=window.sessionStorage.getItem(i);t=e?JSON.parse(e):null}else window.sessionStorage.setItem(i,JSON.stringify(t));return t}},8089:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[a]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d,f,p,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=h||g||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,y=v&&v.exports===b,x=y&&h.process,w=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),k=w&&w.isTypedArray,C=Array.prototype,S=Function.prototype,_=Object.prototype,A=m["__core-js_shared__"],E=S.toString,T=_.hasOwnProperty,j=(d=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",I=_.toString,O=E.call(Object),L=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=y?m.Buffer:void 0,N=m.Symbol,M=m.Uint8Array,z=(P&&P.allocUnsafe,f=Object.getPrototypeOf,p=Object,function(e){return f(p(e))}),R=Object.create,$=_.propertyIsEnumerable,D=C.splice,F=N?N.toStringTag:void 0,B=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=P?P.isBuffer:void 0,U=Math.max,V=Date.now,W=se(m,"Map"),G=se(Object,"create"),q=function(){function e(){}return function(t){if(!ye(t))return{};if(R)return R(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new Y(e);this.size=t.size}function Z(e,t,n){(void 0!==n&&!fe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function J(e,t,n){var r=e[t];T.call(e,t)&&fe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(fe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}K.prototype.clear=function(){this.__data__=G?G(null):{},this.size=0},K.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K.prototype.get=function(e){var t=this.__data__;if(G){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return G?void 0!==t[e]:T.call(t,e)},K.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=G&&void 0===t?r:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():D.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ee(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(W||Y),string:new K}},X.prototype.delete=function(e){var t=ae(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ae(this,e).get(e)},X.prototype.has=function(e){return ae(this,e).has(e)},X.prototype.set=function(e,t){var n=ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new Y,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=T.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=I.call(e);return r&&(t?e[F]=n:delete e[F]),o}(e):function(e){return I.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,function(i,a){if(o||(o=new Q),ye(i))!function(e,t,n,r,o,i,a){var l=ue(e,n),c=ue(t,n),u=a.get(c);if(u)Z(e,n,u);else{var d,f,p,h,g,m=i?i(l,c,n+"",e,t,a):void 0,b=void 0===m;if(b){var v=he(c),y=!v&&me(c),x=!v&&!y&&we(c);m=c,v||y||x?he(l)?m=l:xe(g=l)&&ge(g)?m=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(l):y?(b=!1,m=function(e){return e.slice()}(c)):x?(b=!1,h=new(p=(d=c).buffer).constructor(p.byteLength),new M(h).set(new M(p)),f=h,m=new d.constructor(f,d.byteOffset,d.length)):m=[]:function(e){if(!xe(e)||ne(e)!=s)return!1;var t=z(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==O}(c)||pe(c)?(m=l,pe(l)?m=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=void 0;void 0===s&&(s=e[a]),r?te(n,a,s):J(n,a,s)}return n}(e,ke(e))}(l):ye(l)&&!be(l)||(m=function(e){return"function"!=typeof e.constructor||ce(e)?{}:q(z(e))}(c))):b=!1}b&&(a.set(c,m),o(m,c,r,i,a),a.delete(c)),Z(e,n,m)}}(e,t,a,n,oe,r,o);else{var l=r?r(ue(e,a),i,a+"",e,t,o):void 0;void 0===l&&(l=i),Z(e,a,l)}},ke)}var ie=B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:_e;function ae(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ye(e)||function(e){return!!j&&j in e}(e))&&(be(e)?L:l).test(function(e){if(null!=e){try{return E.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function le(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&c.test(e))&&e>-1&&e%1==0&&e<t}function ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_)}function ue(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var de=function(e){var t=0,n=0;return function(){var r=V(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function fe(e,t){return e===t||e!=e&&t!=t}var pe=re(function(){return arguments}())?re:function(e){return xe(e)&&T.call(e,"callee")&&!$.call(e,"callee")},he=Array.isArray;function ge(e){return null!=e&&ve(e.length)&&!be(e)}var me=H||function(){return!1};function be(e){if(!ye(e))return!1;var t=ne(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ve(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=k?function(e){return function(t){return e(t)}}(k):function(e){return xe(e)&&ve(e.length)&&!!u[ne(e)]};function ke(e){return ge(e)?function(e,t){var n=he(e),r=!n&&pe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&we(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!T.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||le(c,l))||s.push(c);return s}(e,!0):function(e){if(!ye(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ce(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}(e)}var Ce,Se=(Ce=function(e,t,n){oe(e,t,n)},function(e,t){return de(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=U(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,_e),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Ce.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ye(n))return!1;var r=typeof t;return!!("number"==r?ge(n)&&le(t,n.length):"string"==r&&t in n)&&fe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Ce(e,a,n)}return e}));function _e(e){return e}e.exports=Se},8094:(e,t,n)=>{"use strict";n.d(t,{IM:()=>f,Os:()=>a,QA:()=>c,Y6:()=>o,fg:()=>r,kU:()=>u,pz:()=>h,se:()=>d,tS:()=>i,tq:()=>s,wP:()=>p,z2:()=>l});const r="ANONYMIZED_MESSAGE",o="BUTTON_CLICK",i="MESSAGE_ATTACHMENTS_UPDATED",a="NEW_ATTACHMENTS",s="NEW_MESSAGE",l="NEW_FRONTEND_SYSTEM_MESSAGE",c="SET_FORM",u="SET_LAST_MESSAGE_SEEN",d="SET_MESSAGE_SENT_TIME",f="TRIGGER_DIALOGUE",p="UPDATE_ATTACHMENT",h="UPDATE_CHAT_MESSAGE"},8099:e=>{"use strict";e.exports={}},8129:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u,cT:()=>l,ue:()=>c});var r=n(5352),o=n(3436),i=n(485),a=n(6122),s=n(8094);const l={KINDLY_GPT:"kindly-gpt"},c={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,startOverText:"Start over",placeholder:"",typingIndicator:!1,isTyping:!1,typingType:void 0,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,isTextDirectionRtl:!1,welcomePage:null,welcomePageType:r.Lb.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0,replyInQueueEnabled:!0},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case a.CB:return{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case i.A8:var n;return{...e,isTyping:e.typingIndicator,typingType:null===(n=t.data)||void 0===n?void 0:n.type};case i.wk:return{...e,isTyping:!1,typingType:void 0};case s.tq:return{...e,hasInteraction:!0,splitLabelTimestamp:Date.now()};case a.M2:{var r;const n=null===(r=t.payload)||void 0===r?void 0:r.code;return{...e,isTextDirectionRtl:(0,o.A)(n)}}default:return e}}},8130:(e,t,n)=>{"use strict";var r=n(8146);e.exports=function(e){return r(e.length)}},8137:e=>{"use strict";e.exports=function(){}},8141:(e,t,n)=>{"use strict";var r=n(3753);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},8146:(e,t,n)=>{"use strict";var r=n(9903),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8191:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r,W$:()=>o,dT:()=>s,fl:()=>a,gH:()=>i});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","nudge"]),i="chat-group",a="message-block",s="typing-indicator"},8256:(e,t,n)=>{"use strict";n.d(t,{B$:()=>c,Bu:()=>d,TA:()=>u,W7:()=>s,aO:()=>a});var r=n(5352),o=n(4518);const i=["Bytes","kB","MB","GB"],a=1024,s=10*a,l=30*a,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=Math.floor(Math.log(e)/Math.log(a));return`${parseFloat((e/a**n).toFixed(t))} ${i[n]}`},u=e=>new Promise((t,n)=>{const i=e.size/a,u=(0,o.A)(e)===r.sl.VIDEO,d=u?l:s;if(i>d)return void n(new Error(`The ${u?"video":"image"} must be less than ${c(d)}`));const f=new FileReader;f.readAsDataURL(e),f.onload=()=>t({url:f.result,file:e,sizeKb:i,name:e.name,type:e.type,status:r.Le.PROCESSING,sender:r.bS.USER}),f.onabort=()=>n(new Error(f.error))}),d=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))})},8278:(e,t,n)=>{"use strict";n.d(t,{$P:()=>s,Cv:()=>o,DZ:()=>h,FI:()=>l,G0:()=>g,Hk:()=>f,MA:()=>r,Od:()=>a,cA:()=>c,o3:()=>d,qV:()=>p,uF:()=>i,uO:()=>u,zD:()=>m});const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},i=e=>{let{announcement:t}=e;return t},a=e=>{let{bot:t}=e;return t},s=e=>{let{chatbubble:t}=e;return t},l=e=>{let{connection:t}=e;return t},c=e=>{let{environment:t}=e;return t},u=e=>{let{messages:{forms:t}}=e;return t},d=e=>{let{chatbubble:{globalIconsState:t}}=e;return t},f=e=>{let{inChatNotification:t}=e;return t},p=e=>{let{inspector:t}=e;return t},h=e=>{let{messages:t}=e;return t},g=e=>{let{nudge:t}=e;return t},m=e=>{let{pushMessages:t}=e;return t}},8293:(e,t,n)=>{"use strict";n(4531)("asyncDispose")},8317:(e,t,n)=>{"use strict";n.d(t,{Du:()=>s,Mb:()=>c,cL:()=>l,mw:()=>u});var r=n(5352),o=n(9990),i=n(8833),a=n(6885);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&t({type:a.nz,...n})},l=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:s}}=t();e((0,i.et)(`${s}/chatbubble/${r.Ak}/takeover_cancel/`,{method:"POST",...(0,o.A)({token:n})})),e({type:a.MM})},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:s}}=t();e({type:a.c6}),e((0,i.et)(`${s}/chatbubble/${r.Ak}/user_started_typing/`,{method:"POST",...(0,o.A)({token:n})}))},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:s}}=t();e({type:a.we}),e((0,i.et)(`${s}/chatbubble/${r.Ak}/user_stopped_typing/`,{method:"POST",...(0,o.A)({token:n})}))}},8341:(e,t,n)=>{"use strict";n(7603);var r=n(2856);e.exports=r("Array","includes")},8364:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683);e.exports=Object.keys||function(e){return r(e,o)}},8395:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7133),o=n(7636);const i=(e,t,n,i)=>{const a=[o.A,e=>((e,t,n,o)=>{let{attachment_ids:i=[],...a}=e;return{...a,attachments:(i||[]).map(e=>{return t.find((n=e,function(){let{id:e,temporaryId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return e===n||t===n}));var n}).filter(e=>void 0!==e).map(e=>({...e,url:(0,r.l)(e,n,o)}))}})(e,t,n,i)];return a.reduce((e,t)=>t(e),e||{})}},8407:(e,t,n)=>{"use strict";var r=n(4904),o=n(2769),i=n(9932),a=n(8655)("toStringTag"),s=Object,l="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?n:l?i(t):"Object"===(r=i(t))&&o(t.callee)?"Arguments":r}},8417:(e,t,n)=>{"use strict";var r,o,i,a=n(1314),s=n(8900),l=n(262),c=n(3999),u=n(701),d=n(3753),f=n(4275),p=n(5241),h="Object already initialized",g=s.TypeError,m=s.WeakMap;if(a||d.state){var b=d.state||(d.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new g(h);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},i=function(e){return b.has(e)}}else{var v=f("state");p[v]=!0,r=function(e,t){if(u(e,v))throw new g(h);return t.facade=e,c(e,v,t),t},o=function(e){return u(e,v)?e[v]:{}},i=function(e){return u(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return n}}}},8418:(e,t,n)=>{"use strict";n.d(t,{ot:()=>_,Dz:()=>A,n_:()=>w,Ay:()=>T,WG:()=>y,CJ:()=>b,ZG:()=>E,GY:()=>C,wm:()=>x,zp:()=>S,m9:()=>k});var r=n(9749),o=n.n(r);var i=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var a="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function s(){return{s:0,v:void 0,o:null,p:null}}function l(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=0;function l(){let t=n;const{length:l}=arguments;for(let e=0,n=l;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=s(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=s(),e.set(n,t)):t=r}}const c=t;let u;if(1===t.s)u=t.v;else if(u=e.apply(null,arguments),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,u)&&(u=e,0!==i&&i--),o="object"==typeof u&&null!==u||"function"==typeof u?new a(u):u}return c.s=1,c.v=u,u}return l.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},s=e.pop();"object"==typeof s&&(a=s,s=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...n,...a},{memoize:u,memoizeOptions:d=[],argsMemoize:f=l,argsMemoizeOptions:p=[],devModeChecks:h={}}=c,g=i(d),m=i(p),b=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=u(function(){return r++,s.apply(null,arguments)},...g),y=f(function(){o++;const e=function(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(b,arguments);return t=v.apply(null,e),t},...m);return Object.assign(y,{resultFunc:s,memoizedResultFunc:v,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var u=c(l),d=Object.assign((e,t=u)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>d}),f=n(7251),p=n(6122),h=n(6606),g=n(9245);const m={feedbacksAlreadyDisplayed:[],feedbackToSubmit:null},b=u([e=>e.feedback.feedbacksAlreadyDisplayed,e=>e.feedback.feedbackToSubmit],(e,t)=>({feedbacksAlreadyDisplayed:e,feedbackToSubmit:t})),v=(0,f.Z0)({name:"feedback",initialState:m,reducers:{initializeFeedback:(e,t)=>{var n;e.feedbackToSubmit={id:null,rating_system:t.payload.ratingSystem,trigger_type:t.payload.triggerType,form_title:t.payload.formTitle,currentStep:t.payload.step,timeout:t.payload.timeout,feedback_trigger_by:"default",index:null,rating:null,sentiment:null,buttons_chosen:[],freeform_text:null},o()(n=e.feedbacksAlreadyDisplayed).call(n,t.payload.triggerType)||e.feedbacksAlreadyDisplayed.push(t.payload.triggerType)},setRating:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=t.payload.index,e.feedbackToSubmit.rating=t.payload.rating,e.feedbackToSubmit.sentiment=t.payload.sentiment,e.feedbackToSubmit.buttons_chosen=[])},clearRating:e=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=null,e.feedbackToSubmit.rating=null,e.feedbackToSubmit.sentiment=null)},toggleCommentButton:(e,t)=>{if(!e.feedbackToSubmit)return;const{buttons_chosen:n}=e.feedbackToSubmit;o()(n).call(n,t.payload)?e.feedbackToSubmit.buttons_chosen=n.filter(e=>e!==t.payload):n.push(t.payload)},setFreeformText:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.freeform_text=t.payload)},setStep:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.currentStep=t.payload)},setFeedbackTriggerBy:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.feedback_trigger_by=t.payload)},clearFeedbackToSubmit:e=>{e.feedbackToSubmit=null},clearFeedbacksAlreadyDisplayed:e=>{e.feedbacksAlreadyDisplayed=[]}},extraReducers:e=>{e.addCase(g.S.fulfilled,(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.id=t.payload)}),e.addCase(g.S.rejected,e=>{e.feedbackToSubmit=null}),e.addMatcher(e=>{var t;return o()(t=[p.CB,h.n]).call(t,e.type)},()=>m)}}),{initializeFeedback:y,setRating:x,clearRating:w,toggleCommentButton:k,setFreeformText:C,setStep:S,clearFeedbackToSubmit:_,clearFeedbacksAlreadyDisplayed:A,setFeedbackTriggerBy:E}=v.actions,T=v.reducer},8448:(e,t,n)=>{"use strict";n(4531)("customMatcher")},8600:(e,t,n)=>{"use strict";var r=n(6100),o=n(701),i=n(3273),a=n(1005).indexOf,s=n(5241),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,u=[];for(n in r)!o(s,n)&&o(r,n)&&l(u,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(u,n)||l(u,n));return u}},8639:(e,t,n)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch((0,i.default)(e)){case"void":return function(e){return e};case"string":return function(t){return(0,o.default)(t,[e])};case"array":return function(t){return(0,o.default)(t,e)};default:return console.error("Invalid paths argument, should be of type String, Array or Void")}};var o=r(n(4517)),i=r(n(4399));e.exports=t.default},8655:(e,t,n)=>{"use strict";var r=n(8900),o=n(8141),i=n(701),a=n(1268),s=n(4603),l=n(7460),c=r.Symbol,u=o("wks"),d=l?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(u,e)||(u[e]=s&&i(c,e)?c[e]:d("Symbol."+e)),u[e]}},8663:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;s(e)&&(t=function(e){const t=e.indexOf(",")>-1?",":" ";let n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),r=(+e[1]).toString(16),o=(+e[2]).toString(16);return 1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),1===o.length&&(o=`0${o}`),`#${n}${r}${o}`}(e)),l(e)&&(t=i(e));const n="#"===t.charAt(0)?t.substring(1,7):t,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179}function i(e){return e.replace(a,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)}n.d(t,{J7:()=>c,SW:()=>o,w5:()=>r});const a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,s=e=>e.match(/^rgb/),l=e=>e.match(a);function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:120;const r=u(e),o=u(t);return Math.sqrt((r[0]-o[0])**2+(r[1]-o[1])**2+(r[2]-o[2])**2)<=n}function u(e){if(s(e))return e.match(/\d+/g).map(Number);let t="#"===e.charAt(0)?e.substring(1):e;return l(e)&&(t=i(t).substring(1)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}},8668:(e,t,n)=>{"use strict";n.d(t,{A:()=>Qe});var r,o="user-agent",i="",a="function",s="object",l="string",c="undefined",u="browser",d="cpu",f="device",p="engine",h="os",g="result",m="name",b="type",v="vendor",y="version",x="architecture",w="major",k="model",C="console",S="mobile",_="tablet",A="smarttv",E="wearable",T="xr",j="embedded",I="inapp",O="brands",L="formFactors",P="fullVersionList",N="platform",M="platformVersion",z="bitness",R="sec-ch-ua",$=R+"-full-version-list",D=R+"-arch",F=R+"-"+z,B=R+"-form-factors",H=R+"-"+S,U=R+"-"+k,V=R+"-"+N,W=V+"-version",G=[O,P,S,k,N,M,x,L,z],q="Amazon",K="Apple",Y="ASUS",X="BlackBerry",Q="Google",Z="Huawei",J="Lenovo",ee="Honor",te="LG",ne="Microsoft",re="Motorola",oe="Nvidia",ie="OnePlus",ae="OPPO",se="Samsung",le="Sharp",ce="Sony",ue="Xiaomi",de="Zebra",fe="Chrome",pe="Chromium",he="Chromecast",ge="Edge",me="Firefox",be="Opera",ve="Facebook",ye="Sogou",xe="Mobile ",we=" Browser",ke="Windows",Ce=typeof window!==c&&window.navigator?window.navigator:void 0,Se=Ce&&Ce.userAgentData?Ce.userAgentData:void 0,_e=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ae=function(e,t){if(typeof e===s&&e.length>0){for(var n in e)if(Ie(t)==Ie(e[n]))return!0;return!1}return!!Te(e)&&Ie(t)==Ie(e)},Ee=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Ee(e[n])},Te=function(e){return typeof e===l},je=function(e){if(e){for(var t=[],n=Pe(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var o=Me(n[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Me(n[r]);return t}},Ie=function(e){return Te(e)?e.toLowerCase():e},Oe=function(e){return Te(e)?Pe(/[^\d\.]/g,e).split(".")[0]:void 0},Le=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==s&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Pe=function(e,t){return Te(t)?t.replace(e,i):t},Ne=function(e){return Pe(/\\?\"/g,e)},Me=function(e,t){return e=Pe(/^\s\s*/,String(e)),typeof t===c?e:e.substring(0,t)},ze=function(e,t){if(e&&t)for(var n,r,o,i,l,c,u=0;u<t.length&&!l;){var d=t[u],f=t[u+1];for(n=r=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e))for(o=0;o<f.length;o++)c=l[++r],typeof(i=f[o])===s&&i.length>0?2===i.length?typeof i[1]==a?this[i[0]]=i[1].call(this,c):this[i[0]]=i[1]:i.length>=3&&(typeof i[1]!==a||i[1].exec&&i[1].test?3==i.length?this[i[0]]=c?c.replace(i[1],i[2]):void 0:4==i.length?this[i[0]]=c?i[3].call(this,c.replace(i[1],i[2])):void 0:i.length>4&&(this[i[0]]=c?i[3].apply(this,[c.replace(i[1],i[2])].concat(i.slice(4))):void 0):i.length>3?this[i[0]]=c?i[1].apply(this,i.slice(2)):void 0:this[i[0]]=c?i[1].call(this,c,i[2]):void 0):this[i]=c||void 0;u+=2}},Re=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Ae(t[n][r],e))return"?"===n?void 0:n}else if(Ae(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},$e={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},De={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Fe={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[m,xe+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[y,[m,ge+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,y],[/opios[\/ ]+([\w\.]+)/i],[y,[m,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[m,be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[m,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[m,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[m,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[m,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[m,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[m,"Smart "+J+we]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure"+we],y],[/\bfocus\/([\w\.]+)/i],[y,[m,me+" Focus"]],[/ mms\/([\w\.]+)$/i],[y,[m,be+" Neon"]],[/ opt\/([\w\.]+)$/i],[y,[m,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[m,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[m,"MIUI"+we]],[/fxios\/([\w\.-]+)/i],[y,[m,xe+me]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[m,"360"]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+we],y],[/samsungbrowser\/([\w\.]+)/i],[y,[m,se+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[m,ye+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,ye+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[m,y],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[m],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,ve],y,[b,I]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[m,y,[b,I]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[m,"GSA"],[b,I]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[y,[m,"TikTok"],[b,I]],[/\[(linkedin)app\]/i],[m,[b,I]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[m,/(.+)/,"Zalo"],y,[b,I]],[/(chromium)[\/ ]([-\w\.]+)/i],[m,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[m,fe+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[y,[m,ge+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,fe+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[m,"Android"+we]],[/chrome\/([\w\.]+) mobile/i],[y,[m,xe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[m,xe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[m,xe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[m,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[m,xe+me],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[m,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[m,me+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[m,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[y,/[^\d\.]+./,i]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[x,/ower/,i,Ie]],[/mc680.0/i],[[x,"68k"]],[/winnt.+\[axp/i],[[x,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[k,[v,se],[b,_]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[k,[v,se],[b,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[k,[v,K],[b,S]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[k,[v,K],[b,_]],[/(macintosh);/i],[k,[v,K]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[k,[v,le],[b,S]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[k,[v,ee],[b,_]],[/honor([-\w ]+)[;\)]/i],[k,[v,ee],[b,S]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[k,[v,Z],[b,_]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[k,[v,Z],[b,S]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[k,/_/g," "],[v,ue],[b,_]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[k,/_/g," "],[v,ue],[b,S]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[k,[v,ie],[b,S]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[k,[v,ae],[b,S]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[k,[v,Re,{OnePlus:["203","304","403","404","413","415"],"*":ae}],[b,_]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[k,[v,"BLU"],[b,S]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[k,[v,"Vivo"],[b,S]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[k,[v,"Realme"],[b,S]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[k,[v,J],[b,_]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[k,[v,J],[b,S]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[k,[v,re],[b,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[k,[v,re],[b,_]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[k,[v,te],[b,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[k,[v,te],[b,S]],[/(nokia) (t[12][01])/i],[v,k,[b,_]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[k,/_/g," "],[b,S],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[k,[v,Q],[b,_]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[k,[v,Q],[b,S]],[/(google) (pixelbook( go)?)/i],[v,k],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[k,[v,ce],[b,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[k,"Xperia Tablet"],[v,ce],[b,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[k,[v,q],[b,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[k,/(.+)/g,"Fire Phone $1"],[v,q],[b,S]],[/(playbook);[-\w\),; ]+(rim)/i],[k,v,[b,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[k,[v,X],[b,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[k,[v,Y],[b,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[k,[v,Y],[b,S]],[/(nexus 9)/i],[k,[v,"HTC"],[b,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[k,/_/g," "],[b,S]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[k,[v,"TCL"],[b,_]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[k,[v,"TCL"],[b,S]],[/(itel) ((\w+))/i],[[v,Ie],k,[b,Re,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[k,[v,"Acer"],[b,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[k,[v,"Meizu"],[b,S]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[k,[v,"Ulefone"],[b,S]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[k,[v,"Energizer"],[b,S]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[k,[v,"Cat"],[b,S]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[k,[v,"Smartfren"],[b,S]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[k,[v,"Nothing"],[b,S]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[k,[v,"Archos"],[b,_]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[k,[v,"Archos"],[b,S]],[/; (n159v)/i],[k,[v,"HMD"],[b,S]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,k,[b,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[v,k,[b,S]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,k,[b,_]],[/(surface duo)/i],[k,[v,ne],[b,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[k,[v,"Fairphone"],[b,S]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[k,[v,oe],[b,_]],[/(sprint) (\w+)/i],[v,k,[b,S]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[v,ne],[b,S]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[k,[v,de],[b,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[k,[v,de],[b,S]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[v,[b,A]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[v,se],[b,A]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,k,[b,A]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,te],[b,A]],[/(apple) ?tv/i],[v,[k,K+" TV"],[b,A]],[/crkey.*devicetype\/chromecast/i],[[k,he+" Third Generation"],[v,Q],[b,A]],[/crkey.*devicetype\/([^/]*)/i],[[k,/^/,"Chromecast "],[v,Q],[b,A]],[/fuchsia.*crkey/i],[[k,he+" Nest Hub"],[v,Q],[b,A]],[/crkey/i],[[k,he],[v,Q],[b,A]],[/(portaltv)/i],[k,[v,ve],[b,A]],[/droid.+aft(\w+)( bui|\))/i],[k,[v,q],[b,A]],[/(shield \w+ tv)/i],[k,[v,oe],[b,A]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[k,[v,le],[b,A]],[/(bravia[\w ]+)( bui|\))/i],[k,[v,ce],[b,A]],[/(mi(tv|box)-?\w+) bui/i],[k,[v,ue],[b,A]],[/Hbbtv.*(technisat) (.*);/i],[v,k,[b,A]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",Re,{LG:"lge"}],[k,Me],[b,A]],[/(playstation \w+)/i],[k,[v,ce],[b,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[k,[v,ne],[b,C]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[v,Re,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],k,[b,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[k,[v,se],[b,E]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,k,[b,E]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[k,[v,ae],[b,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[k,[v,K],[b,E]],[/(opwwe\d{3})/i],[k,[v,ie],[b,E]],[/(moto 360)/i],[k,[v,re],[b,E]],[/(smartwatch 3)/i],[k,[v,ce],[b,E]],[/(g watch r)/i],[k,[v,te],[b,E]],[/droid.+; (wt63?0{2,3})\)/i],[k,[v,de],[b,E]],[/droid.+; (glass) \d/i],[k,[v,Q],[b,T]],[/(pico) ([\w ]+) os\d/i],[v,k,[b,T]],[/(quest( \d| pro)?s?).+vr/i],[k,[v,ve],[b,T]],[/mobile vr; rv.+firefox/i],[[b,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,j]],[/(aeobc)\b/i],[k,[v,q],[b,j]],[/(homepod).+mac os/i],[k,[v,K],[b,j]],[/windows iot/i],[[b,j]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[k,[b,A]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,A]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[k,[b,Re,{mobile:"Mobile",xr:"VR","*":_}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,S]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[k,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[m,ge+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[m,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[m,y],[/ladybird\//i],[[m,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,m]],os:[[/(windows nt) (6\.[23]); arm/i],[[m,/N/,"R"],[y,Re,$e]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[m,y],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[y,/(;|\))/g,"",Re,$e],[m,ke]],[/(windows ce)\/?([\d\.]*)/i],[m,y],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[m,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[m,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[m,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[m,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[m,he+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[m,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[y,m],[/(ubuntu) ([\w\.]+) like android/i],[[m,/(.+)/,"$1 Touch"],y],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[m,y],[/\(bb(10);/i],[y,[m,X]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[y,[m,me+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[y,[m,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[y,Re,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[m,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,"Chrome OS"],y],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[m,y],[/(sunos) ?([\d\.]*)/i],[[m,"Solaris"],y],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,y]]},He=(Le.call((r={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[u,[m,y,w,b]],[d,[x]],[f,[b,k,v]],[p,[m,y]],[h,[m,y]]]),Le.call(r.isIgnore,[[u,[y,w]],[p,[y]],[h,[y]]]),Le.call(r.isIgnoreRgx,[[u,/ ?browser$/i],[h,/ ?os$/i]]),Le.call(r.toString,[[u,[m,y]],[d,[x]],[f,[v,k]],[p,[m,y]],[h,[m,y]]]),r),Ue=function(e,t){var n=He.init[t],r=He.isIgnore[t]||0,o=He.isIgnoreRgx[t]||0,a=He.toString[t]||0;function s(){Le.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Se?Se.getHighEntropyValues(G).then(function(t){return e.setCH(new Ve(t,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=g&&(s.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Ae(r,n)&&Ie(o?Pe(o,this[n]):this[n])==Ie(o?Pe(o,e):e)){if(t=!0,e!=c)break}else if(e==c&&t){t=!t;break}return t},s.prototype.toString=function(){var e=i;for(var t in a)typeof this[a[t]]!==c&&(e+=(e?" ":i)+this[a[t]]);return e||c}),s.prototype.then=function(e){var t=this,n=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};n.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var r=new n;return e(r),r},new s};function Ve(e,t){if(e=e||{},Le.call(this,G),t)Le.call(this,[[O,je(e[R])],[P,je(e[$])],[S,/\?1/.test(e[H])],[k,Ne(e[U])],[N,Ne(e[V])],[M,Ne(e[W])],[x,Ne(e[D])],[L,je(e[B])],[z,Ne(e[F])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==c&&(this[n]=e[n])}function We(e,t,n,r){return Le.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",Ue(this,e)]]),this}function Ge(e,t,n){if(typeof e===s?(Ee(e,!0)?(typeof t===s&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==l||Ee(t,!0)||(n=t,t=void 0),n)if(typeof n.append===a){var r={};n.forEach(function(e,t){r[String(t).toLowerCase()]=e}),n=r}else{var c={};for(var m in n)n.hasOwnProperty(m)&&(c[String(m).toLowerCase()]=n[m]);n=c}if(!(this instanceof Ge))return new Ge(e,t,n).getResult();var b=typeof e===l?e:n&&n[o]?n[o]:Ce&&Ce.userAgent?Ce.userAgent:i,v=new Ve(n,!0),y=t?function(e,t){var n={},r=t;if(!Ee(t))for(var o in r={},t)for(var i in t[o])r[i]=t[o][i].concat(r[i]?r[i]:[]);for(var a in e)n[a]=r[a]&&r[a].length%2==0?r[a].concat(e[a]):e[a];return n}(Be,t):Be,x=function(e){return e==g?function(){return new We(e,b,y,v).set("ua",b).set(u,this.getBrowser()).set(d,this.getCPU()).set(f,this.getDevice()).set(p,this.getEngine()).set(h,this.getOS()).get()}:function(){return new We(e,b,y[e],v).parseUA().get()}};return Le.call(this,[["getBrowser",x(u)],["getCPU",x(d)],["getDevice",x(f)],["getEngine",x(p)],["getOS",x(h)],["getResult",x(g)],["getUA",function(){return b}],["setUA",function(e){return Te(e)&&(b=Me(e,500)),this}]]).setUA(b),this}We.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},We.prototype.set=function(e,t){return this.data[e]=t,this},We.prototype.setCH=function(e){return this.uaCH=e,this},We.prototype.detectFeature=function(){if(Ce&&Ce.userAgent==this.ua)switch(this.itemType){case u:Ce.brave&&typeof Ce.brave.isBrave==a&&this.set(m,"Brave");break;case f:!this.get(b)&&Se&&Se[S]&&this.set(b,S),"Macintosh"==this.get(k)&&Ce&&typeof Ce.standalone!==c&&Ce.maxTouchPoints&&Ce.maxTouchPoints>2&&this.set(k,"iPad").set(b,_);break;case h:!this.get(m)&&Se&&Se[N]&&this.set(m,Se[N]);break;case g:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(u,t(u)).set(d,t(d)).set(f,t(f)).set(p,t(p)).set(h,t(h))}return this},We.prototype.parseUA=function(){switch(this.itemType!=g&&ze.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(w,Oe(this.get(y)));break;case h:if("iOS"==this.get(m)&&"18.6"==this.get(y)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(y,e[1])}}return this},We.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case p:var n,r=e[P]||e[O];if(r)for(var o=0;o<r.length;o++){var i=r[o].brand||r[o],a=r[o].version;this.itemType==u&&!/not.a.brand/i.test(i)&&(!n||/Chrom/.test(n)&&i!=pe||n==ge&&/WebView2/.test(i))&&(i=Re(i,Fe),(n=this.get(m))&&!/Chrom/.test(n)&&/Chrom/.test(i)||this.set(m,i).set(y,a).set(w,Oe(a)),n=i),this.itemType==p&&i==pe&&this.set(y,a)}break;case d:var s=e[x];s&&(s&&"64"==e[z]&&(s+="64"),ze.call(this.data,s+";",t));break;case f:if(e[S]&&this.set(b,S),e[k]&&(this.set(k,e[k]),!this.get(b)||!this.get(v))){var l={};ze.call(l,"droid 9; "+e[k]+")",t),!this.get(b)&&l.type&&this.set(b,l.type),!this.get(v)&&l.vendor&&this.set(v,l.vendor)}if(e[L]){var c;if("string"!=typeof e[L])for(var C=0;!c&&C<e[L].length;)c=Re(e[L][C++],De);else c=Re(e[L],De);this.set(b,c)}break;case h:var _=e[N];if(_){var A=e[M];_==ke&&(A=parseInt(Oe(A),10)>=13?"11":"10"),this.set(m,_).set(y,A)}this.get(m)==ke&&"Xbox"==e[k]&&this.set(m,"Xbox").set(y,void 0);break;case g:var E=this.data,T=function(t){return E[t].getItem().setCH(e).parseCH().get()};this.set(u,T(u)).set(d,T(d)).set(f,T(f)).set(p,T(p)).set(h,T(h))}return this},Ge.VERSION="2.0.8",Ge.BROWSER=_e([m,y,w,b]),Ge.CPU=_e([x]),Ge.DEVICE=_e([k,v,b,C,S,A,_,E,j]),Ge.ENGINE=Ge.OS=_e([m,y]);const qe=Ge(),Ke=qe.withFeatureCheck(),Ye=Ke instanceof Promise;if(Ye){const e=new Error("ua-parser-js withFeatureCheck returned a Promise, which is not supported in this context.");setTimeout(()=>{throw e},0)}const Xe=Ye?Ke:qe,Qe=()=>"mobile"===(null==Xe?void 0:Xe.device.type)||"tablet"===(null==Xe?void 0:Xe.device.type)},8684:(e,t,n)=>{"use strict";var r=n(3395);n(85),e.exports=r},8689:(e,t,n)=>{"use strict";n.d(t,{jE:()=>r,vK:()=>i,ye:()=>o});const r="PATTERN_CONTEXT_MATCH",o="SET_INSPECTED_CHAT_MESSAGE",i="TOGGLE_INSPECTOR"},8696:(e,t,n)=>{"use strict";var r=n(1203),o=n(2769),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},8749:(e,t,n)=>{"use strict";n(4531)("hasInstance")},8787:(e,t,n)=>{"use strict";n.d(t,{AF:()=>c,L9:()=>s,Mo:()=>a,sF:()=>i,uh:()=>l});var r=n(1197),o=n(8663);const i=()=>"\n #chatContainer:not(.using-tab) & {\n outline: none;\n }\n",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return`\n background: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;const n=parseInt(e,10);return n<t?Math.ceil(t/n*100):100},l=(0,r.AH)(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;"]),c=(0,r.AH)(["background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;"])},8803:(e,t,n)=>{var r=n(4665);e.exports=function(e,t,n){return e.set(r(e,t),n),n},e.exports.__esModule=!0,e.exports.default=e.exports},8805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ys});var r=n(9155),o=n.n(r),i=n(1197),a=n(1708);const s=i.Ay.div.withConfig({componentId:"sc-164l1vq-0"})(["font-size:var(--_kindlychat-font-size-m);text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100%;z-index:",";pointer-events:auto;@media ","{max-height:unset;}",""],e=>e.$zIndex+5,a.jO.maxTablet,e=>{let{$inspectorOpen:t}=e;return t&&"display: flex; flex-direction: row-reverse;"});var l=n(5352),c=n(541),u=n(8278);const d=i.Ay.div.withConfig({componentId:"sc-huyjcb-0"})(["margin:20px;display:flex;flex-direction:column;"]),f=i.Ay.hr.withConfig({componentId:"sc-huyjcb-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),p=i.Ay.button.withConfig({componentId:"sc-huyjcb-2"})(["text-align:center;margin:5px 5px 0 5px;background:rgb(243,243,244);border:1px solid rgb(243,243,244);font-weight:600;padding:7px 16px;border-radius:5px;cursor:pointer;outline:none;&:hover{background:rgb(230,230,230);}&:disabled{background:white;color:rgb(206,206,206);border-color:rgb(206,206,206);cursor:default;}"]),h=i.Ay.div.withConfig({componentId:"sc-huyjcb-3"})(["display:flex;align-items:baseline;font-size:calc(var(--_kindlychat-font-size-sm) * 1.067);",""],e=>{let{$spaceBetween:t}=e;return t?"justify-content: space-between;":""}),g=i.Ay.div.withConfig({componentId:"sc-huyjcb-4"})(["padding:1px 3px;border-radius:3px;font-size:var(--_kindlychat-font-size-sm);margin-right:5px;background:rgba(255,74,156,0.25);"]),m=i.Ay.span.withConfig({componentId:"sc-huyjcb-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),b=(i.Ay.span.withConfig({componentId:"sc-huyjcb-6"})(["margin:0 5px;color:gray;"]),i.Ay.div.withConfig({componentId:"sc-huyjcb-7"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:var(--_kindlychat-font-size-sm);margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{$filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""})),v=i.Ay.a.withConfig({componentId:"sc-huyjcb-8"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]);var y=n(5394),x=n(8668);const w=(0,i.i7)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),k=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(),w),C=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),S=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(),C),_=(0,i.AH)(["bottom:0px;right:0px;"]),A=(0,i.AH)(["width:100%;height:100%;max-height:unset;min-height:320px;",";border-radius:0;visibility:",";"],_,e=>{let{$active:t}=e;return t?"visible":"hidden"}),E=(0,i.AH)(["max-height:",";height:",";width:",";"],e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"360px"}),T=(0,i.AH)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>{let{$offsetHeight:t}=e;return t||0}),j=(0,i.AH)([""," "," ",""],e=>{let{$fullscreen:t}=e;return t?_:T},e=>{let{$active:t}=e;return t?E:(0,y.vW)()},e=>{let{$fullscreen:t,$chatHasStarted:n,$active:r}=e;return!t&&!n&&(e=>{let{$active:t}=e;return t?k:S})({$active:r})}),I=(0,i.AH)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;> &:last-child{margin:auto 20px 20px;}"]),O=i.Ay.div.withConfig({componentId:"sc-4u7nsm-0"})(["display:flex;z-index:20;overflow:hidden;flex-direction:column;box-shadow:",";background:",";",";"," @media ","{",";}",""],a.FR.level2,e=>{let{theme:t}=e;return t.background},j,e=>{let{$inspectorContainer:t}=e;return t&&I},a.jO.maxTablet,A,(0,x.A)()&&A);var L=n(8048),P=n(1085);const N=()=>{};function M(){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(d,{children:(0,P.jsx)(L.H5,{children:"No messages yet!"})}),(0,P.jsxs)(h,{$spaceBetween:!0,children:[(0,P.jsx)(p,{disabled:!0,onClick:N,children:"Show previous"}),(0,P.jsx)(p,{disabled:!0,onClick:N,children:"Show next"})]})]})}function z(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return(0,P.jsxs)(d,{children:[(0,P.jsx)(L.H5,{children:"Slot / Pattern context"}),(0,P.jsxs)(h,{children:[(0,P.jsx)(g,{children:n}),(0,P.jsx)("span",{children:r})]})]})}var R=n(8787);const $=i.Ay.span.withConfig({componentId:"sc-1jsyulb-0"})(["",""],R.uh);function D(){return(0,P.jsx)($,{children:"(opens in a new tab)"})}const F=function(e){let{children:t,url:n}=e;return n?(0,P.jsxs)(v,{target:"_blank",rel:"noopener noreferrer",href:n,children:[t,(0,P.jsx)(D,{})]}):t};function B(e){let{botId:t,dialogueType:n,dialogueId:r,children:o}=e;const i=function(e){let{botId:t,dialogueType:n,dialogueId:r}=e;return t&&n&&r?`/workspace/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null}({botId:t,dialogueType:n,dialogueId:r});return(0,P.jsx)(F,{url:i,children:(0,P.jsx)(h,{children:o})})}var H=n(9749),U=n.n(H);const{SAMPLE_MATCH:V,KEYWORD_EXACT_MATCH:W,KEYWORD_MENTION:G,PATTERN_MATCH:q,ZODIAC:K}=l.Gi,Y=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," "),X=e=>{switch(e){case V:case K:return"sample";case q:return"pattern";case W:case G:return"keyword";default:return Y(e)}};function Q(e){var t,n,r;let{handler:o,score:i,dialogueType:a,sender:s,fromWebhook:c,label:u}=e;return"string"==typeof u?(0,P.jsx)(b,{children:u}):o&&U()(t=[V,K]).call(t,o)&&i?(0,P.jsx)(b,{$filled:!0,title:"Confidence score",children:`${Math.round(100*i)} %`}):o&&U()(n=Object.values(l.Gi)).call(n,o)?(0,P.jsx)(b,{children:X(o)}):c?(0,P.jsx)(b,{children:"webhook"}):"string"==typeof a?(0,P.jsx)(b,{children:Y(a)}):s&&U()(r=Object.values(l.bS)).call(r,s)?(0,P.jsx)(b,{children:Y(s)}):null}function Z(e,t){return`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`}const J=40;function ee(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:i,message:a,dialogueType:s,dialogueId:l,botId:c,isFollowup:u,sender:f}=e;return(0,P.jsxs)(d,{children:[(0,P.jsx)(L.H5,{children:"Message info"}),t&&(0,P.jsxs)(h,{$spaceBetween:!0,children:[i&&(0,P.jsxs)(B,{botId:c,dialogueType:s,dialogueId:l,children:[(0,P.jsx)(m,{}),(0,P.jsx)("span",{children:Z(i,J)})]}),!i&&(0,P.jsx)("span",{children:Z(a,J)}),(0,P.jsxs)(h,{children:[(0,P.jsx)(Q,{handler:r,score:o,dialogueType:s,sender:f,fromWebhook:n}),u&&(0,P.jsx)(Q,{dialogueType:"followup"})]})]}),!t&&(0,P.jsxs)(h,{$spaceBetween:!0,children:[Z(a,J),(0,P.jsx)(Q,{label:"user"})]})]})}function te(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:i,from_bot:a,bot_id:s,from_webhook:l,exchange_type:c,exchange_id:u,is_followup:d,pattern_context_match:p}}=e;const h=Object.keys(p||{}).length>0;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ee,{handler:o,fromBot:a,fromWebhook:l,score:n,title:r,message:t,dialogueType:c,dialogueId:u,botId:s,isFollowup:d,sender:i}),(0,P.jsx)(f,{}),h&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(z,{patternContextMatch:p}),(0,P.jsx)(f,{})]})]})}var ne=n(9159),re=n(1304);function oe(){const{active:e,chatHasStarted:t}=(0,c.d4)(u.$P),{offsetHeight:n}=(0,c.d4)(u.Od),{currentMessage:o,nextMessage:i,prevMessage:a,isFirstMessage:s,isLastMessage:l}=function(){var e,t;const n=(0,c.wA)(),{chatMessages:o}=(0,c.d4)(u.DZ),{currentMessageId:i}=(0,c.d4)(u.qV),a=i||(null===(e=o.slice(-1)[0])||void 0===e?void 0:e.id),s=o.findIndex(e=>{let{id:t}=e;return t===a}),l=(0,r.useCallback)(()=>{n((0,re.F3)(o[s+1].id))},[o,s,n]),d=(0,r.useCallback)(()=>{n((0,re.F3)(o[s-1].id))},[o,s,n]),f=null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0,p=(0,ne.A)(f),h=0===s,g=s===f-1;return(0,r.useEffect)(()=>{f>p&&n((0,re.F3)())},[n,f,p]),{currentMessage:o[s],nextMessage:l,prevMessage:d,isFirstMessage:h,isLastMessage:g}}();return(0,P.jsxs)(O,{$chatHasStarted:t,$active:e,$fullscreen:!1,$offsetHeight:n,$inspectorContainer:!0,children:[o&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(te,{chatMessage:o}),(0,P.jsxs)(h,{$spaceBetween:!0,children:[(0,P.jsx)(p,{disabled:s,onClick:a,children:"Show previous"}),(0,P.jsx)(p,{disabled:l,onClick:i,children:"Show next"})]})]}),!o&&(0,P.jsx)(M,{})]})}var ie=n(8832);const ae=i.Ay.div.withConfig({componentId:"sc-14jyotv-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;transform-origin:top;display:flex;z-index:15;position:absolute;padding:0 10px;transform:",";transition:",";width:100%;top:55px;span{font-size:var(--_kindlychat-font-size-p);margin-right:7px;}"],a.Tj.shadowColor,a.Tj.warningColor,a.Tj.warningColor,e=>{let{$show:t}=e;return t?"scaleY(1)":"scaleY(0)"},e=>{let{$show:t}=e;return t?"transform 0.15s ease-in":"transform 0.15s ease-out"}),se=i.Ay.div.withConfig({componentId:"sc-14jyotv-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),le=(0,i.Ay)(ie.N_).withConfig({componentId:"sc-14jyotv-2"})(["color:#0063a2;"]);function ce(){const{text:e,url:t,show:n}=(0,c.d4)(u.uF);return n?(0,P.jsxs)(ae,{$show:n,children:[(0,P.jsxs)(se,{children:[(0,P.jsx)("span",{children:"!"}),e]}),t&&(0,P.jsxs)(le,{href:t,target:"_blank",children:["url",(0,P.jsx)(D,{})]})]}):null}var ue=n(9154),de=n(6739);const fe=e=>{if("number"==typeof e)return 10===e.toString().length&&(e*=1e3),new Date(e);if("string"==typeof e){const t=e.replace(/\s+/g,"T");return new Date(t)}return e instanceof Date?e:new Date(0)};function pe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";const r=fe(e),o=new Date,i=r.toDateString()===o.toDateString(),a=t||n||"en",s=(e,t)=>{const n=t?{hour:"2-digit",minute:"2-digit"}:{day:"numeric",month:"short"};return t?r.toLocaleTimeString(e,n):r.toLocaleDateString(e,n)};try{return s(a,i)}catch(e){return s(n,i)}}var he=n(8663);const ge=(0,i.i7)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),me=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(300),ge),be=(0,i.AH)(["flex-direction:row-reverse;"]),ve=(0,i.AH)(["flex-direction:row;"]),ye=(0,i.AH)(["background:#e3e3e7;padding:0 30px;margin:10px -30px;position:relative;&:before{content:'';position:absolute;background:rgb(153,153,153);width:4px;height:calc(100% + 20px);left:0;z-index:1;}&:after{content:'';position:absolute;display:inline-block;width:100%;height:20px;background:#e3e3e7;top:100%;left:0;}"]),xe=i.Ay.div.withConfig({componentId:"sc-drt5la-0"})(["",";",";&:nth-child(1){padding-top:10px;}"],e=>e.$fromBot?ve:be,e=>{let{$inspected:t}=e;return t&&ye}),we=i.Ay.span.withConfig({componentId:"sc-drt5la-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:center;opacity:0;margin-bottom:16px;",";@media (prefers-reduced-motion){animation:none;opacity:1;}"],me),ke=(0,i.Ay)(L.mt).withConfig({componentId:"sc-drt5la-2"})(["opacity:1;margin:0;color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")}),Ce=i.Ay.div.withConfig({componentId:"sc-drt5la-3"})(["display:block;width:100%;",""],e=>e.$isLastGroupMessage&&"margin-bottom: 16px;");function Se(e){let{fromBot:t,created:n,shouldShowTime:r,children:o,inspected:i,disclaimerComponent:a,isLastGroupMessage:s}=e;const{currentLanguageCode:c}=(0,de.A)();return(0,P.jsx)(xe,{$fromBot:t,$inspected:i,"data-testid":l.gH,children:(0,P.jsxs)(Ce,{$isLastGroupMessage:s,children:[a,r&&(0,P.jsx)(we,{children:(0,P.jsx)(ke,{children:pe(n,c)})}),o]})})}var _e=n(6865);function Ae(e){return(0,P.jsxs)("svg",{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,P.jsx)("title",{children:"Unsuccessful upload"}),(0,P.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,P.jsx)("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero",children:(0,P.jsx)("path",{d:"m1152 637.67v8.7867l-4-4.0133-5.3333 5.3467-5.3333-5.3333-5.3333 5.3333-4-4.0133v-6.1067c0-1.4667 1.2-2.6667 2.6667-2.6667h18.667c1.4667 0 2.6667 1.2 2.6667 2.6667zm-4 8.56 4 4.0133v6.0933c0 1.4667-1.2 2.6667-2.6667 2.6667h-18.667c-1.4667 0-2.6667-1.2-2.6667-2.6667v-8.7733l4 3.9867 5.3333-5.3333 5.3333 5.3333 5.3333-5.32z"})})})]})}function Ee(e){return(0,P.jsxs)("svg",{...e,version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("title",{children:"Loading image upload"}),(0,P.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,P.jsx)("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero",children:(0,P.jsxs)("g",{transform:"translate(685 659)",children:[(0,P.jsx)("path",{d:"m15.67 9.414c-0.12139-0.24299-0.36467-0.40135-0.636-0.414-0.27276-0.023426-0.53433 0.11351-0.6705 0.351l-3.2505 5.199-2.3325-2.331c-0.16117-0.15568-0.38102-0.23533-0.6045-0.219-0.22394 0.02231-0.42603 0.144-0.5505 0.3315l-3 4.5c-0.1548 0.23022-0.16988 0.52708-0.039197 0.7718 0.13068 0.24471 0.38578 0.3973 0.6632 0.39671h13.5c0.26005 0 0.50153-0.13472 0.63814-0.35599 0.13661-0.22127 0.14886-0.49752 0.032357-0.73001l-3.75-7.5z"}),(0,P.jsx)("path",{d:"m21 0h-18c-1.6569 0-3 1.3431-3 3v18c0 1.6569 1.3431 3 3 3h18c1.6569 0 3-1.3431 3-3v-18c0-1.6569-1.3431-3-3-3zm-18 21v-18h18v18h-18z"}),(0,P.jsx)("circle",{cx:"7.5",cy:"7.5",r:"1.5"})]})})})]})}var Te=n(9514),je=n(5880),Ie=n(1308);function Oe(e){let{color:t="black",...n}=e;return(0,P.jsxs)("svg",{...n,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"M12 4.75V6.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M17.1265 6.87347L16.0659 7.93413",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M19.25 12L17.75 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M17.1265 17.1265L16.0659 16.0659",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12 17.75V19.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M7.93413 16.0659L6.87347 17.1265",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M6.24997 12L4.74997 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M7.93413 7.93413L6.87347 6.87347",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Le=i.Ay.button.withConfig({componentId:"sc-19ca8jq-0"})(["position:absolute;top:24px;right:24px;border:1px solid rgba(0,0,0,0.2);background:rgba(255,255,255,0.8);border-radius:6px;padding:5px;box-shadow:0 2px 4px rgba(0,0,0,0.1);transition:all 0.2s ease;cursor:pointer;& svg{display:block;}"]),Pe=i.Ay.dialog.withConfig({componentId:"sc-19ca8jq-1"})(["all:unset;position:fixed;display:flex;inset:0;align-items:center;justify-content:center;&::backdrop{background:rgba(0,0,0,0.5);}"]),Ne=i.Ay.img.withConfig({componentId:"sc-19ca8jq-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]),Me=()=>{const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e)return;const t=[],n=[...e.getElementsByTagName("img")].filter(e=>!e.complete||!e.naturalWidth).map(e=>new Promise(n=>{t.push({img:e,resolver:n}),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return 0===n.length?o(!0):Promise.all(n).then(()=>{o(!0)}),()=>{t.forEach(e=>{let{img:t,resolver:n}=e;t.removeEventListener("load",n),t.removeEventListener("error",n)})}},[e]),[t,n]};var ze=n(5650),Re=n(7636);function $e(e){const{browserName:t}=function(){const{userAgent:e}=navigator;let t;return t=e.match(/chrome|chromium|crios/i)?"chrome":e.match(/firefox|fxios/i)?"firefox":e.match(/safari/i)?"safari":e.match(/opr\//i)?"opera":e.match(/edg/i)?"edge":"No browser detection",{browserName:t,userAgent:e}}();return e===t}const De="6px",Fe=()=>`\n /* If browser support backdrop-filter */\n ${$e("chrome")&&"\n background: rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(8px);\n opacity: 1;\n\n &:hover {\n background: rgba(255, 255, 255, 0.4);\n background-color: rgba(255, 255, 255, 0.4);\n\n + svg path {\n mix-blend-mode: unset;\n stroke: black;\n }\n }\n "}\n`,Be=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${$e("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,He=i.Ay.div.withConfig({componentId:"sc-1uha618-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:",";position:relative;width:100%;min-height:100px;"," background:#232F41;color:#fff;font-size:var(--_kindlychat-font-size-p);"],e=>{let{$hasCaption:t}=e;return t?`${De} ${De} 0 0`:De},e=>e.$imageHeight&&`height: ${e.$imageHeight}px;`),Ue=i.Ay.div.withConfig({componentId:"sc-1uha618-1"})(["position:relative;overflow:hidden;margin-left:-25px;width:calc(100% + 50px);> div{",";}"],e=>e.$active&&"\n position: relative;\n width: 100000%;\n display: flex;\n "),Ve=i.Ay.div.withConfig({componentId:"sc-1uha618-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:fit-content;margin-right:5px;margin-top:2px;margin-bottom:2px;border-radius:",";box-shadow:0px 2px 6px rgba(0,0,0,0.06);overflow:hidden;color:",";",";&::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0px 0px 1px rgba(0,0,0,0.32);border-radius:",";}"],e=>e.$imageWidth,De,a.qd.textColor,e=>{let{$first:t,$isCarousel:n}=e;return t||!n?"margin-left: 25px":""},De),We=(0,i.AH)(["position:relative;display:",";min-height:100px;",""],e=>e.hidden?"none":"block",e=>e.$isCarousel?`height: ${e.$imageHeight}px;`:"height: auto;"),Ge=i.Ay.a.withConfig({componentId:"sc-1uha618-3"})(["",""],We),qe=i.Ay.div.withConfig({componentId:"sc-1uha618-4"})(["",""],We),Ke=i.Ay.img.withConfig({componentId:"sc-1uha618-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;display:block;"," ",""],e=>e.$carousel&&e.$imageHeight&&e.$imageWidth?`\n height: ${e.$imageHeight}px; \n object-fit: cover; \n width: ${e.$imageWidth}px;\n `:"",R.sF),Ye=i.Ay.div.withConfig({componentId:"sc-1uha618-6"})(["background:",";> *:last-child{margin-bottom:8px;}"],e=>{let{theme:t}=e;return t.panelBackground}),Xe=i.Ay.h3.withConfig({componentId:"sc-1uha618-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:var(--_kindlychat-font-size-p);line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--panel-background-white-black-contrast-1743170834);"]),Qe=i.Ay.div.withConfig({componentId:"sc-1uha618-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:var(--_kindlychat-font-size-sm);line-height:16px;color:var(--panel-background-white-black-contrast-1743170834);white-space:pre-line;opacity:0.6;"]),Ze=i.Ay.button.withConfig({componentId:"sc-1uha618-9"})(["all:unset;position:relative;display:flex;height:35px;max-width:100%;font-size:var(--_kindlychat-font-size-p);align-items:center;justify-content:center;padding:4px 12px;color:var(--panel-background-white-black-contrast-1743170834);background-color:",";border-top:1px solid ",";font-weight:500;gap:6px;cursor:pointer;"," &:hover{filter:brightness(0.9);}> span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}svg{flex-shrink:0;& path{stroke:currentColor;}}&:focus-visible{&::after{content:'';position:absolute;inset:3px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{$inView:t}=e;return!t&&"opacity: 0.5;"}),Je=i.Ay.button.withConfig({componentId:"sc-1uha618-10"})(["position:absolute;top:50%;transform:translateY(-50%);background:#fff;background-color:#fff;border:none;width:36px;height:36px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 0 2px 0px;border-radius:100px;opacity:0.8;transition:all 0.2s ease;box-shadow:0px 2px 6px rgba(0,0,0,0.04);&:hover{opacity:1;}&:active{background-color:#efeeee;opacity:1;}"," "," ",";",""],R.sF,e=>{let{$next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{$disabled:t}=e;return t&&"display: none"},Fe),et=(0,i.Ay)(Ie.A6).withConfig({componentId:"sc-1uha618-11"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Be),tt=(0,i.Ay)(Ie.fl).withConfig({componentId:"sc-1uha618-12"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Be),nt=i.Ay.div.withConfig({componentId:"sc-1uha618-13"})(["position:absolute;left:",";bottom:",";background:#fff;display:flex;align-items:center;justify-content:center;width:24px;height:24px;opacity:0.8;border-radius:50%;pointer-events:none;",""],a.Nl.wrapper,a.Nl.wrapper,Fe),rt=(0,i.Ay)(Ie.qY).withConfig({componentId:"sc-1uha618-14"})(["bottom:",";left:",";",""],a.Nl.icon,a.Nl.icon,Be),ot=(0,i.Ay)(Ie.Gr).withConfig({componentId:"sc-1uha618-15"})(["position:relative;left:-2px;top:1px;"]),it=i.Ay.button.withConfig({componentId:"sc-1uha618-16"})(["display:",";position:absolute;top:",";right:",";width:24px;height:24px;align-items:center;justify-content:center;border-radius:2px;border:none;cursor:pointer;background:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.04);opacity:0.8;padding:0px 0 0 1px;"," &:hover{opacity:1;}",""],e=>e.$inView?"flex":"none",a.Nl.wrapper,a.Nl.wrapper,R.sF,Fe),at=(0,i.Ay)(Ie.gp).withConfig({componentId:"sc-1uha618-17"})(["top:",";right:",";",""],a.Nl.icon,a.Nl.icon,Be);function st(e){return(0,P.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,P.jsx)("path",{d:"M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}const lt=(0,i.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),ct=((0,i.i7)(["from{max-height:200px;}to{max-height:0;overflow:hidden;}"]),i.Ay.div.withConfig({componentId:"sc-kwvd9-0"})(["background:none;will-change:transform,opacity,max-height;width:auto;display:grid;position:relative;grid-template-columns:37px auto 37px;@media (prefers-reduced-motion){animation:none;}"])),ut=i.Ay.div.withConfig({componentId:"sc-kwvd9-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;margin:8px 0px;padding:10px 8px;align-self:center;background:",";background-color:",";"],e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground),dt=i.Ay.span.withConfig({componentId:"sc-kwvd9-2"})(["height:3px;width:3px;margin:0 2px;background:",";background-color:",";display:block;opacity:1;border-radius:100px;&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")},e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")},lt,lt,lt),ft=i.Ay.div.withConfig({componentId:"sc-kwvd9-3"})(["font-size:var(--_kindlychat-font-size-sm);display:flex;flex-direction:row;align-items:center;line-height:16px;margin:3px auto 0;padding:0 8px;color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),pt=i.Ay.span.withConfig({componentId:"sc-kwvd9-4"})(["font-weight:500;"]),ht=i.Ay.span.withConfig({componentId:"sc-kwvd9-5"})(["display:flex;flex-direction:row;align-items:center;"]),gt=i.Ay.div.withConfig({componentId:"sc-kwvd9-6"})(["display:inline-block;"]);function mt(e){let{loadingType:t,text:n,botName:r}=e;return(0,P.jsxs)(ct,{"data-testid":l.dT,children:[(0,P.jsxs)(ut,{$loadingType:t,children:[(0,P.jsx)(dt,{$loadingType:t}),(0,P.jsx)(dt,{$loadingType:t}),(0,P.jsx)(dt,{$loadingType:t})]}),n&&(0,P.jsxs)(ft,{children:[(0,P.jsx)(ht,{children:(0,P.jsx)(st,{width:16,height:16})})," ",(0,P.jsxs)(gt,{children:[(0,P.jsx)(pt,{children:r})," ",n]})]})]})}function bt(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return(0,P.jsxs)(He,{title:"Loading image...",$imageWidth:t,$imageHeight:n?Number(n):void 0,$hasCaption:r,children:[(0,P.jsx)(mt,{loadingType:"image"}),(0,P.jsx)("div",{children:"Loading image"})]})}const vt=(0,i.i7)(["from{background-position:0%;}to{background-position:-200%;}"]),yt=i.Ay.div.withConfig({componentId:"sc-jo8x8h-0"})(["position:absolute;left:0;width:100%;top:0;height:100%;color:black;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:",";transition:opacity "," ease-out;div:first-child{height:100%;width:100%;position:absolute;background:",";background-size:200% 100%;animation:1.3s linear "," infinite 0s;opacity:0.5;}div:nth-child(2){height:100%;width:100%;position:absolute;background:white;opacity:",";}div:nth-child(3){z-index:1;}"],e=>{let{$finished:t}=e;return t?0:1},e=>{let{$hideTransitionLength:t}=e;return`${t}s`},"\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(255, 255, 255, 0.738) 9.5%,\n rgba(255, 255, 255, 0.541) 17%,\n rgba(255, 255, 255, 0.382) 23.5%,\n rgba(255, 255, 255, 0.278) 28.3%,\n rgba(255, 255, 255, 0.194) 32.5%,\n rgba(255, 255, 255, 0.126) 36.5%,\n rgba(255, 255, 255, 0.075) 40.1%,\n rgba(255, 255, 255, 0.042) 43.1%,\n rgba(255, 255, 255, 0.021) 45.5%,\n rgba(255, 255, 255, 0.008) 46.3%,\n rgba(255, 255, 255, 0.002) 49.3%,\n rgba(255, 255, 255, 0) 50%,\n rgba(255, 255, 255, 0.002) 50.7%,\n rgba(255, 255, 255, 0.008) 53.7%,\n rgba(255, 255, 255, 0.021) 54.5%,\n rgba(255, 255, 255, 0.042) 59.9%,\n rgba(255, 255, 255, 0.075) 61.7%,\n rgba(255, 255, 255, 0.126) 63.5%,\n rgba(255, 255, 255, 0.194) 67.5%,\n rgba(255, 255, 255, 0.278) 71.7%,\n rgba(255, 255, 255, 0.382) 76.5%,\n rgba(255, 255, 255, 0.541) 83%,\n rgba(255, 255, 255, 0.738) 90.5%,\n rgba(255, 255, 255, 1) 100%\n )\n",vt,e=>{let{$opacity:t}=e;return t}),xt=.3;function wt(e){let{loading:t,children:n,opacity:o=.6}=e;const[i,a]=(0,r.useState)(!t);return(0,r.useEffect)(()=>{i||t||setTimeout(()=>a(!0),1e3*xt)},[i,t]),i?null:(0,P.jsxs)(yt,{$finished:!t,$hideTransitionLength:xt,$opacity:o,children:[(0,P.jsx)("div",{}),(0,P.jsx)("div",{}),(0,P.jsx)("div",{children:n})]})}const kt={link:(0,P.jsx)(ot,{size:20}),dialogue_trigger:(0,P.jsx)(Oe,{})};function Ct(e){var t,n,o,i;let{image:a,first:s,isCarousel:d,fromBot:f,inView:p,imageWidth:h,imageHeight:g,loading:m}=e;const[b,v]=Me(),y=(0,c.wA)(),{chatMessages:x}=(0,c.d4)(u.DZ)||[],w=(0,c.d4)(u.$P)||[],[k,C]=(0,r.useState)(!1),S=(0,r.useRef)(null),_=h===l.T5[600],A=e=>t=>{const n=x.map(Re.A),r=n[n.length-1];(0,je.fz)({event:t,button:(0,ze.A)(e),buttonType:e.button_type,chatLog:n,lastMessage:r,renderedBy:null==w?void 0:w.renderedBy})||(y((0,re.Bd)(e,r)),"link"===e.button_type&&setTimeout(()=>window.open(e.value,"_blank"),500))},E=Boolean((null===(t=a.title)||void 0===t?void 0:t.trim())||(null===(n=a.description)||void 0===n?void 0:n.trim())),T=null!=a&&a.newTab?"_blank":"_self",j=a.buttons||[],I=a.description&&(null===(o=a.description)||void 0===o?void 0:o.length)>100?a.description.slice(0,100).concat("..."):a.description;return(0,r.useEffect)(()=>{var e,t;k&&(null===(e=S.current)||void 0===e||e.close(),null===(t=S.current)||void 0===t||t.showModal())},[k]),(0,P.jsxs)(P.Fragment,{children:[k&&(0,Te.createPortal)((0,P.jsxs)(Pe,{onClick:()=>C(!1),ref:S,children:[(0,P.jsx)(Le,{onClick:()=>C(!1),autoFocus:!0,children:(0,P.jsx)(Ie.US,{width:"30",height:"30"})}),(0,P.jsx)(Ne,{src:a.imageUrl})]}),((null===(i=window.kindlyChat)||void 0===i?void 0:i.shadowRoot)||window.document).getElementById("chatContainer")),(0,P.jsxs)(Ve,{$first:s,ref:b,$imageWidth:h,$imageHeight:g,$isCarousel:d,$fromBot:f,inert:p?void 0:"true",children:[(0,P.jsx)(wt,{loading:!!m,children:"Uploading"}),a.linkUrl?(0,P.jsxs)(Ge,{$imageWidth:h,$imageHeight:g,hidden:!v,href:a.linkUrl,target:T,$isCarousel:d,children:[(0,P.jsx)(Ke,{src:a.imageUrl,alt:a.altText,tabIndex:0,$carousel:d,$fromBot:f,$imageWidth:h,$imageHeight:g}),a.linkUrl&&(0,P.jsx)(nt,{}),a.linkUrl&&(0,P.jsx)(rt,{width:16,height:16})]}):(0,P.jsx)(qe,{$imageWidth:h,$imageHeight:g,hidden:!v,$isCarousel:d,children:(0,P.jsx)(Ke,{src:a.imageUrl,alt:a.altText,tabIndex:-1,$carousel:d,$fromBot:f,$imageWidth:h,$imageHeight:g})}),!m&&(0,P.jsx)(it,{"data-testid":"enlarge-image-button","aria-label":"Enlarge image",onClick:()=>C(!0),$inView:p}),!m&&(0,P.jsx)(at,{}),!v&&(0,P.jsx)(bt,{imageWidth:h,imageHeight:g,hasCaption:E}),E&&(0,P.jsxs)(Ye,{children:[a.title&&(0,P.jsx)(Xe,{$imageWidth:h,$imageHeight:g,children:a.title}),I&&(0,P.jsx)(Qe,{$imageWidth:h,$imageHeight:g,children:I})]}),!_&&j.map(e=>(0,P.jsxs)(Ze,{title:e.label,onClick:A(e),$inView:p,children:[(0,P.jsx)("span",{children:e.label}),kt[e.button_type]]},e.id))]})]})}var St=n(4518),_t=n(4785);const At=e=>{let{fromUser:t,$hasError:n,theme:r}=e;return n?a.Tj.grayColor:t?r.userMessageBackground:r.botMessageBackground},Et=i.Ay.div.withConfig({componentId:"sc-3i0o6s-0"})(["position:relative;text-align:center;cursor:pointer;text-transform:none;width:80%;max-width:calc(80% - 25px);border-radius:17px;font-weight:500;border:none;padding:",";font-family:",";font-size:var(--_kindlychat-font-size-p);background:",";background-color:",";transition:opacity 0.2s ease-out;margin:8px 0 2px 25px;display:block;a,span{display:block;color:",";text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;z-index:2;}& > svg:first-child{position:absolute;top:-7px;left:-4px;width:15px;path{opacity:",";transition:opacity 0.2s ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{$hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},_t.m.default,At,At,e=>{let{fromUser:t,theme:n}=e;return(0,he.w5)(t?n.userMessageBackground:n.botMessageBackground,"#FFFFFF","#000000")},e=>{let{$loading:t}=e;return t?.5:1}),Tt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-1"})(["width:20px;height:20px;left:-10px;bottom:5px;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),jt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-2"})(["width:175px;height:175px;position:relative;display:flex;justify-content:center;margin-bottom:4px;background:",";border-radius:15px;svg{width:24px;z-index:2;}"],a.Tj.grayColor),It=i.Ay.div.withConfig({componentId:"sc-3i0o6s-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});function Ot(e){let{avatar:t}=e;const n=t?{backgroundImage:`url(${t})`}:{};return t?(0,P.jsx)(Tt,{style:n}):null}var Lt=n(7133);const Pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{token:t}=(0,c.d4)(u.FI),{PAT_HOST:n}=(0,c.d4)(u.cA);return(0,Lt.l)(e,n,t)},Nt="\n background: black;\n border-radius: 15px;\n",Mt=i.Ay.iframe.withConfig({componentId:"sc-6x850n-0"})(["",""],Nt),zt=i.Ay.video.withConfig({componentId:"sc-6x850n-1"})(["",""],Nt);function Rt(e){var t;let{source:n,type:r}=e;const o=null===(t=n.split(".").pop())||void 0===t?void 0:t.toLowerCase();return(0,P.jsxs)(zt,{width:"240",controls:!0,"data-chromatic":"ignore",children:[(0,P.jsx)("source",{src:n,type:r||`video/${o}`}),"Your browser does not support HTML5 video."]})}function $t(e){var t;let{attachment:n,avatar:r,chatMessageStatus:o}=e;const i=n.sender===l.bS.USER,a=(0,St.A)(n),s=a===l.sl.IMAGE,c=a===l.sl.VIDEO,u=Boolean(o)||n.status===l.Le.ERROR||n.status===l.Le.INFECTED,d=Pt(n),f=!d,p={imageUrl:null!=d?d:"",altText:`Image ${n.name||`from ${null!==(t=null==n?void 0:n.sender)&&void 0!==t?t:"agent"}`}`};return s?(0,P.jsxs)(It,{fromUser:i,children:[(0,P.jsx)(Ot,{avatar:r}),!u&&!f&&(0,P.jsx)(Ct,{image:p,fromBot:!i,isCarousel:!1,imageWidth:"250",inView:!0,first:!1,loading:n.status===l.Le.PROCESSING}),!u&&f&&(0,P.jsxs)(jt,{isImage:s,children:[(0,P.jsx)(Ee,{}),(0,P.jsx)(wt,{loading:!0})]}),u&&(0,P.jsx)(jt,{children:(0,P.jsx)(Ae,{})})]}):c?(0,P.jsxs)(It,{fromUser:i,children:[(0,P.jsx)(Ot,{avatar:r}),!u&&!f&&(0,P.jsx)(Rt,{source:d,type:n.type}),!u&&f&&(0,P.jsxs)(jt,{children:[(0,P.jsx)(Ee,{}),(0,P.jsx)(wt,{loading:!0})]}),u&&(0,P.jsx)(jt,{children:(0,P.jsx)(Ae,{})})]}):(0,P.jsxs)(It,{fromUser:i,children:[(0,P.jsx)(Ot,{avatar:r}),(0,P.jsxs)(Et,{fromUser:i,$loading:f,$hasError:u,children:[(0,P.jsx)(_e.A,{height:10}),(0,P.jsx)(wt,{loading:!u&&f,opacity:.35}),!u&&!f&&(0,P.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:[n.name,(0,P.jsx)(D,{})]}),!u&&f&&(0,P.jsx)("span",{children:"Uploading"}),u&&(0,P.jsx)(Ae,{})]})]})}var Dt=n(9338),Ft=n(166),Bt=n(5516);const Ht=140;function Ut(e){let{chatMessage:t,imageCarousel:n}=e;const[o,i]=(0,r.useState)(0),[a,s]=(0,r.useState)(0),c=l.T5[t.image_carousel_size||1e3],[u,d]=(0,r.useState)(Ht.toString());(0,r.useEffect)(()=>{let e=!0;if(null!=n&&n.length){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/c,r=t.height/n;e&&d(r.toString())}}return()=>{e=!1}},[n,d,c]);const f=(0,r.useMemo)(()=>c===l.T5[800]?102:c===l.T5[600]?96:30,[c]),p=e=>c===l.T5[600]&&o===e-1||o===e,h=(0,r.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*c-f):-(e*c+5*e),i(e),s(n)},[c,f]),{handleTouchStart:g,handleTouchMove:m,handleTouchEnd:b}=(0,Ft.A)({carousel:n,index:o,setIndex:h}),v=(0,r.useCallback)(e=>{e&&setTimeout(()=>{e.scrollLeft=0},100)},[]);return(0,P.jsxs)(Ue,{$active:n.length>1,ref:v,children:[(0,P.jsx)(Bt.A,{carouselPosition:a,onTouchStart:g,onTouchMove:m,onTouchEnd:b,children:n.map((e,r)=>(0,P.jsx)(Ct,{first:0===r,image:e,fromBot:t.from_bot,isCarousel:n.length>1,inView:p(r),imageWidth:c,imageHeight:u},e.id||r))}),(0,P.jsx)(Je,{$previous:!0,$disabled:o<=0,"aria-label":"Go to previous image",onClick:()=>h(o-1,n)}),(0,P.jsx)(et,{disabled:o<=0}),(0,P.jsx)(Je,{$next:!0,$disabled:o>=n.length-1,"aria-label":"Go to next image",onClick:()=>h(o+1,n)}),(0,P.jsx)(tt,{disabled:o>=n.length-1})]})}var Vt=n(5134);const Wt=i.Ay.button.withConfig({componentId:"sc-1upnaey-0"})(["display:block;background:none;background-color:transparent;border:none;text-decoration:underline;font-weight:600;font-size:var(--_kindlychat-font-size-p);color:",";cursor:pointer;padding:0;",""],e=>{let{theme:t}=e;return(0,he.w5)(t.userMessageBackground,"#FFFFFF","#000000")},R.sF);function Gt(e){let{button:t}=e;const n=(0,Vt.jL)();return(0,P.jsx)(Wt,{onClick:()=>n((0,re.V$)(t)),children:t.contact_details.edit_text})}var qt=n(7041);const Kt=(0,i.i7)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Yt=(0,i.i7)(["0%{-webkit-font-smoothing:subpixel-antialiased;opacity:0;transform:scale(0.76);}35%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}75%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}100%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1);}"]),Xt=(0,i.AH)(["",";text-rendering:optimizeLegibility;animation-name:",";"],e=>{let{$isSystemMessage:t}=e;return(0,y.qL)(t?1200:600)},e=>{let{$isSystemMessage:t}=e;return t?Yt:Kt}),Qt=i.Ay.div.withConfig({componentId:"sc-1d179v9-0"})(["display:block;width:100%;"]),Zt=i.Ay.div.withConfig({componentId:"sc-1d179v9-1"})(["display:flex;flex-direction:column;",";",";"," @media (prefers-reduced-motion){animation:none;}"],Xt,e=>!e.$fromBot&&"display: block; ",e=>e.$hasSiblings&&"margin-bottom: 8px;"),Jt=i.Ay.div.withConfig({componentId:"sc-1d179v9-2"})(["display:flex;flex-direction:column;",";"," sup{position:relative;vertical-align:top;top:-0.3em;font-size:0.7em;}sup + sup{margin-left:0.2em;}"],e=>{let{$fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.$hasSiblings&&"margin-bottom: 8px;"),en=i.Ay.div.withConfig({componentId:"sc-1d179v9-3"})(["display:inline-flex;"," max-width:100%;flex-direction:",";"," margin-bottom:6px;flex-wrap:wrap;gap:6px;",";@media (prefers-reduced-motion){animation:none;}"],e=>{let{$orientation:t}=e;return t===l.Ii.VERTICAL&&"width: 240px;"},e=>{let{$orientation:t}=e;return t===l.Ii.HORIZONTAL?"row":"column"},e=>{let{$nextMessageType:t}=e;return t===l.bS.SYSTEM&&"margin-bottom: 16px;"},Xt),tn=(0,i.AH)(["white-space:pre-wrap;color:",";background:",";&:where(",":first-of-type:not(:only-of-type) &){border-radius:16px 16px 0px 16px;}&:where(",":last-of-type:not(:only-of-type) &){border-radius:16px 0px 16px 16px;}&:where(",":not(:first-of-type):not(:last-of-type) &){border-radius:16px 0px 0px 16px;}&:where(",":only-of-type &){border-radius:16px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.userMessageBackground,"#FFFFFF","#000000")},e=>e.theme.userMessageBackground,Qt,Qt,Qt,Qt),nn=(0,i.AH)(["color:",";background:",";&:first-child:not(:only-child){border-radius:16px 16px 16px 0px;}&:last-child:not(:only-child){border-radius:0px 16px 16px 16px;}&:not(:first-child):not(:last-child){border-radius:0px 16px 16px 0px;}&:only-child{border-radius:16px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.botMessageBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return t.botMessageBackground}),rn=(0,i.AH)(["margin-left:25px;white-space:pre-wrap;"]),on=(0,i.AH)(["position:relative;display:inline-block;max-width:240px;min-width:32px;margin:1px 0px;padding-top:10px;padding-bottom:10px;border:0;border-radius:16px;font-size:var(--_kindlychat-font-size-p);line-height:18px;word-break:normal;overflow-wrap:anywhere;"," "," "," "," p{all:unset;}a{color:inherit;&:hover{background-color:color-mix(in srgb,currentColor 15%,transparent);}}pre{white-space:pre-wrap;}"],e=>e.$clickable&&"cursor: pointer;",e=>e.$fromBot?nn:tn,e=>e.$fromAgent&&rn,R.sF),an=i.Ay.div.withConfig({componentId:"sc-4agunw-0"})(["",""],on),sn=i.Ay.a.withConfig({componentId:"sc-4agunw-1"})(["text-decoration:none;",""],on),ln=i.Ay.div.withConfig({componentId:"sc-4agunw-2"})(["--padding-base:15px;padding-left:var(--padding-base);padding-right:var(--padding-base);& a{text-decoration:underline;}& ol,& ul{padding-left:calc(var(--padding-base) + 4px);}"]),cn=i.Ay.hr.withConfig({componentId:"sc-4agunw-3"})(["border:0;height:1px;background:",";margin-top:8px;margin-bottom:4px;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#636472","#dfe0e3")}),un=i.Ay.div.withConfig({componentId:"sc-4agunw-4"})(["width:20px;height:20px;left:-35px;bottom:0;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground);var dn=n(2848);const fn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-0"})(["font-size:var(--_kindlychat-font-size-sm);margin-top:4px;margin-bottom:5px;"]),pn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-1"})(["display:flex;flex-wrap:wrap;gap:6px;overflow:hidden;padding:2px;font-size:var(--_kindlychat-font-size-sm);"]),hn=i.Ay.a.withConfig({componentId:"sc-1hjf3xk-2"})(["align-items:center;border-radius:4px;color:inherit;display:inline-flex;line-height:16px;outline:1px solid ",";overflow:hidden;padding:1px 3px;text-decoration:none !important;text-overflow:ellipsis;white-space:nowrap;transition:all 0.2s ease-in-out;&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}&:hover{outline-width:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);background-color:#f2f2f233;}svg{margin-left:4px;height:11px;width:11px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#F2F2F233","#0D0D0D33")}),gn=i.Ay.span.withConfig({componentId:"sc-1hjf3xk-3"})(["max-width:100%;overflow:hidden;text-overflow:ellipsis;margin-left:3px;"]),mn=i.Ay.sup.withConfig({componentId:"sc-1hjf3xk-4"})(["font-size:0.7em;bottom:0.33em;position:relative;"]);function bn(e){let{references:t,onReferenceClick:n}=e;const{reference_list_title:r,read_more_text:o}=(0,dn.A)(),i=t.map(e=>e.url),a=e=>{n(e.currentTarget.href)};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(fn,{children:r}),(0,P.jsx)(pn,{children:i.map((e,t)=>(0,P.jsxs)(hn,{href:e,target:"_blank",rel:"noopener noreferrer",onClick:a,children:[(0,P.jsx)(mn,{children:t+1}),(0,P.jsx)(gn,{children:o}),(0,P.jsx)(Ie.Gr,{color:"currentColor"}),(0,P.jsx)(D,{})]},e))})]})}const vn=[l.bS.WEBHOOK,l.bS.AGENT];function yn(e){let{children:t,chatMessage:n}=e;const{bot_id:r,exchange_id:o}=n,i="usersays"===n.exchange_type?"dialogue":n.exchange_type,a=`/workspace/${r}/build/${null==i?void 0:i.replace("_","-")}/${o}`;return(0,P.jsx)(sn,{$fromBot:n.from_bot,$clickable:!0,role:"link",tabIndex:0,href:a,children:t})}function xn(e){let{references:t,onReferenceClick:n}=e;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(cn,{}),(0,P.jsx)(ln,{children:(0,P.jsx)(bn,{references:t,onReferenceClick:n})})]})}function wn(e){var t;let{chatMessage:n,editContactDetailsButton:r,lineIndex:o,messageLine:i,numLines:a,preface:s,references:d=[]}=e;const f=(0,c.wA)(),{inPlatform:p}=(0,c.d4)(u.$P),{isTextDirectionRtl:h}=(0,c.d4)(u.Od),g=h?"rtl":void 0,m=p&&n.from_bot&&n.exchange_type&&!U()(t=vn).call(t,n.sender),b=d.length>0,v=n.sender===l.bS.AGENT,y=o===a-1,x=n.from_bot,w=(0,P.jsx)("p",{children:(0,P.jsx)("strong",{children:s})}),k=e=>{f((0,re.qJ)({url:e,messageId:n.id}))};return m?(0,P.jsxs)(yn,{chatMessage:n,children:[s&&w,(0,P.jsx)(ln,{children:x?(0,qt.A)(i):i}),y&&b&&(0,P.jsx)(xn,{references:d,onReferenceClick:k})]}):(0,P.jsxs)(an,{dir:g,$fromAgent:v,$fromBot:x,children:[(0,P.jsxs)(ln,{children:[s&&w,v&&(0,P.jsx)(un,{style:{backgroundImage:`url(${n.avatar})`}}),x?(0,qt.A)(i):i,y&&r&&(0,P.jsx)(Gt,{button:r})]}),y&&b&&(0,P.jsx)(xn,{references:d,onReferenceClick:k})]})}var kn=n(4174);const Cn=i.Ay.div.withConfig({componentId:"sc-285zcy-0"})(["display:flex;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:red;justify-content:flex-end;margin-bottom:2px;"]),Sn=i.Ay.div.withConfig({componentId:"sc-285zcy-1"})(["display:flex;"]),_n=i.Ay.button.withConfig({componentId:"sc-285zcy-2"})(["display:block;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],a.Tj.darkColor,R.sF);function An(e){let{chatMessage:t,attachments:n}=e;const o=(0,Vt.jL)(),i=Boolean(t.message),a=(null==n?void 0:n.length)>0,s=(0,r.useCallback)(()=>{i&&o((0,re.tM)(t.message,t.id))},[t,o,i]),l=(0,r.useCallback)(()=>{i?o((0,re.aP)(t.message,t.id,{})):a&&kn.A.getInstance().getConnection().restart()},[t,o,a,i]);return t.status>=500?(0,P.jsxs)(Cn,{children:[a?"Upload failed":"Message not delivered"," ",(0,P.jsx)(Sn,{children:!a&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(_n,{onClick:s,children:"Try again"}),(0,P.jsx)(_n,{onClick:l,children:"Restart chat"})]})})]}):429===t.status?(0,P.jsxs)(Cn,{children:["Too many messages, please slow down."," ",(0,P.jsx)(Sn,{children:(0,P.jsx)(_n,{onClick:s,children:"Try again"})})]}):(0,P.jsxs)(Cn,{children:["An error occurred. ",(0,P.jsx)(_n,{onClick:l,children:"Restart chat"})]})}var En=n(7931);function Tn(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?(0,P.jsx)(Mt,{src:`https://player.vimeo.com/video/${n[2]}?title=0&byline=0&portrait=0`,width:"240",height:"auto",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,"data-chromatic":"ignore",title:"Vimeo video player"}):null}const jn=e=>e.replace("?t=","?start=").replace("&t=","&start="),In=e=>{const t=e.toLowerCase();let n=e;return U()(t).call(t,"youtube.com")?(n=e.replace("&","?"),n=jn(n),n.split("v=")[1]):U()(t).call(t,"youtu.be")?(n=jn(e),n.split("youtu.be/")[1]):n};function On(e){let{source:t}=e;const n=In(t);return(0,P.jsx)(Mt,{width:"240",height:"auto",src:`https://www.youtube-nocookie.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})}function Ln(e){let{source:t}=e;return U()(t).call(t,"youtube.com")||U()(t).call(t,"youtu.be")?(0,P.jsx)(On,{source:t}):U()(t).call(t,"vimeo.com")?(0,P.jsx)(Tn,{source:t}):(0,P.jsx)(Rt,{source:t})}const Pn=e=>{let{root:t=null,threshold:n=1,onChange:o,skip:i=!1}=e;const[a,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(i)return;l.current&&l.current.disconnect(),l.current=new IntersectionObserver(o,{root:t,threshold:n});const{current:e}=l;return a&&e.observe(a),()=>e.disconnect()},[a,t,o,i,n]),s};function Nn(e,t){if(!t||!t.length)return e;const n=Array.from(e);let r=0;return t.flatMap((e,t)=>e.offsets.map(e=>({offset:e,number:t+1}))).sort((e,t)=>e.offset-t.offset).forEach(e=>{let{offset:t,number:o}=e;const i=r+t,a=`<sup>${o}</sup>`;n.splice(i,0,...Array.from(a)),r+=a.length}),n.join("")}var Mn=n(9982),zn=n(8256),Rn=n(3551),$n=n(7279),Dn=n(1226),Fn=n(786),Bn=n(9990),Hn=n(27),Un=n(9492),Vn=n(8068);const Wn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"SUBMITTED";return async(r,o)=>{const{connection:{token:i}}=o(),{PAT_HOST:a}=o().environment,{headers:s}=(0,Bn.A)({token:i},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r((0,re.et)(`${a}/chatbubble/${l.Ak}/form/submit`,{method:"POST",body:c,headers:s}))}},Gn=e=>({...e,temporaryId:`tempId-${(0,Fn.A)()}`});var qn=n(914),Kn=n(7638),Yn=n(4557),Xn=function(e){return e.TEXT="TEXT",e.CHECKBOX="CHECKBOX",e.RANGE="RANGE",e.EMAIL="EMAIL",e.NUMBER="NUMBER",e.SELECT="SELECT",e.RADIO="RADIO",e}(Xn||{});const Qn=e=>{var t;const n={};return null!==(t=e.fields)&&void 0!==t&&t.length&&e.fields.forEach(e=>{var t,r;null!==(t=e.attributes)&&void 0!==t&&t.default_value&&(n[e.slug]=e.attributes.default_value),e.input_type!==Xn.SELECT||null!==(r=e.attributes)&&void 0!==r&&r.default_value||(n[e.slug]="")}),n},Zn=e=>{let t=0;return e.fields.forEach(e=>{var n,r;if(e.input_type===Yn.cJ.RANGE)t+=92;else if(e.input_type===Yn.cJ.SELECT)t+=51;else if(e.input_type===Yn.cJ.FILE)t+=113;else if(e.input_type===Yn.cJ.CHECKBOX||e.input_type===Yn.cJ.RADIO){var o;t+=30*((null===(o=e.attributes)||void 0===o?void 0:o.options.length)||1)+16}else t+=53;null!==(n=e.texts)&&void 0!==n&&n.label&&(t+=26),null!==(r=e.texts)&&void 0!==r&&r.help_text&&(t+=20)}),t+=48,t};var Jn=n(437);const er=i.Ay.div.withConfig({componentId:"sc-1sb6ll-0"})(["display:flex;flex-direction:column;"]),tr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-1"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),nr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-2"})(["display:flex;flex-direction:column;"]),rr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-3"})(["display:flex;flex-direction:column;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),or=i.Ay.div.withConfig({componentId:"sc-1sb6ll-4"})(["font-size:var(--_kindlychat-font-size-p);"]),ir=i.Ay.div.withConfig({componentId:"sc-1sb6ll-5"})(["font-weight:500;margin-top:4px;font-size:var(--_kindlychat-font-size-p);display:flex;align-items:flex-start;"]),ar=i.Ay.div.withConfig({componentId:"sc-1sb6ll-6"})(["padding:",";"],e=>{let{$affix:t}=e;return"PREFIX"===t?"0 6px 0 0":"0 0 0 6px"}),sr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-7"})(["margin-top:8px;"]),lr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-8"})(["display:flex;flex-direction:column;"]),cr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-9"})(["flex:1;"]);var ur=n(9933);function dr(e){return function(t,n){return t===e&&n?(0,P.jsx)(ar,{$affix:t,children:n}):null}}const fr=dr("PREFIX"),pr=dr("SUFFIX");function hr(e){return e.type===Yn.cJ.FILE&&e.files?(0,P.jsx)(cr,{children:e.files.map(t=>(0,P.jsx)(ur.A,{file:t,canRemove:!1},`${t.name}-${e.type}-${t.size}`))}):Array.isArray(e.value)?(0,P.jsx)(lr,{children:e.value.map(e=>(0,P.jsx)(sr,{children:e.label},e.name))}):e.value}const gr=function(e){let{state:t,message:n,data:r=[]}=e;return(0,P.jsxs)(er,{children:[t!==Yn.KN.SUBMITTED&&n&&(0,P.jsx)(tr,{children:n}),t===Yn.KN.SUBMITTED&&r.length>0&&(0,P.jsx)(nr,{children:r.map(e=>e.value?(0,P.jsxs)(rr,{children:[(0,P.jsx)(or,{children:e.label}),(0,P.jsxs)(ir,{children:[fr(e.affix,e.affixValue),hr(e),pr(e.affix,e.affixValue)]})]},e.name):null)})]})};function mr(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,P.jsxs)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,P.jsx)("path",{d:"M6.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 12a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 18a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var br=n(1814);const vr=o().lazy(()=>Promise.resolve().then(n.bind(n,4901))),yr=e=>"object"==typeof e&&e.length&&e.every(e=>"[object File]"===Object.prototype.toString.call(e)),xr=function(e){var t,n,o,i,a,s,d,f,p;let{chatMessageId:h,formData:g,onSubmit:m,onCancel:b}=e;const v=(0,c.wA)(),y=(0,c.d4)(u.uO),{text:x}=(0,c.d4)(u.Od),{current:w}=(0,r.useRef)(`${g.id}_submission_${g.submission_id}`);let{current:k}=(0,r.useRef)(0);const{currentLanguageCode:C}=(0,de.A)();(0,r.useEffect)(()=>{var e,t,n;null==g||!g.id||null!=y&&y[w]?(null==y||null===(e=y[w])||void 0===e?void 0:e.formSubmitState)!==Yn.KN.UNANSWERED||null!=y&&null!==(t=y[w])&&void 0!==t&&t.formCompleteMessage||!g.texts.unanswered_text||v((0,re.Bu)({...y[w],formCompleteMessage:g.texts.unanswered_text})):v((0,re.Bu)({formId:g.id,formSubmissionId:g.submission_id,formSubmitState:Yn.KN.ACTIVE,formCompleteMessage:"",formKey:w,formValue:(null==y||null===(n=y[w])||void 0===n?void 0:n.formValue)||g.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[v,g,C,y,w]);const S=(0,r.useCallback)(e=>{var t,n,r,o,i;return e.input_type===Yn.cJ.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==y||null===(n=y[w])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==y||null===(o=y[w])||void 0===o||null===(i=o.formValue)||void 0===i?void 0:i[e.slug]):null==y||null===(t=y[w])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[w,y]),_=e=>{var t,n,r,o,i,a,s,l;if(e)switch(e.input_type){case Yn.cJ.CHECKBOX:case Yn.cJ.RADIO:return(0,P.jsx)($n.A,{name:e.slug,inputType:e.input_type,options:null===(t=e.attributes)||void 0===t?void 0:t.options,validators:(0,Jn.Bq)(e)});case Yn.cJ.RANGE:return(0,P.jsx)(Rn.Ap,{hasController:!0,value:parseFloat(null==y||null===(n=y[w])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])||(null===(o=e.attributes)||void 0===o?void 0:o.default_value)||e.step,name:e.slug,step:null===(i=e.attributes)||void 0===i?void 0:i.step,affix:e.affix,affixValue:null===(a=e.texts)||void 0===a?void 0:a.affix_value,validators:(0,Jn.Bq)(e),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case Yn.cJ.SELECT:return(0,P.jsx)(Rn.l6,{options:null===(l=e.attributes)||void 0===l?void 0:l.options,placeholder:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});case Yn.cJ.FILE:return(0,P.jsx)(Rn.ZH,{label:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});case Yn.cJ.TEXTAREA:return(0,P.jsx)(Dn.A,{placeholder:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});default:return(0,P.jsx)(Rn.pd,{placeholder:e.texts.placeholder_text,type:e.input_type,adornment:e.affix&&e.texts.affix_value?e.texts.affix_value:void 0,adornmentPosition:"PREFIX"===e.affix?"start":"end",validators:(0,Jn.Bq)(e),name:e.slug})}return null};return(0,P.jsxs)(Kn._H,{children:[(null===(t=g.texts)||void 0===t?void 0:t.title)&&(0,P.jsxs)(Kn.zE,{children:[(0,P.jsx)(mr,{width:20,height:20})," ",null===(n=g.texts)||void 0===n?void 0:n.title]}),(null==y||null===(o=y[w])||void 0===o?void 0:o.formSubmitState)&&(null==y||null===(i=y[w])||void 0===i?void 0:i.formSubmitState)!==Yn.KN.ACTIVE&&(0,P.jsx)(gr,{state:y[w].formSubmitState,message:y[w].formCompleteMessage,data:(()=>{var e,t;if(null!=g&&g.fields&&(null==y||null===(e=y[w])||void 0===e?void 0:e.formSubmitState)===Yn.KN.SUBMITTED&&null!=y&&null!==(t=y[w])&&void 0!==t&&t.formValue)return g.fields.reduce((e,t)=>{var n,r,o,i,a;return t.input_type!==Yn.cJ.CHECKBOX&&t.input_type!==Yn.cJ.RADIO||null===(n=t.attributes)||void 0===n||!n.options?[...e,{affix:t.affix,affixValue:t.texts.affix_value,name:t.slug,label:null===(r=t.texts)||void 0===r?void 0:r.label,type:t.input_type,value:S(t),files:null==y||null===(o=y[w])||void 0===o||null===(i=o.formFiles)||void 0===i?void 0:i[t.slug]}]:[...e,{name:`${t.input_type===Yn.cJ.CHECKBOX?"checkbox":"radio"}_list_${t.slug}`,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:t.attributes.options.reduce((e,n)=>{var r,o;const i=null==y||null===(r=y[w])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug];return(null==i?void 0:i.length)>0&&U()(i).call(i,n.value)?[...e||[],{name:n.value,label:n.label,value:n.value}]:e},null)}]},[]).sort((e,t)=>(e.order||0)-(t.order||0))})()}),(0,P.jsx)(r.Suspense,{fallback:(0,P.jsx)(br.A,{minHeight:Zn(g)}),children:(!(null!=y&&y[w])||(null==y||null===(a=y[w])||void 0===a?void 0:a.formSubmitState)===Yn.KN.ACTIVE)&&(0,P.jsx)(vr,{onCancel:async e=>{var t;return b&&b(e),await v(Wn(g.submission_id,null==y?void 0:y[w].formValue,Yn.KN.CANCELED)),await v((0,re.zh)(g.cancel_dialogue_id,{languageCode:C})),v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.CANCELED,formCompleteMessage:null===(t=g.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:Qn(g),onSubmit:async(e,t)=>{m&&m(e);let n={};Object.entries(e).filter(e=>{let[t,n]=e;return Array.isArray(n)?!!n.length:"object"==typeof n&&null!==n?!!Object.keys(n).length:!!n}).forEach(e=>{let[t,r]=e;r instanceof FileList?n[t]=Array.from(r):n[t]=r});const r=function(e){const t={};return Object.keys(e).forEach(n=>{yr(e[n])&&(t[n]=e[n])}),t}(n),o=Object.values(n).filter(e=>yr(e)).map(e=>Array.isArray(e)&&e.length?e.flat():e).flat();if(o.length){let e=!1;const a=()=>{e=!0},s=await Promise.all(o.map(e=>(0,zn.TA)(e))),c=await v((e=>{let{chatMessageId:t,files:n,onError:r}=e;return async(e,o)=>{var i;const{bot:{id:a},chatbubble:{chatId:s},connection:{token:c},environment:{PAT_HOST:u}}=o(),d=await e((0,re.z5)()),{headers:f}=(0,Bn.A)({token:c},{extra:d}),p=n.map(Gn).map((0,Hn.A)("file")),h=p.map((0,Hn.A)("url")),g=`${u}/chatbubble/${l.Ak}/attachment/create`,m={attachments:h},b=await e((0,re.et)(g,{method:"POST",body:m,headers:f}));if((0,Un.A)(b)||!Array.isArray(null==b||null===(i=b.data)||void 0===i?void 0:i.attachments))return r(new Error("Failed to upload")),[];const{attachments:v}=b.data;if(v.sort((e,t)=>p.findIndex(t=>t.temporaryId===e.temporaryId)-p.findIndex(e=>e.temporaryId===t.temporaryId)),v.length!==n.length)return r(new Error("Failed to upload")),[];const[y,x]=v.reduce((e,t)=>{let[n,r]=e,{id:o,upload_url:i}=t;return[[...n,o],[...r,i]]},[[],[]]),w={"x-goog-upload-bot-id":a,"x-goog-upload-chat-id":s},k=(0,Vn.A)(n,x).map(async t=>{let[{file:n},r]=t;const o=await(0,zn.Bu)(n),i={...w,"Content-Type":n.type};return await e((0,re.et)(r,{method:"PUT",body:o,headers:i},{onError:e=>new Error(e)}))});if((await Promise.all(k)).some(Un.A))return r(new Error("Failed to upload")),[];const C=`${u}/chatbubble/${l.Ak}/attachment/uploads-complete`,S={attachmentIds:y,chatMessageId:t,exchangeId:h[0].exchangeId};return await e((0,re.et)(C,{method:"POST",body:S,headers:f},{onError:()=>r(new Error("Failed to upload"))})),y}})({chatMessageId:h,files:s,onError:a}));try{const e=function(e,t){if(Object.values(e).reduce((e,t)=>e+t.length,0)!==t.length)throw new Error("Mismatched lengths between file objects and attachment IDs");const n={};let r=0;return Object.entries(e).forEach(e=>{let[o,i]=e;n[o]=i.map((e,n)=>t[r+n]).join(","),r+=i.length}),n}(r,c);n={...n,...e}}catch(e){a()}if(e){var i;if(k>=3)return v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.ERRORED,formCompleteMessage:null===(i=g.texts)||void 0===i?void 0:i.error_text,formValue:n}));const e=Object.keys(r);return e.length&&e.forEach(e=>{var n;t(e,{type:"custom",message:null===(n=x.upload_file_failed)||void 0===n?void 0:n[C]})}),void(k+=1)}}var a;return null===await v(Wn(g.submission_id,n))?v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.ERRORED,formCompleteMessage:null===(a=g.texts)||void 0===a?void 0:a.error_text,formValue:n})):(await v((0,re.zh)(g.submit_dialogue_id,{languageCode:C})),v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.SUBMITTED,formValue:n,formFiles:Object.fromEntries(Object.entries(r).map(e=>{let[t,n]=e;return[t,n.map(e=>({name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}))]}))})))},ariaLabel:null===(s=g.texts)||void 0===s?void 0:s.title,sendButtonTitle:null===(d=g.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=g.texts)||void 0===f?void 0:f.cancel_button_text,children:null===(p=g.fields)||void 0===p?void 0:p.map((e,t)=>{var n,r,o;return(0,P.jsx)(qn.A,{className:0!==t||null!==(n=g.texts)&&void 0!==n&&n.title?void 0:"no-margin",helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,label:null===(o=e.texts)||void 0===o?void 0:o.label,children:_(e)},`form_field_${w}_${e.order}`)})})})]})},wr=e=>e,kr=e=>{let{button_type:t}=e;return t===l.lP.edit_contact_details?"editContactDetails":"regularButtons"},Cr=e=>function(){let{id:t,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return t===e||n===e},Sr=e=>e?e.reduce((e,t)=>{let{offset:n,url:r}=t;const o=e.find(e=>e.url===r);return o?o.offsets.push(n):e.push({offsets:[n],url:r}),e},[]).sort((e,t)=>Math.min(...e.offsets)-Math.min(...t.offsets)):[];function _r(e){var t,n,o,i,a;let{chatMessage:s,buttonHandlers:d,messageCounter:f,nextMessageType:p}=e;const h=(0,c.wA)(),[g,m]=(0,r.useState)([]),{lastMessageSeen:b,attachments:v=[]}=(0,c.d4)(u.DZ),y=s.sender?s.sender===l.bS.USER:!s.from_bot,x=Sr(s.message_references),w=s.from_bot&&s.handler!==l.Gi.MIMIR?function(e){const t="%%%SPLIT_HERE%%%",n=(new DOMParser).parseFromString(e,"text/html"),r=Array.from(n.body.querySelectorAll("br"));return r.length<3?[e]:(r.forEach((e,o)=>{var i,a,s,l;e.nextSibling===r[o+1]&&(null===(i=r[o+1])||void 0===i?void 0:i.nextSibling)===r[o+2]&&(null===(a=e.parentNode)||void 0===a||a.insertBefore(n.createTextNode(t),e),e.remove(),null===(s=r[o+1])||void 0===s||s.remove(),null===(l=r[o+2])||void 0===l||l.remove())}),n.body.innerHTML.split(t))}(s.message||"").flatMap(e=>e.split(/\n\s*\n/)).map(e=>e.trim()).filter(e=>""!==e):[Nn(s.message||"",x)],{regularButtons:k,editContactDetails:C}=(0,r.useMemo)(()=>(0,Mn.A)(s.buttons,kr),[s.buttons]),S=(0,r.useMemo)(()=>{var e;return null==s||null===(e=s.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()||e.button_type===l.lP.SLIDER.toLowerCase())},[s]),_=(null==s?void 0:s.image_carousel)||(null==s?void 0:s.video_source),A=null==s||null===(t=s.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()),E=(0,r.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==b?void 0:b.index)>=f||h((0,re.pA)(s.id,f))},[s.id,h,b,f]),T=Pn({onChange:E,threshold:.95,skip:y}),j=(0,r.useCallback)(e=>{const t=g.find(t=>t.id===e.id);m(t?g.filter(t=>t.id!==e.id):[...g,e])},[g]),I=(0,r.useMemo)(()=>{var e,t;return[...null!==(e=s.attachments)&&void 0!==e?e:[],...(null!==(t=s.attachment_ids)&&void 0!==t?t:[]).map(e=>v.find(Cr(e))).filter(wr)]},[v,s.attachments,s.attachment_ids]),O=Boolean(s.message||(null==I?void 0:I.length)||(null===(n=s.buttons)||void 0===n?void 0:n.length)||(null===(o=s.image_carousel)||void 0===o?void 0:o.length));return(0,P.jsxs)(Qt,{ref:T,"data-testid":l.fl,children:[(0,P.jsxs)(Zt,{$fromBot:s.from_bot,$hasSiblings:Boolean(A),children:[s.sender===l.bS.SYSTEM&&s.event_message&&(0,P.jsx)(En.Ay,{chatMessage:s}),(0,P.jsx)(Jt,{$fromBot:s.from_bot,$hasSiblings:Boolean(_),children:w.map((e,t)=>e?(0,P.jsx)(wn,{chatMessage:s,messageLine:e,lineIndex:t,numLines:w.length,editContactDetailsButton:null==C?void 0:C[0],references:x},`chatMessage-${t}`):null)}),(null===(i=s.image_carousel)||void 0===i?void 0:i.length)>0&&(0,P.jsx)("div",{children:(0,P.jsx)(Ut,{imageCarousel:s.image_carousel,chatMessage:s})}),I.map(e=>(0,P.jsx)("div",{children:(0,P.jsx)($t,{attachment:e,avatar:s.avatar,chatMessageStatus:s.status})},e.id)),s.video_source&&(0,P.jsx)(Ln,{source:s.video_source}),(null===(a=s.form)||void 0===a?void 0:a.fields)&&(0,P.jsx)(xr,{chatMessageId:s.id,formData:s.form})]}),(null==k?void 0:k.length)>0&&(0,P.jsx)(en,{$orientation:s.buttons_display_orientation||l.Ii.VERTICAL,$nextMessageType:p,children:k.map(e=>(0,P.jsx)(Dt.A,{button:e,chatMessage:s,handlers:d,checked:g,setCheckboxValue:j,submitButtonsList:S},e.id))}),O&&s.status&&(0,P.jsx)(An,{chatMessage:s,attachments:I})]})}var Ar=n(15);function Er(e){e&&(e.scrollTop=e.scrollHeight,setTimeout(()=>{e.scrollTop=e.scrollHeight},1))}const Tr=(0,i.i7)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),jr=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(600),Tr),Ir=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Or=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(300),Ir),Lr=i.Ay.div.withConfig({componentId:"sc-2gibmd-0"})(["position:absolute;z-index:3;bottom:70px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.$show?"1":"0"),Pr=i.Ay.button.withConfig({componentId:"sc-2gibmd-1"})(["opacity:0;border-radius:100px;color:#2c2c2c;background:",";background-color:",";border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:",";display:flex;align-items:center;justify-content:center;min-width:35px;max-width:205px;width:35px;height:35px;",";",";svg{path{stroke:",";}}"],e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")},e=>e.$show?"pointer":"default",e=>!e.$show&&(0,y.vW)(800),e=>e.$show?jr:Or,e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFF","#000")}),Nr=600;function Mr(e){let{bodyRef:t,isChatLooselyScrolledToBottom:n}=e;const[o,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=setTimeout(()=>{n||i(!0)},Nr);return n&&i(!1),()=>clearTimeout(e)},[n]),(0,P.jsx)(Lr,{$show:o,inert:!o,children:(0,P.jsx)(Pr,{$show:o,onClick:()=>{Er(t.current)},"aria-label":"Scroll to bottom of chat","data-testid":"chat-new-message",children:(0,P.jsx)(Ar.A,{})})})}var zr=n(8129),Rr=n(209);const $r=i.Ay.div.withConfig({componentId:"sc-1h90lvz-0"})(["height:100%;"]),Dr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-1"})(["width:100%;min-width:100%;height:100%;padding:0 16px;overflow-y:",";overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;scrollbar-gutter:stable;transition:opacity 0.3s ease;&[inert]{opacity:0.4;}",""],e=>{let{$isContentLongEnough:t}=e;return t?"auto":"hidden"},e=>e.theme.background,e=>e.theme.background,R.sF),Fr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-2"})(["display:flex;max-width:",";margin:auto;gap:16px;flex-direction:column;justify-content:flex-end;"],a.mb.tablet),Br=i.Ay.div.withConfig({componentId:"sc-1h90lvz-3"})(["display:flex;flex-direction:row;color:",";font-size:var(--_kindlychat-font-size-sm);justify-content:center;margin-bottom:16px;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),Hr=i.Ay.span.withConfig({componentId:"sc-1h90lvz-4"})(["font-weight:500;align-self:flex-start;"]),Ur=i.Ay.span.withConfig({componentId:"sc-1h90lvz-5"})(["align-self:flex-start;"]),Vr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-6"})(["display:inline-block;"]),Wr="filler-div-1741269268",Gr=(e,t)=>t.scrollHeight>=e.clientHeight,qr=(e,t)=>{if(!e)return;const n=e.querySelectorAll("img"),r=e.querySelectorAll("video"),o=e.querySelectorAll("iframe");(n.length>0||r.length>0||o.length>0)&&setTimeout(t,50),n.forEach(e=>{e.complete||e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})}),r.forEach(e=>{const n=()=>setTimeout(t,50);if(e.readyState>=1)return void n();const r=()=>{n()};e.addEventListener("loadedmetadata",r,{once:!0}),e.addEventListener("loadeddata",r,{once:!0}),e.addEventListener("canplaythrough",r,{once:!0})}),o.forEach(e=>{e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})})},Kr=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";if(!e||!t)return;const r=()=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect().top-r.top+e.scrollTop;e.scrollTo({top:o,behavior:n})};r(),qr(t,r)},Yr=function(){let e=0,t=null,n=null;const r=t=>{(e=>{Er(e)})(...t),e=Date.now()},o=function(){const o=Date.now()-e;null!==t&&(clearTimeout(t),t=null);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];o>=100||0===e?r(a):(n=a,t=setTimeout(()=>{n&&(r(n),n=null),t=null},100-o))};return o.cancel=()=>{null!==t&&(clearTimeout(t),t=null),n=null},o}();var Xr=n(893);function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e&&Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<t+1}const Zr=30,Jr=100;var eo=n(5765);const to=e=>{let t=null;const n=[],r=(e,t)=>!t||new Date(e.created).valueOf()-t>3e5;return e.forEach(e=>{(e=>{if(!t)return!1;const n=e.from_bot===t.from_bot,r=e.name===t.name,o=e.from_webhook===t.from_webhook,i=e.handler!==l.Gi.TRIGGER_DIALOGUE,a=!(e.sender===l.bS.SYSTEM&&t.sender===l.bS.SYSTEM);return n&&r&&o&&i&&a})(e)?n[n.length-1].messages.push(e):n.push({messages:[e],shouldShowTime:r(e,t&&new Date(t.created).valueOf())}),t=e}),n},no=(e,t,n)=>{var r;const o=e||(null===(r=t.slice(-1)[0])||void 0===r?void 0:r.id);return!!n.find(e=>{let{id:t}=e;return o===t})};function ro(e){let{bodyRef:t,buttonHandlers:n,inert:i}=e;const{currentLanguageCode:a}=(0,de.A)(),[s,d]=(0,r.useState)(!0),{isTyping:f}=(0,c.d4)(u.MA),{isTyping:p,typingType:h,text:g,botName:m}=(0,c.d4)(u.Od),{currentMessageId:b,inspectorOpen:v}=(0,c.d4)(u.qV),{chatMessages:y}=(0,c.d4)(u.DZ)||[],x=to(y),w=(0,r.useRef)(null),k=function(e){let{bodyRef:t,bodyMessagesRef:n,setIsContentLongEnough:o}=e;const i=(0,r.useRef)(null),a=(0,r.useRef)(null),s=(0,r.useRef)(void 0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{if(!e||!n.current)return i.current&&(i.current.disconnect(),i.current=null),a.current&&(a.current.disconnect(),a.current=null),s.current&&(clearTimeout(s.current),s.current=void 0),c.current=null,u.current=null,d.current=null,void Yr.cancel();t.current=e;const r=n.current,f=function(){let{shouldChangeImmediately:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Gr(e,r);return null!==u.current&&u.current===n?null:(s.current&&(clearTimeout(s.current),s.current=void 0),n?(t?(o(!0),u.current=!0):s.current=setTimeout(()=>{o(!0),u.current=!0,requestAnimationFrame(()=>{Kr(e,c.current,"instant")})},1e3),!0):(o(!1),u.current=!1,!1))};f({shouldChangeImmediately:!0}),Er(e),qr(r,()=>{f({shouldChangeImmediately:!0}),Er(e)}),i.current=new ResizeObserver(t=>{if(!t[0])return;const n=e.clientHeight,r=null!==d.current&&d.current!==n;d.current=n,r&&Yr(e),!1===f({shouldChangeImmediately:!0})&&Er(e)}),i.current.observe(e),a.current=new MutationObserver(t=>{const n=t.flatMap(e=>Array.from(e.addedNodes).filter(e=>{var t,n,r;return e instanceof HTMLElement&&((null===(t=e.dataset)||void 0===t?void 0:t.testid)===l.fl||(null===(n=e.dataset)||void 0===n?void 0:n.testid)===l.dT||(null===(r=e.dataset)||void 0===r?void 0:r.testid)===l.gH)}));let r=!1;if(n.length>0&&(c.current=n[n.length-1],r=!0),!c.current||!r)return;const o=c.current;f({shouldChangeImmediately:!1}),setTimeout(()=>{Kr(e,o)},50)}),a.current.observe(r,{childList:!0,subtree:!0})},[n,t,o]);return f}({bodyRef:t,bodyMessagesRef:w,setIsContentLongEnough:d}),C=function(e){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e.current)return;let t=!1;const r=e.current,o=()=>{const e=Qr(r,Zr);t!==e&&(t=e,n(e))},i=(0,Xr.A)(o,Jr);return o(),r.addEventListener("scroll",i),()=>{r.removeEventListener("scroll",i),i.cancel()}},[e]),t}(t);let S=0;return(0,P.jsxs)(Dr,{ref:k,id:"chat-body-container","data-testid":"chat-body-container",$isContentLongEnough:s,inert:i,children:[!s&&(0,P.jsx)($r,{id:Wr}),(0,P.jsxs)(Fr,{role:"log","aria-live":"polite","data-testid":"chat-log","data-cy":"chat-log",ref:w,children:[x.map((e,t)=>{const{messages:r,shouldShowTime:i}=e,s=v&&no(b,y,r),c=t===x.length-1,u=r[0].handler===l.Gi.MIMIR||"SMART_WEBHOOK"===r[0].reply_type||"SMART_REPLY"===r[0].reply_type;return(0,P.jsx)(o().Fragment,{children:(0,P.jsx)(Se,{fromBot:r[0].from_bot,created:r[0].created,shouldShowTime:i,inspected:s,isLastGroupMessage:c,disclaimerComponent:u?(0,P.jsxs)(Br,{children:[(0,P.jsxs)(Vr,{children:[(0,P.jsx)(Hr,{children:m})," ",(0,P.jsx)(Ur,{children:(0,Rr.A)(g.gpt_search_result_text,a)})]}),(0,P.jsx)(eo.A,{text:(0,Rr.A)(g.gpt_tooltip_disclaimer,a),position:"top",children:(0,P.jsx)(ue.A,{width:18,height:18})})]}):void 0,children:r.map((e,t)=>{var i;return S+=1,(0,P.jsx)(o().Fragment,{children:(0,P.jsx)(_r,{chatMessage:e,nextMessageType:null===(i=r[t+1])||void 0===i?void 0:i.sender,buttonHandlers:n,messageCounter:S})},`${e.key}`)})})},`message-group-${t}`)}),(f||p)&&(0,P.jsx)(mt,{botName:m,text:h===zr.cT.KINDLY_GPT?(0,Rr.A)(g.gpt_search_text,a):void 0})]}),(0,P.jsx)(Mr,{bodyRef:t,isChatLooselyScrolledToBottom:C})]})}const oo=i.Ay.div.withConfig({componentId:"sc-1e9j8ct-0"})(["position:absolute;right:7px;bottom:6px;height:28px;width:28px;display:flex;align-items:center;justify-content:center;z-index:2;"]),io=(0,i.Ay)(L.mt).withConfig({componentId:"sc-1e9j8ct-1"})(["margin:0;opacity:1;color:",";span{font-weight:500;}",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFF","#000")},y.jB),ao=i.Ay.svg.withConfig({componentId:"sc-1e9j8ct-2"})(["position:absolute;transform-origin:50% 50%;transform:rotate(-90deg);circle{&:first-child{stroke:",";}&:last-child{stroke:",";}}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255,255,255, 0.66)","rgba(0,0,0, 0.2)")},e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground);function so(e){let{radius:t,stroke:n,progress:o}=e;const[i,a]=(0,r.useState)(),[s,l]=(0,r.useState)();(0,r.useEffect)(()=>{const e=t-2*n,r=2*e*Math.PI;a(e),l(r)},[t,n]);const c=s?s-o/100*s:0;return(0,P.jsxs)(ao,{height:2*t,width:2*t,children:[(0,P.jsx)("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${s} ${s}`,style:{strokeDashoffset:0},r:i,cx:t,cy:t}),(0,P.jsx)("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${s} ${s}`,style:{strokeDashoffset:c},r:i,cx:t,cy:t})]})}function lo(e){let{inputMax:t,inputLength:n,composerHeight:r,composerHeightInitial:o}=e;const i=t-n,a=n<t?n/t*100:100,s=t>=n,l=r>o,c=l&&t-20<n,u=c?16:13;return l?(0,P.jsx)(oo,{title:i>0?`You have used ${n} of the total of ${t} allowed characters`:`You have exceeded the message limit of ${t}`,children:(0,P.jsxs)(P.Fragment,{children:[s&&(0,P.jsx)(so,{radius:u,stroke:1.6,progress:a}),(0,P.jsx)(io,{children:c&&(0,P.jsx)("span",{children:i})})]})}):null}var co=n(8964),uo=n(3949);const fo=i.Ay.div.withConfig({componentId:"sc-1jba2dg-0"})(["width:min(100%,",");margin:auto;padding:16px;padding-top:6px;background:none;background:",";background-color:",";"],a.mb.tablet,e=>e.theme.background,e=>e.theme.background),po=i.Ay.div.withConfig({componentId:"sc-1jba2dg-1"})(["display:flex;align-items:flex-end;justify-content:space-between;gap:12px;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$submitHidden&&"\n gap: 0px;\n "),ho=i.Ay.div.withConfig({componentId:"sc-1jba2dg-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:var(--_kindlychat-font-size-p);line-height:37px;",""],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")},e=>e.$hide?"transform: translateY(-45px);":""),go=(0,i.Ay)(uo.A).attrs(e=>{let{inputProps:t}=e;return{...t}}).withConfig({componentId:"sc-1jba2dg-3"})([""," min-height:","px;outline-offset:-4px;"],ie.hF,e=>{let{$minHeight:t}=e;return t}),mo=i.Ay.div.withConfig({componentId:"sc-1jba2dg-4"})(["width:28px;display:flex;justify-content:center;align-items:flex-start;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$hidden&&"\n width: 0px;\n pointer-events: none;\n "),bo=(0,i.AH)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:28px;width:100%;padding:0;margin-bottom:4px;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:28px;max-height:28px;background-color:transparent;"," &:focus-visible{outline:1px solid ",";}&:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{stroke:",";}}"],R.sF,e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")},e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground),vo=i.Ay.button.withConfig({componentId:"sc-1jba2dg-5"})(["",";z-index:15;padding:0px;transition:opacity 0.1s ease-in;",";svg{transition:all 0.2s ease;user-select:none;pointer-events:none;}",";"],bo,e=>{let{$active:t}=e;return!t&&"\n opacity: 0.3;\n pointer-events: none;\n "},e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),yo=i.Ay.div.withConfig({componentId:"sc-e0zhkb-0"})(["position:absolute;right:",";left:",";bottom:4px;z-index:2;width:28px;height:28px;display:",";align-items:center;justify-content:center;button{padding:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;}&:hover{opacity:0.8;}svg{path{stroke:",";}}"],e=>{let{$isTextDirectionRtl:t}=e;return t?"auto":"12px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"12px":"auto"},e=>{let{hidden:t}=e;return t?"none":"flex"},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.64)","rgba(0, 0, 0, 0.64)")}),xo=5;function wo(e){let{accept:t=l.oY,multiple:n=!0,setMessage:o}=e;const i=(0,Vt.jL)(),{isTextDirectionRtl:a}=(0,Vt.GV)(u.Od),{takenOver:s,supportsAttachment:c}=(0,Vt.GV)(e=>{let{agent:t}=e;return t}),{attachments:d}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),f=(0,r.useRef)(null),p=s&&c||(0,x.A)()&&(null==d?void 0:d.exchangeId),h=(0,r.useCallback)(()=>{f.current&&(f.current.value="",f.current.click())},[f]);return(0,r.useEffect)(()=>{d.buttonClicked&&(i((0,re.B)()),h())},[d.buttonClicked,i,h]),(0,P.jsxs)(yo,{hidden:!p,$isTextDirectionRtl:a,children:[p&&(0,P.jsx)(ie.$n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},"data-testid":"composer-file-upload-button",children:(0,P.jsx)(_e.A,{})}),(0,P.jsx)("input",{ref:f,hidden:!0,type:"file",accept:t,multiple:n,onChange:async e=>{let{target:t}=e;try{var n;if(o(""),(null===(n=t.files)||void 0===n?void 0:n.length)>xo)return void i((0,re.Dc)(`You can upload up to ${xo} files at a time`,3500));const e=await Promise.all(Array.from(t.files).map(zn.TA));i((0,re.Ln)(e))}catch(e){i((0,re.Dc)(e.message.replace(/^Error: ?/i,""),3500))}},style:{display:"none"}})]})}const ko=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-0"})(["display:flex;align-items:center;font-size:var(--_kindlychat-font-size-sm);> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:5px;padding-right:50px;}button{display:none;position:absolute;top:-4px;right:-4px;border:1px solid ",";border-radius:50%;width:14px;height:14px;padding:0px;background:",";z-index:1;path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),Co=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-1"})(["height:36px;width:36px;&:not(:first-child){margin-left:4px;}&:hover,&:focus-within{button{display:block;}}"]),So=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-2"})(["height:36px;width:36px;border-radius:6px;position:relative;overflow:hidden;img,video{position:absolute;width:100%;height:100%;object-fit:cover;}"]),_o=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],a.Tj.grayColor);function Ao(e){let{file:t}=e;const n=(0,St.A)(t);return n===l.sl.IMAGE||n===l.sl.VIDEO?(0,P.jsxs)(So,{tabIndex:0,children:[n===l.sl.IMAGE&&(0,P.jsx)("img",{src:t.url,alt:`Uploaded ${t.name}`}),n===l.sl.VIDEO&&(0,P.jsx)("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,"aria-label":t.name,children:(0,P.jsx)("source",{src:t.url,type:t.type})})]}):(0,P.jsx)(_o,{children:(0,P.jsx)(_e.A,{})})}i.Ay.div.withConfig({componentId:"sc-1c1rsxp-4"})(["font-size:var(--_kindlychat-font-size-p);height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],a.Tj.grayColor);const Eo=(e,t)=>{const n=e.slice();return n.splice(t,1),n};function To(){const e=(0,Vt.jL)(),{attachments:{files:t}}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t});return(0,P.jsxs)(ko,{children:[t.map((n,r)=>(0,P.jsxs)(Co,{children:[(0,P.jsx)(Ao,{file:n}),(0,P.jsx)(ie.$n,{onClick:n=>{n.preventDefault(),(n=>{e((0,re.Ln)(Eo(t,n)))})(r)},children:(0,P.jsx)(Ie.US,{width:11,height:11,color:"#FFF"})})]},`uploaded-image-${n.name}-${r}`)),1===(null==t?void 0:t.length)&&(0,P.jsx)("span",{children:t[0].name})]})}let jo;const Io=37,Oo=1e3,Lo=1e3;function Po(e){let{active:t,chatHasStarted:n,currentlyPoppedUp:o=!1,bodyRef:i,inert:a}=e;const[s,l]=(0,r.useState)(Io),[c,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(0),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;!t&&!n||(0,x.A)()||o||!m.current||null===(e=m.current)||void 0===e||e.focus()},[t,n,o]);const b=(0,Vt.jL)(),{inputLimitEnabled:v,inputLimit:y,isTextDirectionRtl:w,replyInQueueEnabled:k}=(0,Vt.GV)(u.Od),{allGreetingsHideInput:C,attachments:{files:S},hideInputField:_}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:A,userIsTyping:E,requestedHandoverAt:T,takeoverClosed:j}=(0,Vt.GV)(e=>{let{agent:t}=e;return t}),{chatMessages:I}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),O=w?"rtl":void 0,L=_&&!A&&0===S.length,N=Boolean(T)&&!j&&!A,M=!A&&v&&!(N&&!1===k),z=M?y:Oo,R=!f&&0===S.length,$=0===f.length&&0===S.length,D=L||C&&0===I.length||f.length>z||R||!n,{placeholder:F,disabled_input_text:B}=(0,dn.A)(),H=e=>{if(e.preventDefault(),e.stopPropagation(),E&&b((0,re.mw)()),D)return!1;if(!f.trim()&&0===S.length)return!1;if(S.length>0)b((0,re.Zn)());else{const e=(new Date).getTime();if(!(e-h>Lo))return!1;g(e),b((0,re.y2)(f.trim()))}return p(""),!0};return(0,co.A)("touchend",async()=>{let e=0;const t=setInterval(()=>{var n;null===(n=m.current)||void 0===n||n.scrollIntoView(),e+=1,e>=5&&clearInterval(t)},100)},m.current),(0,P.jsx)(fo,{dir:O,inert:a,children:(0,P.jsx)("form",{autoComplete:"off",action:"#",onSubmit:H,children:(0,P.jsxs)(po,{$submitHidden:$,children:[(0,P.jsxs)(ie.A0,{$initialHeight:Io,$targetHeight:s,$active:!R,$hasFiles:(null==S?void 0:S.length)>0,children:[0===S.length&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(go,{"data-testid":"chat-box-composer","aria-hidden":n?"false":"true","aria-label":F,name:"message",$hide:L,disabled:!n||L,$active:!R,ref:m,placeholder:F,onChange:e=>{const{value:t}=e.target;A&&(e=>{const t=e.length>0;clearTimeout(jo),!E&&t?b((0,re.Mb)()):E&&!t&&b((0,re.mw)()),jo=setTimeout(()=>{b((0,re.mw)())},5e3)})(t),p(t),Qr(i.current)&&setTimeout(()=>{Er(i.current)},5)},value:f,onFocus:()=>d(!0),onBlur:()=>d(!1),onMouseDown:()=>{c||Qr(i.current)||Er(i.current)},onHeightChange:l,$minHeight:Io,enterKeyHint:"send",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||H(e)}}),(0,P.jsx)(ho,{$hide:_,inert:!_,children:B})]}),(0,P.jsx)(To,{}),M&&(0,P.jsx)(lo,{inputMax:z,inputLength:f.length,composerHeight:s,composerHeightInitial:Io}),(0,P.jsx)(wo,{setMessage:p})]}),(0,P.jsx)(mo,{$hidden:$,children:(0,P.jsx)(vo,{"data-testid":"composer-submit","aria-hidden":D,$active:!D,disabled:D,role:"button",onClick:H,title:"Send message",onMouseDown:e=>{e.preventDefault()},children:(0,P.jsx)(Ie.qx,{width:24,height:24})})})]})})})}function No(e){return(0,P.jsxs)("svg",{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,P.jsx)("title",{children:"Bot Avatar"}),(0,P.jsxs)("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd",children:[(0,P.jsx)("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),(0,P.jsx)("path",{d:"M30.64 35.4a4.27 4.27 0 11-8.54 0 4.27 4.27 0 018.54 0M50.17 35.4a4.27 4.27 0 108.54 0 4.27 4.27 0 00-8.54 0",fill:"#000"}),(0,P.jsx)("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M16 29.03a12.39 12.39 0 0113.15-5.31 12.24 12.24 0 019.45 10.49v15.64h5.47M44.88 23.2H64",stroke:"#0069FF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}var Mo=n(9602),zo=n(850);function Ro(e){let{handleXButtonClick:t,settingsButtonRef:n}=e;const o=(0,Vt.jL)(),{name:i,avatar:a,fullscreenMode:s,isTextDirectionRtl:l}=(0,Vt.GV)(u.Od),{chatHasStarted:c,currentLanguage:d,overlayViews:f,currentModal:p}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{botConversationFeedback:h}=(0,Mo.A)(d),g=l?"rtl":void 0,m=f[f.length-1],b=!m||"FEEDBACK"===m,v=s&&h||b&&!s,y=()=>{o((0,re.Rh)())};return x=e=>{const{activeElement:t}=document;if(!t)return;const{tagName:n}=t;"Escape"===e.code&&"BODY"===n&&y(),"Escape"===e.code&&"BODY"!==n&&t instanceof HTMLElement&&t.blur()},(0,r.useEffect)(()=>(window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)),[x]),c?(0,P.jsxs)(zo.B3,{dir:g,"data-testid":"chat-box-header",children:[(0,P.jsxs)(zo.CE,{children:[a?(0,P.jsx)(zo.dl,{$avatar:a,"aria-hidden":"true"}):(0,P.jsx)(No,{height:30,"aria-hidden":"true"}),(0,P.jsx)(zo.Zw,{$isTextDirectionRtl:l,"aria-label":`Chat bot ${i||"Kindly"}`,children:i||"Kindly"})]}),(0,P.jsxs)(zo.HD,{children:[b&&(0,P.jsx)(zo.I$,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:()=>{o((0,re.wQ)("GENERIC"))},"data-testid":"chat-settings-button",ref:n,inert:"COMPLIANCE"===p||void 0,children:(0,P.jsx)(Ie.Ze,{width:24,height:24})}),b&&!s&&(0,P.jsx)(zo.I$,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:y,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",children:(0,P.jsx)(Ie.gR,{width:24,height:24})}),v&&(0,P.jsx)(zo.I$,{"aria-label":"End chat",title:"End chat",type:"button",onClick:t,"data-testid":"end-chat-button","data-cy":"end-chat-button",children:(0,P.jsx)(Ie.US,{width:24,height:24})})]})]}):null;var x}var $o=n(6834);const Do=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-0"})(["overflow:hidden;position:absolute;inset:0;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;z-index:16;",";animation-duration:0.2s;animation-timing-function:ease-in;"],y.jB),Fo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Bo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),Ho=(0,i.Ay)(L.fz).withConfig({componentId:"sc-1s4wj3o-3"})(["font-size:var(--_kindlychat-font-size-m);a{color:",";}"],a.Tj.primaryColor),Uo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-4"})(["a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),Vo=i.Ay.p.withConfig({componentId:"sc-1s4wj3o-5"})(["position:absolute;bottom:0;font-size:var(--_kindlychat-font-size-sm);color:",";"],a.CM[50]);function Wo(){const e=(0,Vt.jL)(),t=()=>{e((0,$o.eG)())},{back_to_chat_button:n}=(0,dn.A)();return(0,P.jsx)(Do,{children:(0,P.jsxs)(Fo,{children:[(0,P.jsxs)(Bo,{children:[(0,P.jsx)(L.H3,{children:"About Kindly"}),(0,P.jsxs)(Ho,{children:["This chatbot is powered by Kindly.",(0,P.jsx)("br",{}),"To learn more about Kindly, visit"," ",(0,P.jsxs)("a",{ref:e=>{e&&e.focus()},href:"https://www.kindly.ai",target:"_blank",rel:"noopener noreferrer",children:["this website.",(0,P.jsx)(D,{})]})]})]}),(0,P.jsx)(Uo,{children:(0,P.jsxs)(ie.N_,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button",children:["‹ ",n]})}),(0,P.jsxs)(Vo,{children:["v",window.kindlyChat.VERSION]})]})})}var Go=n(5758);const qo=i.Ay.div.withConfig({componentId:"sc-xpbg6h-0"})(["z-index:2;display:flex;justify-content:center;"]),Ko=i.Ay.span.withConfig({componentId:"sc-xpbg6h-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),Yo=i.Ay.p.withConfig({componentId:"sc-xpbg6h-2"})(["display:flex;font-size:var(--_kindlychat-font-size-xs);color:",";line-height:20px;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"],a.Tj.darkColor);function Xo(e){let{shouldAutoFocus:t}=e;const n=(0,Vt.jL)();return(0,P.jsx)(qo,{children:(0,P.jsxs)(Yo,{children:[(0,P.jsx)("span",{children:"Powered by"})," ",(0,P.jsx)(Ko,{}),(0,P.jsx)(L.cp,{children:(0,P.jsx)(ie.Bi,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:e=>{"click"===(null==e?void 0:e.type)&&n((0,re.wQ)("ABOUT_CHAT"))},type:"button",autoFocus:t,children:"Kindly"})})]})})}const Qo=i.Ay.div.withConfig({componentId:"sc-7eewng-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],y.jB),Zo=i.Ay.div.withConfig({componentId:"sc-7eewng-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Jo=i.Ay.div.withConfig({componentId:"sc-7eewng-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),ei=i.Ay.div.withConfig({componentId:"sc-7eewng-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),ti=i.Ay.div.withConfig({componentId:"sc-7eewng-4"})(["div{display:flex;position:unset;align-items:center;}"]);function ni(e){let{endChat:t}=e;const{whitelabelEnabled:n}=(0,Vt.GV)(u.Od),{currentLanguageCode:r}=(0,de.A)(),{preloadFeedbackImages:o}=(0,Mo.A)(r),i=(0,Vt.jL)(),s=(0,dn.A)(),{back_to_chat_button:l,cancel_chat_button:c,cancel_chat_text:d}=s;return(0,P.jsx)(Qo,{children:(0,P.jsxs)(Zo,{children:[(0,P.jsx)(Jo,{children:(0,P.jsx)(L.H2,{children:d})}),(0,P.jsxs)(ei,{children:[(0,P.jsx)(Go.A,{style:a.Nz,"aria-label":c,title:c,onClick:t,onMouseEnter:()=>{o("bot_conversation")},type:"button",text:c,cy:"cancel-chat-button",autoFocus:!0}),(0,P.jsxs)(ie.N_,{"aria-label":l,title:l,onClick:()=>{i((0,$o.eG)())},onKeyUp:e=>{"Enter"===e.key&&i((0,$o.eG)())},type:"button",tabIndex:0,children:["‹ ",l]})]}),(0,P.jsx)(ti,{children:!n&&(0,P.jsx)(Xo,{})})]})})}var ri=n(904);function oi(e){let{color:t="#232F41"}=e;return(0,P.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"M6.83317 4.5L3.1665 8L6.83317 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12.8335 8H3.3335",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ii(e){let{color:t="#232F41"}=e;return(0,P.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"M9.1665 4.5L12.8332 8L9.1665 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12.6665 8H3.1665",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}var ai=n(9245),si=n(8418);const li=window.matchMedia("(prefers-reduced-motion: reduce)").matches,ci="startViewTransition"in document;async function ui(e){if(li||!ci)return void e();const t=document;return await t.startViewTransition(()=>{(0,Te.flushSync)(e)})}var di=n(6848);const fi=(0,i.i7)(["0%{opacity:0;transform:translateY(4px);}100%{opacity:1;transform:translateY(0);}"]),pi=i.Ay.section.attrs({"data-testid":"chat-modal"}).withConfig({componentId:"sc-1nmbsmf-0"})(["position:absolute;width:100%;bottom:0;left:0;right:0;padding:16px;border-radius:12px;border:1px solid ",";background-color:",";color:var(--panel-background-white-black-contrast-1743170834);z-index:15;animation:"," 0.3s ease;"],e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","#0000000d")},e=>{let{theme:t}=e;return t.panelBackground},fi),hi=(0,i.Ay)(pi).withConfig({componentId:"sc-t0w48p-0"})(["display:flex;min-height:",";padding-top:38px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-modal-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(240px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"}),gi=(0,i.Ay)(Go.A).withConfig({componentId:"sc-t0w48p-1"})(["margin-inline:auto;"]),mi=i.Ay.button.withConfig({componentId:"sc-t0w48p-2"})(["background:none;border:none;position:absolute;top:8px;right:8px;cursor:pointer;svg{display:block;}"]),bi=i.Ay.h2.withConfig({componentId:"sc-t0w48p-3"})(["margin:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;text-align:center;"],e=>{let{$isFullHeight:t}=e;return t?"auto 8px 8px 8px":"8px"}),vi=i.Ay.div.withConfig({componentId:"sc-t0w48p-4"})(["display:flex;flex-wrap:wrap;justify-content:center;row-gap:16px;@media only screen and (max-width:360px){flex-direction:column;align-items:center;}"]),yi=i.Ay.button.withConfig({componentId:"sc-t0w48p-5"})([""," display:flex;height:fit-content;gap:8px;flex-direction:column;align-items:center;justify-content:center;opacity:",";transition:opacity 0.2s;cursor:pointer;user-select:none;word-break:normal;overflow-wrap:anywhere;@media only screen and (max-width:360px){width:fit-content;}@media only screen and (min-width:361px){width:65px;}"],R.AF,e=>{let{$wasChoiceMade:t,$isSelected:n}=e;return t&&!n?.5:1}),xi=i.Ay.img.withConfig({componentId:"sc-t0w48p-6"})(["width:24px;height:24px;transition:scale 0.3s;scale:",";",":hover &{scale:1.25;}"],e=>{let{$isSelected:t}=e;return t?1.25:1},yi),wi=i.Ay.span.withConfig({componentId:"sc-t0w48p-7"})(["display:block;font-size:var(--_kindlychat-font-size-sm);font-weight:500;"]),ki=i.Ay.div.withConfig({componentId:"sc-t0w48p-8"})(["display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:20px;"]),Ci=i.Ay.button.withConfig({componentId:"sc-t0w48p-9"})(["border:1px solid rgba(0,0,0,0.08);padding:8px 12px;color:",";background-color:",";background-color:",";border-radius:6px;box-shadow:",";translate:",";transition:background-color 0.2s,translate 0.2s;cursor:pointer;user-select:none;"],e=>{let{theme:t}=e;return(0,he.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground},e=>{let{$isSelected:t,theme:n}=e;return t?(0,he.SW)(n.secondaryButtonBackground)?`oklch(from ${n.secondaryButtonBackground} calc(l * 0.90) c h / 0.9)`:`oklch(from ${n.secondaryButtonBackground} calc(l * 1.15) c h / 0.9)`:n.secondaryButtonBackground},a.FR.button,e=>{let{$isSelected:t}=e;return t?"0 -2px":"0 0"}),Si=i.Ay.textarea.withConfig({componentId:"sc-t0w48p-10"})(["font-family:inherit;color:inherit;border:none;outline:none;width:100%;height:75px;font-size:var(--_kindlychat-font-size-sm);background:",";border-radius:8px;padding:8px 12px;resize:none;&::placeholder{color:",";}"],e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.50)","rgba(0, 0, 0, 0.50)")}),_i=i.Ay.div.withConfig({componentId:"sc-t0w48p-11"})(["",";display:grid;grid-template-columns:0.6fr 1fr 0.6fr;grid-template-areas:'back dots next';view-transition-name:'navigation-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t&&"margin-top: auto"}),Ai=i.Ay.button.withConfig({componentId:"sc-t0w48p-12"})(["display:flex;width:max-content;align-items:center;gap:2px;padding:7px 12px;border:1px solid #00000014;border-radius:6px;box-shadow:",";cursor:pointer;user-select:none;"],a.FR.button),Ei=(0,i.Ay)(Ai).withConfig({componentId:"sc-t0w48p-13"})(["grid-area:back;color:",";background-color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground}),Ti=(0,i.Ay)(Ai).withConfig({componentId:"sc-t0w48p-14"})(["grid-area:next;place-self:end;align-items:center;background-color:",";color:",";outline-offset:4px;transition:opacity 0.2s;&:disabled{opacity:0.5;cursor:not-allowed;}"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),ji=i.Ay.div.withConfig({componentId:"sc-t0w48p-15"})(["grid-area:dots;display:flex;align-items:center;gap:8px;margin:auto;view-transition-name:'progress-dots-1723461511841';"]),Ii=i.Ay.span.withConfig({componentId:"sc-t0w48p-16"})(["width:",";height:",";border-radius:50%;background-color:",";transition:width 0.3s,height 0.3s,background-color 0.3s;box-shadow:",";"],e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isDotBeforeOrEqualCurrentStep:t,theme:n}=e;return t?`${n.buttonBackground}`:`${a.CM[20]}`},a.FR.button),Oi=i.Ay.div.withConfig({componentId:"sc-t0w48p-17"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin:auto;text-align:center;translate:0 0;transition:translate 0.2s;"]),Li=(0,i.Ay)(di.Ef).withConfig({componentId:"sc-t0w48p-18"})(["margin-top:16px;width:100%;"]),Pi=i.Ay.span.withConfig({componentId:"sc-t0w48p-19"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);function Ni(e){var t,n,o;let{feedbackToSubmit:s,isFullHeight:l,endChat:u,shouldEndChat:d=!1,inert:f}=e;const p=(0,Vt.jL)(),h=(0,c.Pj)().getState(),{currentLanguageCode:g}=(0,de.A)(),{botConversationFeedback:m,handoverConversationFeedback:b}=(0,Mo.A)(g),v="bot_conversation"===s.trigger_type?m:b,y=(0,dn.A)(),{start_over_button:x}=y,{buttonText:w,secondaryButtonBackground:k}=(0,r.useContext)(i.Dx),C=(0,r.useMemo)(()=>(0,he.w5)(k,a.AV.light,a.AV.dark),[k]),S="external_feedback"===v.feedback_type,_=[...null!=v&&v.rating_scale?["RATING_SCALE"]:[],...null!=v&&null!==(t=v.predefined_buttons)&&void 0!==t&&t.enable_step?["PREDEFINED_BUTTONS"]:[],...null!=v&&null!==(n=v.free_form)&&void 0!==n&&n.enable_step?["FREEFORM_TEXT"]:[],"THANK_YOU"],A=s.currentStep,E=A?_.indexOf(A):0,T=ri.Z.fullscreenMode,j=v.predefined_buttons.use_sentiment_buttons&&null!==(o=s.sentiment)&&void 0!==o?o:"no_sentiment";(0,r.useEffect)(()=>{if(!A)return;const e=_[0]===A;(0,je.tf)("show-feedback",{value:{feedbackType:A}},{storeState:h,source:e?"programmatic":"user"})},[A,h]);const I=e=>{(0,je.tf)("dismiss-feedback",{value:{feedbackType:A}},{storeState:h,source:e}),p((0,$o.zn)(null)),p((0,si.ot)()),d&&p((0,si.Dz)())},O=()=>{(0,je.tf)("restart-chat",void 0,{storeState:h}),p((0,$o.ky)(!0))};return S?(0,P.jsxs)(hi,{$isFullHeight:!!l,$justifyCenter:!0,children:[!l&&(0,P.jsx)(mi,{onClick:()=>I("user"),children:(0,P.jsx)(Ie.US,{color:"black",height:28,width:28})}),(0,P.jsx)(bi,{$isFullHeight:!!l,children:v.headline}),(0,P.jsx)(gi,{onClick:()=>{d&&(null==u||u("programmatic")),p((0,$o.zn)(null)),p((0,si.ot)())},href:v.url_for_feedback,target:"_blank",rel:"noreferrer",children:v.button_label})]}):(0,P.jsxs)(hi,{"aria-live":"polite",$isFullHeight:!!l,inert:f,children:[!l&&(0,P.jsx)(mi,{onClick:()=>I("user"),children:(0,P.jsx)(Ie.US,{color:"black",height:28,width:28})}),(()=>{var e;switch(A){case"RATING_SCALE":return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(bi,{$isFullHeight:Boolean(l),children:v.rating_scale.title}),(0,P.jsx)(vi,{children:v.rating_scale.edit_labels.map((e,t)=>{const n=0===t;return(0,P.jsxs)(yi,{$isSelected:s.index===t,"aria-pressed":s.index===t,"aria-label":e.rating,$wasChoiceMade:"number"==typeof s.index,onClick:()=>{return n=t,r=e.rating,o=e.sentiment,void(s.index===n?p((0,si.n_)()):p((0,si.wm)({index:n,rating:r,sentiment:o})));var n,r,o},...n&&{autoFocus:!0},children:[(0,P.jsx)(xi,{src:e.image,alt:e.rating,$isSelected:s.index===t}),e.show_rating&&(0,P.jsx)(wi,{children:e.rating})]},e.id)})})]});case"PREDEFINED_BUTTONS":return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(bi,{$isFullHeight:!!l,children:v.predefined_buttons.sentiments[j].title}),(0,P.jsx)(ki,{children:v.predefined_buttons.sentiments[j].buttons.map((e,t)=>{var n,r;const o=0===t;return(0,P.jsx)(Ci,{$isSelected:null===(n=s.buttons_chosen)||void 0===n?void 0:U()(n).call(n,e.text),"aria-pressed":null===(r=s.buttons_chosen)||void 0===r?void 0:U()(r).call(r,e.text),onClick:()=>{return t=e.text,void p((0,si.m9)(t));var t},...o&&{autoFocus:!0},children:e.text},e.id)})})]});case"FREEFORM_TEXT":return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(bi,{$isFullHeight:!!l,id:"feedback-freeform-title-1739894771",children:v.free_form.title}),(0,P.jsx)(Si,{value:null!==(e=s.freeform_text)&&void 0!==e?e:"",onChange:e=>{return t=e.target.value,void p((0,si.GY)(t));var t},placeholder:v.free_form.placeholder,"aria-labelledby":"feedback-freeform-title-1739894771",autoFocus:!0})]});case"THANK_YOU":return(0,P.jsxs)(Oi,{children:[(0,P.jsx)(bi,{$isFullHeight:!!l,children:v.thanks_text}),T&&(0,P.jsx)(Li,{"aria-label":x,title:x,onClick:O,type:"button",$loading:!1,children:(0,P.jsx)(Pi,{children:x})})]});default:return null}})(),"THANK_YOU"!==A?(0,P.jsxs)(_i,{$isFullHeight:l,children:[E>0&&(0,P.jsxs)(Ei,{onClick:()=>{ui(()=>{const e=_[E-1];e&&p((0,si.zp)(e))})},children:[(0,P.jsx)(oi,{color:C}),v.back_button]}),(0,P.jsx)(ji,{children:_.slice(0,-1).map((e,t)=>(0,P.jsx)(Ii,{$isActive:E===t,$isDotBeforeOrEqualCurrentStep:E>=t},e))}),(0,P.jsx)(Ti,{onClick:async()=>{ui(()=>{(async()=>{(0,je.tf)("submit-feedback",{value:{feedbackType:A,feedbackValue:s}},{storeState:h}),await p((0,ai.S)(s))})();const e=_[E+1];e&&(p((0,si.zp)(e)),"THANK_YOU"!==e||T||setTimeout(()=>{d?(null==u||u("programmatic"),p((0,$o.zn)(null))):I("programmatic"),p((0,si.ot)())},4e3))})},disabled:"RATING_SCALE"===A&&"number"!=typeof s.index||"PREDEFINED_BUTTONS"===A&&!s.buttons_chosen.length,children:A===_[_.length-2]?(0,P.jsxs)(P.Fragment,{children:[v.send_button,(0,P.jsx)(ii,{color:w})]}):(0,P.jsxs)(P.Fragment,{children:[v.next_button,(0,P.jsx)(ii,{color:w})]})})]}):(0,P.jsx)(P.Fragment,{children:l&&(0,P.jsx)(Xo,{shouldAutoFocus:!0})})]})}const Mi=(0,i.i7)(["0%{opacity:0;}100%{opacity:1;}"]),zi=((0,i.AH)(["",";animation-name:",";"],(0,y.qL)(100),Mi),(0,i.i7)(["0%{opacity:1;}100%{opacity:0;}"])),Ri=((0,i.AH)(["",";animation-delay:50ms;animation-name:",";"],(0,y.qL)(500),zi),(0,i.AH)(["",";"],e=>e.$fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px")),$i=i.Ay.div.withConfig({componentId:"sc-1pzvbin-0"})(["width:100%;overflow:hidden;"," position:absolute;z-index:",";background:#fff;background-color:#fff;opacity:1;transition:opacity 0.2s;@starting-style{opacity:0;}"],Ri,a.vI.overlayIndex),Di=(0,i.Ay)(ie.N_).withConfig({componentId:"sc-1pzvbin-1"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:var(--_kindlychat-font-size-p);&:hover,&:focus,&:active,&:visited{color:",";}"],a.Tj.darkColor,a.Tj.darkColor),Fi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-2"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;@media (max-height:610px){overflow-y:auto;}"]),Bi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Hi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Ui=i.Ay.div.withConfig({componentId:"sc-1pzvbin-5"})(["width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px 30px;h3{display:flex;align-items:center;justify-content:center;}"]),Vi=i.Ay.span.withConfig({componentId:"sc-1pzvbin-6"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),Wi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-7"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]);function Gi(e){let{textContent:t}=e;const n=(0,c.wA)(),r=(0,c.Pj)().getState(),{chat_deleted_header:o,back_to_chat_button:i}=t,a=()=>{(0,je.tf)("restart-chat",void 0,{storeState:r}),n((0,re.ky)(!0))};return(0,P.jsxs)(Ui,{children:[(0,P.jsx)(L.H3,{children:o}),(0,P.jsx)(di.Ef,{"aria-label":i,title:i,onClick:a,onKeyUp:e=>{"Enter"===e.key&&a()},type:"button","data-testid":"back-to-chat-option",autoFocus:!0,$loading:!1,children:(0,P.jsx)(Vi,{children:i})})]})}const qi=i.Ay.div.withConfig({componentId:"sc-19fb7bu-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);function Ki(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),o=(0,c.wA)(),{back_to_chat_button:i,delete_text:s,delete_button:l}=t;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ui,{children:(0,P.jsx)(L.H3,{children:s})}),(0,P.jsxs)(qi,{children:[(0,P.jsx)(Go.A,{style:a.Nz,"aria-label":l,title:l,onClick:()=>{(0,je.tf)("delete-chat",void 0,{storeState:r}),o((0,re._e)())},type:"button",text:l,cy:"confirm-delete-chat",autoFocus:!0}),(0,P.jsxs)(Di,{"aria-label":i,title:i,onClick:()=>n(),onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0,children:["‹ ",i]})]})]})}const Yi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Xi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Qi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-2"})(["color:",";font-size:var(--_kindlychat-font-size-m);margin:0 0 10px;line-height:24px;"],a.Tj.darkColor);function Zi(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),o=(0,c.wA)(),{back_to_chat_button:i,download_button:a,download_format_text:s}=t,l=e=>{(0,je.tf)("download-chat",void 0,{storeState:r}),o((0,re.VK)({},e))};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ui,{children:(0,P.jsx)(Qi,{children:s})}),(0,P.jsxs)(Yi,{children:[(0,P.jsxs)(Xi,{children:[(0,P.jsx)(di.Ef,{"aria-label":`${a} (HTML)`,title:`${a} (HTML)`,onClick:()=>l("html"),type:"button","data-testid":"download-chat-html",autoFocus:!0,$isSecondaryButton:!0,$loading:!1,children:(0,P.jsx)(Vi,{children:`${a} (HTML)`})}),(0,P.jsx)(di.Ef,{"aria-label":`${a} (JSON)`,title:`${a} (JSON)`,onClick:()=>l("json"),type:"button","data-testid":"download-chat-json",$isSecondaryButton:!0,$loading:!1,children:(0,P.jsx)(Vi,{children:`${a} (JSON)`})})]}),(0,P.jsxs)(Di,{"aria-label":i,title:i,onClick:n,onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0,children:["‹ ",i]})]})]})}const Ji=i.Ay.div.withConfig({componentId:"sc-eb968f-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.$long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.jO.maxPhoneHeight),ea=i.Ay.div.withConfig({componentId:"sc-eb968f-1"})(["min-width:60%;max-width:95%;margin:auto;display:flex;flex-direction:column;button{margin:5px 0;&:first-child{margin-top:10px;}svg{margin-right:15px;vertical-align:middle;}}"]);function ta(){const{supportedLanguages:e}=(0,de.A)(),t=(0,Vt.jL)(),n=(0,c.Pj)().getState(),r=e.length>1,{back_to_chat_button:o,change_language_button:i,download_button:a,delete_button:s,start_over_button:l}=(0,dn.A)(),u=e=>()=>{t((0,re.wQ)(e))};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ji,{$long:r}),(0,P.jsxs)(ea,{children:[r&&(0,P.jsx)(di.Ef,{"aria-label":i,title:i,onClick:u("SELECT_LANGUAGE"),type:"button","data-testid":"change-language-option",$isSecondaryButton:!0,autoFocus:r,children:(0,P.jsxs)(Vi,{children:[(0,P.jsx)(Ie.U,{width:16,height:16,crop:!0}),i]})}),(0,P.jsx)(di.Ef,{"aria-label":l,title:l,onClick:()=>{(0,je.tf)("restart-chat",void 0,{storeState:n}),t((0,re.ky)(!0))},type:"button","data-testid":"restart-chat-option",$isSecondaryButton:!0,autoFocus:!r,children:(0,P.jsx)(Vi,{children:l})}),(0,P.jsx)(di.Ef,{"aria-label":s,title:s,onClick:u("DELETE_CHAT_CONFIRMATION"),type:"button","data-testid":"delete-chat-option",$isSecondaryButton:!0,children:(0,P.jsx)(Vi,{children:s})}),(0,P.jsx)(di.Ef,{"aria-label":a,title:a,onClick:u("SELECT_DOWNLOAD"),type:"button","data-testid":"download-chat-option",$isSecondaryButton:!0,children:(0,P.jsx)(Vi,{children:a})}),(0,P.jsx)(di.Ef,{"aria-label":o,title:o,onClick:()=>{t((0,re.eG)())},type:"button","data-testid":"back-to-chat-option",children:(0,P.jsx)(Vi,{children:o})})]})]})}const na=i.Ay.fieldset.withConfig({componentId:"sc-6uesp5-0"})(["border:none;background-color:transparent;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),ra=i.Ay.div.withConfig({componentId:"sc-6uesp5-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;text-transform:capitalize;&:last-child{margin-top:0;}}"]),oa=i.Ay.div.withConfig({componentId:"sc-6uesp5-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),ia=(0,i.Ay)(L.H3).withConfig({componentId:"sc-6uesp5-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);function aa(e){let{onNavigateBack:t}=e;const{back_to_chat_button:n,change_language_button:o,confirm_action_button:i}=(0,dn.A)(),{currentLanguageCode:s,supportedLanguages:l}=(0,de.A)(),[u,d]=(0,r.useState)(s),f=l.find(e=>{let{code:t}=e;return t===s}),p=l.find(e=>{let{code:t}=e;return t===u}),h=(0,c.Pj)().getState(),g=(0,Vt.jL)();return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ui,{children:(0,P.jsxs)(ia,{children:[(0,P.jsx)(Ie.U,{width:50,height:50}),o]})}),(0,P.jsxs)(na,{children:[(0,P.jsx)(ra,{children:l.map((e,t)=>{const n=0===t;return(0,P.jsx)(Go.A,{"aria-label":e.name_local,title:e.name_local,onClick:()=>d(e.code),text:e.name_local,"aria-checked":e.code===u,selected:e.code===u,role:"radio",cy:`${e.code}-button`,autoFocus:n,isSecondaryButton:!0},e.code)})}),(0,P.jsxs)(oa,{children:[u!==s&&(0,P.jsx)(Go.A,{style:a.Nz,"aria-label":i,title:i,onClick:()=>{(0,je.tf)("change-language",{value:{languageCode:u,languageName:(null==p?void 0:p.name_english)||u,previousLanguageCode:s,previousLanguageName:(null==f?void 0:f.name_english)||s}},{storeState:h}),g((0,re.L4)(u,{skipRestart:!0})),g(re.RY),t()},type:"submit",text:i}),(0,P.jsxs)(Di,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button",children:["‹ ",n]})]})]})]})}var sa=n(6738);const la=i.Ay.div.withConfig({componentId:"sc-7s2wt6-0"})(["position:relative;width:fit-content;&:before{content:'';position:absolute;right:11px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:1;border-top:7px solid #2c2c2c;border-left:4px solid transparent;border-right:4px solid transparent;}"]),ca=i.Ay.div.withConfig({componentId:"sc-7s2wt6-1"})(["position:absolute;top:10px;left:8px;"]),ua=i.Ay.select.withConfig({componentId:"sc-7s2wt6-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:var(--_kindlychat-font-size-m);border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],e=>e.$icon&&"padding-left: 30px;",R.sF);function da(e){let{children:t,onClick:n=sa.A,onChange:r=sa.A,value:o,name:i,icon:a=!1,...s}=e;return(0,P.jsxs)(la,{children:[a&&(0,P.jsx)(ca,{children:(0,P.jsx)(Ie.U,{width:16,height:16,crop:!0})}),(0,P.jsx)(ua,{onClick:n,onChange:r,value:o,name:i,$icon:a,...s,children:t})]})}var fa=n(8833),pa=n(1970);const ha=i.Ay.div.withConfig({componentId:"sc-g6reae-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),ga=(0,i.AH)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.$welcomePageImage),ma=i.Ay.div.withConfig({componentId:"sc-g6reae-1"})(["flex:1;height:100%;max-height:250px;padding:18px 18px 0;background:",";background-color:",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>e.$welcomePageImage&&ga),ba=i.Ay.div.withConfig({componentId:"sc-g6reae-2"})(["flex:1;padding:15px 24px 24px;border-top:5px solid ",";@media ","{padding:24px;}"],e=>e.theme.headerBackground,a.jO.maxTablet),va=i.Ay.div.withConfig({componentId:"sc-g6reae-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),ya=i.Ay.div.withConfig({componentId:"sc-g6reae-4"})(["padding:20px 0;"]),xa=i.Ay.div.withConfig({componentId:"sc-g6reae-5"})(["display:flex;flex-direction:column;gap:10px;margin:24px;justify-content:space-between;"," button:first-child{@media ","{min-width:unset;}}"],e=>{const t=e.theme.background,n=(0,he.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return e.$complianceEnabled&&(0,i.AH)(["margin:0;padding:24px;border-top:1px solid rgba(0,0,0,0.02);color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)},a.jO.maxTablet),wa=((0,i.Ay)(ie.$n).withConfig({componentId:"sc-g6reae-6"})(["display:flex;align-items:center;padding:7px;color:",";background:",";background-color:",";border-color:",";border-radius:100px;"],e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground),(0,i.Ay)(L.H2).withConfig({componentId:"sc-g6reae-7"})(["font-weight:500;font-size:var(--_kindlychat-font-size-h3);margin:0 0 15px;"])),ka=i.Ay.div.withConfig({componentId:"sc-g6reae-8"})(["max-height:180px;overflow:hidden;font-size:var(--_kindlychat-font-size-m);margin:30px 0 10px 0;line-height:24px;overflow-y:auto;div{& > :first-child{margin-top:0;}& > :last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"]);var Ca=n(353),Sa=n(4668);const _a=(0,i.AH)(["display:flex;flex-direction:column;gap:10px;font-size:13px;justify-content:space-between;a{color:currentColor;text-decoration:underline;text-underline-offset:2px;}"]),Aa=(0,i.AH)(["",""],e=>{const t=e.theme.background,n=(0,he.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return(0,i.AH)(["color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)}),Ea=i.Ay.div.withConfig({componentId:"sc-8v2qcc-0"})([""," ",""],_a,Aa),Ta=(0,i.Ay)(pi).withConfig({componentId:"sc-8v2qcc-1"})(["border-top-left-radius:0;border-top-right-radius:0;border:none;border-top:1px solid rgba(0,0,0,0.02);padding:24px;"," ",""],_a,Aa),ja=i.Ay.div.withConfig({componentId:"sc-8v2qcc-2"})(["display:flex;align-items:start;gap:4px;font-weight:500;svg{flex-shrink:0;margin-top:2px;path{stroke-width:2;}}"]);function Ia(e){const t=(0,Vt.jL)();(0,r.useEffect)(()=>{e||t(re.RY)},[e,t])}function Oa(e){let{descriptionTextHtml:t}=e;const n=(0,Vt.jL)();return(0,r.useEffect)(()=>{n((0,Sa.Er)({wasShown:!0}))},[n]),Ia(t),(0,P.jsx)(Ea,{children:(0,P.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}})})}function La(e){let{descriptionTextHtml:t,buttonText:n,accessRequestText:r}=e;const o=(0,Vt.jL)(),{complianceWasRevoked:i}=(0,Vt.GV)(e=>e.chatbubble);return Ia(t),(0,P.jsxs)(Ta,{children:[i&&(0,P.jsxs)(ja,{children:[(0,P.jsx)(Ca.A,{size:16}),r]}),(0,P.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}}),(0,P.jsx)(Go.A,{type:"button",onClick:()=>{o((0,re.Sz)())},children:n})]})}const Pa=(e,t)=>({header:(0,Rr.A)(e.header,t),text:(0,Rr.A)(e.text,t),start_button:(0,Rr.A)(e.start_button,t)});function Na(){const{fullscreenMode:e}=ri.Z,t=(0,Vt.jL)(),n=(0,c.Pj)().getState(),[o,i]=(0,r.useState)(!1),{currentLanguageCode:a,supportedLanguages:s}=(0,de.A)(),{welcomePage:l,welcomePageType:d,isTextDirectionRtl:f}=(0,Vt.GV)(u.Od),{active:p}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{descriptionTextHtml:h,buttonText:g,isEnabled:m,requireAgreement:b}=(0,pa.A)(a),v=!e,y=f?"rtl":void 0,x=(0,r.useCallback)(e=>{e&&p&&setTimeout(()=>{e.focus()},0)},[p]),w=l?Pa(l,a):{header:"",text:"",start_button:""},k=w.start_button||"Start chat",C=m&&b?g:k;return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(ha,{children:[(0,P.jsx)(ma,{$welcomePageImage:"PICTURE"===d&&l.image,children:v&&(0,P.jsx)(zo.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:()=>{t((0,re.Rh)())},"data-testid":"close-chat-button",children:(0,P.jsx)(Ie.US,{width:25,height:25})})}),(0,P.jsx)(ba,{children:(0,P.jsx)(va,{dir:y,children:(0,P.jsxs)("div",{children:[s.length>1&&(0,P.jsx)(da,{icon:!0,name:"language-select","data-testid":"language-select",value:a,onChange:e=>{return n=e.target.value,void t((0,re.L4)(n));var n},"aria-label":"Select a language",children:s.map(e=>(0,P.jsx)("option",{label:e.name_local,value:e.code,children:e.name_local},e.code))}),(0,P.jsxs)(ya,{children:[(0,P.jsx)(wa,{children:w.header}),(0,P.jsx)(ka,{children:w.text&&(0,qt.A)(w.text)})]})]})})}),(0,P.jsxs)(xa,{$complianceEnabled:m,children:[m&&(0,P.jsx)(Oa,{descriptionTextHtml:h}),(0,P.jsx)(Go.A,{cy:"start-chat-button",type:"button",title:C,onClick:()=>{i(!0),(0,je.tf)("welcome-page-start-chat",void 0,{storeState:n}),t((0,re.L4)(a)),t((0,re.mN)()),m&&b&&t((0,fa.Sz)())},loading:o,ref:x,children:C})]})]})})}function Ma(e){var t,n;let{endChat:r,feedbackToSubmit:o}=e;const i=(0,c.wA)(),{hideHeader:a}=(0,c.d4)(u.Od),{whitelabelEnabled:s}=(0,c.d4)(u.Od),l=(0,dn.A)(),{overlayViews:d}=(0,c.d4)(u.$P),f=d[d.length-1],p=a||"WELCOME_PAGE"===f,h=()=>{i((0,re.i1)())};return(0,P.jsxs)($i,{$fullHeight:p,children:["WELCOME_PAGE"===f&&(0,P.jsx)(Na,{}),U()(t=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE","DELETED_CHAT","DELETE_CHAT_CONFIRMATION"]).call(t,f)&&(0,P.jsxs)(Fi,{children:[U()(n=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE"]).call(n,f)?(0,P.jsxs)(Bi,{children:["GENERIC"===f&&(0,P.jsx)(ta,{}),"SELECT_DOWNLOAD"===f&&(0,P.jsx)(Zi,{textContent:l,onNavigateBack:h}),"SELECT_LANGUAGE"===f&&(0,P.jsx)(aa,{onNavigateBack:h})]}):(0,P.jsxs)(Hi,{children:["DELETE_CHAT_CONFIRMATION"===f&&(0,P.jsx)(Ki,{onNavigateBack:h,textContent:l}),"DELETED_CHAT"===f&&(0,P.jsx)(Gi,{textContent:l})]}),(0,P.jsx)(Wi,{children:!s&&(0,P.jsx)(Xo,{})})]}),"CANCEL_CHAT"===f&&(0,P.jsx)(ni,{endChat:r}),"FEEDBACK"===f&&o&&(0,P.jsx)(Ni,{isFullHeight:!0,shouldEndChat:!0,feedbackToSubmit:o,endChat:r}),"ABOUT_CHAT"===f&&(0,P.jsx)(Wo,{})]})}const za=i.Ay.div.withConfig({componentId:"sc-1272hyw-0"})(["display:flex;flex-direction:column;align-items:center;background:",";background-color:",";padding:1px 0 0;"," span{background:",";background-color:",";width:90%;height:1px;z-index:21;}"],e=>e.theme.background,e=>e.theme.background,ie.D7,a.Tj.borderColorDarkGray,a.Tj.borderColorDarkGray),Ra=i.Ay.form.withConfig({componentId:"sc-1272hyw-1"})(["display:flex;flex-direction:column;width:100%;padding:0 24px 20px;input{margin-right:24px;border:1px solid rgba(0,0,0,0);:focus{border:1px solid rgba(0,0,0,0);}:invalid{","}}"],e=>{let{$hasSubmitted:t}=e;return t&&"border-color: red;"}),$a=(0,i.Ay)(ie.$n).withConfig({componentId:"sc-1272hyw-2"})(["min-height:25px;display:flex;align-items:center;font-size:var(--_kindlychat-font-size-h4);padding:0;&:hover{opacity:0.8;}"]),Da=i.Ay.div.withConfig({componentId:"sc-1272hyw-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:var(--_kindlychat-font-size-p);align-items:center;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"white","black")}),Fa=i.Ay.div.withConfig({componentId:"sc-1272hyw-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Ba=i.Ay.input.withConfig({componentId:"sc-1272hyw-5"})(["",""],ie.hF),Ha=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Ua(e,t){var n,o;const s=(0,Vt.jL)(),{contactDetailsButton:l,currentModal:c}=(0,Vt.GV)(u.$P),[d,f]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),g=(0,r.useRef)(null),m=(0,i.DP)(),b=null==l||null===(n=l.contact_details)||void 0===n?void 0:n.contact_type,{label:v,placeholder:y}=null!==(o=null==l?void 0:l.contact_details)&&void 0!==o?o:{},x=(0,r.useMemo)(()=>(0,he.w5)(m.background,a.Tj.grayColor,a.Tj.darkColor),[m.background]),w=()=>{s((0,re.V$)())};return(0,P.jsxs)(za,{ref:t,inert:!!c,children:[(0,P.jsx)("span",{}),(0,P.jsxs)(Ra,{$hasSubmitted:p,children:[(0,P.jsxs)(Da,{children:[b&&(0,P.jsx)($a,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:w,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",children:(0,P.jsx)(Ie.US,{width:25,height:12,color:x})}),v]}),(0,P.jsxs)(Fa,{children:[(0,P.jsx)(ie.A0,{children:(0,P.jsx)(Ba,{onChange:e=>{f(e.target.value)},value:d,type:b===Ha.EMAIL?"email":"tel",ref:g,placeholder:y,required:!0})}),(0,P.jsx)(vo,{onClick:e=>{var t,n;return h(!0),!(null==g||null===(t=g.current)||void 0===t||null===(n=t.validity)||void 0===n||!n.valid||(e.preventDefault(),s((0,re.j3)(l,d)),w(),1))},type:"submit",$active:!0,title:"Send your "+(b===Ha.EMAIL?"email address":"phone number"),"data-testid":"send-contact-details-button",children:(0,P.jsx)(Ie.qx,{width:24,height:24})})]})]})]})}const Va=(0,r.forwardRef)(Ua);var Wa=n(4097);const Ga=i.Ay.div.withConfig({componentId:"sc-14jnerp-0"})(["left:0;right:0;top:","px;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],zo.$A,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor,y.yu),qa=i.Ay.div.withConfig({componentId:"sc-14jnerp-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);transition:opacity 0.3s ease;","[inert] &{opacity:0.4;}"],Ga),Ka=i.Ay.span.withConfig({componentId:"sc-14jnerp-2"})(["font-weight:600;"]),Ya=(0,i.Ay)(L.H3).withConfig({componentId:"sc-14jnerp-3"})(["margin:0;color:",";"," font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;"],e=>e.theme.headerText,e=>{let{$shouldTruncate:t}=e;return t&&"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"}),Xa=(0,i.Ay)(ie.N_).withConfig({componentId:"sc-14jnerp-4"})(["color:",";",""],e=>e.theme.headerText,e=>{let{$dontShrink:t}=e;return t&&"flex-shrink: 0;"}),Qa=(0,i.i7)(["from{background-position:-180px;}to{background-position:180px;}"]),Za=(0,i.i7)(["from{background-position:180px;}to{background-position:-180px;}"]),Ja=i.Ay.div.withConfig({componentId:"sc-14jnerp-5"})(["position:relative;border:0;"]),es=i.Ay.span.withConfig({componentId:"sc-14jnerp-6"})(["opacity:1;height:3px;width:100%;position:absolute;background-image:linear-gradient( 90deg,rgba(255,255,255,0) 25%,"," 45%,"," 55%,rgba(255,255,255,0) 75% );animation:1.3s linear "," infinite 0s;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>{let{$hasCancelled:t}=e;return t?Za:Qa}),ts=3e3;let ns,rs;function os(e){let{waitTimeInMinutes:t,queuePosition:n,handoverQueueText:r,estimatedTimeText:o,queuePositionText:i}=e;return Number.isInteger(n)&&i?(0,P.jsxs)("span",{children:[i,": ",(0,P.jsx)(Ka,{children:n})]}):Number.isInteger(t)&&o?(0,P.jsxs)("span",{children:[o," ",(0,P.jsxs)(Ka,{children:[t," min"]})]}):(0,P.jsx)("span",{children:r})}function is(){const[e,t]=(0,r.useState)(!1),{currentLanguageCode:n}=(0,de.A)(),{botKey:o,currentModal:i}=(0,c.d4)(u.$P),{showTakeoverQueue:a}=(0,c.d4)(u.Od),{requestedHandoverAt:s,handoverWaitTimeEstimate:l,handoverQueuePosition:d,takeoverClosed:f,takenOver:p,name:h}=(0,c.d4)(u.MA),g=(0,c.wA)();(0,r.useEffect)(()=>{rs!==p&&p?(ns=n,rs=p):void 0===ns||ns===n||p||(kn.A.getInstance().getConnection().restart(!0),ns=void 0,rs=void 0)},[f,p,s,o,n,g]);const{takeover_queue_text:m,takeover_queue_link:b,leave_queue_text:v,leave_queue_link:y,estimated_time_text:x,queue_position_text:w,chatting_with_agent_text:k,user_end_handover_button_text:C}=(0,dn.A)();if((0,r.useEffect)(()=>{const n=setTimeout(()=>{e&&(g((0,re.cL)()),t(!1))},ts);return e||clearTimeout(n),()=>clearTimeout(n)},[e,g]),p){const e=`${k} ${h||"a human"}`;return(0,P.jsx)(Ga,{inert:!!i,children:(0,P.jsxs)(qa,{children:[(0,P.jsx)(Ya,{$shouldTruncate:!0,title:e,children:e})," ",(0,P.jsx)(Xa,{$dontShrink:!0,onClick:()=>g((0,re.zn)("END_HANDOVER")),children:C})]})})}if(!a)return null;if(!Boolean(s)||f||p)return null;const S="number"==typeof l?Math.max((_=l,Math.ceil(_/60/1e3)),1):void 0;var _;return(0,P.jsxs)(Ga,{children:[(0,P.jsx)(qa,{"aria-live":"polite","aria-atomic":"true","data-testid":"handover-queue",children:e?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ya,{children:v}),(0,P.jsx)(Xa,{onClick:()=>t(!1),"data-testid":"handover-queue-link",children:y})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ya,{children:(0,P.jsx)(os,{estimatedTimeText:x,handoverQueueText:m,queuePositionText:w,queuePosition:d,waitTimeInMinutes:S})}),(0,P.jsx)(Xa,{onClick:()=>t(!0),"data-testid":"handover-queue-link",children:b})]})}),(0,P.jsx)(Ja,{children:(0,P.jsx)(es,{$hasCancelled:e})})]})}const as=(0,i.i7)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),ss=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(),as),ls=i.Ay.div.withConfig({componentId:"sc-fbtzdd-0"})(["z-index:25;margin:8px;display:flex;padding:6px;justify-content:space-between;border-radius:6px;background-color:white;color:",";box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);max-height:1000px;max-width:",";width:calc(100% - 16px);margin-left:auto;margin-right:auto;position:absolute;left:0;right:0;top:0;",";",";&[inert]{user-select:none;}"],a.Tj.primaryColor,a.mb.tablet,e=>{const t=e.$quantity-1===e.$index;return`\n transition:\n top 150ms ease,\n scale 200ms ease ${t?0:100}ms,\n ${!t&&"max-height 100ms ease 100ms"};\n top: ${8*e.$index+(e.$hasTopMargin?0:55)}px;\n scale: ${1-.05*(e.$quantity-1-e.$index)};\n ${!t&&"\n max-height: 10px;\n overflow: hidden;\n "}\n `},ss),cs=i.Ay.div.withConfig({componentId:"sc-fbtzdd-1"})(["flex:0;flex-basis:auto;align-self:center;margin-left:6px;margin-right:6px;"]),us=(0,i.Ay)(L.fz).withConfig({componentId:"sc-fbtzdd-2"})(["flex:1;margin:0;font-size:var(--_kindlychat-font-size-p);display:inline-block;padding:6px;"]),ds=(0,i.Ay)(Go.A).withConfig({componentId:"sc-fbtzdd-3"})(["margin-top:8px;font-weight:500;font-size:var(--_kindlychat-font-size-p);"]),fs=(0,i.Ay)(ie.$n).withConfig({componentId:"sc-fbtzdd-4"})(["flex:0;flex-basis:auto;z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}"]),ps=n(9907).env.STORYBOOK?0:2e3,hs=i.Ay.button.withConfig({componentId:"sc-iju6vd-0"})(["border:none;margin:0;text-decoration:none;font-family:inherit;font-size:inherit;line-height:inherit;cursor:pointer;transition:background 250ms ease-in-out,transform 150ms ease;appearance:none;&:hover,&:focus{background:#edf2f7;}&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}background:#f7fafc;border-radius:4px;display:inline-block;svg{vertical-align:sub;}"]),gs=function(e){let{children:t,href:n,fallback:r,...o}=e;const i=(a=(0,c.wA)(),{"#settings/language-select":{icon:(0,P.jsx)(Ie.Ze,{width:16,height:16}),onClick:()=>{a((0,re.wQ)("SELECT_LANGUAGE")),a((0,re.Fe)(l.Jm.LANGUAGE_SWITCH))}}})[n];var a;return i?(0,P.jsxs)(hs,{...o,onClick:i.onClick,children:[i.icon," ",t]}):r||null};function ms(e){if(!e)return null;const t=[];let n=0;function r(e){e.length>0&&(t.push((0,P.jsx)("span",{children:e},n)),n+=e.length)}const o=/\[([^\\\]]+(?:\\.[^\\\]]*)*)\]\(([^)]+)\)/g;let i=o.exec(e);for(;null!==i;){const a=i[1],s=i[2];r(e.substring(n,i.index)),t.push((0,P.jsx)(gs,{href:s,fallback:`[${a}](${s})`,children:a},n+i.index)),n=i.index+i[0].length,i=o.exec(e)}return r(e.substring(n)),t}const bs={language:Ie.U};function vs(){const{chatHasStarted:e,overlayViews:t}=(0,c.d4)(u.$P),n=function(e){const[t,n]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{const t=setTimeout(()=>n(!1),e);return()=>clearTimeout(t)},[e]),e=>!t&&e()}(e?0:ps),{notifications:o}=(0,c.d4)(u.Hk),i=t.length>0,a=o.filter(e=>!e.dismissed).slice(-3),s=(0,c.wA)(),l=i,d=e=>t=>{t.stopPropagation(),s((0,re.Fe)(e))};if(null==a||!a.length)return null;const f=a.length;return n(()=>(0,P.jsx)(P.Fragment,{children:a.map((e,t)=>{let{id:n,content:r,buttonHref:o,buttonText:i,icon:a}=e;const s=t===f-1,c=s?void 0:-1,u=bs[a];return(0,P.jsxs)(ls,{"aria-live":s?"polite":void 0,"aria-atomic":s?"true":void 0,"aria-hidden":s?void 0:"true",inert:s?void 0:"",role:s?"alert":void 0,tabIndex:c,$hasTopMargin:l,$index:t,$quantity:f,children:[u&&(0,P.jsx)(cs,{children:(0,P.jsx)(u,{width:24,height:24})}),(0,P.jsxs)(us,{children:[ms(r),o&&i&&(0,P.jsx)(ds,{href:o,tabIndex:c,isSecondaryButton:!0,children:i})]}),(0,P.jsx)(fs,{"aria-label":"Dismiss notification",title:"Dismiss notification",onClick:d(n),disabled:!s,type:"button",children:(0,P.jsx)(Ie.WI,{})})]},n)})}))}var ys=n(3649),xs=n(8395);const ws=(e,t)=>{let{botId:n,currentLanguage:r,chatId:o}=t;return e.from_bot||e.sender||!e.id.startsWith("tempId-")?e:{botId:n,chatId:o,chat_source:(0,x.A)()?l.Je.WEB_MOBILE:l.Je.WEB,currentLanguage:r,from_bot:!1,sender:l.bS.USER,...(0,Hn.A)("buttonType","buttons")(e)}},{focusTrapOnFullView:ks}=ri.Z,Cs=["SCRIPT","STYLE","LINK","META"],Ss=()=>{var e;const t=Array.from(document.body.children),n=window.document.getElementById(null===(e=window.kindlyChat)||void 0===e?void 0:e.API_NODE_ID);n&&t.forEach(e=>{e.contains(n)||U()(Cs).call(Cs,e.tagName)||e.hasAttribute("inert")||(e.setAttribute("inert",""),e.setAttribute("data-kindly-inert",""))})},_s=()=>{document.querySelectorAll("[data-kindly-inert]").forEach(e=>{e.removeAttribute("inert"),e.removeAttribute("data-kindly-inert")})},As=(0,i.Ay)(pi).withConfig({componentId:"sc-19qip4y-0"})(["display:flex;min-height:",";padding:16px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-end-chat-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(120px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"});var Es=n(340);const Ts=()=>(0,P.jsx)(As,{children:(0,P.jsx)(Es.A,{})});function js(e){let{color:t="#0D0D0D"}=e;return(0,P.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,P.jsx)("path",{d:"M15.75 8.75L19.25 12L15.75 15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M19 12H10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25H15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Is=(0,i.Ay)(pi).withConfig({componentId:"sc-1e1ck6u-0"})(["display:flex;gap:24px;flex-direction:column;"]),Os=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-1"})(["display:flex;gap:8px;flex-direction:column;font-size:var(--_kindlychat-font-size-p);> p{margin:0;}"]),Ls=i.Ay.h3.withConfig({componentId:"sc-1e1ck6u-2"})(["margin:0;display:flex;gap:4px;align-items:center;font-size:var(--_kindlychat-font-size-p);font-weight:500;"]),Ps=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-3"})(["display:flex;gap:8px;> button{flex:1;}"]);function Ns(e){let{handleCancel:t,handleEndHumanChat:n,descriptionText:r,titleText:o,cancelButtonText:i,confirmButtonText:a}=e;return(0,P.jsxs)(Is,{children:[(0,P.jsxs)(Os,{children:[(0,P.jsxs)(Ls,{children:[(0,P.jsx)(js,{color:"var(--panel-background-white-black-contrast-1743170834)"}),o]}),(0,P.jsx)("p",{children:r})]}),(0,P.jsxs)(Ps,{children:[(0,P.jsx)(Go.A,{isSecondaryButton:!0,onClick:t,children:i}),(0,P.jsx)(Go.A,{onClick:n,children:a})]})]})}function Ms(e){let{buttonHandlers:t,onMessage:n=null}=e;const o=(0,c.Pj)(),i=(0,Vt.jL)(),a=(0,r.useRef)(null),s=(0,r.useRef)(null),l=(0,r.useRef)(null),{hideHeader:d,fullscreenMode:f,offsetHeight:p,id:h}=(0,Vt.GV)(u.Od),{active:g,chatHasStarted:m,currentlyPoppedUp:b,contactDetailsButton:v,currentLanguage:y,currentModal:x,overlayViews:w,isChatFullWindow:k}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{chatMessages:C}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),S=function(e){const t=(0,ne.A)(e),n=(e||[]).length;let r;return n&&n!==(t||[]).length&&(r=e[n-1]),r}(C),{feedbackToDisplay:_,feedbackToSubmit:A}=(0,ys.A)(),{cancel_button:E,user_end_handover_button_text:T,user_end_handover_modal_title_text:j,user_end_handover_modal_description_text:I}=(0,dn.A)(),[L,N]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(L)return void N(!1);if(!S)return;const e=o.getState(),{chatMessages:t,attachments:r}=e.messages,{chatId:i,renderedBy:a}=e.chatbubble,{token:s}=e.connection,{PAT_HOST:l}=e.environment,c=t.map(e=>(0,xs.A)(e,r,l,s)),u=(0,xs.A)(S,r,l,s);(0,je.GJ)(ws(u,{botId:h,currentLanguage:y,chatId:i}),c,n,a)},[L,n,S,h,o,C.length]);const M=C.length>=3,z=w[w.length-1],R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user";_&&"CANCEL_CHAT"===z&&M?(i((0,si.WG)({ratingSystem:_.rating_scale.rating_system,triggerType:_.trigger_type,formTitle:_.form_title,step:"RATING_SCALE"})),i((0,re.wQ)("FEEDBACK"))):((0,je.tf)("end-chat",void 0,{storeState:o.getState(),source:e}),i((0,re.ky)(f)),i((0,re.zn)(null)))},{descriptionTextHtml:$,buttonText:D,accessRequestText:F}=(0,pa.A)(y);return function(e){const{isChatFullWindow:t,renderedBy:n}=(0,c.d4)(u.$P),o=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(e.current&&ks&&"API"===n)return o.current!==t&&(o.current=t,t?Ss():_s()),_s},[e,t])}(l),(0,P.jsx)(O,{"aria-live":"polite","data-cy":"chat-box","data-testid":"chat-box",ref:l,$active:g,$chatHasStarted:m,$fullscreen:!!f,$isChatFullWindow:k,$offsetHeight:p,children:(0,P.jsxs)(Wa.A,{errorPoint:"inside ChatBoxContainer",children:[!d&&(0,P.jsx)(Ro,{handleXButtonClick:()=>{"CANCEL_CHAT"!==z&&"FEEDBACK"!==z?i((0,re.wQ)("CANCEL_CHAT")):R()},settingsButtonRef:s}),!!z&&(0,P.jsx)(Ma,{endChat:R,feedbackToSubmit:A}),(0,P.jsx)(ce,{}),(0,P.jsx)(is,{}),(0,P.jsx)(vs,{}),(0,P.jsx)(ro,{bodyRef:a,buttonHandlers:t,inert:!!z||!!x}),v?(0,P.jsx)(Va,{}):(0,P.jsx)(Po,{active:g,chatHasStarted:m,currentlyPoppedUp:b,bodyRef:a,inert:!!z||!!x}),"FEEDBACK_END_CHAT"===x&&(0,P.jsx)(Ts,{}),"END_HANDOVER"===x&&(0,P.jsx)(Ns,{handleCancel:()=>i((0,re.zn)(null)),handleEndHumanChat:async()=>{await i((0,re.m8)()),i((0,re.zn)(null))},titleText:null!=j?j:"",descriptionText:null!=I?I:"",cancelButtonText:null!=E?E:"",confirmButtonText:null!=T?T:""}),"COMPLIANCE"===x&&(0,P.jsx)(La,{descriptionTextHtml:$,buttonText:D,accessRequestText:F}),("END_CHAT"===x||"handover_conversation"===(null==A?void 0:A.trigger_type)&&"FEEDBACK_END_HANDOVER"===x)&&(0,P.jsx)(Ni,{feedbackToSubmit:A,shouldEndChat:!("END_CHAT"!==x),endChat:R})]})})}Ms.displayName="KindlyChatBox";var zs=n(3473);const Rs=(e,t)=>Object.entries(e).filter(e=>{let[t,n]=e;return"object"==typeof n}).reduce((e,n)=>{let[r,o]=n;return{...e,[r]:(0,Rr.A)(o,t)}},{}),$s=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),Ds=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let Fs=!1;function Bs(e){const t=document.title;let n;n||Fs||(Fs=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",function e(){clearInterval(n),document.title=t,n=null,Fs=!1,window.removeEventListener("mousemove",e)}))}var Hs=n(9270),Us=n(7912),Vs=n(3821),Ws=n(4497);const Gs=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var qs=n(1576);const Ks=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,qs.A)(n)]:r}},{})};function Ys(e){let{settings:t}=e;const n=(0,Vt.jL)(),{currentLanguageCode:o}=(0,de.A)(),{inspectorOpen:i}=(0,Vt.GV)(e=>{let{inspector:t}=e;return t}),{chatMessages:a}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),d=(0,r.useRef)(null),f=(0,ne.A)(a),p=localStorage.getItem("kindly-chat-restart-message"),h=(0,Us.A)(t,"zIndex",l.DP);(0,r.useEffect)(()=>{if(0===(null==f?void 0:f.length)&&1===(null==a?void 0:a.length)&&p){const{message:e,exchangeId:t,newContext:r}=JSON.parse(p);localStorage.removeItem("kindly-chat-restart-message"),n((0,Hs.y2)(e,t,r))}},[n,a,f,p]),function(){const{tabNotification:e,name:t}=(0,c.d4)(u.Od),{showTabNotification:n}=(0,c.d4)(u.Cv),{currentLanguageCode:o}=(0,de.A)(),{takenOver:i}=(0,c.d4)(u.MA),{agent:a}=(0,c.d4)(u.zD),s=(0,ne.A)(i);(0,r.useEffect)(()=>{var r;e&&n&&Bs((null!==(r=null==$s?void 0:$s[o])&&void 0!==r?r:$s.en)(t||"Kindly"))},[o,e,n,t]),(0,r.useEffect)(()=>{const e=Boolean(null==a?void 0:a.name);var t;s!==i&&i&&e&&Bs(null!==(t=null==Ds?void 0:Ds[o])&&void 0!==t?t:Ds.en)},[i,a,s,o])}(),function(){const e=(0,Vt.jL)(),{currentLanguage:t,active:n}=(0,Vt.GV)(u.$P),{maintenanceAlertEnabled:o,maintenanceAlert:i}=(0,Vt.GV)(u.Od);(0,r.useEffect)(()=>{if(!n||!o)return;const{text_content:r,link_location:a,link_text:s}=Rs(i,t);e((0,re.cC)({content:r,buttonText:s,buttonHref:a,once:!0},l.Jm.MAINTENANCE))},[n,t,e,i,o])}(),function(e){const t=(0,c.wA)(),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!e)return;const r=e.current;if(!r)return;const o=document.body||document.documentElement,i=()=>{const e=function(e){if(!e)return!1;const{width:t,height:n}=e.getBoundingClientRect();return t>=window.innerWidth&&n>=window.innerHeight}(r);e!==n.current&&(n.current=e,(e=>{t((0,$o.w7)(e)),e?o.classList.add("kindly-overflow-hidden"):o.classList.remove("kindly-overflow-hidden")})(e))};setTimeout(()=>i(),zs.X+10);const a=new ResizeObserver(i);return a.observe(r),()=>{t((0,$o.w7)(!1)),o.classList.remove("kindly-overflow-hidden"),a.disconnect()}},[t,e])}(d),function(e){const t=(0,r.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=(0,r.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);(0,r.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(d),function(){const e=(0,Vt.jL)(),{chatHasStarted:t}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{welcomePageType:n}=(0,Vt.GV)(u.Od);(0,r.useEffect)(()=>{!t&&n!==l.Lb.NONE&&e((0,re.wQ)("WELCOME_PAGE"))},[t,n,e])}(),function(){const e=(0,Vt.jL)(),t=(0,Vt.GV)(e=>e.announcement),n=(0,Vt.GV)(e=>e.bot),o=(0,Vt.GV)(e=>e.chatbubble),i=(0,r.useCallback)(()=>{if(!t.show){const t={text:Gs(n,o,Ws.WJ.OFFLINE),alertType:Ws.uV.WARNING};null==e||e({type:Vs.Y,payload:t})}},[t.show,n,o,e]);(0,r.useEffect)(()=>{window.navigator.onLine||i()},[i]),(0,co.A)("online",()=>{if(t.show){if(o.chatHasStarted&&kn.A.getInstance().getIsInitialized()){const e=kn.A.getInstance().getConnection();null!=e&&e.getToken()&&e.connect()}null==e||e({type:Vs.n})}}),(0,co.A)("offline",i)}();const g=(0,r.useMemo)(()=>Ks(t.buttonHandlers),[t.buttonHandlers]);return(0,P.jsxs)(s,{id:"chatContainer",ref:d,className:"chat-container",role:"complementary",$zIndex:h,"data-testid":"chat-box-container",lang:o,$inspectorOpen:i,children:[(0,P.jsx)(Ms,{buttonHandlers:g,onMessage:t.onMessage}),i&&(0,P.jsx)(oe,{})]})}},8832:(e,t,n)=>{"use strict";n.d(t,{$n:()=>f,A0:()=>p,Bi:()=>c,D7:()=>b,N_:()=>u,hF:()=>m,k5:()=>d});var r=n(1197),o=n(8663),i=n(8668),a=n(4785),s=n(8787),l=n(1708);const c=r.Ay.button.withConfig({componentId:"sc-o7eiww-0"})(["all:unset;cursor:pointer;outline:revert;"]),u=r.Ay.a.withConfig({componentId:"sc-o7eiww-1"})(["text-decoration:underline;cursor:pointer;",""],s.sF),d=(0,r.AH)(["border:0;text-align:center;border-radius:6px;font-weight:normal;background:none;cursor:pointer;text-transform:none;transition:all 0.2s ease;"]),f=r.Ay.button.withConfig({componentId:"sc-o7eiww-2"})([""," ",""],d,s.sF),p=r.Ay.div.withConfig({componentId:"sc-o7eiww-3"})(["position:relative;overflow:",";max-height:83px;min-height:",";height:","px;width:100%;min-width:0;"],e=>{let{$hasFiles:t}=e;return t?"visible":"hidden"},e=>{let{$initialHeight:t}=e;return`${(null!=t?t:0)+1}px`},e=>e.$active?e.$targetHeight:e.$initialHeight),h=(0,r.AH)(["max-height:41px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),g=(0,r.AH)(["",";font-size:",";"],e=>!e.$active&&"max-height: 44px;",l.J.input),m=(0,r.AH)(["position:relative;z-index:2;margin-bottom:0;color:",";font-size:var(--_kindlychat-font-size-p);line-height:20px;padding:7px 50px 8px 16px;"," background-image:none;resize:none;box-shadow:none;border-radius:18px;max-height:83px;font-family:",";width:100%;min-height:0;border:1px solid transparent;transition:transform 0.3s ease;",";",";@media ","{","}"," &:focus{color:",";box-shadow:none;border:1px solid ",";","}&:focus-visible{outline:none;}::placeholder{color:",";opacity:0.5;}"],e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,s.Mo)(t.background,.08)},a.m.default,e=>e.$hide&&"transform: translateY(-60px)",e=>!e.$active&&h,l.jO.maxTablet,g,(0,i.A)()&&g,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,o.w5)(t.background,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFF","#000")}),b=(0,r.AH)(["position:relative;&:before{content:'';left:0;right:20px;top:-15px;z-index:1;height:20px;position:absolute;background:linear-gradient( 0deg,"," 0%,"," 25%,rgba(248,248,248,0) 100% );opacity:1;transition:opacity linear 300ms;","}"],e=>e.theme.background,e=>e.theme.background,e=>{let{$inspectorOpen:t}=e;return t?"height: 0":""})},8833:(e,t,n)=>{"use strict";n.d(t,{R7:()=>C,RY:()=>k,Rm:()=>j,Sz:()=>x,TP:()=>I,c9:()=>w,et:()=>T,ez:()=>O,m8:()=>S,zX:()=>_});var r=n(9749),o=n.n(r),i=n(7931),a=n(5352),s=n(9449),l=n(4174),c=n(9990),u=n(9011),d=n(1970),f=n(5392),p=n(6885),h=n(485),g=n(6122),m=n(8094),b=n(3178),v=n(6834),y=n(4668);const x=()=>(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{acceptanceText:o,revokePermissionText:a}=(0,d.A)(n);e((0,y.Fu)({wasRevoked:!1})),"COMPLIANCE"===r&&e((0,v.zn)(null));const s=`\n ${o}\n <br>\n <span data-kindly-action="${i.Y$.REVOKE_PERMISSION}" style="cursor: pointer; text-decoration: underline;">${a}</span>`.trim();e({type:m.z2,payload:{message:s,system_dialogue_message_type:i.zV.COMPLIANCE}})},w=(e,t)=>{const{currentLanguage:n}=t().chatbubble,{isEnabled:r}=(0,d.A)(n);r&&(e((0,v.zn)("COMPLIANCE")),e((0,y.Fu)({wasRevoked:!0})))},k=(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{isEnabled:o}=(0,d.A)(n);o||"COMPLIANCE"!==r||(e((0,y.Fu)({wasRevoked:!1})),e((0,v.zn)(null)))},C=e=>async(t,n)=>{const{connection:{token:r},environment:{PAT_HOST:o}}=n();return r?fetch(`${o}/chatbubble/${a.Ak}/user_left/`,{method:"PATCH",...(0,c.A)({token:r,botKey:e})}):null},S=()=>async(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:r},auth:{fullName:o}}=t();return n?fetch(`${r}/chatbubble/${a.Ak}/handover_cancel/`,{method:"POST",body:JSON.stringify({source:o}),...(0,c.A)({token:n},{extra:{"Content-Type":"application/json"}})}):null},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async(n,r)=>{const{agent:{takenOver:o,requestedHandoverAt:i},chatbubble:{active:s,chatHasStarted:l}}=r();t||n({type:g.d$,chatHasStarted:!1}),i?n({type:p.MM}):o&&n({type:p.II,data:{taken_over:!1}}),n({type:b.a1}),n(C(e)),n({type:h.wk});try{s&&!t?n({type:g.uS}):l&&n({type:g.kA})}catch(e){console.warn(e)}finally{n((0,f.F)(a.Jm.LANGUAGE_SWITCH)),n({type:g.CB,botKey:e,keepOpen:t})}}},A=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let E=0;const T=function(e,t){let{onError:n,restartOnError:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async i=>{if(!e)return console.error("Tried to call transport without supplying url"),null;if(!t.method)return console.error("Tried to call transport without supplying method"),null;t.headers={"kindly-chat-version":"2.81.8",[s.B]:(0,s.U)(),...t.headers||{}};try{const n=await fetch(e,{...t,...t.body&&{body:t.body instanceof ArrayBuffer?t.body:JSON.stringify(t.body)},headers:{"Content-Type":"application/json",...t.headers&&{...t.headers}}});if(!(t.body instanceof ArrayBuffer)){const e=await n.json();return{status:n.status,statusText:n.statusText,ok:n.ok,data:e}}return n}catch(e){return n?n(e,t):r?i(((e,t)=>function(){var n,r,i,a;if(!e.response||!o()(n=A.RESPONSE_STATUSES).call(n,null===(r=e.response)||void 0===r?void 0:r.status))return console.error(e),null;if(E+=1,E>A.MAX)return console.error(`${t.url} returned ${null===(a=e.response)||void 0===a?void 0:a.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${null===(i=e.response)||void 0===i?void 0:i.status}, starting new chat`);const s=A.TIMEOUT_MS*A.TIMEOUT_MULTIPLIER**(E-1);return setTimeout(()=>l.A.getInstance().getConnection().restart(),s),null})(e,t)):null}}},j=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,i)=>{var s;const l=i(),{connection:{token:d},environment:{PAT_HOST:f},chatbubble:{chatId:p}}=l,h={tags:{chat_id:p,bot_id:null===(s=l.bot)||void 0===s?void 0:s.id}},g=(0,u.A)({level:r,error:n,message:t,reduxState:l,extra:{...(m=o,JSON.parse(JSON.stringify(m,(e,t)=>void 0===t?"undefined 🤷‍♂️":t))),...h}});var m;e(T(`${f}/chatbubble/${a.Ak}/log`,{method:"POST",body:g,...(0,c.A)({token:d},{withCurrentUrl:!0})}))}},I=e=>t=>{t({type:m.se,messageSentTime:e})},O=()=>{const e=l.A.getInstance();e.getIsInitialized()&&e.setExpectingReply(!0)}},8853:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>0===Object.keys(e).length},8900:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},8964:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(null===(n=window.kindlyChat)||void 0===n?void 0:n.shadowRoot)||window;const i=(0,r.useRef)(null);(0,r.useEffect)(()=>{i.current=t},[t]),(0,r.useEffect)(()=>{if(!o||!o.addEventListener)return()=>{};const t=async e=>{var t;await(null===(t=i.current)||void 0===t?void 0:t.call(i,e))};return o.addEventListener(e,t),()=>{o.removeEventListener(e,t)}},[e,o])}},9011:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8191),o=n(1715);const i=e=>{var t,n;let{level:i="info",error:a,message:s,reduxState:l,extra:c}=e;s||null!=a&&a.message||(console.error("Attempted to log without message"),s="No error message provided");const u=(0,o.A)(l||{},r.W$),d={version:"2.81.8",release:"2.81.8",userAgent:navigator.userAgent,state:l?JSON.stringify(u):void 0,...c},f={message:null!==(t=s)&&void 0!==t?t:null==a?void 0:a.message,name:null==a?void 0:a.name,stack:null==a?void 0:a.stack,code:null==a?void 0:a.code,signal:null==a?void 0:a.signal,filename:null==a?void 0:a.filename};return{message:null!==(n=s)&&void 0!==n?n:null==a?void 0:a.message,level:i,extra:d,error:f}}},9098:(e,t,n)=>{"use strict";var r=n(8900),o=n(7013),i=n(9344),a=n(2769),s=n(4543).f,l=n(8696),c=n(8099),u=n(4572),d=n(3999),f=n(701);n(3753);var p=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,o,h,g,m,b,v,y,x,w=e.target,k=e.global,C=e.stat,S=e.proto,_=k?r:C?r[w]:r[w]&&r[w].prototype,A=k?c:c[w]||d(c,w,{})[w],E=A.prototype;for(g in t)o=!(n=l(k?g:w+(C?".":"#")+g,e.forced))&&_&&f(_,g),b=A[g],o&&(v=e.dontCallGetSet?(x=s(_,g))&&x.value:_[g]),m=o&&v?v:t[g],(n||S||typeof b!=typeof m)&&(y=e.bind&&o?u(m,r):e.wrap&&o?p(m):S&&a(m)?i(m):m,(e.sham||m&&m.sham||b&&b.sham)&&d(y,"sham",!0),d(A,g,y),S&&(f(c,h=w+"Prototype")||d(c,h,{}),d(c[h],g,m),e.real&&E&&(n||!E[g])&&d(E,g,m)))}},9154:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{...t}=e;return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,r.jsx)("path",{d:"M9.98389 9C10.0518 8.86333 10.1332 8.73454 10.2264 8.61538C10.6382 8.08862 11.2795 7.75 12 7.75C13.2426 7.75 14.25 8.75736 14.25 10C14.25 10.6275 13.9931 11.195 13.5788 11.6031C13.0782 12.0961 12.4712 12.6282 12.1769 13.2533M12 16.25V16.26M12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25Z",stroke:"#141414",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}},9155:t=>{"use strict";t.exports=e},9159:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);function o(e){const t=(0,r.useRef)(void 0);return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}},9205:(e,t,n)=>{"use strict";var r=n(9098),o=n(8900),i=n(4713),a=n(6100),s=n(4871),l=n(5024),c=n(4603),u=n(1203),d=n(701),f=n(4317),p=n(7235),h=n(3273),g=n(5341),m=n(1139),b=n(480),v=n(5780),y=n(8364),x=n(5116),w=n(7150),k=n(7313),C=n(4543),S=n(9989),_=n(7389),A=n(7161),E=n(3508),T=n(4358),j=n(8141),I=n(4275),O=n(5241),L=n(1268),P=n(8655),N=n(1355),M=n(4531),z=n(86),R=n(1811),$=n(8417),D=n(9809).forEach,F=I("hidden"),B="Symbol",H="prototype",U=$.set,V=$.getterFor(B),W=Object[H],G=o.Symbol,q=G&&G[H],K=o.RangeError,Y=o.TypeError,X=o.QObject,Q=C.f,Z=S.f,J=w.f,ee=A.f,te=a([].push),ne=j("symbols"),re=j("op-symbols"),oe=j("wks"),ie=!X||!X[H]||!X[H].findChild,ae=function(e,t,n){var r=Q(W,t);r&&delete W[t],Z(e,t,n),r&&e!==W&&Z(W,t,r)},se=l&&u(function(){return 7!==v(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a})?ae:Z,le=function(e,t){var n=ne[e]=v(q);return U(n,{type:B,tag:e,description:t}),l||(n.description=t),n},ce=function(e,t,n){e===W&&ce(re,t,n),p(e);var r=g(t);return p(n),d(ne,r)?(n.enumerable?(d(e,F)&&e[F][r]&&(e[F][r]=!1),n=v(n,{enumerable:b(0,!1)})):(d(e,F)||Z(e,F,b(1,v(null))),e[F][r]=!0),se(e,r,n)):Z(e,r,n)},ue=function(e,t){p(e);var n=h(t),r=y(n).concat(he(n));return D(r,function(t){l&&!i(de,n,t)||ce(e,t,n[t])}),e},de=function(e){var t=g(e),n=i(ee,this,t);return!(this===W&&d(ne,t)&&!d(re,t))&&(!(n||!d(this,t)||!d(ne,t)||d(this,F)&&this[F][t])||n)},fe=function(e,t){var n=h(e),r=g(t);if(n!==W||!d(ne,r)||d(re,r)){var o=Q(n,r);return!o||!d(ne,r)||d(n,F)&&n[F][r]||(o.enumerable=!0),o}},pe=function(e){var t=J(h(e)),n=[];return D(t,function(e){d(ne,e)||d(O,e)||te(n,e)}),n},he=function(e){var t=e===W,n=J(t?re:h(e)),r=[];return D(n,function(e){!d(ne,e)||t&&!d(W,e)||te(r,ne[e])}),r};c||(E(q=(G=function(){if(f(q,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=L(e),n=function(e){var r=void 0===this?o:this;r===W&&i(n,re,e),d(r,F)&&d(r[F],t)&&(r[F][t]=!1);var a=b(1,e);try{se(r,t,a)}catch(e){if(!(e instanceof K))throw e;ae(r,t,a)}};return l&&ie&&se(W,t,{configurable:!0,set:n}),le(t,e)})[H],"toString",function(){return V(this).tag}),E(G,"withoutSetter",function(e){return le(L(e),e)}),A.f=de,S.f=ce,_.f=ue,C.f=fe,x.f=w.f=pe,k.f=he,N.f=function(e){return le(P(e),e)},l&&(T(q,"description",{configurable:!0,get:function(){return V(this).description}}),s||E(W,"propertyIsEnumerable",de,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),D(y(oe),function(e){M(e)}),r({target:B,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(e,t){return void 0===t?v(e):ue(v(e),t)},defineProperty:ce,defineProperties:ue,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pe}),z(),R(G,B),O[F]=!0},9239:(e,t,n)=>{"use strict";n(9205),n(2002),n(960),n(1210),n(5785)},9245:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(7251),o=n(5352),i=n(1304),a=n(9990);const s=(0,r.zD)("feedback/sendToPat",async(e,t)=>{let{getState:n,dispatch:r,rejectWithValue:s}=t;const{connection:{token:l},environment:{PAT_HOST:c}}=n();try{const t=await r((0,i.et)(`${c}/chatbubble/${o.Ak}/feedback`,{method:"POST",body:{feedback:e},...(0,a.A)({token:l})}));if(!t.ok)throw new Error(`Feedback submission failed with status: ${t.status}`);return t.data.data.id}catch(e){return s(e.message)}})},9258:(e,t,n)=>{"use strict";var r=n(4713),o=n(2769),i=n(262),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},9270:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>L,Bu:()=>S,Zn:()=>T,aP:()=>k,j3:()=>P,pA:()=>M,qJ:()=>z,tM:()=>C,y2:()=>_,zh:()=>j});var r=n(786),o=n(4557),i=n(5352),a=n(4174),s=n(9990),l=n(893),c=n(8256),u=n(27),d=n(9492),f=n(8068),p=n(8317),h=n(339),g=n(6834),m=n(8833),b=n(1576),v=n(485),y=n(6122),x=n(8094);const w=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:i}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:i}},k=(e,t,n)=>(r,o)=>{a.A.getInstance().getConnection().restart(!0),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},C=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:a}=w(r),l=await n((0,h.z5)()),{headers:c}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:l}),u={message:e,temporaryId:t},f=await n((0,m.et)(`${o}/chatbubble/${i.Ak}/message/`,{method:"POST",body:u,headers:c},{onError:e=>{var r;n({type:x.pz,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));(0,d.A)(f)||n({type:x.pz,...f.data})},S=e=>t=>{t({type:x.QA,formData:e})},_=function(e,t,n){let{responsePromise:a,tempId:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return async(f,p)=>{const{PAT_HOST:b}=w(p);let{token:y,local:k,forms:C}=w(p);if(!y){const{shouldOpenChat:e}=u;e&&(f((0,g.mN)()),f((0,g.lQ)({source:"programmatic"}))),({token:y,local:k,forms:C}=w(p))}const _=await f((0,h.z5)()),{headers:A}=(0,s.A)({token:y},{withCurrentUrl:!0,extra:_});C&&Object.values(C).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.KN.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.KN.UNANSWERED};f((0,m.et)(`${b}/chatbubble/${i.Ak}/form/submit`,{method:"POST",body:t,headers:A})),f(S({...e,formSubmitState:o.KN.UNANSWERED}))}});const E=l||`tempId-${(0,r.A)()}`;f({type:x.tq,data:{id:E,created:(new Date).toISOString(),message:e,buttonType:c}}),f((0,m.TP)((new Date).toISOString()));const T={message:e,exchange_id:t,temporaryId:E,new_context:{...k.context,...n||{}}};(0,m.ez)();const j=a?await a:await f((0,m.et)(`${b}/chatbubble/${i.Ak}/message/`,{method:"POST",body:T,headers:A},{onError:e=>{var t,n;console.error(`/chatbubble/${i.Ak}/message returned ${null==e||null===(t=e.response)||void 0===t?void 0:t.status}`),f({type:x.pz,temporaryId:E,status:null==e||null===(n=e.response)||void 0===n?void 0:n.status}),f({type:v.wk})}}));(0,d.A)(j)||f({type:x.pz,...j.data})}},A=e=>({...e,temporaryId:`tempId-${(0,r.A)()}`}),E=e=>{let{temporaryId:t}=e;return t},T=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:a,attachments:l},connection:{token:p},environment:{PAT_HOST:g}}=t(),b=await e((0,h.z5)()),{headers:v}=(0,s.A)({token:p},{extra:b}),w=`tempId-${(0,r.A)()}`,k=l.files.map(A).map((0,u.A)("file"));e({type:x.Os,data:{attachments:k}}),e({type:y.Q4}),e({type:x.tq,data:{id:w,created:(new Date).toISOString(),attachment_ids:k.map(E),message:""}}),e((0,m.TP)((new Date).toISOString()));const C=(t,n)=>{var r;e({type:x.pz,temporaryId:w,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:x.wP,attachment:{...n,status:i.Le.ERROR}}):k.forEach(t=>e({type:x.wP,attachment:{...t,status:i.Le.ERROR}}))},S=k.map((0,u.A)("file","url")),_=`${g}/chatbubble/${i.Ak}/attachment/create`,T={attachments:S,temporaryChatMessageId:w},j=await e((0,m.et)(_,{method:"POST",body:T,headers:v},{onError:e=>C(e)}));if((0,d.A)(j)||!Array.isArray(null==j||null===(n=j.data)||void 0===n?void 0:n.attachments))return;const[I,O]=j.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:i,temporary_id:a,upload_url:s}=n;return e({type:x.wP,attachment:{temporaryId:a,id:i}}),[[...r,i],[...o,s]]},[[],[]]),L={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":a},P=(0,f.A)(l.files,O).map(async t=>{let[{file:n,...r},o]=t;const i=await(0,c.Bu)(n),a={...L,"Content-Type":n.type};return await e((0,m.et)(o,{method:"PUT",body:i,headers:a},{onError:e=>C(e,r)}))}),N=await Promise.all(P);if(N.some(e=>void 0===e))return;if(N.some(d.A))return;const M=`${g}/chatbubble/${i.Ak}/attachment/uploads-complete`,z={attachmentIds:I,temporaryChatMessageId:w,exchangeId:l.exchangeId};e((0,m.TP)((new Date).toISOString())),await e((0,m.et)(M,{method:"POST",body:z,headers:v},{onError:e=>C(e)}))},j=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(c,u)=>{const{connection:{token:f},chatbubble:{currentLanguage:p},local:{context:h}}=u(),{PAT_HOST:b}=u().environment;if(!f){const r={triggerDialogueSlug:e,languageCode:n};return await a.A.getInstance().getConnection().connect({triggerConfig:r}),void(t&&c((0,g.lQ)({source:"programmatic"})))}if(n&&n!==p){const e="Tried to trigger a dialogue in another language on an existing chat";c((0,m.Rm)({message:e,level:"error",extra:{languageCode:n,currentLanguage:p}}))}const v=o||(0,r.A)();c({type:x.IM,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),c((0,m.TP)((new Date).toISOString()));const y={exchange_id:e,temporaryId:v,new_context:{...h}},{headers:w}=(0,s.A)({token:f},{withCurrentUrl:!0});(0,m.ez)();const k=l?await l:await c((0,m.et)(`${b}/chatbubble/${i.Ak}/trigger/`,{method:"POST",body:y,headers:w}));k&&!(0,d.A)(k)&&t&&c((0,g.lQ)({source:"programmatic"}))}},I=(e,t)=>n=>{n({type:x.Y6,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},O=(e,t,n)=>async(r,o)=>{const{connection:{token:a},environment:{PAT_HOST:l,VERSION:c}}=o(),u=await r((0,h.z5)()),{headers:d}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:u}),f={method:"POST",body:{button:t,chatMessage:e,temporaryId:n,version:c},headers:d};return(0,m.ez)(),r((0,m.et)(`${l}/chatbubble/${i.Ak}/button/click/`,f))},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(a,s)=>{const{local:l}=s(),c=(0,b.A)(e.button_type),u=`tempId-${(0,r.A)()}`,d={};o.length>0&&o.forEach(e=>{var r,o,s;e.button_type===i.lP.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(d[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,a(I(t,e))):e.button_type===i.lP.CHECKBOX.toLowerCase()&&n.find(t=>t.id===e.id)?(d[e.value]=e.value,a(I(t,e)),a(O(t,e,u))):d[e.value]=""});const f=a(O(t,{...e,new_context:{...l.context,...d||{}}},u));switch(a({type:x.Y6,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),c){case i.lP.QUICK_REPLY:{const n={responsePromise:f,tempId:u};a(_(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case i.lP.HANDOVER_REQUEST:a((0,p.Du)(f));break;case i.lP.DIALOGUE_TRIGGER:a(j(e.value,{tempId:u,responsePromise:f}));break;case i.lP.PRIVACY_EXPORT:a((0,g.VK)({responsePromise:f}));break;case i.lP.PRIVACY_DELETE:a((0,g._e)({responsePromise:f}));break;case i.lP.CONTACT_DETAILS:a((0,g.V$)(e));break;case i.lP.UPLOAD_ATTACHMENT:a((0,g.jz)(e))}}},P=(e,t)=>async(n,o)=>{const{connection:{token:a},environment:{PAT_HOST:l,VERSION:c}}=o(),u=`tempId-${(0,r.A)()}`,f=e.contact_details.contact_type,p={...e,button_type:i.lP.edit_contact_details};n({type:x.tq,data:{id:u,created:(new Date).toISOString(),message:t,buttons:[p],isContactDetails:!0}});const g=await n((0,h.z5)()),{headers:b}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:g}),v={contactType:f,value:t,version:c,buttons:[p],temporaryId:u},y=await n((0,m.et)(`${l}/chatbubble/${i.Ak}/button/contact-details/`,{method:"POST",body:v,headers:b}));(0,d.A)(y)||n({type:x.pz,...y.data})},N=(0,l.A)(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:a},environment:{PAT_HOST:l,VERSION:c}}=n(),u=await t((0,h.z5)()),{headers:d}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:u}),f={chatMessageId:r,version:c};t({type:x.kU,id:r,index:o}),t((0,m.et)(`${l}/chatbubble/${i.Ak}/message-seen`,{method:"PATCH",body:f,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),M=(e,t)=>(n,r)=>N({id:e,index:t},n,r),z=e=>{let{url:t,messageId:n}=e;return async(e,r)=>{const{botKey:o}=r().chatbubble,{PAT_HOST:a}=r().environment,{token:l}=r().connection,c=await e((0,h.z5)());e((0,m.et)(`${a}/chatbubble/${i.Ak}/message/reference-click/${n}`,{method:"POST",body:{url:t},...(0,s.A)({botKey:o,token:l},{withCurrentUrl:!0,extra:c})}))}}},9338:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(9749),o=n.n(r),i=n(9155),a=n(541),s=n(1197),l=n(5880),c=n(1308),u=n(5352),d=n(3649),f=n(2362),p=n(1304),h=n(5134),g=n(8278),m=n(8418),b=n(5650),v=n(8395),y=n(1576);const x=s.Ay.div.withConfig({componentId:"sc-lsdvgt-0"})(["width:100%;position:relative;text-align:left;"]),w=(0,s.Ay)(c.Gr).withConfig({componentId:"sc-lsdvgt-1"})(["&& path{fill:none;}"]);var k=n(5758),C=n(2327),S=n(660),_=n(1085);const{EXTERNAL_LINK:A,EMAIL:E,PHONE:T,CHECKBOX:j,SLIDER:I,END_CHAT:O}=u.lP,L=e=>null!=e&&e.match(/^https?:\/\//i)?e:`http://${e}`;function P(e,t){t?window.open(e,t):window.location.href=e}function N(e){var t,n,r;let{button:N,setCheckboxValue:M,checked:z,chatMessage:R,disabled:$=!1,handlers:D,isNudge:F=!1,onClick:B,submitButtonsList:H}=e;const U=(0,h.jL)(),V=(0,y.A)(N.button_type),{chatMessages:W,buttonClicks:G}=(0,a.d4)(g.DZ)||[],q=(0,a.d4)(g.$P)||[],{buttonText:K}=(0,i.useContext)(s.Dx),Y=(0,h.CU)(),{feedbackToDisplay:X}=(0,d.A)(),Q=o()(t=[A,T,E]).call(t,V),Z=o()(n=[j]).call(n,V),J=o()(r=[I]).call(r,V),ee=Boolean((Array.isArray(z)?z:[]).find(e=>e.id===N.id)),te=N.open_in_new_tab||void 0===N.open_in_new_tab?"_blank":"_self",ne=V===O,re=(0,i.useRef)(H);let oe="";V===T&&(oe="tel:"),V===E&&(oe="mailto:");const ie=(0,i.useCallback)(e=>{e.preventDefault();const t=Y.getState(),{token:n}=t.connection,{PAT_HOST:r}=t.environment,{attachments:o}=t.messages,i=W.map(e=>(0,v.A)(e,o,r,n)),a=(0,v.A)(R,o,r,n);if((0,l.fz)({event:e,handlers:D,buttonType:V,button:(0,b.A)(N),lastMessage:a,chatLog:i,renderedBy:null==q?void 0:q.renderedBy}))return;"function"==typeof B&&B(),F||U((0,p.Bd)(N,R,z,re.current));const{href:s,target:c}=e.currentTarget;s&&(c&&"_self"!==c?P(s,c):setTimeout(()=>{P(s,c)},250))},[V,R,W,N,U,D,z,re,B,null==q?void 0:q.renderedBy,F,Y]),ae=(0,f.A)(ie,3e3),se=(null!=G?G:[]).find(e=>{let{chatMessageId:t,buttonId:n}=e;return t===(null==R?void 0:R.id)&&n===N.id}),le=(0,i.useCallback)(()=>{null==M||M(N)},[N,M]);return(0,i.useEffect)(()=>{se&&Z&&!ee&&(null==M||M(N))},[se,Z,N,M,ee]),J&&null!=N&&N.slider_details?(0,_.jsx)("div",{children:(0,_.jsx)(S.A,{name:`slider_${N.id}`,onChange:e=>{const t=parseFloat(e);var n;t&&Array.isArray(re.current)&&(null===(n=re.current)||void 0===n||n.map(e=>e.id===N.id?(e.slider_details.value=t,e):e))},from:N.slider_details.from_value,to:N.slider_details.to_value,value:N.slider_details.value,step:N.slider_details.step_value,affix:N.slider_details.affix,affixValue:N.slider_details.affix_value,ariaLabel:N.label})}):(0,_.jsxs)(k.A,{cy:"message-button",isCheckbox:Z,type:"button",...Q&&{href:`${oe}${V===A?L(N.value):N.value}`,target:`${V!==A||F?"_self":te}`},...Z&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":N.label,"aria-checked":ee?"true":"false"},icon:V===A&&F&&(0,_.jsx)(c.fl,{})||V===A&&!F&&(0,_.jsx)(w,{color:K,size:20}),disabled:$,onClick:e=>Z?le():Q?ie(e):(ne&&(X?(U((0,m.WG)({ratingSystem:X.rating_scale.rating_system,triggerType:X.trigger_type,formTitle:X.form_title,step:"RATING_SCALE"})),U((0,m.ZG)("button_click")),U((0,p.zn)("END_CHAT"))):U((0,p.wQ)("CANCEL_CHAT"))),ae(e)),children:[Z&&(0,_.jsx)(x,{children:(0,_.jsx)(C.A,{disabled:!0,"aria-disabled":!0,inputType:u.lP.CHECKBOX,name:`checkbox-${N.id}`,id:N.id,checked:ee,label:N.label})}),Z?"":N.label]})}},9344:(e,t,n)=>{"use strict";var r=n(9932),o=n(6100);e.exports=function(e){if("Function"===r(e))return o(e)}},9437:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(3678)})},9449:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,U:()=>i});var r=n(786);const o="kindly-chat-browser-id",i=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.A)();return localStorage.setItem(o,e),e}return e}},9466:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8089),o=n.n(r);const i=(e,t)=>o()({},e,t)},9492:(e,t,n)=>{"use strict";function r(e){const t=null==e?void 0:e.status;return Boolean(t&&!(t>=200&&t<=299))}n.d(t,{A:()=>r})},9504:()=>{},9514:e=>{"use strict";e.exports=t},9559:(e,t,n)=>{"use strict";var r=n(4904),o=n(8407);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9602:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(904);const o=new Set;function i(e){var t,n;const{feedbackSettings:i}=r.Z,a=null==i||null===(t=i[e])||void 0===t?void 0:t.forms.find(e=>"bot_conversation"===e.trigger_type&&e.is_active),s=null==i||null===(n=i[e])||void 0===n?void 0:n.forms.find(e=>"handover_conversation"===e.trigger_type&&e.is_active);return{botConversationFeedback:a,handoverConversationFeedback:s,preloadFeedbackImages:e=>{const t="bot_conversation"===e?a:s;t&&t.rating_scale.edit_labels.forEach(e=>{if(o.has(e.image))return;const t=new Image;t.src=e.image,o.add(t.src)})}}}},9619:(e,t,n)=>{"use strict";var r=n(8900),o=n(262),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},9665:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203),i=n(9619);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},9683:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9749:(e,t,n)=>{e.exports=n(1726)},9809:(e,t,n)=>{"use strict";var r=n(4572),o=n(6100),i=n(1395),a=n(2137),s=n(8130),l=n(4417),c=o([].push),u=function(e){var t=1===e,n=2===e,o=3===e,u=4===e,d=6===e,f=7===e,p=5===e||d;return function(h,g,m,b){for(var v,y,x=a(h),w=i(x),k=s(w),C=r(g,m),S=0,_=b||l,A=t?_(h,k):n||f?_(h,0):void 0;k>S;S++)if((p||S in w)&&(y=C(v=w[S],S,x),e))if(t)A[S]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return S;case 2:c(A,v)}else switch(e){case 4:return!1;case 7:c(A,v)}return d?-1:o||u?u:A}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},9828:(e,t,n)=>{"use strict";var r=n(3273),o=n(8137),i=n(6625),a=n(8417),s=n(9989).f,l=n(164),c=n(877),u=n(4871),d=n(5024),f="Array Iterator",p=a.set,h=a.getterFor(f);e.exports=l(Array,"Array",function(e,t){p(this,{type:f,target:r(e),index:0,kind:t})},function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(n,!1);case"values":return c(t[n],!1)}return c([n,t[n]],!1)},"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!u&&d&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(e){}},9850:(e,t,n)=>{"use strict";n(4531)("matchAll")},9903:(e,t,n)=>{"use strict";var r=n(5777);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},9907:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u<t;)s&&s[u].run();u=-1,t=l.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},9932:(e,t,n)=>{"use strict";var r=n(6100),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},9933:(e,t,n)=>{"use strict";n.d(t,{A:()=>g}),n(9155);var r=n(1308),o=n(6865),i=n(8256),a=n(1197),s=n(8663);const l=a.Ay.div.withConfig({componentId:"sc-11sa2m4-0"})(["display:flex;flex-direction:row;padding:8px 12px;gap:8px;margin-top:8px;border-radius:6px;border:",";"],e=>{let{theme:t}=e;return`1px solid ${(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")}`}),c=a.Ay.div.withConfig({componentId:"sc-11sa2m4-1"})(["display:flex;flex-direction:column;flex:1;"]),u=a.Ay.div.withConfig({componentId:"sc-11sa2m4-2"})(["font-size:var(--_kindlychat-font-size-p);color:var(--panel-background-white-black-contrast-1743170834);font-weight:450;word-break:break-all;"]),d=a.Ay.div.withConfig({componentId:"sc-11sa2m4-3"})(["font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),f=a.Ay.div.withConfig({componentId:"sc-11sa2m4-4"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:6px;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),p=a.Ay.div.withConfig({componentId:"sc-11sa2m4-5"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;font-size:calc(var(--_kindlychat-font-size-m) * 1.25);cursor:pointer;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")});var h=n(1085);const g=function(e){let{file:t,canRemove:n=!0,onRemove:a}=e;return(0,h.jsxs)(l,{children:[(0,h.jsx)(f,{children:(0,h.jsx)(o.A,{title:"attachment"})}),(0,h.jsxs)(c,{children:[(0,h.jsx)(u,{children:t.name}),(0,h.jsx)(d,{children:(0,i.B$)(t.size)})]}),n&&(0,h.jsx)(p,{onClick:a,children:(0,h.jsx)(r.US,{width:24,height:24})})]})}},9982:(e,t,n)=>{"use strict";function r(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((t,n)=>{var r;const o=e(n),i=null!==(r=t[o])&&void 0!==r?r:[];return i.push(n),t[o]=i,t},{})}n.d(t,{A:()=>r})},9989:(e,t,n)=>{"use strict";var r=n(5024),o=n(9665),i=n(1330),a=n(7235),s=n(5341),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",p="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},9990:(e,t,n)=>{"use strict";function r(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:i,extra:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{headers:{...t?{"kindly-chatbubble-token":t}:{},...n?{"kindly-bot-key":n}:{},...r?{Authorization:`Bearer ${r}`}:{},...o?{"Current-Url":window.location.href}:{},...i?{"kindly-chat-version":"2.81.8"}:{},...a}}}n.d(t,{A:()=>r})}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.amdO={},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{if(void 0!==a){var e=a.u,t=a.e,n={},r={};a.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},a.e=function(o){return t(o).catch(function(t){var i=r.hasOwnProperty(o)?r[o]:5;if(i<1){var s=e(o);throw t.message="Loading chunk "+o+" failed after 5 retries.\n("+s+")",t.request=s,t}return new Promise(function(e){var t=5-i+1;setTimeout(function(){var s="cache-bust=true&retry-attempt="+t;n[o]=s,r[o]=i-1,e(a.e(o))},e=>300*e)})})}}})(),a.nc=void 0;var s={};return(()=>{"use strict";a.r(s),a.d(s,{default:()=>r});var e=a(9155),t=a(1717),n=a(1085);const r=function(r){let{botKey:o,setKindlyChatRef:i,options:a}=r;return(0,n.jsx)(e.Suspense,{fallback:"",children:(0,n.jsx)(t.default,{botKey:o,setKindlyChatRef:i,options:a})})}})(),s})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","react-dom","pusher-js","prop-types"],t):"object"==typeof exports?exports.kindlyChat=t(require("react"),require("react-dom"),require("pusher-js"),require("prop-types")):e.kindlyChat=t(e.react,e["react-dom"],e["pusher-js"],e["prop-types"])}(globalThis,(e,t,n,r)=>(()=>{var o={15:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{color:t="#FFF",...n}=e;return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M15.25 10.75L12 14.25L8.75 10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}},27:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,n)=>{let[r,i]=n;return{...e,...o()(t).call(t,r)?{}:{[r]:i}}},{})}}},46:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var o,i,a,c;if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):h(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},85:(e,t,n)=>{"use strict";n(9828);var r=n(1100),o=n(8900),i=n(1811),a=n(6625);for(var s in r)i(o[s],s),a[s]=a.Array},86:(e,t,n)=>{"use strict";var r=n(4713),o=n(1003),i=n(8655),a=n(3508);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,function(e){return r(n,this)},{arity:1})}},164:(e,t,n)=>{"use strict";var r=n(9098),o=n(4713),i=n(4871),a=n(3410),s=n(2769),l=n(1926),c=n(3671),u=n(3491),d=n(1811),f=n(3999),p=n(3508),h=n(8655),g=n(6625),m=n(2621),b=a.PROPER,v=a.CONFIGURABLE,y=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,w=h("iterator"),k="keys",C="values",S="entries",_=function(){return this};e.exports=function(e,t,n,a,h,m,A){l(n,t,a);var E,T,j,I=function(e){if(e===h&&M)return M;if(!x&&e&&e in P)return P[e];switch(e){case k:case C:case S:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",L=!1,P=e.prototype,N=P[w]||P["@@iterator"]||h&&P[h],M=!x&&N||I(h),z="Array"===t&&P.entries||N;if(z&&(E=c(z.call(new e)))!==Object.prototype&&E.next&&(i||c(E)===y||(u?u(E,y):s(E[w])||p(E,w,_)),d(E,O,!0,!0),i&&(g[O]=_)),b&&h===C&&N&&N.name!==C&&(!i&&v?f(P,"name",C):(L=!0,M=function(){return o(N,this)})),h)if(T={values:I(C),keys:m?M:I(k),entries:I(S)},A)for(j in T)(x||L||!(j in P))&&p(P,j,T[j]);else r({target:t,proto:!0,forced:x||L},T);return i&&!A||P[w]===M||p(P,w,M,{name:h}),g[t]=M,T}},166:(e,t,n)=>{"use strict";function r(e){return e.touches||e.originalEvent.touches}n.d(t,{A:()=>i});let o=null;const i=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:e=>{const t=r(e)[0];o=t.clientX},handleTouchMove:e=>{if(!o)return;const a=r(e)[0].clientX;t(o-a>5?n+1:n-1,i),o=null},handleTouchEnd:()=>{o=null}}}},209:(e,t,n)=>{"use strict";function r(e,t){if(!e)return;const n=[t,"en"].find(t=>t&&e[t]);return n?e[n]:void 0}n.d(t,{A:()=>r})},262:(e,t,n)=>{"use strict";var r=n(2769);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},339:(e,t,n)=>{"use strict";n.d(t,{Mx:()=>m,z5:()=>b,gm:()=>g,JL:()=>h});var r=n(904),o=n(5352),i=n(7551),a=n.n(i);var s=n(9990);var l=n(8833),c=n(7152);const u=new class{constructor(){a()(this,"locked",!1),a()(this,"waiters",[])}async acquire(){if(this.locked)return new Promise(e=>{this.waiters.push(e)}).then(()=>{this.locked=!0});this.locked=!0}release(){if(this.waiters.length>0){const e=this.waiters.shift();e&&e()}else this.locked=!1}},d=e=>async(t,n)=>{try{return await u.acquire(),await e(t,n)}finally{u.release()}},f=async(e,t)=>{const{auth:{jwt:n},connection:{token:r},environment:{PAT_HOST:i}}=t();if(n){const{headers:t}=(0,s.A)({jwt:n,token:r},{withCurrentUrl:!0});try{await e((0,l.et)(`${i}/chatbubble/${o.Ak}/auth/chat/invalidate`,{method:"POST",headers:t}))}catch(e){console.error("Failed to invalidate auth token:",e)}}return e({type:c.zZ}),!0};let p=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return d(async(t,n)=>{var r,i;if(null===e)return!0;p=e;const a=n(),u=null===(r=a.connection)||void 0===r?void 0:r.token,d=null===(i=a.environment)||void 0===i?void 0:i.PAT_HOST;if(!u)return!1;const{headers:f}=(0,s.A)({token:u},{withCurrentUrl:!0});try{const{data:n,status:r}=await t((0,l.et)(`${d}/chatbubble/${o.Ak}/auth/identify`,{method:"POST",headers:f,body:e}));return r>=200&&r<400&&(t({type:c.qQ,...n}),p=null,!0)}catch(e){return console.error("Identity submission failed:",e),!1}})},g=e=>async(t,n)=>{p=e;const{connection:{token:r}}=n();r&&t(h(p))},m=()=>d(async(e,t)=>{var n,i,a;const u=t(),d=null===(n=u.chatbubble)||void 0===n?void 0:n.chatId,p=null===(i=u.connection)||void 0===i?void 0:i.token,h=null===(a=u.environment)||void 0===a?void 0:a.PAT_HOST,{getAuthToken:g}=r.Z;if(!d||!g)return await f(e,t),!1;let m;try{if(m=await g(d),!m)throw new Error("No JWT returned")}catch(n){return console.error("Chatbubble auth failed:",n),await f(e,t),!1}try{const{headers:t}=(0,s.A)({jwt:m,token:p},{withCurrentUrl:!0}),n=await e((0,l.et)(`${h}/chatbubble/${o.Ak}/auth/chat`,{method:"POST",headers:t}));return!(null==n||!n.data||(e({type:c.K_,jwt:m,avatarUrl:n.data.avatar_url,fullName:n.data.full_name}),0))}catch(n){return console.error("Server authentication failed:",n),await f(e,t),!1}}),b=()=>async(e,t)=>{var n,o,i;const a=t();if(null===(n=a.auth)||void 0===n||!n.isAuthenticated)return null;const s=null===(o=a.auth)||void 0===o?void 0:o.jwt,{getAuthToken:l}=r.Z;l&&function(e){const t=function(e){if(!e)return null;const t=e.match(/^[A-Za-z0-9-_=]+\.([A-Za-z0-9-_=]+)\.?[A-Za-z0-9-_.+/=]*$/);if(!t)return null;try{return JSON.parse(window.atob(t[1]))}catch(e){return null}}(e);return!t||t.exp-Math.floor((new Date).getTime()/1e3)<30}(s)&&await e(m());const c=t();return null!==(i=c.auth)&&void 0!==i&&i.isAuthenticated?{Authorization:`Bearer ${c.auth.jwt}`}:null}},340:(e,t,n)=>{"use strict";n.d(t,{A:()=>h}),n(9155);var r=n(5758),o=n(3649),i=n(1304),a=n(5134),s=n(8418),l=n(1197);const c=l.Ay.div.withConfig({componentId:"sc-embwe2-0"})(["font-weight:500;"]),u=l.Ay.div.withConfig({componentId:"sc-embwe2-1"})(["display:flex;flex-direction:column;justify-content:space-between;gap:24px;flex:1;"]),d=l.Ay.div.withConfig({componentId:"sc-embwe2-2"})(["display:flex;flex-direction:column;gap:8px;font-size:var(--_kindlychat-font-size-sm);line-height:20px;color:var(--panel-background-white-black-contrast-1743170834);"]),f=l.Ay.div.withConfig({componentId:"sc-embwe2-3"})(["display:grid;grid-template-columns:1fr 1fr;gap:8px;"]);var p=n(1085);const h=()=>{const{feedbackToSubmit:e}=(0,o.A)(),t=(0,a.jL)();return null!=e&&e.timeout?(0,p.jsxs)(u,{children:[(0,p.jsxs)(d,{children:[(0,p.jsx)(c,{children:e.timeout.title}),(0,p.jsx)("div",{children:e.timeout.message})]}),(0,p.jsxs)(f,{children:[(0,p.jsx)(r.A,{isSecondaryButton:!0,onClick:()=>{t((0,i.wQ)("FEEDBACK")),t((0,i.zn)(null)),t((0,s.ZG)("timeout"))},children:e.timeout.end_conversation_text}),(0,p.jsx)(r.A,{onClick:()=>{t((0,s.Dz)()),t((0,i.zn)(null))},children:e.timeout.continue_conversation_text})]})]}):null}},353:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{size:t=24,fill:n="#333333"}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M12 4.75L4.75 8C4.75 8 4 19.25 12 19.25C20 19.25 19.25 8 19.25 8L12 4.75Z",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.75 12.75L11 14.25L14.25 9.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},437:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>u,G8:()=>l,NR:()=>c});var r=n(9749),o=n.n(r),i=n(674),a=n(4557);const s={maximum:"max",minimum:"min"},l=e=>{const t={},n=e.map(e=>Object.entries(e).reduce((e,t)=>{let[n,r]=t;return e[s[n]||n]=r,e},{}));for(let e=0;e<n.length;e+=1){var r;const s=Object.keys(n[e]),l=null===(r=n[e].texts)||void 0===r?void 0:r.text;s.forEach(r=>{var s;o()(s=Object.values(a.ZF)).call(s,r)&&(t[(0,i.A)(r)]={value:n[e][r],...l&&{message:l}})})}return t},c=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;r&&"object"==typeof r&&"value"in r&&!("text"in r)&&(t[n]=r.value)}),t},u=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},459:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},480:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},485:(e,t,n)=>{"use strict";n.d(t,{A8:()=>r,E7:()=>i,wk:()=>o});const r="BOT_STARTED_TYPING",o="BOT_STOPPED_TYPING",i="MIMIR_STARTED_SEARCHING"},493:(e,t,n)=>{"use strict";var r=n(4713),o=n(262),i=n(6281),a=n(4674),s=n(9258),l=n(8655),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=a(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},541:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>J,Ng:()=>Z,Pj:()=>re,d4:()=>le,wA:()=>ie});var r=n(9155),o=n(5919),i=r.version.startsWith("19"),a=Symbol.for(i?"react.transitional.element":"react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=p,y=m;function x(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,u,d,f=!1;return function(p,h){return f?function(f,p){const h=!i(p,l),g=!o(f,s,p,l);return s=f,l=p,h&&g?(c=e(s,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):h?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):g?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}(p,h):(s=p,l=h,c=e(s,l),u=t(r,l),d=n(c,u,l),f=!0,d)}}function w(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function k(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function C(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=k(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=k(o),o=r(t,n)),o},r}}function S(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _(e,t,n){return{...n,...e,...t}}var A={notify(){},get:()=>[]};function E(e,t){let n,r=A,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=A)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var T=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),j=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),I=(()=>T||j?r.useLayoutEffect:r.useEffect)();function O(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function L(e,t){if(O(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!O(e[n[r]],t[n[r]]))return!1;return!0}var P={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},N={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z={[v]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[y]:M};function R(e){return function(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case a:switch(e=e.type){case l:case u:case c:case h:case g:return e;default:switch(e=e&&e.$$typeof){case f:case p:case b:case m:case d:return e;default:return t}}case s:return t}}}(e)===m?M:z[e.$$typeof]||P}var $=Object.defineProperty,D=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,U=Object.prototype;function V(e,t){if("string"!=typeof t){if(U){const n=H(t);n&&n!==U&&V(e,n)}let n=D(t);F&&(n=n.concat(F(t)));const r=R(e),o=R(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(N[a]||o&&o[a]||r&&r[a])){const n=B(t,a);try{$(e,a,n)}catch(e){}}}}return e}var W=Symbol.for("react-redux-context"),G="undefined"!=typeof globalThis?globalThis:{};function q(){if(!r.createContext)return{};const e=G[W]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),e.set(r.createContext,t)),t}var K=q(),Y=[null,null];function X(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Q(e,t){return e===t}var Z=function(e,t,n,{pure:o,areStatesEqual:i=Q,areOwnPropsEqual:a=L,areStatePropsEqual:s=L,areMergedPropsEqual:l=L,forwardRef:c=!1,context:u=K}={}){const d=u,f=function(e){return e?"function"==typeof e?C(e):S(e,"mapStateToProps"):w(()=>({}))}(e),p=function(e){return e&&"object"==typeof e?w(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?C(e):S(e,"mapDispatchToProps"):w(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,a){const s=e(t,n,a);return i?r(s,o)||(o=s):(i=!0,o=s),o}}}(e):S(e,"mergeProps"):()=>_}(n),g=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:g,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:h,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:l};function u(t){const[n,i,a]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),s=r.useMemo(()=>d,[n,d]),l=r.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(l)&&Boolean(l.store),f=c?t.store:l.store,p=u?l.getServerState:f.getState,h=r.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){return x(t(e,o),n(e,o),r(e,o),e,o)}(f.dispatch,o),[f]),[m,b]=r.useMemo(()=>{if(!g)return Y;const e=E(f,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[f,c,l]),v=r.useMemo(()=>c?l:{...l,subscription:m},[c,l,m]),y=r.useRef(void 0),w=r.useRef(a),k=r.useRef(void 0),C=r.useRef(!1),S=r.useRef(!1),_=r.useRef(void 0);I(()=>(S.current=!0,()=>{S.current=!1}),[]);const A=r.useMemo(()=>()=>k.current&&a===w.current?k.current:h(f.getState(),a),[f,a]),T=r.useMemo(()=>e=>m?function(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,f=null;const p=()=>{if(d||!s.current)return;const e=t.getState();let n,p;try{n=r(e,o.current)}catch(e){p=e,f=e}p||(f=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}(g,f,m,h,w,y,C,S,k,b,e):()=>{},[m]);var j,O;let L;j=X,O=[w,y,C,a,k,b],I(()=>j(...O),undefined);try{L=r.useSyncExternalStore(T,A,p?()=>h(p(),a):A)}catch(e){throw _.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${_.current.stack}\n\n`),e}I(()=>{_.current=void 0,k.current=void 0,y.current=L});const P=r.useMemo(()=>r.createElement(e,{...L,ref:i}),[i,e,L]);return r.useMemo(()=>g?r.createElement(s.Provider,{value:v},P):P,[s,P,v])}const m=r.memo(u);if(m.WrappedComponent=e,m.displayName=u.displayName=n,c){const t=r.forwardRef(function(e,t){return r.createElement(m,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,V(t,e)}return V(m,e)}},J=function(e){const{children:t,context:n,serverState:o,store:i}=e,a=r.useMemo(()=>{const e=E(i);return{store:i,subscription:e,getServerState:o?()=>o:void 0}},[i,o]),s=r.useMemo(()=>i.getState(),[i]);I(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=n||K;return r.createElement(l.Provider,{value:a},t)};function ee(e=K){return function(){return r.useContext(e)}}var te=ee();function ne(e=K){const t=e===K?te:ee(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var re=ne();function oe(e=K){const t=e===K?re:ne(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ie=oe(),ae=(e,t)=>e===t;function se(e=K){const t=e===K?te:ee(e),n=(e,n={})=>{const{equalityFn:i=ae}="function"==typeof n?{equalityFn:n}:n,a=t(),{store:s,subscription:l,getServerState:c}=a,u=(r.useRef(!0),r.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,o.useSyncExternalStoreWithSelector)(l.addNestedSub,s.getState,c||s.getState,u,i);return r.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var le=se()},660:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(9155),o=n(5352),i=n(1197),a=n(8663);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");return 3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`),t>1&&t<=100&&(t/=100),`rgba(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`};var l=n(7638);const c=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-0"})(["display:flex;flex-direction:column;position:relative;width:100%;"," background-color:",";"],e=>{let{$isForm:t}=e;return t?"padding: 12px 0 16px;":(0,i.AH)(["border-radius:6px;padding:12px 12px 16px 12px;box-shadow:0px 1px 5px 1px rgba(0,0,0,0.08);"])},e=>{let{theme:t}=e;return t.panelBackground}),u=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-1"})(["padding:0px 8px 0px 0px;font-size:var(--_kindlychat-font-size-p);"]),d=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:12px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,a.w5)(t.background,"#FFFFFF","#000000")}),f=i.Ay.span.withConfig({componentId:"sc-1mhxo2t-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-p);"]),p=i.Ay.div.withConfig({componentId:"sc-1mhxo2t-4"})(["position:relative;display:flex;flex:1;border:1px solid ",";border-radius:25px;"],e=>{let{theme:t}=e;return(0,a.w5)(t.panelBackground,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")}),h=(0,i.AH)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-6px;border:1px solid rgba(0,0,0,0.2);box-shadow:0 1px 4px 0 rgba(0,0,0,0.08);"],e=>{let{theme:t}=e;return t.buttonBackground}),g=(e,t,n)=>(e-n)/(t-n)*100,m=i.Ay.input.attrs(e=>{let{theme:t,value:n,max:r,min:o}=e;return{style:{background:`linear-gradient(to right, ${t.buttonBackground} 0%, ${t.buttonBackground} ${g(n,r,o)}%, ${s((0,a.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} ${g(n,r,o)}%, ${s((0,a.w5)(t.panelBackground,"#FFFFFF","#000000"),.08)} 100%)`}}}).withConfig({componentId:"sc-1mhxo2t-5"})(["cursor:pointer;"," &[type='range']{appearance:none;width:100%;border-radius:25px;height:8px;margin:0;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:8px;cursor:pointer;border-radius:25px;}}"],l.jq,h,h);var b=n(437),v=n(1085);const y=function(e){let{from:t,to:n,value:i=1,affix:a,affixValue:s,step:l=1,onChange:h,name:g,field:y,ariaLabel:x,validators:w=[],hasController:k}=e;const C=(0,b.G8)(w),S=(0,r.useMemo)(()=>{var e;const n=parseFloat(String(t));return Number.isNaN(n)?null===(e=C.min)||void 0===e?void 0:e.value:n},[t,C]),_=(0,r.useMemo)(()=>{var e;const t=parseFloat(String(n));return Number.isNaN(t)?null===(e=C.max)||void 0===e?void 0:e.value:t},[n,C]),[A,E]=(0,r.useState)(((e,t,n)=>t<e?e+n:t)(l,i,S));return(0,v.jsxs)(c,{$isForm:!!k,children:[(0,v.jsxs)(d,{$isForm:!!k,children:[a===o.rc.PREFIX&&(0,v.jsx)(u,{children:s}),(0,v.jsx)(f,{children:A}),a===o.rc.SUFFIX&&(0,v.jsx)(u,{children:s})]}),(0,v.jsx)(p,{children:(0,v.jsx)(m,{type:"range",name:g,step:l,min:S,max:_,value:A,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(h&&h(e.target.value),null!=y&&y.onChange&&y.onChange(e),E(e.target.value))},"aria-label":x})})]})}},674:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},701:(e,t,n)=>{"use strict";var r=n(6100),o=n(2137),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},748:(e,t,n)=>{var r=n(7354);e.exports=function(e,t,n){r(e,t),t.set(e,n)},e.exports.__esModule=!0,e.exports.default=e.exports},776:(e,t,n)=>{"use strict";n.d(t,{Y_:()=>g,kS:()=>b,fe:()=>m,mR:()=>v,vJ:()=>p,NS:()=>h});var r=n(904),o=n(9990);const i=(e,t)=>{const{type:n}=e;let r;return"Form"===n?r=(e=>{let{title:t,body_text:n,input_label:r,input_placeholder:o,languageCode:i}=e;return{sections:[{title:t[i],description:n[i]},{form:{input:{label:r[i],placeholder:o[i],required:!0},button:{title:"Send skjema",icon:"icon",type:"submit"}}}]}})({...e,languageCode:t}):"Product"===n?r=(e=>{var t;let{title:n,body_text:r,button_text:o,button_link:i,carousel_title:a,image_carousel:s,languageCode:l}=e;return{sections:[{title:n[l],description:r[l],buttons:[{label:o[l],value:i[l],button_type:"link",is_active:!0}]},{products:{title:a[l],items:null===(t=s[l])||void 0===t?void 0:t.map(e=>{let{title:t,alt_text:n,description:r,image_url:o,product_url:i,link_text:a,link_url:s,price:l}=e;return{title:t,image:o,linkText:a,linkUrl:s,productUrl:i,altText:n,description:r,price:l}})}}]}})({...e,languageCode:t}):"Text"===n?r=(e=>{let{title:t,body_text:n,link_text:r,link_location:o,languageCode:i}=e;return{sections:[{title:t[i],description:n[i]},{link:{text:r[i],location:o[i]}}]}})({...e,languageCode:t}):"Multiple choice"===n?r=(e=>{let{title:t,body_text:n,button_blocks:r,languageCode:o}=e;return{sections:[{title:t[o],description:n[o]},{choices:{buttons:r.map(e=>{let{button_text:t,dialogue_id:n}=e;return{text:t[o],triggerDialogue:n}})}}]}})({...e,languageCode:t}):"Custom"===n&&(r={}),r};var a=n(339),s=n(8833),l=n(5352),c=n(9449),u=n(7559),d=n(3178);const f=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=t.find(e=>{let{is_primary:t}=e;return t}),o=n||r.code;return e.enabled[o]},p=e=>{let{slug:t,eventType:n,label:i}=e;return async(e,d)=>{if(!t||!n)return;const{supportedLanguages:p}=r.Z,{nudges:h}=d().bot,{currentLanguage:g}=d().chatbubble,m=(e=>{var t,n,r,o,i;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]})(h),b=m.find(e=>e.slug===t&&f(e,p,g));b&&(e({type:u.wX,slug:t}),n!==u.MO&&n!==u.oE||await e((e=>{let{targetNudge:t,eventType:n,label:r,currentLanguage:i}=e;return async(e,u)=>{const{botKey:d}=u().chatbubble,{PAT_HOST:f}=u().environment,{token:p}=u().connection,h=await e((0,a.z5)());e((0,s.et)(`${f}/chatbubble/${l.Ak}/nudge/`,{method:"POST",body:{session_id:(0,c.U)(),nudge_id:t.id,action:n,type:t.type,label:r||null,language_code:i},...(0,o.A)({botKey:d,token:p},{withCurrentUrl:!0,extra:h})}))}})({targetNudge:b,eventType:n,label:i,currentLanguage:g})))}},h=e=>(t,n)=>{const{show:r,slug:o}=n().nudge;r&&t(p({slug:o,eventType:u.MO,label:e}))},g=(e,t)=>(n,r)=>{const{show:o,isCustom:i,slug:a,trackEvent:s}=r().nudge;if(o){if(n({type:u.X2}),i){var l;const e=document.getElementById("kindly-custom-nudge");e&&(null===(l=e.parentNode)||void 0===l||l.removeChild(e))}s&&n(p({slug:a,eventType:e?u.MO:u.X2,label:t}))}},m=e=>{let{nudgeLayout:t,slug:n,trackEvent:o}=e;return(e,a)=>{var s,c,h,g,m,b,v;const{supportedLanguages:y}=r.Z,{nudges:x}=a().bot,{currentLanguage:w}=a().chatbubble,{show:k}=a().pushMessages,C=null==t?void 0:t.language;let S,_=null!==(s=null==t?void 0:t.webhook)&&void 0!==s?s:null,A=null!==(c=null==t?void 0:t.dialogueId)&&void 0!==c?c:null,E=t;const T=y.find(e=>{let{is_primary:t}=e;return t}),j=[...null!==(h=null==x?void 0:x.form_nudges)&&void 0!==h?h:[],...null!==(g=null==x?void 0:x.custom_nudges)&&void 0!==g?g:[],...null!==(m=null==x?void 0:x.product_nudges)&&void 0!==m?m:[],...null!==(b=null==x?void 0:x.text_nudges)&&void 0!==b?b:[],...null!==(v=null==x?void 0:x.multiple_choice_nudges)&&void 0!==v?v:[]],I=C||w||(null==T?void 0:T.code),O=n||t.slug;if(O){var L,P,N,M,z,R,$;if(S=j.filter(e=>e.slug===O)[0],void 0===S)return;if(A=null!==(L=null===(P=S)||void 0===P?void 0:P.dialogue_id)&&void 0!==L?L:A,_=null!==(N=null===(M=S)||void 0===M?void 0:M.webhook)&&void 0!==N?N:_,E=i(S,I),E.sections=[...null!==(z=null===(R=E)||void 0===R?void 0:R.sections)&&void 0!==z?z:[],...null!==($=null==t?void 0:t.sections)&&void 0!==$?$:[]],E.backdrop=null==t?void 0:t.backdrop,!f(S,y,I))return void console.warn("Nudge is disabled for the current language:",I)}else console.error("Please set up a nudge in the platform to get a slug!");o&&e(p({slug:O,eventType:u.wv})),k&&e({type:d.a_}),e({slug:O,type:u.wv,nudgeLayout:E,dialogue:A,webhook:_,nudgeType:l.MK.TEMPLATE,trackEvent:o})}},b=e=>{let{content:t,slug:n,onRendered:r,trackEvent:o}=e;return(e,i)=>{const{show:a}=i().pushMessages;o&&e(p({slug:n,eventType:u.un})),a&&e({type:d.a_}),e({type:u.un,content:t,slug:n,onRendered:r,nudgeType:l.MK.CUSTOM})}},v=e=>{let{nudge:t,languageCode:n}=e;return e=>{const{autopopup_time:r}=t,o=i(t,n);r<=0||(r&&0!==r?setTimeout(()=>e({type:u.wv,nudgeLayout:o,slug:t.slug}),r):e({type:u.wv,nudgeLayout:o,slug:t.slug}))}}},786:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function s(e,t,n){const r=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(i)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(r)}const l=function(e,t,n){return!r.randomUUID||t||e?s(e,t,n):r.randomUUID()}},814:(e,t,n)=>{"use strict";var r=n(2769),o=n(459),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},824:(e,t,n)=>{"use strict";n.d(t,{FH:()=>M,lN:()=>I,mN:()=>Ae,xI:()=>z});var r=n(9155),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,a=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!a(e)&&!Array.isArray(e)&&s(e)&&!i(e),c=e=>l(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(f&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||l(e)&&d(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=p(e[t]));return r}var h=e=>/^\w*$/.test(e),g=e=>void 0===e,m=e=>Array.isArray(e)?e.filter(Boolean):[],b=e=>m(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,n)=>{if(!t||!l(e))return n;const r=(h(t)?[t]:b(t)).reduce((e,t)=>a(e)?e:e[t],e);return g(r)||r===e?g(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e,x=e=>"function"==typeof e,w=(e,t,n)=>{let r=-1;const o=h(t)?[t]:b(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=l(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};const k={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},C={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},S="pattern",_="required",A=r.createContext(null);A.displayName="HookFormControlContext";const E=()=>r.useContext(A);var T=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==C.all&&(t._proxyFormState[o]=!r||C.all),n&&(n[o]=!0),e[o]}});return o};const j="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function I(e){const t=E(),{control:n=t,disabled:o,name:i,exact:a}=e||{},[s,l]=r.useState(n._formState),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return j(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!o&&l({...n._formState,...e})}}),[i,o,a]),r.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>T(s,n,c.current,!1),[s,n])}var O=e=>"string"==typeof e,L=(e,t,n,r,o)=>O(e)?(r&&t.watch.add(e),v(n,e,o)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),v(n,e))):(r&&(t.watchAll=!0),n),P=e=>a(e)||!s(e);function N(e,t,n=new WeakSet){if(P(e)||P(t))return Object.is(e,t);if(i(e)&&i(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const a of r){const r=e[a];if(!o.includes(a))return!1;if("ref"!==a){const e=t[a];if(i(r)&&i(e)||l(r)&&l(e)||Array.isArray(r)&&Array.isArray(e)?!N(r,e,n):!Object.is(r,e))return!1}}return!0}function M(e){const t=E(),{control:n=t,name:o,defaultValue:i,disabled:a,exact:s,compute:l}=e||{},c=r.useRef(i),u=r.useRef(l),d=r.useRef(void 0),f=r.useRef(n),p=r.useRef(o);u.current=l;const[h,g]=r.useState(()=>{const e=n._getWatch(o,c.current);return u.current?u.current(e):e}),m=r.useCallback(e=>{const t=L(o,n._names,e||n._formValues,!1,c.current);return u.current?u.current(t):t},[n._formValues,n._names,o]),b=r.useCallback(e=>{if(!a){const t=L(o,n._names,e||n._formValues,!1,c.current);if(u.current){const e=u.current(t);N(e,d.current)||(g(e),d.current=e)}else g(t)}},[n._formValues,n._names,a,o]);j(()=>(f.current===n&&N(p.current,o)||(f.current=n,p.current=o,b()),n._subscribe({name:o,formState:{values:!0},exact:s,callback:e=>{b(e.values)}})),[n,s,o,b]),r.useEffect(()=>n._removeUnmounted());const v=f.current!==n,y=p.current,x=r.useMemo(()=>{if(a)return null;const e=!v&&!N(y,o);return v||e?m():null},[a,v,o,y,m]);return null!==x?x:h}const z=e=>e.render(function(e){const t=E(),{name:n,disabled:o,control:i=t,shouldUnregister:a,defaultValue:s,exact:l=!0}=e,d=u(i._names.array,n),f=r.useMemo(()=>v(i._formValues,n,v(i._defaultValues,n,s)),[i,n,s]),h=M({control:i,name:n,defaultValue:f,exact:l}),m=I({control:i,name:n,exact:l}),b=r.useRef(e),C=r.useRef(void 0),S=r.useRef(i.register(n,{...e.rules,value:h,...y(e.disabled)?{disabled:e.disabled}:{}}));b.current=e;const _=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(m.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(m.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(m.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(m.validatingFields,n)},error:{enumerable:!0,get:()=>v(m.errors,n)}}),[m,n]),A=r.useCallback(e=>S.current.onChange({target:{value:c(e),name:n},type:k.CHANGE}),[n]),T=r.useCallback(()=>S.current.onBlur({target:{value:v(i._formValues,n),name:n},type:k.BLUR}),[n,i._formValues]),j=r.useCallback(e=>{const t=v(i._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>x(e.focus)&&e.focus(),select:()=>x(e.select)&&e.select(),setCustomValidity:t=>x(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>x(e.reportValidity)&&e.reportValidity()})},[i._fields,n]),O=r.useMemo(()=>({name:n,value:h,...y(o)||m.disabled?{disabled:m.disabled||o}:{},onChange:A,onBlur:T,ref:j}),[n,o,m.disabled,A,T,j,h]);return r.useEffect(()=>{const e=i._options.shouldUnregister||a,t=C.current;t&&t!==n&&!d&&i.unregister(t),i.register(n,{...b.current.rules,...y(b.current.disabled)?{disabled:b.current.disabled}:{}});const r=(e,t)=>{const n=v(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=p(v(i._options.defaultValues,n,b.current.defaultValue));w(i._defaultValues,n,e),g(v(i._formValues,n))&&w(i._formValues,n,e)}return!d&&i.register(n),C.current=n,()=>{(d?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,d,a]),r.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),r.useMemo(()=>({field:O,formState:m,fieldState:_}),[O,m,_])}(e));r.createContext(null).displayName="HookFormContext";var R=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},$=e=>Array.isArray(e)?e:[e],D=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function F(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&l(o)&&i){const e=F(o,i);l(e)&&(n[r]=e)}else e[r]&&(n[r]=i)}return n}var B=e=>l(e)&&!Object.keys(e).length,H=e=>"file"===e.type,U=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},V=e=>"select-multiple"===e.type,W=e=>"radio"===e.type,G=e=>W(e)||o(e),q=e=>U(e)&&e.isConnected;function K(e,t){const n=Array.isArray(t)?t:h(t)?[t]:b(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=g(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,i=n[o];return r&&delete r[i],0!==o&&(l(r)&&B(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!g(e[t]))return!1;return!0}(r))&&K(e,n.slice(0,-1)),e}var Y=e=>{for(const t in e)if(x(e[t]))return!0;return!1};function X(e){return Array.isArray(e)||l(e)&&!Y(e)}function Q(e,t={}){for(const n in e){const r=e[n];X(r)?(t[n]=Array.isArray(r)?[]:{},Q(r,t[n])):g(r)||(t[n]=!0)}return t}function Z(e,t,n){n||(n=Q(t));for(const r in e){const o=e[r];if(X(o))g(t)||P(n[r])?n[r]=Q(o,Array.isArray(o)?[]:{}):Z(o,a(t)?{}:t[r],n[r]);else{const e=t[r];n[r]=!N(o,e)}}return n}const J={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!g(e[0].attributes.value)?g(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:J}return J},ne=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>g(e)?e:t?""===e?NaN:e?+e:e:n&&O(e)?new Date(e):r?r(e):e;const re={isValid:!1,value:null};var oe=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,re):re;function ie(e){const t=e.ref;return H(t)?t.files:W(t)?oe(e.refs).value:V(t)?[...t.selectedOptions].map(({value:e})=>e):o(t)?te(e.refs).value:ne(g(t.value)?e.ref.value:t.value,e)}var ae=(e,t,n,r)=>{const o={};for(const n of e){const e=v(t,n);e&&w(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},se=e=>e instanceof RegExp,le=e=>g(e)?e:se(e)?e.source:l(e)?se(e.value)?e.value.source:e.value:e,ce=e=>({isOnSubmit:!e||e===C.onSubmit,isOnBlur:e===C.onBlur,isOnChange:e===C.onChange,isOnAll:e===C.all,isOnTouch:e===C.onTouched});const ue="AsyncFunction";var de=e=>!!e&&!!e.validate&&!!(x(e.validate)&&e.validate.constructor.name===ue||l(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ue)),fe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pe=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const he=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=v(e,o);if(n){const{_f:e,...i}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(he(i,t))break}else if(l(i)&&he(i,t))break}}};function ge(e,t,n){const r=v(e,n);if(r||h(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=v(t,r),a=v(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};if(a&&a.root&&a.root.type)return{name:`${r}.root`,error:a.root};o.pop()}return{name:n}}var me=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return B(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||C.all))},be=(e,t,n)=>!e||!t||e===t||$(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),ve=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),ye=(e,t)=>!m(v(e,t)).length&&K(e,t),xe=(e,t,n)=>{const r=$(v(e,n));return w(r,"root",t[n]),w(e,n,r),e};function we(e,t,n="validate"){if(O(e)||Array.isArray(e)&&e.every(O)||y(e)&&!e)return{type:n,message:O(e)?e:"",ref:t}}var ke=e=>l(e)&&!se(e)?e:{value:e,message:""},Ce=async(e,t,n,r,i,s)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:p,min:h,max:m,pattern:b,validate:w,name:k,valueAsNumber:C,mount:A}=e._f,E=v(n,k);if(!A||t.has(k))return{};const T=u?u[0]:c,j=e=>{i&&T.reportValidity&&(T.setCustomValidity(y(e)?"":e||""),T.reportValidity())},I={},L=W(c),P=o(c),N=L||P,M=(C||H(c))&&g(c.value)&&g(E)||U(c)&&""===c.value||""===E||Array.isArray(E)&&!E.length,z=R.bind(null,k,r,I),$=(e,t,n,r="maxLength",o="minLength")=>{const i=e?t:n;I[k]={type:e?r:o,message:i,ref:c,...z(e?r:o,i)}};if(s?!Array.isArray(E)||!E.length:d&&(!N&&(M||a(E))||y(E)&&!E||P&&!te(u).isValid||L&&!oe(u).isValid)){const{value:e,message:t}=O(d)?{value:!!d,message:d}:ke(d);if(e&&(I[k]={type:_,message:t,ref:T,...z(_,t)},!r))return j(t),I}if(!(M||a(h)&&a(m))){let e,t;const n=ke(m),o=ke(h);if(a(E)||isNaN(E)){const r=c.valueAsDate||new Date(E),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==c.type,s="week"==c.type;O(n.value)&&E&&(e=a?i(E)>i(n.value):s?E>n.value:r>new Date(n.value)),O(o.value)&&E&&(t=a?i(E)<i(o.value):s?E<o.value:r<new Date(o.value))}else{const r=c.valueAsNumber||(E?+E:E);a(n.value)||(e=r>n.value),a(o.value)||(t=r<o.value)}if((e||t)&&($(!!e,n.message,o.message,"max","min"),!r))return j(I[k].message),I}if((f||p)&&!M&&(O(E)||s&&Array.isArray(E))){const e=ke(f),t=ke(p),n=!a(e.value)&&E.length>+e.value,o=!a(t.value)&&E.length<+t.value;if((n||o)&&($(n,e.message,t.message),!r))return j(I[k].message),I}if(b&&!M&&O(E)){const{value:e,message:t}=ke(b);if(se(e)&&!E.match(e)&&(I[k]={type:S,message:t,ref:c,...z(S,t)},!r))return j(t),I}if(w)if(x(w)){const e=we(await w(E,n),T);if(e&&(I[k]={...e,...z("validate",e.message)},!r))return j(e.message),I}else if(l(w)){let e={};for(const t in w){if(!B(e)&&!r)break;const o=we(await w[t](E,n),T,t);o&&(e={...o,...z(t,o.message)},j(o.message),r&&(I[k]=e))}if(!B(e)&&(I[k]={ref:T,...e},!r))return I}return j(!0),I};const Se={mode:C.onSubmit,reValidateMode:C.onChange,shouldFocusError:!0};function _e(e={}){let t,n={...Se,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:x(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},s={},d=(l(n.defaultValues)||l(n.values))&&p(n.defaultValues||n.values)||{},h=n.shouldUnregister?{}:p(d),b={action:!1,mount:!1,watch:!1,keepIsValid:!1},S={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={...A};let T={...E};const j={array:D(),state:D()},I=n.criteriaMode===C.all,P=async e=>{if(!b.keepIsValid&&!n.disabled&&(E.isValid||T.isValid||e)){let e;n.resolver?(e=B((await W()).errors),M()):e=await Y(s,!0),e!==r.isValid&&j.state.next({isValid:e})}},M=(e,t)=>{!n.disabled&&(E.isValidating||E.validatingFields||T.isValidating||T.validatingFields)&&((e||Array.from(S.mount)).forEach(e=>{e&&(t?w(r.validatingFields,e,t):K(r.validatingFields,e))}),j.state.next({validatingFields:r.validatingFields,isValidating:!B(r.validatingFields)}))},z=(e,t,n,r)=>{const o=v(s,e);if(o){const i=v(h,e,g(n)?v(d,e):n);g(i)||r&&r.defaultChecked||t?w(h,e,t?i:ie(o._f)):J(e,i),b.mount&&!b.action&&P()}},R=(e,t,o,i,a)=>{let s=!1,l=!1;const c={name:e};if(!n.disabled){if(!o||i){(E.isDirty||T.isDirty)&&(l=r.isDirty,r.isDirty=c.isDirty=X(),s=l!==c.isDirty);const n=N(v(d,e),t);l=!!v(r.dirtyFields,e),n?K(r.dirtyFields,e):w(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,s=s||(E.dirtyFields||T.dirtyFields)&&l!==!n}if(o){const t=v(r.touchedFields,e);t||(w(r.touchedFields,e,o),c.touchedFields=r.touchedFields,s=s||(E.touchedFields||T.touchedFields)&&t!==o)}s&&a&&j.state.next(c)}return s?c:{}},W=async e=>(M(e,!0),await n.resolver(h,n.context,ae(e||S.mount,s,n.criteriaMode,n.shouldUseNativeValidation))),Y=async(t,o,i={valid:!0})=>{for(const a in t){const s=t[a];if(s){const{_f:t,...a}=s;if(t){const a=S.array.has(t.name),l=s._f&&de(s._f);l&&E.validatingFields&&M([t.name],!0);const c=await Ce(s,S.disabled,h,I,n.shouldUseNativeValidation&&!o,a);if(l&&E.validatingFields&&M([t.name]),c[t.name]&&(i.valid=!1,o||e.shouldUseNativeValidation))break;!o&&(v(c,t.name)?a?xe(r.errors,c,t.name):w(r.errors,t.name,c[t.name]):K(r.errors,t.name))}!B(a)&&await Y(a,o,i)}}return i.valid},X=(e,t)=>!n.disabled&&(e&&t&&w(h,e,t),!N(ue(),d)),Q=(e,t,n)=>L(e,S,{...b.mount?h:g(t)?d:O(e)?{[e]:t}:t},n,t),J=(e,t,n={})=>{const r=v(s,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&w(h,e,ne(t,n)),i=U(n.ref)&&a(t)?"":t,V(n.ref)?[...n.ref.options].forEach(e=>e.selected=i.includes(e.value)):n.refs?o(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(i)?e.checked=!!i.find(t=>t===e.value):e.checked=i===e.value||!!i)}):n.refs.forEach(e=>e.checked=e.value===i):H(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||j.state.next({name:e,values:p(h)})))}(n.shouldDirty||n.shouldTouch)&&R(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&se(e)},ee=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const o=t[r],a=e+"."+r,c=v(s,a);(S.array.has(e)||l(o)||c&&!c._f)&&!i(o)?ee(a,o,n):J(a,o,n)}},te=(e,t,n={})=>{const o=v(s,e),i=S.array.has(e),l=p(t);w(h,e,l),i?(j.array.next({name:e,values:p(h)}),(E.isDirty||E.dirtyFields||T.isDirty||T.dirtyFields)&&n.shouldDirty&&j.state.next({name:e,dirtyFields:Z(d,h),isDirty:X(e,l)})):!o||o._f||a(l)?J(e,l,n):ee(e,l,n),pe(e,S)?j.state.next({...r,name:e,values:p(h)}):j.state.next({name:b.mount?e:void 0,values:p(h)})},re=async e=>{b.mount=!0;const o=e.target;let a=o.name,l=!0;const u=v(s,a),d=e=>{l=Number.isNaN(e)||i(e)&&isNaN(e.getTime())||N(e,v(h,a,e))},f=ce(n.mode),g=ce(n.reValidateMode);if(u){let i,m;const b=o.type?ie(u._f):c(e),x=e.type===k.BLUR||e.type===k.FOCUS_OUT,C=!fe(u._f)&&!n.resolver&&!v(r.errors,a)&&!u._f.deps||ve(x,v(r.touchedFields,a),r.isSubmitted,g,f),A=pe(a,S,x);w(h,a,b),x?o&&o.readOnly||(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const O=R(a,b,x),L=!B(O)||A;if(!x&&j.state.next({name:a,type:e.type,values:p(h)}),C)return(E.isValid||T.isValid)&&("onBlur"===n.mode?x&&P():x||P()),L&&j.state.next({name:a,...A?{}:O});if(!x&&A&&j.state.next({...r}),n.resolver){const{errors:e}=await W([a]);if(M([a]),d(b),l){const t=ge(r.errors,s,a),n=ge(e,s,t.name||a);i=n.error,a=n.name,m=B(e)}}else M([a],!0),i=(await Ce(u,S.disabled,h,I,n.shouldUseNativeValidation))[a],M([a]),d(b),l&&(i?m=!1:(E.isValid||T.isValid)&&(m=await Y(s,!0)));l&&(u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&se(u._f.deps),((e,o,i,a)=>{const s=v(r.errors,e),l=(E.isValid||T.isValid)&&y(o)&&r.isValid!==o;var c;if(n.delayError&&i?(c=()=>((e,t)=>{w(r.errors,e,t),j.state.next({errors:r.errors})})(e,i),t=e=>{clearTimeout(_),_=setTimeout(c,e)},t(n.delayError)):(clearTimeout(_),t=null,i?w(r.errors,e,i):K(r.errors,e)),(i?!N(s,i):s)||!B(a)||l){const t={...a,...l&&y(o)?{isValid:o}:{},errors:r.errors,name:e};r={...r,...t},j.state.next(t)}})(a,m,i,O))}},oe=(e,t)=>{if(v(r.errors,t)&&e.focus)return e.focus(),1},se=async(e,t={})=>{let o,i;const a=$(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await W(e);if(M(e),e)for(const n of e){const e=v(t,n);e?w(r.errors,n,e):K(r.errors,n)}else r.errors=t;return t})(g(e)?e:a);o=B(t),i=e?!a.some(e=>v(t,e)):o}else e?(i=(await Promise.all(a.map(async e=>{const t=v(s,e);return await Y(t&&t._f?{[e]:t}:t)}))).every(Boolean),(i||r.isValid)&&P()):i=o=await Y(s);return j.state.next({...!O(e)||(E.isValid||T.isValid)&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!i&&he(s,oe,e?a:S.mount),i},ue=(e,t)=>{let n={...b.mount?h:d};return t&&(n=F(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),g(e)?n:O(e)?v(n,e):e.map(e=>v(n,e))},we=(e,t)=>({invalid:!!v((t||r).errors,e),isDirty:!!v((t||r).dirtyFields,e),error:v((t||r).errors,e),isValidating:!!v(r.validatingFields,e),isTouched:!!v((t||r).touchedFields,e)}),ke=(e,t,n)=>{const o=(v(s,e,{_f:{}})._f||{}).ref,i=v(r.errors,e)||{},{ref:a,message:l,type:c,...u}=i;w(r.errors,e,{...u,...t,ref:o}),j.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},_e=e=>j.state.subscribe({next:t=>{be(e.name,t.name,e.exact)&&me(t,e.formState||E,Pe,e.reRenderRoot)&&e.callback({values:{...h},...r,...t,defaultValues:d})}}).unsubscribe,Ae=(e,t={})=>{for(const o of e?$(e):S.mount)S.mount.delete(o),S.array.delete(o),t.keepValue||(K(s,o),K(h,o)),!t.keepError&&K(r.errors,o),!t.keepDirty&&K(r.dirtyFields,o),!t.keepTouched&&K(r.touchedFields,o),!t.keepIsValidating&&K(r.validatingFields,o),!n.shouldUnregister&&!t.keepDefaultValue&&K(d,o);j.state.next({values:p(h)}),j.state.next({...r,...t.keepDirty?{isDirty:X()}:{}}),!t.keepIsValid&&P()},Ee=({disabled:e,name:t})=>{if(y(e)&&b.mount||e||S.disabled.has(t)){const n=S.disabled.has(t)!==!!e;e?S.disabled.add(t):S.disabled.delete(t),n&&b.mount&&!b.action&&P()}},Te=(e,t={})=>{let r=v(s,e);const o=y(t.disabled)||y(n.disabled);return w(s,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),S.mount.add(e),r?Ee({disabled:y(t.disabled)?t.disabled:n.disabled,name:e}):z(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:le(t.min),max:le(t.max),minLength:le(t.minLength),maxLength:le(t.maxLength),pattern:le(t.pattern)}:{},name:e,onChange:re,onBlur:re,ref:o=>{if(o){Te(e,t),r=v(s,e);const n=g(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,i=G(n),a=r._f.refs||[];if(i?a.find(e=>e===n):n===r._f.ref)return;w(s,e,{_f:{...r._f,...i?{refs:[...a.filter(q),n,...Array.isArray(v(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),z(e,!1,void 0,n)}else r=v(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(S.array,e)||!b.action)&&S.unMount.add(e)}}},je=()=>n.shouldFocusError&&he(s,oe,S.mount),Ie=(e,t)=>async o=>{let i;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=p(h);if(j.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await W();M(),r.errors=e,a=p(t)}else await Y(s);if(S.disabled.size)for(const e of S.disabled)K(a,e);if(K(r.errors,"root"),B(r.errors)){j.state.next({errors:{}});try{await e(a,o)}catch(e){i=e}}else t&&await t({...r.errors},o),je(),setTimeout(je);if(j.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(r.errors)&&!i,submitCount:r.submitCount+1,errors:r.errors}),i)throw i},Oe=(e,t={})=>{const o=e?p(e):d,i=p(o),a=B(e),l=a?d:i;if(t.keepDefaultValues||(d=o),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...S.mount,...Object.keys(Z(d,h))]);for(const t of Array.from(e)){const e=v(r.dirtyFields,t),n=v(h,t),o=v(l,t);e&&!g(n)?w(l,t,n):e||g(o)||te(t,o)}}else{if(f&&g(e))for(const e of S.mount){const t=v(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(U(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of S.mount)te(e,v(l,e));else s={}}h=n.shouldUnregister?t.keepDefaultValues?p(d):{}:p(l),j.array.next({values:{...l}}),j.state.next({values:{...l}})}S={mount:t.keepDirtyValues?S.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!E.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!B(l),b.watch=!!n.shouldUnregister,b.keepIsValid=!!t.keepIsValid,b.action=!1,t.keepErrors||(r.errors={}),j.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!a&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||N(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:a?{}:t.keepDirtyValues?t.keepDefaultValues&&h?Z(d,h):r.dirtyFields:t.keepDefaultValues&&e?Z(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:d})},Le=(e,t)=>Oe(x(e)?e(h):e,{...n.resetOptions,...t}),Pe=e=>{r={...r,...e}},Ne={control:{register:Te,unregister:Ae,getFieldState:we,handleSubmit:Ie,setError:ke,_subscribe:_e,_runSchema:W,_updateIsValidating:M,_focusError:je,_getWatch:Q,_getDirty:X,_setValid:P,_setFieldArray:(e,t=[],o,i,a=!0,l=!0)=>{if(i&&o&&!n.disabled){if(b.action=!0,l&&Array.isArray(v(s,e))){const t=o(v(s,e),i.argA,i.argB);a&&w(s,e,t)}if(l&&Array.isArray(v(r.errors,e))){const t=o(v(r.errors,e),i.argA,i.argB);a&&w(r.errors,e,t),ye(r.errors,e)}if((E.touchedFields||T.touchedFields)&&l&&Array.isArray(v(r.touchedFields,e))){const t=o(v(r.touchedFields,e),i.argA,i.argB);a&&w(r.touchedFields,e,t)}(E.dirtyFields||T.dirtyFields)&&(r.dirtyFields=Z(d,h)),j.state.next({name:e,isDirty:X(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else w(h,e,t)},_setDisabledField:Ee,_setErrors:e=>{r.errors=e,j.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>m(v(b.mount?h:d,e,n.shouldUnregister?v(d,e,[]):[])),_reset:Oe,_resetDefaultValues:()=>x(n.defaultValues)&&n.defaultValues().then(e=>{Le(e,n.resetOptions),j.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of S.unMount){const t=v(s,e);t&&(t._f.refs?t._f.refs.every(e=>!q(e)):!q(t._f.ref))&&Ae(e)}S.unMount=new Set},_disableForm:e=>{y(e)&&(j.state.next({disabled:e}),he(s,(t,n)=>{const r=v(s,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:j,_proxyFormState:E,get _fields(){return s},get _formValues(){return h},get _state(){return b},set _state(e){b=e},get _defaultValues(){return d},get _names(){return S},set _names(e){S=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(b.mount=!0,T={...T,...e.formState},_e({...e,formState:{...A,...e.formState}})),trigger:se,register:Te,handleSubmit:Ie,watch:(e,t)=>x(e)?j.state.subscribe({next:n=>"values"in n&&e(Q(void 0,t),n)}):Q(e,t,!0),setValue:te,getValues:ue,reset:Le,resetField:(e,t={})=>{v(s,e)&&(g(t.defaultValue)?te(e,p(v(d,e))):(te(e,t.defaultValue),w(d,e,p(t.defaultValue))),t.keepTouched||K(r.touchedFields,e),t.keepDirty||(K(r.dirtyFields,e),r.isDirty=t.defaultValue?X(e,p(v(d,e))):X()),t.keepError||(K(r.errors,e),E.isValid&&P()),j.state.next({...r}))},clearErrors:e=>{e&&$(e).forEach(e=>K(r.errors,e)),j.state.next({errors:e?r.errors:{}})},unregister:Ae,setError:ke,setFocus:(e,t={})=>{const n=v(s,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&x(e.select)&&e.select()})}},getFieldState:we};return{...Ne,formControl:Ne}}function Ae(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[o,i]=r.useState({isDirty:!1,isValidating:!1,isLoading:x(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:x(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!x(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=_e(e);t.current={...r,formState:o}}const a=t.current.control;return a._options=e,j(()=>{const e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),r.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),r.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),r.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),r.useEffect(()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();e!==o.isDirty&&a._subjects.state.next({isDirty:e})}},[a,o.isDirty]),r.useEffect(()=>{var t;e.values&&!N(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),(null===(t=a._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||a._setValid(),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),r.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=r.useMemo(()=>T(o,a),[a,o]),t.current}},850:(e,t,n)=>{"use strict";n.d(t,{$A:()=>l,B3:()=>u,CE:()=>d,HD:()=>f,I$:()=>g,Zw:()=>p,dl:()=>m});var r=n(1197),o=n(8048),i=n(8832),a=n(1708),s=n(8663);const l=56,c=r.Ay.div.withConfig({componentId:"sc-4a24dm-0"})(["display:flex;align-items:center;"]),u=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-1"})(["height:","px;text-align:left;padding:12px 14px 12px 12px;align-items:center;color:#fff;min-width:100%;z-index:",";justify-content:space-between;background:",";background-color:",";box-shadow:0 3px 4px -1px ",";"],l,a.vI.headerIndex,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor),d=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-2"})(["overflow:hidden;gap:8px;"]),f=(0,r.Ay)(c).withConfig({componentId:"sc-4a24dm-3"})(["align-items:center;gap:12px;"]),p=(0,r.Ay)(o.H2).withConfig({componentId:"sc-4a24dm-4"})(["margin:0;margin-right:",";margin-left:",";text-transform:none;letter-spacing:normal;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.3;color:",";font-size:var(--_kindlychat-font-size-m);flex:1;"],e=>{let{$isTextDirectionRtl:t}=e;return t?"0":"8px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"8px":"0"},e=>e.theme.headerText),h=(e,t)=>`\n background: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,s.w5)(e.headerBackground,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`,g=(0,r.Ay)(i.$n).withConfig({componentId:"sc-4a24dm-5"})(["height:28px;width:28px;display:flex;align-items:center;justify-content:center;font-size:var(--_kindlychat-font-size-h4);padding:0;"," svg{fill:none;path{stroke:",";}}&:hover{","}&:active{","}&[inert]{opacity:0.5;}"],e=>{let{theme:t}=e;return h(t,"0.08")},e=>{let{theme:t}=e;return t.headerText},e=>{let{theme:t}=e;return h(t,"0.12")},e=>{let{theme:t}=e;return h(t,"0.16")}),m=r.Ay.div.withConfig({componentId:"sc-4a24dm-6"})(["border-radius:6px;display:inline-block;width:32px;height:32px;",""],e=>e.$avatar?`\n background-image: url(${e.$avatar});\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n `:"")},877:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},893:(e,t,n)=>{"use strict";function r(e,t,n){let r=null,o=[];const i=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n&&o.push(a),r&&clearTimeout(r),r=setTimeout(()=>{if(n){const t=o.slice(1).reduce((e,t)=>n(t,e),o[0]);e(...t),o=[]}else e(...a)},t)};return i.cancel=()=>{r&&clearTimeout(r),o=[]},i}n.d(t,{A:()=>r})},904:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(5677),o=n.n(r),i=n(748),a=n.n(i),s=n(7551),l=n.n(s),c=n(5791),u=n.n(c),d=n(8803),f=n.n(d),p=n(4665),h=n.n(p),g=n(9155),m=n(5873),b=n(1197),v=n(8191),y=n(9011);const x=/Edge?\/(9[89]|\d{3,})\.\d+(\.\d+|)|Firefox\/(9[7-9]|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9[89]|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(8[3-9]|9\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]([4-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[3-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(14[6-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[3-9]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(1[7-9]|[2-9]\d|\d{3,})\.\d+/;var w=n(9514);const k=(0,b.DU)([":host{all:initial;}",""],e=>e.styles);var C=n(1085);const S=(0,g.lazy)(()=>Promise.resolve().then(n.bind(n,1717)));let _;const A=(0,g.forwardRef)((e,t)=>{let{botKey:n,options:r,setKindlyChatRef:o}=e;const[i,a]=(0,g.useState)(r);function s(e,t){i[e]!==t&&(void 0===_||_===e?(0,w.flushSync)(()=>{a(n=>({...n,[e]:t}))}):a(n=>({...n,[e]:t})),_=e)}return(0,g.useImperativeHandle)(t,()=>({setOption:s,state:i})),(0,C.jsxs)(g.Suspense,{fallback:"",children:[(0,C.jsx)(S,{setKindlyChatRef:o,botKey:n,options:i}),(0,C.jsx)(k,{styles:r.styles})]})});A.displayName="KindlyChatAPI";const E=A;var T;const j={},I="tab-visibility",O="bubble-visibility";var L=new WeakMap,P=new WeakMap,N=new WeakMap,M=new WeakSet,z=new WeakMap,R=new WeakMap;class ${constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o()(this,M),l()(this,"WINDOW_NAME","kindlyChat"),l()(this,"API_NODE_ID","kindly-chat-api"),l()(this,"SCRIPT_NODE_ID","kindly-chat"),l()(this,"VERSION","2.81.9"),l()(this,"APIRoot",null),a()(this,L,null),l()(this,"kindlyChat",null),l()(this,"botKey",void 0),l()(this,"options",{}),l()(this,"error",null),a()(this,P,null),a()(this,N,null),l()(this,"shadowRoot",null),l()(this,"showBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(L,e))||void 0===t||t.setOption("bubbleHidden",!1),e.options.bubbleHidden=!1,n&&(null===(r=u()(N,e))||void 0===r||r.postMessage({type:O,payload:{visible:!0}}))}),l()(this,"hideBubble",function(){var t;let{syncAcrossTabs:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;null===(t=u()(L,e))||void 0===t||t.setOption("bubbleHidden",!0),e.options.bubbleHidden=!0,n&&(null===(r=u()(N,e))||void 0===r||r.postMessage({type:O,payload:{visible:!1}}))}),l()(this,"openChat",()=>{this.kindlyChat.openChat()}),l()(this,"closeChat",()=>{this.kindlyChat.closeChat()}),l()(this,"restartChat",e=>{this.kindlyChat.restartChat(e)}),l()(this,"getState",e=>u()(L,this).state[e]),l()(this,"setRootRef",e=>{f()(L,this,e)}),l()(this,"setNewContext",e=>{this.kindlyChat.setNewContext(e)}),l()(this,"getContext",async()=>this.kindlyChat.getContext()),l()(this,"setNewBannerMessage",async(e,t)=>this.kindlyChat.setNewBannerMessage(e,t)),l()(this,"setNewLabel",e=>{this.kindlyChat.setNewLabel(e)}),l()(this,"setKindlyChatRef",e=>{this.kindlyChat=e}),l()(this,"triggerDialogue",(e,t)=>{this.kindlyChat.triggerDialogue(e,t)}),l()(this,"sendMessage",(e,t)=>{this.kindlyChat.sendMessage(e,t)}),l()(this,"showNudge",e=>{let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;this.kindlyChat.showNudge({nudgeLayout:t,slug:n,trackEvent:r})}),l()(this,"showCustomNudge",e=>{let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;this.kindlyChat.showCustomNudge({content:t,slug:n,onRendered:r,trackEvent:o})}),l()(this,"getNudges",()=>this.kindlyChat.getNudges()),l()(this,"closeNudge",function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.kindlyChat.closeNudge(t,n,r)}),l()(this,"nudgeCompletion",e=>{let{slug:t}=e;this.kindlyChat.nudgeCompletion(t)}),l()(this,"triggerCtaEvent",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e.kindlyChat.triggerCtaEvent(t)}),l()(this,"identifyUser",e=>{this.kindlyChat.identifyUser(e)}),l()(this,"cancelHandover",()=>{this.kindlyChat.cancelHandover()}),l()(this,"authenticate",e=>{e?this.kindlyChat.setGetAuthToken(e):console.error("Kindly Chat: No getAuthToken function provided. Kindly Chat will not be authenticated.")}),l()(this,"deauthenticate",()=>{this.kindlyChat.setGetAuthToken()}),a()(this,z,()=>{if(u()(P,this)&&u()(P,this).unmount(),f()(P,this,null),this.shadowRoot){const e=this.shadowRoot.querySelector("style");e&&this.shadowRoot.removeChild(e)}}),a()(this,R,(e,t)=>{if(!this.shadowRoot){const t=window.document.createElement("div"),n=e.appendChild(t);this.shadowRoot=n.attachShadow({mode:"open"})}u()(P,this)||f()(P,this,(0,m.createRoot)(this.shadowRoot)),u()(P,this).render((0,C.jsx)(b.ID,{target:this.shadowRoot,children:(0,C.jsx)(E,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:t,options:this.options})}))}),l()(this,"render",()=>{this.error||(this.APIRoot?this.botKey?this.options.shadowDom&&HTMLElement.prototype.attachShadow?u()(R,this).call(this,this.APIRoot,this.botKey):(u()(P,this)||f()(P,this,(0,m.createRoot)(this.APIRoot)),u()(P,this).render((0,C.jsx)(E,{ref:this.setRootRef,setKindlyChatRef:this.setKindlyChatRef,botKey:this.botKey,options:this.options}))):console.error("Cannot call render() without a bot key."):console.error("Cannot call render() on uninitialized Kindly Chat."))}),window.addEventListener("error",e=>{var t,n;if(null!==(t=e.filename)&&void 0!==t&&t.startsWith("http://localhost:8081")&&(null===(n=e.message)||void 0===n||!n.startsWith("Script error."))){const t=new XMLHttpRequest;t.open("POST",`https://bot.kindly.ai/chatbubble/${v.Ak}/log`),t.setRequestHeader("content-type","application/json"),t.send(JSON.stringify((0,y.A)({level:"error",error:e.error,extra:{fromEventListener:!0,filename:e.filename,lineno:e.lineno,colno:e.colno,eventmessage:e.message}}),(e,t)=>void 0===t?null:t))}}),h()(M,this,D).call(this,t,n)){if(!function(){const e={ResizeObserver:"undefined"!=typeof ResizeObserver,HTMLDialogElement:"undefined"!=typeof HTMLDialogElement,BroadcastChannel:"undefined"!=typeof BroadcastChannel};return Object.values(e).every(Boolean)}()){const e="Browser does not support features required for Kindly Chat to work.";return console.warn(e),void(this.error=new Error(e))}h()(M,this,B).call(this,this.options.target),h()(M,this,F).call(this)}}get isBrowserCompatible(){const{userAgent:e}=window.navigator;return x.test(e)}get open(){return this.kindlyChat.getActivityStatus()}}function D(e,t){const{botKey:n,...r}=h()(M,this,H).call(this);if(this.botKey=e||window.kindlyBotKey||n||void 0,!this.botKey){const e='Could not initialize Kindly Chat without bot key. Tried window.kindlyBotKey, data attribute "data-bot-key" and property "botKey".';return console.error(e),!1}return this.options={...T.defaultOptions,...window.kindlyOptions,...r,...t},!0}function F(){this.botKey&&(f()(N,this,new BroadcastChannel(`kindly-chat-${this.botKey}`)),u()(N,this).onmessage=e=>{switch(e.data.type){case I:e.data.payload.visible&&u()(z,this).call(this);break;case O:e.data.payload.visible?this.showBubble():this.hideBubble()}},document.addEventListener("visibilitychange",()=>{var e,t;document.hidden?null===(e=u()(N,this))||void 0===e||e.postMessage({type:I,payload:{visible:!1}}):(null===(t=u()(N,this))||void 0===t||t.postMessage({type:I,payload:{visible:!0}}),u()(P,this)||(this.options.isFromMultitab=!0,this.render()))}))}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(window[this.WINDOW_NAME]){const e="Kindly Chat does not support multiple instances on the same page";return console.warn(e),void(this.error=new Error(e))}if(window[this.WINDOW_NAME]=this,!document.getElementById(this.API_NODE_ID)){let t;if(this.APIRoot=document.createElement("div"),this.APIRoot.id=this.API_NODE_ID,e){const n=document.getElementById(e),r=e&&n&&"function"==typeof(null==n?void 0:n.appendChild);t=r?n:document.body,e&&!r&&console.warn(`Render target element with id="${e}" not found in DOM, falling back to document.body`)}else t=document.body;t.appendChild(this.APIRoot)}}function H(){const e=document.getElementById(this.SCRIPT_NODE_ID);if(!e)return console.warn(`Could not find element with id="${this.SCRIPT_NODE_ID}" in DOM, not loading data attributes.`),{};const t={...null==e?void 0:e.dataset};["bubbleHidden","shadowDom"].forEach(n=>{const r=`data-${n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;e.hasAttribute(r)&&(t[n]=!0)});const n=e.getAttribute("nonce");return n&&(t.nonce=n),t}T=$,l()($,"defaultOptions",{bubbleHidden:!1,shadowDom:!1,styles:"",target:null,renderedBy:"API",isFromMultitab:!1})},908:(e,t,n)=>{"use strict";var r=n(9932);e.exports=Array.isArray||function(e){return"Array"===r(e)}},914:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(9749),o=n.n(r),i=n(9155),a=n.n(i),s=n(1197),l=n(1708),c=n(8663);const u=s.Ay.div.withConfig({componentId:"sc-av36lj-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;&.no-margin{margin:0;}"]),d=s.Ay.label.withConfig({componentId:"sc-av36lj-1"})(["font-size:var(--_kindlychat-font-size-sm);margin:4px 0;font-weight:500;color:var(--panel-background-white-black-contrast-1743170834);"]),f=s.Ay.div.withConfig({componentId:"sc-av36lj-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF",l.qd.textColorLight)});var p=n(824),h=n(3551);const g=[h.pd.name,h.Gb.name,h.Ap.name,p.xI.name,h.cS.name,h.l6.name,h.ZH.name,h.TM.name];var m=n(1085);const b=function(e){let{className:t,children:n,label:r=null,htmlFor:i=null,helperText:s=null,required:l=!1}=e;const c=a().Children.toArray(n);(!c.length||c.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${c.length}`);const p=c[0];if(p&&"function"==typeof p.type){const e=p.type.displayName||p.type.name;null!=g&&o()(g).call(g,e)||console.error(`InputWrapper child can only be one of the following: ${g.join(", ")}`)}return(0,m.jsxs)(u,{className:t,children:[r&&(0,m.jsxs)(d,{htmlFor:i||"",children:[r,l?(0,m.jsx)(m.Fragment,{children:"*"}):""]}),n,s&&(0,m.jsx)(f,{children:s})]})}},928:(e,t,n)=>{"use strict";n(4531)("match")},946:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>_});var r=n(9155),o=n(541),i=n(1308),a=n(6739),s=n(1304),l=n(8278),c=n(4174),u=n(1197),d=n(5394),f=n(8832),p=n(1708);const h=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-0"})(["display:flex;flex-direction:row;position:absolute;bottom:4px;padding-right:12px;right:calc(100% - 12px);background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";border-radius:7px;pointer-events:auto;",";"],p.Tj.shadowColorDark,e=>!e.$active&&(0,u.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),g=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-1"})(["z-index:1;bottom:2px;transition:all 0.2s ease;display:flex;flex-direction:row;"," ",";"],e=>e.$active&&e.$fullscreenMode&&"z-index: -1;",e=>!e.$active&&(0,u.AH)(["transform:scale(0);transform-origin:right;opacity:0;pointer-events:none;user-select:none;"])),m=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-2"})(["padding:2px;border-radius:7px;z-index:1;display:flex;min-width:max-content;justify-content:center;",";"],d.JP),b=(0,u.Ay)(f.N_).withConfig({componentId:"sc-1g1jmh4-3"})(["color:#757575;margin:0;cursor:pointer;font-size:var(--_kindlychat-font-size-sm);font-weight:500;text-decoration:none;&:hover{text-decoration:underline;}"]),v=u.Ay.div.withConfig({componentId:"sc-1g1jmh4-4"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),y=(0,u.Ay)(f.$n).withConfig({componentId:"sc-1g1jmh4-5"})(["display:flex;position:relative;align-items:center;padding:12px;transition:all 0.15s ease;&:hover{background:#",";background-color:#",";svg path{fill:#000;}&:after{border-left-color:#000;}}"," ",""],p.Tj.grayColor,p.Tj.grayColor,e=>e.$active&&`\n background: #${p.Tj.grayColor};\n background-color: #${p.Tj.grayColor};\n `,e=>e.$tail&&"\n &:after {\n content: '';\n position: absolute;\n right: -6px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #ccc;\n }\n ");var x=n(2362),w=n(9270),k=n(5134);const C=1e3;var S=n(1085);function _(e){let{active:t}=e;const[n,u]=(0,r.useState)(!1),{admin:d}=(0,o.d4)(l.$P),{supportedLanguages:f}=(0,a.A)(),{fullscreenMode:p}=(0,o.d4)(l.Od),{inspectorOpen:_}=(0,o.d4)(l.qV),A=(0,o.wA)(),E=(0,r.useCallback)(()=>{A((0,s.uz)())},[A]);return function(){var e,t;const n=(0,k.jL)(),{admin:o}=(0,k.GV)(l.$P),{chatMessages:i}=(0,k.GV)(l.DZ)||[],a=null===(e=i.filter(e=>!(null!=e&&e.from_bot)).slice(-1))||void 0===e||null===(t=e[0])||void 0===t?void 0:t.message,s=(0,x.A)(e=>{n((0,w.y2)(e))},C),c=(0,r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&a&&s(a)},[a,s]);(0,r.useEffect)(()=>{if(o)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[c,o])}(),(0,S.jsxs)(h,{$active:t,children:[n&&t&&(0,S.jsx)(m,{children:f.map(e=>(0,S.jsx)(y,{title:`Restart ${e.name_local}`,onClick:()=>{return t=e.code,A((0,s.L4)(t)),void u(!1);var t},children:(0,S.jsx)(b,{children:e.code.toUpperCase()})},e.code))}),(0,S.jsxs)(g,{$active:t,$hasInspector:d,$fullscreenMode:p,children:[d&&(0,S.jsx)(v,{children:(0,S.jsx)(y,{onClick:E,title:_?"Close chat inspector":"Open chat inspector",children:_?(0,S.jsx)(i.V$,{}):(0,S.jsx)(i.bM,{})})}),(0,S.jsx)(v,{children:(0,S.jsx)(y,{title:"Restart chat",onClick:()=>{f.length>1?u(!n):c.A.getInstance().getConnection().restart(!0)},$active:n,$tail:f.length>1,children:(0,S.jsx)(i.fN,{width:15,height:15})})})]})]})}},960:(e,t,n)=>{"use strict";var r=n(9098),o=n(701),i=n(6281),a=n(459),s=n(8141),l=n(2044),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(o(c,e))return c[e]}})},1003:(e,t,n)=>{"use strict";var r=n(8099),o=n(8900),i=n(2769),a=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},1005:(e,t,n)=>{"use strict";var r=n(3273),o=n(4574),i=n(8130),a=function(e){return function(t,n,a){var s=r(t),l=i(s);if(0===l)return!e&&-1;var c,u=o(a,l);if(e&&n!=n){for(;l>u;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1019:(e,t,n)=>{"use strict";n(3855);var r=n(2856);e.exports=r("String","includes")},1037:(e,t,n)=>{"use strict";var r=n(8655),o=n(9989).f,i=r("metadata"),a=Function.prototype;void 0===a[i]&&o(a,i,{value:null})},1080:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},1085:(e,t,n)=>{"use strict";e.exports=n(3578)},1100:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},1139:(e,t,n)=>{"use strict";var r=n(8407),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},1197:(e,t,n)=>{"use strict";n.d(t,{ID:()=>Ot,Dx:()=>Bt,NP:()=>Ut,DU:()=>Jt,AH:()=>Kt,Ay:()=>Qt,i7:()=>en,DP:()=>Ht});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var i=n(9155),a=n.n(i),s=n(2146),l=n.n(s),c="-ms-",u="-moz-",d="-webkit-",f="comm",p="rule",h="decl",g="@import",m="@keyframes",b="@layer",v=Math.abs,y=String.fromCharCode,x=Object.assign;function w(e){return e.trim()}function k(e,t){return(e=t.exec(e))?e[0]:e}function C(e,t,n){return e.replace(t,n)}function S(e,t,n){return e.indexOf(t,n)}function _(e,t){return 0|e.charCodeAt(t)}function A(e,t,n){return e.slice(t,n)}function E(e){return e.length}function T(e){return e.length}function j(e,t){return t.push(e),e}function I(e,t){return e.filter(function(e){return!k(e,t)})}var O=1,L=1,P=0,N=0,M=0,z="";function R(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:O,column:L,length:a,return:"",siblings:s}}function $(e,t){return x(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function D(e){for(;e.root;)e=$(e.root,{children:[e]});j(e,e.siblings)}function F(){return M=N>0?_(z,--N):0,L--,10===M&&(L=1,O--),M}function B(){return M=N<P?_(z,N++):0,L++,10===M&&(L=1,O++),M}function H(){return _(z,N)}function U(){return N}function V(e,t){return A(z,e,t)}function W(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function G(e){return w(V(N-1,Y(91===e?e+2:40===e?e+1:e)))}function q(e){for(;(M=H())&&M<33;)B();return W(e)>2||W(M)>3?"":" "}function K(e,t){for(;--t&&B()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return V(e,U()+(t<6&&32==H()&&32==B()))}function Y(e){for(;B();)switch(M){case e:return N;case 34:case 39:34!==e&&39!==e&&Y(M);break;case 40:41===e&&Y(e);break;case 92:B()}return N}function X(e,t){for(;B()&&e+M!==57&&(e+M!==84||47!==H()););return"/*"+V(t,N-1)+"*"+y(47===e?e:B())}function Q(e){for(;!W(H());)B();return V(e,N)}function Z(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function J(e,t,n,r){switch(e.type){case b:if(e.children.length)break;case g:case h:return e.return=e.return||e.value;case f:return"";case m:return e.return=e.value+"{"+Z(e.children,r)+"}";case p:if(!E(e.value=e.props.join(",")))return""}return E(n=Z(e.children,r))?e.return=e.value+"{"+n+"}":""}function ee(e,t,n){switch(function(e,t){return 45^_(e,0)?(((t<<2^_(e,0))<<2^_(e,1))<<2^_(e,2))<<2^_(e,3):0}(e,t)){case 5103:return d+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return d+e+e;case 4789:return u+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return d+e+u+e+c+e+e;case 5936:switch(_(e,t+11)){case 114:return d+e+c+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return d+e+c+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return d+e+c+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return d+e+c+e+e;case 6165:return d+e+c+"flex-"+e+e;case 5187:return d+e+C(e,/(\w+).+(:[^]+)/,d+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return d+e+c+"flex-item-"+C(e,/flex-|-self/g,"")+(k(e,/flex-|baseline/)?"":c+"grid-row-"+C(e,/flex-|-self/g,""))+e;case 4675:return d+e+c+"flex-line-pack"+C(e,/align-content|flex-|-self/g,"")+e;case 5548:return d+e+c+C(e,"shrink","negative")+e;case 5292:return d+e+c+C(e,"basis","preferred-size")+e;case 6060:return d+"box-"+C(e,"-grow","")+d+e+c+C(e,"grow","positive")+e;case 4554:return d+C(e,/([^-])(transform)/g,"$1"+d+"$2")+e;case 6187:return C(C(C(e,/(zoom-|grab)/,d+"$1"),/(image-set)/,d+"$1"),e,"")+e;case 5495:case 3959:return C(e,/(image-set\([^]*)/,d+"$1$`$1");case 4968:return C(C(e,/(.+:)(flex-)?(.*)/,d+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+d+e+e;case 4200:if(!k(e,/flex-|baseline/))return c+"grid-column-align"+A(e,t)+e;break;case 2592:case 3360:return c+C(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,k(e.props,/grid-\w+-end/)})?~S(e+(n=n[t].value),"span",0)?e:c+C(e,"-start","")+e+c+"grid-row-span:"+(~S(n,"span",0)?k(n,/\d+/):+k(n,/\d+/)-+k(e,/\d+/))+";":c+C(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return k(e.props,/grid-\w+-start/)})?e:c+C(C(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return C(e,/(.+)-inline(.+)/,d+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(e)-1-t>6)switch(_(e,t+1)){case 109:if(45!==_(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch",0)?ee(C(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return C(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return c+n+":"+r+s+(o?c+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===_(e,t+6))return C(e,":",":"+d)+e;break;case 6444:switch(_(e,45===_(e,14)?18:11)){case 120:return C(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===_(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return C(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=ee(e.value,e.length,n));case m:return Z([$(e,{value:C(e.value,"@","@"+d)})],r);case p:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(k(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":D($(e,{props:[C(t,/:(read-\w+)/,":"+u+"$1")]})),D($(e,{props:[t]})),x(e,{props:I(n,r)});break;case"::placeholder":D($(e,{props:[C(t,/:(plac\w+)/,":"+d+"input-$1")]})),D($(e,{props:[C(t,/:(plac\w+)/,":"+u+"$1")]})),D($(e,{props:[C(t,/:(plac\w+)/,c+"input-$1")]})),D($(e,{props:[t]})),x(e,{props:I(n,r)})}return""})}}function ne(e){return function(e){return z="",e}(re("",null,null,null,[""],e=function(e){return O=L=1,P=E(z=e),N=0,[]}(e),0,[0],e))}function re(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,g=1,m=1,b=1,x=0,w="",k=o,A=i,T=r,I=w;m;)switch(h=x,x=B()){case 40:if(108!=h&&58==_(I,d-1)){-1!=S(I+=C(G(x),"&","&\f"),"&\f",v(c?s[c-1]:0))&&(b=-1);break}case 34:case 39:case 91:I+=G(x);break;case 9:case 10:case 13:case 32:I+=q(h);break;case 92:I+=K(U()-1,7);continue;case 47:switch(H()){case 42:case 47:j(ie(X(B(),U()),t,n,l),l);break;default:I+="/"}break;case 123*g:s[c++]=E(I)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+u:-1==b&&(I=C(I,/\f/g,"")),p>0&&E(I)-d&&j(p>32?ae(I+";",r,n,d-1,l):ae(C(I," ","")+";",r,n,d-2,l),l);break;case 59:I+=";";default:if(j(T=oe(I,t,n,c,u,o,s,w,k=[],A=[],d,i),i),123===x)if(0===u)re(I,t,T,T,k,i,d,s,A);else switch(99===f&&110===_(I,3)?100:f){case 100:case 108:case 109:case 115:re(e,T,T,r&&j(oe(e,T,T,0,0,o,s,w,o,k=[],d,A),A),o,A,d,s,r?k:A);break;default:re(I,T,T,T,[""],A,0,s,A)}}c=u=p=0,g=b=1,w=I="",d=a;break;case 58:d=1+E(I),p=h;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==F())continue;switch(I+=y(x),x*g){case 38:b=u>0?1:(I+="\f",-1);break;case 44:s[c++]=(E(I)-1)*b,b=1;break;case 64:45===H()&&(I+=G(B())),f=H(),u=d=E(w=I+=Q(U())),x++;break;case 45:45===h&&2==E(I)&&(g=0)}}return i}function oe(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,h=0===o?i:[""],g=T(h),m=0,b=0,y=0;m<r;++m)for(var x=0,k=A(e,f+1,f=v(b=a[m])),S=e;x<g;++x)(S=w(b>0?h[x]+" "+k:C(k,/&\f/g,h[x])))&&(l[y++]=S);return R(e,t,n,0===o?p:s,l,c,u,d)}function ie(e,t,n,r){return R(e,t,n,f,y(M),A(e,2,-2),0,r)}function ae(e,t,n,r,o){return R(e,t,n,h,A(e,0,r),A(e,r+1,-1),r,o)}var se={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le=n(9907),ce=void 0!==le&&void 0!==le.env&&(le.env.REACT_APP_SC_ATTR||le.env.SC_ATTR)||"data-styled",ue="active",de="data-styled-version",fe="6.1.19",pe="/*!sc*/\n",he="undefined"!=typeof window&&"undefined"!=typeof document,ge=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==le.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==le.env.REACT_APP_SC_DISABLE_SPEEDY&&le.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==le&&void 0!==le.env&&void 0!==le.env.SC_DISABLE_SPEEDY&&""!==le.env.SC_DISABLE_SPEEDY&&"false"!==le.env.SC_DISABLE_SPEEDY&&le.env.SC_DISABLE_SPEEDY),me={},be=(new Set,Object.freeze([])),ve=Object.freeze({});function ye(e,t,n){return void 0===n&&(n=ve),e.theme!==n.theme&&e.theme||t||n.theme}var xe=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),we=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ke=/(^-|-$)/g;function Ce(e){return e.replace(we,"-").replace(ke,"")}var Se=/(a)(d)/gi,_e=52,Ae=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ee(e){var t,n="";for(t=Math.abs(e);t>_e;t=t/_e|0)n=Ae(t%_e)+n;return(Ae(t%_e)+n).replace(Se,"$1-$2")}var Te,je=5381,Ie=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Oe=function(e){return Ie(je,e)};function Le(e){return Ee(Oe(e)>>>0)}function Pe(e){return"string"==typeof e&&!0}var Ne="function"==typeof Symbol&&Symbol.for,Me=Ne?Symbol.for("react.memo"):60115,ze=Ne?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fe=((Te={})[ze]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Te[Me]=De,Te);function Be(e){return("type"in(t=e)&&t.type.$$typeof)===Me?De:"$$typeof"in e?Fe[e.$$typeof]:Re;var t}var He=Object.defineProperty,Ue=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,We=Object.getOwnPropertyDescriptor,Ge=Object.getPrototypeOf,qe=Object.prototype;function Ke(e,t,n){if("string"!=typeof t){if(qe){var r=Ge(t);r&&r!==qe&&Ke(e,r,n)}var o=Ue(t);Ve&&(o=o.concat(Ve(t)));for(var i=Be(e),a=Be(t),s=0;s<o.length;++s){var l=o[s];if(!(l in $e||n&&n[l]||a&&l in a||i&&l in i)){var c=We(t,l);try{He(e,l,c)}catch(e){}}}}return e}function Ye(e){return"function"==typeof e}function Xe(e){return"object"==typeof e&&"styledComponentId"in e}function Qe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ze(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Je(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function et(e,t,n){if(void 0===n&&(n=!1),!n&&!Je(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=et(e[r],t[r]);else if(Je(t))for(var r in t)e[r]=et(e[r],t[r]);return e}function tt(e,t){Object.defineProperty(e,"toString",{value:t})}function nt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var rt=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw nt(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(pe);return t},e}(),ot=new Map,it=new Map,at=1,st=function(e){if(ot.has(e))return ot.get(e);for(;it.has(at);)at++;var t=at++;return ot.set(e,t),it.set(t,e),t},lt=function(e,t){at=t+1,ot.set(e,t),it.set(t,e)},ct="style[".concat(ce,"][").concat(de,'="').concat(fe,'"]'),ut=new RegExp("^".concat(ce,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),dt=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},ft=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(pe),o=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var l=s.match(ut);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(lt(u,c),dt(e,u,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(s)}}},pt=function(e){for(var t=document.querySelectorAll(ct),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(ce)!==ue&&(ft(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function ht(){return n.nc}var gt=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(ce,"]")));return t[t.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(ce,ue),r.setAttribute(de,fe);var a=ht();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},mt=function(){function e(e){this.element=gt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw nt(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),bt=function(){function e(e){this.element=gt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),vt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),yt=he,xt={isServer:!he,useCSSOMInjection:!ge},wt=function(){function e(e,t,n){void 0===e&&(e=ve),void 0===t&&(t={});var o=this;this.options=r(r({},xt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&he&&yt&&(yt=!1,pt(this)),tt(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return it.get(e)}(n);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(n);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(ce,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(pe)},i=0;i<n;i++)o(i);return r}(o)})}return e.registerId=function(e){return st(e)},e.prototype.rehydrate=function(){!this.server&&he&&pt(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new vt(n):t?new mt(n):new bt(n)}(this.options),new rt(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(st(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(st(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(st(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),kt=/&/g,Ct=/^\s*\/\/.*$/gm;function St(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=St(e.children,t)),e})}function _t(e){var t,n,r,o=void 0===e?ve:e,i=o.options,a=void 0===i?ve:i,s=o.plugins,l=void 0===s?be:s,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=l.slice();u.push(function(e){e.type===p&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(kt,n).replace(r,c))}),a.prefix&&u.push(te),u.push(J);var d=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(Ct,""),c=ne(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=St(c,a.namespace));var d,f,p,h=[];return Z(c,(d=u.concat((p=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&p(e)})),f=T(d),function(e,t,n,r){for(var o="",i=0;i<f;i++)o+=d[i](e,t,n,r)||"";return o})),h};return d.hash=l.length?l.reduce(function(e,t){return t.name||nt(15),Ie(e,t.name)},je).toString():"",d}var At=new wt,Et=_t(),Tt=a().createContext({shouldForwardProp:void 0,styleSheet:At,stylis:Et}),jt=(Tt.Consumer,a().createContext(void 0));function It(){return(0,i.useContext)(Tt)}function Ot(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=It().styleSheet,s=(0,i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),c=(0,i.useMemo)(function(){return _t({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,i.useEffect)(function(){l()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:c}},[e.shouldForwardProp,s,c]);return a().createElement(Tt.Provider,{value:u},a().createElement(jt.Provider,{value:c},e.children))}var Lt=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Et);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,tt(this,function(){throw nt(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Et),this.name+e.hash},e}(),Pt=function(e){return e>="A"&&e<="Z"};function Nt(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Pt(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Mt=function(e){return null==e||!1===e||""===e},zt=function(e){var t,n,r=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!Mt(a)&&(Array.isArray(a)&&a.isCss||Ye(a)?r.push("".concat(Nt(i),":"),a,";"):Je(a)?r.push.apply(r,o(o(["".concat(i," {")],zt(a),!1),["}"],!1)):r.push("".concat(Nt(i),": ").concat((t=i,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in se||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Rt(e,t,n,r){return Mt(e)?[]:Xe(e)?[".".concat(e.styledComponentId)]:Ye(e)?!Ye(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:Rt(e(t),t,n,r):e instanceof Lt?n?(e.inject(n,r),[e.getName(r)]):[e]:Je(e)?zt(e):Array.isArray(e)?Array.prototype.concat.apply(be,e.map(function(e){return Rt(e,t,n,r)})):[e.toString()];var o}function $t(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ye(n)&&!Xe(n))return!1}return!0}var Dt=Oe(fe),Ft=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&$t(e),this.componentId=t,this.baseHash=Ie(Dt,t),this.baseStyle=n,wt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Qe(r,this.staticRulesId);else{var o=Ze(Rt(this.rules,e,t,n)),i=Ee(Ie(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=Qe(r,i),this.staticRulesId=i}else{for(var s=Ie(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=Ze(Rt(u,e,t,n));s=Ie(s,d+c),l+=d}}if(l){var f=Ee(s>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=Qe(r,f)}}return r},e}(),Bt=a().createContext(void 0);function Ht(){var e=(0,i.useContext)(Bt);if(!e)throw nt(18);return e}function Ut(e){var t=a().useContext(Bt),n=(0,i.useMemo)(function(){return function(e,t){if(!e)throw nt(14);if(Ye(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw nt(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?a().createElement(Bt.Provider,{value:n},e.children):null}Bt.Consumer;var Vt={};function Wt(e,t,n){var o=Xe(e),s=e,l=!Pe(e),c=t.attrs,u=void 0===c?be:c,d=t.componentId,f=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Ce(e);Vt[n]=(Vt[n]||0)+1;var r="".concat(n,"-").concat(Le(fe+n+Vt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,p=t.displayName,h=void 0===p?function(e){return Pe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):p,g=t.displayName&&t.componentId?"".concat(Ce(t.displayName),"-").concat(t.componentId):t.componentId||f,m=o&&s.attrs?s.attrs.concat(u).filter(Boolean):u,b=t.shouldForwardProp;if(o&&s.shouldForwardProp){var v=s.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;b=function(e,t){return v(e,t)&&y(e,t)}}else b=v}var x=new Ft(n,g,o?s.componentStyle:void 0);function w(e,t){return function(e,t,n){var o=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,f=a().useContext(Bt),p=It(),h=e.shouldForwardProp||p.shouldForwardProp,g=ye(t,f,l)||ve,m=function(e,t,n){for(var o,i=r(r({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=Ye(o=e[a])?o(i):o;for(var l in s)i[l]="className"===l?Qe(i[l],s[l]):"style"===l?r(r({},i[l]),s[l]):s[l]}return t.className&&(i.className=Qe(i.className,t.className)),i}(o,t,g),b=m.as||d,v={};for(var y in m)void 0===m[y]||"$"===y[0]||"as"===y||"theme"===y&&m.theme===g||("forwardedAs"===y?v.as=m.forwardedAs:h&&!h(y,b)||(v[y]=m[y]));var x=function(e,t){var n=It();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,m),w=Qe(c,u);return x&&(w+=" "+x),m.className&&(w+=" "+m.className),v[Pe(b)&&!xe.has(b)?"class":"className"]=w,n&&(v.ref=n),(0,i.createElement)(b,v)}(k,e,t)}w.displayName=h;var k=a().forwardRef(w);return k.attrs=m,k.componentStyle=x,k.displayName=h,k.shouldForwardProp=b,k.foldedComponentIds=o?Qe(s.foldedComponentIds,s.styledComponentId):"",k.styledComponentId=g,k.target=o?s.target:e,Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)et(e,o[r],!0);return e}({},s.defaultProps,e):e}}),tt(k,function(){return".".concat(k.styledComponentId)}),l&&Ke(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function Gt(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}new Set;var qt=function(e){return Object.assign(e,{isCss:!0})};function Kt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Ye(e)||Je(e))return qt(Rt(Gt(be,o([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Rt(r):qt(Rt(Gt(r,t)))}function Yt(e,t,n){if(void 0===n&&(n=ve),!t)throw nt(1,t);var i=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,n,Kt.apply(void 0,o([r],i,!1)))};return i.attrs=function(o){return Yt(e,t,r(r({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},i.withConfig=function(o){return Yt(e,t,r(r({},n),o))},i}var Xt=function(e){return Yt(Wt,e)},Qt=Xt;xe.forEach(function(e){Qt[e]=Xt(e)});var Zt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=$t(e),wt.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Ze(Rt(this.rules,t,n,r)),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&wt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Jt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Kt.apply(void 0,o([e],t,!1)),s="sc-global-".concat(Le(JSON.stringify(i))),l=new Zt(i,s),c=function(e){var t=It(),n=a().useContext(Bt),r=a().useRef(t.styleSheet.allocateGSInstance(s)).current;return t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),a().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return l.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,t,n,o,i){if(l.isStatic)l.renderStyles(e,me,n,i);else{var a=r(r({},t),{theme:ye(t,o,c.defaultProps)});l.renderStyles(e,a,n,i)}}return a().memo(c)}function en(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Ze(Kt.apply(void 0,o([e],t,!1))),i=Le(r);return new Lt(i,r)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=ht(),r=Ze([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat(de,'="').concat(fe,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw nt(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw nt(2);var n=e.instance.toString();if(!n)return[];var o=((t={})[ce]="",t[de]=fe,t.dangerouslySetInnerHTML={__html:n},t),i=ht();return i&&(o.nonce=i),[a().createElement("style",r({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new wt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw nt(2);return a().createElement(Ot,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw nt(3)}})(),"__sc-".concat(ce,"__")},1203:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},1210:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(7013),a=n(4713),s=n(6100),l=n(1203),c=n(2769),u=n(6281),d=n(5148),f=n(7785),p=n(4603),h=String,g=o("JSON","stringify"),m=s(/./.exec),b=s("".charAt),v=s("".charCodeAt),y=s("".replace),x=s(1.1.toString),w=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,S=!p||l(function(){var e=o("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))}),_=l(function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")}),A=function(e,t){var n=d(arguments),r=f(t);if(c(r)||void 0!==e&&!u(e))return n[1]=function(e,t){if(c(r)&&(t=a(r,this,h(e),t)),!u(t))return t},i(g,null,n)},E=function(e,t,n){var r=b(n,t-1),o=b(n,t+1);return m(k,e)&&!m(C,o)||m(C,e)&&!m(k,r)?"\\u"+x(v(e,0),16):e};g&&r({target:"JSON",stat:!0,arity:3,forced:S||_},{stringify:function(e,t,n){var r=d(arguments),o=i(S?A:g,null,r);return _&&"string"==typeof o?y(o,w,E):o}})},1226:(e,t,n)=>{"use strict";n.d(t,{A:()=>y}),n(9155);var r=n(824),o=n(3949),i=n(1197),a=n(8787),s=n(8832),l=n(1708),c=n(8663),u=n(8668);const d=i.Ay.div.withConfig({componentId:"sc-4y6b4p-0"})(["position:relative;display:flex;"]),f=(0,i.Ay)(o.A).withConfig({componentId:"sc-4y6b4p-1"})([""," max-height:unset;white-space:unset;text-overflow:unset;padding-right:unset;"," color:var(--panel-background-white-black-contrast-1743170834);min-height:","px;outline-offset:-4px;@media ","{max-height:unset;}"," "," &:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}"],s.hF,e=>{let{theme:t}=e;return(0,a.Mo)(t.panelBackground,.08)},e=>{let{$minHeight:t}=e;return t},l.jO.maxTablet,(0,u.A)()&&(0,i.AH)(["max-height:unset;"]),e=>{let{$hasMaxLength:t}=e;if(t)return"padding-bottom: 24px;"},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},a.sF,e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFF","#000")});var p=n(2816),h=n(2016),g=n(7376),m=n(8853),b=n(437),v=n(1085);const y=function(e){var t,n,o;let{autoComplete:i="off",name:a,register:s,validators:l,control:c,id:u,setError:y,clearErrors:x,trigger:w,...k}=e;const C=(0,b.G8)(l),{ref:S,onChange:_,...A}=s?s(a,C):{},{errors:E,isSubmitted:T}=(0,r.lN)({name:a,control:c}),j=(0,g.A)({name:a,trigger:w,control:c,setError:y,clearErrors:x});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(d,{children:[(0,v.jsx)(f,{autoComplete:i,name:a,minRows:2,$hasMaxLength:!(null===(t=C.maxLength)||void 0===t||!t.value),id:u||a,...(0,b.NR)(C),...A&&{...A},onChange:e=>{null==_||_(e),j(e)},ref:S,"aria-errormessage":`error_${a}`,"aria-invalid":!(0,m.A)(E)&&T,...k}),!(null===(n=C.maxLength)||void 0===n||!n.value)&&c&&a&&(0,v.jsx)(p.A,{position:"bottom",fieldName:a,control:c,maxLength:null===(o=C.maxLength)||void 0===o?void 0:o.value})]}),(0,v.jsx)(h.A,{control:c,name:a})]})}},1249:(e,t,n)=>{"use strict";var r=n(1003),o=n(4531),i=n(1811);o("toStringTag"),i(r("Symbol"),"Symbol")},1268:(e,t,n)=>{"use strict";var r=n(6100),o=0,i=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},1304:(e,t,n)=>{"use strict";n.d(t,{oI:()=>C.oI,Sz:()=>u.Sz,B:()=>p.B,Mx:()=>l.Mx,UB:()=>p.UB,cL:()=>r.cL,RY:()=>u.RY,Bd:()=>k.Bd,Rh:()=>p.Rh,eG:()=>p.eG,mN:()=>p.mN,_e:()=>p._e,Fe:()=>w.F,pK:()=>i,Y_:()=>S.Y_,gQ:()=>C.gQ,wQ:()=>p.wQ,ky:()=>p.ky,VK:()=>p.VK,z5:()=>l.z5,SD:()=>x,gm:()=>l.gm,Rm:()=>u.Rm,Mm:()=>p.Mm,ZS:()=>p.ZS,lQ:()=>p.lQ,tM:()=>k.tM,aP:()=>k.aP,c9:()=>u.c9,Zn:()=>k.Zn,j3:()=>k.j3,Ln:()=>p.Ln,L4:()=>p.L4,zn:()=>p.zn,Bu:()=>k.Bu,nI:()=>p.nI,F3:()=>g,pA:()=>k.pA,Aw:()=>v,tD:()=>y,Dc:()=>s,kS:()=>S.kS,ob:()=>p.ob,ku:()=>C.ku,cC:()=>w.c,fe:()=>S.fe,i1:()=>p.i1,VP:()=>C.VP,mR:()=>S.mR,y2:()=>k.y2,V$:()=>p.V$,uz:()=>m,yM:()=>f,vJ:()=>S.vJ,qJ:()=>k.qJ,et:()=>u.et,zh:()=>k.zh,m8:()=>u.m8,R7:()=>u.R7,Mb:()=>r.Mb,mw:()=>r.mw});var r=n(8317),o=n(4961);const i=()=>e=>{e({type:o.u2})};var a=n(3821);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n=>{n({type:a.Y,payload:{text:e}}),t>0&&setTimeout(()=>n({type:a.n}),t)}};var l=n(339),c=n(9990),u=n(8833),d=n(5352);const f=e=>async(t,n)=>{const{PAT_HOST:r}=n().environment,{botKey:o,currentLanguage:i}=n().chatbubble,{token:a}=n().connection,s=await t((0,l.z5)());t((0,u.et)(`${r}/chatbubble/${d.Ak}/conversion/`,{method:"POST",body:{is_order:e,language_code:i},...(0,c.A)({botKey:o,token:a},{withCurrentUrl:!0,extra:s})}))};var p=n(6834),h=(n(4390),n(8689));const g=e=>({type:h.ye,chatMessageId:e}),m=()=>({type:h.vK});var b=n(7639);const v=e=>t=>{t({type:b.s,context:e})},y=e=>(t,n)=>{if("string"!=typeof e)throw new Error("label needs to be a string, received "+typeof e);t({type:b.T,label:e});const{connection:{token:r},environment:{PAT_HOST:o},local:{labels:i}}=n();r&&t((0,u.et)(`${o}/chatbubble/${d.Ak}/update_labels`,{method:"POST",body:{labels:i},...(0,c.A)({token:r})}))},x=()=>async(e,t)=>{const{connection:{token:n,botKey:r},environment:{PAT_HOST:o},local:{context:i}}=t();let a={...i};if(n){const t=await e((0,u.et)(`${o}/chatbubble/${d.Ak}/context`,{method:"get",...(0,c.A)({token:n,botKey:r})}));null!=t&&t.data&&(a={...t.data,...a})}return a};var w=n(5392),k=n(9270),C=n(7474),S=n(776)},1305:(e,t,n)=>{"use strict";var r=n(8684);e.exports=r},1308:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>y,A6:()=>o,fl:()=>i,US:()=>a,gp:()=>h,WI:()=>b,Gr:()=>m,V$:()=>l,bM:()=>s,T4:()=>v,U:()=>f,qY:()=>g,gR:()=>c,fN:()=>p,qx:()=>u,Ze:()=>d}),n(9155);var r=n(1085);function o(e){let{fill:t="none",stroke:n="white",...o}=e;return(0,r.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,r.jsx)("path",{d:"M14.25 7.73999L8.75 12.99L14.25 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"})})}function i(e){let{fill:t="none",stroke:n="white",...o}=e;return(0,r.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:t,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,r.jsx)("path",{d:"M9.75 7.73999L15.25 12.99L9.75 18.24",stroke:n,strokeWidth:"1.5",strokeLinecap:"square"})})}function a(e){let{color:t,...n}=e;return(0,r.jsxs)("svg",{...n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M17.25 6.75L6.75 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M6.75 6.75L17.25 17.25",stroke:t||"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function s(e){let{width:t="16px",height:n="12px",fill:o="rgb(0, 105, 255)"}=e;return(0,r.jsx)("svg",{width:t,height:n,viewBox:"0 0 16 12",children:(0,r.jsx)("path",{d:"M8 12c3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3C14.4 3.1 11.6 0 8 0 4.4 0 1.6 3.1.4 4.9c-.5.7-.5 1.6 0 2.2C1.6 8.9 4.4 12 8 12zm0-9c1.7 0 3 1.3 3 3S9.7 9 8 9 5 7.7 5 6s1.3-3 3-3z",fill:o})})}function l(e){let{width:t="16px",height:n="16px",fill:o="rgb(0, 105, 255)"}=e;return(0,r.jsx)("svg",{width:t,height:n,children:(0,r.jsx)("g",{fill:o,children:(0,r.jsx)("path",{d:"M14.6 5.6l-8.2 8.2c.5.1 1.1.2 1.6.2 3.6 0 6.4-3.1 7.6-4.9.5-.7.5-1.6 0-2.3-.2-.3-.6-.7-1-1.2zM14.3.3L11.6 3C10.5 2.4 9.3 2 8 2 4.4 2 1.6 5.1.4 6.9c-.5.7-.5 1.6 0 2.2.5.8 1.4 1.8 2.4 2.7L.3 14.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l14-14c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0zm-9 9C5.1 8.9 5 8.5 5 8c0-1.7 1.3-3 3-3 .5 0 .9.1 1.3.3l-4 4z"})})})}function c(e){let{...t}=e;return(0,r.jsx)("svg",{...t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M18.25 12.25L5.75 12.25",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function u(e){return(0,r.jsxs)("svg",{...e,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#a)",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",children:(0,r.jsx)("path",{d:"M4.75 4.75 19.25 12l-14.5 7.25L8.25 12l-3.5-7.25ZM8.5 12h2.75"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"a",children:(0,r.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function d(e){return(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M5.62117 14.9627L6.72197 15.1351C7.53458 15.2623 8.11491 16.0066 8.05506 16.8451L7.97396 17.9816C7.95034 18.3127 8.12672 18.6244 8.41885 18.7686L9.23303 19.1697C9.52516 19.3139 9.87399 19.2599 10.1126 19.0352L10.9307 18.262C11.5339 17.6917 12.4646 17.6917 13.0685 18.262L13.8866 19.0352C14.1252 19.2608 14.4733 19.3139 14.7662 19.1697L15.5819 18.7678C15.8733 18.6244 16.0489 18.3135 16.0253 17.9833L15.9441 16.8451C15.8843 16.0066 16.4646 15.2623 17.2772 15.1351L18.378 14.9627C18.6985 14.9128 18.9568 14.6671 19.0292 14.3433L19.23 13.4428C19.3025 13.119 19.1741 12.7831 18.9064 12.5962L17.9875 11.9526C17.3095 11.4774 17.1024 10.5495 17.5119 9.82051L18.067 8.83299C18.2284 8.54543 18.2017 8.18538 17.9993 7.92602L17.4363 7.2035C17.2339 6.94413 16.8969 6.83701 16.5867 6.93447L15.5221 7.26794C14.7355 7.51441 13.8969 7.1012 13.5945 6.31908L13.1866 5.26148C13.0669 4.95218 12.7748 4.7492 12.4496 4.75L11.5472 4.75242C11.222 4.75322 10.9307 4.95782 10.8126 5.26793L10.4149 6.31344C10.1157 7.1004 9.27319 7.51683 8.4842 7.26874L7.37553 6.92078C7.0645 6.82251 6.72591 6.93044 6.52355 7.19142L5.96448 7.91474C5.76212 8.17652 5.73771 8.53738 5.90228 8.82493L6.47 9.81487C6.88812 10.5446 6.68339 11.4814 6.00149 11.9591L5.0936 12.5954C4.82588 12.7831 4.69754 13.119 4.76998 13.442L4.97077 14.3425C5.04242 14.6671 5.30069 14.9128 5.62117 14.9627Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13.5911 10.4089C14.4696 11.2875 14.4696 12.7125 13.5911 13.5911C12.7125 14.4696 11.2875 14.4696 10.4089 13.5911C9.53036 12.7125 9.53036 11.2875 10.4089 10.4089C11.2875 9.53036 12.7125 9.53036 13.5911 10.4089Z",stroke:"#445265",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function f(e){let{crop:t=!1,width:n=24,height:o=24,...i}=e;const a=t?"4 4 16 16":"0 0 24 24";return(0,r.jsxs)("svg",{width:n,height:o,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:a,...i,children:[(0,r.jsx)("path",{d:"M12.75 19.25L16 12.75L19.25 19.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14 17.25H18",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4.75 6.75H13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 6.5V4.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.25 6.75C11.25 6.75 11.25 9.25 9.25 11.25C7.25 13.25 4.75 13.25 4.75 13.25",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M12.25 13.25C12.25 13.25 9.75 13.25 7.75 11.25C7.34551 10.8455 6.75 9.75 6.75 9.75",stroke:"#333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]})}function p(e){return(0,r.jsx)("svg",{...e,viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M8.7.2l.7 6.4 2.1-2.1A5.01 5.01 0 018 13a5.01 5.01 0 01-3.5-8.5c.6-.6 1.4-1.1 2.3-1.3l-.6-1.9C5 1.6 3.9 2.2 3 3.1A7.06 7.06 0 003 13c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L15 .9 8.7.2z",fill:"#0069ff",fillRule:"evenodd"})})}function h(e){return(0,r.jsxs)("svg",{...e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M3.16675 4.49998V11.5C3.16675 12.2364 3.7637 12.8333 4.50008 12.8333H11.5001C12.2365 12.8333 12.8334 12.2364 12.8334 11.5V4.49998C12.8334 3.7636 12.2365 3.16665 11.5001 3.16665H4.50008C3.7637 3.16665 3.16675 3.7636 3.16675 4.49998Z",stroke:"white",strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M5.16675 8.49999V10.8333H7.50008",stroke:"white",strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M10.8333 7.49999V5.16666H8.5",stroke:"white",strokeLinecap:"square"})]})}const g=function(e){let{color:t="white",...n}=e;return(0,r.jsxs)("svg",{...n,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M11.1667 8.83333L12.0001 8C13.1047 6.89539 13.1047 5.10456 12.0001 3.99999C10.8955 2.89543 9.10468 2.89543 8.00008 3.99999L7.16675 4.83333",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4.83315 7.16666L3.99981 8C2.89525 9.1046 2.89525 10.8954 3.99981 12C5.10438 13.1046 6.89521 13.1046 7.99981 12L8.83315 11.1667",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.5 6.5L6.5 9.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"})]})};function m(e){let{size:t=24,color:n="#333",className:o}=e;return(0,r.jsxs)("svg",{width:t,height:t,className:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{children:"External link, opens in a new tab"}),(0,r.jsx)("path",{d:"M17.25 15.25V6.75H8.75",stroke:n,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M17 7L6.75 17.25",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function b(e){return(0,r.jsxs)("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M6.87348 6.87347C9.70478 4.04217 14.2952 4.04217 17.1265 6.87347C19.9578 9.70477 19.9578 14.2952 17.1265 17.1265C14.2952 19.9578 9.70478 19.9578 6.87348 17.1265C4.04218 14.2952 4.04218 9.70477 6.87348 6.87347Z",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2981 9.7019L9.7019 14.2981",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2981 14.2981L9.7019 9.7019",stroke:"#141414",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const v=function(e){let{color:t,...n}=e;return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("g",{clipPath:"url(#clip0_519_2415)",children:(0,r.jsx)("path",{d:"M19.1139 19.1612C18.2263 19.2692 17.4673 19.4161 16.704 19.4427C15.4118 19.4878 14.1095 19.5471 12.8248 19.4387C10.2337 19.2202 7.90467 18.3755 6.23998 16.1792C3.04902 11.9685 5.4046 5.64697 10.5428 4.64327C14.6026 3.85025 18.3702 6.42302 19.0886 10.5352C19.4999 12.8902 18.8789 14.9851 17.3057 16.7773C17.2046 16.8925 17.1038 17.0077 16.9725 17.1577C17.8893 18.0155 18.6031 18.6834 19.1139 19.1612Z",stroke:t,strokeWidth:"1.5"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_519_2415",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:t})})})]})},y=function(e){return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M12 15H12.01",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M5.41136 10.4033L10.4033 5.41136C11.2852 4.52955 12.7148 4.52955 13.5967 5.41136L18.5886 10.4033C19.4705 11.2852 19.4705 12.7148 18.5886 13.5967L13.5967 18.5886C12.7148 19.4705 11.2852 19.4705 10.4033 18.5886L5.41136 13.5967C4.52955 12.7148 4.52955 11.2852 5.41136 10.4033Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M12 8.75V12.25",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},1314:(e,t,n)=>{"use strict";var r=n(8900),o=n(2769),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},1330:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203);e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},1342:(e,t,n)=>{"use strict";n(8293)},1355:(e,t,n)=>{"use strict";var r=n(8655);t.f=r},1363:(e,t,n)=>{var r=n(2471).default,o=n(3230);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},1395:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(9932),a=Object,s=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?s(e,""):a(e)}:a},1452:(e,t,n)=>{"use strict";e.exports=n(5262)},1576:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5352);const o=e=>{const t=(null!=e?e:"").toUpperCase();return"LINK"===t?r.lP.EXTERNAL_LINK:"TAKEOVER_REQUEST"===t?r.lP.HANDOVER_REQUEST:t}},1669:(e,t,n)=>{"use strict";n(4531)("metadata")},1708:(e,t,n)=>{"use strict";n.d(t,{AV:()=>a,CM:()=>o,FR:()=>p,HM:()=>h,J:()=>s,Nl:()=>f,Nz:()=>d,Tj:()=>r,jO:()=>c,mb:()=>l,qd:()=>i,vI:()=>u});const r={darkColor:"#2c2c2c",primaryColor:"#0069ff",grayColor:"#edeeef",errorColor:"#fa4d1e",warningColor:"#ffca3a",successColor:"#50e39b",shadowColor:"rgba(0, 0, 0, 0.15)",shadowColorDark:"rgba(0, 0, 0, 0.3)",borderColorLight:"#ebebeb",borderColorDarkGray:"#d2d5d7",white:"#ffffff"},o={0:"#f7fafc",5:"#f4f7fa",10:"#f1f4f8",15:"#edf0f4",20:"#e8ecf1",30:"#dbe0e6",40:"#c8cfd8",50:"#afb8c4",60:"#8f9aaa",70:"#6a778a",80:"#445265",90:"#232f41",100:"#0c141f"},i={textColor:"#333333",textColorLight:"#757575"},a={dark:"#0D0D0D",light:"#F2F2F2"},s={extraSmall:"var(--_kindlychat-font-size-xs)",small:"var(--_kindlychat-font-size-sm)",p:"var(--_kindlychat-font-size-p)",h2:"var(--_kindlychat-font-size-h2)",h3:"var(--_kindlychat-font-size-h3)",h4:"var(--_kindlychat-font-size-h4)",h5:"var(--_kindlychat-font-size-m)",input:"var(--_kindlychat-font-size-input)"},l={tablet:"768px",phone:"500px"},c={minTablet:`(min-width: calc(${l.tablet} + 1px))`,maxTablet:`(max-width: ${l.tablet})`,maxPhone:`(max-width: ${l.phone})`,maxPhoneHeight:"(max-height: 760px)"},u={headerIndex:"15",overlayIndex:"20",contextMenuIndex:"30"},d={width:190},f={icon:"10px",wrapper:"6px"},p={button:"0px 1px 4px 0px rgba(0, 0, 0, 0.08)",card:"0 0 1px 0 rgba(0, 0, 0, 0.24), 0 2px 6px 0 rgba(0, 0, 0, 0.04)",level2:"0px 4px 8px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.16), 0px 8px 48px 0px rgba(0, 0, 0, 0.06)"},h={sunglow:"#FFF1CC",sunglowDark:"#4D3800",pomegranate:"#FFD7CC",pomegranateDark:"#4D1000"}},1715:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(e).reduce((e,n)=>{let[r,i]=n;return{...e,...o()(t).call(t,r)?{[r]:i}:{}}},{})}},1717:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>he});var r,o,i=n(9749),a=n.n(i),s=n(9155),l=n(541),c=n(1197),u=n(904),d=n(5880),f=n(4097),p=n(3473),h=n(1304),g=n(5134),m=n(1085),b=Object.create,v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyNames,w=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,C=(r=(e,t)=>{var r,o;r=e,o=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,o=2*r,i=new WeakMap,a=function(e,t){return function(i){var a=t.get(i),s=void 0===a?i.size:a<o?a+1:0;if(!i.has(s))return e(i,s);if(i.size<r){for(;i.has(s);)s=Math.floor(Math.random()*o);return e(i,s)}if(i.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(s);)s=Math.floor(Math.random()*n);return e(i,s)}}((t=i,function(e,n){return t.set(e,n),n}),i),s=function(e){return function(t){var n=e(t);return t.add(n),n}}(a);e.addUniqueNumber=s,e.generateUniqueNumber=a},"object"==typeof e&&typeof t<"u"?o(e):"function"==typeof define&&n.amdO?define(["exports"],o):o((r=typeof globalThis<"u"?globalThis:r||self).fastUniqueNumbers={})},()=>(o||r((o={exports:{}}).exports,o),o.exports));s.Component;((e,t,n)=>{n=null!=e?b(w(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of x(t))!k.call(e,n)&&undefined!==n&&v(e,n,{get:()=>t[n],enumerable:!(r=y(t,n))||r.enumerable})})(e&&e.__esModule?n:v(n,"default",{value:e,enumerable:!0}),e)})(C());var S="object"==(typeof window>"u"?"undefined":typeof window),_={setTimeout:S?setTimeout.bind(window):setTimeout,clearTimeout:S?clearTimeout.bind(window):clearTimeout,setInterval:S?setInterval.bind(window):setInterval,clearInterval:S?clearInterval.bind(window):clearInterval},A={},E=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,A[e]=A[e]||[],A[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw new Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),_.setTimeout(()=>{window.localStorage.removeItem(n)},500),A[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=A[this.name].indexOf(this);A[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}};function T(){return Math.random().toString(36).substring(2)}var j=class{options;channel;token=T();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>_.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{_.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",o),n()};t=_.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let o=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",o)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>_.clearInterval(e))}catch{}}}},I=class{channel;options;elector;token=T();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;if(this.options=e,this.channel=new E(t),this.registry.set(this.token,1),e.leaderElection){let e={fallbackInterval:2e3,responseTime:100};this.elector=new j(this.channel,e),this.elector.waitForLeadership()}this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},O=S?document:null,L=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function P(e,t){let n=0;return function(...r){let o=(new Date).getTime();if(!(o-n<t))return n=o,e(...r)}}var N=()=>Date.now(),M=2147483647;function z({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=O,events:o=L,timers:i,immediateEvents:a=[],onPresenceChange:l=()=>{},onPrompt:c=()=>{},onIdle:u=()=>{},onActive:d=()=>{},onAction:f=()=>{},onMessage:p=()=>{},debounce:h=0,throttle:g=0,eventsThrottle:m=200,startOnMount:b=!0,startManually:v=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:k=0,leaderElection:C=!1,disabled:A=!1}={}){let E=(0,s.useRef)(N()),T=(0,s.useRef)(N()),j=(0,s.useRef)(null),z=(0,s.useRef)(null),R=(0,s.useRef)(0),$=(0,s.useRef)(0),D=(0,s.useRef)(0),F=(0,s.useRef)(0),B=(0,s.useRef)(!1),H=(0,s.useRef)(!1),U=(0,s.useRef)(!1),V=(0,s.useRef)(!0),W=(0,s.useRef)(!1),G=(0,s.useRef)(null),q=(0,s.useRef)(null),K=(0,s.useRef)(e),Y=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=M)throw new Error(`❌ The value for the timeout property must fit in a 32 bit signed integer, ${M}.`);if(t>=M)throw new Error(`❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ${M}.`);if(n>=M)throw new Error(`❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${M}.`);if(n>=e)throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(K.current=e-n,Y.current=n):(K.current=e,Y.current=t),!V.current){if(v||A)return;B.current&&(oe.current(null,De),q.current&&q.current.active()),ye()}},[e,t,n,v,A]);let X=(0,s.useRef)(y);(0,s.useEffect)(()=>{X.current=y},[y]);let Q=(0,s.useRef)(a),Z=(0,s.useRef)(r),J=(0,s.useRef)([...new Set([...o,...a]).values()]),ee=(0,s.useRef)(A);(0,s.useEffect)(()=>{ee.current=A,!V.current&&(A?ke():v||ye())},[A]);let te=(0,s.useRef)(l);(0,s.useEffect)(()=>{te.current=l},[l]);let ne=(0,s.useRef)(c);(0,s.useEffect)(()=>{ne.current=c},[c]);let re=(0,s.useRef)(u);(0,s.useEffect)(()=>{re.current=u},[u]);let oe=(0,s.useRef)(d);(0,s.useEffect)(()=>{oe.current=d},[d]);let ie=(0,s.useRef)(f);(0,s.useEffect)(()=>{ie.current=f},[f]);let ae=(0,s.useRef)(p);(0,s.useEffect)(()=>{ae.current=p},[p]);let se=(0,s.useMemo)(()=>{let e=(e,t)=>ie.current(e,t);return h>0?function(e,t){let n;function r(...r){n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):g>0?P(e,g):e},[g,h]),le=(0,s.useRef)();(0,s.useEffect)(()=>{x&&k&&(le.current=P(()=>{q.current.active()},k))},[x,k]);let ce=()=>{null!==G.current&&(_.clearTimeout(G.current),G.current=null)},ue=(e,t=!0)=>{ce(),G.current=_.setTimeout(he,e||K.current),t&&(z.current=N())},de=e=>{!H.current&&!B.current&&(ne.current(e,De),te.current({type:"active",prompted:!0},De)),F.current=0,D.current=N(),H.current=!0,ue(Y.current,!1)},fe=()=>{ce(),B.current||(re.current(null,De),te.current({type:"idle"},De)),B.current=!0,j.current=N(),X.current?ve():H.current&&(D.current=0,H.current=!1)},pe=e=>{ce(),(B.current||H.current)&&(oe.current(e,De),te.current({type:"active",prompted:!1},De)),H.current=!1,D.current=0,B.current=!1,R.current+=N()-j.current,$.current+=N()-j.current,be(),ue()},he=e=>{if(!B.current){se.cancel&&se.cancel();let t=N()-z.current;return K.current+Y.current<t||!(Y.current>0)||H.current?void(q.current?q.current.idle():fe()):void(q.current?q.current.prompt():de(e))}q.current?q.current.active():pe(e)},ge=e=>{if(!b&&!z.current&&(z.current=N(),oe.current(null,De)),se(e,De),H.current)return;if(ce(),!B.current&&Q.current.includes(e.type))return void he(e);let t=N()-z.current;B.current&&!y||!B.current&&t>=K.current?he(e):(U.current=!1,F.current=0,D.current=0,ue(),x&&k&&le.current())},me=(0,s.useRef)(ge);(0,s.useEffect)(()=>{let e=W.current;e&&ve(),me.current=m>0?P(ge,m):ge,e&&be()},[m,g,h,ie,x,k]);let be=()=>{S&&Z.current&&(W.current||(J.current.forEach(e=>{Z.current.addEventListener(e,me.current,{capture:!0,passive:!0})}),W.current=!0))},ve=(e=!1)=>{S&&Z.current&&(W.current||e)&&(J.current.forEach(e=>{Z.current.removeEventListener(e,me.current,{capture:!0})}),W.current=!1)},ye=(0,s.useCallback)(e=>!ee.current&&(ce(),be(),B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,q.current&&!e&&q.current.start(),ue(),!0),[G,B,ee,K,q]),xe=(0,s.useCallback)(e=>!ee.current&&(ce(),be(),T.current=N(),R.current+=N()-j.current,$.current+=N()-j.current,R.current=0,B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,q.current&&!e&&q.current.reset(),v||ue(),!0),[G,B,K,v,ee,q]),we=(0,s.useCallback)(e=>!ee.current&&(ce(),be(),(B.current||H.current)&&pe(),B.current=!1,H.current=!1,U.current=!1,F.current=0,D.current=0,T.current=N(),q.current&&!e&&q.current.activate(),ue(),!0),[G,B,H,ee,K,q]),ke=(0,s.useCallback)((e=!1)=>!ee.current&&!U.current&&(F.current=Ie(),U.current=!0,ve(),ce(),q.current&&!e&&q.current.pause(),!0),[G,ee,q]),Ce=(0,s.useCallback)((e=!1)=>!(ee.current||!U.current||(U.current=!1,H.current||be(),B.current||ue(F.current),D.current&&(D.current=N()),q.current&&!e&&q.current.resume(),0)),[G,K,ee,F,q]),Se=(0,s.useCallback)((e,t)=>(q.current?(t&&ae.current(e,De),q.current.message(e)):t&&ae.current(e,De),!0),[p]),_e=(0,s.useCallback)(()=>B.current,[B]),Ae=(0,s.useCallback)(()=>H.current,[H]),Ee=(0,s.useCallback)(()=>q.current?q.current.isLeader:null,[q]),Te=(0,s.useCallback)(()=>q.current?q.current.isLastActive:null,[q]),je=(0,s.useCallback)(()=>q.current?q.current.token:null,[q]),Ie=(0,s.useCallback)(()=>{if(U.current)return F.current;let e=F.current?F.current:Y.current+K.current,t=z.current?N()-z.current:0,n=Math.floor(e-t);return n<0?0:Math.abs(n)},[K,Y,H,F,z]),Oe=(0,s.useCallback)(()=>Math.round(N()-T.current),[T]),Le=(0,s.useCallback)(()=>Math.round(N()-E.current),[E]),Pe=(0,s.useCallback)(()=>j.current?new Date(j.current):null,[j]),Ne=(0,s.useCallback)(()=>z.current?new Date(z.current):null,[z]),Me=(0,s.useCallback)(()=>B.current?Math.round(N()-j.current+R.current):Math.round(R.current),[j,R]),ze=(0,s.useCallback)(()=>B.current?Math.round(N()-j.current+$.current):Math.round($.current),[j,$]),Re=(0,s.useCallback)(()=>{let e=Math.round(Oe()-Me());return e>=0?e:0},[j,R]),$e=(0,s.useCallback)(()=>{let e=Math.round(Le()-ze());return e>=0?e:0},[j,R]);(0,s.useEffect)(()=>{if(h>0&&g>0)throw new Error("❌ onAction can either be throttled or debounced, not both.");i&&function(e){_.setTimeout=e.setTimeout,_.clearTimeout=e.clearTimeout,_.setInterval=e.setInterval,_.clearInterval=e.clearInterval}(i);let e=()=>{q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)};return S&&window.addEventListener("beforeunload",e),()=>{S&&window.removeEventListener("beforeunload",e),q.current&&q.current.close(),se.cancel&&se.cancel(),ce(),ve(!0)}},[]),(0,s.useEffect)(()=>{q.current&&q.current.close(),q.current=x?new I({channelName:w,leaderElection:C,onPrompt:()=>{de()},onIdle:()=>{fe()},onActive:()=>{pe()},onMessage:e=>{ae.current(e,De)},start:ye,reset:xe,activate:we,pause:ke,resume:Ce}):null},[x,w,C,ne,re,oe,ae,ye,xe,ke,Ce]),(0,s.useEffect)(()=>{V.current||(ce(),ve(!0)),!v&&!A&&(b?ye():be())},[v,b,A,V]),(0,s.useEffect)(()=>{if(!V.current){let e=[...new Set([...o,...a]).values()];if(ve(),J.current=e,Z.current=r,Q.current=a,v||A)return;b?ye():be()}},[r,JSON.stringify(o),JSON.stringify(a),V,A,v,b]),(0,s.useEffect)(()=>{V.current&&(V.current=!1)},[V]);let De={message:Se,start:ye,reset:xe,activate:we,pause:ke,resume:Ce,isIdle:_e,isPrompted:Ae,isLeader:Ee,isLastActiveTab:Te,getTabId:je,getRemainingTime:Ie,getElapsedTime:Oe,getTotalElapsedTime:Le,getLastIdleTime:Pe,getLastActiveTime:Ne,getIdleTime:Me,getTotalIdleTime:ze,getActiveTime:Re,getTotalActiveTime:$e,setOnPresenceChange:e=>{l=e,te.current=e},setOnPrompt:e=>{c=e,ne.current=e},setOnIdle:e=>{u=e,re.current=e},setOnActive:e=>{d=e,oe.current=e},setOnAction:e=>{f=e,ie.current=e},setOnMessage:e=>{p=e,ae.current=e}};return De}(0,s.createContext)(null).Consumer;const R=function(e){return(0,s.forwardRef)(function(t,n){let r=z({...t});return"function"==typeof n?n(r):n&&(n.current=r),(0,m.jsx)(e,{...t,...r})})}(e=>{let{children:t}=e;return t});var $=n(8278),D=n(5352);var F=n(5626);const B="kindly-last-conversion-timestamp",H=()=>{const e=(0,g.jL)(),{conversionPageUrl:t,hasInteraction:n}=(0,l.d4)($.Od),r=(()=>{const[e,t]=(0,s.useState)(!1),{conversionPageUrl:n}=(0,l.d4)($.Od),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=(0,s.useState)(null);if(!n)return null;const i=setInterval(()=>{const e=document.querySelector("#klarna-checkout-iframe");e&&(o(e),clearInterval(i))},500);return r})(0,{enable:null==n?void 0:n.match(/klarna/gi)}),o=(0,s.useRef)(void 0),i=(0,s.useCallback)(e=>{var n;const r=e.getAttribute("src")||"",o=function(e){try{return JSON.parse(e)}catch(e){return console.error("Failed to parse JSON:",e),null}}((null===(n=decodeURIComponent(r).match(/\{"(.*)/gim))||void 0===n?void 0:n[0])||"");o&&"object"==typeof o&&["created","checkout_complete"].indexOf(o.ORDER_STATUS)>-1&&t(!0)},[]);return(0,s.useEffect)(()=>{r&&!o.current&&(i(r),o.current=setInterval(()=>i(r),500))},[r,o,i]),(0,s.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e})(),o=(0,s.useCallback)(()=>{if((t=localStorage.getItem(B))&&!(Date.now()-Number(t)>D.M3))return;var t;const r=!n;localStorage.setItem(B,String(Date.now())),e((0,h.yM)(r))},[e,n]);(0,s.useEffect)(()=>{r&&o()},[o,r]),(0,s.useEffect)(()=>{null!=t&&t.trim()&&(0,F.A)(window.location.href,t)&&o()},[o,t])};var U=n(8418),V=n(3649),W=n(9159);const G=`\n${n(4785).n}\n .kindly-overflow-hidden {\n overflow: hidden !important;\n }\n`;var q=n(7559),K=n(776);const Y=function(){const e=document.createElement("div");e.style.fontSize="initial",document.documentElement.appendChild(e);const t=getComputedStyle(e).fontSize;return document.documentElement.removeChild(e),parseFloat(t)}(),X=(0,c.DU)(["#kindly-root{font-size:initial;pointer-events:none;--_kindlychat-font-size-xs:calc(","px * 0.7);--_kindlychat-font-size-sm:calc(","px * 0.75);--_kindlychat-font-size-m:","px;--_kindlychat-font-size-p:calc(","px * 0.9);--_kindlychat-font-size-h4:calc(","px * 1.2);--_kindlychat-font-size-h3:calc(","px * 1.4);--_kindlychat-font-size-h2:calc(","px * 1.6);--_kindlychat-font-size-input:","px;}"],Y,Y,Y,Y,Y,Y,Y,Math.max(16,Y));var Q=n(1708);const Z=e=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,h,g,m,b,v,y,x,w,k,C,S,_;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatbubbleText:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chatbubble_text)&&void 0!==n?n:Q.AV.dark,background:null!==(o=null==e||null===(i=e.style)||void 0===i?void 0:i.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(a=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==a?a:"#0069ff",buttonBackground:null!==(l=null==e||null===(c=e.style)||void 0===c?void 0:c.color_button_background)&&void 0!==l?l:"#0069ff",secondaryButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_secondary_button_background)&&void 0!==u?u:"#ffffff",bubbleButtonBackground:null!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_bubble_button_background)&&void 0!==f?f:"#0069ff",buttonText:null!==(h=null==e||null===(g=e.style)||void 0===g?void 0:g.color_button_text)&&void 0!==h?h:"#ffffff",headerBackground:null!==(m=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_background)&&void 0!==m?m:"#0069ff",headerText:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_header_text)&&void 0!==v?v:"#ffffff",userMessageBackground:null!==(x=null==e||null===(w=e.style)||void 0===w?void 0:w.color_user_message_background)&&void 0!==x?x:"#f5f5f5",botMessageBackground:null!==(k=null==e||null===(C=e.style)||void 0===C?void 0:C.color_bot_message_background)&&void 0!==k?k:"#f5f5f5",panelBackground:null!==(S=null==e||null===(_=e.style)||void 0===_?void 0:_.color_panel_background)&&void 0!==S?S:"#ffffff"}};var J=n(4174),ee=n(8668);function te(e){let{settings:t}=e;const n=(0,g.jL)(),{inPlatform:r}=(0,l.d4)($.$P);return H(),function(){var e,t,n;const{feedbackToDisplay:r}=(0,V.A)(),o=(0,g.jL)(),{chatHasStarted:i,active:a}=(0,g.GV)($.$P),l=(0,W.A)(r),c=(0,s.useCallback)(()=>{r&&i&&(o((0,U.WG)({ratingSystem:r.rating_scale.rating_system,triggerType:r.trigger_type,formTitle:r.form_title,timeout:r.timeout,step:"RATING_SCALE"})),o(a?(0,h.zn)("FEEDBACK_END_CHAT"):(0,h.ku)()))},[r,i,a,o]),{start:u,reset:d,pause:f}=z({onIdle:c,timeout:1e3*((null==r||null===(e=r.timeout)||void 0===e?void 0:e.duration)||10),startManually:!0,disabled:!(null!=r&&null!==(t=r.timeout)&&void 0!==t&&t.enabled)});(0,s.useEffect)(()=>{var e;(null==l?void 0:l.id)!==(null==r?void 0:r.id)&&(f(),d(),null!=r&&null!==(e=r.timeout)&&void 0!==e&&e.enabled&&i&&u())},[null==r?void 0:r.id,null==r||null===(n=r.timeout)||void 0===n?void 0:n.enabled,null==l?void 0:l.id,i,d,u,f]),(0,s.useEffect)(()=>{i&&r||(f(),d())},[i,r,d,f])}(),(0,s.useEffect)(()=>{var e;null===(e=t.chatbubble)||void 0===e||!e.autopopup||(0,ee.A)()||r||setTimeout(()=>n((0,h.UB)()),t.chatbubble.autopopup_time)},[n,r,t]),(0,m.jsx)(p.A,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick})}let ne=!1,re=null;const oe=(0,s.forwardRef)((e,t)=>{let{botKey:r,settings:o,initialChatLanguage:i}=e;return re||(re=(0,g.Ay)({botKey:r,settings:o,initialChatLanguage:i})),(0,s.useEffect)(()=>()=>{re=null,J.A.getInstance().destroy(!0)},[]),function(){const{nonce:e}=u.Z;(0,s.useEffect)(()=>{const t=document.createElement("style");t.setAttribute("data-kindly-styles","true"),t.textContent=G,e&&t.setAttribute("nonce",e);try{return document.querySelector('style[data-kindly-styles="true"]')||document.head.appendChild(t),()=>{try{const e=document.querySelector('style[data-kindly-styles="true"]');e&&document.head.contains(e)&&document.head.removeChild(e)}catch(e){console.error("Error removing Kindly styles:",e)}}}catch(e){return void console.error("Error injecting Kindly styles:",e)}},[])}(),(0,s.useImperativeHandle)(t,()=>({getActivityStatus:()=>re.getState().chatbubble.active,openChat(){re.dispatch((0,h.lQ)({source:"programmatic"}))},closeChat(){re.dispatch((0,h.Rh)({source:"programmatic"}))},restartChat(){let{openChat:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{openChat:!1};J.A.getInstance().getConnection().restart(e)},triggerDialogue(e,t){var n;"no"===(null==t||null===(n=t.languageCode)||void 0===n?void 0:n.toLowerCase())&&(t.languageCode="nb"),re.dispatch((0,h.zh)(e,t))},sendMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.trim(),r="user"===t.sender,o=!1===t.openChat,{newContext:i}=t;r&&n&&re.dispatch((0,h.y2)(n,void 0,i,void 0,void 0,{shouldOpenChat:!o}))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;re.dispatch((0,h.fe)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;re.dispatch((0,h.kS)({content:t,slug:n,onRendered:r,trackEvent:o}))},getNudges:()=>re.getState().bot.nudges,closeNudge(e,t){re.dispatch((0,h.Y_)(e,t))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(re.dispatch((0,K.vJ)({slug:e,eventType:q.oE})),re.dispatch({type:q.Kd,slug:e}),sessionStorage.setItem("kindly-nudge-completion","true"))},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;re.dispatch((0,K.NS)(e))},identifyUser(e){re.dispatch((0,h.gm)(e))},setNewContext(e){re.dispatch((0,h.Aw)(e))},getContext:()=>re.dispatch((0,h.SD)()),setNewBannerMessage(e,t){re.dispatch((0,h.cC)(e,t||(null==e?void 0:e.message)))},setNewLabel(e){re.dispatch((0,h.tD)(e))},cancelHandover(){re.dispatch((0,h.cL)())},setGetAuthToken(e){u.Z.getAuthToken=e,re.dispatch((0,h.Mx)())}})),(0,s.useEffect)(()=>{(0,d.NY)(o)},[o]),(0,s.useEffect)(()=>{const{persistStateLifespan:e}=re.getState().bot;if(-1===e||e>0)return;let t=!1;const n=()=>{t||(t=!0,re.dispatch((0,h.R7)(r)))};window.onbeforeunload=n,window.onunload=n},[r,o,re]),(0,s.useEffect)(()=>{!ne&&o.track_utm&&(ne=!0,Promise.resolve().then(n.bind(n,8070)).then(e=>{let{default:t}=e;const n=t();n&&re.dispatch((0,h.Aw)({...n}))}))},[o,re]),window.Cypress&&(window.store=re),(0,m.jsx)(l.Kq,{store:re,children:(0,m.jsxs)(c.NP,{theme:Z(o),children:[(0,m.jsx)(X,{}),(0,m.jsx)(f.A,{errorPoint:"inside ChatContainer",displayError:!1,children:(o.user_idle_timeout_seconds||0)>0?(0,m.jsx)(R,{onIdle:()=>re.dispatch((0,h.ZS)()),onActive:()=>re.dispatch((0,h.Mm)(o.id)),timeout:1e3*(o.user_idle_timeout_seconds||0),children:(0,m.jsx)(te,{settings:o})}):(0,m.jsx)(te,{settings:o})})]})})});oe.displayName="ChatContainer";const ie=oe;var ae=n(9449),se=n(9466);function le(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,i)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(a=>{setTimeout(()=>{t<=1?i(a):le(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,i)},n)})})}async function ce(e,t,n){const r=(0,ae.U)(),o=`${e}/settings/${t}.json?version=2.81.9&${[ae.B]}=${r}`;return le(()=>fetch(o,{...n&&{signal:n.signal}}).then(async e=>{const t=await e.json();return{status:e.status,statusText:e.statusText,ok:e.ok,data:t}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}let ue=!1;const de=e=>e.split("-")[0],fe=(e,t)=>{const n=e.find(e=>e===t);if(n)return n;const r=de(t);return e.find(e=>de(e)===r)},pe=function(e,t){return!!a()(t).call(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function he(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const i=function(e,t){const[n,r]=(0,s.useState)(t||{});return(0,s.useEffect)(()=>{const n=new AbortController;return ue?r(e=>(0,se.A)(e,t)):(async()=>{try{var o;const i=await ce((null===(o=t.environment)||void 0===o?void 0:o.SETTINGS_HOST)||"https://chat.kindlycdn.com",e,n),{welcome_page:a,in_chat_notification:s,notifications:l,settings:{supported_languages:c,compliance_settings:u,...d},...f}=i.data,p={...f,...d,...l,supportedLanguages:c,welcomePage:a,inChatNotification:s,complianceSettings:u};r(e=>(0,se.A)((0,se.A)(p,e),{...t}))}catch(e){var i,a;const t=null!==(i=e.response)&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.error?e.response.data.error:e;"signal is aborted without reason"!==t.message&&console.error("Kindly chat failed to initialize.",t)}})(),ue=!0,()=>{n.abort()}},[e,t]),(0,s.useEffect)(()=>()=>{ue=!1},[]),n}(n,o);if(!i.id)return null;const{inPlatform:l,fullscreenMode:c,language:d,focusTrapOnFullView:f,supportedLanguages:p,getAuthToken:h,nonce:g,complianceSettings:b,welcomePage:v,markets:y,market:x}=i;u.Z.language=d,u.Z.supportedLanguages=p,u.Z.feedbackSettings=l?{}:i.feedback_settings,u.Z.focusTrapOnFullView=f,u.Z.fullscreenMode=c,u.Z.getAuthToken=h,u.Z.nonce=g,u.Z.complianceSettings=b,u.Z.welcomePage=v,u.Z.markets=y,u.Z.market="string"==typeof x&&a()(y).call(y,x)?x:y[0];const w=u.Z.language,k=function(e,t){var n,r,o;const i=e.map(e=>e.code),a=null==t?void 0:t.toLowerCase();if(0===e.length)return;if(1===i.length)return i[0];if(a){const e=fe(i,a);if(e)return e}const s=null===(n=document.documentElement.lang)||void 0===n?void 0:n.toLowerCase(),l=fe(i,s);if(l)return l;const c=null===(r=window.navigator.language)||void 0===r?void 0:r.toLowerCase(),u=fe(i,c);if(u)return u;return(null===(o=window.navigator.languages)||void 0===o?void 0:o.flatMap(e=>{const t=fe(i,e.toLowerCase());return t?[t]:[]})[0])||e.find(e=>e.is_primary).code.toLowerCase()}(u.Z.supportedLanguages.filter(e=>e.is_active),w);if(!k)return console.error("Impossible to determine initial Chat language, make sure you have at least one language active for the Bot"),null;const C=(null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081",S=[C?new URL(C).hostname:void 0,"*.kindly.ai","demokind.ly","*.demokind.ly",...i.chatbubble.domains].filter(Boolean);return i.chatbubble.inPlatform||pe(window.location.hostname,S)?(0,m.jsx)(ie,{ref:r,botKey:n,settings:i,initialChatLanguage:k}):(console.error(`Domain ${window.location.hostname} is not allowed to load Kindly Chat. Please check your bot settings if you think this is a mistake.`),null)}},1726:(e,t,n)=>{"use strict";var r=n(5161);e.exports=r},1780:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},1810:(e,t,n)=>{"use strict";var r=n(5279);e.exports=r},1811:(e,t,n)=>{"use strict";var r=n(4904),o=n(9989).f,i=n(3999),a=n(701),s=n(9559),l=n(8655)("toStringTag");e.exports=function(e,t,n,c){var u=n?e:e&&e.prototype;u&&(a(u,l)||o(u,l,{configurable:!0,value:t}),c&&!r&&i(u,"toString",s))}},1814:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(9155);var r=n(1197),o=n(5394);const i=r.Ay.div.withConfig({componentId:"sc-1a2z22o-0"})(["display:flex;align-items:center;justify-content:center;border-radius:100px;transition:all cubic-bezier(0.61,0.1,0.42,0.9) 150ms;min-height:18px;background-color:transparent;",""],e=>{let{$minHeight:t}=e;return t&&`min-height: ${t}px;`}),a=r.Ay.span.withConfig({componentId:"sc-1a2z22o-1"})(["width:6px;height:6px;opacity:0;border-radius:50%;background:",";background-color:",";&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){margin:0 5px;animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>e.theme.buttonText,e=>e.theme.buttonText,o.Zm,o.Zm,o.Zm);var s=n(1085);function l(e){let{loading:t=!1,isCheckbox:n=!1,flat:r,minHeight:o}=e;return(0,s.jsxs)(i,{$minHeight:o,$flat:r,$isCheckbox:n,$loading:t,children:[(0,s.jsx)(a,{}),(0,s.jsx)(a,{}),(0,s.jsx)(a,{})]})}},1818:(e,t,n)=>{"use strict";n(4531)("unscopables")},1918:(e,t,n)=>{"use strict";var r=n(9098),o=n(1203),i=n(908),a=n(262),s=n(2137),l=n(8130),c=n(5657),u=n(4492),d=n(4417),f=n(3121),p=n(8655),h=n(5547),g=p("isConcatSpreadable"),m=h>=51||!o(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),b=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!m||!f("concat")},{concat:function(e){var t,n,r,o,i,a=s(this),f=d(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(b(i=-1===t?a:arguments[t]))for(o=l(i),c(p+o),n=0;n<o;n++,p++)n in i&&u(f,p,i[n]);else c(p+1),u(f,p++,i);return f.length=p,f}})},1926:(e,t,n)=>{"use strict";var r=n(2621).IteratorPrototype,o=n(5780),i=n(480),a=n(1811),s=n(6625),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},1949:e=>{"use strict";e.exports=r},1966:(e,t,n)=>{"use strict";var r=n(2937),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},1970:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(904);function o(e){const{access_request_text:t,acceptance_text:n,revoke_permission_text:o,description_text_html:i,enabled:a,require_agreement:s,button_text:l}=r.Z.complianceSettings[e]||{};return{isEnabled:a,accessRequestText:t,acceptanceText:n,revokePermissionText:o,descriptionTextHtml:i,requireAgreement:s,buttonText:l}}},2002:(e,t,n)=>{"use strict";var r=n(9098),o=n(1003),i=n(701),a=n(1139),s=n(8141),l=n(2044),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,u[n]=t,n}})},2016:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(824),o=n(1708);const i=n(1197).Ay.div.withConfig({componentId:"sc-xuun63-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:var(--_kindlychat-font-size-sm);"," right:0;left:auto;color:var(--panel-background-white-black-contrast-1743170834);max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";svg path{stroke:var(--panel-background-white-black-contrast-1743170834);}"],e=>{let{$show:t}=e;return t&&"margin-top: 4px;"},e=>{let{$show:t}=e;return t?"120px":"0px"},e=>{let{$show:t}=e;return t?1:0},e=>{let{$show:t}=e;return t?"480ms":0});var a=n(1085);function s(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,a.jsxs)("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("path",{d:"M4.952 16.354l5.263-10.497c.738-1.472 2.839-1.472 3.576 0l5.258 10.497a2 2 0 01-1.788 2.896H6.741a2 2 0 01-1.789-2.896z",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r})]})}var l=n(4557);const c=function(e){var t,n,c,u;let{name:d,control:f}=e;const{errors:p,isSubmitted:h}=(0,r.lN)({name:d,control:f}),g=(null===(t=p[d])||void 0===t?void 0:t.type)!==l.k1.CUSTOM&&((null===(n=p[d])||void 0===n?void 0:n.message)||(null===(c=p[`browser_error_${d}`])||void 0===c?void 0:c.message)||(null!==(u=p[d])&&void 0!==u&&u.ref&&"validationMessage"in p[d].ref?p[d].ref.validationMessage:void 0));return(0,a.jsxs)(i,{$show:Boolean(g&&h),id:`error_${d}`,children:[(0,a.jsx)(s,{width:16,height:16,color:o.Tj.errorColor}),"string"==typeof g?g:""]})}},2044:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},2100:(e,t,n)=>{"use strict";n(4531)("patternMatch")},2137:(e,t,n)=>{"use strict";var r=n(5426),o=Object;e.exports=function(e){return o(r(e))}},2146:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},2279:(e,t,n)=>{"use strict";var r=n(8900);n(1811)(r.JSON,"JSON",!0)},2320:(e,t,n)=>{"use strict";n(4531)("asyncIterator")},2327:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(2876),o=n(2016),i=n(7376),a=n(4557),s=n(437),l=n(1085);const c=function(e){let{name:t,label:n,control:c,validators:u,register:d,id:f,value:p,isLast:h,inputType:g,setError:m,clearErrors:b,trigger:v,...y}=e,x={};u&&(x=(0,s.G8)(u));const w=(0,i.A)({name:t,control:c,trigger:v,setError:m,clearErrors:b}),{ref:k,onChange:C,...S}=d&&t?d(t,x):{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.hl,{htmlFor:f,children:[(0,l.jsx)(r.eo,{ref:k,name:t,type:g,id:f,value:p,...(0,s.NR)(x),...S&&{...S},onChange:e=>{null==C||C(e),w(e)},...y}),(0,l.jsx)(r.r6,{$inputType:g,$isForm:!!d,children:(0,l.jsx)(r.FC,{$inputType:g,viewBox:"0 0 24 24",children:g===a.cJ.CHECKBOX?(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"}):(0,l.jsx)("circle",{cx:"12",cy:"13",r:"5"})})}),n&&(0,l.jsx)(r.Ko,{$isForm:!!d,children:n})]}),h&&t&&(0,l.jsx)(o.A,{name:t,control:c})]})}},2362:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=(e,t)=>{const n=(0,r.useRef)(void 0);return(0,r.useCallback)(function(){var r;const o=Date.now()-(null!==(r=n.current)&&void 0!==r?r:0)<t;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];if(o){var l;const e=a[0];return void(null==e||null===(l=e.preventDefault)||void 0===l||l.call(e))}e(...a),n.current=Date.now()},[t,e])}},2471:(e,t,n)=>{var r=n(3844),o=n(5216);function i(t){return e.exports=i="function"==typeof r&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},2492:()=>{},2621:(e,t,n)=>{"use strict";var r,o,i,a=n(1203),s=n(2769),l=n(262),c=n(5780),u=n(3671),d=n(3508),f=n(8655),p=n(4871),h=f("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):g=!0),!l(r)||a(function(){var e={};return r[h].call(e)!==e})?r={}:p&&(r=c(r)),s(r[h])||d(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},2760:(e,t,n)=>{"use strict";n.d(t,{MN:()=>o,nG:()=>a,oZ:()=>i,vP:()=>r});const r="SHOW_IN_CHAT_NOTIFICATION",o="REPLACE_IN_CHAT_NOTIFICATION",i="DISMISS_IN_CHAT_NOTIFICATION",a="DELETE_IN_CHAT_NOTIFICATION"},2769:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2816:(e,t,n)=>{"use strict";n.d(t,{A:()=>c}),n(9155);var r=n(824),o=n(1197),i=n(1708),a=n(8663);const s=o.Ay.div.withConfig({componentId:"sc-1lavw6k-0"})(["position:absolute;right:8px;font-size:var(--_kindlychat-font-size-sm);color:",";",""],e=>{let{theme:t}=e;return(0,a.w5)(t.panelBackground,"#FFFFFF",i.qd.textColorLight)},e=>{let{$position:t}=e;return"top"===t?(0,o.AH)(["top:4px;right:16px;"]):"bottom"===t?(0,o.AH)(["top:auto;bottom:4px;right:16px;"]):(0,o.AH)(["right:8px;top:50%;transform:translateY(-50%);"])});var l=n(1085);function c(e){let{fieldName:t,maxLength:n,control:o,position:i="middle"}=e;const a=(0,r.FH)({control:o,name:t});return(0,l.jsx)(s,{$position:i,children:`${(null==a?void 0:a.length)||0}/${n}`})}},2848:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9155),o=n(541),i=n(8278),a=n(3906),s=n(6739);function l(){const{text:e}=(0,o.d4)(i.Od),{currentLanguageCode:t}=(0,s.A)();return(0,r.useMemo)(()=>(0,a.A)(e,t),[t,e])}},2856:(e,t,n)=>{"use strict";var r=n(8900),o=n(8099);e.exports=function(e,t){var n=o[e+"Prototype"],i=n&&n[t];if(i)return i;var a=r[e],s=a&&a.prototype;return s&&s[t]}},2871:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2876:(e,t,n)=>{"use strict";n.d(t,{B2:()=>d,FC:()=>a,Ko:()=>u,eo:()=>c,hl:()=>l,r6:()=>s});var r=n(1197),o=n(8663),i=n(4557);const a=r.Ay.svg.withConfig({componentId:"sc-1av4ah8-0"})(["fill:",";stroke:",";stroke-width:2px;position:relative;top:-1px;"],e=>{let{$inputType:t,theme:n}=e;return t===i.cJ.CHECKBOX?"none":n.buttonText},e=>{let{theme:t}=e;return t.buttonText}),s=r.Ay.div.withConfig({componentId:"sc-1av4ah8-1"})(["display:inline-block;width:",";height:",";border-radius:",";background:transparent;border:1px solid ",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"16px":"18px"},e=>{let{$inputType:t}=e;return t===i.cJ.CHECKBOX?"3px":"50%"},e=>{let{theme:t,$isForm:n}=e;return n?(0,o.w5)(t.panelBackground,"rgba(255,255,255, 0.2)","rgba(0,0,0, 0.2)"):(0,o.w5)(t.background,"rgba(255,255,255, 0.2)","rgba(0,0,0, 0.2)")},e=>{let{theme:{buttonBackground:t}}=e;return(0,o.SW)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},a),l=r.Ay.label.withConfig({componentId:"sc-1av4ah8-2"})(["cursor:pointer;display:flex;justify-content:flex-start;align-items:center;&:hover > ","{border:1px solid ",";}"],s,e=>{let{theme:t,$isForm:n}=e;return n?(0,o.w5)(t.panelBackground,"rgba(255,255,255, 1)","rgba(0,0,0, 1)"):(0,o.w5)(t.background,"rgba(255,255,255, 1)","rgba(0,0,0, 1)")}),c=r.Ay.input.withConfig({componentId:"sc-1av4ah8-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}&:focus-within ~ ","{outline:1px solid ",";}"],s,e=>{let{theme:{buttonBackground:t}}=e;return t},a,e=>{let{theme:{buttonBackground:t}}=e;return(e=>(0,r.i7)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)},s,e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),u=r.Ay.div.withConfig({componentId:"sc-1av4ah8-4"})(["font-size:var(--_kindlychat-font-size-p);font-weight:400;margin:0 28px;color:",";"],e=>{let{theme:t,$isForm:n}=e;return n?"var(--panel-background-white-black-contrast-1743170834)":(0,o.w5)(t.background,"#FFFFFF","#000000")}),d=r.Ay.div.withConfig({componentId:"sc-1av4ah8-5"})(["margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;"])},2894:(e,t,n)=>{"use strict";var r=n(6100),o=n(2769),i=n(3753),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2937:(e,t,n)=>{"use strict";var r=n(262);e.exports=function(e){return r(e)||null===e}},2991:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(5396)})},2996:(e,t,n)=>{"use strict";n(4531)("replaceAll")},3057:e=>{"use strict";e.exports=function(e){return null==e}},3115:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find(e=>{let{id:t}=e;return n===t||r===t})}},3121:(e,t,n)=>{"use strict";var r=n(1203),o=n(8655),i=n(5547),a=o("species");e.exports=function(e){return i>=51||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},3131:()=>{},3178:(e,t,n)=>{"use strict";n.d(t,{a1:()=>i,a_:()=>r,l:()=>o});const r="DISMISS_PUSH_MESSAGE",o="SHOW_PUSH_MESSAGE",i="RESET_PUSH_MESSAGES"},3230:(e,t,n)=>{var r=n(6939),o=n(2471).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var n=e[r];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3243:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9155),o=n(541),i=n(8278);function a(){const{nudges:e}=(0,o.d4)(i.Od);return(0,r.useMemo)(()=>{var t,n,r,o,i;return[...null!==(t=null==e?void 0:e.form_nudges)&&void 0!==t?t:[],...null!==(n=null==e?void 0:e.custom_nudges)&&void 0!==n?n:[],...null!==(r=null==e?void 0:e.product_nudges)&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.text_nudges)&&void 0!==o?o:[],...null!==(i=null==e?void 0:e.multiple_choice_nudges)&&void 0!==i?i:[]]},[e])}},3273:(e,t,n)=>{"use strict";var r=n(1395),o=n(5426);e.exports=function(e){return r(o(e))}},3395:(e,t,n)=>{"use strict";n(9828),n(7935),n(3832),n(5799);var r=n(1355);e.exports=r.f("iterator")},3407:(e,t,n)=>{"use strict";var r=n(7312);n(1037),n(1342),n(5687),n(1669),e.exports=r},3410:(e,t,n)=>{"use strict";var r=n(5024),o=n(701),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},3436:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9749),o=n.n(r);const i=e=>{var t;if(!e)return!1;e=e.toLowerCase();try{const t=new Intl.Locale(e);if("function"==typeof t.getTextInfo)return"rtl"===t.getTextInfo().direction}catch{}return o()(t=["ar","he","fa","ur","ps","dv","syr","yi"]).call(t,e.split("-")[0])}},3473:(e,t,n)=>{"use strict";n.d(t,{X:()=>Re,A:()=>De});var r=n(9155),o=n.n(r),i=n(541),a=n(1308),s=n(1197),l=n(340),c=n(2848),u=n(1304),d=n(8278),f=n(1708),p=n(7912),h=n(8663),g=n(5394);const m=(0,s.AH)(["& > div,& > svg{z-index:3;}& > div{position:relative;display:flex;justify-content:center;align-items:center;}&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background-color:",";border-radius:48px;transition:all 0.2s ease;}&:hover{transition:border 240ms;background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:before{box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;transition:all 0.2s ease;filter:brightness(0.92);}}&:focus,&:active{background:linear-gradient(0deg,rgba(0,0,0,0.08) 0%,rgba(0,0,0,0.08) 100%),#fff;&:after{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;transition:border 240ms;border-radius:48px;content:'';}}@media ","{&:before{border-radius:0px;","}&:focus,&:active{&:after{border-radius:0px;","}}}"],e=>{let{$background:t}=e;return t||""},f.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"},e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),b=s.Ay.div.withConfig({componentId:"sc-9dlu7b-0"})(["pointer-events:auto;max-width:250px;box-shadow:0px 4px 8px 0px rgba(0,0,0,0.04),0px 0px 1px 0px rgba(0,0,0,0.16),0px 8px 48px 0px rgba(0,0,0,0.06);padding:6px 6px 6px 16px;justify-self:flex-end;border-radius:48px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;position:relative;z-index:2;transition:border 240ms;cursor:pointer;height:100%;color:",";"," @media ","{padding:0px 6px 0px 16px;box-shadow:none;border-right:1px solid rgba(0,0,0,0.08);border-radius:0px;","}"],e=>{let{$background:t}=e;return(0,h.w5)(t||"","#F2F2F2","#0D0D0D")},m,f.jO.maxPhone,e=>{let{$isLast:t}=e;return t&&"border-top-left-radius: 48px; border-bottom-left-radius: 48px;"}),v=s.Ay.div.withConfig({componentId:"sc-9dlu7b-1"})(["margin-right:8px;font-size:var(--_kindlychat-font-size-p);padding-top:9px;padding-bottom:9px;font-weight:500;"]),y=s.Ay.div.withConfig({componentId:"sc-9dlu7b-2"})(["display:flex;flex-direction:column-reverse;align-items:flex-end;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);transform-origin:bottom right;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"," @media ","{flex-direction:row;gap:0 !important;max-width:calc( 100vw - ","px );overflow-x:auto;transform-origin:right;overscroll-behavior:none;","}"],e=>{let{$open:t,$iconsCount:n}=e;return t?(0,s.AH)(["gap:8px;max-height:","px;opacity:1;transform:scale(1);"],n?60*n:0):(0,s.AH)(["gap:0px;max-height:0px;opacity:0;transform:scale(0.36);pointer-events:none;user-select:none;"])},f.jO.maxPhone,e=>{let{$buttonWidth:t}=e;return(t||0)+148},e=>{let{$open:t}=e;return!t&&(0,s.AH)(["max-width:0;"])}),x=s.Ay.div.withConfig({componentId:"sc-9dlu7b-3"})(["width:36px;height:36px;border-radius:50%;overflow:hidden;"]),w=s.Ay.img.withConfig({componentId:"sc-9dlu7b-4"})(["width:100%;height:100%;object-fit:cover;"]),k=s.Ay.div.withConfig({componentId:"sc-9dlu7b-5"})(["",";position:relative;transition:all 300ms ease;transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);"," display:grid;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}@media ","{display:flex;padding-left:16px;gap:0;pointer-events:all;&::before{width:100vw;height:458px;}}"],g.JP,e=>{let{$open:t}=e;return t?(0,s.AH)(["gap:8px;"]):(0,s.AH)(["gap:0;"])},f.jO.maxPhone),C=s.Ay.button.withConfig({componentId:"sc-9dlu7b-6"})(["outline:none;pointer-events:auto;justify-self:flex-end;margin-right:8px;border-radius:50%;overflow:hidden;display:flex;flex-direction:row;border:0;width:28px;height:28px;background-color:",";box-shadow:",";z-index:2;cursor:pointer;position:relative;"," justify-content:center;align-items:center;padding:0;@media ","{align-self:center;min-width:28px;margin-right:",";}"],e=>{let{$background:t}=e;return t||""},f.FR.level2,m,f.jO.maxPhone,e=>{let{$open:t}=e;return t?"8px;":"16px"});var S=n(4785),_=n(8832);const A=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-0"})(["z-index:",";border-radius:14px;background:",";background-color:",";margin-bottom:16px;box-shadow:",";",";@media ","{margin-left:20px;","}@media ","{margin-left:16px;}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},f.FR.level2,g.JP,f.jO.maxTablet,e=>{let{$bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"},f.jO.maxPhone),E=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-1"})(["width:max-content;max-width:360px;min-width:60px;padding:12px;pointer-events:auto;@media ","{width:unset;max-width:100%;}"],f.jO.maxPhone),T=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-2"})(["display:flex;cursor:pointer;align-items:center;"]),j=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin-right:15px;background:",";background-position:center;background-size:cover;background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),I=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-4"})(["margin:0;color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:var(--_kindlychat-font-size-p);}"],e=>{let{theme:t}=e;return(0,h.w5)(t.background,f.AV.light,f.AV.dark)},S.m.default,f.jO.maxTablet),O=(0,s.Ay)(_.$n).withConfig({componentId:"sc-1ihr6s7-5"})(["pointer-events:auto;z-index:",";display:flex;padding:4px;border-radius:50%;background:",";background-color:",";align-self:flex-end;margin-bottom:8px;",";",";&:before{background:",";background-color:",";}"],e=>e.$zIndex,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground},g.JP,m,e=>{let{theme:t}=e;return t.background||t.buttonBackground},e=>{let{theme:t}=e;return t.background||t.buttonBackground}),L=s.Ay.div.withConfig({componentId:"sc-1ihr6s7-6"})(["display:flex;flex-direction:column;"]);var P=n(1085);function N(e){let{agent:t}=e;const{agent_joined_text:n}=(0,c.A)();return(0,P.jsxs)(T,{children:[(0,P.jsx)(j,{style:{backgroundImage:`url(${t.avatar})`}}),(0,P.jsxs)(I,{children:[(0,P.jsx)("span",{children:t.name||"An agent"})," ",n]})]})}function M(e){let{text:t}=e;return(0,P.jsx)(T,{children:(0,P.jsx)(I,{dangerouslySetInnerHTML:{__html:t}})})}const z=function(e){let{settings:t}=e;const{bubbleSize:n}=(0,i.d4)(d.Od),{agent:o,show:c,text:g,type:m}=(0,i.d4)(d.zD),b=(0,i.wA)(),v=(0,p.A)(t,"zIndex",15),y=(0,s.DP)(),x=(0,r.useMemo)(()=>(0,h.w5)(y.background||y.buttonBackground||"#fff",f.AV.light,f.AV.dark),[y.background,y.buttonBackground]);return null===g&&"feedback"!==m?null:(0,P.jsxs)(L,{children:[(0,P.jsx)(O,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),b((0,u.gQ)())},type:"button",$zIndex:v,children:(0,P.jsx)(a.US,{color:x,width:20,height:20})}),(0,P.jsx)(A,{$bubbleSize:n,"aria-hidden":c?"false":"true","aria-label":"Chat bot push message",onClick:()=>b((0,u.lQ)()),role:"complementary",$zIndex:v,children:(0,P.jsxs)(E,{children:[m===u.oI.MESSAGE&&(0,P.jsx)(M,{text:g}),m===u.oI.HANDOVER&&(0,P.jsx)(N,{agent:o}),m===u.oI.FEEDBACK&&(0,P.jsx)(l.A,{})]})})]})};var R=n(5352);const $=(0,s.AH)(["width:",";height:",";object-fit:cover;border-radius:50%;transition:all 300ms ease;user-select:none;@media ","{","}"],e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},e=>{let{$globalIconsOpen:t,$active:n,$showGlobalIcons:r,$isGlobalIconsDelayed:o}=e;return t&&void 0!==o&&!o||t&&r&&o||n?"36px":"44px"},f.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?(0,s.AH)(["width:36px;height:36px;animation:none;"]):(0,s.AH)(["width:44px !important;height:44px !important;animation:none;"])}),D=s.Ay.img.withConfig({componentId:"sc-15ijr09-0"})(["",""],$),F=(0,s.Ay)(a.T4).attrs(e=>({color:e.theme.chatbubbleText})).withConfig({componentId:"sc-15ijr09-1"})(["",""],$),B=(e,t)=>{if(e)return e;switch(t){case R.Ns.EASTER:return"http://localhost:8081/src/assets/images/KindlyBlobEaster.416354e85b59801cd8f65529358b4e44.png";case R.Ns.PRIDE:return"http://localhost:8081/src/assets/images/KindlyBlobPride.c2ba2b3e79a5f9136a5293758623b7ab.png";case R.Ns.CHRISTMAS:return"http://localhost:8081/src/assets/images/KindlyBlobXmas.73597f52e165fee513b384bc70e98314.png";default:return null}},H=function(e){let{showGlobalIcons:t,isGlobalIconsDelayed:n}=e;const{seasonalAppearance:r,bubbleAvatar:o,bubbleSize:a}=(0,i.d4)(d.Od),{active:s}=(0,i.d4)(d.$P),{open:l}=(0,i.d4)(d.o3);return r||o?(0,P.jsx)(D,{"data-testid":"chat-bubble-logo",$globalIconsOpen:l,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:s,$smallBubble:"SMALL"===a,src:B(o,r),alt:""}):(0,P.jsx)(F,{"data-testid":"chat-bubble-logo",$globalIconsOpen:l,$showGlobalIcons:t,$isGlobalIconsDelayed:n,$active:s,$smallBubble:"SMALL"===a})};var U=n(6739);const V=(0,s.AH)(["white-space:nowrap;font-family:",";font-size:var(--_kindlychat-font-size-m);font-weight:500;"],S.m.default),W=s.Ay.div.withConfig({componentId:"sc-sdddjp-0"})(["position:absolute;left:-10000px;top:auto;user-select:none;pointer-events:none;visibility:hidden;",""],V),G=(0,r.forwardRef)((e,t)=>{var n;const{text:r,chatbubbleTextEnabled:o}=(0,i.d4)(d.Od),{currentLanguageCode:a}=(0,U.A)(),s=null===(n=r.chatbubble_text)||void 0===n?void 0:n[(null==a?void 0:a.split("-")[0])||"en"];return s&&o?(0,P.jsx)(W,{ref:t,"aria-hidden":"true",children:s}):null});G.displayName="HiddenButton";const q=G,K=e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case R.Ns.EASTER:return f.HM.sunglow;case R.Ns.CHRISTMAS:return f.HM.pomegranate;default:return f.Tj.white}return t.bubbleButtonBackground||t.buttonBackground},Y=s.Ay.div.withConfig({componentId:"sc-1kk1ok5-0"})(["margin-left:8px;margin-right:8px;transition:all 300ms ease;width:auto;max-width:","px;white-space:nowrap;"," color:",";@media ","{font-size:"," !important;}"],e=>{let{$buttonWidth:t}=e;return t},e=>{let{$globalIconsOpen:t,$active:n,$isGlobalIconsDelayed:r,$showGlobalIcons:o}=e;return n?(0,s.AH)(["max-width:0;margin-left:0;margin-right:0;"]):t&&void 0!==r&&!r||t&&o&&r?(0,s.AH)(["font-size:var(--_kindlychat-font-size-p);"]):(0,s.AH)(["font-size:var(--_kindlychat-font-size-m);"])},e=>{let{theme:t,$seasonalAppearance:n}=e;if(n)switch(n){case R.Ns.EASTER:return f.HM.sunglowDark;case R.Ns.CHRISTMAS:return f.HM.pomegranateDark;default:return f.AV.dark}const r=(0,h.w5)(t.bubbleButtonBackground,f.AV.light,f.AV.dark);return t.chatbubbleText||r},f.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?f.J.p:f.J.h5}),X=s.Ay.span.withConfig({componentId:"sc-1kk1ok5-1"})(["transition:opacity 150ms ease;opacity:",";",""],e=>{let{$active:t}=e;return t&&0},e=>{let{$active:t}=e;return!t&&"transition-delay: 150ms;"}),Q=s.Ay.div.withConfig({componentId:"sc-1kk1ok5-2"})(["display:flex;flex-direction:row;z-index:1;align-items:center;"]),Z=s.Ay.button.withConfig({componentId:"sc-1kk1ok5-3"})(["justify-self:flex-end;overflow:visible;display:flex;justify-content:center;align-items:center;cursor:pointer;pointer-events:auto;flex-direction:row;padding:","px;border-radius:",";border:none;box-shadow:",";position:relative;transition:all 0.25s;&:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background:",";border-radius:",";transition:all 0.2s ease;}&:after{content:'';left:2px;top:2px;position:absolute;width:calc(100% - 4px);height:calc(100% - 4px);background:",";border-radius:",";transition:all 0.2s ease;}&:hover{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}&:focus{transition:all 0.2s ease;filter:brightness(0.92);&:before{transition:all 0.2s ease;filter:brightness(0.88);}}@media ","{padding:","px !important;}@media ","{","}"],e=>{let{$hasButtonText:t,$globalIconsOpen:n,$showGlobalIcons:r,$active:o,$isGlobalIconsDelayed:i}=e;return t?o?6:""+(n&&void 0!==i&&!i||n&&r&&i?6:8):""+(o||n&&void 0!==i&&!i||n&&r&&i?6:8)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{let{$active:t}=e;return t?`0px 1px 5px 1px ${f.Tj.shadowColorDark}`:f.FR.level2},e=>{let{$bubbleOutline:t,theme:n,background:r,$seasonalAppearance:o}=e;return o?K({theme:n||{},$seasonalAppearance:o}):r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},e=>{const t={theme:e.theme||{},$seasonalAppearance:e.$seasonalAppearance};return K(t)},e=>{let{$hasButtonText:t}=e;return t?"48px":"50%"},f.jO.maxTablet,e=>{let{$smallBubble:t}=e;return t?6:8},f.jO.maxPhone,e=>{let{$globalIconsOpen:t,$showGlobalIcons:n}=e;return t&&n&&"\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n &:before, &:after {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n "}),J=(0,s.AH)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]);function ee(e){var t;let{showGlobalIcons:n,isGlobalIconsDelayed:o}=e;const{bubbleOutline:a,text:s,seasonalAppearance:l,chatbubbleTextEnabled:c,bubbleSize:f}=(0,i.d4)(d.Od),{currentLanguage:p,active:h,isChatFullWindow:g}=(0,i.d4)(d.$P),[m,b]=(0,r.useState)(0),{open:v}=(0,i.d4)(d.o3),y=(0,i.wA)(),x=(0,r.useRef)(null),w=null===(t=s.chatbubble_text)||void 0===t?void 0:t[(null==p?void 0:p.split("-")[0])||"en"];(0,r.useEffect)(()=>{var e;w&&c&&x.current&&b(null===(e=x.current)||void 0===e?void 0:e.clientWidth)},[w,c]);const k=h?"Close chat":"Open chat";return(0,P.jsx)(Z,{"aria-label":k,"aria-controls":"ChatButtonContainer",title:k,type:"button",$active:h,$globalIconsOpen:v,$isGlobalIconsDelayed:o,$showGlobalIcons:n,onClick:()=>y(h?(0,u.Rh)():(0,u.lQ)()),"data-testid":"chat-bubble-button","data-cy":"chat-bubble-button",$hasButtonText:!!w,$bubbleOutline:!!a,$smallBubble:"SMALL"===f,$seasonalAppearance:l,inert:!!g,children:(0,P.jsxs)(Q,{children:[!!w&&c&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(q,{ref:x}),m&&(0,P.jsx)(Y,{$buttonWidth:m,$active:h,$globalIconsOpen:v,$showGlobalIcons:n,$isGlobalIconsDelayed:o,$seasonalAppearance:l,$smallBubble:"SMALL"===f,children:(0,P.jsx)(X,{$active:h,children:w})})]}),(0,P.jsx)(H,{showGlobalIcons:n,isGlobalIconsDelayed:o})]})})}s.Ay.div.withConfig({componentId:"sc-1kk1ok5-4"})(["",";opacity:1;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");",";"],J,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),s.Ay.div.withConfig({componentId:"sc-1kk1ok5-5"})(["position:relative;",";"],J);const te=o().memo(ee);let ne,re,oe=!1;try{const e=window.AudioContext||window.webkitAudioContext;e&&(ne=new e)}catch(e){console.warn("AudioContext is not supported in this environment:",e)}async function ie(){var e;if(ne){if(!oe)try{oe=!0,re||(re=await async function(){if(!ne)throw new Error("AudioContext is not supported");const e=await fetch("http://localhost:8081/src/assets/audio/newagent.442793eb7365abe2d4df421936fd9e6b.mp3"),t=await e.arrayBuffer();return ne.decodeAudioData(t)}()),"suspended"===ne.state&&await ne.resume(),await(e=re,ne?new Promise(t=>{const n=ne.createBufferSource();n.buffer=e,n.connect(ne.destination),n.onended=()=>t(),n.start()}):Promise.reject(new Error("AudioContext is not supported")))}catch(e){console.error("Could not play notification sound:",e)}finally{oe=!1}}else console.warn("AudioContext is not supported, cannot play notification sound")}var ae=n(9159);const se=()=>{const{takenOver:e}=(0,i.d4)(d.MA),t=(0,ae.A)(e),{chatMessages:n}=(0,i.d4)(d.DZ),{active:o}=(0,i.d4)(d.$P),a=(0,ae.A)(n);(0,r.useEffect)(()=>{if(void 0!==t&&t!==e&&e&&ie(),a&&n.length>a.length){const e=n[n.length-1];e&&(e.from_bot||"SYSTEM"===e.sender)&&("visible"===document.visibilityState&&o||ie())}},[e,n.length,o])};var le=n(9749),ce=n.n(le),ue=n(5134),de=n(209),fe=n(5626);const pe=()=>{const[e,t]=(0,r.useState)(document.location.href);return(0,r.useEffect)(()=>{const n=()=>{setTimeout(()=>{e!==document.location.href&&t(document.location.href)},0)},r=setInterval(n,200),{navigation:o}=window;return o&&o.addEventListener&&(o.addEventListener("navigate",n),clearInterval(r)),()=>{o&&o.removeEventListener?o.removeEventListener("navigate",n):clearInterval(r)}},[e]),e},he=(e,t)=>Object.entries(e).reduce((n,r)=>{let[o,i]=r;return{...n,[o]:(0,de.A)(i,t),url:e.url,autopopup_time:e.autopopup_time}},{}),ge=[];var me=n(8668);const be=(0,s.AH)(["bottom:0px;right:0px;left:0;top:0px;"]),ve=s.Ay.div.withConfig({componentId:"sc-m0hsz7-0"})(["position:fixed;bottom:calc(",");right:calc(",");"," z-index:",";"," font-family:",";transform:",";transition:transform 0.3s ease;*{box-sizing:border-box;",";}"," "," --panel-background-white-black-contrast-1743170834:",";--chat-modal-background-white-black-contrast-1755953876:",";"],e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:R.bF.bottom}`},e=>{var t;let{$position:n}=e;return`${null!==(t=null==n?void 0:n.right)&&void 0!==t?t:R.bF.right}`},e=>{let{$fullscreen:t,$active:n}=e;return t&&n&&be},e=>(e.$zIndex||0)+5,e=>{let{$active:t}=e;return t&&(0,me.A)()&&be},e=>{let{theme:t}=e;return null!=t&&t.customFont?t.customFont:S.m.default},e=>{let{$shouldHideUI:t}=e;return t?"translateX(420px)":"none"},e=>{let{theme:t}=e;return(null==t?void 0:t.customFont)&&`font-family: ${t.customFont}`},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,s.AH)(["@media ","{bottom:2.5%;top:2.5%;right:5%;left:5%;border-radius:6px;box-shadow:",";}"],f.jO.maxTablet,f.FR.level2)},e=>{let{$active:t,$chatHasStarted:n}=e;return t&&n&&(0,s.AH)(["@media ","{bottom:0;top:0;right:0;left:0;}"],f.jO.maxTablet)},e=>{let{theme:t}=e;return(0,h.w5)(t.panelBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,h.w5)(t.background,"#FFFFFF","#000000")}),ye=s.Ay.div.withConfig({componentId:"sc-m0hsz7-1"})(["display:flex;flex-direction:row;justify-content:flex-end;position:relative;",""],e=>{let{$active:t}=e;return t&&(0,s.AH)(["@media ","{opacity:0;user-select:none;pointer-events:none;}"],f.jO.maxTablet)}),xe=s.Ay.div.withConfig({componentId:"sc-m0hsz7-2"})(["margin-bottom:24px;transform-origin:bottom right;height:100%;"," transition-timing-function:cubic-bezier(0.05,0.38,0.49,1);@media ","{","}@media ","{","}"],e=>{let{$active:t,$fullscreenMode:n,$duration:r=300}=e;return n?"":t?(0,s.AH)(["transform:scale(1) translateY(0);opacity:1;transition:","ms ease;"],r):(0,s.AH)(["transform:scale(0.24) translateY(200px);opacity:0;transition:","ms ease;"],r)},f.jO.maxPhone,e=>{let{$active:t}=e;return!t&&"width: 0;"},f.jO.maxTablet,e=>{let{$active:t,$chatHasStarted:n}=e;return t&&!n&&(0,s.AH)(["border-radius:6px;overflow:hidden;"])}),we=s.Ay.div.withConfig({componentId:"sc-m0hsz7-3"})(["height:15px;width:15px;z-index:50;right:0;top:0;position:absolute;border-radius:100px;background:",";background-color:",";",";"],f.Tj.errorColor,f.Tj.errorColor,g.cr),ke=s.Ay.div.withConfig({componentId:"sc-m0hsz7-4"})(["display:grid;gap:8px;position:relative;@media ","{gap:0px;"," ","}"],f.jO.maxPhone,e=>{let{$showGlobalIcons:t}=e;return t&&"grid-template-columns: auto auto;"},e=>{let{$showGlobalIcons:t,$globalIconsOpen:n}=e;return t&&n&&"\n &::before { \n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n content: '';\n background: rgba(0, 0, 0, 0.1);\n filter: blur(100px);\n }"}),Ce=s.Ay.button.withConfig({componentId:"sc-m0hsz7-5"})(["all:unset;position:fixed;display:flex;width:12px;height:24px;right:0;bottom:calc("," + 15px);align-items:center;justify-content:center;background:#fff;border:1px solid #e0e0e0;border-radius:4px 0 0 4px;transition:background 0.2s;cursor:pointer;&:hover{background:#f5f5f5;}&:focus-visible{outline:1px solid #0066cc;}"],e=>{var t;let{position:n}=e;return`${null!==(t=null==n?void 0:n.bottom)&&void 0!==t?t:R.bF.bottom}`});var Se=n(3243),_e=n(7559),Ae=n(5880);const Ee=function(e){let{color:t,...n}=e;return(0,P.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",...n,children:(0,P.jsx)("path",{d:"M4.75 5.75h14.5M4.75 18.25h14.5M4.75 12h14.5",stroke:t||"#0D0D0D",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})};function Te(e){var t,n,o;let{icons:s,settings:l}=e;const c=(0,i.wA)(),{currentLanguage:p,renderedBy:g}=(0,i.d4)(d.$P),{open:m}=(0,i.d4)(d.o3),[S,_]=(0,r.useState)();return(0,P.jsxs)(k,{$open:m,$seasonalAppearance:l.seasonal_appearance,children:[(0,P.jsx)(q,{ref:e=>{null!=e&&e.clientWidth&&!S&&_(e.clientWidth)}}),(0,P.jsx)(C,{onClick:()=>{c((0,u.nI)({open:!m}))},$seasonalAppearance:l.seasonal_appearance,$open:m,$background:null===(t=l.style)||void 0===t?void 0:t.color_global_icons_button_background,"aria-label":m?"Close menu":"Open menu",children:m?(0,P.jsx)(a.US,{width:20,height:20,color:(0,h.w5)((null===(n=l.style)||void 0===n?void 0:n.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)}):(0,P.jsx)(Ee,{width:20,height:20,color:(0,h.w5)((null===(o=l.style)||void 0===o?void 0:o.color_global_icons_button_background)||"#fff",f.AV.light,f.AV.dark)})}),(0,P.jsx)(y,{$buttonWidth:S,$iconsCount:s.length,$open:m,children:s.map((e,t)=>{var n;return(0,P.jsx)(b,{$isLast:0===t,$background:null===(n=l.style)||void 0===n?void 0:n.color_global_icons_button_background,onClick:()=>(async e=>{let{id:t,title:n,altText:r,imageUrl:o,buttonType:i,buttonAction:a}=e;(0,Ae.n6)({type:"trigger-globalicon",icon:{id:t,title:n,altText:r,imageUrl:o,type:i,action:a},renderedBy:g}),"DIALOGUE"===i&&await c((0,u.zh)(a,{languageCode:p,openChat:!0,tempId:void 0,responsePromise:void 0})),"NUDGE"===i&&await c((0,u.fe)({slug:a,nudgeLayout:void 0,trackEvent:!0})),"URL"===i&&window.open(a,"_blank")})(e),children:(0,P.jsxs)("div",{children:[(0,P.jsx)(v,{children:e.title}),e.imageUrl&&(0,P.jsx)(x,{children:(0,P.jsx)(w,{src:e.imageUrl,alt:e.altText})})]})},e.id)})})]})}const je=o().memo(Te);let Ie,Oe=function(e){return e.USER_INACTIVITY="USER_INACTIVITY",e.USER_SCROLLING="USER_SCROLLING",e}({}),Le=function(e){return e.BOTH="BOTH",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e}({}),Pe=!1;const Ne=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,8805))),Me=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,4079))),ze=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,946))),Re=300;let $e;function De(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:o,onNudgeFormSubmit:s,chatSettings:l}=e;const c=(0,i.wA)(),{active:f,inPlatform:h,currentLanguage:g,chatHasStarted:m}=(0,i.d4)(d.$P),[b,v]=(0,r.useState)(f),{show:y}=(0,i.d4)(d.zD),{show:x,nudgeLayout:w}=(0,i.d4)(d.G0),{bubbleNotification:k,position:C,fullscreenMode:S}=(0,i.d4)(d.Od),{showBubbleNotification:_}=(0,i.d4)(d.Cv),{open:A}=(0,i.d4)(d.o3),E=(0,p.A)(l,"fullscreenMode",!1),[T,j]=(0,r.useState)(!1),{globalIcons:I,isGlobalIconsDelayed:O}=function(e,t,n){var o;const a=pe(),{currentLanguage:s,globalIconsState:l,inPlatform:c}=(0,i.d4)(d.$P),f=(0,i.wA)(),[p,h]=(0,r.useState)(),g=(0,r.useCallback)(()=>{if(!c&&e.global_icons_enabled&&e.global_icons)return e.global_icons.filter(e=>e.enabled[s]).reduce((e,t)=>{let{url:n,enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l}=t;return n.forEach(t=>{e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:t})}),n.length||e.push({enabled:r,icons:o,title:i,trigger_after:a,trigger_on_device:s,trigger_rule:l,url:""}),e},[]).sort((e,t)=>e.url.length<t.url.length?1:-1).find(e=>{var t,n;if(!(0,me.A)()&&ce()(t=e.trigger_on_device).call(t,Le.DESKTOP)||(0,me.A)()&&ce()(n=e.trigger_on_device).call(n,Le.MOBILE))return(0,fe.A)(a,e.url)})},[c,e.global_icons,e.global_icons_enabled,s,a]),m=(0,r.useMemo)(()=>g(),[g]);(0,r.useEffect)(()=>{Pe&&e.global_icons_enabled&&h(m)},[t,m,e.global_icons_enabled]);const b=(0,r.useCallback)(e=>{const t=e.target;t.documentElement&&m&&(t.documentElement.scrollHeight-t.documentElement.clientHeight)*(m.trigger_after/100)<t.documentElement.scrollTop&&(h(m),Pe=!0)},[m]);return(0,r.useEffect)(()=>{p&&Pe&&Ie&&e.global_icons_enabled&&(Ie.removeEventListener("scroll",b),Ie=null)},[p,b,e.global_icons_enabled]),(0,r.useEffect)(()=>{var t;return!Pe&&e.global_icons_enabled&&(null===m&&h(void 0),m)&&(m.trigger_rule===Oe.USER_INACTIVITY&&(m.trigger_after>0&&!ce()(t=l.seenDelayedPages).call(t,m.url)?setTimeout(()=>{h(m),f((0,u.nI)({...l,seenDelayedPages:[...l.seenDelayedPages,m.url]})),Pe=!0},1e3*m.trigger_after):(h(m),Pe=!0)),m.trigger_rule!==Oe.USER_SCROLLING||Ie||(Ie=n instanceof Element?n:window.document,Ie.addEventListener("scroll",b))),()=>{Ie&&(Ie.removeEventListener("scroll",b),Ie=null)}},[e,s,n,f,l,m,b]),{globalIcons:p,isGlobalIconsDelayed:!ce()(o=l.seenDelayedPages).call(o,null==m?void 0:m.url)&&m&&m.trigger_after>0}}(l,f),L=(0,me.A)(),N=(0,p.A)(l,"zIndex",R.DP);(0,r.useEffect)(()=>{f&&_&&c((0,u.pK)()),f&&y&&c((0,u.gQ)())},[_,f,L,c,y]),se(),function(){const e=(0,ue.jL)(),[t,n]=(0,r.useState)("/"),[o,a]=(0,r.useState)(!1),{shownNudges:s}=(0,i.d4)(d.$P),l=(0,Se.A)();(0,r.useEffect)(()=>{n(window.location.href),null!=s&&s.length&&!o&&Array.from(new Set(s).values()).map(e=>l.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>(0,fe.A)(t,e.analytics_completion_page_path)).forEach(t=>{a(!0),e((0,u.vJ)({slug:t.slug,eventType:_e.oE})),e({type:_e.Kd,slug:t.slug})})},[e,t,l,s,o])}(),function(){const e=(0,ue.jL)(),{currentLanguageCode:t}=(0,U.A)(),{active:n,chatHasStarted:o}=(0,i.d4)(d.$P),{pushGreetingsEnabled:a,pushGreetings:s}=(0,i.d4)(d.Od),{dismissedMessages:l}=(0,i.d4)(d.zD),c=pe();(0,r.useEffect)(()=>{if(!a||!s||n||!t||o)return;const r=()=>(e,t)=>{const{show:n}=t().pushMessages;ge.length&&(n||(ge[0].autopopup_time>0?setTimeout(()=>{e((0,u.VP)(ge[0])),ge.shift()},ge[0].autopopup_time):(e((0,u.VP)(ge[0])),ge.shift())),ge.length&&setTimeout(()=>e(r()),Math.max(ge[0].autopopup_time,2e3)))};s.map(e=>he(e,t)).filter(e=>e.enabled&&!ce()(l).call(l,e.title)&&(0,fe.A)(c,e.url)).sort((e,t)=>t.url.length-e.url.length).forEach(e=>ge.push(e)),e(r())},[n,t,a,s,e,o,l,c])}(),function(){const e=(0,ue.jL)(),{currentLanguageCode:t}=(0,U.A)(),{active:n}=(0,ue.GV)(d.$P),{nudges:o}=(0,ue.GV)(d.Od),{show:i,hasBeenDismissed:a,slug:s}=(0,ue.GV)(d.G0),l=pe(),c=null==o?void 0:o.text_nudges;(0,r.useEffect)(()=>{!n&&t&&(null==c?void 0:c.length)>0&&(null!=c?c:[]).forEach(n=>!(i||a&&n.slug===s)&&!(!(0,fe.A)(l,n.url_trigger)||!n.enabled[t])&&e((0,u.mR)({nudge:n,languageCode:t})))},[n,t,e,l,c])}();const M=!f&&y&&!t,$=I&&!f&&!x&&l.global_icons_enabled&&!M,D=(0,ae.A)(f);return(0,r.useEffect)(()=>{!f&&D?($e&&clearTimeout($e),$e=setTimeout(()=>v(f),Re+10)):D!==f&&($e&&clearTimeout($e),v(f))},[D,f]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(ve,{$fullscreen:!!E,$active:f,$chatHasStarted:m,$inPlatform:h,$position:C,$zIndex:N,$shouldHideUI:T,id:"kindly-root",children:[(0,P.jsx)(xe,{$chatHasStarted:m,$fullscreenMode:S,$active:f,$duration:Re,children:b&&(0,P.jsx)(r.Suspense,{fallback:"",children:(0,P.jsx)(Ne,{settings:l})})}),M&&(0,P.jsx)(z,{settings:l}),x&&w&&(0,P.jsx)(r.Suspense,{fallback:"",children:(0,P.jsx)(Me,{hidden:t,layout:w,onDismiss:n,onNewsletterSubmit:s,onProductClick:o})}),(0,P.jsxs)(ye,{$inPlatform:h,$position:C,$zIndex:N,id:"ChatButtonContainer",$active:f,lang:g,children:[!f&&k&&_&&(0,P.jsx)(we,{}),!t&&(0,P.jsxs)(ke,{$showGlobalIcons:$,$globalIconsOpen:A,children:[h&&(0,P.jsx)(r.Suspense,{fallback:"",children:(0,P.jsx)(ze,{active:f})}),$&&(0,P.jsx)(je,{icons:I.icons,settings:l}),(0,P.jsx)(te,{showGlobalIcons:!!$,isGlobalIconsDelayed:O})]})]})]}),h&&(0,P.jsx)(Ce,{onClick:()=>j(e=>!e),children:T?(0,P.jsx)(a.A6,{stroke:"black"}):(0,P.jsx)(a.fl,{stroke:"black"})})]})}},3489:(e,t,n)=>{"use strict";var r=n(1003);e.exports=r("document","documentElement")},3491:(e,t,n)=>{"use strict";var r=n(3574),o=n(262),i=n(5426),a=n(1966);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3508:(e,t,n)=>{"use strict";var r=n(3999);e.exports=function(e,t,n,o){return o&&o.enumerable?e[t]=n:r(e,t,n),e}},3521:(e,t,n)=>{"use strict";var r=n(6100),o=n(1203),i=n(2769),a=n(8407),s=n(1003),l=n(2894),c=function(){},u=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.test(c),h=function(e){if(!i(e))return!1;try{return u(c,[],e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!u||o(function(){var e;return h(h.call)||!h(Object)||!h(function(){e=!0})||e})?g:h},3531:(e,t,n)=>{"use strict";var r=n(8900).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},3551:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>r.A,cS:()=>k.A,ZH:()=>ee,pd:()=>x,l6:()=>E,Ap:()=>w.A,TM:()=>te.A});var r=n(2327),o=n(9155),i=n(824),a=n(1197),s=n(8787),l=n(1708),c=n(8663),u=n(7638);const d=a.Ay.div.withConfig({componentId:"sc-5nmogf-0"})(["position:relative;display:flex;"]),f=a.Ay.div.withConfig({componentId:"sc-5nmogf-1"})(["padding:0 4px;position:absolute;top:50%;transform:translateY(-50%);font-size:var(--_kindlychat-font-size-p);display:"," ",";"],e=>{let{$show:t}=e;return t?"block;":"none;"},e=>{let{$adornmentPosition:t}=e;return"start"===t?"\n left: 10px;\n ":"\n left: auto;\n right: 10px;\n "}),p=a.Ay.input.withConfig({componentId:"sc-5nmogf-2"})([""," color:var(--panel-background-white-black-contrast-1743170834);padding:10px 16px;"," font-size:var(--_kindlychat-font-size-p);border-radius:18px;border:1px solid transparent;flex:1;&:focus{color:var(--panel-background-white-black-contrast-1743170834);box-shadow:none;border:1px solid ",";","}&::placeholder{color:",";opacity:0.5;}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}text-size-adjust:","%;",""],e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)},e=>{let{$adornmentWidth:t,$adornmentPosition:n,$hasMaxLength:r}=e;if("end"===n&&!r&&t)return`padding-right: ${t+10}px;`;if("start"===n&&t){let e=`padding-left: ${t+10}px;`;return r&&(e+="padding-right: 48px;"),e}return r?"padding-right: 56px;":void 0},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFF","#000")},(0,s.L9)(l.J.p),u.jq);var h=n(2816),g=n(2016),m=n(7376),b=n(8853),v=n(437),y=n(1085);const x=function(e){var t,n,r,a,s;let{autoComplete:l="off",name:c,type:u="text",register:x,validators:w,control:k,id:C,setError:S,clearErrors:_,trigger:A,adornment:E,adornmentPosition:T="end",...j}=e;const I=(0,v.G8)(w),O=(0,o.useRef)(null),{ref:L,onChange:P,...N}=x?x(c,I):{},[,M]=(0,o.useState)(!1),{errors:z,isSubmitted:R}=(0,i.lN)({name:c,control:k}),$=(0,m.A)({name:c,trigger:A,control:k,setError:S,clearErrors:_});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(d,{children:[E&&(0,y.jsx)(f,{ref:e=>{O.current=e,M(!0)},$show:!(null!==(t=I.maxLength)&&void 0!==t&&t.value&&"end"===T),$adornmentPosition:T,children:E}),(0,y.jsx)(p,{autoComplete:l,name:c,type:u.toLowerCase(),$adornmentPosition:T,$adornmentWidth:null===(n=O.current)||void 0===n?void 0:n.clientWidth,$hasMaxLength:!(null===(r=I.maxLength)||void 0===r||!r.value),id:C||c,...(0,v.NR)(I),...N&&{...N},onChange:e=>{null==P||P(e),$(e)},ref:L,"aria-errormessage":`error_${c}`,"aria-invalid":!(0,b.A)(z)&&R,...j}),!(null===(a=I.maxLength)||void 0===a||!a.value)&&k&&c&&(0,y.jsx)(h.A,{fieldName:c,control:k,maxLength:null===(s=I.maxLength)||void 0===s?void 0:s.value})]}),(0,y.jsx)(g.A,{control:k,name:c})]})};var w=n(660),k=n(7279),C=n(15);const S=a.Ay.div.withConfig({componentId:"sc-1ncnj7t-0"})(["position:relative;display:flex;"]),_=a.Ay.select.withConfig({componentId:"sc-1ncnj7t-1"})(["background-color:",";color:",";padding:9px 16px;padding-right:42px;border-radius:18px;border:1px solid transparent;outline:none;flex:1;display:inline-block;appearance:none;text-indent:1px;text-overflow:'';max-width:100%;& option{color:initial;}",""],e=>{let{theme:t}=e;return(0,s.Mo)(t.panelBackground,.08)},e=>{let{theme:t,$isPlaceholder:n}=e;return n?(0,c.w5)(t.panelBackground,"rgba(255, 255, 255, 0.46)","rgba(0, 0, 0, 0.46)"):(0,c.w5)(t.panelBackground,"#FFFFFF","#000000")},u.jq),A=a.Ay.div.withConfig({componentId:"sc-1ncnj7t-2"})(["position:absolute;right:20px;top:6px;width:10px;height:6px;pointer-events:none;user-select:none;svg path{stroke:",";}"],e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,"#FFFFFF","#000000")}),E=function(e){let{name:t,register:n,validators:r,control:o,id:a,setError:s,clearErrors:l,trigger:c,options:u,...d}=e;const f=(0,v.G8)(r),{ref:p,onChange:h,...b}=n?n(t,f):{},x=(0,i.FH)({name:t,control:o}),w=(0,m.A)({name:t,trigger:c,control:o,setError:s,clearErrors:l});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(S,{children:[(0,y.jsxs)(_,{name:t,type:"select",$isPlaceholder:""===x,id:a||t,...(0,v.NR)(f),...b&&{...b},onChange:e=>{null==h||h(e),w(e)},ref:p,...d,children:[d.placeholder&&(0,y.jsx)("option",{value:"",disabled:!0,hidden:!0,children:d.placeholder}),null==u?void 0:u.map((e,n)=>(0,y.jsx)("option",{value:e.value,children:e.label},`select-${t}-${e.id||n}`))]}),(0,y.jsx)(A,{children:(0,y.jsx)(C.A,{color:"#445265"})})]}),(0,y.jsx)(g.A,{control:o,name:t})]})};var T=n(9749),j=n.n(T),I=n(541),O=n(1308),L=n(9154),P=n(5765),N=n(5352),M=n(8964),z=n(6739),R=n(9159),$=n(8278),D=n(8256),F=n(209);const B=a.Ay.div.withConfig({componentId:"sc-ansydw-0"})(["position:relative;display:flex;flex-direction:column;"]),H=a.Ay.label.withConfig({componentId:"sc-ansydw-1"})(["padding:","px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;flex:1;border-radius:6px;color:var(--panel-background-white-black-contrast-1743170834);border:1px dashed ",";"," "," ",""],e=>{let{$hasError:t}=e;return t?13:24},e=>{let{theme:t}=e;return(0,c.w5)(t.panelBackground,t.buttonBackground,"rgba(0, 0, 0, 0.12)")},e=>{let{$hasError:t}=e;return t&&(0,a.AH)(["background-color:#f9ef94 !important;border:1px solid #f9ef94 !important;"])},u.jq,e=>{let{theme:t,$isOver:n}=e;return n&&(0,s.Mo)(t.panelBackground,.08)}),U=a.Ay.span.withConfig({componentId:"sc-ansydw-2"})(["font-size:var(--_kindlychat-font-size-sm);font-weight:500;pointer-events:none;line-height:16px;"]),V=a.Ay.input.withConfig({componentId:"sc-ansydw-3"})(["width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;"]),W=a.Ay.span.withConfig({componentId:"sc-ansydw-4"})(["color:",";"],e=>{let{theme:t}=e;return t.buttonBackground}),G=a.Ay.div.withConfig({componentId:"sc-ansydw-5"})(["margin-top:8px;display:flex;flex-direction:row;font-size:var(--_kindlychat-font-size-sm);color:var(--panel-background-white-black-contrast-1743170834);& svg > path{stroke:var(--panel-background-white-black-contrast-1743170834);}"]),q=a.Ay.div.withConfig({componentId:"sc-ansydw-6"})(["display:flex;flex-direction:column;& > div{word-break:normal;overflow-wrap:anywhere;}"]),K=a.Ay.div.withConfig({componentId:"sc-ansydw-7"})(["font-size:var(--_kindlychat-font-size-sm);"]),Y=a.Ay.div.withConfig({componentId:"sc-ansydw-8"})(["display:flex;flex-direction:row;align-items:center;margin-bottom:4px;line-height:16px;"]);var X=n(9933);const Q=e=>e.split(/\[(.*?)\]/).map((e,t)=>t%2!=0?(0,y.jsx)(W,{children:e},`file-${e}`):(0,y.jsxs)("span",{children:[" ",e]},`file-${e}`)),Z=e=>{if(e.length){const t=new DataTransfer;return e.forEach(e=>{t.items.add(e)}),t}},J=(e,t)=>{let[...n]=e,[...r]=t;const o=n;return r.forEach(e=>{o.some(t=>e.name===t.name&&e.size===t.size)||o.push(e)}),o},ee=function(e){var t,n,r,a;let{name:s,label:l,register:c,validators:u,control:d,id:f,setError:p,trigger:h,setValue:x,clearErrors:w,accept:k=N.oY,...C}=e;const{text:S}=(0,I.d4)($.Od),{currentLanguageCode:_}=(0,z.A)(),A=(0,v.G8)(u),E=(0,o.useRef)(null),T=(0,o.useCallback)(e=>e.length>5?"You can upload up to 5 files at a time.":"",[]),W=(0,o.useCallback)(e=>{if(e.length){const t=k.split(",").map(e=>e.replace("/*",""));if([...e].some(e=>!t.some(t=>e.name.endsWith(t))&&!j()(t).call(t,e.type.substring(0,e.type.indexOf("/")))))return`${(0,F.A)(S.file_supported_types,_)}: ${k}`}return""},[k,_,S.file_supported_types]),ee=(0,o.useCallback)(e=>e.length&&[...e].some(e=>e.size/D.aO>D.W7)?`${(0,F.A)(S.file_maximum_size,_)}: ${(0,D.B$)(D.W7*D.aO)}`:"",[_,S.file_maximum_size]),{ref:te,...ne}=c?c(s,A):{ref:void 0},re=(0,o.useRef)(null),{errors:oe,isSubmitted:ie}=(0,i.lN)({name:s,control:d}),ae=(0,R.A)(oe),se=(0,m.A)({name:s,trigger:h,control:d,setError:p,clearErrors:w}),[,le]=(0,o.useState)(null),[ce,ue]=(0,o.useState)([]),[de,fe]=(0,o.useState)(!1);return(0,M.A)("dragover",e=>{e.preventDefault()},re.current),(0,M.A)("dragenter",e=>{e.preventDefault(),fe(!0)},re.current),(0,M.A)("dragleave",e=>{e.preventDefault(),fe(!1)},re.current),(0,M.A)("drop",e=>{e.preventDefault();const t=J(ce,e.dataTransfer.files),n=W(e.dataTransfer.files)||T(t)||ee(e.dataTransfer.files);if(n)return null==p?void 0:p(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Z(t);return null==x||x(s,null==r?void 0:r.files,{shouldValidate:!0}),E.current&&null!=r&&r.files.length&&(E.current.files=r.files),fe(!1),!0},re.current),(0,M.A)("change",e=>{e.preventDefault();const t=J(ce,e.target.files),n=T(t)||ee(e.target.files);if(n)return null==p?void 0:p(s,{type:"custom",message:n});oe[s]&&(null==w||w(s)),ue(t);const r=Z(t);return E.current&&null!=r&&r.files.length&&(E.current.files=r.files),se(e),!0},E.current),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(B,{children:[(0,y.jsxs)(H,{"aria-describedby":f||s,ref:e=>{re.current=e,le(void 0)},$hasError:(null==oe?void 0:oe[s])&&"required"!==(null==oe||null===(t=oe[s])||void 0===t?void 0:t.type),$isOver:de,htmlFor:f||s,children:[(null===(n=oe||ae)||void 0===n||null===(r=n[s])||void 0===r?void 0:r.message)&&(0,y.jsxs)(Y,{children:[(0,y.jsx)(O.Fc,{width:18,height:18}),(0,y.jsx)(K,{children:null===(a=(oe||ae)[s])||void 0===a?void 0:a.message})]}),(0,y.jsx)(U,{children:Q(l)}),(0,y.jsx)(V,{multiple:!0,accept:k,name:s,type:"file",id:f||s,...(0,v.NR)(A),...ne&&{...ne},ref:e=>{E.current=e,te&&te(e)},"aria-errormessage":`error_${s}`,"aria-invalid":!(0,b.A)(oe)&&ie,"aria-hidden":"true",...C})]}),(0,y.jsxs)(G,{children:[(0,F.A)(S.file_limitation,_),(0,y.jsx)(P.A,{text:(0,y.jsxs)(q,{children:[(0,y.jsxs)("div",{children:[(0,F.A)(S.file_maximum_size,_),": ",(0,D.B$)(D.W7*D.aO)]}),(0,y.jsxs)("div",{children:[(0,F.A)(S.file_supported_types,_),": ",k]})]}),position:"top",children:(0,y.jsx)(L.A,{width:18,height:18})})]})]}),(0,y.jsx)(g.A,{control:d,name:s}),ce.map((e,t)=>(0,y.jsx)(X.A,{file:e,onRemove:()=>{const e=[...ce];e.splice(t,1),ue(e),null==x||x(s,e.length?e:void 0,{shouldValidate:!0})}},`${e.name}-${e.size}}`))]})};var te=n(1226)},3574:(e,t,n)=>{"use strict";var r=n(6100),o=n(814);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},3578:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},3592:(e,t,n)=>{"use strict";var r=n(5297);e.exports=r},3649:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(9749),o=n.n(r),i=n(5134),a=n(8418),s=n(9602);function l(){var e;const{currentLanguage:t}=(0,i.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:n,hasRequestedHandoverAtLeastOnce:r}=(0,i.GV)(e=>{let{agent:t}=e;return t}),{feedbackToSubmit:l,feedbacksAlreadyDisplayed:c}=(0,i.GV)(a.CJ),{botConversationFeedback:u,handoverConversationFeedback:d}=(0,s.A)(t),f=null===(e=null==u?void 0:u.allow_bot_feedback_after_handover_feedback)||void 0===e||e,p=u&&!o()(c).call(c,"bot_conversation")&&(!r||f);return{feedbackToDisplay:d&&n?d:p?u:null,feedbackToSubmit:l}}},3671:(e,t,n)=>{"use strict";var r=n(701),o=n(2769),i=n(2137),a=n(4275),s=n(2871),l=a("IE_PROTO"),c=Object,u=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=i(e);if(r(t,l))return t[l];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?u:null}},3678:(e,t,n)=>{"use strict";var r=n(1003),o=n(6100),i=r("Symbol"),a=i.keyFor,s=o(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==a(s(e))}catch(e){return!1}}},3753:(e,t,n)=>{"use strict";var r=n(4871),o=n(8900),i=n(7525),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.46.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},3773:(e,t,n)=>{"use strict";var r=n(908),o=n(3521),i=n(262),a=n(8655)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===s||r(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},3821:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r,n:()=>o});const r="ANNOUNCEMENT_SHOW",o="ANNOUNCEMENT_HIDE"},3832:(e,t,n)=>{"use strict";var r=n(5571).charAt,o=n(1139),i=n(8417),a=n(164),s=n(877),l="String Iterator",c=i.set,u=i.getterFor(l);a(String,"String",function(e){c(this,{type:l,string:o(e),index:0})},function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?s(void 0,!0):(e=r(n,o),t.index+=e.length,s(e,!1))})},3844:(e,t,n)=>{"use strict";e.exports=n(5994)},3855:(e,t,n)=>{"use strict";var r=n(9098),o=n(6100),i=n(5947),a=n(5426),s=n(1139),l=n(4240),c=o("".indexOf);r({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},3860:(e,t,n)=>{"use strict";n(4531)("matcher")},3906:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(209);function o(e,t){return Object.fromEntries(Object.entries(e).map(e=>{let[n,o]=e;return[n,"string"==typeof o?o:(0,r.A)(o,t)]}))}},3949:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>v});var o=n(9155),i=n.n(o),a=o.useLayoutEffect,s=function(e,t){"function"!=typeof e?e.current=t:e(t)},l={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},c=function(e){Object.keys(l).forEach(function(t){e.style.setProperty(t,l[t],"important")})},u=null,d=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize},f=function(){},p=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],h=!!document.documentElement.currentStyle;function g(e,t,n){var r,s,l=(r=n,s=i().useRef(r),a(function(){s.current=r}),s);o.useLayoutEffect(function(){var n=function(e){return l.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var m=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b=function(e,t){var n,a=e.cacheMeasurements,l=e.maxRows,b=e.minRows,v=e.onChange,y=void 0===v?f:v,x=e.onHeightChange,w=void 0===x?f:x,k=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,m),C=void 0!==k.value,S=o.useRef(null),_=function(e,t){var n=i().useRef();return i().useCallback(function(r){e.current=r,n.current&&s(n.current,null),n.current=t,t&&s(t,r)},[t])}(S,t),A=o.useRef(0),E=o.useRef(),T=function(){var e=S.current,t=a&&E.current?E.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,p.reduce(function(e,t){return e[t]=n[t],e},{})),o=r.boxSizing;return""===o?null:(h&&"border-box"===o&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){E.current=t;var n=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),u||((u=document.createElement("textarea")).setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),c(u)),null===u.parentNode&&document.body.appendChild(u);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(e){var t=e;u.style[t]=a[t]}),c(u),u.value=t;var l=d(u,e);u.value=t,l=d(u,e),u.value="x";var f=u.scrollHeight-o,p=f*n;"border-box"===s&&(p=p+o+i),l=Math.max(p,l);var h=f*r;return"border-box"===s&&(h=h+o+i),[l=Math.min(h,l),f]}(t,e.value||e.placeholder||"x",b,l),r=n[0],o=n[1];A.current!==r&&(A.current=r,e.style.setProperty("height",r+"px","important"),w(r,{rowHeight:o}))}};return o.useLayoutEffect(T),function(e,t){g(document.body,"reset",function(n){e.current.form===n.target&&t()})}(S,function(){if(!C){var e=S.current.value;requestAnimationFrame(function(){var t=S.current;t&&e!==t.value&&T()})}}),g(window,"resize",T),n=T,g(document.fonts,"loadingdone",n),o.createElement("textarea",r({},k,{onChange:function(e){C||T(),y(e)},ref:_}))},v=o.forwardRef(b)},3999:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},4047:(e,t,n)=>{"use strict";var r=n(9155),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,a=n)}var i,a,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var p=i(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},4079:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ke});var r=n(9155),o=n(541),i=n(1197);const a=i.Ay.div.withConfig({componentId:"sc-104frbp-0"})(["display:block;top:-100vh;left:-100vw;height:200vh;width:200vw;position:fixed;cursor:pointer;transition:all ease 1200ms;background:",";opacity:",";z-index:",";"],e=>{let{$backdrop:t}=e;return t.color||"#000"},e=>{let{$backdrop:t}=e;return t.opacity||.5},e=>{let{$backdrop:t}=e;return t.zIndex||-1});var s=n(1085);function l(e){let{backdrop:t,onClick:n}=e;return(0,s.jsx)(a,{onClick:n,$backdrop:t})}var c=n(5352),u=n(1304),d=n(8278),f=n(6739),p=n(3906),h=n(3243);function g(e){let{slug:t}=e;const[n,o]=(0,r.useState)({}),[i,a]=(0,r.useState)(!0),s=(0,h.A)(),{currentLanguageCode:l}=(0,f.A)();return(0,r.useEffect)(()=>{let e={};const n=s.find(e=>e.slug===t);var r;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=(0,p.A)(t,l);e[t.slug]=n.value}):e=(0,p.A)(n,l),a(Boolean(null==n||null===(r=n.text_blocks)||void 0===r?void 0:r.length)),o(e))},[s,l,t]),{textContent:n,hasTextContent:i}}const m=function(){const e=window.kindlyChat.APIRoot,t=(0,r.useRef)(e),{content:n,slug:i,onRendered:a}=(0,o.d4)(d.G0),{currentLanguageCode:s}=(0,f.A)(),{textContent:l,hasTextContent:c}=g({slug:i});return(0,r.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof n?n(l):n;if(c&&0===Object.keys(l).length)return;const r=document.createElement("div");r.innerHTML=e,t.current.appendChild(r),r.setAttribute("id","kindly-custom-nudge"),"function"==typeof a&&a(r)},[n,s,i,l,a,c]),null};var b=n(1949),v=n.n(b),y=n(1308);const x=i.Ay.div.withConfig({componentId:"sc-28ma63-0"})(["margin:24px;display:flex;flex-direction:column;"]);function w(e){let{html:t,slug:n}=e;const{textContent:r}=g({slug:n});return(0,s.jsx)(x,{children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}})})}var k=n(9338);const C=i.Ay.div.withConfig({componentId:"sc-1y03ray-0"})(["margin:24px;display:flex;flex-direction:column;"]),S=i.Ay.h2.withConfig({componentId:"sc-1y03ray-1"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:0 0 16px 0;"]),_=i.Ay.p.withConfig({componentId:"sc-1y03ray-2"})(["line-height:22px;margin:0px;"]),A=i.Ay.a.withConfig({componentId:"sc-1y03ray-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var E=n(7559),T=n(776);function j(e){let{buttons:t,slug:n}=e;const i=(0,o.wA)(),a=t.length>0,l=(0,r.useCallback)(()=>{i((0,T.vJ)({slug:n,eventType:E.MO}))},[i,n]);return a?(0,s.jsx)(C,{children:t.map((e,t)=>(0,s.jsx)(k.A,{button:e,isNudge:!0,onClick:l},`${e.value}-${t}`))}):null}function I(e){let{title:t,description:n,link:i,slug:a}=e;const l=(0,o.wA)(),c=(0,r.useCallback)(e=>{e.preventDefault(),l((0,T.vJ)({slug:a,eventType:E.MO})),window.location.href=e.target.getAttribute("href")},[a]);return(0,s.jsxs)(C,{children:[t&&(0,s.jsx)(S,{children:t}),n&&(0,s.jsx)(_,{children:n}),(null==i?void 0:i.location)&&(null==i?void 0:i.text)&&(0,s.jsx)(A,{href:i.location,onClick:c,children:i.text})]})}var O=n(8787);const L=i.Ay.div.withConfig({componentId:"sc-cguh8u-0"})(["margin:24px;display:flex;flex-direction:column;"]),P=i.Ay.div.withConfig({componentId:"sc-cguh8u-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=i.Ay.div.withConfig({componentId:"sc-cguh8u-2"})(["display:flex;flex-direction:column;"]),M=i.Ay.label.withConfig({componentId:"sc-cguh8u-3"})(["font-size:var(--_kindlychat-font-size-m);line-height:19px;margin-left:8px;margin-bottom:8px;"]),z=i.Ay.input.withConfig({componentId:"sc-cguh8u-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:var(--_kindlychat-font-size-p);background:rgba(0,0,0,0.08);background-color:rgba(0,0,0,0.08);&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],O.sF),R=i.Ay.button.withConfig({componentId:"sc-cguh8u-5"})(["cursor:pointer;box-shadow:none;height:44px;width:44px;padding:0;display:flex;align-items:center;justify-content:center;border:none;border-radius:100px;background:",";background-color:",";transition:opacity 0.1s ease-in;"," &:hover{opacity:0.8;}svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:",";}}"],e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,O.sF,e=>e.theme.buttonText);function $(e){let{buttonContent:t}=e;return(0,s.jsx)(R,{role:"button",title:t.title,type:"submit",children:(0,s.jsx)(y.qx,{width:24,height:24})})}function D(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:i,placeholder:a,required:l}=r;return(0,s.jsxs)(N,{children:[(0,s.jsx)(M,{children:o}),(0,s.jsx)(z,{"aria-label":a,name:o,placeholder:a,type:i||"text",value:t,onChange:e=>n(e.target.value),required:l})]})}var F=n(8833);function B(e){let{form:t,onNewsletterSubmit:n,slug:i}=e;const a=(0,o.wA)(),{dialogue:l,webhook:c}=(0,o.d4)(d.G0),{primaryLanguageCode:p,currentLanguageCode:h}=(0,f.A)(),[g,m]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),{success:y}=t;return(0,s.jsx)(L,{children:b&&y?(0,s.jsx)(_,{children:y}):(0,s.jsx)("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),m(""),!g.trim())return!1;if(l&&a((0,u.zh)(l,{openChat:!0,languageCode:h||p})),c){const t={event:e,email:g};a((0,F.et)(c,{method:"POST",body:t}))}if("function"==typeof n)try{n(e,g)}catch(e){console.error(e)}return a((0,u.vJ)({slug:i,eventType:E.MO})),v(!0)},children:(0,s.jsxs)(P,{children:[(0,s.jsx)(D,{value:g,setValue:m,inputContent:t.input}),(0,s.jsx)($,{buttonContent:t.button})]})})})}const H=i.Ay.div.withConfig({componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=i.Ay.div.withConfig({componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var V=n(5758);function W(e){let{choices:t,slug:n}=e;const r=(0,o.wA)(),{primaryLanguageCode:i,currentLanguageCode:a}=(0,f.A)(),{buttons:l}=t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(U,{}),(0,s.jsx)(H,{children:l.map(e=>{let{text:t,triggerDialogue:o}=e;return(0,s.jsx)(V.A,{text:t,onClick:()=>{return e=o,r((0,u.zh)(e,{openChat:!0,languageCode:a||i})),void r((0,T.vJ)({slug:n,eventType:E.MO,label:e}));var e}},`${t}-${o}`)})})]})}var G=n(166);v().shape({id:v().string.isRequired,title:v().string,description:v().string,image:v().string.isRequired,price:v().string});var q=n(1708),K=n(4785);const Y=i.Ay.a.withConfig({componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),X=i.Ay.div.withConfig({componentId:"sc-20xwq1-1"})(["display:flex;padding:2px;flex-direction:column;align-items:flex-start;overflow:hidden;"," @media ","{margin-right:16px;margin-bottom:3px;box-shadow:0px 1px 3px 0px ",";border-radius:8px;overflow:hidden;max-width:201px;&:first-child{margin-left:24px;}}"],O.sF,q.jO.maxPhone,q.Tj.shadowColor),Q=i.Ay.img.withConfig({componentId:"sc-20xwq1-2"})(["width:155px;height:155px;object-fit:cover;border-radius:8px;margin-bottom:8px;@media ","{width:201px;height:201px;border-radius:0;margin-bottom:0;}"],q.jO.maxPhone),Z=i.Ay.div.withConfig({componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.jO.maxPhone),J=(0,i.AH)(["font-size:var(--_kindlychat-font-size-p);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),ee=i.Ay.a.withConfig({componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;"],J),te=i.Ay.button.withConfig({componentId:"sc-20xwq1-5"})([""," padding:6px 0;border:none;cursor:pointer;margin-top:8px;width:100%;display:flex;align-items:center;justify-content:center;border-radius:100px;color:",";background:",";background-color:",";font-family:",";"],J,e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,K.m.default),ne=i.Ay.h3.withConfig({componentId:"sc-20xwq1-6"})([""," font-weight:500;"],J),re=i.Ay.p.withConfig({componentId:"sc-20xwq1-7"})([""," font-weight:400;"],J),oe=i.Ay.div.withConfig({componentId:"sc-20xwq1-8"})([""," font-weight:500;"],J);function ie(e){let{to:t,text:n,onClick:r}=e;return t?(0,s.jsx)(ee,{onClick:r,href:t,children:n}):(0,s.jsx)(te,{onClick:r,children:n})}const ae=function(e){var t,n,r,o,i,a;let{product:l,onProductClick:c}=e;const u=null!==(t=null==l?void 0:l.image)&&void 0!==t&&t,d=null!==(n=null==l?void 0:l.title)&&void 0!==n&&n,f=null!==(r=null==l?void 0:l.productUrl)&&void 0!==r&&r,p=null!==(o=null==l?void 0:l.description)&&void 0!==o&&o,h=(null==l?void 0:l.price)||!1,g=null!==(i=null==l?void 0:l.linkText)&&void 0!==i&&i,m=null!==(a=null==l?void 0:l.linkUrl)&&void 0!==a&&a;return(0,s.jsxs)(X,{children:[(0,s.jsxs)(Y,{href:f,children:[u&&(0,s.jsx)(Q,{src:u,alt:d}),(0,s.jsxs)(Z,{children:[d&&(0,s.jsx)(ne,{children:d}),p&&(0,s.jsx)(re,{children:p}),h&&(0,s.jsx)(oe,{children:h})]})]}),g&&(0,s.jsx)(ie,{to:m,text:g,onClick:e=>{if("function"==typeof c)try{c(e,l)}catch(e){console.error(e)}}})]})},se=i.Ay.div.withConfig({componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.jO.maxPhone),le=i.Ay.div.withConfig({componentId:"sc-vfg4fr-1"})(["position:relative;overflow:hidden;> div{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:auto;grid-gap:14px;transform:translate(0);",";}"],e=>e.active&&"\n position: relative;\n width: 1000%;\n display: flex;\n grid-gap: 0px;\n "),ce=i.Ay.h2.withConfig({componentId:"sc-vfg4fr-2"})(["font-size:var(--_kindlychat-font-size-m);font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.jO.maxPhone);var ue=n(5516);const de=function(e){var t,n;let{section:o,onProductClick:i}=e;const{width:a}=(()=>{const[e,t]=(0,r.useState)({width:void 0,height:void 0});return(0,r.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),l=parseInt(q.mb.phone.replace("px",""),10),c=null!==(t=null==o?void 0:o.items)&&void 0!==t?t:[],u=null!==(n=null==o?void 0:o.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:o=!0}=e;const[i,a]=(0,r.useState)(0),[s,l]=(0,r.useState)(0);return(0,r.useEffect)(()=>{t>=n&&o&&l(0)},[t,n,s,o]),{setIndex:(0,r.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;a(e),l(o)},[t,n]),imageIndex:i,carouselPosition:s}})({windowWidth:a,phoneWidth:l}),{handleTouchStart:h,handleTouchMove:g,handleTouchEnd:m}=(0,G.A)({carousel:c,index:f,setIndex:d});return(0,s.jsxs)(se,{children:[u&&(0,s.jsx)(ce,{children:u}),(0,s.jsx)(le,{active:a<l,children:(0,s.jsx)(ue.A,{carouselPosition:p,onTouchStart:h,onTouchMove:g,onTouchEnd:m,children:c.map(e=>(0,s.jsx)(ae,{product:e,onProductClick:i},e.id))})})]})},fe=e=>e||{location:"",text:""};function pe(e){var t,n;let{section:r,slug:i,onProductClick:a,onNewsletterSubmit:l}=e;const c=(0,o.wA)(),u=null!==(t=null==r?void 0:r.title)&&void 0!==t?t:"",d=null!==(n=null==r?void 0:r.description)&&void 0!==n?n:"",f=null==r?void 0:r.buttons,p=null==r?void 0:r.products,h=null==r?void 0:r.choices,g=null==r?void 0:r.form,m=null==r?void 0:r.link,b=null==r?void 0:r.html;return(0,s.jsxs)(s.Fragment,{children:[(u||d||m)&&(0,s.jsx)(I,{title:u,description:d,link:fe(m),slug:i}),f&&(0,s.jsx)(j,{buttons:f,slug:i}),h&&(0,s.jsx)(W,{choices:h,slug:i}),p&&(0,s.jsx)(de,{section:p,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?c((0,T.vJ)({slug:i,eventType:E.MO,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof a)try{a(e,t)}catch(e){console.error(e)}}}),g&&(0,s.jsx)(B,{form:g,onNewsletterSubmit:l,slug:i}),b&&(0,s.jsx)(w,{html:b,slug:i})]})}function he(e){var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:i}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>(0,s.jsx)(pe,{section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:i},`section-${t}`))}var ge=n(5394),me=n(8832);const be=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-0"})(["right:20px;bottom:",";z-index:10;position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";pointer-events:auto;",";",";@media ","{",";z-index:16;box-shadow:0 -3px 15px 1px ",";}"],e=>{let{bubbleHidden:t}=e;return t?"30px":"100px"},q.Tj.shadowColor,ge.JP,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},q.jO.maxPhone,e=>{let{modal:t}=e;return!t&&"\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 14px 14px 0 0;"},q.Tj.shadowColor),ve=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-1"})(["position:relative;padding:0px;max-width:380px;width:100%;max-height:calc(100vh - 150px);overflow-y:auto;",";@media ","{min-width:380px;}@media ","{min-width:100%;}"],e=>{let{modal:t}=e;return t&&"box-sizing: border-box"},q.jO.minTablet,q.jO.maxPhone),ye=(0,i.Ay)(me.$n).withConfig({componentId:"sc-1k0o2t4-2"})(["top:8px;right:8px;z-index:15;display:flex;padding:0;border-radius:100px;position:absolute;&:hover{opacity:0.8;}svg path{stroke:black;}@media ","{",";}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"top: 2px; right: 0;":"top: 8px; right: 8px;"}),xe=i.Ay.div.withConfig({componentId:"sc-1k0o2t4-3"})(["position:absolute;background:#fff;width:100%;height:100%;left:0;right:0;top:0;bottom:0;border-radius:14px;@media ","{border-radius:",";}&:before{content:'';width:50px;height:calc(100% - 8px);background:",";position:absolute;z-index:-1;top:4px;left:-4px;border-radius:25px;@media ","{width:calc(100% - 8px);height:50px;top:-4px;left:4px;}}"],q.jO.maxPhone,e=>{let{modal:t}=e;return t?"14px":"14px 14px 0 0"},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},q.jO.maxPhone),we=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:i,onProductClick:a,onNewsletterSubmit:l}=e;return(0,s.jsxs)(be,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-testid":"nudge-container","data-cy":"nudge-container","data-story":"NudgeContainer",children:[(0,s.jsx)(xe,{}),(0,s.jsx)(ye,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:i,type:"button","data-testid":"close-nudge-button","data-cy":"close-nudge-button",children:(0,s.jsx)(y.US,{width:25,height:25})}),(0,s.jsx)(ve,{children:(0,s.jsx)(he,{layout:o,slug:r,onProductClick:a,onNewsletterSubmit:l})})]})};function ke(e){var t;let{hidden:n,layout:r,onDismiss:i,onProductClick:a,onNewsletterSubmit:f}=e;const{show:p,nudgeType:h,slug:g}=(0,o.d4)(d.G0),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,v=(0,o.wA)(),y=e=>{if(e.stopPropagation(),v((0,u.Y_)()),"function"==typeof i)try{i(e)}catch(e){console.error(e)}};return(0,s.jsxs)(s.Fragment,{children:[b&&(0,s.jsx)(l,{backdrop:b,onClick:y}),h===c.MK.TEMPLATE&&(0,s.jsx)(we,{show:p,layout:r,slug:g,onDismiss:y,onProductClick:a,onNewsletterSubmit:f,bubbleHidden:n}),h===c.MK.CUSTOM&&(0,s.jsx)(m,{})]})}},4097:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var r=n(9155),o=n(541),i=n(1304),a=n(1308),s=n(5758),l=n(5134),c=n(1197),u=n(1708);const d=(0,c.AH)(["border-radius:100px;background-color:",";"],u.Tj.grayColor),f=c.Ay.div.withConfig({componentId:"sc-769ymc-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),p=c.Ay.div.withConfig({componentId:"sc-769ymc-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],u.Tj.shadowColor),h=c.Ay.div.withConfig({componentId:"sc-769ymc-2"})(["height:20px;width:110px;margin-left:20px;",""],d),g=c.Ay.div.withConfig({componentId:"sc-769ymc-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),m=c.Ay.span.withConfig({componentId:"sc-769ymc-4"})(["font-size:var(--_kindlychat-font-size-p);margin:16px 0 24px 0;",";"],e=>e.$heading&&"font-size: var(--_kindlychat-font-size-h4); font-weight: 400;\n margin: 0"),b=c.Ay.div.withConfig({componentId:"sc-769ymc-5"})(["height:","px;min-width:","px;",""],e=>e.$size,e=>e.$size,d),v=c.Ay.div.withConfig({componentId:"sc-769ymc-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],u.Tj.grayColor),y=c.Ay.div.withConfig({componentId:"sc-769ymc-7"})(["height:40px;width:100%;margin-right:20px;",""],d);var x=n(850),w=n(1085);const k=function(){const e=(0,l.jL)(),t=(0,r.useCallback)(()=>{e((0,i.ky)())},[e]);return(0,w.jsxs)(f,{children:[(0,w.jsxs)(p,{children:[(0,w.jsx)(b,{$size:30}),(0,w.jsx)(h,{}),(0,w.jsx)(x.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-testid":"close-chat-button",children:(0,w.jsx)(a.US,{width:25,height:25})})]}),(0,w.jsxs)(g,{children:[(0,w.jsx)(m,{$heading:!0,children:"Oh no..."}),(0,w.jsx)(m,{children:"We were unable to load the chat. Please refresh or try again later."}),(0,w.jsx)(s.A,{onClick:t,children:"Refresh chat"})]}),(0,w.jsxs)(v,{children:[(0,w.jsx)(y,{}),(0,w.jsx)(b,{$size:40})]})]})};class C extends r.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return e?{hasError:!0}:{}}componentDidCatch(e,t){var n;const{dispatch:r,errorPoint:o}=this.props,a=`Component tree crashed ${o}: ${e.message}`,s={errorName:e.name,errorMessage:e.message,errorStack:e.stack,point:o,componentStack:null==t||null===(n=t.componentStack)||void 0===n?void 0:n.trim()};r((0,i.Rm)({message:a,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?(0,w.jsx)(k,{}):e?null:t}}const S=(0,o.Ng)()(C)},4119:(e,t,n)=>{"use strict";n(4531)("species")},4174:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(7551),o=n.n(r),i=n(9749),a=n.n(i),s=n(5352),l=n(1080),c=n(9990),u=n(9982),d=n(3115),f=n(8094),p=n(6122),h=n(6885),g=n(8833);const m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n.replace(/_\w/g,e=>e[1].toUpperCase())]:r}},{})},b=e=>{let{status:t}=e;return t!==s.Le.PROCESSING},v=()=>async(e,t)=>{const{agent:{takenOver:n,requestedHandoverAt:r,handoverWaitTimeEstimate:o,handoverQueuePosition:i},chatbubble:{startedAt:a,chatHasStarted:v},connection:{token:y},environment:{PAT_HOST:x},messages:{attachments:w,buttonClicks:k,chatMessages:C,messageSentTime:S}}=t();if(!y||!v)return;const[_]=C.filter(e=>{let{from_bot:t}=e;return t}).slice(-1),[A]=w.filter(b).slice(-1),E=((e,t)=>{let{created:n}=e,{created:r}=t;return n&&r?new Date(n)>new Date(r)?n:r:n||r})(null!=_?_:{},null!=A?A:{})||S||a;if(!E)throw new Error("No timestamp found for latest messages");const T=await e((0,g.et)(`${x}/chatbubble/${s.Ak}/latest?timestamp=${E}`,{method:"GET",...(0,c.A)({token:y})},{onError:t=>{var n;403===(null===(n=t.response)||void 0===n?void 0:n.status)?(console.warn(`/chatbubble/${s.Ak}/latest returned 403, starting new chat`),e({type:p.MO,error:403}),N.getInstance().getConnection().restart(!0)):console.error(t)}}));if(!T||!T.data)return;const{chatMessages:j,buttonClicks:I=[],takenOver:O,requestedHandoverAt:L,attachments:P,externalHandoverState:M,handoverWaitTimeEstimate:z,handoverQueuePosition:R}=T.data;if(!Array.isArray(j))return;const $=(0,d.A)(C),D=(0,l.A)(k),F=j.filter($),B=I.map(m).filter(D);var H,U;return e((e=>async(t,n)=>{if((null==e?void 0:e.length)>0)return;const{attachments:r=[]}=n().messages,{newAttachments:o=[],updated:i=[]}=(0,u.A)(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>{let{sender:t,status:n}=e;return t===s.bS.USER||n===s.Le.CLEAN})}(e),e=>r.find((e=>{let{id:t,temporaryId:n}=e;return e=>{let{id:r,temporaryId:o}=e;return t&&t===r||n&&n===o}})(e))?"updated":"newAttachments");o.length>0&&t({type:f.Os,data:{attachments:o}}),i.length>0&&t({type:f.tS,data:{attachments:i}})})(P)),n!==O&&e({type:h.II,data:{taken_over:O,supports_attachment:null==M?void 0:M.supports_attachment,requested_handover_at:L}}),r!==L&&e({type:h.nz,data:{requested_handover_at:L,handover_wait_time_estimate:z,handover_queue_position:R}}),o===z&&i===R||e({type:h.AQ,data:{handover_wait_time_estimate:z,handover_queue_position:R}}),(H=F,U="created",(H||[]).slice().sort((e,t)=>e[U]<t[U]?-1:1)).forEach(t=>{e({type:f.tq,data:t})}),B.forEach(t=>e({type:f.Y6,buttonClick:t})),T.data};var y=n(46),x=n(1304),w=n(339),k=n(4390);let C=function(e){return e[e.CONNECTED=0]="CONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.DISCONNECTED=2]="DISCONNECTED",e}({});class S extends y.EventEmitter{constructor(e){super(),o()(this,"store",null),o()(this,"dispatch",null),o()(this,"unsubscribeStore",()=>{}),o()(this,"state",C.DISCONNECTED),o()(this,"previousUserIsIdle",null),o()(this,"providerName",void 0),this.store=e;const{dispatch:t}=e;this.dispatch=t,this.storeSubscribe()}getConnectionState(){return this.state}setState(e){var t;this.state!==e&&(this.state=e,e===C.CONNECTED&&(null===(t=this.dispatch)||void 0===t||t.call(this,v())))}async handleIdleState(e){this.previousUserIsIdle!==e&&(this.emit("idle-state-changed",e),this.previousUserIsIdle=e),e&&this.state===C.CONNECTED&&this.destroy()}async handleStoreSubscribe(){const e=this.getState();if(!e)return;const{chatbubble:{chatHasStarted:t,userIsIdle:n},messages:{messageSentTime:r,chatMessages:o},bot:{persistStateLifespan:i},connection:{token:a}}=e,s=function(e){let{chatHasStarted:t,token:n,chatMessages:r,messageSentTime:o,persistStateLifespan:i}=e;return!(!(t&&n&&r&&r.length>0)||o)||function(e){let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!1;if(0===n)return!0;const e=new Date(t);return new Date(e.getTime()+1e3*n)<new Date}return!1}({messageSentTime:o,persistStateLifespan:i})}({chatHasStarted:t,token:a,chatMessages:o,messageSentTime:r,persistStateLifespan:i}),l=t&&a&&this.state!==C.CONNECTED&&this.state!==C.CONNECTING&&!n;await this.handleIdleState(n),s?this.endChat():l&&await this.connect()}async storeSubscribe(){var e;await this.handleStoreSubscribe(),this.unsubscribeStore=null===(e=this.store)||void 0===e?void 0:e.subscribe(this.handleStoreSubscribe.bind(this))}getState(){const{getState:e}=this.store||{};return!!e&&e()}getToken(){const e=this.getState();if(!e)return!1;const{connection:t}=e;return t.token}async connect(){let{shouldGreet:e,triggerConfig:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!window.navigator.onLine||this.state===C.CONNECTING||this.state===C.CONNECTED)return;this.setState(C.CONNECTING);const n=this.getState();if(!n)return;const{connection:{token:r},chatbubble:{chatHasStarted:o,userIsIdle:i}}=n;i||(r||await this.connectToBackend(t||{shouldGreet:e||o}),await this.connectToServer())}destroy(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;this.state!==C.DISCONNECTED&&(this.disconnect(),e&&(null===(t=this.unsubscribeStore)||void 0===t||t.call(this)),this.previousUserIsIdle=null,this.setState(C.DISCONNECTED))}async connectToBackend(e){try{var t;await(null===(t=this.dispatch)||void 0===t?void 0:t.call(this,(0,k.m)(e)))}catch(e){console.error("Failed to connect to backend:",e)}}endChat(){var e;const{chatbubble:t}=this.getState()||{},{botKey:n}=t||{};null===(e=this.dispatch)||void 0===e||e.call(this,(0,g.zX)(n)),this.destroy(!0)}async restart(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getState(),{botKey:n,active:r}=(null==t?void 0:t.chatbubble)||{};var o,i;(n&&await(null===(o=this.dispatch)||void 0===o?void 0:o.call(this,(0,g.zX)(n,e))),this.destroy(!1),e)&&(r||null===(i=this.dispatch)||void 0===i||i.call(this,(0,x.lQ)()),await this.connect())}async connectToServer(){var e,t;this.getToken()&&(await(null===(e=this.dispatch)||void 0===e?void 0:e.call(this,(0,w.JL)())),await(null===(t=this.dispatch)||void 0===t?void 0:t.call(this,(0,w.Mx)())),this.connectToProvider())}emitError(e){this.emit("error",e)}emitSuccess(){this.emit("connected")}}class _{constructor(){o()(this,"providers",new Map)}register(e,t){this.providers.set(e,t)}createProvider(e,t){const n=this.providers.get(e);if(!n)throw new Error(`Unknown provider type: ${e}. Available providers: ${this.getSupportedProviders().join(", ")}`);return n(t)}getSupportedProviders(){return Array.from(this.providers.keys())}hasProvider(e){return this.providers.has(e)}}var A=n(4953),E=n.n(A),T=n(4497);class j extends S{constructor(e){super(e),o()(this,"providerName","PusherRedux"),o()(this,"config",void 0),o()(this,"pendingFunctions",void 0),o()(this,"pusherLocalStorageKey","pusherTransportEncrypted"),o()(this,"boundPusherConnected",void 0),o()(this,"boundPusherConnecting",void 0),o()(this,"boundPusherDisconnected",void 0),o()(this,"boundPusherUnavailable",void 0),o()(this,"boundPusherFailed",void 0),o()(this,"boundPusherError",void 0),o()(this,"subscribePusherChannels",()=>{if(!this.store)return void this.emitError(new Error("Pusher store is not initialized"));const e=this.getToken();e?(this.config.channelName=`private-chatbubble-${e}`,Object.entries(T.u_).forEach(e=>{let[t,n]=e;this.subscribe(this.config.channelName,t,n)})):this.emitError(new Error("Pusher token is not initialized"))}),this.config={socket:null,options:null,subscriptions:{},channelName:""},this.pendingFunctions=[],this.boundPusherConnected=this.pusherConnected.bind(this),this.boundPusherConnecting=this.pusherConnecting.bind(this),this.boundPusherDisconnected=this.pusherDisconnected.bind(this),this.boundPusherUnavailable=this.pusherUnavailable.bind(this),this.boundPusherFailed=this.pusherFailed.bind(this),this.boundPusherError=this.pusherError.bind(this)}static getInstance(e){if(!j.pusherInstance){if(!e)throw new Error("Store is required to create a new connection");j.pusherInstance=new j(e)}return j.pusherInstance}connectToProvider(){try{const e=this.getState();if(!e)throw new Error("State is not initialized");const{bot:{disabledTransports:t},connection:{token:n},environment:{VERSION:r,PAT_HOST:o}}=e,i=JSON.parse(window.localStorage.getItem(this.pusherLocalStorageKey)||"{}");t.indexOf("ws")<0&&i&&"ws"!==i.transport&&window.localStorage.removeItem(this.pusherLocalStorageKey),this.initialisePusher({channelAuthorization:{transport:"ajax",endpoint:`${o}/chatbubble/${s.Ak}/auth/pusher`,headers:{"kindly-chatbubble-token":n,"Current-Url":window.location.href,"kindly-chat-version":r}},cluster:"eu",disableStats:!0,pongTimeout:7500,disabledTransports:t}),this.subscribePusherChannels()}catch(e){this.emitError(e)}}pusherAction(e){const t={type:e.actionType};return e.channelName&&(t.channel=e.channelName),e.eventName&&(t.event=e.eventName),e.data&&(t.data=e.data),e.additionalParams&&(t.additionalParams=e.additionalParams),t}runPending(){for(;this.state===C.CONNECTED&&this.pendingFunctions.length>0;){const e=this.pendingFunctions.shift();e&&e()}}addToQueue(e){this.pendingFunctions.push(e)}pusherConnected(){this.setState(C.CONNECTED),this.runPending(),this.emitSuccess()}pusherConnecting(){this.setState(C.CONNECTING)}pusherDisconnected(){this.setState(C.DISCONNECTED)}pusherUnavailable(){this.setState(C.DISCONNECTED)}pusherFailed(){this.setState(C.DISCONNECTED),this.emitError(new Error("Pusher connection failed. Channel not supported."))}pusherError(e){this.setState(C.DISCONNECTED),this.emitError(e)}bindToPusherConnectionEvents(){this.config.socket?(this.config.socket.connection.bind("connected",this.boundPusherConnected),this.config.socket.connection.bind("connecting",this.boundPusherConnecting),this.config.socket.connection.bind("disconnected",this.boundPusherDisconnected),this.config.socket.connection.bind("unavailable",this.boundPusherUnavailable),this.config.socket.connection.bind("failed",this.boundPusherFailed),this.config.socket.connection.bind("error",this.boundPusherError)):this.emitError(new Error("Pusher socket is not initialized"))}unbindFromPusherConnectionEvents(){this.config.socket&&(this.config.socket.connection.unbind("connected",this.boundPusherConnected),this.config.socket.connection.unbind("connecting",this.boundPusherConnecting),this.config.socket.connection.unbind("disconnected",this.boundPusherDisconnected),this.config.socket.connection.unbind("unavailable",this.boundPusherUnavailable),this.config.socket.connection.unbind("failed",this.boundPusherFailed),this.config.socket.connection.unbind("error",this.boundPusherError))}initialisePusher(e){var t;const n=null===(t=this.getState().environment)||void 0===t?void 0:t.PUSHER_KEY;n?(this.config.socket=new(E())(n,e),this.config.socket.connection.bind("error",e=>{const t=(null==e?void 0:e.message)||"Unknown connection error";this.emitError(new Error(`Pusher connection error: ${t}`))}),this.bindToPusherConnectionEvents()):this.emitError(new Error("Pusher API key is not initialized"))}subscribe(e,t,n,r){this.addToQueue(()=>{try{var o;if("connected"===(null===(o=this.config.socket)||void 0===o?void 0:o.connection.state)){const o=this.config.socket.channel(e)||this.config.socket.subscribe(e);if(o.bind("pusher:subscription_error",t=>{const n=(null==t?void 0:t.message)||"Unknown subscription error";this.emitError(new Error(`Pusher subscription error for channel ${e}: ${n}`))}),this.config.subscriptions[e]||(this.config.subscriptions[e]={}),this.config.subscriptions[e][t]||(this.config.subscriptions[e][t]={}),!this.config.subscriptions[e][t][n]){const i=o=>{var i;null===(i=this.dispatch)||void 0===i||i.call(this,this.pusherAction({actionType:n,channelName:e,eventName:t,data:o,additionalParams:r}))};this.config.subscriptions[e][t][n]=i,o.bind(t,i)}}}catch(n){throw new Error(`Failed to subscribe to Pusher channel ${e} and event ${t}`)}})}unsubscribe(e,t,n){this.addToQueue(()=>{try{if(this.config.socket){const r=this.config.socket.channel(e);if(!r)return void console.error(`Not subscribed to '${e}'`);const o=this.config.subscriptions[e];if(!o)return void console.error(`No subscription in '${e}'`);const i=o[t];if(!i)return void console.error(`Not subscribed event '${t}' from '${e}'`);const a=i[n];if(!a)return void console.error(`Handler for ${n} not found for event '${t}' from '${e}'`);r.unbind(t,a),delete i[n]}}catch(e){}})}unsubscribePusherChannels(){this.store&&this.config.socket&&this.state===C.CONNECTED&&(Object.entries(T.u_).forEach(e=>{let[t,n]=e;this.unsubscribe(this.config.channelName,t,n)}),this.runPending())}disconnect(){this.config.socket&&(this.unsubscribePusherChannels(),this.unbindFromPusherConnectionEvents(),this.config.socket.disconnect(),this.config.socket=null),this.pendingFunctions=[]}static resetInstance(){j.pusherInstance&&j.pusherInstance.disconnect(),j.pusherInstance=null}}o()(j,"pusherInstance",null);const I=j;class O extends S{constructor(e){var t;super(e),o()(this,"providerName","Sse"),o()(this,"evtSource",null),o()(this,"pingChecker",null),o()(this,"lastPingTime",0),o()(this,"botKey",""),o()(this,"boundHandleConnected",void 0),o()(this,"boundHandleError",void 0),o()(this,"sseEventHandler",e=>{let t,{data:n,type:r}=e;try{t=JSON.parse(n)}catch(e){return void this.emitError(new Error("Failed to parse SSE message: "+(e instanceof Error?e.message:String(e))))}finally{var o;null===(o=this.dispatch)||void 0===o||o.call(this,{type:T.u_[r],data:t})}}),o()(this,"pingHandler",()=>{this.lastPingTime=Date.now()});const n=this.getState();null!=n&&null!==(t=n.chatbubble)&&void 0!==t&&t.botKey?this.botKey=n.chatbubble.botKey:this.emitError(new Error("SSE: Unable to retrieve botKey from state")),this.boundHandleConnected=this.handleConnected.bind(this),this.boundHandleError=this.handleError.bind(this)}static getInstance(e){if(!O.sseInstance){if(!e)throw new Error("SSE: Store is required to create a new connection");O.sseInstance=new O(e)}return O.sseInstance}subscribeToSseChannels(){var e;Object.keys(T.u_).forEach(e=>{this.evtSource&&this.evtSource.addEventListener(e,this.sseEventHandler)}),null===(e=this.evtSource)||void 0===e||e.addEventListener("ping",this.pingHandler),this.lastPingTime=Date.now(),this.pingChecker=setInterval(()=>{Date.now()-this.lastPingTime>35e3&&(console.warn("Connection may be stale. Reconnecting..."),this.disconnect(),this.connectToProvider())},5e3)}unsubscribeToSseChannels(){var e;Object.keys(T.u_).forEach(e=>{this.evtSource&&this.evtSource.removeEventListener(e,this.sseEventHandler)}),null===(e=this.evtSource)||void 0===e||e.removeEventListener("ping",this.pingHandler)}handleConnected(){this.setState(C.CONNECTED),this.subscribeToSseChannels(),this.emitSuccess()}handleError(e){var t;if((null===(t=this.evtSource)||void 0===t?void 0:t.readyState)===EventSource.CONNECTING)this.setState(C.CONNECTING);else{var n,r,o,i;const e=null!==(n=null===(r=this.evtSource)||void 0===r?void 0:r.readyState)&&void 0!==n?n:"unknown",t=null!==(o=null===(i=this.evtSource)||void 0===i?void 0:i.url)&&void 0!==o?o:"unknown";this.emitError(new Error(`SSE connection failed: readyState=${e}, url=${t}`))}}handleEvtSourceStates(){this.evtSource&&(this.evtSource.addEventListener("open",this.boundHandleConnected),this.evtSource.addEventListener("error",this.boundHandleError))}handleEventSourceDisconnectingStates(){this.evtSource&&(this.evtSource.removeEventListener("open",this.boundHandleConnected),this.evtSource.removeEventListener("error",this.boundHandleError))}connectToProvider(){const e=this.getState();if(!e)return;const{environment:{PAT_HOST:t},connection:{token:n}}=e;this.disconnect(),this.evtSource=new EventSource(`${t}/chatbubble/v2/sse?token=${n}&botKey=${this.botKey}`),this.handleEvtSourceStates()}disconnect(){this.evtSource&&(this.handleEventSourceDisconnectingStates(),this.unsubscribeToSseChannels(),this.evtSource.close(),this.evtSource=null,this.pingChecker&&(clearInterval(this.pingChecker),this.pingChecker=null)),this.lastPingTime=0}static resetInstance(){O.sseInstance&&O.sseInstance.disconnect(),O.sseInstance=null}}o()(O,"sseInstance",null);const L=O;class P{constructor(e){o()(this,"connection",null),o()(this,"isInitialized",!1),o()(this,"erroredProviders",window.WebSocket?["Sse"]:["PusherRedux","Sse"]),o()(this,"store",null),o()(this,"providerFactory",void 0),o()(this,"getLatestTimeout",null),o()(this,"_currentPollingInterval",null),o()(this,"expectingReply",!1),o()(this,"userIsIdle",!1),o()(this,"handleIdleStateChanged",e=>{this.userIsIdle=e,this.updatePollingStrategy()}),o()(this,"handleConnectionError",e=>{var t;if(!this.connection||!this.store||a()(t=this.erroredProviders).call(t,this.connection.providerName))return;const n=this.connection.providerName;this.erroredProviders.push(n);const r=this.providerFactory.getSupportedProviders().find(e=>{var t;return!a()(t=this.erroredProviders).call(t,e)});r&&setTimeout(()=>{var e;if(!this.connection)return;const t=this.connection.getToken();this.connection.off("error",this.handleConnectionError),this.connection.off("connected",this.handleConnectionSuccess),this.connection.off("idle-state-changed",this.handleIdleStateChanged),this.connection.destroy(!0),this.connection=null,!a()(e=this.erroredProviders).call(e,r)&&t&&(this.connection=this.createProvider(r),this.monitorConnection(),this.connection.connect())},0)}),o()(this,"handleConnectionSuccess",()=>{this.userIsIdle=!1,this.connection&&this.updatePollingStrategy()}),this.providerFactory=e||this.createDefaultProviderFactory()}createDefaultProviderFactory(){const e=new _;return e.register("Sse",e=>L.getInstance(e)),e.register("PusherRedux",e=>I.getInstance(e)),e}static getInstance(e){return P.instance||(P.instance=new P(e)),P.instance}initialize(e){if(this.isInitialized)throw new Error("Connection has already been initialized.");if(!e)throw new Error("Store must be provided for Connection initialization.");this.store=e;try{var t,n;const r=e.getState(),o=null!==(t=null==r||null===(n=r.bot)||void 0===n?void 0:n.sseEnabled)&&void 0!==t&&t?"Sse":"PusherRedux";this.connection=this.createProvider(o),this.isInitialized=!0,this.monitorConnection()}catch(e){throw this.isInitialized=!1,this.connection=null,new Error(`Failed to initialize connection: ${e instanceof Error?e.message:String(e)}`)}}createProvider(e){if(!this.store)throw new Error("Store is not available to create a provider");return this.providerFactory.createProvider(e,this.store)}async monitorConnection(){this.connection&&(this.connection.on("error",this.handleConnectionError),this.connection.on("connected",this.handleConnectionSuccess),this.connection.on("idle-state-changed",this.handleIdleStateChanged),this.updatePollingStrategy())}getConnection(){if(!this.isInitialized||!this.connection)throw new Error("Connection is not initialized or initialization failed. Call initialize() first.");return this.connection}getIsInitialized(){return this.isInitialized}setExpectingReply(e){this.expectingReply!==e&&(this.expectingReply=e,this.updatePollingStrategy())}clearGetLatestTimeout(){null!==this.getLatestTimeout&&(clearTimeout(this.getLatestTimeout),this.getLatestTimeout=null)}poll(e){this.store&&null!==this._currentPollingInterval&&(this.clearGetLatestTimeout(),this.getLatestTimeout=setTimeout(async()=>{var e,t;if(null===this._currentPollingInterval)return;const n=null!==(e=this._currentPollingInterval)&&void 0!==e?e:s.a0.CONNECTED;await(null===(t=this.store)||void 0===t?void 0:t.dispatch(v())),this.poll(n)},e))}updatePollingStrategy(){if(!this.connection)return;const e=this.getPollingInterval();this.startPolling(e)}getPollingInterval(){return this.connection?this.userIsIdle?s.a0.IDLE:this.connection.getConnectionState()===C.CONNECTED?this.expectingReply?s.a0.EXPECTING_REPLY:s.a0.CONNECTED:s.a0.ERRORED:s.a0.CONNECTED}startPolling(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.a0.CONNECTED;this._currentPollingInterval!==e&&(this._currentPollingInterval=e,this.poll(e))}stopPolling(){this.clearGetLatestTimeout(),this._currentPollingInterval=null}destroy(e){this.stopPolling(),this.connection&&(this.connection.off("error",this.handleConnectionError),this.connection.off("connected",this.handleConnectionSuccess),this.connection.off("idle-state-changed",this.handleIdleStateChanged),this.connection.destroy(e),this.isInitialized=!1,this.connection=null),L.resetInstance(),I.resetInstance(),P.instance=null}}o()(P,"instance",null);const N=P},4240:(e,t,n)=>{"use strict";var r=n(8655)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},4275:(e,t,n)=>{"use strict";var r=n(8141),o=n(1268),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},4317:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r({}.isPrototypeOf)},4356:(e,t,n)=>{"use strict";n(9504),n(7424);var r=n(1355);e.exports=r.f("toPrimitive")},4358:(e,t,n)=>{"use strict";var r=n(9989);e.exports=function(e,t,n){return r.f(e,t,n)}},4390:(e,t,n)=>{"use strict";n.d(t,{m:()=>h});var r=n(904),o=n(7931),i=n(5352),a=n(9990),s=n(1970),l=n(8833),c=n(485),u=n(6122),d=n(6606),f=n(8094),p=n(6834);const h=e=>{let{triggerDialogueSlug:t,languageCode:n,shouldGreet:h=!0}=e;return async(e,g)=>{var m,b,v;const{local:{context:y,labels:x},chatbubble:{botKey:w,currentLanguage:k,complianceWasShownInWelcomePage:C},environment:{PAT_HOST:S},bot:{includeDisabledLanguages:_}}=g();h&&e({type:c.A8});const A=n||k,E=(new Date).toISOString(),T=await e((0,l.et)(`${S}/chatbubble/${i.Ak}/connect`,{method:"POST",body:{labels:x,context:y,language_code:A,market:r.Z.market,trigger_dialogue_slug:t,include_disabled_languages:_,should_greet:h,include_greeting:!0,tz:null===Intl||void 0===Intl||null===(m=Intl.DateTimeFormat)||void 0===m||null===(b=m.call(Intl))||void 0===b||null===(v=b.resolvedOptions())||void 0===v?void 0:v.timeZone},...(0,a.A)({botKey:w},{withCurrentUrl:!0,withVersion:!0})}));if(!T)throw new Error("No response from connectToBackend");const{token:j,chat_id:I,created:O,all_greetings_hide_input:L,greeting:P,live_translation_system_dialogue:N}=T.data;e({type:c.wk}),e({type:d.n,token:j,chatId:I,allGreetingsHideInput:L}),e({type:u.nm,startedAt:O}),e((0,l.TP)(E));const M="NONE"!==r.Z.welcomePage.type,{isEnabled:z,descriptionTextHtml:R,requireAgreement:$}=(0,s.A)(A);return!z||$||C&&M||e({type:f.z2,payload:{message:R,system_dialogue_message_type:o.zV.COMPLIANCE}}),z&&$&&!C&&e((0,p.zn)("COMPLIANCE")),N&&e({type:f.tq,data:N}),P&&e({type:f.tq,data:P}),j}}},4399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?n(e)?e.length?"array":"void":typeof e:"void"};var n=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},4417:(e,t,n)=>{"use strict";var r=n(3773);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},4492:(e,t,n)=>{"use strict";var r=n(5024),o=n(9989),i=n(480);e.exports=function(e,t,n){r?o.f(e,t,i(0,n)):e[t]=n}},4497:(e,t,n)=>{"use strict";n.d(t,{WJ:()=>c,uV:()=>l,u_:()=>s});var r=n(6885),o=n(485),i=n(8689),a=n(8094);const s={"mimir-started-searching":o.E7,agent_started_typing:r.M_,agent_stopped_typing:r.MU,"message-attachments-updated":a.tS,message:a.tq,"new-attachments":a.Os,"pattern-context-match":i.jE,takeover:r.II,bot_started_typing:o.A8,bot_stopped_typing:o.wk},l={WARNING:"WARNING"},c={OFFLINE:{en:"You seem to be offline, please check your internet connection",nb:"Du ser ut til å være frakoblet internett, vennligst sjekk tilgangen din"}}},4517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};return t.forEach(function(t){var r=e[t];r&&(n[t]=r)}),n},e.exports=t.default},4518:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5352);function o(){let{type:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(null!=e?e:"").split("/");return(null==t?void 0:t[0])===r.sl.IMAGE?r.sl.IMAGE:(null==t?void 0:t[0])===r.sl.VIDEO?r.sl.VIDEO:(null==t?void 0:t[1])===r.sl.PDF?r.sl.PDF:t.slice(-1)[0]}},4531:(e,t,n)=>{"use strict";var r=n(8099),o=n(701),i=n(1355),a=n(9989).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},4543:(e,t,n)=>{"use strict";var r=n(5024),o=n(4713),i=n(7161),a=n(480),s=n(3273),l=n(5341),c=n(701),u=n(9665),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=l(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[t])}},4557:(e,t,n)=>{"use strict";n.d(t,{KN:()=>o,ZF:()=>i,cJ:()=>r,k1:()=>a});const r={TEXT:"TEXT",CHECKBOX:"CHECKBOX",RANGE:"RANGE",EMAIL:"EMAIL",NUMBER:"NUMBER",SELECT:"SELECT",RADIO:"RADIO",FILE:"FILE",TEXTAREA:"TEXTAREA"},o={ACTIVE:"ACTIVE",SUBMITTED:"SUBMITTED",CANCELED:"CANCELED",UNANSWERED:"UNANSWERED",ERRORED:"ERRORED"},i={PATTERN:"pattern",REQUIRED:"required",MAX_LENGTH:"max_length",MIN_LENGTH:"min_length",min:"min",max:"max"},a={CUSTOM:"custom",BROWSER:"browser"}},4572:(e,t,n)=>{"use strict";var r=n(9344),o=n(814),i=n(1780),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4574:(e,t,n)=>{"use strict";var r=n(9903),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},4603:(e,t,n)=>{"use strict";var r=n(5547),o=n(1203),i=n(8900).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4665:e=>{e.exports=function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")},e.exports.__esModule=!0,e.exports.default=e.exports},4668:(e,t,n)=>{"use strict";n.d(t,{Dw:()=>p,Er:()=>d,Fu:()=>f,ue:()=>c});var r=n(7251),o=n(6122),i=n(6606),a=n(8094),s=n(7559),l=n(9245);const c={active:!1,allGreetingsHideInput:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},botKey:null,chatHasStarted:!1,chatId:null,contactDetailsButton:null,currentLanguage:"en",currentlyPoppedUp:!1,disabledTransports:[],wasActiveOnLoad:!1,error:null,globalIconsState:{seenDelayedPages:[],open:!0},hideInputField:!1,inPlatform:!1,isChatFullWindow:!1,complianceWasRevoked:!1,complianceWasShownInWelcomePage:!1,currentModal:null,overlayViews:[],previouslyPoppedUp:!1,renderedBy:"REACT",shownNudges:[],startedAt:null,uploadButtonWasClicked:null,userIsIdle:!1},u=(0,r.Z0)({name:"chatBubble",initialState:c,reducers:{setComplianceWasShownInWelcomePage:(e,t)=>{e.complianceWasShownInWelcomePage=t.payload.wasShown},setComplianceWasRevoked:(e,t)=>{e.complianceWasRevoked=t.payload.wasRevoked}},extraReducers:e=>e.addCase(o.MO,(e,t)=>{e.error=t.payload.error}).addCase(o.M2,(e,t)=>{e.currentLanguage=t.payload.code}).addCase(o.CB,(e,t)=>{e.botKey=t.payload.botKey||e.botKey,e.chatId=c.chatId,e.error=c.error,e.complianceWasShownInWelcomePage=c.complianceWasShownInWelcomePage,e.currentModal=c.currentModal,e.overlayViews=c.overlayViews,e.hideInputField=c.hideInputField,e.userIsIdle=c.userIsIdle}).addCase(i.n,(e,t)=>{e.chatId=t.payload.chatId,e.allGreetingsHideInput=t.payload.allGreetingsHideInput,e.currentModal=c.currentModal,e.overlayViews=c.overlayViews}).addCase(o.d$,(e,t)=>{e.chatHasStarted=t.payload.chatHasStarted,e.userIsIdle=!t.payload.chatHasStarted&&e.userIsIdle}).addCase(a.tq,(e,t)=>{const n=e.hideInputField&&"USER"===t.payload.data.sender;e.chatHasStarted=!0,e.hideInputField=!!n||t.payload.data.chatbubble_hide_input_field}).addCase(o.kA,e=>{e.active=!0,e.userIsIdle=!1}).addCase(o.uS,e=>{e.active=!1}).addCase(o.hn,e=>{e.previouslyPoppedUp=!0,e.currentlyPoppedUp=!0}).addCase(a.IM,e=>e).addCase(o.nm,(e,t)=>{e.startedAt=t.payload.startedAt}).addCase(o.HW,(e,t)=>{e.userIsIdle=t.payload.userIsIdle}).addCase(o.Eg,(e,t)=>{e.contactDetailsButton=t.payload.button}).addCase(o.t1,e=>{e.contactDetailsButton=null}).addCase(s.wX,(e,t)=>{e.shownNudges=(e.shownNudges||[]).concat(t.payload.slug)}).addCase(o.FZ,(e,t)=>{e.attachments.buttonClicked=(+new Date).toString(),e.attachments.exchangeId=t.payload.button.value}).addCase(o.TF,(e,t)=>{e.attachments.files=t.payload.files}).addCase(o.Q4,e=>{e.attachments.exchangeId=null,e.attachments.buttonClicked=null,e.attachments.files=[]}).addCase(o.YR,e=>{e.attachments.buttonClicked=null}).addCase(s.Kd,(e,t)=>{e.shownNudges=(e.shownNudges||[]).filter(e=>e!==t.payload.slug)}).addCase(o.uA,(e,t)=>{e.globalIconsState={...e.globalIconsState,...t.payload.state}}).addCase(o.Xu,(e,t)=>{e.currentModal=t.payload.currentModal}).addCase(o.XM,(e,t)=>{e.isChatFullWindow=t.payload.isChatFullWindow}).addCase(o.wM,(e,t)=>{e.overlayViews=[...e.overlayViews,t.payload.view]}).addCase(o.SO,e=>{e.overlayViews=[]}).addCase(o.nX,e=>{e.overlayViews=e.overlayViews.slice(0,-1)}).addCase(l.S.rejected,e=>{e.currentModal=null,e.overlayViews=e.overlayViews.filter(e=>"FEEDBACK"!==e)})}),{setComplianceWasShownInWelcomePage:d,setComplianceWasRevoked:f}=u.actions,p=u.reducer},4674:(e,t,n)=>{"use strict";var r=n(814),o=n(3057);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},4713:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},4785:(e,t,n)=>{"use strict";n.d(t,{n:()=>o,m:()=>r});const r={default:"'IBMPlex', 'Helvetica Neue', Helvetica, Arial, sans-serif",KindlySans:"KindlySans"},o="\n@font-face {\n font-family: 'KindlySans';\n src: url(http://localhost:8081/src/assets/fonts/KindlySans-Regular.65d6f01a87841a240c37cd04c52f3c2f.otf) format('OpenType');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 400;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.2c412e2f77ae69aa2154613095be7130.ttf) format('truetype');\n}\n\n@font-face {\n font-family: 'IBMPlex';\n font-weight: 500;\n src: url(http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.c4877bdfa15aef22d9255288b16899c5.ttf) format('truetype');\n}\n"},4871:e=>{"use strict";e.exports=!0},4901:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y});var r=n(9155),o=n.n(r);const i=e=>(0,r.isValidElement)(e)&&(e=>(0,r.isValidElement)(e)&&Boolean(e.props.children))(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||(0,r.isValidElement)(t),!1),a=(e,t)=>r.Children.toArray(e).map((e,n,o)=>(0,r.isValidElement)(e)&&i(e)?t((0,r.cloneElement)(e,{...e.props,children:a(e.props.children,t)})):t(e,n,o)),s=a;var l=n(824),c=n(1197),u=n(1085);function d(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,u.jsx)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",children:(0,u.jsx)("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}var f=n(5758),p=n(1708),h=n(3551),g=n(914),m=n(7638),b=n(437);const v=(e,t)=>o().cloneElement(e,t),y=function(e){let{defaultValues:t,children:n,onSubmit:i,shouldUnregister:a,clearOnSubmit:y=!1,className:x,sendButtonTitle:w="Submit",cancelButtonTitle:k="Cancel",ariaLabel:C,onCancel:S}=e;const{register:_,handleSubmit:A,getValues:E,reset:T,control:j,setError:I,trigger:O,clearErrors:L,setValue:P,formState:{isSubmitting:N,isSubmitted:M}}=(0,l.mN)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onChange"}),{buttonText:z}=(0,r.useContext)(c.Dx)||{buttonText:p.Tj.white},R=async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await i(e,I),y&&T()}catch(e){throw T(),e}};return(0,u.jsxs)(m.lV,{onSubmit:A(R),"aria-label":C,$isSubmitted:M,className:x,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.metaKey||e.ctrlKey?A(R)():e.target.click())},noValidate:!0,children:[s(n,e=>e?o().isValidElement(e)?(e=>{var t,n,r,o,i,a;return e?null!=e&&null!==(t=e.props)&&void 0!==t&&t.name?e.props.hasController?(0,u.jsx)(l.xI,{control:j,render:t=>v(e,{...e.props,...t}),rules:(0,b.G8)(e.props.validators),...e.props},e.key):v(e,{register:_,setError:I,clearErrors:L,trigger:O,control:j,...e.type&&"string"!=typeof e.type&&e.type.name===h.ZH.name&&{setValue:P}}):(null!=e&&e.type&&"string"!=typeof e.type?e.type.name:null)===g.A.name?v(e,{placeholder:null===(n=e.props)||void 0===n||null===(r=n.children)||void 0===r||null===(o=r[0])||void 0===o||null===(i=o.props)||void 0===i?void 0:i.placeholder_text,...!(null!==(a=e.props)&&void 0!==a&&a.htmlFor)&&{htmlFor:e.props.slug}}):e:null})(e):e:null),(0,u.jsxs)(m.dg,{children:[(0,u.jsx)(f.A,{disabled:N,onClick:()=>{const e=E();S&&S(e)},text:k,isSecondaryButton:!0}),(0,u.jsx)(f.A,{type:"submit",icon:(0,u.jsx)(d,{color:z,width:16,height:16}),loading:N,text:w,"data-testid":"form-submit-button"})]})]})}},4904:(e,t,n)=>{"use strict";var r={};r[n(8655)("toStringTag")]="z",e.exports="[object z]"===String(r)},4953:e=>{"use strict";e.exports=n},4961:(e,t,n)=>{"use strict";n.d(t,{Wh:()=>r,Zb:()=>o,u2:()=>i});const r="SHOW_TAB_NOTIFICATION",o="SHOW_BUBBLE_NOTIFICATION",i="DISMISS_NOTIFICATIONS"},5024:(e,t,n)=>{"use strict";var r=n(1203);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},5116:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},5134:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Te,jL:()=>je,GV:()=>Ie,CU:()=>Oe});var r={};n.r(r),n.d(r,{agent:()=>P,alerts:()=>M,announcement:()=>$,auth:()=>B,bot:()=>b.Ay,connection:()=>V,environment:()=>y,inChatNotification:()=>K,inspector:()=>Q,local:()=>ee,messages:()=>fe,nudge:()=>ge,pushMessages:()=>ye});var o=n(7251),i=n(541),a=n(5546),s=n.n(a),l=n(904);const c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return t.reverse().slice(1).reduce((e,t)=>t(e),t[0](...arguments))}};var u=n(4174),d=n(9466);function f(e,t,n){return(0,d.A)(e,function(e,t){return e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{})}(t,n))}var p=n(7912),h=n(3436),g=n(8668),m=n(5352),b=n(8129);const v={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return"ENVIRONMENT_OVERRIDE"===t.type?{...e,...t.env}:e};var x=n(4668);const w=(e,t)=>{var n,r;return{...b.ue,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,chatbubbleTextEnabled:e.use_chatbubble_text,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?m.Lb.NONE:e.welcomePage.type,maintenanceAlert:e.maintenance_alert,maintenanceAlertEnabled:!t&&((null===(n=e.maintenance_alert)||void 0===n?void 0:n.alert_enabled)||!1),pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,disabledTransports:e.disabled_transports,text:e.text,bubbleSize:e.bubble_size,isTextDirectionRtl:e.text_right_to_left,realtimeAnalytics:e.chatbubble.realtime_analytics,inputLimitEnabled:e.chatbubble.input_limit_enabled,inputLimit:e.chatbubble.input_limit||140,hideHeader:e.hideHeader||!1,bubbleAvatar:e.chatbubble.icon_avatar_image||e.bubbleAvatar||null,replyInQueueEnabled:null!==(r=e.reply_in_queue_enabled)&&void 0!==r?r:b.ue.replyInQueueEnabled,position:{...m.bF,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||m.DP,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,nudges:e.nudges||[],handoverMode:e.handover_mode,conversionPageUrl:e.conversion_page_url,whitelabelEnabled:e.whitelabel_enabled,sseEnabled:e.sse_enabled||!window.WebSocket}};function k(e){let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:i,environment:a,renderedBy:s},initialChatLanguage:l}=e;return{bot:w(n,o),chatbubble:{...x.ue,botKey:t,inPlatform:o,admin:i,renderedBy:s||"REACT",currentLanguage:l},local:{context:r,labels:[]},environment:{...v,VERSION:"2.81.9",...a}}}var C=n(9602),S=n(6885),_=n(8094),A=n(4961),E=n(6122),T=n(1304);var j=n(485);const I={[j.A8]:{stopType:j.wk,reducer:"bot"},[S.M_]:{stopType:S.MU,reducer:"agent"}};let O;const L={name:void 0,isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!1,supportsAttachment:!1,handoverWaitTimeEstimate:void 0},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _.tq:return{...e,name:t.data.name||e.name,isTyping:!1};case S.M_:return{...e,isTyping:!0};case S.MU:return{...e,isTyping:!1};case S.c6:return{...e,userIsTyping:!0};case S.we:return{...e,userIsTyping:!1};case S.II:{const n=Boolean(t.data.requested_handover_at&&!t.data.taken_over),r=Boolean(t.data.taken_over&&!e.takenOver),o=Boolean(!t.data.taken_over&&e.requestedHandoverAt),i=Boolean(!t.data.taken_over&&e.takenOver),a=Boolean(t.data.supports_attachment),s=t.data.requested_handover_at,l=t.data.handover_wait_time_estimate,c=t.data.handover_queue_position;return n?{...e,requestedHandoverAt:s,hasRequestedHandoverAtLeastOnce:!0,takenOver:!1,takeoverClosed:!1,handoverWaitTimeEstimate:l,handoverQueuePosition:c}:r?{...e,requestedHandoverAt:void 0,hasRequestedHandoverAtLeastOnce:!0,takenOver:!0,isTyping:!1,supportsAttachment:a,takeoverClosed:!1,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:i||o?{...e,requestedHandoverAt:void 0,takenOver:!1,isTyping:!1,supportsAttachment:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0}:e}case S.nz:return{...e,requestedHandoverAt:void 0===t.data.requested_handover_at?e.requestedHandoverAt:t.data.requested_handover_at,takeoverClosed:Boolean(t.data.closed)};case S.AQ:return{...e,handoverWaitTimeEstimate:t.data.handover_wait_time_estimate,handoverQueuePosition:t.data.handover_queue_position};case S.MM:return{...e,requestedHandoverAt:void 0,handoverWaitTimeEstimate:void 0,handoverQueuePosition:void 0};case E.CB:return{...e,requestedHandoverAt:L.requestedHandoverAt,hasRequestedHandoverAtLeastOnce:L.hasRequestedHandoverAtLeastOnce};default:return e}},N={showTabNotification:!1,showBubbleNotification:!1},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _.tq:return t.data.from_bot&&"SYSTEM"!==t.data.sender?{...e,showTabNotification:!0}:e;case A.Wh:return{...e,showTabNotification:!0};case A.Zb:return{...e,showBubbleNotification:!0};case A.u2:return{...N};default:return e}};var z=n(3821);const R={show:!1,text:null,url:null,type:null},$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case z.Y:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case z.n:return R;default:return e}};var D=n(7152);const F={isAuthenticated:!1,jwt:null,avatarUrl:null,fullName:null},B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D.K_:return{...e,isAuthenticated:!0,jwt:t.jwt,avatarUrl:t.avatarUrl,fullName:t.fullName};case D.qQ:return{...e,avatarUrl:t.avatar_url,fullName:t.full_name,email:t.email,phoneNumber:t.phone_number,userId:t.user_id};case D.zZ:return{...e,...F};default:return e}};var H=n(6606);const U={token:null},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case H.n:return{...e,token:t.token};case E.CB:return{...e,token:null};default:return e}};var W=n(2760);const G={notifications:[]},q={content:"",dismissed:!1,once:!1},K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case W.vP:return{...e,notifications:[...e.notifications,{...q,id:t.id,buttonText:t.buttonText,buttonHref:t.buttonHref,content:t.content,icon:t.icon,once:t.once}]};case W.MN:{const n=e.notifications.findIndex(e=>e.id===t.id);if(-1===n)return e;const r=[...e.notifications];return r[n]={id:t.id,content:t.content,buttonHref:t.buttonHref,buttonText:t.buttonText,icon:t.icon,once:t.once},{...e,notifications:r}}case W.nG:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};case W.oZ:{const n=e.notifications.find(e=>e.id===t.id);return{...e,notifications:[...e.notifications.filter(e=>e.id!==t.id),{...n,dismissed:!0}]}}default:return e}};var Y=n(8689);const X={inspectorOpen:!1,currentMessageId:null},Q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y.ye:return{...e,currentMessageId:t.chatMessageId};case Y.vK:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};var Z=n(7639);const J={context:{},labels:[]},ee=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Z.s:return{...e,context:{...e.context,...t.context}};case Z.T:return{...e,labels:[...new Set([...e.labels,t.label])]};case E.CB:return{...e,labels:[]};default:return e}};var te=n(9749),ne=n.n(te),re=n(1080),oe=n(674);const ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,oe.A)(n)]:r}},{})};var ae=n(3115),se=n(1715);const le={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null,forms:{}},ce=e=>{let{id:t}=e;return t},ue=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},de=(e,t,n)=>e.map(e=>t(e)?n(e):e),fe=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,i=arguments.length>1?arguments[1]:void 0;switch(i.type){case _.tq:{const{chatMessages:e}=o,{data:t}=i;if((0,ae.A)(e)(t)){const n={...t};return n.key||=n.id,f(o,"chatMessages",[...e,n])}const n=e.findIndex(e=>{let{id:n}=e;return n===t.id});if(t.key||=t.id,-1===n)return o;const r=[...e.slice(0,n),t,...e.slice(n+1)];return{...o,chatMessages:r}}case _.z2:{const e=((e,t)=>{const n=(new Date).toISOString();return{id:n,created:n,message:"",event_message:e,from_bot:!0,sender:"SYSTEM",exchange_type:"system-dialogue",system_dialogue_message_type:t}})(i.payload.message,i.payload.system_dialogue_message_type),{chatMessages:t}=o;return{...o,chatMessages:[...t,e]}}case E.CB:return le;case _.fg:{const{chatbubble_temporary_id:e,id:t}=i.data,n=n=>{var r;let{id:o}=n;return ne()(r=[e,t]).call(r,o)},r=e=>({...e,message:i.data.message});return{...o,chatMessages:de(o.chatMessages,n,r)}}case _.se:return{...o,messageSentTime:i.messageSentTime};case _.pz:{var a;const{created:e,id:t,temporaryId:n}=i,{chatMessages:r}=o,s=null!==(a=null==i?void 0:i.status)&&void 0!==a?a:null,l=r.findIndex(e=>{let{id:t}=e;return t===n});if(l<0)return o;const c=r[l],u={...c,created:e||(null==c?void 0:c.created),id:t||(null==c?void 0:c.id),status:s},d=r.map((e,t)=>t!==l?e:u);return{...o,chatMessages:d}}case Y.jE:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=i.data,r=n=>{let{id:r}=n;return r===e||r===t},a=e=>({...e,pattern_context_match:n});return{...o,chatMessages:de(o.chatMessages,r,a)}}case _.Y6:var s;return(0,re.A)(o.buttonClicks)(i.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],i.buttonClick]}:o;case _.kU:return{...o,lastMessageSeen:(0,se.A)(i,["id","index"])};case _.Os:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=i.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(ie))||[]]};case _.wP:{const e=ie(i.attachment),t=ue(e),n=t=>({...t,...e});return{...o,attachments:de(o.attachments,t,n)}}case _.tS:{var l;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=i.data,r=e.map(ie),a=(null!==(l=o.attachments)&&void 0!==l?l:[]).map(e=>{const t=r.find(ue(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},i=e=>({...e,id:n,attachment_ids:r.map(ce)});s=de(o.chatMessages,e,i)}return{...o,attachments:a,chatMessages:s}}case _.QA:return null!==(r=i.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[i.formData.formKey]:i.formData}}:o;default:return o}};var pe=n(7559);const he={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:m.MK.TEMPLATE,hasBeenDismissed:!1},ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pe.X2:return{...e,show:!1,nudgeLayout:{},hasBeenDismissed:!0};case pe.wv:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:m.MK.TEMPLATE,trackEvent:t.trackEvent,hasBeenDismissed:!1};case pe.un:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:m.MK.CUSTOM,trackEvent:t.trackEvent,hasBeenDismissed:!1};default:return e}};var me=n(3178),be=n(7474);const ve={show:!1,text:null,agent:null,dismissed:!1,type:be.oI.MESSAGE,dismissedMessages:[],taken_over:!1},ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case S.II:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:be.oI.HANDOVER}:e;case _.tq:return(0,g.A)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:be.oI.MESSAGE};case me.l:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case me.a_:return{...e,show:!1,dismissed:!0};case me.a1:return ve;default:return e}};var xe=n(8418);const we=e=>{let{url:t,...n}=e;return(t||"").startsWith("data:")?n:{...n,url:t}},ke=e=>e?()=>e=>({bot:{hasInteraction:e.bot.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{name:e.agent.name}}):()=>e=>({alerts:{showBubbleNotification:e.alerts.showBubbleNotification},agent:{name:e.agent.name,takenOver:e.agent.takenOver,supportsAttachment:e.agent.supportsAttachment,hasRequestedHandoverAtLeastOnce:e.agent.hasRequestedHandoverAtLeastOnce},bot:{hasInteraction:e.bot.hasInteraction,isTextDirectionRtl:e.bot.isTextDirectionRtl},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:x.ue.currentlyPoppedUp,allGreetingsHideInput:x.ue.allGreetingsHideInput,contactDetailsButton:x.ue.contactDetailsButton,attachments:x.ue.attachments,isChatFullWindow:void 0,overlayViews:e.chatbubble.overlayViews.filter(e=>"FEEDBACK"===e),shownNudges:e.chatbubble.shownNudges,renderedBy:void 0,userIsIdle:void 0},connection:{token:e.connection.token},feedback:{...e.feedback},local:{labels:e.local.labels},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(we),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages}}),Ce=e=>t=>{let{active:n}=t.chatbubble;const r=(0,g.A)();return e.isFromMultitab||(n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!r)||Boolean(e.chatbubble.keep_open_mobile&&r))),(0,d.A)(t,{chatbubble:{active:n}})},Se=e=>{var t;if((0,p.A)(e,"bot.includeDisabledLanguages",!1))return e;const n=null==e||null===(t=e.chatbubble)||void 0===t?void 0:t.currentLanguage,r=l.Z.supportedLanguages.some(e=>{let{code:t}=e;return t===n}),o=l.Z.supportedLanguages.find(e=>{let{is_primary:t}=e;return t});if(!o)throw new Error("Impossible state: primary language not found");return r?e:(0,d.A)(e,{chatbubble:{currentLanguage:o.code}})},_e=e=>{let{inPlatform:t,botKey:n}=e;return(e=>(t,n)=>{return r=(0,d.A)(t,n),e.reduce((e,t)=>{let[n,r]=t;return f(e,n,r)},r);var r})([["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t}))},Ae=e=>t=>{var n,r;const o=null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).pop(),i=null!==(r=null==o?void 0:o.chat_live_translation_language_code)&&void 0!==r?r:null==o?void 0:o.chat_language_code,a=null!=i?i:e;return(0,d.A)(t,{chatbubble:{currentLanguage:a},bot:{isTextDirectionRtl:(0,h.A)(a)}})},Ee=[e=>t=>async n=>{const{agent:{takenOver:r},chatbubble:{currentLanguage:o}}=e.getState();if(n.type===S.II){const{handoverConversationFeedback:t,preloadFeedbackImages:i}=(0,C.A)(o);r&&!1===n.data.taken_over&&t&&(i("handover_conversation"),e.dispatch((0,T.ob)(t)))}if(n.type!==_.tq)return t(n);const{from_bot:i,sender:a,was_anonymized:s,exchange_type:l,triggered_chat_start:c,chat_language_code:d,chat_live_translation_language_code:f}=n.data,p=f||d;if(n.type===_.tq){if(i&&a!==m.bS.USER){const e=u.A.getInstance();e.getIsInitialized()&&e.setExpectingReply(!1)}(0,g.A)()&&i&&a!==m.bS.SYSTEM&&e.dispatch({type:A.Zb})}if("greeting"===l||c)o!==p&&t({type:E.M2,payload:{code:p}});else if(i&&p&&o!==p){var h;const{text:n}=e.getState().bot,r=null===(h=n.language_switch_notification)||void 0===h?void 0:h[p];r&&e.dispatch((0,T.cC)({content:r,buttonText:void 0,buttonHref:void 0,icon:"language"},m.Jm.LANGUAGE_SWITCH)),t({type:E.M2,payload:{code:p}})}if(i||!s)return t(n);t({type:_.fg,data:n.data})},e=>t=>async n=>{const r=I[n.type];var o;return r&&(clearTimeout(O),O=setTimeout(()=>{e.getState()[r.reducer].isTyping&&t({type:r.stopType})},1e3*((null===(o=n.data)||void 0===o?void 0:o.TTL)||10))),n.type!==j.wk&&n.type!==S.MU||clearTimeout(O),t(n)},()=>e=>t=>{e("payload"in t?t:{...t,payload:{...t}})}];function Te(e){let{botKey:t,settings:n,persist:i=!0,initialChatLanguage:a,initialStateModifier:l}=e;const{inPlatform:f}=n,p=!n.inPlatform&&0===n.chatbubble.persist_state_lifespan_seconds,h=`kindly-chat-${t}`,g=ke(p),m=c(Se,Ae(a),Ce(n),_e({inPlatform:f,botKey:t})),b=i?s()(null,{key:h,slicer:g,merge:m}):e=>e;let v=k({botKey:t,settings:n,initialChatLanguage:a});l&&(v=(0,d.A)(v,l));const y=(0,o.U1)({reducer:{...r,feedback:xe.Ay,chatbubble:x.Dw},preloadedState:v,middleware:e=>e().concat(...Ee),enhancers:e=>e().concat(b),devTools:!1});return u.A.getInstance().getIsInitialized()||u.A.getInstance().initialize(y),y}const je=i.wA.withTypes(),Ie=i.d4.withTypes(),Oe=i.Pj.withTypes()},5148:(e,t,n)=>{"use strict";var r=n(6100);e.exports=r([].slice)},5161:(e,t,n)=>{"use strict";var r=n(4317),o=n(8341),i=n(1019),a=Array.prototype,s=String.prototype;e.exports=function(e){var t=e.includes;return e===a||r(a,e)&&t===a.includes?o:"string"==typeof e||e===s||r(s,e)&&t===s.includes?i:t}},5216:(e,t,n)=>{"use strict";e.exports=n(6586)},5241:e=>{"use strict";e.exports={}},5262:(e,t,n)=>{"use strict";var r=n(6735);e.exports=r},5279:(e,t,n)=>{"use strict";var r=n(4356);e.exports=r},5297:(e,t,n)=>{"use strict";n(6925);var r=n(8099).Object,o=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(o.sham=!0)},5341:(e,t,n)=>{"use strict";var r=n(493),o=n(6281);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},5352:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r.Ak,DP:()=>g,Gi:()=>l,Ii:()=>y,Je:()=>x,Jm:()=>v,Lb:()=>o,Le:()=>d,M3:()=>h,MK:()=>u,Ns:()=>p,T5:()=>s,a0:()=>a,bF:()=>m,bS:()=>i,dT:()=>r.dT,fl:()=>r.fl,gH:()=>r.gH,lP:()=>c,oY:()=>w,rc:()=>b,sl:()=>f});var r=n(8191);const o=Object.freeze({NONE:"NONE",COLOR:"COLOR",PICTURE:"PICTURE"}),i=Object.freeze({USER:"USER",BOT:"BOT",WEBHOOK:"WEBHOOK",AGENT:"AGENT",SYSTEM:"SYSTEM",EXTERNAL:"EXTERNAL"}),a=Object.freeze({IDLE:3e4,CONNECTED:1e4,EXPECTING_REPLY:3001,ERRORED:3e3}),s=Object.freeze({1e3:"250",800:"178",600:"124"}),l=Object.freeze({GREETING:"GREETING",FALLBACK:"FALLBACK",PATTERN_MATCH:"PATTERN_MATCH",KEYWORD_EXACT_MATCH:"KEYWORD_EXACT_MATCH",KEYWORD_MENTION:"KEYWORD_MENTION",SAMPLE_MATCH:"SAMPLE_MATCH",TRIGGER_DIALOGUE:"TRIGGER_DIALOGUE",ZODIAC:"ZODIAC",MIMIR:"MIMIR",WEBHOOK:"WEBHOOK",INTENT_MATCH:"INTENT_MATCH"}),c=Object.freeze({QUICK_REPLY:"QUICK_REPLY",EXTERNAL_LINK:"EXTERNAL_LINK",EMAIL:"EMAIL",PHONE:"PHONE",HANDOVER_REQUEST:"HANDOVER_REQUEST",PRIVACY_EXPORT:"PRIVACY_EXPORT",PRIVACY_DELETE:"PRIVACY_DELETE",DIALOGUE_TRIGGER:"DIALOGUE_TRIGGER",CONTACT_DETAILS:"CONTACT_DETAILS",UPLOAD_ATTACHMENT:"UPLOAD_ATTACHMENT",CHECKBOX:"CHECKBOX",SUBMIT:"SUBMIT",edit_contact_details:"edit_contact_details",SLIDER:"SLIDER",END_CHAT:"END_CHAT"}),u=Object.freeze({TEMPLATE:"TEMPLATE",CUSTOM:"CUSTOM"}),d=Object.freeze({CLEAN:"CLEAN",ERROR:"ERROR",INFECTED:"INFECTED",PROCESSING:"PROCESSING"}),f=Object.freeze({IMAGE:"image",PDF:"pdf",TEXT:"text",VIDEO:"video"}),p=(Object.freeze({DISABLED:"DISABLED",PLATFORM:"PLATFORM",EXTERNAL:"EXTERNAL"}),Object.freeze({PRIDE:"PRIDE",EASTER:"EASTER",CHRISTMAS:"CHRISTMAS"})),h=(Object.freeze({NO_SPLIT:"X",SPLIT_A:"A",SPLIT_B:"B",NO_SPLIT_LABEL:void 0}),18e5),g=5e3,m=Object.freeze({bottom:"16px",right:"16px"}),b=Object.freeze({PREFIX:"PREFIX",SUFFIX:"SUFFIX"}),v=Object.freeze({MAINTENANCE:"MAINTENANCE",LANGUAGE_SWITCH:"LANGUAGE_SWITCH"}),y=(Object.freeze({WEBHOOK:"WEBHOOK",PLUGIN:"PLUGIN",STANDARD:"STANDARD"}),Object.freeze({HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL"})),x=Object.freeze({CUSTOM_INTEGRATION:"app",EMAIL:"email",FB_MESSENGER:"facebook",SDK_ANDROID:"android",SDK_IOS:"ios",SLACK:"slack",TEST:"test",WEB:"web",WEB_MOBILE:"mobile"}),w=[".pdf",".heic","image/*","video/*","text/html","text/csv","text/xml","text/json","text/markdown","text/calendar","text/plain","text/tab-separated-values"].join(",")},5392:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,c:()=>o});var r=n(2760);const o=(e,t)=>(n,o)=>{var i,a;const{content:s,buttonHref:l,buttonText:c,icon:u,once:d}=e,f=null===(i=o().inChatNotification)||void 0===i||null===(a=i.notifications)||void 0===a?void 0:a.find(e=>e.id===t);f?s!==f.content&&n({type:r.MN,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t}):n({type:r.vP,content:s,buttonHref:l,buttonText:c,icon:u,once:d,id:t})},i=e=>(t,n)=>{var o,i;const a=null===(o=n().inChatNotification)||void 0===o||null===(i=o.notifications)||void 0===i?void 0:i.find(t=>t.id===e);a&&(a.once?t({type:r.oZ,id:e}):t({type:r.nG,id:e}))}},5394:(e,t,n)=>{"use strict";n.d(t,{AK:()=>v,JP:()=>y,Zm:()=>p,cr:()=>b,jB:()=>g,qL:()=>o,vW:()=>i,yu:()=>m});var r=n(1197);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["animation-timing-function:ease;animation-iteration-count:1;animation-fill-mode:forwards;animation-duration:","ms;"],e)},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return(0,r.AH)(["height:0;width:0;padding:0;transition:width 0.1ms ease ","ms,padding 0.1ms ease ","ms,height 0.1ms ease ","ms;"],e,e,e)},a=(0,r.i7)(["0%{opacity:0;transform:translateY(-10px);}100%{opacity:1;transform:translateY(0);}"]),s=(0,r.i7)(["0%{opacity:0;transform:translateY(10px);}100%{opacity:1;transform:translateY(0);}"]),l=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:1;transform:translateX(0);}"]),c=(0,r.i7)(["0%{opacity:0;transform:translateX(-15px);}100%{opacity:0.8;transform:translateX(0);}"]),u=(0,r.i7)(["0%{opacity:0;transform:translateX(15px);}100%{opacity:1;transform:translateX(0);}"]),d=(0,r.i7)(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]),f=(0,r.i7)(["0%{opacity:0;}100%{opacity:1;}"]),p=(0,r.i7)(["50%{opacity:0.5;}"]),h=((0,r.i7)(["50%{opacity:0.2;}"]),(0,r.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"])),g=(0,r.AH)([""," animation-name:",""],o(),f),m=(0,r.AH)([""," animation-name:",""],o(),a),b=(0,r.AH)([""," animation-name:",""],o(),s),v=(0,r.AH)([""," animation-name:",""],o(),l),y=((0,r.AH)([""," animation-name:",""],o(),c),(0,r.AH)([""," animation-name:",""],o(),u));(0,r.AH)([""," animation-name:",""],o(),d),(0,r.AH)(["animation:1.8s "," infinite 0.3s;"],h)},5396:(e,t,n)=>{"use strict";for(var r=n(8141),o=n(1003),i=n(6100),a=n(6281),s=n(8655),l=o("Symbol"),c=l.isWellKnownSymbol,u=o("Object","getOwnPropertyNames"),d=i(l.prototype.valueOf),f=r("wks"),p=0,h=u(l),g=h.length;p<g;p++)try{var m=h[p];a(l[m])&&s(m)}catch(e){}e.exports=function(e){if(c&&c(e))return!0;try{for(var t=d(e),n=0,r=u(f),o=r.length;n<o;n++)if(f[r[n]]==t)return!0}catch(e){}return!1}},5426:(e,t,n)=>{"use strict";var r=n(3057),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},5516:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(9155);const r=n(1197).Ay.div.withConfig({componentId:"sc-1bvmkry-0"})(["transition:all 0.3s ease-in-out;"]);var o=n(1085);function i(e){let{children:t,carouselPosition:n,onTouchEnd:i,onTouchMove:a,onTouchStart:s}=e;return(0,o.jsx)(r,{onTouchStart:s,onTouchEnd:i,onTouchMove:a,style:{transform:`translateX(${n}px)`},children:t})}},5522:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(3678)})},5546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var n=r({key:"redux",merge:a.default,slicer:i.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,l=n.slicer,c=n.serialize,u=n.deserialize;return function(t){return function(n,r,i){"function"==typeof r&&void 0===i&&(i=r,r=void 0);var a=void 0,d=void 0;try{a=u(localStorage.getItem(o)),d=s(r,a)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,i),p=l(e);return f.subscribe(function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,c(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}}),f}}};var i=o(n(8639)),a=o(n(7487));e.exports=t.default},5547:(e,t,n)=>{"use strict";var r,o,i=n(8900),a=n(3531),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},5571:(e,t,n)=>{"use strict";var r=n(6100),o=n(9903),i=n(1139),a=n(5426),s=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(e){return function(t,n){var r,u,d=i(a(t)),f=o(n),p=d.length;return f<0||f>=p?e?"":void 0:(r=l(d,f))<55296||r>56319||f+1===p||(u=l(d,f+1))<56320||u>57343?e?s(d,f):r:e?c(d,f,f+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},5626:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=new Map,o=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})},i=(e,t,n,i)=>{if(e=o(e,"inputs"),0===(t=o(t,"patterns")).length)return[];const a=(t=t.map(e=>((e,t)=>{const n="s"+((t={caseSensitive:!1,...t}).caseSensitive?"":"i"),o=e+"|"+n;if(r.has(o))return r.get(o);const i="!"===e[0];i&&(e=e.slice(1)),e=(e=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e=e.replaceAll(String.raw`\*`,"__ESCAPED_STAR__").replaceAll("\\\\","__ESCAPED_BACKSLASH__").replaceAll(/\\(.)/g,"$1")).replaceAll(String.raw`\*`,".*")).replaceAll("__ESCAPED_STAR__",String.raw`\*`).replaceAll("__ESCAPED_BACKSLASH__","\\\\");const a=new RegExp(`^${e}$`,n);return a.negated=i,r.set(o,a),a})(e,n))).filter(e=>e.negated),s=t.filter(e=>!e.negated),{allPatterns:l}=n||{},c=[];if(l&&i&&a.length>1&&0===s.length){for(const t of e)for(const e of a)if(e.test(t))return[];return e.slice(0,1)}for(const t of e){let e=!1;for(const n of a)if(n.test(t)){e=!0;break}if(!e){if(0===s.length)c.push(t);else if(l){const e=Array.from({length:s.length},()=>!1);for(const[n,r]of s.entries())r.test(t)&&(e[n]=!0);e.every(Boolean)&&c.push(t)}else{let e=!1;for(const n of s)if(n.test(t)){e=!0;break}e&&c.push(t)}if(i&&c.length>0)break}}return c},a=(e,t)=>{if(!t||""===t)return!0;const n=e.endsWith("/")&&e.length>1?e.slice(0,-1):e,r=t.endsWith("/")&&t.length>1?t.slice(0,-1):t;let o=n;if(null!=r&&r.startsWith("/"))try{o=new URL(n).pathname}catch{o=n}return i(o,r,undefined,!0).length>0}},5650:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1576);const o=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t},i=e=>{let{button_type:t,...n}=e;return{...n,button_type:o(t),category:(0,r.A)(t)}}},5657:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},5664:(e,t,n)=>{"use strict";n(4531)("dispose")},5677:(e,t,n)=>{var r=n(7354);e.exports=function(e,t){r(e,t),t.add(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5687:(e,t,n)=>{"use strict";n(5664)},5758:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(9155),o=n.n(r),i=n(6738),a=n(6848),s=n(1814),l=n(1085);function c(e,t){const{href:n,target:r,children:o,icon:c,text:u,loading:d=!1,isCheckbox:f=!1,type:p="button",onClick:h=i.A,cy:g,isSecondaryButton:m=!1,flat:b,disabled:v,selected:y,...x}=e,w=e=>{d?e.preventDefault():h(e)};return n?(0,l.jsx)(a.rK,{ref:t,href:n,target:r,$isCheckbox:f,onClick:w,$loading:d,$isSecondaryButton:m,...x,children:d?(0,l.jsx)(s.A,{flat:x.flat,isCheckbox:f,loading:d}):(0,l.jsxs)(a.EE,{children:[(0,l.jsx)(a.T3,{children:o||u}),(0,l.jsx)(a.Tu,{children:c})]})}):(0,l.jsx)(a.Ef,{ref:t,onClick:w,$isCheckbox:f,type:p,$loading:d,"data-testid":g,$isSecondaryButton:m,$flat:b,$disabled:v,$selected:y,...x,children:d?(0,l.jsx)(s.A,{flat:x.flat,isCheckbox:f,loading:d}):(0,l.jsxs)(a.EE,{children:[(0,l.jsx)(a.T3,{children:o||u}),(0,l.jsx)(a.Tu,{children:c})]})})}const u=o().forwardRef(c);u.displayName="Button";const d=u},5765:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n(1197),i=n(8663);const a=o.Ay.div.withConfig({componentId:"sc-1vynzdk-0"})(["visibility:hidden;padding:4px 8px;font-size:var(--_kindlychat-font-size-sm);background-color:",";color:",";border-radius:6px;z-index:99999;position:absolute;width:max-content;word-break:normal;overflow-wrap:anywhere;",""],e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(255, 255, 255, 0.9)","rgba(0, 0, 0, 0.9)")},e=>{let{theme:t}=e;return(0,i.w5)(t.background,"rgba(0, 0, 0, 0.8)","rgba(255, 255, 255, 0.8)")},e=>{let{$position:t}=e;switch(t){case"top":default:return"bottom: 100%;";case"bottom":return"top: 100%;"}}),s=o.Ay.div.withConfig({componentId:"sc-1vynzdk-1"})(["display:flex;flex-direction:row;align-items:center;position:relative;&:hover ","{visibility:visible;}"],a);var l=n(1085);const c=function(e){let{children:t,text:n,position:o="top",testId:i="tooltip"}=e;const c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{!function(){var e,t;const n=window.document.getElementById("chat-body-container")||window.kindlyChat.shadowRoot.getElementById("chat-body-container"),r=null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect(),o=null==n?void 0:n.getBoundingClientRect();if(!r||!n)return;const{x:i,y:a,left:s,width:l,height:u}=r||{x:0,y:0,left:0,width:0,height:0},{x:d,y:f,width:p,height:h=0}=o||{x:0,y:0,width:0,height:0};if(null===(t=c.current)||void 0===t||t.style.setProperty("max-width",p-40+"px"),i+l>d+p){var g;const e=d+p,t=Math.abs(e-s-40);null===(g=c.current)||void 0===g||g.style.setProperty("right",`-${t}px`)}else{var m,b;null===(m=c.current)||void 0===m||m.style.setProperty("left","50%"),null===(b=c.current)||void 0===b||b.style.setProperty("transform","translateX(-50%)")}var v,y,x,w;a-f<u&&(null===(v=c.current)||void 0===v||v.style.setProperty("top","100%"),null===(y=c.current)||void 0===y||y.style.setProperty("bottom","auto")),a+u>f+h&&(null===(x=c.current)||void 0===x||x.style.setProperty("top","auto"),null===(w=c.current)||void 0===w||w.style.setProperty("bottom","100%"))}()},[o]),(0,l.jsxs)(s,{"data-testid":i,children:[t,(0,l.jsx)(a,{ref:c,"data-testid":`${i}-text`,$position:o,children:n})]})}},5777:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},5780:(e,t,n)=>{"use strict";var r,o=n(7235),i=n(7389),a=n(9683),s=n(5241),l=n(3489),c=n(9619),u=n(4275),d="prototype",f="script",p=u("IE_PROTO"),h=function(){},g=function(e){return"<"+f+">"+e+"</"+f+">"},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;b="undefined"!=typeof document?document.domain&&r?m(r):(t=c("iframe"),n="java"+f+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):m(r);for(var o=a.length;o--;)delete b[d][a[o]];return b()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=o(e),n=new h,h[d]=null,n[p]=e):n=b(),void 0===t?n:i.f(n,t)}},5785:(e,t,n)=>{"use strict";var r=n(9098),o=n(4603),i=n(1203),a=n(7313),s=n(2137);r({target:"Object",stat:!0,forced:!o||i(function(){a.f(1)})},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},5791:(e,t,n)=>{var r=n(4665);e.exports=function(e,t){return e.get(r(e,t))},e.exports.__esModule=!0,e.exports.default=e.exports},5799:(e,t,n)=>{"use strict";n(4531)("iterator")},5813:(e,t,n)=>{"use strict";var r=n(1810);e.exports=r},5851:()=>{},5873:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6974)},5880:(e,t,n)=>{"use strict";n.d(t,{GJ:()=>a,NY:()=>l,fz:()=>c,n6:()=>d,tf:()=>u});const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.",i=function(e,t,n,i){var a,s;let l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(-1!==r.indexOf(e)&&Boolean(i)&&function(e,t,n){const r=`on${t.charAt(0).toUpperCase()+t.slice(1)}`;if("function"!=typeof e)return void console.warn(`Provided setting '${r}' is not a function.`);console.warn(`kindlyOptions.${r} is deprecated in favor of standard event handlers. ${o}`);const i=Object.values(n);try{e(...i)}catch(e){console.error(e)}}(i,e,t),"API"!==n)return!0;if(null===(a=window)||void 0===a||null===(s=a.kindlyChat)||void 0===s||!s.APIRoot)return console.warn("No APIRoot when rendered using kindly-chat API"),!0;"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;return window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0,cancelable:l}))};function a(e,t,n,r){e&&i("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function l(e){!1===s&&(s=!0,i("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const c=e=>{let{button:t,buttonType:n,chatLog:r,event:i,handlers:a,lastMessage:s,renderedBy:l}=e,c=!1;const u=null==a?void 0:a[n];if(u){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(u(i,t,s,r,n))}catch(e){console.error(e)}}var d;return"API"===l&&(c=!(null!==(d=window.kindlyChat)&&void 0!==d&&d.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:t,lastMessage:s,chatLog:r,buttonType:n},bubbles:!0,cancelable:!0})))),c};function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{source:n="user",storeState:r}=arguments.length>2?arguments[2]:void 0;const{chatbubble:{chatId:o,renderedBy:a}}=r,s={...t,chatId:o,source:n,type:e};return i("ui",s,a,void 0,!1)}const d=e=>{var t;let{type:n,icon:r,renderedBy:o}=e;return"API"!==o||!(null!==(t=window.kindlyChat)&&void 0!==t&&t.APIRoot.dispatchEvent(new CustomEvent("kindly:globalicon",{detail:{type:n,icon:r},bubbles:!0,cancelable:!0})))}},5919:(e,t,n)=>{"use strict";e.exports=n(4047)},5947:(e,t,n)=>{"use strict";var r=n(7752),o=TypeError;e.exports=function(e){if(r(e))throw new o("The method doesn't accept regular expressions");return e}},5994:(e,t,n)=>{"use strict";var r=n(3407);n(5522),n(7524),n(8448),n(8013),n(9437),n(2991),n(3860),n(6251),n(2100),n(2996),e.exports=r},6100:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},6122:(e,t,n)=>{"use strict";n.d(t,{CB:()=>r,Eg:()=>p,FZ:()=>h,HW:()=>u,M2:()=>o,MO:()=>v,Q4:()=>m,SO:()=>k,TF:()=>g,XM:()=>x,Xu:()=>c,YR:()=>b,d$:()=>d,hn:()=>s,kA:()=>a,nX:()=>C,nm:()=>l,t1:()=>f,uA:()=>y,uS:()=>i,wM:()=>w});const r="START_OVER",o="SET_LANGUAGE",i="CLOSE_CHATBUBBLE",a="OPEN_CHATBUBBLE",s="POPPED_UP",l="SET_STARTED_AT",c="SET_CURRENT_MODAL",u="SET_USER_IS_IDLE",d="SET_CHAT_HAS_STARTED",f="HIDE_CONTACT_DETAILS",p="SHOW_CONTACT_DETAILS",h="ATTACHMENT_BUTTON_CLICKED",g="SET_ATTACHMENT_FILES",m="CLEAR_ATTACHMENT_FILES",b="ATTACHMENT_PROMPT_SHOWED",v="SET_ERROR",y="SET_GLOBAL_ICONS_STATE",x="SET_CHAT_FULL_WINDOW",w="DISPLAY_OVERLAY_VIEW",k="CLOSE_OVERLAY_VIEW",C="SHOW_PREVIOUS_OVERLAY_VIEW"},6189:(e,t,n)=>{"use strict";n(1918),n(7935),n(9239),n(8293),n(2320),n(3131),n(5664),n(8749),n(6836),n(5799),n(928),n(9850),n(6457),n(6789),n(4119),n(7501),n(7424),n(1249),n(1818),n(2279),n(5851),n(2492);var r=n(8099);e.exports=r.Symbol},6251:(e,t,n)=>{"use strict";n(4531)("metadataKey")},6281:(e,t,n)=>{"use strict";var r=n(1003),o=n(2769),i=n(4317),a=n(7460),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},6310:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,g=!1,m=!1,b=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function k(e){if(m=!1,w(e),!g)if(null!==r(c))g=!0,S||(S=!0,C());else{var t=r(u);null!==t&&L(k,t.startTime-e)}}var C,S=!1,_=-1,A=5,E=-1;function T(){return!(!b&&t.unstable_now()-E<A)}function j(){if(b=!1,S){var e=t.unstable_now();E=e;var n=!0;try{e:{g=!1,m&&(m=!1,y(_),_=-1),h=!0;var i=p;try{t:{for(w(e),f=r(c);null!==f&&!(f.expirationTime>e&&T());){var a=f.callback;if("function"==typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){f.callback=s,w(e),n=!0;break t}f===r(c)&&o(c),w(e)}else o(c);f=r(c)}if(null!==f)n=!0;else{var l=r(u);null!==l&&L(k,l.startTime-e),n=!1}}break e}finally{f=null,p=i,h=!1}n=void 0}}finally{n?C():S=!1}}}if("function"==typeof x)C=function(){x(j)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,O=I.port2;I.port1.onmessage=j,C=function(){O.postMessage(null)}}else C=function(){v(j,0)};function L(e,n){_=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(m?(y(_),_=-1):m=!0,L(k,i-a))):(e.sortIndex=s,n(c,e),g||h||(g=!0,S||(S=!0,C()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},6457:(e,t,n)=>{"use strict";n(4531)("replace")},6586:(e,t,n)=>{"use strict";var r=n(1305);e.exports=r},6606:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r="NEW_TOKEN"},6625:e=>{"use strict";e.exports={}},6735:(e,t,n)=>{"use strict";var r=n(3592);e.exports=r},6738:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>{}},6739:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(541),o=n(904),i=n(8278);function a(){var e;const{supportedLanguages:t}=o.Z,{includeDisabledLanguages:n}=(0,r.d4)(i.Od),{currentLanguage:a}=(0,r.d4)(i.$P),s=null===(e=t.find(e=>{let{is_primary:t}=e;return t}))||void 0===e?void 0:e.code;if(!s)throw new Error("No primary language found in supported languages");const l=t.filter(e=>{let{is_active:t}=e;return t});return{primaryLanguageCode:s,currentLanguageCode:a,supportedLanguages:n?t:l}}},6789:(e,t,n)=>{"use strict";n(4531)("search")},6834:(e,t,n)=>{"use strict";n.d(t,{jz:()=>A,B:()=>T,UB:()=>k,Rh:()=>v,eG:()=>g,mN:()=>P,_e:()=>M,wQ:()=>h,ky:()=>y,VK:()=>N,Mm:()=>S,ZS:()=>C,lQ:()=>w,Ln:()=>E,L4:()=>b,w7:()=>L,zn:()=>I,nI:()=>j,ob:()=>O,i1:()=>m,V$:()=>_});var r=n(5880),o=n(5352),i=n(9449),a=n(4174),s=n(9990),l=n(8833),c=n(6122),u=n(3178),d=n(7559),f=n(4961),p=n(8418);const h=e=>(t,n)=>{const r=n().chatbubble.overlayViews[n().chatbubble.overlayViews.length-1];e&&r!==e&&t({type:c.wM,view:e})},g=()=>e=>{e({type:c.SO})},m=()=>e=>{e({type:c.nX})},b=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(n,r)=>{const{chatHasStarted:i}=r().chatbubble,{takenOver:u}=r().agent,{token:d}=r().connection,{PAT_HOST:f}=r().environment;if(n({type:c.M2,payload:{code:e}}),t||!i||u){if(i&&!await n((0,l.et)(`${f}/chatbubble/${o.Ak}/language_switch/`,{method:"POST",body:{languageCode:e},headers:(0,s.A)({token:d}).headers}))){const{currentLanguage:e}=r().chatbubble;n({type:c.M2,payload:{code:e}})}}else a.A.getInstance().getConnection().restart(!0)}},v=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{(0,r.tf)("close-chatbubble",void 0,{storeState:n(),source:e}),t({type:c.uS})}},y=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t=>{a.A.getInstance().getConnection().restart(e),t(g())}},x=()=>(e,t)=>{const{chatbubble:{chatHasStarted:n}}=t();if(!n){e({type:c.d$,chatHasStarted:!0});const t=a.A.getInstance();if(!t.getIsInitialized())return void console.warn("Connection not initialized when starting chat. Ensure Connection.initialize() is called in createStore before any chat actions.");t.getConnection().connect({shouldGreet:!0})}},w=function(){let{source:e="user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const{pushMessages:i,alerts:a,bot:s,nudge:l,chatbubble:{chatHasStarted:p},bot:{welcomePageType:h}}=n(),g=!p&&h!==o.Lb.NONE;(0,r.tf)("open-chatbubble",{value:{nextPage:g?"welcome-page":"chat"}},{storeState:n(),source:e}),i.show&&t({type:u.a_}),l.show&&t({type:d.X2}),(a.showTabNotification||a.showBubbleNotification)&&t({type:f.u2}),t({type:c.kA}),s.welcomePage&&s.welcomePageType!==o.Lb.NONE||t(x())}},k=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(w({source:"programmatic"})),e({type:c.hn}))},C=()=>e=>{e({type:c.HW,userIsIdle:!0})},S=e=>(e,t)=>{const{userIsIdle:n}=t().chatbubble;n&&e({type:c.HW,userIsIdle:!1})},_=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:i}}=n();(null==i||null===(r=i.contact_details)||void 0===r?void 0:r.contact_type)===(null==e||null===(o=e.contact_details)||void 0===o?void 0:o.contact_type)?t({type:c.t1}):t({type:c.Eg,button:e})},A=e=>t=>{t({type:c.FZ,button:e})},E=e=>t=>{0===e.length?t({type:c.Q4}):t({type:c.TF,files:e})},T=()=>e=>{e({type:c.YR})},j=e=>t=>{t({type:c.uA,state:e})},I=e=>t=>{t({type:c.Xu,currentModal:e})},O=e=>(t,n)=>{setTimeout(()=>{const{feedback:{feedbackToSubmit:r},chatbubble:{chatHasStarted:o}}=n();o&&!r&&(t((0,p.WG)({ratingSystem:e.rating_scale.rating_system,triggerType:e.trigger_type,formTitle:e.form_title,step:"RATING_SCALE"})),t(I("FEEDBACK_END_HANDOVER")))},2e3)},L=e=>t=>{t({type:c.XM,isChatFullWindow:e})},P=()=>e=>{e(g()),e(x())},N=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return async(n,r)=>{let a=e?await e:null;if(!a){const{connection:{token:e},environment:{PAT_HOST:n}}=r(),l=`${n}/chatbubble/${o.Ak}/privacy/export/${t}`,{headers:c}=(0,s.A)({token:e}),u={method:"GET",headers:{...c,"kindly-chat-version":"2.81.9",[i.B]:(0,i.U)()}};a=await(async(e,t)=>{let n;return fetch(e,{...t,headers:{"Content-Type":"application/json","kindly-chat-version":"2.81.9",[i.B]:(0,i.U)(),...t.headers},body:JSON.stringify(t.body)}).then(e=>{var t;if(!e.ok)throw new Error(e.statusText);const r=e.headers.get("Content-Disposition");return n=null==r||null===(t=r.split(/;(.+)/)[1])||void 0===t?void 0:t.split(/=(.+)/)[1],n=n.toLowerCase().startsWith("utf-8''")?decodeURIComponent(n.replace(/utf-8''/i,"")):n.replace(/['"]/g,""),e.blob()}).then(e=>{var t;const r=window.URL.createObjectURL(e),o=((null===(t=window.kindlyChat)||void 0===t?void 0:t.shadowRoot)||window.document).getElementById("chatContainer"),i=document.createElement("a");i.href=r,i.download=n,o.appendChild(i),i.click(),i.remove()})})(l,u)}}},M=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:i},environment:{PAT_HOST:a}}=n(),u=`${a}/chatbubble/${o.Ak}/privacy/delete/`,d=e?await e:await t((0,l.et)(u,{method:"DELETE",...(0,s.A)({token:r})}));200===(null==d?void 0:d.status)&&(t({type:c.CB,botKey:i,keepOpen:!0}),t(h("DELETED_CHAT")))}}},6836:(e,t,n)=>{"use strict";n(4531)("isConcatSpreadable")},6848:(e,t,n)=>{"use strict";n.d(t,{EE:()=>d,Ef:()=>h,T3:()=>f,Tu:()=>p,rK:()=>g});var r=n(1197),o=n(4785),i=n(8832),a=n(1708),s=n(8663);const l=(0,r.AH)(["box-shadow:0 0 0 2px rgba(0,0,0,0.2) inset;@supports (background-color:hsl(from black h s l)){background-color:hsl(from var(--button-background-1741866936) h s calc(l * 0.88));}@supports not (background-color:hsl(from black h s l)){filter:brightness(0.9);}"]),c=(0,r.AH)(["--button-background-1741866936:",";--button-color-1741866936:",";position:relative;display:flex;font-weight:normal;color:var(--button-color-1741866936);background-color:var(--button-background-1741866936);box-shadow:",";opacity:",";justify-content:",";align-items:center;text-align:center;transition:all 0.2s ease;"," outline:none;@media (pointer:coarse){user-select:none;-webkit-touch-callout:none;}&:active,&:hover,&:focus-visible{","}&:focus-visible{&::after{content:'';position:absolute;inset:3px;border-radius:4px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?e.panelBackground:n?e.secondaryButtonBackground:e.buttonBackground)(t,n,r)},e=>{let{theme:t,$isCheckbox:n,$isSecondaryButton:r}=e;return((e,t,n)=>t?(0,s.w5)(e.panelBackground,a.AV.light,a.AV.dark):n?(0,s.w5)(e.secondaryButtonBackground,a.AV.light,a.AV.dark):e.buttonText)(t,n,r)},e=>{let{$flat:t,$disabled:n}=e;return t||n?"none":"0 1px 4px 0 rgba(0, 0, 0, 0.08)"},e=>{let{$loading:t}=e;return t?.6:1},e=>{let{$isCheckbox:t}=e;return t?"flex-start":"center"},e=>e.$selected&&l,l),u=(0,r.AH)(["",";padding:8px 12px;font-size:var(--_kindlychat-font-size-p);max-width:100%;font-family:",";& svg{margin-left:",";}&:disabled{opacity:0.5;cursor:not-allowed;}"],c,e=>{let{theme:t}=e;return t.customFont?t.customFont:o.m.default},e=>{let{$isCheckbox:t}=e;return t?"0px":"6px"}),d=r.Ay.span.withConfig({componentId:"sc-1jzjzva-0"})(["display:flex;max-width:100%;justify-content:center;align-items:center;"]),f=r.Ay.span.withConfig({componentId:"sc-1jzjzva-1"})(["overflow-wrap:normal;text-overflow:ellipsis;overflow:hidden;"]),p=r.Ay.span.withConfig({componentId:"sc-1jzjzva-2"})(["display:inline-flex;align-items:center;justify-content:center;"]),h=(0,r.Ay)(i.$n).withConfig({componentId:"sc-1jzjzva-3"})(["",""],u),g=r.Ay.a.withConfig({componentId:"sc-1jzjzva-4"})([""," "," text-decoration:none;"],i.k5,u)},6865:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{title:t="File attachment",...n}=e;return(0,r.jsxs)("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("path",{d:"m19.25 11.951-6.117 5.91c-1.917 1.852-5.027 1.852-6.945 0a4.632 4.632 0 0 1 .018-6.729L8.36 9.075m0 0 .493-.471m-.493.47 3.491-3.372c1.313-1.268 3.44-1.268 4.752 0a3.17 3.17 0 0 1-.012 4.603l-3.238 3.095M8.36 9.075l-.417.403m5.41 3.922.367-.354m-.367.354-2.47 2.387a1.86 1.86 0 0 1-2.565 0 1.711 1.711 0 0 1 0-2.479l4.727-4.566",stroke:"#6A778A",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]})}},6885:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>u,II:()=>s,MM:()=>a,MU:()=>o,M_:()=>r,c6:()=>l,nz:()=>i,we:()=>c});const r="AGENT_STARTED_TYPING",o="AGENT_STOPPED_TYPING",i="HANDOVER_REQUESTED",a="HANDOVER_CANCELLED",s="HANDOVER",l="USER_STARTED_TYPING",c="USER_STOPPED_TYPING",u="UPDATE_HANDOVER_QUEUE"},6925:(e,t,n)=>{"use strict";var r=n(9098),o=n(5024),i=n(9989).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},6939:(e,t,n)=>{"use strict";e.exports=n(5813)},6974:(e,t,n)=>{"use strict";var r=n(9907),o=n(7967),i=n(9155),a=n(9514);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function c(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function u(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(s(188))}function f(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=f(e)))return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope");var E=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var T=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var j=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function L(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case b:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList";case E:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case m:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:L(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return L(e(t))}catch(e){}}return null}var P=Array.isArray,N=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},R=[],$=-1;function D(e){return{current:e}}function F(e){0>$||(e.current=R[$],R[$]=null,$--)}function B(e,t){$++,R[$]=e.current,e.current=t}var H,U,V=D(null),W=D(null),G=D(null),q=D(null);function K(e,t){switch(B(G,t),B(W,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=vd(t=bd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(V),B(V,e)}function Y(){F(V),F(W),F(G)}function X(e){null!==e.memoizedState&&B(q,e);var t=V.current,n=vd(t,e.type);t!==n&&(B(W,e),B(V,n))}function Q(e){W.current===e&&(F(V),F(W)),q.current===e&&(F(q),df._currentValue=z)}function Z(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",U=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+U}var J=!1;function ee(e,t){if(!e||J)return"";J=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],s=i[1];if(a&&s){var l=a.split("\n"),c=s.split("\n");for(o=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===l.length||o===c.length)for(r=l.length-1,o=c.length-1;1<=r&&0<=o&&l[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(l[r]!==c[o]){if(1!==r||1!==o)do{if(r--,0>--o||l[r]!==c[o]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Z(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return Z(e.type);case 16:return Z("Lazy");case 13:return e.child!==t&&null!==t?Z("Suspense Fallback"):Z("Suspense");case 19:return Z("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return Z("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var re=Object.prototype.hasOwnProperty,oe=o.unstable_scheduleCallback,ie=o.unstable_cancelCallback,ae=o.unstable_shouldYield,se=o.unstable_requestPaint,le=o.unstable_now,ce=o.unstable_getCurrentPriorityLevel,ue=o.unstable_ImmediatePriority,de=o.unstable_UserBlockingPriority,fe=o.unstable_NormalPriority,pe=o.unstable_LowPriority,he=o.unstable_IdlePriority,ge=o.log,me=o.unstable_setDisableYieldValue,be=null,ve=null;function ye(e){if("function"==typeof ge&&me(e),ve&&"function"==typeof ve.setStrictMode)try{ve.setStrictMode(be,e)}catch(e){}}var xe=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(we(e)/ke|0)|0},we=Math.log,ke=Math.LN2,Ce=256,Se=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~i)?o=Ae(r):0!==(a&=s)?o=Ae(a):n||0!==(n=s&~e)&&(o=Ae(n)):0!==(s=r&~i)?o=Ae(s):0!==a?o=Ae(a):n||0!==(n=r&~e)&&(o=Ae(n)),0===o?0:0!==t&&t!==o&&0===(t&i)&&((i=o&-o)>=(n=t&-t)||32===i&&4194048&n)?t:o}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ie(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Le(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Ne(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function Me(e,t){var n=t&-t;return 0!==((n=42&n?1:ze(n))&(e.suspendedLanes|t))?0:n}function ze(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Re(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function $e(){var e=M.p;return 0!==e?e:void 0===(e=window.event)?32:_f(e.type)}function De(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Fe=Math.random().toString(36).slice(2),Be="__reactFiber$"+Fe,He="__reactProps$"+Fe,Ue="__reactContainer$"+Fe,Ve="__reactEvents$"+Fe,We="__reactListeners$"+Fe,Ge="__reactHandles$"+Fe,qe="__reactResources$"+Fe,Ke="__reactMarker$"+Fe;function Ye(e){delete e[Be],delete e[He],delete e[Ve],delete e[We],delete e[Ge]}function Xe(e){var t=e[Be];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Be]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=zd(e);null!==e;){if(n=e[Be])return n;e=zd(e)}return t}n=(e=n).parentNode}return null}function Qe(e){if(e=e[Be]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Ze(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(s(33))}function Je(e){var t=e[qe];return t||(t=e[qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ke]=!0}var tt=new Set,nt={};function rt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var it=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),at={},st={};function lt(e,t,n){if(o=t,re.call(st,o)||!re.call(at,o)&&(it.test(o)?st[o]=!0:(at[o]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var o}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ft(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function pt(e){if(!e._valueTracker){var t=ft(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ft(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var mt=/[\n"\\]/g;function bt(e){return e.replace(mt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function vt(e,t,n,r,o,i,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?xt(e,a,dt(t)):null!=n?xt(e,a,dt(n)):null!=r&&e.removeAttribute("value"),null==o&&null!=i&&(e.defaultChecked=!!i),null!=o&&(e.checked=o&&"function"!=typeof o&&"symbol"!=typeof o),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function yt(e,t,n,r,o,i,a,s){if(null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.type=i),null!=t||null!=n){if(("submit"===i||"reset"===i)&&null==t)return void pt(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:o)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a),pt(e)}function xt(e,t,n){"number"===t&&gt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function kt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Ct(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(s(92));if(P(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),pt(e)}function St(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function At(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||_t.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Et(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(s(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&At(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&At(e,i,t[i])}function Tt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return It.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Lt(){}var Pt=null;function Nt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Mt=null,zt=null;function Rt(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[He]||null;if(!o)throw Error(s(90));vt(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ht(r)}break e;case"textarea":kt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var $t=!1;function Dt(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(null!==Mt||null!==zt)&&(Jc(),Mt&&(t=Mt,e=zt,zt=Mt=null,Rt(t),e)))for(t=0;t<e.length;t++)Rt(e[t])}}function Ft(e,t){var n=e.stateNode;if(null===n)return null;var r=n[He]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(s(231,t,typeof n));return n}var Bt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ht=!1;if(Bt)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch(e){Ht=!1}var Vt=null,Wt=null,Gt=null;function qt(){if(Gt)return Gt;var e,t,n=Wt,r=n.length,o="value"in Vt?Vt.value:Vt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Gt=o.slice(e,1<t?1-t:void 0)}function Kt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Xt(){return!1}function Qt(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Yt:Xt,this.isPropagationStopped=Xt,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Zt,Jt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Qt(tn),rn=p({},tn,{view:0,detail:0}),on=Qt(rn),an=p({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Zt=e.screenX-en.screenX,Jt=e.screenY-en.screenY):Jt=Zt=0,en=e),Zt)},movementY:function(e){return"movementY"in e?e.movementY:Jt}}),sn=Qt(an),ln=Qt(p({},an,{dataTransfer:0})),cn=Qt(p({},rn,{relatedTarget:0})),un=Qt(p({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Qt(p({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),fn=Qt(p({},tn,{data:0})),pn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=gn[e])&&!!t[e]}function bn(){return mn}var vn=Qt(p({},rn,{key:function(e){if(e.key){var t=pn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Kt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?hn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bn,charCode:function(e){return"keypress"===e.type?Kt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Kt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),yn=Qt(p({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=Qt(p({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bn})),wn=Qt(p({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=Qt(p({},an,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Cn=Qt(p({},tn,{newState:0,oldState:0})),Sn=[9,13,27,32],_n=Bt&&"CompositionEvent"in window,An=null;Bt&&"documentMode"in document&&(An=document.documentMode);var En=Bt&&"TextEvent"in window&&!An,Tn=Bt&&(!_n||An&&8<An&&11>=An),jn=String.fromCharCode(32),In=!1;function On(e,t){switch(e){case"keyup":return-1!==Sn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ln(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Pn=!1,Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function zn(e,t,n,r){Mt?zt?zt.push(r):zt=[r]:Mt=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rn=null,$n=null;function Dn(e){Yu(e,0)}function Fn(e){if(ht(Ze(e)))return e}function Bn(e,t){if("change"===e)return t}var Hn=!1;if(Bt){var Un;if(Bt){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Un=Vn}else Un=!1;Hn=Un&&(!document.documentMode||9<document.documentMode)}function Gn(){Rn&&(Rn.detachEvent("onpropertychange",qn),$n=Rn=null)}function qn(e){if("value"===e.propertyName&&Fn($n)){var t=[];zn(t,$n,e,Nt(e)),Dt(Dn,t)}}function Kn(e,t,n){"focusin"===e?(Gn(),$n=n,(Rn=t).attachEvent("onpropertychange",qn)):"focusout"===e&&Gn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Fn($n)}function Xn(e,t){if("click"===e)return Fn(t)}function Qn(e,t){if("input"===e||"change"===e)return Fn(t)}var Zn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Jn(e,t){if(Zn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!re.call(t,o)||!Zn(e[o],t[o]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ir=Bt&&"documentMode"in document&&11>=document.documentMode,ar=null,sr=null,lr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==ar||ar!==gt(r)||(r="selectionStart"in(r=ar)&&or(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},lr&&Jn(lr,r)||(lr=r,0<(r=rd(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},hr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return pr[e]=n[t];return e}Bt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var mr=gr("animationend"),br=gr("animationiteration"),vr=gr("animationstart"),yr=gr("transitionrun"),xr=gr("transitionstart"),wr=gr("transitioncancel"),kr=gr("transitionend"),Cr=new Map,Sr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Cr.set(e,t),rt(t,[e])}Sr.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof r&&"function"==typeof r.emit)return void r.emit("uncaughtException",e);console.error(e)},Er=[],Tr=0,jr=0;function Ir(){for(var e=Tr,t=jr=Tr=0;t<e;){var n=Er[t];Er[t++]=null;var r=Er[t];Er[t++]=null;var o=Er[t];Er[t++]=null;var i=Er[t];if(Er[t++]=null,null!==r&&null!==o){var a=r.pending;null===a?o.next=o:(o.next=a.next,a.next=o),r.pending=o}0!==i&&Nr(n,o,i)}}function Or(e,t,n,r){Er[Tr++]=e,Er[Tr++]=t,Er[Tr++]=n,Er[Tr++]=r,jr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Lr(e,t,n,r){return Or(e,t,n,r),Mr(e)}function Pr(e,t){return Or(e,null,null,t),Mr(e)}function Nr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var o=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(o=!0)),e=i,i=i.return;return 3===e.tag?(i=e.stateNode,o&&null!==t&&(o=31-xe(n),null===(r=(e=i.hiddenUpdates)[o])?e[o]=[t]:r.push(t),t.lane=536870912|n),i):null}function Mr(e){if(50<Vc)throw Vc=0,Wc=null,Error(s(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var zr={};function Rr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(e,t,n,r){return new Rr(e,t,n,r)}function Dr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fr(e,t){var n=e.alternate;return null===n?((n=$r(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Br(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hr(e,t,n,r,o,i){var a=0;if(r=e,"function"==typeof e)Dr(e)&&(a=1);else if("string"==typeof e)a=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,V.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case E:return(e=$r(31,n,t,o)).elementType=E,e.lanes=i,e;case b:return Ur(n.children,o,i,t);case v:a=8,o|=24;break;case y:return(e=$r(12,n,t,2|o)).elementType=y,e.lanes=i,e;case C:return(e=$r(13,n,t,o)).elementType=C,e.lanes=i,e;case S:return(e=$r(19,n,t,o)).elementType=S,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:a=10;break e;case x:a=9;break e;case k:a=11;break e;case _:a=14;break e;case A:a=16,r=null;break e}a=29,n=Error(s(130,null===e?"null":typeof e,"")),r=null}return(t=$r(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ur(e,t,n,r){return(e=$r(7,e,r,t)).lanes=n,e}function Vr(e,t,n){return(e=$r(6,e,null,t)).lanes=n,e}function Wr(e){var t=$r(18,null,null,0);return t.stateNode=e,t}function Gr(e,t,n){return(t=$r(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qr=new WeakMap;function Kr(e,t){if("object"==typeof e&&null!==e){var n=qr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},qr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Yr=[],Xr=0,Qr=null,Zr=0,Jr=[],eo=0,to=null,no=1,ro="";function oo(e,t){Yr[Xr++]=Zr,Yr[Xr++]=Qr,Qr=e,Zr=t}function io(e,t,n){Jr[eo++]=no,Jr[eo++]=ro,Jr[eo++]=to,to=e;var r=no;e=ro;var o=32-xe(r)-1;r&=~(1<<o),n+=1;var i=32-xe(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,no=1<<32-xe(t)+o|n<<o|r,ro=i+e}else no=1<<i|n<<o|r,ro=e}function ao(e){null!==e.return&&(oo(e,1),io(e,1,0))}function so(e){for(;e===Qr;)Qr=Yr[--Xr],Yr[Xr]=null,Zr=Yr[--Xr],Yr[Xr]=null;for(;e===to;)to=Jr[--eo],Jr[eo]=null,ro=Jr[--eo],Jr[eo]=null,no=Jr[--eo],Jr[eo]=null}function lo(e,t){Jr[eo++]=no,Jr[eo++]=ro,Jr[eo++]=to,no=t.id,ro=t.overflow,to=e}var co=null,uo=null,fo=!1,po=null,ho=!1,go=Error(s(519));function mo(e){throw ko(Kr(Error(s(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),go}function bo(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Be]=e,t[He]=r,n){case"dialog":Xu("cancel",t),Xu("close",t);break;case"iframe":case"object":case"embed":Xu("load",t);break;case"video":case"audio":for(n=0;n<qu.length;n++)Xu(qu[n],t);break;case"source":Xu("error",t);break;case"img":case"image":case"link":Xu("error",t),Xu("load",t);break;case"details":Xu("toggle",t);break;case"input":Xu("invalid",t),yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xu("invalid",t);break;case"textarea":Xu("invalid",t),Ct(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||cd(t.textContent,n)?(null!=r.popover&&(Xu("beforetoggle",t),Xu("toggle",t)),null!=r.onScroll&&Xu("scroll",t),null!=r.onScrollEnd&&Xu("scrollend",t),null!=r.onClick&&(t.onclick=Lt),t=!0):t=!1,t||mo(e,!0)}function vo(e){for(co=e.return;co;)switch(co.tag){case 5:case 31:case 13:return void(ho=!1);case 27:case 3:return void(ho=!0);default:co=co.return}}function yo(e){if(e!==co)return!1;if(!fo)return vo(e),fo=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||yd(e.type,e.memoizedProps)),t=!t),t&&uo&&mo(e),vo(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));uo=Md(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));uo=Md(e)}else 27===n?(n=uo,Ad(e.type)?(e=Nd,Nd=null,uo=e):uo=n):uo=co?Pd(e.stateNode.nextSibling):null;return!0}function xo(){uo=co=null,fo=!1}function wo(){var e=po;return null!==e&&(null===Ic?Ic=e:Ic.push.apply(Ic,e),po=null),e}function ko(e){null===po?po=[e]:po.push(e)}var Co=D(null),So=null,_o=null;function Ao(e,t,n){B(Co,t._currentValue),t._currentValue=n}function Eo(e){e._currentValue=Co.current,F(Co)}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jo(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){var i=o.dependencies;if(null!==i){var a=o.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=o;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),To(i.return,n,e),r||(a=null);break e}i=l.next}}else if(18===o.tag){if(null===(a=o.return))throw Error(s(341));a.lanes|=n,null!==(i=a.alternate)&&(i.lanes|=n),To(a,n,e),a=null}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}function Io(e,t,n,r){e=null;for(var o=t,i=!1;null!==o;){if(!i)if(524288&o.flags)i=!0;else if(262144&o.flags)break;if(10===o.tag){var a=o.alternate;if(null===a)throw Error(s(387));if(null!==(a=a.memoizedProps)){var l=o.type;Zn(o.pendingProps.value,a.value)||(null!==e?e.push(l):e=[l])}}else if(o===q.current){if(null===(a=o.alternate))throw Error(s(387));a.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(null!==e?e.push(df):e=[df])}o=o.return}null!==e&&jo(t,e,n,r),t.flags|=262144}function Oo(e){for(e=e.firstContext;null!==e;){if(!Zn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Lo(e){So=e,_o=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Po(e){return Mo(So,e)}function No(e,t){return null===So&&Lo(e),Mo(e,t)}function Mo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===_o){if(null===e)throw Error(s(308));_o=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _o=_o.next=t;return n}var zo="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ro=o.unstable_scheduleCallback,$o=o.unstable_NormalPriority,Do={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new zo,data:new Map,refCount:0}}function Bo(e){e.refCount--,0===e.refCount&&Ro($o,function(){e.controller.abort()})}var Ho=null,Uo=0,Vo=0,Wo=null;function Go(){if(0===--Uo&&null!==Ho){null!==Wo&&(Wo.status="fulfilled");var e=Ho;Ho=null,Vo=0,Wo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var qo=N.S;N.S=function(e,t){Pc=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ho){var n=Ho=[];Uo=0,Vo=Hu(),Wo={status:"pending",value:void 0,then:function(e){n.push(e)}}}Uo++,t.then(Go,Go)}(0,t),null!==qo&&qo(e,t)};var Ko=D(null);function Yo(){var e=Ko.current;return null!==e?e:hc.pooledCache}function Xo(e,t){B(Ko,null===t?Ko.current:t.pool)}function Qo(){var e=Yo();return null===e?null:{parent:Do._currentValue,pool:e}}var Zo=Error(s(460)),Jo=Error(s(474)),ei=Error(s(542)),ti={then:function(){}};function ni(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ri(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Lt,Lt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw si(e=t.reason),e;default:if("string"==typeof t.status)t.then(Lt,Lt);else{if(null!==(e=hc)&&100<e.shellSuspendCounter)throw Error(s(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw si(e=t.reason),e}throw ii=t,Zo}}function oi(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw ii=e,Zo;throw e}}var ii=null;function ai(){if(null===ii)throw Error(s(459));var e=ii;return ii=null,e}function si(e){if(e===Zo||e===ei)throw Error(s(483))}var li=null,ci=0;function ui(e){var t=ci;return ci+=1,null===li&&(li=[]),ri(li,e,t)}function di(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fi(e,t){if(t.$$typeof===h)throw Error(s(525));throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(e,t){return(e=Fr(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Vr(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===b?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===A&&oi(i)===t.type)?(di(t=o(t,n.props),n),t.return=e,t):(di(t=Hr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gr(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Ur(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Vr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case g:return di(n=Hr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case m:return(t=Gr(t,e.mode,n)).return=e,t;case A:return f(e,t=oi(t),n)}if(P(t)||I(t))return(t=Ur(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,ui(t),n);if(t.$$typeof===w)return f(e,No(e,t),n);fi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case g:return n.key===o?c(e,t,n,r):null;case m:return n.key===o?u(e,t,n,r):null;case A:return p(e,t,n=oi(n),r)}if(P(n)||I(n))return null!==o?null:d(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,ui(n),r);if(n.$$typeof===w)return p(e,t,No(e,n),r);fi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case g:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case m:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return h(e,t,n,r=oi(r),o)}if(P(r)||I(r))return d(t,e=e.get(n)||null,r,o,null);if("function"==typeof r.then)return h(e,t,n,ui(r),o);if(r.$$typeof===w)return h(e,t,n,No(t,r),o);fi(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===b&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case g:e:{for(var y=u.key;null!==c;){if(c.key===y){if((y=u.type)===b){if(7===c.tag){n(l,c.sibling),(d=o(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===y||"object"==typeof y&&null!==y&&y.$$typeof===A&&oi(y)===c.type){n(l,c.sibling),di(d=o(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===b?((d=Ur(u.props.children,l.mode,d,u.key)).return=l,l=d):(di(d=Hr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return a(l);case m:e:{for(y=u.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=o(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Gr(u,l.mode,d)).return=l,l=d}return a(l);case A:return v(l,c,u=oi(u),d)}if(P(u))return function(o,a,s,l){for(var c=null,u=null,d=a,g=a=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var b=p(o,d,s[g],l);if(null===b){null===d&&(d=m);break}e&&d&&null===b.alternate&&t(o,d),a=i(b,a,g),null===u?c=b:u.sibling=b,u=b,d=m}if(g===s.length)return n(o,d),fo&&oo(o,g),c;if(null===d){for(;g<s.length;g++)null!==(d=f(o,s[g],l))&&(a=i(d,a,g),null===u?c=d:u.sibling=d,u=d);return fo&&oo(o,g),c}for(d=r(d);g<s.length;g++)null!==(m=h(d,o,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),a=i(m,a,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(o,e)}),fo&&oo(o,g),c}(l,c,u,d);if(I(u)){if("function"!=typeof(y=I(u)))throw Error(s(150));return function(o,a,l,c){if(null==l)throw Error(s(151));for(var u=null,d=null,g=a,m=a=0,b=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(b=g,g=null):b=g.sibling;var y=p(o,g,v.value,c);if(null===y){null===g&&(g=b);break}e&&g&&null===y.alternate&&t(o,g),a=i(y,a,m),null===d?u=y:d.sibling=y,d=y,g=b}if(v.done)return n(o,g),fo&&oo(o,m),u;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=f(o,v.value,c))&&(a=i(v,a,m),null===d?u=v:d.sibling=v,d=v);return fo&&oo(o,m),u}for(g=r(g);!v.done;m++,v=l.next())null!==(v=h(g,o,m,v.value,c))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),a=i(v,a,m),null===d?u=v:d.sibling=v,d=v);return e&&g.forEach(function(e){return t(o,e)}),fo&&oo(o,m),u}(l,c,u=y.call(u),d)}if("function"==typeof u.then)return v(l,c,ui(u),d);if(u.$$typeof===w)return v(l,c,No(l,u),d);fi(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=o(c,u)).return=l,l=d):(n(l,c),(d=Vr(u,l.mode,d)).return=l,l=d),a(l)):n(l,c)}return function(e,t,n,r){try{ci=0;var o=v(e,t,n,r);return li=null,o}catch(t){if(t===Zo||t===ei)throw t;var i=$r(29,t,null,e.mode);return i.lanes=r,i.return=e,i}}}var hi=pi(!0),gi=pi(!1),mi=!1;function bi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Mr(e),Nr(e,null,n),t}return Or(e,r,t,n),Mr(e)}function wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}function ki(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ci=!1;function Si(){if(Ci&&null!==Wo)throw Wo}function _i(e,t,n,r){Ci=!1;var o=e.updateQueue;mi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var f=-536870913&s.lane,h=f!==s.lane;if(h?(mc&f)===f:(r&f)===f){0!==f&&f===Vo&&(Ci=!0),null!==u&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var g=e,m=s;f=t;var b=n;switch(m.tag){case 1:if("function"==typeof(g=m.payload)){d=g.call(b,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=m.payload)?g.call(b,d,f):g))break e;d=p({},d,f);break e;case 2:mi=!0}}null!==(f=s.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=o.callbacks)?o.callbacks=[f]:h.push(f))}else h={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null===i&&(o.shared.lanes=0),Sc|=a,e.lanes=a,e.memoizedState=d}}function Ai(e,t){if("function"!=typeof e)throw Error(s(191,e));e.call(t)}function Ei(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ai(n[e],t)}var Ti=D(null),ji=D(0);function Ii(e,t){B(ji,e=kc),B(Ti,t),kc=e|t.baseLanes}function Oi(){B(ji,kc),B(Ti,Ti.current)}function Li(){kc=ji.current,F(Ti),F(ji)}var Pi=D(null),Ni=null;function Mi(e){var t=e.alternate;B(Fi,1&Fi.current),B(Pi,e),null===Ni&&(null===t||null!==Ti.current||null!==t.memoizedState)&&(Ni=e)}function zi(e){B(Fi,Fi.current),B(Pi,e),null===Ni&&(Ni=e)}function Ri(e){22===e.tag?(B(Fi,Fi.current),B(Pi,e),null===Ni&&(Ni=e)):$i()}function $i(){B(Fi,Fi.current),B(Pi,Pi.current)}function Di(e){F(Pi),Ni===e&&(Ni=null),F(Fi)}var Fi=D(0);function Bi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Od(n)||Ld(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hi=0,Ui=null,Vi=null,Wi=null,Gi=!1,qi=!1,Ki=!1,Yi=0,Xi=0,Qi=null,Zi=0;function Ji(){throw Error(s(321))}function ea(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function ta(e,t,n,r,o,i){return Hi=i,Ui=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=null===e||null===e.memoizedState?ms:bs,Ki=!1,i=n(r,o),Ki=!1,qi&&(i=ra(t,n,r,o)),na(e),i}function na(e){N.H=gs;var t=null!==Vi&&null!==Vi.next;if(Hi=0,Wi=Vi=Ui=null,Gi=!1,Xi=0,Qi=null,t)throw Error(s(300));null===e||Ps||null!==(e=e.dependencies)&&Oo(e)&&(Ps=!0)}function ra(e,t,n,r){Ui=e;var o=0;do{if(qi&&(Qi=null),Xi=0,qi=!1,25<=o)throw Error(s(301));if(o+=1,Wi=Vi=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}N.H=vs,i=t(n,r)}while(qi);return i}function oa(){var e=N.H,t=e.useState()[0];return t="function"==typeof t.then?ua(t):t,e=e.useState()[0],(null!==Vi?Vi.memoizedState:null)!==e&&(Ui.flags|=1024),t}function ia(){var e=0!==Yi;return Yi=0,e}function aa(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function sa(e){if(Gi){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Gi=!1}Hi=0,Wi=Vi=Ui=null,qi=!1,Xi=Yi=0,Qi=null}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wi?Ui.memoizedState=Wi=e:Wi=Wi.next=e,Wi}function ca(){if(null===Vi){var e=Ui.alternate;e=null!==e?e.memoizedState:null}else e=Vi.next;var t=null===Wi?Ui.memoizedState:Wi.next;if(null!==t)Wi=t,Vi=e;else{if(null===e){if(null===Ui.alternate)throw Error(s(467));throw Error(s(310))}e={memoizedState:(Vi=e).memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},null===Wi?Ui.memoizedState=Wi=e:Wi=Wi.next=e}return Wi}function ua(e){var t=Xi;return Xi+=1,null===Qi&&(Qi=[]),e=ri(Qi,e,t),t=Ui,null===(null===Wi?t.memoizedState:Wi.next)&&(t=t.alternate,N.H=null===t||null===t.memoizedState?ms:bs),e}function da(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ua(e);if(e.$$typeof===w)return Po(e)}throw Error(s(438,String(e)))}function fa(e){var t=null,n=Ui.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ui.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=T;return t.index++,n}function pa(e,t){return"function"==typeof t?t(e):t}function ha(e){return ga(ca(),Vi,e)}function ga(e,t,n){var r=e.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,null===o)e.memoizedState=i;else{var l=a=null,c=null,u=t=o.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(mc&f)===f:(Hi&f)===f){var p=u.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Vo&&(d=!0);else{if((Hi&p)===p){u=u.next,p===Vo&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,a=i):c=c.next=f,Ui.lanes|=p,Sc|=p}f=u.action,Ki&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=p,a=i):c=c.next=p,Ui.lanes|=f,Sc|=f;u=u.next}while(null!==u&&u!==t);if(null===c?a=i:c.next=l,!Zn(i,e.memoizedState)&&(Ps=!0,d&&null!==(n=Wo)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=c,r.lastRenderedState=i}return null===o&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ma(e){var t=ca(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);Zn(i,t.memoizedState)||(Ps=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ba(e,t,n){var r=Ui,o=ca(),i=fo;if(i){if(void 0===n)throw Error(s(407));n=n()}else n=t();var a=!Zn((Vi||o).memoizedState,n);if(a&&(o.memoizedState=n,Ps=!0),o=o.queue,Ha(xa.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||null!==Wi&&1&Wi.memoizedState.tag){if(r.flags|=2048,Ra(9,{destroy:void 0},ya.bind(null,r,o,n,t),null),null===hc)throw Error(s(349));i||127&Hi||va(r,t,n)}return n}function va(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ui.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ya(e,t,n,r){t.value=n,t.getSnapshot=r,wa(t)&&ka(e)}function xa(e,t,n){return n(function(){wa(t)&&ka(e)})}function wa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch(e){return!0}}function ka(e){var t=Pr(e,2);null!==t&&Kc(t,0,2)}function Ca(e){var t=la();if("function"==typeof e){var n=e;if(e=n(),Ki){ye(!0);try{n()}finally{ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:e},t}function Sa(e,t,n,r){return e.baseState=n,ga(e,Vi,"function"==typeof r?r:pa)}function _a(e,t,n,r,o){if(fs(e))throw Error(s(485));if(null!==(e=t.action)){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==N.T?n(!0):i.isTransition=!1,r(i),null===(n=t.pending)?(i.next=t.pending=i,Aa(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Aa(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=N.T,a={};N.T=a;try{var s=n(o,r),l=N.S;null!==l&&l(a,s),Ea(e,t,s)}catch(n){ja(e,t,n)}finally{null!==i&&null!==a.types&&(i.types=a.types),N.T=i}}else try{Ea(e,t,i=n(o,r))}catch(n){ja(e,t,n)}}function Ea(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ta(e,t,n)},function(n){return ja(e,t,n)}):Ta(e,t,n)}function Ta(e,t,n){t.status="fulfilled",t.value=n,Ia(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Aa(e,n)))}function ja(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ia(t),t=t.next}while(t!==r)}e.action=null}function Ia(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oa(e,t){return t}function La(e,t){if(fo){var n=hc.formState;if(null!==n){e:{var r=Ui;if(fo){if(uo){t:{for(var o=uo,i=ho;8!==o.nodeType;){if(!i){o=null;break t}if(null===(o=Pd(o.nextSibling))){o=null;break t}}o="F!"===(i=o.data)||"F"===i?o:null}if(o){uo=Pd(o.nextSibling),r="F!"===o.data;break e}}mo(r)}r=!1}r&&(t=n[0])}}return(n=la()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:t},n.queue=r,n=cs.bind(null,Ui,r),r.dispatch=n,r=Ca(!1),i=ds.bind(null,Ui,!1,r.queue),o={state:t,dispatch:null,action:e,pending:null},(r=la()).queue=o,n=_a.bind(null,Ui,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Pa(e){return Na(ca(),Vi,e)}function Na(e,t,n){if(t=ga(e,t,Oa)[0],e=ha(pa)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ua(t)}catch(e){if(e===Zo)throw ei;throw e}else r=t;var o=(t=ca()).queue,i=o.dispatch;return n!==t.memoizedState&&(Ui.flags|=2048,Ra(9,{destroy:void 0},Ma.bind(null,o,n),null)),[r,i,e]}function Ma(e,t){e.action=t}function za(e){var t=ca(),n=Vi;if(null!==n)return Na(t,n,e);ca(),t=t.memoizedState;var r=(n=ca()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ra(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ui.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $a(){return ca().memoizedState}function Da(e,t,n,r){var o=la();Ui.flags|=e,o.memoizedState=Ra(1|t,{destroy:void 0},n,void 0===r?null:r)}function Fa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=o.memoizedState.inst;null!==Vi&&null!==r&&ea(r,Vi.memoizedState.deps)?o.memoizedState=Ra(t,i,n,r):(Ui.flags|=e,o.memoizedState=Ra(1|t,i,n,r))}function Ba(e,t){Da(8390656,8,e,t)}function Ha(e,t){Fa(2048,8,e,t)}function Ua(e){var t=ca().memoizedState;return function(e){Ui.flags|=4;var t=Ui.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ui.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&pc)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Va(e,t){return Fa(4,2,e,t)}function Wa(e,t){return Fa(4,4,e,t)}function Ga(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function qa(e,t,n){n=null!=n?n.concat([e]):null,Fa(4,4,Ga.bind(null,t,e),n)}function Ka(){}function Ya(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ea(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ea(t,r[1]))return r[0];if(r=e(),Ki){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r}function Qa(e,t,n){return void 0===n||1073741824&Hi&&!(261930&mc)?e.memoizedState=t:(e.memoizedState=n,e=qc(),Ui.lanes|=e,Sc|=e,n)}function Za(e,t,n,r){return Zn(n,t)?n:null!==Ti.current?(e=Qa(e,n,r),Zn(e,t)||(Ps=!0),e):42&Hi&&(!(1073741824&Hi)||261930&mc)?(e=qc(),Ui.lanes|=e,Sc|=e,t):(Ps=!0,e.memoizedState=n)}function Ja(e,t,n,r,o){var i=M.p;M.p=0!==i&&8>i?i:8;var a,s,l,c=N.T,u={};N.T=u,ds(e,!1,t,n);try{var d=o(),f=N.S;null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?us(e,t,(a=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Gc()):us(e,t,r,Gc())}catch(n){us(e,t,{then:function(){},status:"rejected",reason:n},Gc())}finally{M.p=i,null!==c&&null!==u.types&&(c.types=u.types),N.T=c}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(s(476));var o=ns(e).queue;Ja(e,o,t,z,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:z},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Gc())}function os(){return Po(df)}function is(){return ca().memoizedState}function as(){return ca().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Gc(),r=xi(t,e=yi(n),n);return null!==r&&(Kc(r,0,n),wi(r,t,n)),t={cache:Fo()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Gc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fs(e)?ps(t,n):null!==(n=Lr(e,t,n,r))&&(Kc(n,0,r),hs(n,t,r))}function cs(e,t,n){us(e,t,n,Gc())}function us(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fs(e))ps(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Zn(s,a))return Or(e,t,o,0),null===hc&&Ir(),!1}catch(e){}if(null!==(n=Lr(e,t,o,r)))return Kc(n,0,r),hs(n,t,r),!0}return!1}function ds(e,t,n,r){if(r={lane:2,revertLane:Hu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(s(479))}else null!==(t=Lr(e,n,r,2))&&Kc(t,0,2)}function fs(e){var t=e.alternate;return e===Ui||null!==t&&t===Ui}function ps(e,t){qi=Gi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hs(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}var gs={readContext:Po,use:da,useCallback:Ji,useContext:Ji,useEffect:Ji,useImperativeHandle:Ji,useLayoutEffect:Ji,useInsertionEffect:Ji,useMemo:Ji,useReducer:Ji,useRef:Ji,useState:Ji,useDebugValue:Ji,useDeferredValue:Ji,useTransition:Ji,useSyncExternalStore:Ji,useId:Ji,useHostTransitionStatus:Ji,useFormState:Ji,useActionState:Ji,useOptimistic:Ji,useMemoCache:Ji,useCacheRefresh:Ji};gs.useEffectEvent=Ji;var ms={readContext:Po,use:da,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:Ba,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Da(4194308,4,Ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){Da(4,2,e,t)},useMemo:function(e,t){var n=la();t=void 0===t?null:t;var r=e();if(Ki){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=la();if(void 0!==n){var o=n(t);if(Ki){ye(!0);try{n(t)}finally{ye(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=ls.bind(null,Ui,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},la().memoizedState=e},useState:function(e){var t=(e=Ca(e)).queue,n=cs.bind(null,Ui,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ka,useDeferredValue:function(e,t){return Qa(la(),e,t)},useTransition:function(){var e=Ca(!1);return e=Ja.bind(null,Ui,e.queue,!0,!1),la().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ui,o=la();if(fo){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===hc)throw Error(s(349));127&mc||va(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ba(xa.bind(null,r,i,e),[e]),r.flags|=2048,Ra(9,{destroy:void 0},ya.bind(null,r,i,n,t),null),n},useId:function(){var e=la(),t=hc.identifierPrefix;if(fo){var n=ro;t="_"+t+"R_"+(n=(no&~(1<<32-xe(no)-1)).toString(32)+n),0<(n=Yi++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Zi++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:os,useFormState:La,useActionState:La,useOptimistic:function(e){var t=la();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,Ui,!0,n),n.dispatch=t,[e,t]},useMemoCache:fa,useCacheRefresh:function(){return la().memoizedState=ss.bind(null,Ui)},useEffectEvent:function(e){var t=la(),n={impl:e};return t.memoizedState=n,function(){if(2&pc)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},bs={readContext:Po,use:da,useCallback:Ya,useContext:Po,useEffect:Ha,useImperativeHandle:qa,useInsertionEffect:Va,useLayoutEffect:Wa,useMemo:Xa,useReducer:ha,useRef:$a,useState:function(){return ha(pa)},useDebugValue:Ka,useDeferredValue:function(e,t){return Za(ca(),Vi.memoizedState,e,t)},useTransition:function(){var e=ha(pa)[0],t=ca().memoizedState;return["boolean"==typeof e?e:ua(e),t]},useSyncExternalStore:ba,useId:is,useHostTransitionStatus:os,useFormState:Pa,useActionState:Pa,useOptimistic:function(e,t){return Sa(ca(),0,e,t)},useMemoCache:fa,useCacheRefresh:as};bs.useEffectEvent=Ua;var vs={readContext:Po,use:da,useCallback:Ya,useContext:Po,useEffect:Ha,useImperativeHandle:qa,useInsertionEffect:Va,useLayoutEffect:Wa,useMemo:Xa,useReducer:ma,useRef:$a,useState:function(){return ma(pa)},useDebugValue:Ka,useDeferredValue:function(e,t){var n=ca();return null===Vi?Qa(n,e,t):Za(n,Vi.memoizedState,e,t)},useTransition:function(){var e=ma(pa)[0],t=ca().memoizedState;return["boolean"==typeof e?e:ua(e),t]},useSyncExternalStore:ba,useId:is,useHostTransitionStatus:os,useFormState:za,useActionState:za,useOptimistic:function(e,t){var n=ca();return null!==Vi?Sa(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fa,useCacheRefresh:as};function ys(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:p({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=Ua;var xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gc(),o=yi(r);o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Kc(t,0,r),wi(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gc(),o=yi(r);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=xi(e,o,r))&&(Kc(t,0,r),wi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gc(),r=yi(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xi(e,r,n))&&(Kc(t,0,n),wi(t,e,n))}};function ws(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Jn(n,r)&&Jn(o,i))}function ks(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function Cs(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var o in n===t&&(n=p({},n)),e)void 0===n[o]&&(n[o]=e[o]);return n}function Ss(e){Ar(e)}function _s(e){console.error(e)}function As(e){Ar(e)}function Es(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ts(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function js(e,t,n){return(n=yi(n)).tag=3,n.payload={element:null},n.callback=function(){Es(e,t)},n}function Is(e){return(e=yi(e)).tag=3,e}function Os(e,t,n,r){var o=n.type.getDerivedStateFromError;if("function"==typeof o){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Ts(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Ts(t,n,r),"function"!=typeof o&&(null===zc?zc=new Set([this]):zc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ls=Error(s(461)),Ps=!1;function Ns(e,t,n,r){t.child=null===e?gi(t,null,n,r):hi(t,e.child,n,r)}function Ms(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Lo(t),r=ta(e,t,n,a,i,o),s=ia(),null===e||Ps?(fo&&s&&ao(t),t.flags|=1,Ns(e,t,r,o),t.child):(aa(e,t,o),ol(e,t,o))}function zs(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Dr(i)||void 0!==i.defaultProps||null!==n.compare?((e=Hr(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Rs(e,t,i,r,o))}if(i=e.child,!il(e,o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Jn)(a,r)&&e.ref===t.ref)return ol(e,t,o)}return t.flags|=1,(e=Fr(i,r)).ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Jn(i,r)&&e.ref===t.ref){if(Ps=!1,t.pendingProps=r=i,!il(e,o))return t.lanes=e.lanes,ol(e,t,o);131072&e.flags&&(Ps=!0)}}return Vs(e,t,n,r,o)}function $s(e,t,n,r){var o=r.children,i=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(i=null!==i?i.baseLanes|n:n,null!==e){for(r=t.child=e.child,o=0;null!==r;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return Fs(e,t,i,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Fs(e,t,null!==i?i.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Xo(0,null!==i?i.cachePool:null),null!==i?Ii(t,i):Oi(),Ri(t)}else null!==i?(Xo(0,i.cachePool),Ii(t,i),$i(),t.memoizedState=null):(null!==e&&Xo(0,null),Oi(),$i());return Ns(e,t,o,n),t.child}function Ds(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fs(e,t,n,r,o){var i=Yo();return i=null===i?null:{parent:Do._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Xo(0,null),Oi(),Ri(t),null!==e&&Io(e,t,r,!0),t.childLanes=o,null}function Bs(e,t){return(t=Js({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Hs(e,t,n){return hi(t,e.child,null,n),(e=Bs(t,t.pendingProps)).flags|=2,Di(t),t.memoizedState=null,e}function Us(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(s(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Vs(e,t,n,r,o){return Lo(t),n=ta(e,t,n,r,void 0,o),r=ia(),null===e||Ps?(fo&&r&&ao(t),t.flags|=1,Ns(e,t,n,o),t.child):(aa(e,t,o),ol(e,t,o))}function Ws(e,t,n,r,o,i){return Lo(t),t.updateQueue=null,n=ra(t,r,n,o),na(e),r=ia(),null===e||Ps?(fo&&r&&ao(t),t.flags|=1,Ns(e,t,n,i),t.child):(aa(e,t,i),ol(e,t,i))}function Gs(e,t,n,r,o){if(Lo(t),null===t.stateNode){var i=zr,a=n.contextType;"object"==typeof a&&null!==a&&(i=Po(a)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=xs,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},bi(t),a=n.contextType,i.context="object"==typeof a&&null!==a?Po(a):zr,i.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(ys(t,n,a,r),i.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(a=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),a!==i.state&&xs.enqueueReplaceState(i,i.state,null),_i(t,r,i,o),Si(),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var s=t.memoizedProps,l=Cs(n,s);i.props=l;var c=i.context,u=n.contextType;a=zr,"object"==typeof u&&null!==u&&(a=Po(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof i.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s||c!==a)&&ks(t,i,r,a),mi=!1;var f=t.memoizedState;i.state=f,_i(t,r,i,o),Si(),c=t.memoizedState,s||f!==c||mi?("function"==typeof d&&(ys(t,n,d,r),c=t.memoizedState),(l=mi||ws(t,n,l,r,f,c,a))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,vi(e,t),u=Cs(n,a=t.memoizedProps),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,l=zr,"object"==typeof c&&null!==c&&(l=Po(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(a!==d||f!==l)&&ks(t,i,r,l),mi=!1,f=t.memoizedState,i.state=f,_i(t,r,i,o),Si();var p=t.memoizedState;a!==d||f!==p||mi||null!==e&&null!==e.dependencies&&Oo(e.dependencies)?("function"==typeof s&&(ys(t,n,s,r),p=t.memoizedState),(u=mi||ws(t,n,u,r,f,p,l)||null!==e&&null!==e.dependencies&&Oo(e.dependencies))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Us(e,t),r=!!(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=hi(t,e.child,null,o),t.child=hi(t,null,n,o)):Ns(e,t,n,o),t.memoizedState=i.state,e=t.child):e=ol(e,t,o),e}function qs(e,t,n,r){return xo(),t.flags|=256,Ns(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ys(e){return{baseLanes:e,cachePool:Qo()}}function Xs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Ec),e}function Qs(e,t,n){var r,o=t.pendingProps,i=!1,a=!!(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&!!(2&Fi.current)),r&&(i=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(fo){if(i?Mi(t):$i(),(e=uo)?null!==(e=null!==(e=Id(e,ho))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw mo(t);return Ld(e)?t.lanes=32:t.lanes=536870912,null}var l=o.children;return o=o.fallback,i?($i(),l=Js({mode:"hidden",children:l},i=t.mode),o=Ur(o,i,n,null),l.return=t,o.return=t,l.sibling=o,t.child=l,(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Ks,Ds(null,o)):(Mi(t),Zs(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(a)256&t.flags?(Mi(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?($i(),t.child=e.child,t.flags|=128,t=null):($i(),l=o.fallback,i=t.mode,o=Js({mode:"visible",children:o.children},i),(l=Ur(l,i,n,null)).flags|=2,o.return=t,l.return=t,o.sibling=l,t.child=o,hi(t,e.child,null,n),(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Ks,t=Ds(null,o));else if(Mi(t),Ld(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(o=Error(s(419))).stack="",o.digest=r,ko({value:o,source:null,stack:null}),t=el(e,t,n)}else if(Ps||Io(e,t,n,!1),r=0!==(n&e.childLanes),Ps||r){if(null!==(r=hc)&&0!==(o=Me(r,n))&&o!==c.retryLane)throw c.retryLane=o,Pr(e,o),Kc(r,0,o),Ls;Od(l)||au(),t=el(e,t,n)}else Od(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,uo=Pd(l.nextSibling),co=t,fo=!0,po=null,ho=!1,null!==e&&lo(t,e),(t=Zs(t,o.children)).flags|=4096);return t}return i?($i(),l=o.fallback,i=t.mode,u=(c=e.child).sibling,(o=Fr(c,{mode:"hidden",children:o.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Fr(u,l):(l=Ur(l,i,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,Ds(null,o),o=t.child,null===(l=e.child.memoizedState)?l=Ys(n):(null!==(i=l.cachePool)?(c=Do._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Qo(),l={baseLanes:l.baseLanes|n,cachePool:i}),o.memoizedState=l,o.childLanes=Xs(e,r,n),t.memoizedState=Ks,Ds(e.child,o)):(Mi(t),e=(n=e.child).sibling,(n=Fr(n,{mode:"visible",children:o.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Zs(e,t){return(t=Js({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Js(e,t){return(e=$r(22,e,null,t)).lanes=0,e}function el(e,t,n){return hi(t,e.child,null,n),(e=Zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function nl(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.treeForkCount=i)}function rl(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var a=Fi.current,s=!!(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,B(Fi,a),Ns(e,t,r,n),r=fo?Zr:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Bi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),nl(t,!1,o,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Bi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}nl(t,!0,n,null,i,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Sc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Io(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Fr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function il(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Oo(e))}function al(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ps=!0;else{if(!(il(e,n)||128&t.flags))return Ps=!1,function(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ao(0,Do,e.memoizedState.cache),xo();break;case 27:case 5:X(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ao(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,zi(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Mi(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Qs(e,t,n):(Mi(t),null!==(e=ol(e,t,n))?e.sibling:null);Mi(t);break;case 19:var o=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Io(e,t,n,!1),r=0!==(n&t.childLanes)),o){if(r)return rl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),B(Fi,Fi.current),r)break;return null;case 22:return t.lanes=0,$s(e,t,n,t.pendingProps);case 24:Ao(0,Do,e.memoizedState.cache)}return ol(e,t,n)}(e,t,n);Ps=!!(131072&e.flags)}else Ps=!1,fo&&1048576&t.flags&&io(t,Zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=oi(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var o=e.$$typeof;if(o===k){t.tag=11,t=Ms(null,t,e,r,n);break e}if(o===_){t.tag=14,t=zs(null,t,e,r,n);break e}}throw t=L(e)||e,Error(s(306,t,""))}Dr(e)?(r=Cs(e,r),t.tag=1,t=Gs(null,t,e,r,n)):(t.tag=0,t=Vs(null,t,e,r,n))}return t;case 0:return Vs(e,t,t.type,t.pendingProps,n);case 1:return Gs(e,t,r=t.type,o=Cs(r,t.pendingProps),n);case 3:e:{if(K(t,t.stateNode.containerInfo),null===e)throw Error(s(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,vi(e,t),_i(t,r,null,n);var a=t.memoizedState;if(r=a.cache,Ao(0,Do,r),r!==i.cache&&jo(t,[Do],n,!0),Si(),r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=qs(e,t,r,n);break e}if(r!==o){ko(o=Kr(Error(s(424)),t)),t=qs(e,t,r,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,uo=Pd(e.firstChild),co=t,fo=!0,po=null,ho=!0,n=gi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xo(),r===o){t=ol(e,t,n);break e}Ns(e,t,r,n)}t=t.child}return t;case 26:return Us(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:fo||(n=t.type,e=t.pendingProps,(r=md(G.current).createElement(n))[Be]=t,r[He]=e,fd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),null===e&&fo&&(r=t.stateNode=Rd(t.type,t.pendingProps,G.current),co=t,ho=!0,o=uo,Ad(t.type)?(Nd=o,uo=Pd(r.firstChild)):uo=o),Ns(e,t,t.pendingProps.children,n),Us(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&fo&&((o=r=uo)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(null==o.href||""===o.href?null:o.href)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin)||e.getAttribute("title")!==(null==o.title?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==o.src?null:o.src)||e.getAttribute("type")!==(null==o.type?null:o.type)||e.getAttribute("crossorigin")!==(null==o.crossOrigin?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==o.name?null:""+o.name;if("hidden"===o.type&&e.getAttribute("name")===i)return e}if(null===(e=Pd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,ho))?(t.stateNode=r,co=t,uo=Pd(r.firstChild),ho=!1,o=!0):o=!1),o||mo(t)),X(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,r=i.children,yd(o,i)?r=null:null!==a&&yd(o,a)&&(t.flags|=32),null!==t.memoizedState&&(o=ta(e,t,oa,null,null,n),df._currentValue=o),Us(e,t),Ns(e,t,r,n),t.child;case 6:return null===e&&fo&&((e=n=uo)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Pd(e.nextSibling)))return null}return e}(n,t.pendingProps,ho))?(t.stateNode=n,co=t,uo=null,e=!0):e=!1),e||mo(t)),null;case 13:return Qs(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=hi(t,null,r,n):Ns(e,t,r,n),t.child;case 11:return Ms(e,t,t.type,t.pendingProps,n);case 7:return Ns(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ns(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ao(0,t.type,r.value),Ns(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Lo(t),r=r(o=Po(o)),t.flags|=1,Ns(e,t,r,n),t.child;case 14:return zs(e,t,t.type,t.pendingProps,n);case 15:return Rs(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,o=!!(128&t.flags);if(t.flags&=-129,null===e){if(fo){if("hidden"===r.mode)return e=Bs(t,r),t.lanes=536870912,Ds(null,e);if(zi(t),(e=uo)?null!==(e=null!==(e=Id(e,ho))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==to?{id:no,overflow:ro}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,co=t,uo=null):e=null,null===e)throw mo(t);return t.lanes=536870912,null}return Bs(t,r)}var i=e.memoizedState;if(null!==i){var a=i.dehydrated;if(zi(t),o)if(256&t.flags)t.flags&=-257,t=Hs(e,t,n);else{if(null===t.memoizedState)throw Error(s(558));t.child=e.child,t.flags|=128,t=null}else if(Ps||Io(e,t,n,!1),o=0!==(n&e.childLanes),Ps||o){if(null!==(r=hc)&&0!==(a=Me(r,n))&&a!==i.retryLane)throw i.retryLane=a,Pr(e,a),Kc(r,0,a),Ls;au(),t=Hs(e,t,n)}else e=i.treeContext,uo=Pd(a.nextSibling),co=t,fo=!0,po=null,ho=!1,null!==e&&lo(t,e),(t=Bs(t,r)).flags|=4096;return t}return(e=Fr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return $s(e,t,n,t.pendingProps);case 24:return Lo(t),r=Po(Do),null===e?(null===(o=Yo())&&(o=hc,i=Fo(),o.pooledCache=i,i.refCount++,null!==i&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},bi(t),Ao(0,Do,o)):(0!==(e.lanes&n)&&(vi(e,t),_i(t,null,null,n),Si()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=o),Ao(0,Do,r)):(r=i.cache,Ao(0,Do,r),r!==o.cache&&jo(t,[Do],n,!0))),Ns(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,o){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&o)===o)if(e.stateNode.complete)e.flags|=8192;else{if(!ru())throw ii=ti,Jo;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!of(t)){if(!ru())throw ii=ti,Jo;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ie():536870912,e.lanes|=t,Tc|=t)}function dl(e,t){if(!fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=65011712&o.subtreeFlags,r|=65011712&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pl(e,t,n){var r=t.pendingProps;switch(so(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Eo(Do),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(yo(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wo())),fl(t),null;case 26:var o=t.type,i=t.memoizedState;return null===e?(sl(t),null!==i?(fl(t),cl(t,i)):(fl(t),ll(t,o,0,0,n))):i?i!==e.memoizedState?(sl(t),fl(t),cl(t,i)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),fl(t),ll(t,o,0,0,n)),null;case 27:if(Q(t),n=G.current,o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}e=V.current,yo(t)?bo(t):(e=Rd(o,r,n),t.stateNode=e,sl(t))}return fl(t),null;case 5:if(Q(t),o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}if(i=V.current,yo(t))bo(t);else{var a=md(G.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":(i=a.createElement("div")).innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof r.is?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"==typeof r.is?a.createElement(o,{is:r.is}):a.createElement(o)}}i[Be]=t,i[He]=r;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)i.appendChild(a.stateNode);else if(4!==a.tag&&27!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(fd(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return fl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=G.current,yo(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=co))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Be]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cd(e.nodeValue,n)))||mo(t,!0)}else(e=md(e).createTextNode(r))[Be]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=yo(t),null!==n){if(null===e){if(!r)throw Error(s(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(557));e[Be]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Di(t),t):(Di(t),null);if(128&t.flags)throw Error(s(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=yo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(s(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(s(317));o[Be]=t}else xo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),o=!1}else o=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return 256&t.flags?(Di(t),t):(Di(t),null)}return Di(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(o=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return Y(),null===e&&Ju(t.stateNode.containerInfo),fl(t),null;case 10:return Eo(t.type),fl(t),null;case 19:if(F(Fi),null===(r=t.memoizedState))return fl(t),null;if(o=!!(128&t.flags),null===(i=r.rendering))if(o)dl(r,!1);else{if(0!==Cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=Bi(e))){for(t.flags|=128,dl(r,!1),e=i.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Br(n,e),n=n.sibling;return B(Fi,1&Fi.current|2),fo&&oo(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Nc&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Bi(i))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!fo)return fl(t),null}else 2*le()-r.renderingStartTime>Nc&&536870912!==n&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Fi.current,B(Fi,o?1&n|2:1&n),fo&&oo(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return Di(t),Li(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&ul(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&F(Ko),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Eo(Do),fl(t),null;case 25:case 30:return null}throw Error(s(156,t.tag))}function hl(e,t){switch(so(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Eo(Do),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Q(t),null;case 31:if(null!==t.memoizedState){if(Di(t),null===t.alternate)throw Error(s(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Di(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));xo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return F(Fi),null;case 4:return Y(),null;case 10:return Eo(t.type),null;case 22:case 23:return Di(t),Li(),null!==e&&F(Ko),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Eo(Do),null;default:return null}}function gl(e,t){switch(so(t),t.tag){case 3:Eo(Do),Y();break;case 26:case 27:case 5:Q(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Di(t);break;case 13:Di(t);break;case 19:F(Fi);break;case 10:Eo(t.type);break;case 22:case 23:Di(t),Li(),null!==e&&F(Ko);break;case 24:Eo(Do)}}function ml(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(e){Cu(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,o=t;var l=n,c=s;try{c()}catch(e){Cu(o,l,e)}}}r=r.next}while(r!==i)}}catch(e){Cu(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ei(t,n)}catch(t){Cu(e,e.return,t)}}}function yl(e,t,n){n.props=Cs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Cu(e,t,n)}}function xl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){Cu(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){Cu(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){Cu(e,t,n)}else n.current=null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Cu(e,e.return,t)}}function Cl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,l=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(h)||ud(e,t,h,null,r,f)}}for(var p in r){var h=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":i=h;break;case"name":o=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":a=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(s(137,t));break;default:h!==f&&ud(e,t,p,h,r,f)}}return void vt(e,a,l,c,u,d,i,o);case"select":for(i in h=a=l=p=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":h=c;default:r.hasOwnProperty(i)||ud(e,t,i,null,r,c)}for(o in r)if(i=r[o],c=n[o],r.hasOwnProperty(o)&&(null!=i||null!=c))switch(o){case"value":p=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:i!==c&&ud(e,t,o,i,r,c)}return t=l,n=a,r=h,void(null!=p?wt(e,!!n,p,!1):!!r!=!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in h=p=null,n)if(o=n[l],n.hasOwnProperty(l)&&null!=o&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:ud(e,t,l,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(null!=o||null!=i))switch(a){case"value":p=o;break;case"defaultValue":h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(s(91));break;default:o!==i&&ud(e,t,a,o,r,i)}return void kt(e,p,h);case"option":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:ud(e,t,g,null,r,p));for(c in r)p=r[c],h=n[c],!r.hasOwnProperty(c)||p===h||null==p&&null==h||("selected"===c?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:ud(e,t,c,p,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m)&&ud(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(s(137,t));break;default:ud(e,t,u,p,r,h)}return;default:if(Tt(t)){for(var b in n)p=n[b],n.hasOwnProperty(b)&&void 0!==p&&!r.hasOwnProperty(b)&&dd(e,t,b,void 0,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||dd(e,t,d,p,r,h);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&ud(e,t,v,null,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||null==p&&null==h||ud(e,t,f,p,r,h)}(r,e.type,n,t),r[He]=t}catch(t){Cu(e,e.return,t)}}function Sl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _l(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Lt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function El(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(El(e,t,n),e=e.sibling;null!==e;)El(e,t,n),e=e.sibling}function Tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);fd(t,r,n),t[Be]=e,t[He]=n}catch(t){Cu(e,e.return,t)}}var jl=!1,Il=!1,Ol=!1,Ll="function"==typeof WeakSet?WeakSet:Set,Pl=null;function Nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Kl(e,n),4&r&&ml(5,n);break;case 1:if(Kl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){Cu(n,n.return,e)}else{var o=Cs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Cu(n,n.return,e)}}64&r&&vl(n),512&r&&xl(n,n.return);break;case 3:if(Kl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ei(e,t)}catch(e){Cu(n,n.return,e)}}break;case 27:null===t&&4&r&&Tl(n);case 26:case 5:Kl(e,n),null===t&&4&r&&kl(n),512&r&&xl(n,n.return);break;case 12:Kl(e,n);break;case 31:Kl(e,n),4&r&&Fl(e,n);break;case 13:Kl(e,n),4&r&&Bl(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Eu.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||jl)){t=null!==t&&null!==t.memoizedState||Il,o=jl;var i=Il;jl=r,(Il=t)&&!i?Xl(e,n,!!(8772&n.subtreeFlags)):Kl(e,n),jl=o,Il=i}break;case 30:break;default:Kl(e,n)}}function Ml(e){var t=e.alternate;null!==t&&(e.alternate=null,Ml(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ye(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var zl=null,Rl=!1;function $l(e,t,n){for(n=n.child;null!==n;)Dl(e,t,n),n=n.sibling}function Dl(e,t,n){if(ve&&"function"==typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(be,n)}catch(e){}switch(n.tag){case 26:Il||wl(n,t),$l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Il||wl(n,t);var r=zl,o=Rl;Ad(n.type)&&(zl=n.stateNode,Rl=!1),$l(e,t,n),$d(n.stateNode),zl=r,Rl=o;break;case 5:Il||wl(n,t);case 6:if(r=zl,o=Rl,zl=null,$l(e,t,n),Rl=o,null!==(zl=r))if(Rl)try{(9===zl.nodeType?zl.body:"HTML"===zl.nodeName?zl.ownerDocument.body:zl).removeChild(n.stateNode)}catch(e){Cu(n,t,e)}else try{zl.removeChild(n.stateNode)}catch(e){Cu(n,t,e)}break;case 18:null!==zl&&(Rl?(Ed(9===(e=zl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Uf(e)):Ed(zl,n.stateNode));break;case 4:r=zl,o=Rl,zl=n.stateNode.containerInfo,Rl=!0,$l(e,t,n),zl=r,Rl=o;break;case 0:case 11:case 14:case 15:bl(2,n,t),Il||bl(4,n,t),$l(e,t,n);break;case 1:Il||(wl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&yl(n,t,r)),$l(e,t,n);break;case 21:$l(e,t,n);break;case 22:Il=(r=Il)||null!==n.memoizedState,$l(e,t,n),Il=r;break;default:$l(e,t,n)}}function Fl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{Uf(e)}catch(e){Cu(t,t.return,e)}}}function Bl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{Uf(e)}catch(e){Cu(t,t.return,e)}}function Hl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ll),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ll),t;default:throw Error(s(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tu.bind(null,e,t);t.then(r,r)}})}function Ul(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r],i=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 27:if(Ad(l.type)){zl=l.stateNode,Rl=!1;break e}break;case 5:zl=l.stateNode,Rl=!1;break e;case 3:case 4:zl=l.stateNode.containerInfo,Rl=!0;break e}l=l.return}if(null===zl)throw Error(s(160));Dl(i,a,o),zl=null,Rl=!1,null!==(i=o.alternate)&&(i.return=null),o.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wl(t,e),t=t.sibling}var Vl=null;function Wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ul(t,e),Gl(e),4&r&&(bl(3,e,e.return),ml(3,e),bl(5,e,e.return));break;case 1:Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),64&r&&jl&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var o=Vl;if(Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),4&r){var i=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":(!(i=o.getElementsByTagName("title")[0])||i[Ke]||i[Be]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),fd(i,r,n),i[Be]=e,et(i),r=i;break e;case"link":var a=nf("link","href",o).get(r+(n.href||""));if(a)for(var l=0;l<a.length;l++)if((i=a[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){a.splice(l,1);break t}fd(i=o.createElement(r),r,n),o.head.appendChild(i);break;case"meta":if(a=nf("meta","content",o).get(r+(n.content||"")))for(l=0;l<a.length;l++)if((i=a[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){a.splice(l,1);break t}fd(i=o.createElement(r),r,n),o.head.appendChild(i);break;default:throw Error(s(468,r))}i[Be]=e,et(i),r=i}e.stateNode=r}else rf(o,e.type,e.stateNode);else e.stateNode=Qd(o,r,e.memoizedProps);else i!==r?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===r?rf(o,e.type,e.stateNode):Qd(o,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Cl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),null!==n&&4&r&&Cl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ul(t,e),Gl(e),512&r&&(Il||null===n||wl(n,n.return)),32&e.flags){o=e.stateNode;try{St(o,"")}catch(t){Cu(e,e.return,t)}}4&r&&null!=e.stateNode&&Cl(e,o=e.memoizedProps,null!==n?n.memoizedProps:o),1024&r&&(Ol=!0);break;case 6:if(Ul(t,e),Gl(e),4&r){if(null===e.stateNode)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Cu(e,e.return,t)}}break;case 3:if(tf=null,o=Vl,Vl=Bd(t.containerInfo),Ul(t,e),Vl=o,Gl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Uf(t.containerInfo)}catch(t){Cu(e,e.return,t)}Ol&&(Ol=!1,ql(e));break;case 4:r=Vl,Vl=Bd(e.stateNode.containerInfo),Ul(t,e),Gl(e),Vl=r;break;case 12:default:Ul(t,e),Gl(e);break;case 31:case 19:Ul(t,e),Gl(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r));break;case 13:Ul(t,e),Gl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Lc=le()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,Hl(e,r));break;case 22:o=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=jl,d=Il;if(jl=u||o,Il=d||c,Ul(t,e),Il=d,jl=u,Gl(e),8192&r)e:for(t=e.stateNode,t._visibility=o?-2&t._visibility:1|t._visibility,o&&(null===n||c||jl||Il||Yl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,o)"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,p=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){Cu(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=o?"":c.memoizedProps}catch(e){Cu(c,c.return,e)}}}else if(18===t.tag){if(null===n){c=t;try{var h=c.stateNode;o?Td(h,!0):Td(c.stateNode,!1)}catch(e){Cu(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,Hl(e,n));case 30:case 21:}}function Gl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(Sl(r)){n=r;break}r=r.return}if(null==n)throw Error(s(160));switch(n.tag){case 27:var o=n.stateNode;El(e,_l(e),o);break;case 5:var i=n.stateNode;32&n.flags&&(St(i,""),n.flags&=-33),El(e,_l(e),i);break;case 3:case 4:var a=n.stateNode.containerInfo;Al(e,_l(e),a);break;default:throw Error(s(161))}}catch(t){Cu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ql(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;ql(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Kl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Nl(e,t.alternate,t),t=t.sibling}function Yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Yl(t);break;case 1:wl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&yl(t,t.return,n),Yl(t);break;case 27:$d(t.stateNode);case 26:case 5:wl(t,t.return),Yl(t);break;case 22:null===t.memoizedState&&Yl(t);break;default:Yl(t)}e=e.sibling}}function Xl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:Xl(o,i,n),ml(4,i);break;case 1:if(Xl(o,i,n),"function"==typeof(o=(r=i).stateNode).componentDidMount)try{o.componentDidMount()}catch(e){Cu(r,r.return,e)}if(null!==(o=(r=i).updateQueue)){var s=r.stateNode;try{var l=o.shared.hiddenCallbacks;if(null!==l)for(o.shared.hiddenCallbacks=null,o=0;o<l.length;o++)Ai(l[o],s)}catch(e){Cu(r,r.return,e)}}n&&64&a&&vl(i),xl(i,i.return);break;case 27:Tl(i);case 26:case 5:Xl(o,i,n),n&&null===r&&4&a&&kl(i),xl(i,i.return);break;case 12:Xl(o,i,n);break;case 31:Xl(o,i,n),n&&4&a&&Fl(o,i);break;case 13:Xl(o,i,n),n&&4&a&&Bl(o,i);break;case 22:null===i.memoizedState&&Xl(o,i,n),xl(i,i.return);break;case 30:break;default:Xl(o,i,n)}t=t.sibling}}function Ql(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Bo(n))}function Zl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e))}function Jl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,r),t=t.sibling}function ec(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Jl(e,t,n,r),2048&o&&ml(9,t);break;case 1:case 31:case 13:default:Jl(e,t,n,r);break;case 3:Jl(e,t,n,r),2048&o&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Bo(e)));break;case 12:if(2048&o){Jl(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,s=i.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){Cu(t,t.return,e)}}else Jl(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,null!==t.memoizedState?2&i._visibility?Jl(e,t,n,r):nc(e,t):2&i._visibility?Jl(e,t,n,r):(i._visibility|=2,tc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&o&&Ql(a,t);break;case 24:Jl(e,t,n,r),2048&o&&Zl(t.alternate,t)}}function tc(e,t,n,r,o){for(o=o&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var i=e,a=t,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:tc(i,a,s,l,o),ml(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?2&u._visibility?tc(i,a,s,l,o):nc(i,a):(u._visibility|=2,tc(i,a,s,l,o)),o&&2048&c&&Ql(a.alternate,a);break;case 24:tc(i,a,s,l,o),o&&2048&c&&Zl(a.alternate,a);break;default:tc(i,a,s,l,o)}t=t.sibling}}function nc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:nc(n,r),2048&o&&Ql(r.alternate,r);break;case 24:nc(n,r),2048&o&&Zl(r.alternate,r);break;default:nc(n,r)}t=t.sibling}}var rc=8192;function oc(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;null!==e;)ic(e,t,n),e=e.sibling}function ic(e,t,n){switch(e.tag){case 26:oc(e,t,n),e.flags&rc&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var o=Gd(r.href),i=t.querySelector(qd(o));if(i)return null!==(t=i._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=sf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,void et(i);i=t.ownerDocument||t,r=Kd(r),(o=Dd.get(o))&&Jd(r,o),et(i=i.createElement("link"));var a=i;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),fd(i,"link",r),n.instance=i}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=sf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Vl,e.memoizedState,e.memoizedProps);break;case 5:default:oc(e,t,n);break;case 3:case 4:var r=Vl;Vl=Bd(e.stateNode.containerInfo),oc(e,t,n),Vl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rc,rc=16777216,oc(e,t,n),rc=r):oc(e,t,n))}}function ac(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function sc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Pl=r,uc(r,e)}ac(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&bl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Pl=r,uc(r,e)}ac(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:bl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==Pl;){var n=Pl;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Bo(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Pl=r;else e:for(n=e;null!==Pl;){var o=(r=Pl).sibling,i=r.return;if(Ml(r),r===n){Pl=null;break e}if(null!==o){o.return=i,Pl=o;break e}Pl=i}}}var dc={getCacheForType:function(e){var t=Po(Do),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Po(Do).controller.signal}},fc="function"==typeof WeakMap?WeakMap:Map,pc=0,hc=null,gc=null,mc=0,bc=0,vc=null,yc=!1,xc=!1,wc=!1,kc=0,Cc=0,Sc=0,_c=0,Ac=0,Ec=0,Tc=0,jc=null,Ic=null,Oc=!1,Lc=0,Pc=0,Nc=1/0,Mc=null,zc=null,Rc=0,$c=null,Dc=null,Fc=0,Bc=0,Hc=null,Uc=null,Vc=0,Wc=null;function Gc(){return 2&pc&&0!==mc?mc&-mc:null!==N.T?Hu():$e()}function qc(){if(0===Ec)if(536870912&mc&&!fo)Ec=536870912;else{var e=Se;!(3932160&(Se<<=1))&&(Se=262144),Ec=e}return null!==(e=Pi.current)&&(e.flags|=32),Ec}function Kc(e,t,n){(e!==hc||2!==bc&&9!==bc)&&null===e.cancelPendingCommit||(tu(e,0),Zc(e,mc,Ec,!1)),Le(e,n),2&pc&&e===hc||(e===hc&&(!(2&pc)&&(_c|=n),4===Cc&&Zc(e,mc,Ec,!1)),Mu(e))}function Yc(e,t,n){if(6&pc)throw Error(s(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||Te(e,t),o=r?function(e,t){var n=pc;pc|=2;var r=ou(),o=iu();hc!==e||mc!==t?(Mc=null,Nc=le()+500,tu(e,t)):xc=Te(e,t);e:for(;;)try{if(0!==bc&&null!==gc){t=gc;var i=vc;t:switch(bc){case 1:bc=0,vc=null,fu(e,t,i,1);break;case 2:case 9:if(ni(i)){bc=0,vc=null,du(t);break}t=function(){2!==bc&&9!==bc||hc!==e||(bc=7),Mu(e)},i.then(t,t);break e;case 3:bc=7;break e;case 4:bc=5;break e;case 7:ni(i)?(bc=0,vc=null,du(t)):(bc=0,vc=null,fu(e,t,i,7));break;case 5:var a=null;switch(gc.tag){case 26:a=gc.memoizedState;case 5:case 27:var l=gc;if(a?of(a):l.stateNode.complete){bc=0,vc=null;var c=l.sibling;if(null!==c)gc=c;else{var u=l.return;null!==u?(gc=u,pu(u)):gc=null}break t}}bc=0,vc=null,fu(e,t,i,5);break;case 6:bc=0,vc=null,fu(e,t,i,6);break;case 8:eu(),Cc=6;break e;default:throw Error(s(462))}}cu();break}catch(t){nu(e,t)}return _o=So=null,N.H=r,N.A=o,pc=n,null!==gc?0:(hc=null,mc=0,Ir(),Cc)}(e,t):su(e,t,!0),i=r;;){if(0===o){xc&&!r&&Zc(e,t,0,!1);break}if(n=e.current.alternate,!i||Qc(n)){if(2===o){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=0!=(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var l=e;o=jc;var c=l.current.memoizedState.isDehydrated;if(c&&(tu(l,a).flags|=256),2!==(a=su(l,a,!1))){if(wc&&!c){l.errorRecoveryDisabledLanes|=i,_c|=i,o=4;break e}i=Ic,Ic=o,null!==i&&(null===Ic?Ic=i:Ic.push.apply(Ic,i))}o=a}if(i=!1,2!==o)continue}}if(1===o){tu(e,0),Zc(e,t,0,!0);break}e:{switch(r=e,i=o){case 0:case 1:throw Error(s(345));case 4:if((4194048&t)!==t)break;case 6:Zc(r,t,Ec,!yc);break e;case 2:Ic=null;break;case 3:case 5:break;default:throw Error(s(329))}if((62914560&t)===t&&10<(o=Lc+300-le())){if(Zc(r,t,Ec,!yc),0!==Ee(r,0,!0))break e;Fc=t,r.timeoutHandle=wd(Xc.bind(null,r,n,Ic,Mc,Oc,t,Ec,_c,Tc,yc,i,"Throttled",-0,0),o)}else Xc(r,n,Ic,Mc,Oc,t,Ec,_c,Tc,yc,i,null,-0,0)}break}o=su(e,t,!1),i=!1}Mu(e)}function Xc(e,t,n,r,o,i,a,s,l,c,u,d,f,p){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){ic(t,i,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lt});var h=(62914560&i)===i?Lc-le():(4194048&i)===i?Pc-le():0;if(null!==(h=function(e,t){return e.stylesheets&&0===e.count&&cf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===af&&(af=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],i=o.transferSize,a=o.initiatorType,s=o.duration;if(i&&s&&pd(a)){for(a=0,s=o.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&pd(d)&&(a+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(i+a)/(o.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var o=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&cf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}(d,h)))return Fc=i,e.cancelPendingCommit=h(gu.bind(null,e,t,i,n,r,o,a,s,l,u,d,null,f,p)),void Zc(e,i,a,!c)}gu(e,t,i,n,r,o,a,s,l)}function Qc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Zn(i(),o))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zc(e,t,n,r){t&=~Ac,t&=~_c,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-xe(o),a=1<<i;r[i]=-1,o&=~a}0!==n&&Pe(e,n,t)}function Jc(){return!!(6&pc)||(zu(0,!1),!1)}function eu(){if(null!==gc){if(0===bc)var e=gc.return;else _o=So=null,sa(e=gc),li=null,ci=0,e=gc;for(;null!==e;)gl(e.alternate,e),e=e.return;gc=null}}function tu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,kd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Fc=0,eu(),hc=e,gc=n=Fr(e.current,null),mc=t,bc=0,vc=null,yc=!1,xc=Te(e,t),wc=!1,Tc=Ec=Ac=_c=Sc=Cc=0,Ic=jc=null,Oc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var o=31-xe(r),i=1<<o;t|=e[o],r&=~i}return kc=t,Ir(),n}function nu(e,t){Ui=null,N.H=gs,t===Zo||t===ei?(t=ai(),bc=3):t===Jo?(t=ai(),bc=4):bc=t===Ls?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,vc=t,null===gc&&(Cc=1,Es(e,Kr(t,e.current)))}function ru(){var e=Pi.current;return null===e||((4194048&mc)===mc?null===Ni:!!((62914560&mc)===mc||536870912&mc)&&e===Ni)}function ou(){var e=N.H;return N.H=gs,null===e?gs:e}function iu(){var e=N.A;return N.A=dc,e}function au(){Cc=4,yc||(4194048&mc)!==mc&&null!==Pi.current||(xc=!0),!(134217727&Sc)&&!(134217727&_c)||null===hc||Zc(hc,mc,Ec,!1)}function su(e,t,n){var r=pc;pc|=2;var o=ou(),i=iu();hc===e&&mc===t||(Mc=null,tu(e,t)),t=!1;var a=Cc;e:for(;;)try{if(0!==bc&&null!==gc){var s=gc,l=vc;switch(bc){case 8:eu(),a=6;break e;case 3:case 2:case 9:case 6:null===Pi.current&&(t=!0);var c=bc;if(bc=0,vc=null,fu(e,s,l,c),n&&xc){a=0;break e}break;default:c=bc,bc=0,vc=null,fu(e,s,l,c)}}lu(),a=Cc;break}catch(t){nu(e,t)}return t&&e.shellSuspendCounter++,_o=So=null,pc=r,N.H=o,N.A=i,null===gc&&(hc=null,mc=0,Ir()),a}function lu(){for(;null!==gc;)uu(gc)}function cu(){for(;null!==gc&&!ae();)uu(gc)}function uu(e){var t=al(e.alternate,e,kc);e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function du(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ws(n,t,t.pendingProps,t.type,void 0,mc);break;case 11:t=Ws(n,t,t.pendingProps,t.type.render,t.ref,mc);break;case 5:sa(t);default:gl(n,t),t=al(n,t=gc=Br(t,kc),kc)}e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function fu(e,t,n,r){_o=So=null,sa(t),li=null,ci=0;var o=t.return;try{if(function(e,t,n,r,o){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Io(t,n,o,!0),null!==(n=Pi.current)){switch(n.tag){case 31:case 13:return null===Ni?au():null===n.alternate&&0===Cc&&(Cc=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Su(e,r,o)),!1;case 22:return n.flags|=65536,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Su(e,r,o)),!1}throw Error(s(435,n.tag))}return Su(e,r,o),au(),!1}if(fo)return null!==(t=Pi.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==go&&ko(Kr(e=Error(s(422),{cause:r}),n))):(r!==go&&ko(Kr(t=Error(s(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,o&=-o,e.lanes|=o,r=Kr(r,n),ki(e,o=js(e.stateNode,r,o)),4!==Cc&&(Cc=2)),!1;var i=Error(s(520),{cause:r});if(i=Kr(i,n),null===jc?jc=[i]:jc.push(i),4!==Cc&&(Cc=2),null===t)return!0;r=Kr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,ki(n,e=js(n.stateNode,r,e)),!1;case 1:if(t=n.type,i=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===i||"function"!=typeof i.componentDidCatch||null!==zc&&zc.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,Os(o=Is(o),e,n,r),ki(n,o),!1}n=n.return}while(null!==n);return!1}(e,o,t,n,mc))return Cc=1,Es(e,Kr(n,e.current)),void(gc=null)}catch(t){if(null!==o)throw gc=o,t;return Cc=1,Es(e,Kr(n,e.current)),void(gc=null)}32768&t.flags?(fo||1===r?e=!0:xc||536870912&mc?e=!1:(yc=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=Pi.current)&&13===r.tag&&(r.flags|=16384)),hu(t,e)):pu(t)}function pu(e){var t=e;do{if(32768&t.flags)return void hu(t,yc);e=t.return;var n=pl(t.alternate,t,kc);if(null!==n)return void(gc=n);if(null!==(t=t.sibling))return void(gc=t);gc=t=e}while(null!==t);0===Cc&&(Cc=5)}function hu(e,t){do{var n=hl(e.alternate,e);if(null!==n)return n.flags&=32767,void(gc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(gc=e);gc=e=n}while(null!==e);Cc=6,gc=null}function gu(e,t,n,r,o,i,a,l,c){e.cancelPendingCommit=null;do{xu()}while(0!==Rc);if(6&pc)throw Error(s(327));if(null!==t){if(t===e.current)throw Error(s(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-xe(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];null!==p&&(p.lane&=-536870913)}n&=~d}0!==r&&Pe(e,r,0),0!==i&&0===o&&0!==e.tag&&(e.suspendedLanes|=i&~(a&~t))}(e,n,i|=jr,a,l,c),e===hc&&(gc=hc=null,mc=0),Dc=t,$c=e,Fc=n,Bc=i,Hc=o,Uc=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,oe(fe,function(){return wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=N.T,N.T=null,o=M.p,M.p=2,a=pc,pc|=4;try{!function(e,t){if(e=e.containerInfo,hd=vf,or(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==o&&3!==f.nodeType||(l=a+o),f!==i||0!==r&&3!==f.nodeType||(c=a+r),3===f.nodeType&&(a+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++d===r&&(c=a),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(gd={focusedElem:e,selectionRange:n},vf=!1,Pl=t;null!==Pl;)if(e=(t=Pl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Pl=e;else for(;null!==Pl;){switch(i=(t=Pl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(o=e[n]).ref.impl=o.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==i){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var g=Cs(n.type,o);e=r.getSnapshotBeforeUpdate(g,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Cu(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))jd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jd(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(s(163))}if(null!==(e=t.sibling)){e.return=t.return,Pl=e;break}Pl=t.return}}(e,t)}finally{pc=a,M.p=o,N.T=r}}Rc=1,mu(),bu(),vu()}}function mu(){if(1===Rc){Rc=0;var e=$c,t=Dc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=N.T,N.T=null;var r=M.p;M.p=2;var o=pc;pc|=4;try{Wl(t,e);var i=gd,a=rr(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(a!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&or(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),h=s.textContent.length,g=Math.min(l.start,h),m=void 0===l.end?g:Math.min(l.end,h);!p.extend&&g>m&&(a=m,m=g,g=a);var b=tr(s,g),v=tr(s,m);if(b&&v&&(1!==p.rangeCount||p.anchorNode!==b.node||p.anchorOffset!==b.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(b.node,b.offset),p.removeAllRanges(),g>m?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}vf=!!hd,gd=hd=null}finally{pc=o,M.p=r,N.T=n}}e.current=t,Rc=2}}function bu(){if(2===Rc){Rc=0;var e=$c,t=Dc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=N.T,N.T=null;var r=M.p;M.p=2;var o=pc;pc|=4;try{Nl(e,t.alternate,t)}finally{pc=o,M.p=r,N.T=n}}Rc=3}}function vu(){if(4===Rc||3===Rc){Rc=0,se();var e=$c,t=Dc,n=Fc,r=Uc;10256&t.subtreeFlags||10256&t.flags?Rc=5:(Rc=0,Dc=$c=null,yu(e,e.pendingLanes));var o=e.pendingLanes;if(0===o&&(zc=null),Re(n),t=t.stateNode,ve&&"function"==typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(be,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==r){t=N.T,o=M.p,M.p=2,N.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];i(s.value,{componentStack:s.stack})}}finally{N.T=t,M.p=o}}3&Fc&&xu(),Mu(e),o=e.pendingLanes,261930&n&&42&o?e===Wc?Vc++:(Vc=0,Wc=e):Vc=0,zu(0,!1)}}function yu(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Bo(t))}function xu(){return mu(),bu(),vu(),wu()}function wu(){if(5!==Rc)return!1;var e=$c,t=Bc;Bc=0;var n=Re(Fc),r=N.T,o=M.p;try{M.p=32>n?32:n,N.T=null,n=Hc,Hc=null;var i=$c,a=Fc;if(Rc=0,Dc=$c=null,Fc=0,6&pc)throw Error(s(331));var l=pc;if(pc|=4,lc(i.current),ec(i,i.current,a,n),pc=l,zu(0,!1),ve&&"function"==typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(be,i)}catch(e){}return!0}finally{M.p=o,N.T=r,yu(e,t)}}function ku(e,t,n){t=Kr(n,t),null!==(e=xi(e,t=js(e.stateNode,t,2),2))&&(Le(e,2),Mu(e))}function Cu(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zc||!zc.has(r))){e=Kr(n,e),null!==(r=xi(t,n=Is(2),2))&&(Os(n,r,t,e),Le(r,2),Mu(r));break}}t=t.return}}function Su(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(wc=!0,o.add(n),e=_u.bind(null,e,t,n),t.then(e,e))}function _u(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hc===e&&(mc&n)===n&&(4===Cc||3===Cc&&(62914560&mc)===mc&&300>le()-Lc?!(2&pc)&&tu(e,0):Ac|=n,Tc===mc&&(Tc=0)),Mu(e)}function Au(e,t){0===t&&(t=Ie()),null!==(e=Pr(e,t))&&(Le(e,t),Mu(e))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),Au(e,n)}var ju=null,Iu=null,Ou=!1,Lu=!1,Pu=!1,Nu=0;function Mu(e){e!==Iu&&null===e.next&&(null===Iu?ju=Iu=e:Iu=Iu.next=e),Lu=!0,Ou||(Ou=!0,Sd(function(){6&pc?oe(ue,Ru):$u()}))}function zu(e,t){if(!Pu&&Lu){Pu=!0;do{for(var n=!1,r=ju;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-xe(42|e)+1)-1,i=201326741&(i&=o&~(a&~s))?201326741&i|1:i?2|i:0}0!==i&&(n=!0,Bu(r,i))}else i=mc,!(3&(i=Ee(r,r===hc?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,i)||(n=!0,Bu(r,i));r=r.next}}while(n);Pu=!1}}function Ru(){$u()}function $u(){Lu=Ou=!1;var e,t=0;0!==Nu&&((e=window.event)&&"popstate"===e.type?e!==xd&&(xd=e,1):(xd=null,0))&&(t=Nu);for(var n=le(),r=null,o=ju;null!==o;){var i=o.next,a=Du(o,n);0===a?(o.next=null,null===r?ju=i:r.next=i,null===i&&(Iu=r)):(r=o,(0!==t||3&a)&&(Lu=!0)),o=i}0!==Rc&&5!==Rc||zu(t,!1),0!==Nu&&(Nu=0)}function Du(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var a=31-xe(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=je(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(n=mc,n=Ee(e,e===(t=hc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===bc||9===bc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Te(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),Re(n)){case 2:case 8:n=de;break;case 32:default:n=fe;break;case 268435456:n=he}return r=Fu.bind(null,e),n=oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Fu(e,t){if(0!==Rc&&5!==Rc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=mc;return 0===(r=Ee(e,e===hc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Yc(e,r,t),Du(e,le()),null!=e.callbackNode&&e.callbackNode===n?Fu.bind(null,e):null)}function Bu(e,t){if(xu())return null;Yc(e,t,!0)}function Hu(){if(0===Nu){var e=Vo;0===e&&(e=Ce,!(261888&(Ce<<=1))&&(Ce=256)),Nu=e}return Nu}function Uu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function Vu(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Wu=0;Wu<Sr.length;Wu++){var Gu=Sr[Wu];_r(Gu.toLowerCase(),"on"+(Gu[0].toUpperCase()+Gu.slice(1)))}_r(mr,"onAnimationEnd"),_r(br,"onAnimationIteration"),_r(vr,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(yr,"onTransitionRun"),_r(xr,"onTransitionStart"),_r(wr,"onTransitionCancel"),_r(kr,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ku=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qu));function Yu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(e){Ar(e)}o.currentTarget=null,i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(e){Ar(e)}o.currentTarget=null,i=l}}}}function Xu(e,t){var n=t[Ve];void 0===n&&(n=t[Ve]=new Set);var r=e+"__bubble";n.has(r)||(ed(t,e,2,!1),n.add(r))}function Qu(e,t,n){var r=0;t&&(r|=4),ed(n,e,r,t)}var Zu="_reactListening"+Math.random().toString(36).slice(2);function Ju(e){if(!e[Zu]){e[Zu]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Ku.has(t)||Qu(t,!1,e),Qu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Zu]||(t[Zu]=!0,Qu("selectionchange",!1,t))}}function ed(e,t,n,r){switch(_f(t)){case 2:var o=yf;break;case 8:o=xf;break;default:o=wf}n=o.bind(null,t,n,e),o=void 0,!Ht||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function td(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&a.stateNode.containerInfo===o)return;a=a.return}for(;null!==s;){if(null===(a=Xe(s)))return;if(5===(c=a.tag)||6===c||26===c||27===c){r=i=a;continue e}s=s.parentNode}}r=r.return}Dt(function(){var r=i,o=Nt(n),a=[];e:{var s=Cr.get(e);if(void 0!==s){var c=nn,u=e;switch(e){case"keypress":if(0===Kt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=xn;break;case mr:case br:case vr:c=un;break;case kr:c=wn;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=kn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=yn;break;case"toggle":case"beforetoggle":c=Cn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),p=d?null!==s?s+"Capture":null:s;d=[];for(var h,g=r;null!==g;){var m=g;if(h=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===h||null===p||null!=(m=Ft(g,p))&&d.push(nd(g,m,h)),f)break;g=g.return}0<d.length&&(s=new c(s,u,null,n,o),a.push({event:s,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Pt||!(u=n.relatedTarget||n.fromElement)||!Xe(u)&&!u[Ue])&&(c||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Xe(u):null)&&(f=l(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=sn,m="onMouseLeave",p="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(d=yn,m="onPointerLeave",p="onPointerEnter",g="pointer"),f=null==c?s:Ze(c),h=null==u?s:Ze(u),(s=new d(m,g+"leave",c,n,o)).target=f,s.relatedTarget=h,m=null,Xe(o)===r&&((d=new d(p,g+"enter",u,n,o)).target=h,d.relatedTarget=f,m=d),f=m,c&&u)e:{for(d=od,g=u,h=0,m=p=c;m;m=d(m))h++;m=0;for(var b=g;b;b=d(b))m++;for(;0<h-m;)p=d(p),h--;for(;0<m-h;)g=d(g),m--;for(;h--;){if(p===g||null!==g&&p===g.alternate){d=p;break e}p=d(p),g=d(g)}d=null}else d=null;null!==c&&id(a,s,c,d,!1),null!==u&&null!==f&&id(a,f,u,d,!0)}if("select"===(c=(s=r?Ze(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var v=Bn;else if(Mn(s))if(Hn)v=Qn;else{v=Yn;var y=Kn}else!(c=s.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?r&&Tt(r.elementType)&&(v=Bn):v=Xn;switch(v&&(v=v(e,r))?zn(a,v,n,o):(y&&y(e,s,r),"focusout"===e&&r&&"number"===s.type&&null!=r.memoizedProps.value&&xt(s,"number",s.value)),y=r?Ze(r):window,e){case"focusin":(Mn(y)||"true"===y.contentEditable)&&(ar=y,sr=r,lr=null);break;case"focusout":lr=sr=ar=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ur(a,n,o);break;case"selectionchange":if(ir)break;case"keydown":case"keyup":ur(a,n,o)}var x;if(_n)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Pn?On(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Tn&&"ko"!==n.locale&&(Pn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Pn&&(x=qt()):(Wt="value"in(Vt=o)?Vt.value:Vt.textContent,Pn=!0)),0<(y=rd(r,w)).length&&(w=new fn(w,e,null,n,o),a.push({event:w,listeners:y}),(x||null!==(x=Ln(n)))&&(w.data=x))),(x=En?function(e,t){switch(e){case"compositionend":return Ln(t);case"keypress":return 32!==t.which?null:(In=!0,jn);case"textInput":return(e=t.data)===jn&&In?null:e;default:return null}}(e,n):function(e,t){if(Pn)return"compositionend"===e||!_n&&On(e,t)?(e=qt(),Gt=Wt=Vt=null,Pn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(w=rd(r,"onBeforeInput")).length&&(y=new fn("onBeforeInput","beforeinput",null,n,o),a.push({event:y,listeners:w}),y.data=x),function(e,t,n,r,o){if("submit"===t&&n&&n.stateNode===o){var i=Uu((o[He]||null).action),a=r.submitter;a&&null!==(t=(t=a[He]||null)?Uu(t.formAction):a.getAttribute("formAction"))&&(i=t,a=null);var s=new nn("action","action",null,r,o);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Nu){var e=a?Vu(o,a):new FormData(o);ts(n,{pending:!0,data:e,method:o.method,action:i},null,e)}}else"function"==typeof i&&(s.preventDefault(),e=a?Vu(o,a):new FormData(o),ts(n,{pending:!0,data:e,method:o.method,action:i},i,e))},currentTarget:o}]})}}(a,e,r,n,o)}Yu(a,t)})}function nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rd(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;if(5!==(o=o.tag)&&26!==o&&27!==o||null===i||(null!=(o=Ft(e,n))&&r.unshift(nd(e,o,i)),null!=(o=Ft(e,t))&&r.push(nd(e,o,i))),3===e.tag)return r;e=e.return}return[]}function od(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function id(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,o?null!=(c=Ft(n,i))&&a.unshift(nd(n,c,l)):o||null!=(c=Ft(n,i))&&a.push(nd(n,c,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ad=/\r\n?/g,sd=/\u0000|\uFFFD/g;function ld(e){return("string"==typeof e?e:""+e).replace(ad,"\n").replace(sd,"")}function cd(e,t){return t=ld(t),ld(e)===t}function ud(e,t,n,r,o,i){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||St(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&St(e,""+r);break;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":Et(e,r,i);break;case"data":if("object"!==t){ct(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof i&&("formAction"===n?("input"!==t&&ud(e,t,"name",o.name,o,null),ud(e,t,"formEncType",o.formEncType,o,null),ud(e,t,"formMethod",o.formMethod,o,null),ud(e,t,"formTarget",o.formTarget,o,null)):(ud(e,t,"encType",o.encType,o,null),ud(e,t,"method",o.method,o,null),ud(e,t,"target",o.target,o,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Ot(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Lt);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Ot(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xu("beforetoggle",e),Xu("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&lt(e,n=jt.get(n)||n,r)}}function dd(e,t,n,r,o,i){switch(n){case"style":Et(e,r,i);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(s(60));e.innerHTML=n}}break;case"children":"string"==typeof r?St(e,r):("number"==typeof r||"bigint"==typeof r)&&St(e,""+r);break;case"onScroll":null!=r&&Xu("scroll",e);break;case"onScrollEnd":null!=r&&Xu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Lt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),"function"==typeof(i=null!=(i=e[He]||null)?i[n]:null)&&e.removeEventListener(t,i,o),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o)))}}function fd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xu("error",e),Xu("load",e);var r,o=!1,i=!1;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(null!=a)switch(r){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:ud(e,t,r,a,n,null)}}return i&&ud(e,t,"srcSet",n.srcSet,n,null),void(o&&ud(e,t,"src",n.src,n,null));case"input":Xu("invalid",e);var l=r=a=i=null,c=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var d=n[o];if(null!=d)switch(o){case"name":i=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(s(137,t));break;default:ud(e,t,o,d,n,null)}}return void yt(e,r,l,c,u,a,i,!1);case"select":for(i in Xu("invalid",e),o=a=r=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":r=l;break;case"defaultValue":a=l;break;case"multiple":o=l;default:ud(e,t,i,l,n,null)}return t=r,n=a,e.multiple=!!o,void(null!=t?wt(e,!!o,t,!1):null!=n&&wt(e,!!o,n,!0));case"textarea":for(a in Xu("invalid",e),r=i=o=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]))switch(a){case"value":o=l;break;case"defaultValue":i=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(s(91));break;default:ud(e,t,a,l,n,null)}return void Ct(e,o,i,r);case"option":for(c in n)n.hasOwnProperty(c)&&null!=(o=n[c])&&("selected"===c?e.selected=o&&"function"!=typeof o&&"symbol"!=typeof o:ud(e,t,c,o,n,null));return;case"dialog":Xu("beforetoggle",e),Xu("toggle",e),Xu("cancel",e),Xu("close",e);break;case"iframe":case"object":Xu("load",e);break;case"video":case"audio":for(o=0;o<qu.length;o++)Xu(qu[o],e);break;case"image":Xu("error",e),Xu("load",e);break;case"details":Xu("toggle",e);break;case"embed":case"source":case"link":Xu("error",e),Xu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(o=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:ud(e,t,u,o,n,null)}return;default:if(Tt(t)){for(d in n)n.hasOwnProperty(d)&&void 0!==(o=n[d])&&dd(e,t,d,o,n,void 0);return}}for(l in n)n.hasOwnProperty(l)&&null!=(o=n[l])&&ud(e,t,l,o,n,null)}function pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var hd=null,gd=null;function md(e){return 9===e.nodeType?e:e.ownerDocument}function bd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function yd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xd=null,wd="function"==typeof setTimeout?setTimeout:void 0,kd="function"==typeof clearTimeout?clearTimeout:void 0,Cd="function"==typeof Promise?Promise:void 0,Sd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Cd?function(e){return Cd.resolve(null).then(e).catch(_d)}:wd;function _d(e){setTimeout(function(){throw e})}function Ad(e){return"head"===e}function Ed(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)||"/&"===n){if(0===r)return e.removeChild(o),void Uf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)$d(e.ownerDocument.documentElement);else if("head"===n){$d(n=e.ownerDocument.head);for(var i=n.firstChild;i;){var a=i.nextSibling,s=i.nodeName;i[Ke]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===i.rel.toLowerCase()||n.removeChild(i),i=a}}else"body"===n&&$d(e.ownerDocument.body);n=o}while(n);Uf(t)}function Td(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function jd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":jd(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Id(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Pd(e.nextSibling)))return null}return e}function Od(e){return"$?"===e.data||"$~"===e.data}function Ld(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Pd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Nd=null;function Md(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Pd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function zd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Rd(e,t,n){switch(t=md(n),e){case"html":if(!(e=t.documentElement))throw Error(s(452));return e;case"head":if(!(e=t.head))throw Error(s(453));return e;case"body":if(!(e=t.body))throw Error(s(454));return e;default:throw Error(s(451))}}function $d(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Dd=new Map,Fd=new Set;function Bd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=M.d;M.d={f:function(){var e=Hd.f(),t=Jc();return e||t},r:function(e){var t=Qe(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):Hd.r(e)},D:function(e){Hd.D(e),Vd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Vd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=Ud;if(r&&e&&t){var o='link[rel="preload"][as="'+bt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(o+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(o+='[imagesizes="'+bt(n.imageSizes)+'"]')):o+='[href="'+bt(e)+'"]';var i=o;switch(t){case"style":i=Gd(e);break;case"script":i=Yd(e)}Dd.has(i)||(e=p({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Dd.set(i,e),null!==r.querySelector(o)||"style"===t&&r.querySelector(qd(i))||"script"===t&&r.querySelector(Xd(i))||(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=Ud;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",o='link[rel="modulepreload"][as="'+bt(r)+'"][href="'+bt(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Yd(e)}if(!Dd.has(i)&&(e=p({rel:"modulepreload",href:e},t),Dd.set(i,e),null===n.querySelector(o))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Xd(i)))return}fd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=Ud;if(n&&e){var r=Je(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Xd(o)))||(e=p({src:e,async:!0},t),(t=Dd.get(o))&&ef(e,t),et(i=n.createElement("script")),fd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}},S:function(e,t,n){Hd.S(e,t,n);var r=Ud;if(r&&e){var o=Je(r).hoistableStyles,i=Gd(e);t=t||"default";var a=o.get(i);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(qd(i)))s.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Dd.get(i))&&Jd(e,n);var l=a=r.createElement("link");et(l),fd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Zd(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},o.set(i,a)}}},M:function(e,t){Hd.M(e,t);var n=Ud;if(n&&e){var r=Je(n).hoistableScripts,o=Yd(e),i=r.get(o);i||((i=n.querySelector(Xd(o)))||(e=p({src:e,async:!0,type:"module"},t),(t=Dd.get(o))&&ef(e,t),et(i=n.createElement("script")),fd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}};var Ud="undefined"==typeof document?null:document;function Vd(e,t,n){var r=Ud;if(r&&"string"==typeof t&&t){var o=bt(t);o='link[rel="'+e+'"][href="'+o+'"]',"string"==typeof n&&(o+='[crossorigin="'+n+'"]'),Fd.has(o)||(Fd.add(o),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(o)&&(fd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wd(e,t,n,r){var o,i,a,l,c=(c=G.current)?Bd(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Gd(n.href),(r=(n=Je(c).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Gd(n.href);var u=Je(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(qd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Dd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dd.set(e,n),u||(o=c,i=e,a=n,l=d.state,o.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=o.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),fd(i,"link",a),et(i),o.head.appendChild(i))))),t&&null===r)throw Error(s(528,""));return d}if(t&&null!==r)throw Error(s(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Yd(n),(r=(n=Je(c).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Gd(e){return'href="'+bt(e)+'"'}function qd(e){return'link[rel="stylesheet"]['+e+"]"}function Kd(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Yd(e){return'[src="'+bt(e)+'"]'}function Xd(e){return"script[async]"+e}function Qd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var o=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),fd(r,"style",o),Zd(r,n.precedence,e),t.instance=r;case"stylesheet":o=Gd(n.href);var i=e.querySelector(qd(o));if(i)return t.state.loading|=4,t.instance=i,et(i),i;r=Kd(n),(o=Dd.get(o))&&Jd(r,o),et(i=(e.ownerDocument||e).createElement("link"));var a=i;return a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),fd(i,"link",r),t.state.loading|=4,Zd(i,n.precedence,e),t.instance=i;case"script":return i=Yd(n.src),(o=e.querySelector(Xd(i)))?(t.instance=o,et(o),o):(r=n,(o=Dd.get(i))&&ef(r=p({},n),o),et(o=(e=e.ownerDocument||e).createElement("script")),fd(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Zd(r,n.precedence,e));return t.instance}function Zd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)i=s;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Jd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function ef(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var tf=null;function nf(e,t,n){if(null===tf){var r=new Map,o=tf=new Map;o.set(n,r)}else(r=(o=tf).get(n))||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[Ke]||i[Be]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var a=i.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(i):r.set(a,[i])}}return r}function rf(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function of(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var af=0;function sf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)cf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var lf=null;function cf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,lf=new Map,t.forEach(uf,e),lf=null,sf.call(e))}function uf(e,t){if(!(4&t.state.loading)){var n=lf.get(e);if(n)var r=n.get(null);else{n=new Map,lf.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(o=t.instance).getAttribute("data-precedence"),(i=n.get(a)||r)===r&&n.set(null,o),n.set(a,o),this.count++,r=sf.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(o,e.firstChild),t.state.loading|=4}}var df={$$typeof:w,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function ff(e,t,n,r,o,i,a,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oe(0),this.hiddenUpdates=Oe(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function pf(e,t,n,r,o,i){o=function(e){return e?e=zr:zr}(o),null===r.context?r.context=o:r.pendingContext=o,(r=yi(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=xi(e,r,t))&&(Kc(n,0,t),wi(n,e,t))}function hf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gf(e,t){hf(e,t),(e=e.alternate)&&hf(e,t)}function mf(e){if(13===e.tag||31===e.tag){var t=Pr(e,67108864);null!==t&&Kc(t,0,67108864),gf(e,67108864)}}function bf(e){if(13===e.tag||31===e.tag){var t=Gc(),n=Pr(e,t=ze(t));null!==n&&Kc(n,0,t),gf(e,t)}}var vf=!0;function yf(e,t,n,r){var o=N.T;N.T=null;var i=M.p;try{M.p=2,wf(e,t,n,r)}finally{M.p=i,N.T=o}}function xf(e,t,n,r){var o=N.T;N.T=null;var i=M.p;try{M.p=8,wf(e,t,n,r)}finally{M.p=i,N.T=o}}function wf(e,t,n,r){if(vf){var o=kf(r);if(null===o)td(e,t,r,Cf,n),Nf(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Ef=Mf(Ef,e,t,n,r,o),!0;case"dragenter":return Tf=Mf(Tf,e,t,n,r,o),!0;case"mouseover":return jf=Mf(jf,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return If.set(i,Mf(If.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Of.set(i,Mf(Of.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Nf(e,r),4&t&&-1<Pf.indexOf(e)){for(;null!==o;){var i=Qe(o);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var a=Ae(i.pendingLanes);if(0!==a){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-xe(a);s.entanglements[1]|=l,a&=~l}Mu(i),!(6&pc)&&(Nc=le()+500,zu(0,!1))}}break;case 31:case 13:null!==(s=Pr(i,2))&&Kc(s,0,2),Jc(),gf(i,2)}if(null===(i=kf(r))&&td(e,t,r,Cf,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else td(e,t,r,null,n)}}function kf(e){return Sf(e=Nt(e))}var Cf=null;function Sf(e){if(Cf=null,null!==(e=Xe(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cf=e,null}function _f(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case de:return 8;case fe:case pe:return 32;case he:return 268435456;default:return 32}default:return 32}}var Af=!1,Ef=null,Tf=null,jf=null,If=new Map,Of=new Map,Lf=[],Pf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Nf(e,t){switch(e){case"focusin":case"focusout":Ef=null;break;case"dragenter":case"dragleave":Tf=null;break;case"mouseover":case"mouseout":jf=null;break;case"pointerover":case"pointerout":If.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Of.delete(t.pointerId)}}function Mf(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=Qe(t))&&mf(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function zf(e){var t=Xe(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=c(n)))return e.blockedOn=t,void De(e.priority,function(){bf(n)})}else if(31===t){if(null!==(t=u(n)))return e.blockedOn=t,void De(e.priority,function(){bf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Rf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=kf(e.nativeEvent);if(null!==n)return null!==(t=Qe(n))&&mf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Pt=r,n.target.dispatchEvent(r),Pt=null,t.shift()}return!0}function $f(e,t,n){Rf(e)&&n.delete(t)}function Df(){Af=!1,null!==Ef&&Rf(Ef)&&(Ef=null),null!==Tf&&Rf(Tf)&&(Tf=null),null!==jf&&Rf(jf)&&(jf=null),If.forEach($f),Of.forEach($f)}function Ff(e,t){e.blockedOn===t&&(e.blockedOn=null,Af||(Af=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Df)))}var Bf=null;function Hf(e){Bf!==e&&(Bf=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Bf===e&&(Bf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if("function"!=typeof r){if(null===Sf(r||n))continue;break}var i=Qe(n);null!==i&&(e.splice(t,3),t-=3,ts(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Uf(e){function t(t){return Ff(t,e)}null!==Ef&&Ff(Ef,e),null!==Tf&&Ff(Tf,e),null!==jf&&Ff(jf,e),If.forEach(t),Of.forEach(t);for(var n=0;n<Lf.length;n++){var r=Lf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Lf.length&&null===(n=Lf[0]).blockedOn;)zf(n),null===n.blockedOn&&Lf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[He]||null;if("function"==typeof i)a||Hf(n);else if(a){var s=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[He]||null)s=a.formAction;else if(null!==Sf(o))continue}else s=a.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),Hf(n)}}}function Vf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return o=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==o&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==o&&(o(),o=null)}}}function Wf(e){this._internalRoot=e}function Gf(e){this._internalRoot=e}Gf.prototype.render=Wf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));pf(t.current,Gc(),e,t,null,null)},Gf.prototype.unmount=Wf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;pf(e.current,2,null,e,null,null),Jc(),t[Ue]=null}},Gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lf.length&&0!==t&&t<Lf[n].priority;n++);Lf.splice(n,0,e),0===n&&zf(e)}};var qf=i.version;if("19.2.3"!==qf)throw Error(s(527,qf,"19.2.3"));M.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return d(o),e;if(i===r)return d(o),t;i=i.sibling}throw Error(s(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?f(e):null)?null:e.stateNode};var Kf={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.3"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yf.isDisabled&&Yf.supportsFiber)try{be=Yf.inject(Kf),ve=Yf}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(s(299));var n,r=!1,o="",i=Ss,a=_s,l=As;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(a=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=function(e,t,n,r,o,i,a,s,l,c,u,d){return e=new ff(e,t,n,a,l,c,u,d,s),t=1,!0===i&&(t|=24),i=$r(3,null,null,t),e.current=i,i.stateNode=e,(t=Fo()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},bi(i),e}(e,1,!1,null,0,r,o,null,i,a,l,Vf),e[Ue]=t.current,Ju(e),new Wf(t)}},7013:(e,t,n)=>{"use strict";var r=n(1780),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},7041:(e,t,n)=>{"use strict";n.d(t,{A:()=>le}),n(9155);const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:u}=Object,{apply:d,construct:f}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),f||(f=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const p=T(Array.prototype.forEach),h=T(Array.prototype.lastIndexOf),g=T(Array.prototype.pop),m=T(Array.prototype.push),b=T(Array.prototype.splice),v=T(String.prototype.toLowerCase),y=T(String.prototype.toString),x=T(String.prototype.match),w=T(String.prototype.replace),k=T(String.prototype.indexOf),C=T(String.prototype.trim),S=T(Object.prototype.hasOwnProperty),_=T(RegExp.prototype.test),A=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f(E,t)});var E;function T(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return d(e,t,r)}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;o&&o(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(i(t)||(t[r]=e),o=e)}e[o]=!0}return e}function I(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function O(e){const t=u(null);for(const[n,o]of r(e))S(e,n)&&(Array.isArray(o)?t[n]=I(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=O(o):t[n]=o);return t}function L(e,t){for(;null!==e;){const n=s(e,t);if(n){if(n.get)return T(n.get);if("function"==typeof n.value)return T(n.value)}e=a(e)}return function(){return null}}const P=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=l(["#text"]),F=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=c(/<%[\w\W]*|[\w\W]*%>/gm),G=c(/\$\{[\w\W]*/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),K=c(/^aria-[\-\w]+$/),Y=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:K,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:J,DATA_ATTR:q,DOCTYPE_NAME:Z,ERB_EXPR:W,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:V,TMPLIT_EXPR:G});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const i=o,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:d,Element:f,NodeFilter:E,NamedNodeMap:T=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:I,DOMParser:V,trustedTypes:W}=t,G=f.prototype,q=L(G,"cloneNode"),K=L(G,"remove"),X=L(G,"nextSibling"),Q=L(G,"childNodes"),J=L(G,"parentNode");if("function"==typeof c){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ne,re="";const{implementation:oe,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:se}=o,{importNode:le}=i;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&oe&&void 0!==oe.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:fe,DATA_ATTR:pe,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:be}=ee;let{IS_ALLOWED_URI:ve}=ee,ye=null;const xe=j({},[...P,...N,...M,...R,...D]);let we=null;const ke=j({},[...F,...B,...H,...U]);let Ce=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,_e=null;const Ae=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,Te=!0,je=!1,Ie=!0,Oe=!1,Le=!0,Pe=!1,Ne=!1,Me=!1,ze=!1,Re=!1,$e=!1,De=!0,Fe=!1,Be=!0,He=!1,Ue={},Ve=null;const We=j({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ge=null;const qe=j({},["audio","video","img","source","image","track"]);let Ke=null;const Ye=j({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Je=Ze,et=!1,tt=null;const nt=j({},[Xe,Qe,Ze],y);let rt=j({},["mi","mo","mn","ms","mtext"]),ot=j({},["annotation-xml"]);const it=j({},["title","style","font","a","script"]);let at=null;const st=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ut=o.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=O(e),at=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===at?y:v,ye=S(e,"ALLOWED_TAGS")?j({},e.ALLOWED_TAGS,lt):xe,we=S(e,"ALLOWED_ATTR")?j({},e.ALLOWED_ATTR,lt):ke,tt=S(e,"ALLOWED_NAMESPACES")?j({},e.ALLOWED_NAMESPACES,y):nt,Ke=S(e,"ADD_URI_SAFE_ATTR")?j(O(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,Ge=S(e,"ADD_DATA_URI_TAGS")?j(O(qe),e.ADD_DATA_URI_TAGS,lt):qe,Ve=S(e,"FORBID_CONTENTS")?j({},e.FORBID_CONTENTS,lt):We,Se=S(e,"FORBID_TAGS")?j({},e.FORBID_TAGS,lt):O({}),_e=S(e,"FORBID_ATTR")?j({},e.FORBID_ATTR,lt):O({}),Ue=!!S(e,"USE_PROFILES")&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,$e=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||Y,Je=e.NAMESPACE||Ze,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,ot=e.HTML_INTEGRATION_POINTS||ot,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Te=!1),Re&&(ze=!0),Ue&&(ye=j({},D),we=[],!0===Ue.html&&(j(ye,P),j(we,F)),!0===Ue.svg&&(j(ye,N),j(we,B),j(we,U)),!0===Ue.svgFilters&&(j(ye,M),j(we,B),j(we,U)),!0===Ue.mathMl&&(j(ye,R),j(we,H),j(we,U))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ae.tagCheck=e.ADD_TAGS:(ye===xe&&(ye=O(ye)),j(ye,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ae.attributeCheck=e.ADD_ATTR:(we===ke&&(we=O(we)),j(we,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&j(Ke,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ve===We&&(Ve=O(Ve)),j(Ve,e.FORBID_CONTENTS,lt)),e.ADD_FORBID_CONTENTS&&(Ve===We&&(Ve=O(Ve)),j(Ve,e.ADD_FORBID_CONTENTS,lt)),Be&&(ye["#text"]=!0),Pe&&j(ye,["html","head","body"]),ye.table&&(j(ye,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(W,a)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));l&&l(e),ct=e}},pt=j({},[...N,...M,...z]),ht=j({},[...R,...$]),gt=function(e){m(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){K(e)}},mt=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||Re)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Je===Ze&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Je===Ze)try{t=(new V).parseFromString(r,at)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Je,"template",null);try{t.documentElement.innerHTML=et?re:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Je===Ze?se.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return ie.call(e.ownerDocument||e,e,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof I&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof T)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof d&&e instanceof d};function wt(e,t,r){p(e,e=>{e.call(n,t,r,ct)})}const kt=function(e){let t=null;if(wt(ce.beforeSanitizeElements,e,null),yt(e))return gt(e),!0;const r=lt(e.nodeName);if(wt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:ye}),Le&&e.hasChildNodes()&&!xt(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Le&&8===e.nodeType&&_(/<[/\w]/g,e.data))return gt(e),!0;if(!(Ae.tagCheck instanceof Function&&Ae.tagCheck(r))&&(!ye[r]||Se[r])){if(!Se[r]&&St(r)){if(Ce.tagNameCheck instanceof RegExp&&_(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Be&&!Ve[r]){const t=J(e)||e.parentNode,n=Q(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=q(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,X(e))}}return gt(e),!0}return e instanceof f&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=v(e.tagName),r=v(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(pt[n]):e.namespaceURI===Xe?t.namespaceURI===Ze?"math"===n:t.namespaceURI===Qe?"math"===n&&ot[r]:Boolean(ht[n]):e.namespaceURI===Ze?!(t.namespaceURI===Qe&&!ot[r])&&!(t.namespaceURI===Xe&&!rt[r])&&!ht[n]&&(it[n]||!pt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,p([ue,de,fe],e=>{t=w(t,e," ")}),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ce.afterSanitizeElements,e,null),!1):(gt(e),!0)},Ct=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Te&&!_e[t]&&_(pe,t));else if(Ee&&_(he,t));else if(Ae.attributeCheck instanceof Function&&Ae.attributeCheck(t,e));else if(!we[t]||_e[t]){if(!(St(e)&&(Ce.tagNameCheck instanceof RegExp&&_(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&_(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&_(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Ke[t]);else if(_(ve,w(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==k(n,"data:")||!Ge[e])if(je&&!_(ge,w(n,me,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&x(e,be)},_t=function(e){wt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,c=lt(a),u=l;let d="value"===a?u:C(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(ce.uponSanitizeAttribute,e,r),d=r.attrValue,!Fe||"id"!==c&&"name"!==c||(mt(a,e),d="user-content-"+d),Le&&_(/((--!?|])>)|<\/(style|title|textarea)/i,d)){mt(a,e);continue}if("attributename"===c&&x(d,"href")){mt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){mt(a,e);continue}if(!Ie&&_(/\/>/i,d)){mt(a,e);continue}Oe&&p([ue,de,fe],e=>{d=w(d,e," ")});const f=lt(e.nodeName);if(Ct(f,c,d)){if(ne&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(s);else switch(W.getAttributeType(f,c)){case"TrustedHTML":d=ne.createHTML(d);break;case"TrustedScriptURL":d=ne.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),yt(e)?gt(e):g(n.removed)}catch(t){mt(a,e)}}else mt(a,e)}wt(ce.afterSanitizeAttributes,e,null)},At=function e(t){let n=null;const r=vt(t);for(wt(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(ce.uponSanitizeShadowNode,n,null),kt(n),_t(n),n.content instanceof s&&e(n.content);wt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ne||ft(t),n.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||Se[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)r=bt("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!ze&&!Oe&&!Pe&&-1===e.indexOf("<"))return ne&&$e?ne.createHTML(e):e;if(r=bt(e),!r)return ze?null:$e?re:""}r&&Me&&gt(r.firstChild);const c=vt(He?e:r);for(;a=c.nextNode();)kt(a),_t(a),a.content instanceof s&&At(a.content);if(He)return e;if(ze){if(Re)for(l=ae.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(we.shadowroot||we.shadowrootmode)&&(l=le.call(i,l,!0)),l}let u=Pe?r.outerHTML:r.innerHTML;return Pe&&ye["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(Z,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Oe&&p([ue,de,fe],e=>{u=w(u,e," ")}),ne&&$e?ne.createHTML(u):u},n.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},n.clearConfig=function(){ct=null,Ne=!1},n.isValidAttribute=function(e,t,n){ct||ft({});const r=lt(e),o=lt(t);return Ct(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&m(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=h(ce[e],t);return-1===n?void 0:b(ce[e],n,1)[0]}return g(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const re=["form","input"],oe=["target"],ie=["action"];function ae(e){return ne.sanitize(e,{ADD_ATTR:oe,FORBID_ATTR:ie,FORBID_TAGS:re,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}})}var se=n(1085);function le(e){return(0,se.jsx)("div",{dangerouslySetInnerHTML:{__html:ae(e)}})}},7133:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(5352);const o=(e,t,n)=>{if(e.storagePath&&e.status===r.Le.CLEAN)return`${t}/chatbubble/${r.Ak}/attachment/${e.storagePath}?token=${n}`}},7150:(e,t,n)=>{"use strict";var r=n(9932),o=n(3273),i=n(5116).f,a=n(5148),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},7152:(e,t,n)=>{"use strict";n.d(t,{K_:()=>i,qQ:()=>o,zZ:()=>r});const r="UNAUTHENTICATED",o="IDENTIFIED",i="AUTHENTICATED"},7161:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7235:(e,t,n)=>{"use strict";var r=n(262),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},7251:(e,t,n)=>{"use strict";n.d(t,{U1:()=>Le,zD:()=>Fe,Z0:()=>Ge});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),i=Symbol.for("immer-state");function a(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var s=Object,l=s.getPrototypeOf,c="constructor",u="prototype",d="configurable",f="enumerable",p="writable",h="value",g=e=>!!e&&!!e[i];function m(e){return!!e&&(y(e)||_(e)||!!e[o]||!!e[c]?.[o]||A(e)||E(e))}var b=s[u][c].toString(),v=new WeakMap;function y(e){if(!e||!T(e))return!1;const t=l(e);if(null===t||t===s[u])return!0;const n=s.hasOwnProperty.call(t,c)&&t[c];if(n===Object)return!0;if(!j(n))return!1;let r=v.get(n);return void 0===r&&(r=Function.toString.call(n),v.set(n,r)),r===b}function x(e,t,n=!0){0===w(e)?(n?Reflect.ownKeys(e):s.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function w(e){const t=e[i];return t?t.type_:_(e)?1:A(e)?2:E(e)?3:0}var k=(e,t,n=w(e))=>2===n?e.has(t):s[u].hasOwnProperty.call(e,t),C=(e,t,n=w(e))=>2===n?e.get(t):e[t],S=(e,t,n,r=w(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},_=Array.isArray,A=e=>e instanceof Map,E=e=>e instanceof Set,T=e=>"object"==typeof e,j=e=>"function"==typeof e,I=e=>"boolean"==typeof e,O=e=>e.copy_||e.base_,L=e=>e.modified_?e.copy_:e.base_;function P(e,t){if(A(e))return new Map(e);if(E(e))return new Set(e);if(_(e))return Array[u].slice.call(e);const n=y(e);if(!0===t||"class_only"===t&&!n){const t=s.getOwnPropertyDescriptors(e);delete t[i];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i[p]&&(i[p]=!0,i[d]=!0),(i.get||i.set)&&(t[o]={[d]:!0,[p]:!0,[f]:i[f],[h]:e[o]})}return s.create(l(e),t)}{const t=l(e);if(null!==t&&n)return{...e};const r=s.create(t);return s.assign(r,e)}}function N(e,t=!1){return z(e)||g(e)||!m(e)||(w(e)>1&&s.defineProperties(e,{set:M,add:M,clear:M,delete:M}),s.freeze(e),t&&x(e,(e,t)=>{N(t,!0)},!1)),e}var M={[h]:function(){a(2)}};function z(e){return null===e||!T(e)||s.isFrozen(e)}var R="MapSet",$="Patches",D="ArrayMethods",F={};function B(e){const t=F[e];return t||a(0),t}var H,U=e=>!!F[e],V=()=>H;function W(e,t){t&&(e.patchPlugin_=B($),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function G(e){q(e),e.drafts_.forEach(Y),e.drafts_=null}function q(e){e===H&&(H=e.parent_)}var K=e=>H={drafts_:[],parent_:H,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:U(R)?B(R):void 0,arrayMethodsPlugin_:U(D)?B(D):void 0};function Y(e){const t=e[i];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function X(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[i].modified_&&(G(t),a(4)),m(e)&&(e=Q(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[i].base_,e,t)}else e=Q(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&N(t,n)}(t,e,!0),G(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function Q(e,t){if(z(t))return t;const n=t[i];if(!n)return re(t,e.handledSet_,e);if(!J(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);ne(n,e)}return n.copy_}function Z(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var J=(e,t)=>e.scope_===t,ee=[];function te(e,t,n,r){const o=O(e),i=e.type_;if(void 0!==r&&C(o,r,i)===t)return void S(o,r,n,i);if(!e.draftLocations_){const t=e.draftLocations_=new Map;x(o,(e,n)=>{if(g(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??ee;for(const e of a)S(o,e,n,i)}function ne(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Z(e)}}function re(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||g(e)||t.has(e)||!m(e)||z(e)||(t.add(e),x(e,(r,o)=>{if(g(o)){const t=o[i];if(J(t,n)){const n=L(t);S(e,r,n,e.type_),Z(t)}}else m(o)&&re(o,t,n)})),e}var oe={get(e,t){if(t===i)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const o=O(e);if(!k(o,t,e.type_))return function(e,t,n){const r=se(t,n);return r?h in r?r[h]:r.get?.call(e.draft_):void 0}(e,o,t);const a=o[t];if(e.finalized_||!m(a))return a;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===ae(e.base_,t)){ce(e);const n=1===e.type_?+t:t,r=ue(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in O(e),ownKeys:e=>Reflect.ownKeys(O(e)),set(e,t,n){const r=se(O(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=ae(O(e),t),s=r?.[i];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((o=n)===(a=r)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==n||k(e.base_,t,e.type_)))return!0;ce(e),le(e)}var o,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(g(n)){const o=n[i];J(o,r)&&o.callbacks_.push(function(){ce(e);const r=L(o);te(e,n,r,t)})}else m(n)&&e.callbacks_.push(function(){const o=O(e);3===e.type_?o.has(n)&&re(n,r.handledSet_,r):C(o,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&re(C(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(ce(e),void 0!==ae(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),le(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=O(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[p]:!0,[d]:1!==e.type_||"length"!==t,[f]:r[f],[h]:n[t]}:r},defineProperty(){a(11)},getPrototypeOf:e=>l(e.base_),setPrototypeOf(){a(12)}},ie={};for(let e in oe){let t=oe[e];ie[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function ae(e,t){const n=e[i];return(n?O(n):e)[t]}function se(e,t){if(!(t in e))return;let n=l(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=l(n)}}function le(e){e.modified_||(e.modified_=!0,e.parent_&&le(e.parent_))}function ce(e){e.copy_||(e.assigned_=new Map,e.copy_=P(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ue(e,t,n,r){const[o,i]=A(t)?B(R).proxyMap_(t,n):E(t)?B(R).proxySet_(t,n):function(e,t){const n=_(e),r={type_:n?1:0,scope_:t?t.scope_:V(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=oe;n&&(o=[r],i=ie);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??V()).drafts_.push(o),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const o=t;if(!o||!J(o,r))return;r.mapSetPlugin_?.fixSetContents(o);const i=L(o);te(e,o.draft_??o,i,n),ne(o,r)})}(n,i,r):i.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:t}=e;i.modified_&&t&&t.generatePatches_(i,[],e)}),o}function de(e){if(!m(e)||z(e))return e;const t=e[i];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=P(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=P(e,!0);return x(n,(e,t)=>{S(n,e,de(t))},r),t&&(t.finalized_=!1),n}ie.deleteProperty=function(e,t){return ie.set.call(this,e,t,void 0)},ie.set=function(e,t,n){return oe.set.call(this,e[0],t,n,e[0])};var fe=(new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(j(e)&&!j(t)){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let o;if(j(t)||a(6),void 0===n||j(n)||a(7),m(e)){const r=K(this),i=ue(0,e,void 0);let a=!0;try{o=t(i),a=!1}finally{a?G(r):q(r)}return W(r,n),X(o,r)}if(!e||!T(e)){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&N(o,!0),n){const t=[],r=[];B($).generateReplacementPatches_(e,o,{patches_:t,inversePatches_:r}),n(t,r)}return o}a(1)},this.produceWithPatches=(e,t)=>{if(j(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},I(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),I(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),I(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;m(e)||a(8),g(e)&&(g(t=e)||a(10),e=de(t));const n=K(this),r=ue(0,e,void 0);return r[i].isManual_=!0,q(n),r}finishDraft(e,t){const n=e&&e[i];n&&n.isManual_||a(9);const{scope_:r}=n;return W(r,t),X(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=B($).applyPatches_;return g(e)?r(e,t):this.produce(e,e=>r(e,t))}}).produce;function pe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var he=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ge=()=>Math.random().toString(36).substring(7).split("").join("."),me={INIT:`@@redux/INIT${ge()}`,REPLACE:`@@redux/REPLACE${ge()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ge()}`};function be(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ve(e,t,n){if("function"!=typeof e)throw new Error(pe(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(pe(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(pe(1));return n(ve)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error(pe(3));return o}function d(e){if("function"!=typeof e)throw new Error(pe(4));if(l)throw new Error(pe(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(pe(6));t=!1,c(),a.delete(n),i=null}}}function f(e){if(!be(e))throw new Error(pe(7));if(void 0===e.type)throw new Error(pe(8));if("string"!=typeof e.type)throw new Error(pe(17));if(l)throw new Error(pe(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return f({type:me.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(pe(10));r=e,f({type:me.REPLACE})},[he]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(pe(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[he](){return this}}}}}function ye(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function xe(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var we=xe(),ke=xe,Ce=(n(9907),"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ye:ye.apply(null,arguments)}),Se=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function _e(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Ye(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return be(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var Ae=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Ee(e){return m(e)?fe(e,()=>{}):e}function Te(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var je=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new Ae;return t&&("boolean"==typeof t?i.push(we):i.push(ke(t.extraArgument))),i},Ie=e=>t=>{setTimeout(t,e)},Oe=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new Ae(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ie(10):"callback"===e.type?e.queueNotification:Ie(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,i=!o,i&&(a||(a=!0,l(c))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function Le(e){const t=je(),{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!be(n))throw new Error(Ye(1));l=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:me.INIT}))throw new Error(pe(12));if(void 0===n(void 0,{type:me.PROBE_UNKNOWN_ACTION()}))throw new Error(pe(13))})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],l=n[s],c=e[s],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(pe(14));a[s]=u,i=i||u!==c}return i=i||r.length!==Object.keys(e).length,i?a:e}}(n)}c="function"==typeof r?r(t):t();let u=ye;o&&(u=Ce({trace:!1,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(pe(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=ye(...s)(o.dispatch),{...o,dispatch:i}}}(...c),f=Oe(d);return ve(l,a,u(..."function"==typeof s?s(f):f()))}function Pe(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Ye(28));if(r in t)throw new Error(Ye(29));return t[r]=n,o},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),o),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function Ne(...e){return t=>e.some(e=>((e,t)=>Se(e)?e.match(t):e(t))(e,t))}var Me=["name","message","stack","code"],ze=class{constructor(e,t){this.payload=e,this.meta=t}_type},Re=class{constructor(e,t){this.payload=e,this.meta=t}_type},$e=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Me)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},De="External signal was aborted",Fe=(()=>{function e(e,t,n){const r=_e(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=_e(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),i=_e(e+"/rejected",(e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||$e)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(s,l,c)=>{const u=n?.idGenerator?n.idGenerator(e):((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),d=new AbortController;let f,p;function h(e){p=e,d.abort()}a&&(a.aborted?h(De):a.addEventListener("abort",()=>h(De),{once:!0}));const g=async function(){let a;try{let i=n?.condition?.(e,{getState:l,extra:c});if(null!==(g=i)&&"object"==typeof g&&"function"==typeof g.then&&(i=await i),!1===i||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f,{once:!0})});s(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:l,extra:c}))),a=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new ze(e,t),fulfillWithValue:(e,t)=>new Re(e,t)})).then(t=>{if(t instanceof ze)throw t;return t instanceof Re?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof ze?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{f&&d.signal.removeEventListener("abort",f)}var g;return n&&!n.dispatchConditionRejection&&i.match(a)&&a.meta.condition||s(a),a}();return Object.assign(g,{abort:h,requestId:u,arg:e,unwrap:()=>g.then(Be)})}},{pending:o,rejected:i,fulfilled:r,settled:Ne(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Be(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var He=Symbol.for("rtk-slice-createasyncthunk");function Ue(e,t){return`${e}/${t}`}function Ve({creators:e}={}){const t=e?.asyncThunk?.[He];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(Ye(11));const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Ye(12));if(n in a.sliceCaseReducersByType)throw new Error(Ye(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function l(){const[t={},n=[],r]="function"==typeof e.extraReducers?Pe(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e){let t,[i,s,l]=Pe(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>Ee(e());else{const n=Ee(e);t=()=>n}function c(e=t(),n){let r=[i[n.type],...s.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[l]),r.reduce((e,t)=>{if(t){if(g(e)){const r=t(e,n);return void 0===r?e:r}if(m(e))return fe(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return c.getInitialState=t,c}(e.initialState)}i.forEach(r=>{const i=o[r],a={reducerName:r,type:Ue(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Ye(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?_e(e,a):_e(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Ye(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||qe,pending:s||qe,rejected:l||qe,settled:c||qe})}(a,i,s,t)});const c=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=l()),f(e,t)}function h(){return f||(f=l()),f.getInitialState()}function b(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=Te(d,r,h)),o}function o(t=c){const r=Te(u,n,()=>new WeakMap);return Te(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=We(i,t,()=>Te(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...b(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...v,...b(o,!0)}}};return v}}function We(e,t,n,r){function o(o,...i){let a=t(o);return void 0===a&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Ge=Ve();function qe(){}var{assign:Ke}=Object;function Ye(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},7279:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(9155),o=n.n(r),i=n(2327),a=n(2876),s=n(1085);function l(e){let{name:t,control:n,options:r,validators:o,register:l,inputType:c,setError:u,clearErrors:d,trigger:f}=e;return(0,s.jsx)(s.Fragment,{children:r.map((e,p)=>(0,s.jsx)(a.B2,{children:(0,s.jsx)(i.A,{inputType:c,validators:o,register:l,value:e.value,label:e.label,id:e.id,name:t,control:n,setError:u,clearErrors:d,trigger:f,isLast:p===r.length-1})},`${e.value}_${p}`))})}const c=o().memo(l)},7312:(e,t,n)=>{"use strict";var r=n(6189);n(85),e.exports=r},7313:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},7354:e=>{e.exports=function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")},e.exports.__esModule=!0,e.exports.default=e.exports},7376:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(824),o=n(4557);let i;const a=e=>{let{trigger:t,control:n,name:a,setError:s,clearErrors:l}=e;const{errors:c,isSubmitted:u}=n?(0,r.lN)({name:a,control:n}):{errors:{},isSubmitted:!1};return e=>{var r;if(!n)return;const d={...c},f=e.target;if(null!=f&&f.validationMessage&&(null===(r=c[a])||void 0===r?void 0:r.message)!==(null==f?void 0:f.validationMessage)&&s?s(`browser_error_${a}`,{type:o.k1.BROWSER,message:f.validationMessage},{shouldFocus:!0}):l&&l(`browser_error_${a}`),u&&t){const e=d[`browser_error_${a}`];"email"===f.type&&!e&&f.value.endsWith(".")?i=setTimeout(()=>{t(a)},1e3):(i&&clearTimeout(i),t(a))}}}},7389:(e,t,n)=>{"use strict";var r=n(5024),o=n(1330),i=n(9989),a=n(7235),s=n(3273),l=n(8364);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=l(t),c=o.length,u=0;c>u;)i.f(e,n=o[u++],r[n]);return e}},7424:(e,t,n)=>{"use strict";var r=n(4531),o=n(86);r("toPrimitive"),o()},7460:(e,t,n)=>{"use strict";var r=n(4603);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7474:(e,t,n)=>{"use strict";n.d(t,{VP:()=>a,gQ:()=>s,ku:()=>i,oI:()=>o});var r=n(3178);const o={HANDOVER:"handover",MESSAGE:"message",FEEDBACK:"feedback"},i=()=>(e,t)=>{const{show:n,dismissed:i}=t().pushMessages;i||n||e({type:r.l,pushMessageType:o.FEEDBACK})},a=e=>t=>{const{title:n,message:i}=e;t({type:r.l,pushMessageTitle:n,pushMessageType:o.MESSAGE,pushMessageText:i})},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:r.a_})}},7487:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){return t?n({},e,t):e},e.exports=t.default},7501:(e,t,n)=>{"use strict";n(4531)("split")},7524:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(5396)})},7525:(e,t,n)=>{"use strict";var r=n(8900),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},7551:(e,t,n)=>{var r=n(1452),o=n(1363);e.exports=function(e,t,n){return(t=o(t))in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},7559:(e,t,n)=>{"use strict";n.d(t,{Kd:()=>c,MO:()=>a,X2:()=>r,oE:()=>s,un:()=>i,wX:()=>l,wv:()=>o});const r="DISMISS_NUDGE",o="SHOW_NUDGE",i="SHOW_CUSTOM_NUDGE",a="CTA_CLICK",s="SESSION_COMPLETION",l="COUNT_NUDGE",c="DISCOUNT_NUDGE"},7603:(e,t,n)=>{"use strict";var r=n(9098),o=n(1005).includes,i=n(1203),a=n(8137);r({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},7636:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5650);const o=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.A)}}},7638:(e,t,n)=>{"use strict";n.d(t,{_H:()=>a,dg:()=>c,jq:()=>i,lV:()=>s,zE:()=>l});var r=n(1197),o=n(8663);const i=(0,r.AH)(["&:focus-within{outline:1px solid ",";}"],e=>{let{theme:t}=e;return(0,o.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),a=r.Ay.div.withConfig({componentId:"sc-1n2166t-0"})(["padding:12px;box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);border-radius:6px;margin:3px 0 2px;background:",";background-color:",";"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return t.panelBackground}),s=r.Ay.form.withConfig({componentId:"sc-1n2166t-1"})(["display:flex;flex-direction:column;flex:1;",""],e=>{let{$isSubmitted:t}=e;return t?"*:invalid {\n border: 1px solid var(--panel-background-white-black-contrast-1743170834);\n }":"*:invalid {\n border: 1px solid transparent;\n }"}),l=r.Ay.div.withConfig({componentId:"sc-1n2166t-2"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;display:flex;align-items:center;color:var(--panel-background-white-black-contrast-1743170834);& > svg{margin-right:4px;& > path{stroke:var(--panel-background-white-black-contrast-1743170834);}}"]),c=r.Ay.div.withConfig({componentId:"sc-1n2166t-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:16px;& > button{&:last-child{margin-left:12px;}}"])},7639:(e,t,n)=>{"use strict";n.d(t,{T:()=>o,s:()=>r});const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},7752:(e,t,n)=>{"use strict";var r=n(262),o=n(9932),i=n(8655)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===o(e))}},7785:(e,t,n)=>{"use strict";var r=n(6100),o=n(908),i=n(2769),a=n(9932),s=n(1139),l=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||l(n,s(c))}var u=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<u;r++)if(n[r]===e)return t}}}},7912:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t,n)=>{var r;return null!==(r=t.split(".").reduce((e,t)=>e?e[t]:void 0,e))&&void 0!==r?r:n}},7931:(e,t,n)=>{"use strict";n.d(t,{Y$:()=>v,zV:()=>y,Ay:()=>x}),n(9155);var r=n(1085);function o(e){let{color:t="#333333",size:n=24}=e;return(0,r.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M6.75012 4.75C5.64555 4.75 4.75012 5.64543 4.75012 6.75V14.25C4.75012 15.3546 5.64555 16.25 6.75012 16.25H10.7501C11.3024 16.25 11.7501 16.6977 11.7501 17.25V19.25L14.9057 16.6955C15.2617 16.4073 15.706 16.25 16.1641 16.25H17.2501C18.3547 16.25 19.2501 15.3546 19.2501 14.25V6.75C19.2501 5.64543 18.3547 4.75 17.2501 4.75H6.75012Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 8.90015H14.95",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.9751 8.725V7.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13.55 8.90015C13.55 8.90015 13.55 10.6501 12.15 12.0501C10.75 13.4501 9 13.4501 9 13.4501",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M14.2504 13.4502C14.2504 13.4502 12.5004 13.4502 11.1004 12.0502C10.8172 11.7671 10.4004 11.0002 10.4004 11.0002",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}var i=n(353);const a=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_144_28508)",children:[(0,r.jsx)("path",{d:"M6.5 5.83398L8.83333 8.00065M8.83333 8.00065L6.5 10.1673M8.83333 8.00065H3",stroke:t,strokeLinecap:"square"}),(0,r.jsx)("path",{d:"M6.5 3.16602H11.5C12.2364 3.16602 12.8333 3.76297 12.8333 4.49935V11.4993C12.8333 12.2357 12.2364 12.8327 11.5 12.8327H6.5",stroke:t,strokeLinecap:"square",strokeLinejoin:"round"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_144_28508",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})},s=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsxs)("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("path",{d:"M9.6875 5.10352L11.7292 6.99935L9.6875 8.89518",stroke:t,strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M11.583 7H6.77051",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.39551 2.77148H4.43717C3.79284 2.77148 3.27051 3.29382 3.27051 3.93815V10.0632C3.27051 10.7075 3.79284 11.2298 4.43717 11.2298H9.39551",stroke:t,strokeWidth:"1.04973",strokeLinecap:"round",strokeLinejoin:"round"})]})},l=function(e){let{color:t="#6A778A",...n}=e;return(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M4.36766 10.3092L4.04067 10.72L4.36766 10.3092ZM7.14551 11.7529C7.43546 11.7529 7.67051 11.5178 7.67051 11.2279C7.67051 10.9379 7.43546 10.7029 7.14551 10.7029V11.7529ZM10.7038 7.14453C10.7038 7.43448 10.9389 7.66953 11.2288 7.66953C11.5188 7.66953 11.7538 7.43448 11.7538 7.14453H10.7038ZM7.14551 9.7112C7.43546 9.7112 7.67051 9.47615 7.67051 9.1862C7.67051 8.89625 7.43546 8.6612 7.14551 8.6612V9.7112ZM9.54134 11.2279L9.13802 11.564C9.25642 11.706 9.44083 11.7753 9.62349 11.7464C9.80615 11.7175 9.96011 11.5946 10.0288 11.4228L9.54134 11.2279ZM11.6146 8.95896C11.8113 8.74591 11.798 8.41376 11.5849 8.21709C11.3719 8.02043 11.0397 8.03371 10.8431 8.24677L11.6146 8.95896ZM9.00716 9.76677C8.82154 9.54402 8.49049 9.51393 8.26774 9.69955C8.045 9.88517 8.0149 10.2162 8.20052 10.439L9.00716 9.76677ZM3.29551 6.9987C3.29551 4.95298 4.95395 3.29453 6.99967 3.29453V2.24453C4.37405 2.24453 2.24551 4.37308 2.24551 6.9987H3.29551ZM6.99967 3.29453C9.0454 3.29453 10.7038 4.95298 10.7038 6.9987H11.7538C11.7538 4.37308 9.62529 2.24453 6.99967 2.24453V3.29453ZM7.78717 6.41536C7.78717 6.85028 7.43459 7.20286 6.99967 7.20286V8.25286C8.01449 8.25286 8.83717 7.43018 8.83717 6.41536H7.78717ZM6.99967 7.20286C6.56476 7.20286 6.21217 6.85028 6.21217 6.41536H5.16217C5.16217 7.43018 5.98486 8.25286 6.99967 8.25286V7.20286ZM6.21217 6.41536C6.21217 5.98045 6.56476 5.62786 6.99967 5.62786V4.57786C5.98486 4.57786 5.16217 5.40055 5.16217 6.41536H6.21217ZM6.99967 5.62786C7.43459 5.62786 7.78717 5.98045 7.78717 6.41536H8.83717C8.83717 5.40055 8.01449 4.57786 6.99967 4.57786V5.62786ZM4.74663 10.6726C5.3153 10.0794 6.11405 9.7112 6.99967 9.7112V8.6612C5.81624 8.6612 4.74718 9.15479 3.9887 9.94589L4.74663 10.6726ZM6.99967 10.7029C6.1277 10.7029 5.32737 10.4022 4.69465 9.89849L4.04067 10.72C4.85255 11.3663 5.8817 11.7529 6.99967 11.7529V10.7029ZM4.69465 9.89849C3.84111 9.21898 3.29551 8.17271 3.29551 6.9987H2.24551C2.24551 8.50608 2.94767 9.84981 4.04067 10.72L4.69465 9.89849ZM6.99967 11.7529H7.14551V10.7029H6.99967V11.7529ZM10.7038 6.9987V7.14453H11.7538V6.9987H10.7038ZM6.99967 9.7112H7.14551V8.6612H6.99967V9.7112ZM10.0288 11.4228C10.2872 10.7769 10.6811 10.1608 11.0197 9.69804C11.1875 9.46874 11.3383 9.28164 11.4465 9.15264C11.5005 9.08822 11.5438 9.03852 11.5729 9.00553C11.5875 8.98904 11.5985 8.97675 11.6056 8.9689C11.6091 8.96497 11.6117 8.96216 11.6132 8.9605C11.614 8.95966 11.6145 8.95912 11.6147 8.95886C11.6148 8.95873 11.6149 8.95867 11.6149 8.95869C11.6149 8.9587 11.6148 8.95873 11.6148 8.95877C11.6148 8.95879 11.6147 8.95884 11.6147 8.95885C11.6147 8.9589 11.6146 8.95896 11.2288 8.60286C10.8431 8.24677 10.843 8.24683 10.8429 8.2469C10.8429 8.24693 10.8428 8.24701 10.8428 8.24707C10.8427 8.24719 10.8426 8.24733 10.8424 8.24748C10.8421 8.2478 10.8418 8.24819 10.8413 8.24865C10.8405 8.24957 10.8394 8.2508 10.838 8.25231C10.8352 8.25534 10.8314 8.25955 10.8266 8.26489C10.8169 8.27558 10.8032 8.29085 10.7859 8.31043C10.7513 8.34958 10.7022 8.40608 10.642 8.4779C10.5217 8.62136 10.3561 8.82683 10.1723 9.078C9.80778 9.57623 9.35803 10.2725 9.05389 11.0329L10.0288 11.4228ZM8.20052 10.439L9.13802 11.564L9.94466 10.8918L9.00716 9.76677L8.20052 10.439Z",fill:t})})};var c=n(1304),u=n(5134),d=n(1197),f=n(5394),p=n(8663);const h=d.Ay.div.withConfig({componentId:"sc-1ilvrss-0"})(["width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;",";margin-bottom:8px;@media (prefers-reduced-motion){animation:none;}"],f.AK),g=d.Ay.div.withConfig({componentId:"sc-1ilvrss-1"})(["max-width:80%;display:flex;"]),m=d.Ay.span.withConfig({componentId:"sc-1ilvrss-2"})(["font-size:var(--_kindlychat-font-size-sm);text-align:center;color:",";& > div{display:inline;}& > svg{font-size:var(--_kindlychat-font-size-m);margin-right:4px;vertical-align:text-top;min-width:20px;display:inline;}"],e=>{let{theme:t}=e;return(0,p.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")});var b=n(7041);const v={REVOKE_PERMISSION:"revoke-permission"},y={COMPLIANCE:"frontend_system_message_compliance_text"};function x(e){let{chatMessage:t}=e;const n=(0,u.jL)();let d=null;switch(t.system_dialogue_message_type.toLowerCase()){case"start":d=(0,r.jsx)(a,{width:16,height:16});break;case"end":d=(0,r.jsx)(s,{width:16,height:16});break;case"agent_assigned":d=(0,r.jsx)(l,{width:16,height:16});break;case"live_translation_start":case"live_translation_end":d=(0,r.jsx)(o,{size:16});break;case y.COMPLIANCE:d=(0,r.jsx)(i.A,{size:16})}return(0,r.jsx)(h,{children:(0,r.jsx)(g,{onClick:e=>{const t=e.target;if(!t)return;const r=t.closest("[data-kindly-action]");r&&(e.preventDefault(),r.getAttribute("data-kindly-action")===v.REVOKE_PERMISSION&&n(c.c9))},children:(0,r.jsxs)(m,{children:[d,(0,b.A)(t.event_message)]})})})}},7935:()=>{},7967:(e,t,n)=>{"use strict";e.exports=n(6310)},8013:(e,t,n)=>{"use strict";n(4531)("observable")},8048:(e,t,n)=>{"use strict";n.d(t,{H2:()=>l,H3:()=>c,H5:()=>u,cp:()=>d,fz:()=>a,mt:()=>s});var r=n(1197),o=n(4785),i=n(1708);const a=r.Ay.p.withConfig({componentId:"sc-128z1ys-0"})(["color:",";font-size:var(--_kindlychat-font-size-p);font-weight:normal;line-height:20px;font-family:",";word-break:normal;overflow-wrap:anywhere;"],i.Tj.darkColor,o.m.default),s=(0,r.Ay)(a).withConfig({componentId:"sc-128z1ys-1"})(["font-size:var(--_kindlychat-font-size-xs);opacity:0.6;"]),l=r.Ay.h2.withConfig({componentId:"sc-128z1ys-2"})(["color:",";font-size:var(--_kindlychat-font-size-h2);font-weight:normal;margin:0 0 30px;line-height:30px;font-family:",";"],i.Tj.darkColor,o.m.default),c=r.Ay.h3.withConfig({componentId:"sc-128z1ys-3"})(["color:",";font-size:var(--_kindlychat-font-size-h3);font-weight:normal;line-height:30px;margin:0 0 15px;font-family:",";"],i.Tj.darkColor,o.m.default),u=(r.Ay.h4.withConfig({componentId:"sc-128z1ys-4"})(["color:",";font-size:var(--_kindlychat-font-size-h4);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.h5.withConfig({componentId:"sc-128z1ys-5"})(["color:",";font-size:var(--_kindlychat-font-size-m);font-weight:normal;margin:0 0 10px;line-height:24px;font-family:",";"],i.Tj.darkColor,o.m.default)),d=(r.Ay.h6.withConfig({componentId:"sc-128z1ys-6"})(["color:",";font-size:var(--font-size-h6);font-weight:normal;margin:0 0 10px;font-family:",";"],i.Tj.darkColor,o.m.default),r.Ay.span.withConfig({componentId:"sc-128z1ys-7"})(["color:",";font-family:",";opacity:1;a{color:",";text-decoration:none;&:hover,&:focus,&:active,&:visited{color:",";}}"],i.Tj.primaryColor,o.m.KindlySans,i.Tj.primaryColor,i.Tj.primaryColor))},8068:(e,t,n)=>{"use strict";function r(e,t){return"number"!=typeof(null==e?void 0:e.length)||e.length!==(null==t?void 0:t.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):e.map((e,n)=>[e,t[n]])}n.d(t,{A:()=>r})},8070:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(9749),o=n.n(r);const i="kindly-chat-utm",a=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);function s(){const e=new URLSearchParams(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&o()(a).call(a,n.toUpperCase().substring(4))?{...e,[n]:r}:e},{});if(0===Object.keys(t).length){const e=window.sessionStorage.getItem(i);t=e?JSON.parse(e):null}else window.sessionStorage.setItem(i,JSON.stringify(t));return t}},8089:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[a]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d,f,p,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,m=h||g||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,y=v&&v.exports===b,x=y&&h.process,w=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),k=w&&w.isTypedArray,C=Array.prototype,S=Function.prototype,_=Object.prototype,A=m["__core-js_shared__"],E=S.toString,T=_.hasOwnProperty,j=(d=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",I=_.toString,O=E.call(Object),L=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=y?m.Buffer:void 0,N=m.Symbol,M=m.Uint8Array,z=(P&&P.allocUnsafe,f=Object.getPrototypeOf,p=Object,function(e){return f(p(e))}),R=Object.create,$=_.propertyIsEnumerable,D=C.splice,F=N?N.toStringTag:void 0,B=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=P?P.isBuffer:void 0,U=Math.max,V=Date.now,W=se(m,"Map"),G=se(Object,"create"),q=function(){function e(){}return function(t){if(!ye(t))return{};if(R)return R(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new Y(e);this.size=t.size}function Z(e,t,n){(void 0!==n&&!fe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function J(e,t,n){var r=e[t];T.call(e,t)&&fe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(fe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}K.prototype.clear=function(){this.__data__=G?G(null):{},this.size=0},K.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K.prototype.get=function(e){var t=this.__data__;if(G){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return G?void 0!==t[e]:T.call(t,e)},K.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=G&&void 0===t?r:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():D.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ee(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(W||Y),string:new K}},X.prototype.delete=function(e){var t=ae(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return ae(this,e).get(e)},X.prototype.has=function(e){return ae(this,e).has(e)},X.prototype.set=function(e,t){var n=ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new Y,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=T.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=I.call(e);return r&&(t?e[F]=n:delete e[F]),o}(e):function(e){return I.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,function(i,a){if(o||(o=new Q),ye(i))!function(e,t,n,r,o,i,a){var l=ue(e,n),c=ue(t,n),u=a.get(c);if(u)Z(e,n,u);else{var d,f,p,h,g,m=i?i(l,c,n+"",e,t,a):void 0,b=void 0===m;if(b){var v=he(c),y=!v&&me(c),x=!v&&!y&&we(c);m=c,v||y||x?he(l)?m=l:xe(g=l)&&ge(g)?m=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(l):y?(b=!1,m=function(e){return e.slice()}(c)):x?(b=!1,h=new(p=(d=c).buffer).constructor(p.byteLength),new M(h).set(new M(p)),f=h,m=new d.constructor(f,d.byteOffset,d.length)):m=[]:function(e){if(!xe(e)||ne(e)!=s)return!1;var t=z(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==O}(c)||pe(c)?(m=l,pe(l)?m=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=void 0;void 0===s&&(s=e[a]),r?te(n,a,s):J(n,a,s)}return n}(e,ke(e))}(l):ye(l)&&!be(l)||(m=function(e){return"function"!=typeof e.constructor||ce(e)?{}:q(z(e))}(c))):b=!1}b&&(a.set(c,m),o(m,c,r,i,a),a.delete(c)),Z(e,n,m)}}(e,t,a,n,oe,r,o);else{var l=r?r(ue(e,a),i,a+"",e,t,o):void 0;void 0===l&&(l=i),Z(e,a,l)}},ke)}var ie=B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:_e;function ae(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ye(e)||function(e){return!!j&&j in e}(e))&&(be(e)?L:l).test(function(e){if(null!=e){try{return E.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function le(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&c.test(e))&&e>-1&&e%1==0&&e<t}function ce(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_)}function ue(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var de=function(e){var t=0,n=0;return function(){var r=V(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function fe(e,t){return e===t||e!=e&&t!=t}var pe=re(function(){return arguments}())?re:function(e){return xe(e)&&T.call(e,"callee")&&!$.call(e,"callee")},he=Array.isArray;function ge(e){return null!=e&&ve(e.length)&&!be(e)}var me=H||function(){return!1};function be(e){if(!ye(e))return!1;var t=ne(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ve(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=k?function(e){return function(t){return e(t)}}(k):function(e){return xe(e)&&ve(e.length)&&!!u[ne(e)]};function ke(e){return ge(e)?function(e,t){var n=he(e),r=!n&&pe(e),o=!n&&!r&&me(e),i=!n&&!r&&!o&&we(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!T.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||le(c,l))||s.push(c);return s}(e,!0):function(e){if(!ye(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ce(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}(e)}var Ce,Se=(Ce=function(e,t,n){oe(e,t,n)},function(e,t){return de(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=U(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,_e),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Ce.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ye(n))return!1;var r=typeof t;return!!("number"==r?ge(n)&&le(t,n.length):"string"==r&&t in n)&&fe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Ce(e,a,n)}return e}));function _e(e){return e}e.exports=Se},8094:(e,t,n)=>{"use strict";n.d(t,{IM:()=>f,Os:()=>a,QA:()=>c,Y6:()=>o,fg:()=>r,kU:()=>u,pz:()=>h,se:()=>d,tS:()=>i,tq:()=>s,wP:()=>p,z2:()=>l});const r="ANONYMIZED_MESSAGE",o="BUTTON_CLICK",i="MESSAGE_ATTACHMENTS_UPDATED",a="NEW_ATTACHMENTS",s="NEW_MESSAGE",l="NEW_FRONTEND_SYSTEM_MESSAGE",c="SET_FORM",u="SET_LAST_MESSAGE_SEEN",d="SET_MESSAGE_SENT_TIME",f="TRIGGER_DIALOGUE",p="UPDATE_ATTACHMENT",h="UPDATE_CHAT_MESSAGE"},8099:e=>{"use strict";e.exports={}},8129:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u,cT:()=>l,ue:()=>c});var r=n(5352),o=n(3436),i=n(485),a=n(6122),s=n(8094);const l={KINDLY_GPT:"kindly-gpt"},c={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,startOverText:"Start over",placeholder:"",typingIndicator:!1,isTyping:!1,typingType:void 0,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,isTextDirectionRtl:!1,welcomePage:null,welcomePageType:r.Lb.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0,replyInQueueEnabled:!0},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case a.CB:return{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case i.A8:var n;return{...e,isTyping:e.typingIndicator,typingType:null===(n=t.data)||void 0===n?void 0:n.type};case i.wk:return{...e,isTyping:!1,typingType:void 0};case s.tq:return{...e,hasInteraction:!0,splitLabelTimestamp:Date.now()};case a.M2:{var r;const n=null===(r=t.payload)||void 0===r?void 0:r.code;return{...e,isTextDirectionRtl:(0,o.A)(n)}}default:return e}}},8130:(e,t,n)=>{"use strict";var r=n(8146);e.exports=function(e){return r(e.length)}},8137:e=>{"use strict";e.exports=function(){}},8141:(e,t,n)=>{"use strict";var r=n(3753);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},8146:(e,t,n)=>{"use strict";var r=n(9903),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},8191:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r,W$:()=>o,dT:()=>s,fl:()=>a,gH:()=>i});const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","nudge"]),i="chat-group",a="message-block",s="typing-indicator"},8256:(e,t,n)=>{"use strict";n.d(t,{B$:()=>c,Bu:()=>d,TA:()=>u,W7:()=>s,aO:()=>a});var r=n(5352),o=n(4518);const i=["Bytes","kB","MB","GB"],a=1024,s=10*a,l=30*a,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=Math.floor(Math.log(e)/Math.log(a));return`${parseFloat((e/a**n).toFixed(t))} ${i[n]}`},u=e=>new Promise((t,n)=>{const i=e.size/a,u=(0,o.A)(e)===r.sl.VIDEO,d=u?l:s;if(i>d)return void n(new Error(`The ${u?"video":"image"} must be less than ${c(d)}`));const f=new FileReader;f.readAsDataURL(e),f.onload=()=>t({url:f.result,file:e,sizeKb:i,name:e.name,type:e.type,status:r.Le.PROCESSING,sender:r.bS.USER}),f.onabort=()=>n(new Error(f.error))}),d=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))})},8278:(e,t,n)=>{"use strict";n.d(t,{$P:()=>s,Cv:()=>o,DZ:()=>h,FI:()=>l,G0:()=>g,Hk:()=>f,MA:()=>r,Od:()=>a,cA:()=>c,o3:()=>d,qV:()=>p,uF:()=>i,uO:()=>u,zD:()=>m});const r=e=>{let{agent:t}=e;return t},o=e=>{let{alerts:t}=e;return t},i=e=>{let{announcement:t}=e;return t},a=e=>{let{bot:t}=e;return t},s=e=>{let{chatbubble:t}=e;return t},l=e=>{let{connection:t}=e;return t},c=e=>{let{environment:t}=e;return t},u=e=>{let{messages:{forms:t}}=e;return t},d=e=>{let{chatbubble:{globalIconsState:t}}=e;return t},f=e=>{let{inChatNotification:t}=e;return t},p=e=>{let{inspector:t}=e;return t},h=e=>{let{messages:t}=e;return t},g=e=>{let{nudge:t}=e;return t},m=e=>{let{pushMessages:t}=e;return t}},8293:(e,t,n)=>{"use strict";n(4531)("asyncDispose")},8317:(e,t,n)=>{"use strict";n.d(t,{Du:()=>s,Mb:()=>c,cL:()=>l,mw:()=>u});var r=n(5352),o=n(9990),i=n(8833),a=n(6885);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&t({type:a.nz,...n})},l=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:s}}=t();e((0,i.et)(`${s}/chatbubble/${r.Ak}/takeover_cancel/`,{method:"POST",...(0,o.A)({token:n})})),e({type:a.MM})},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:s}}=t();e({type:a.c6}),e((0,i.et)(`${s}/chatbubble/${r.Ak}/user_started_typing/`,{method:"POST",...(0,o.A)({token:n})}))},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:s}}=t();e({type:a.we}),e((0,i.et)(`${s}/chatbubble/${r.Ak}/user_stopped_typing/`,{method:"POST",...(0,o.A)({token:n})}))}},8341:(e,t,n)=>{"use strict";n(7603);var r=n(2856);e.exports=r("Array","includes")},8364:(e,t,n)=>{"use strict";var r=n(8600),o=n(9683);e.exports=Object.keys||function(e){return r(e,o)}},8395:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7133),o=n(7636);const i=(e,t,n,i)=>{const a=[o.A,e=>((e,t,n,o)=>{let{attachment_ids:i=[],...a}=e;return{...a,attachments:(i||[]).map(e=>{return t.find((n=e,function(){let{id:e,temporaryId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return e===n||t===n}));var n}).filter(e=>void 0!==e).map(e=>({...e,url:(0,r.l)(e,n,o)}))}})(e,t,n,i)];return a.reduce((e,t)=>t(e),e||{})}},8407:(e,t,n)=>{"use strict";var r=n(4904),o=n(2769),i=n(9932),a=n(8655)("toStringTag"),s=Object,l="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?n:l?i(t):"Object"===(r=i(t))&&o(t.callee)?"Arguments":r}},8417:(e,t,n)=>{"use strict";var r,o,i,a=n(1314),s=n(8900),l=n(262),c=n(3999),u=n(701),d=n(3753),f=n(4275),p=n(5241),h="Object already initialized",g=s.TypeError,m=s.WeakMap;if(a||d.state){var b=d.state||(d.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new g(h);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},i=function(e){return b.has(e)}}else{var v=f("state");p[v]=!0,r=function(e,t){if(u(e,v))throw new g(h);return t.facade=e,c(e,v,t),t},o=function(e){return u(e,v)?e[v]:{}},i=function(e){return u(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return n}}}},8418:(e,t,n)=>{"use strict";n.d(t,{ot:()=>_,Dz:()=>A,n_:()=>w,Ay:()=>T,WG:()=>y,CJ:()=>b,ZG:()=>E,GY:()=>C,wm:()=>x,zp:()=>S,m9:()=>k});var r=n(9749),o=n.n(r);var i=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var a="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function s(){return{s:0,v:void 0,o:null,p:null}}function l(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=0;function l(){let t=n;const{length:l}=arguments;for(let e=0,n=l;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=s(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=s(),e.set(n,t)):t=r}}const c=t;let u;if(1===t.s)u=t.v;else if(u=e.apply(null,arguments),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,u)&&(u=e,0!==i&&i--),o="object"==typeof u&&null!==u||"function"==typeof u?new a(u):u}return c.s=1,c.v=u,u}return l.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},s=e.pop();"object"==typeof s&&(a=s,s=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...n,...a},{memoize:u,memoizeOptions:d=[],argsMemoize:f=l,argsMemoizeOptions:p=[],devModeChecks:h={}}=c,g=i(d),m=i(p),b=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=u(function(){return r++,s.apply(null,arguments)},...g),y=f(function(){o++;const e=function(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(b,arguments);return t=v.apply(null,e),t},...m);return Object.assign(y,{resultFunc:s,memoizedResultFunc:v,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var u=c(l),d=Object.assign((e,t=u)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>d}),f=n(7251),p=n(6122),h=n(6606),g=n(9245);const m={feedbacksAlreadyDisplayed:[],feedbackToSubmit:null},b=u([e=>e.feedback.feedbacksAlreadyDisplayed,e=>e.feedback.feedbackToSubmit],(e,t)=>({feedbacksAlreadyDisplayed:e,feedbackToSubmit:t})),v=(0,f.Z0)({name:"feedback",initialState:m,reducers:{initializeFeedback:(e,t)=>{var n;e.feedbackToSubmit={id:null,rating_system:t.payload.ratingSystem,trigger_type:t.payload.triggerType,form_title:t.payload.formTitle,currentStep:t.payload.step,timeout:t.payload.timeout,feedback_trigger_by:"default",index:null,rating:null,sentiment:null,buttons_chosen:[],freeform_text:null},o()(n=e.feedbacksAlreadyDisplayed).call(n,t.payload.triggerType)||e.feedbacksAlreadyDisplayed.push(t.payload.triggerType)},setRating:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=t.payload.index,e.feedbackToSubmit.rating=t.payload.rating,e.feedbackToSubmit.sentiment=t.payload.sentiment,e.feedbackToSubmit.buttons_chosen=[])},clearRating:e=>{e.feedbackToSubmit&&(e.feedbackToSubmit.index=null,e.feedbackToSubmit.rating=null,e.feedbackToSubmit.sentiment=null)},toggleCommentButton:(e,t)=>{if(!e.feedbackToSubmit)return;const{buttons_chosen:n}=e.feedbackToSubmit;o()(n).call(n,t.payload)?e.feedbackToSubmit.buttons_chosen=n.filter(e=>e!==t.payload):n.push(t.payload)},setFreeformText:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.freeform_text=t.payload)},setStep:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.currentStep=t.payload)},setFeedbackTriggerBy:(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.feedback_trigger_by=t.payload)},clearFeedbackToSubmit:e=>{e.feedbackToSubmit=null},clearFeedbacksAlreadyDisplayed:e=>{e.feedbacksAlreadyDisplayed=[]}},extraReducers:e=>{e.addCase(g.S.fulfilled,(e,t)=>{e.feedbackToSubmit&&(e.feedbackToSubmit.id=t.payload)}),e.addCase(g.S.rejected,e=>{e.feedbackToSubmit=null}),e.addMatcher(e=>{var t;return o()(t=[p.CB,h.n]).call(t,e.type)},()=>m)}}),{initializeFeedback:y,setRating:x,clearRating:w,toggleCommentButton:k,setFreeformText:C,setStep:S,clearFeedbackToSubmit:_,clearFeedbacksAlreadyDisplayed:A,setFeedbackTriggerBy:E}=v.actions,T=v.reducer},8448:(e,t,n)=>{"use strict";n(4531)("customMatcher")},8600:(e,t,n)=>{"use strict";var r=n(6100),o=n(701),i=n(3273),a=n(1005).indexOf,s=n(5241),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,u=[];for(n in r)!o(s,n)&&o(r,n)&&l(u,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(u,n)||l(u,n));return u}},8639:(e,t,n)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch((0,i.default)(e)){case"void":return function(e){return e};case"string":return function(t){return(0,o.default)(t,[e])};case"array":return function(t){return(0,o.default)(t,e)};default:return console.error("Invalid paths argument, should be of type String, Array or Void")}};var o=r(n(4517)),i=r(n(4399));e.exports=t.default},8655:(e,t,n)=>{"use strict";var r=n(8900),o=n(8141),i=n(701),a=n(1268),s=n(4603),l=n(7460),c=r.Symbol,u=o("wks"),d=l?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(u,e)||(u[e]=s&&i(c,e)?c[e]:d("Symbol."+e)),u[e]}},8663:(e,t,n)=>{"use strict";function r(e,t,n){return o(e)?n:t}function o(e){let t=e;s(e)&&(t=function(e){const t=e.indexOf(",")>-1?",":" ";let n=(+(e=e.substr(4).split(")")[0].split(t))[0]).toString(16),r=(+e[1]).toString(16),o=(+e[2]).toString(16);return 1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),1===o.length&&(o=`0${o}`),`#${n}${r}${o}`}(e)),l(e)&&(t=i(e));const n="#"===t.charAt(0)?t.substring(1,7):t,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4);return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179}function i(e){return e.replace(a,(e,t,n,r)=>`#${t}${t}${n}${n}${r}${r}`)}n.d(t,{J7:()=>c,SW:()=>o,w5:()=>r});const a=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,s=e=>e.match(/^rgb/),l=e=>e.match(a);function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:120;const r=u(e),o=u(t);return Math.sqrt((r[0]-o[0])**2+(r[1]-o[1])**2+(r[2]-o[2])**2)<=n}function u(e){if(s(e))return e.match(/\d+/g).map(Number);let t="#"===e.charAt(0)?e.substring(1):e;return l(e)&&(t=i(t).substring(1)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}},8668:(e,t,n)=>{"use strict";n.d(t,{A:()=>Qe});var r,o="user-agent",i="",a="function",s="object",l="string",c="undefined",u="browser",d="cpu",f="device",p="engine",h="os",g="result",m="name",b="type",v="vendor",y="version",x="architecture",w="major",k="model",C="console",S="mobile",_="tablet",A="smarttv",E="wearable",T="xr",j="embedded",I="inapp",O="brands",L="formFactors",P="fullVersionList",N="platform",M="platformVersion",z="bitness",R="sec-ch-ua",$=R+"-full-version-list",D=R+"-arch",F=R+"-"+z,B=R+"-form-factors",H=R+"-"+S,U=R+"-"+k,V=R+"-"+N,W=V+"-version",G=[O,P,S,k,N,M,x,L,z],q="Amazon",K="Apple",Y="ASUS",X="BlackBerry",Q="Google",Z="Huawei",J="Lenovo",ee="Honor",te="LG",ne="Microsoft",re="Motorola",oe="Nvidia",ie="OnePlus",ae="OPPO",se="Samsung",le="Sharp",ce="Sony",ue="Xiaomi",de="Zebra",fe="Chrome",pe="Chromium",he="Chromecast",ge="Edge",me="Firefox",be="Opera",ve="Facebook",ye="Sogou",xe="Mobile ",we=" Browser",ke="Windows",Ce=typeof window!==c&&window.navigator?window.navigator:void 0,Se=Ce&&Ce.userAgentData?Ce.userAgentData:void 0,_e=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ae=function(e,t){if(typeof e===s&&e.length>0){for(var n in e)if(Ie(t)==Ie(e[n]))return!0;return!1}return!!Te(e)&&Ie(t)==Ie(e)},Ee=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Ee(e[n])},Te=function(e){return typeof e===l},je=function(e){if(e){for(var t=[],n=Pe(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var o=Me(n[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Me(n[r]);return t}},Ie=function(e){return Te(e)?e.toLowerCase():e},Oe=function(e){return Te(e)?Pe(/[^\d\.]/g,e).split(".")[0]:void 0},Le=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==s&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Pe=function(e,t){return Te(t)?t.replace(e,i):t},Ne=function(e){return Pe(/\\?\"/g,e)},Me=function(e,t){return e=Pe(/^\s\s*/,String(e)),typeof t===c?e:e.substring(0,t)},ze=function(e,t){if(e&&t)for(var n,r,o,i,l,c,u=0;u<t.length&&!l;){var d=t[u],f=t[u+1];for(n=r=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e))for(o=0;o<f.length;o++)c=l[++r],typeof(i=f[o])===s&&i.length>0?2===i.length?typeof i[1]==a?this[i[0]]=i[1].call(this,c):this[i[0]]=i[1]:i.length>=3&&(typeof i[1]!==a||i[1].exec&&i[1].test?3==i.length?this[i[0]]=c?c.replace(i[1],i[2]):void 0:4==i.length?this[i[0]]=c?i[3].call(this,c.replace(i[1],i[2])):void 0:i.length>4&&(this[i[0]]=c?i[3].apply(this,[c.replace(i[1],i[2])].concat(i.slice(4))):void 0):i.length>3?this[i[0]]=c?i[1].apply(this,i.slice(2)):void 0:this[i[0]]=c?i[1].call(this,c,i[2]):void 0):this[i]=c||void 0;u+=2}},Re=function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Ae(t[n][r],e))return"?"===n?void 0:n}else if(Ae(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},$e={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},De={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Fe={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[m,xe+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[y,[m,ge+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,y],[/opios[\/ ]+([\w\.]+)/i],[y,[m,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[m,be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[m,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[m,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[m,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[m,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[m,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[m,"Smart "+J+we]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure"+we],y],[/\bfocus\/([\w\.]+)/i],[y,[m,me+" Focus"]],[/ mms\/([\w\.]+)$/i],[y,[m,be+" Neon"]],[/ opt\/([\w\.]+)$/i],[y,[m,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[m,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[m,"MIUI"+we]],[/fxios\/([\w\.-]+)/i],[y,[m,xe+me]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[m,"360"]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+we],y],[/samsungbrowser\/([\w\.]+)/i],[y,[m,se+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[m,ye+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,ye+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[m,y],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[m],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,ve],y,[b,I]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[m,y,[b,I]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[m,"GSA"],[b,I]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[y,[m,"TikTok"],[b,I]],[/\[(linkedin)app\]/i],[m,[b,I]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[m,/(.+)/,"Zalo"],y,[b,I]],[/(chromium)[\/ ]([-\w\.]+)/i],[m,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[m,fe+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[y,[m,ge+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,fe+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[m,"Android"+we]],[/chrome\/([\w\.]+) mobile/i],[y,[m,xe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[m,xe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[m,xe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[m,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[m,xe+me],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[m,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[m,me+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[m,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[y,/[^\d\.]+./,i]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[x,/ower/,i,Ie]],[/mc680.0/i],[[x,"68k"]],[/winnt.+\[axp/i],[[x,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[k,[v,se],[b,_]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[k,[v,se],[b,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[k,[v,K],[b,S]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[k,[v,K],[b,_]],[/(macintosh);/i],[k,[v,K]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[k,[v,le],[b,S]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[k,[v,ee],[b,_]],[/honor([-\w ]+)[;\)]/i],[k,[v,ee],[b,S]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[k,[v,Z],[b,_]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[k,[v,Z],[b,S]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[k,/_/g," "],[v,ue],[b,_]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[k,/_/g," "],[v,ue],[b,S]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[k,[v,ie],[b,S]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[k,[v,ae],[b,S]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[k,[v,Re,{OnePlus:["203","304","403","404","413","415"],"*":ae}],[b,_]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[k,[v,"BLU"],[b,S]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[k,[v,"Vivo"],[b,S]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[k,[v,"Realme"],[b,S]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[k,[v,J],[b,_]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[k,[v,J],[b,S]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[k,[v,re],[b,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[k,[v,re],[b,_]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[k,[v,te],[b,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[k,[v,te],[b,S]],[/(nokia) (t[12][01])/i],[v,k,[b,_]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[k,/_/g," "],[b,S],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[k,[v,Q],[b,_]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[k,[v,Q],[b,S]],[/(google) (pixelbook( go)?)/i],[v,k],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[k,[v,ce],[b,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[k,"Xperia Tablet"],[v,ce],[b,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[k,[v,q],[b,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[k,/(.+)/g,"Fire Phone $1"],[v,q],[b,S]],[/(playbook);[-\w\),; ]+(rim)/i],[k,v,[b,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[k,[v,X],[b,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[k,[v,Y],[b,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[k,[v,Y],[b,S]],[/(nexus 9)/i],[k,[v,"HTC"],[b,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[k,/_/g," "],[b,S]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[k,[v,"TCL"],[b,_]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[k,[v,"TCL"],[b,S]],[/(itel) ((\w+))/i],[[v,Ie],k,[b,Re,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[k,[v,"Acer"],[b,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[k,[v,"Meizu"],[b,S]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[k,[v,"Ulefone"],[b,S]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[k,[v,"Energizer"],[b,S]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[k,[v,"Cat"],[b,S]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[k,[v,"Smartfren"],[b,S]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[k,[v,"Nothing"],[b,S]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[k,[v,"Archos"],[b,_]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[k,[v,"Archos"],[b,S]],[/; (n159v)/i],[k,[v,"HMD"],[b,S]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,k,[b,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[v,k,[b,S]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,k,[b,_]],[/(surface duo)/i],[k,[v,ne],[b,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[k,[v,"Fairphone"],[b,S]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[k,[v,oe],[b,_]],[/(sprint) (\w+)/i],[v,k,[b,S]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[v,ne],[b,S]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[k,[v,de],[b,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[k,[v,de],[b,S]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[v,[b,A]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[v,se],[b,A]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,k,[b,A]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,te],[b,A]],[/(apple) ?tv/i],[v,[k,K+" TV"],[b,A]],[/crkey.*devicetype\/chromecast/i],[[k,he+" Third Generation"],[v,Q],[b,A]],[/crkey.*devicetype\/([^/]*)/i],[[k,/^/,"Chromecast "],[v,Q],[b,A]],[/fuchsia.*crkey/i],[[k,he+" Nest Hub"],[v,Q],[b,A]],[/crkey/i],[[k,he],[v,Q],[b,A]],[/(portaltv)/i],[k,[v,ve],[b,A]],[/droid.+aft(\w+)( bui|\))/i],[k,[v,q],[b,A]],[/(shield \w+ tv)/i],[k,[v,oe],[b,A]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[k,[v,le],[b,A]],[/(bravia[\w ]+)( bui|\))/i],[k,[v,ce],[b,A]],[/(mi(tv|box)-?\w+) bui/i],[k,[v,ue],[b,A]],[/Hbbtv.*(technisat) (.*);/i],[v,k,[b,A]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",Re,{LG:"lge"}],[k,Me],[b,A]],[/(playstation \w+)/i],[k,[v,ce],[b,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[k,[v,ne],[b,C]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[v,Re,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],k,[b,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[k,[v,se],[b,E]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,k,[b,E]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[k,[v,ae],[b,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[k,[v,K],[b,E]],[/(opwwe\d{3})/i],[k,[v,ie],[b,E]],[/(moto 360)/i],[k,[v,re],[b,E]],[/(smartwatch 3)/i],[k,[v,ce],[b,E]],[/(g watch r)/i],[k,[v,te],[b,E]],[/droid.+; (wt63?0{2,3})\)/i],[k,[v,de],[b,E]],[/droid.+; (glass) \d/i],[k,[v,Q],[b,T]],[/(pico) ([\w ]+) os\d/i],[v,k,[b,T]],[/(quest( \d| pro)?s?).+vr/i],[k,[v,ve],[b,T]],[/mobile vr; rv.+firefox/i],[[b,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,j]],[/(aeobc)\b/i],[k,[v,q],[b,j]],[/(homepod).+mac os/i],[k,[v,K],[b,j]],[/windows iot/i],[[b,j]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[k,[b,A]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,A]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[k,[b,Re,{mobile:"Mobile",xr:"VR","*":_}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,S]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[k,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[m,ge+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[m,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[m,y],[/ladybird\//i],[[m,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,m]],os:[[/(windows nt) (6\.[23]); arm/i],[[m,/N/,"R"],[y,Re,$e]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[m,y],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[y,/(;|\))/g,"",Re,$e],[m,ke]],[/(windows ce)\/?([\d\.]*)/i],[m,y],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[m,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[m,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[m,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[m,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[m,he+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[m,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[y,m],[/(ubuntu) ([\w\.]+) like android/i],[[m,/(.+)/,"$1 Touch"],y],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[m,y],[/\(bb(10);/i],[y,[m,X]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[y,[m,me+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[y,[m,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[y,Re,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[m,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,"Chrome OS"],y],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[m,y],[/(sunos) ?([\d\.]*)/i],[[m,"Solaris"],y],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,y]]},He=(Le.call((r={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[u,[m,y,w,b]],[d,[x]],[f,[b,k,v]],[p,[m,y]],[h,[m,y]]]),Le.call(r.isIgnore,[[u,[y,w]],[p,[y]],[h,[y]]]),Le.call(r.isIgnoreRgx,[[u,/ ?browser$/i],[h,/ ?os$/i]]),Le.call(r.toString,[[u,[m,y]],[d,[x]],[f,[v,k]],[p,[m,y]],[h,[m,y]]]),r),Ue=function(e,t){var n=He.init[t],r=He.isIgnore[t]||0,o=He.isIgnoreRgx[t]||0,a=He.toString[t]||0;function s(){Le.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Se?Se.getHighEntropyValues(G).then(function(t){return e.setCH(new Ve(t,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=g&&(s.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Ae(r,n)&&Ie(o?Pe(o,this[n]):this[n])==Ie(o?Pe(o,e):e)){if(t=!0,e!=c)break}else if(e==c&&t){t=!t;break}return t},s.prototype.toString=function(){var e=i;for(var t in a)typeof this[a[t]]!==c&&(e+=(e?" ":i)+this[a[t]]);return e||c}),s.prototype.then=function(e){var t=this,n=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};n.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var r=new n;return e(r),r},new s};function Ve(e,t){if(e=e||{},Le.call(this,G),t)Le.call(this,[[O,je(e[R])],[P,je(e[$])],[S,/\?1/.test(e[H])],[k,Ne(e[U])],[N,Ne(e[V])],[M,Ne(e[W])],[x,Ne(e[D])],[L,je(e[B])],[z,Ne(e[F])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==c&&(this[n]=e[n])}function We(e,t,n,r){return Le.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",Ue(this,e)]]),this}function Ge(e,t,n){if(typeof e===s?(Ee(e,!0)?(typeof t===s&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==l||Ee(t,!0)||(n=t,t=void 0),n)if(typeof n.append===a){var r={};n.forEach(function(e,t){r[String(t).toLowerCase()]=e}),n=r}else{var c={};for(var m in n)n.hasOwnProperty(m)&&(c[String(m).toLowerCase()]=n[m]);n=c}if(!(this instanceof Ge))return new Ge(e,t,n).getResult();var b=typeof e===l?e:n&&n[o]?n[o]:Ce&&Ce.userAgent?Ce.userAgent:i,v=new Ve(n,!0),y=t?function(e,t){var n={},r=t;if(!Ee(t))for(var o in r={},t)for(var i in t[o])r[i]=t[o][i].concat(r[i]?r[i]:[]);for(var a in e)n[a]=r[a]&&r[a].length%2==0?r[a].concat(e[a]):e[a];return n}(Be,t):Be,x=function(e){return e==g?function(){return new We(e,b,y,v).set("ua",b).set(u,this.getBrowser()).set(d,this.getCPU()).set(f,this.getDevice()).set(p,this.getEngine()).set(h,this.getOS()).get()}:function(){return new We(e,b,y[e],v).parseUA().get()}};return Le.call(this,[["getBrowser",x(u)],["getCPU",x(d)],["getDevice",x(f)],["getEngine",x(p)],["getOS",x(h)],["getResult",x(g)],["getUA",function(){return b}],["setUA",function(e){return Te(e)&&(b=Me(e,500)),this}]]).setUA(b),this}We.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},We.prototype.set=function(e,t){return this.data[e]=t,this},We.prototype.setCH=function(e){return this.uaCH=e,this},We.prototype.detectFeature=function(){if(Ce&&Ce.userAgent==this.ua)switch(this.itemType){case u:Ce.brave&&typeof Ce.brave.isBrave==a&&this.set(m,"Brave");break;case f:!this.get(b)&&Se&&Se[S]&&this.set(b,S),"Macintosh"==this.get(k)&&Ce&&typeof Ce.standalone!==c&&Ce.maxTouchPoints&&Ce.maxTouchPoints>2&&this.set(k,"iPad").set(b,_);break;case h:!this.get(m)&&Se&&Se[N]&&this.set(m,Se[N]);break;case g:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(u,t(u)).set(d,t(d)).set(f,t(f)).set(p,t(p)).set(h,t(h))}return this},We.prototype.parseUA=function(){switch(this.itemType!=g&&ze.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(w,Oe(this.get(y)));break;case h:if("iOS"==this.get(m)&&"18.6"==this.get(y)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(y,e[1])}}return this},We.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case p:var n,r=e[P]||e[O];if(r)for(var o=0;o<r.length;o++){var i=r[o].brand||r[o],a=r[o].version;this.itemType==u&&!/not.a.brand/i.test(i)&&(!n||/Chrom/.test(n)&&i!=pe||n==ge&&/WebView2/.test(i))&&(i=Re(i,Fe),(n=this.get(m))&&!/Chrom/.test(n)&&/Chrom/.test(i)||this.set(m,i).set(y,a).set(w,Oe(a)),n=i),this.itemType==p&&i==pe&&this.set(y,a)}break;case d:var s=e[x];s&&(s&&"64"==e[z]&&(s+="64"),ze.call(this.data,s+";",t));break;case f:if(e[S]&&this.set(b,S),e[k]&&(this.set(k,e[k]),!this.get(b)||!this.get(v))){var l={};ze.call(l,"droid 9; "+e[k]+")",t),!this.get(b)&&l.type&&this.set(b,l.type),!this.get(v)&&l.vendor&&this.set(v,l.vendor)}if(e[L]){var c;if("string"!=typeof e[L])for(var C=0;!c&&C<e[L].length;)c=Re(e[L][C++],De);else c=Re(e[L],De);this.set(b,c)}break;case h:var _=e[N];if(_){var A=e[M];_==ke&&(A=parseInt(Oe(A),10)>=13?"11":"10"),this.set(m,_).set(y,A)}this.get(m)==ke&&"Xbox"==e[k]&&this.set(m,"Xbox").set(y,void 0);break;case g:var E=this.data,T=function(t){return E[t].getItem().setCH(e).parseCH().get()};this.set(u,T(u)).set(d,T(d)).set(f,T(f)).set(p,T(p)).set(h,T(h))}return this},Ge.VERSION="2.0.8",Ge.BROWSER=_e([m,y,w,b]),Ge.CPU=_e([x]),Ge.DEVICE=_e([k,v,b,C,S,A,_,E,j]),Ge.ENGINE=Ge.OS=_e([m,y]);const qe=Ge(),Ke=qe.withFeatureCheck(),Ye=Ke instanceof Promise;if(Ye){const e=new Error("ua-parser-js withFeatureCheck returned a Promise, which is not supported in this context.");setTimeout(()=>{throw e},0)}const Xe=Ye?Ke:qe,Qe=()=>"mobile"===(null==Xe?void 0:Xe.device.type)||"tablet"===(null==Xe?void 0:Xe.device.type)},8684:(e,t,n)=>{"use strict";var r=n(3395);n(85),e.exports=r},8689:(e,t,n)=>{"use strict";n.d(t,{jE:()=>r,vK:()=>i,ye:()=>o});const r="PATTERN_CONTEXT_MATCH",o="SET_INSPECTED_CHAT_MESSAGE",i="TOGGLE_INSPECTOR"},8696:(e,t,n)=>{"use strict";var r=n(1203),o=n(2769),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},8749:(e,t,n)=>{"use strict";n(4531)("hasInstance")},8787:(e,t,n)=>{"use strict";n.d(t,{AF:()=>c,L9:()=>s,Mo:()=>a,sF:()=>i,uh:()=>l});var r=n(1197),o=n(8663);const i=()=>"\n #chatContainer:not(.using-tab) & {\n outline: none;\n }\n",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return`\n background: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n background-color: ${(0,o.w5)(e,`rgba(255, 255, 255, ${t})`,`rgba(0, 0, 0, ${t})`)};\n`},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;const n=parseInt(e,10);return n<t?Math.ceil(t/n*100):100},l=(0,r.AH)(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;"]),c=(0,r.AH)(["background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;"])},8803:(e,t,n)=>{var r=n(4665);e.exports=function(e,t,n){return e.set(r(e,t),n),n},e.exports.__esModule=!0,e.exports.default=e.exports},8805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ys});var r=n(9155),o=n.n(r),i=n(1197),a=n(1708);const s=i.Ay.div.withConfig({componentId:"sc-164l1vq-0"})(["font-size:var(--_kindlychat-font-size-m);text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100%;z-index:",";pointer-events:auto;@media ","{max-height:unset;}",""],e=>e.$zIndex+5,a.jO.maxTablet,e=>{let{$inspectorOpen:t}=e;return t&&"display: flex; flex-direction: row-reverse;"});var l=n(5352),c=n(541),u=n(8278);const d=i.Ay.div.withConfig({componentId:"sc-huyjcb-0"})(["margin:20px;display:flex;flex-direction:column;"]),f=i.Ay.hr.withConfig({componentId:"sc-huyjcb-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),p=i.Ay.button.withConfig({componentId:"sc-huyjcb-2"})(["text-align:center;margin:5px 5px 0 5px;background:rgb(243,243,244);border:1px solid rgb(243,243,244);font-weight:600;padding:7px 16px;border-radius:5px;cursor:pointer;outline:none;&:hover{background:rgb(230,230,230);}&:disabled{background:white;color:rgb(206,206,206);border-color:rgb(206,206,206);cursor:default;}"]),h=i.Ay.div.withConfig({componentId:"sc-huyjcb-3"})(["display:flex;align-items:baseline;font-size:calc(var(--_kindlychat-font-size-sm) * 1.067);",""],e=>{let{$spaceBetween:t}=e;return t?"justify-content: space-between;":""}),g=i.Ay.div.withConfig({componentId:"sc-huyjcb-4"})(["padding:1px 3px;border-radius:3px;font-size:var(--_kindlychat-font-size-sm);margin-right:5px;background:rgba(255,74,156,0.25);"]),m=i.Ay.span.withConfig({componentId:"sc-huyjcb-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),b=(i.Ay.span.withConfig({componentId:"sc-huyjcb-6"})(["margin:0 5px;color:gray;"]),i.Ay.div.withConfig({componentId:"sc-huyjcb-7"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:var(--_kindlychat-font-size-sm);margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{$filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""})),v=i.Ay.a.withConfig({componentId:"sc-huyjcb-8"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]);var y=n(5394),x=n(8668);const w=(0,i.i7)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),k=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(),w),C=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),S=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(),C),_=(0,i.AH)(["bottom:0px;right:0px;"]),A=(0,i.AH)(["width:100%;height:100%;max-height:unset;min-height:320px;",";border-radius:0;visibility:",";"],_,e=>{let{$active:t}=e;return t?"visible":"hidden"}),E=(0,i.AH)(["max-height:",";height:",";width:",";"],e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"645px"},e=>{let{$fullscreen:t}=e;return t?"100%":"360px"}),T=(0,i.AH)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>{let{$offsetHeight:t}=e;return t||0}),j=(0,i.AH)([""," "," ",""],e=>{let{$fullscreen:t}=e;return t?_:T},e=>{let{$active:t}=e;return t?E:(0,y.vW)()},e=>{let{$fullscreen:t,$chatHasStarted:n,$active:r}=e;return!t&&!n&&(e=>{let{$active:t}=e;return t?k:S})({$active:r})}),I=(0,i.AH)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;> &:last-child{margin:auto 20px 20px;}"]),O=i.Ay.div.withConfig({componentId:"sc-4u7nsm-0"})(["display:flex;z-index:20;overflow:hidden;flex-direction:column;box-shadow:",";background:",";",";"," @media ","{",";}",""],a.FR.level2,e=>{let{theme:t}=e;return t.background},j,e=>{let{$inspectorContainer:t}=e;return t&&I},a.jO.maxTablet,A,(0,x.A)()&&A);var L=n(8048),P=n(1085);const N=()=>{};function M(){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(d,{children:(0,P.jsx)(L.H5,{children:"No messages yet!"})}),(0,P.jsxs)(h,{$spaceBetween:!0,children:[(0,P.jsx)(p,{disabled:!0,onClick:N,children:"Show previous"}),(0,P.jsx)(p,{disabled:!0,onClick:N,children:"Show next"})]})]})}function z(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return(0,P.jsxs)(d,{children:[(0,P.jsx)(L.H5,{children:"Slot / Pattern context"}),(0,P.jsxs)(h,{children:[(0,P.jsx)(g,{children:n}),(0,P.jsx)("span",{children:r})]})]})}var R=n(8787);const $=i.Ay.span.withConfig({componentId:"sc-1jsyulb-0"})(["",""],R.uh);function D(){return(0,P.jsx)($,{children:"(opens in a new tab)"})}const F=function(e){let{children:t,url:n}=e;return n?(0,P.jsxs)(v,{target:"_blank",rel:"noopener noreferrer",href:n,children:[t,(0,P.jsx)(D,{})]}):t};function B(e){let{botId:t,dialogueType:n,dialogueId:r,children:o}=e;const i=function(e){let{botId:t,dialogueType:n,dialogueId:r}=e;return t&&n&&r?`/workspace/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`:null}({botId:t,dialogueType:n,dialogueId:r});return(0,P.jsx)(F,{url:i,children:(0,P.jsx)(h,{children:o})})}var H=n(9749),U=n.n(H);const{SAMPLE_MATCH:V,KEYWORD_EXACT_MATCH:W,KEYWORD_MENTION:G,PATTERN_MATCH:q,ZODIAC:K}=l.Gi,Y=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," "),X=e=>{switch(e){case V:case K:return"sample";case q:return"pattern";case W:case G:return"keyword";default:return Y(e)}};function Q(e){var t,n,r;let{handler:o,score:i,dialogueType:a,sender:s,fromWebhook:c,label:u}=e;return"string"==typeof u?(0,P.jsx)(b,{children:u}):o&&U()(t=[V,K]).call(t,o)&&i?(0,P.jsx)(b,{$filled:!0,title:"Confidence score",children:`${Math.round(100*i)} %`}):o&&U()(n=Object.values(l.Gi)).call(n,o)?(0,P.jsx)(b,{children:X(o)}):c?(0,P.jsx)(b,{children:"webhook"}):"string"==typeof a?(0,P.jsx)(b,{children:Y(a)}):s&&U()(r=Object.values(l.bS)).call(r,s)?(0,P.jsx)(b,{children:Y(s)}):null}function Z(e,t){return`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`}const J=40;function ee(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:i,message:a,dialogueType:s,dialogueId:l,botId:c,isFollowup:u,sender:f}=e;return(0,P.jsxs)(d,{children:[(0,P.jsx)(L.H5,{children:"Message info"}),t&&(0,P.jsxs)(h,{$spaceBetween:!0,children:[i&&(0,P.jsxs)(B,{botId:c,dialogueType:s,dialogueId:l,children:[(0,P.jsx)(m,{}),(0,P.jsx)("span",{children:Z(i,J)})]}),!i&&(0,P.jsx)("span",{children:Z(a,J)}),(0,P.jsxs)(h,{children:[(0,P.jsx)(Q,{handler:r,score:o,dialogueType:s,sender:f,fromWebhook:n}),u&&(0,P.jsx)(Q,{dialogueType:"followup"})]})]}),!t&&(0,P.jsxs)(h,{$spaceBetween:!0,children:[Z(a,J),(0,P.jsx)(Q,{label:"user"})]})]})}function te(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:i,from_bot:a,bot_id:s,from_webhook:l,exchange_type:c,exchange_id:u,is_followup:d,pattern_context_match:p}}=e;const h=Object.keys(p||{}).length>0;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ee,{handler:o,fromBot:a,fromWebhook:l,score:n,title:r,message:t,dialogueType:c,dialogueId:u,botId:s,isFollowup:d,sender:i}),(0,P.jsx)(f,{}),h&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(z,{patternContextMatch:p}),(0,P.jsx)(f,{})]})]})}var ne=n(9159),re=n(1304);function oe(){const{active:e,chatHasStarted:t}=(0,c.d4)(u.$P),{offsetHeight:n}=(0,c.d4)(u.Od),{currentMessage:o,nextMessage:i,prevMessage:a,isFirstMessage:s,isLastMessage:l}=function(){var e,t;const n=(0,c.wA)(),{chatMessages:o}=(0,c.d4)(u.DZ),{currentMessageId:i}=(0,c.d4)(u.qV),a=i||(null===(e=o.slice(-1)[0])||void 0===e?void 0:e.id),s=o.findIndex(e=>{let{id:t}=e;return t===a}),l=(0,r.useCallback)(()=>{n((0,re.F3)(o[s+1].id))},[o,s,n]),d=(0,r.useCallback)(()=>{n((0,re.F3)(o[s-1].id))},[o,s,n]),f=null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0,p=(0,ne.A)(f),h=0===s,g=s===f-1;return(0,r.useEffect)(()=>{f>p&&n((0,re.F3)())},[n,f,p]),{currentMessage:o[s],nextMessage:l,prevMessage:d,isFirstMessage:h,isLastMessage:g}}();return(0,P.jsxs)(O,{$chatHasStarted:t,$active:e,$fullscreen:!1,$offsetHeight:n,$inspectorContainer:!0,children:[o&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(te,{chatMessage:o}),(0,P.jsxs)(h,{$spaceBetween:!0,children:[(0,P.jsx)(p,{disabled:s,onClick:a,children:"Show previous"}),(0,P.jsx)(p,{disabled:l,onClick:i,children:"Show next"})]})]}),!o&&(0,P.jsx)(M,{})]})}var ie=n(8832);const ae=i.Ay.div.withConfig({componentId:"sc-14jyotv-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;transform-origin:top;display:flex;z-index:15;position:absolute;padding:0 10px;transform:",";transition:",";width:100%;top:55px;span{font-size:var(--_kindlychat-font-size-p);margin-right:7px;}"],a.Tj.shadowColor,a.Tj.warningColor,a.Tj.warningColor,e=>{let{$show:t}=e;return t?"scaleY(1)":"scaleY(0)"},e=>{let{$show:t}=e;return t?"transform 0.15s ease-in":"transform 0.15s ease-out"}),se=i.Ay.div.withConfig({componentId:"sc-14jyotv-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),le=(0,i.Ay)(ie.N_).withConfig({componentId:"sc-14jyotv-2"})(["color:#0063a2;"]);function ce(){const{text:e,url:t,show:n}=(0,c.d4)(u.uF);return n?(0,P.jsxs)(ae,{$show:n,children:[(0,P.jsxs)(se,{children:[(0,P.jsx)("span",{children:"!"}),e]}),t&&(0,P.jsxs)(le,{href:t,target:"_blank",children:["url",(0,P.jsx)(D,{})]})]}):null}var ue=n(9154),de=n(6739);const fe=e=>{if("number"==typeof e)return 10===e.toString().length&&(e*=1e3),new Date(e);if("string"==typeof e){const t=e.replace(/\s+/g,"T");return new Date(t)}return e instanceof Date?e:new Date(0)};function pe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";const r=fe(e),o=new Date,i=r.toDateString()===o.toDateString(),a=t||n||"en",s=(e,t)=>{const n=t?{hour:"2-digit",minute:"2-digit"}:{day:"numeric",month:"short"};return t?r.toLocaleTimeString(e,n):r.toLocaleDateString(e,n)};try{return s(a,i)}catch(e){return s(n,i)}}var he=n(8663);const ge=(0,i.i7)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),me=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(300),ge),be=(0,i.AH)(["flex-direction:row-reverse;"]),ve=(0,i.AH)(["flex-direction:row;"]),ye=(0,i.AH)(["background:#e3e3e7;padding:0 30px;margin:10px -30px;position:relative;&:before{content:'';position:absolute;background:rgb(153,153,153);width:4px;height:calc(100% + 20px);left:0;z-index:1;}&:after{content:'';position:absolute;display:inline-block;width:100%;height:20px;background:#e3e3e7;top:100%;left:0;}"]),xe=i.Ay.div.withConfig({componentId:"sc-drt5la-0"})(["",";",";&:nth-child(1){padding-top:10px;}"],e=>e.$fromBot?ve:be,e=>{let{$inspected:t}=e;return t&&ye}),we=i.Ay.span.withConfig({componentId:"sc-drt5la-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:center;opacity:0;margin-bottom:16px;",";@media (prefers-reduced-motion){animation:none;opacity:1;}"],me),ke=(0,i.Ay)(L.mt).withConfig({componentId:"sc-drt5la-2"})(["opacity:1;margin:0;color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")}),Ce=i.Ay.div.withConfig({componentId:"sc-drt5la-3"})(["display:block;width:100%;",""],e=>e.$isLastGroupMessage&&"margin-bottom: 16px;");function Se(e){let{fromBot:t,created:n,shouldShowTime:r,children:o,inspected:i,disclaimerComponent:a,isLastGroupMessage:s}=e;const{currentLanguageCode:c}=(0,de.A)();return(0,P.jsx)(xe,{$fromBot:t,$inspected:i,"data-testid":l.gH,children:(0,P.jsxs)(Ce,{$isLastGroupMessage:s,children:[a,r&&(0,P.jsx)(we,{children:(0,P.jsx)(ke,{children:pe(n,c)})}),o]})})}var _e=n(6865);function Ae(e){return(0,P.jsxs)("svg",{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,P.jsx)("title",{children:"Unsuccessful upload"}),(0,P.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,P.jsx)("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero",children:(0,P.jsx)("path",{d:"m1152 637.67v8.7867l-4-4.0133-5.3333 5.3467-5.3333-5.3333-5.3333 5.3333-4-4.0133v-6.1067c0-1.4667 1.2-2.6667 2.6667-2.6667h18.667c1.4667 0 2.6667 1.2 2.6667 2.6667zm-4 8.56 4 4.0133v6.0933c0 1.4667-1.2 2.6667-2.6667 2.6667h-18.667c-1.4667 0-2.6667-1.2-2.6667-2.6667v-8.7733l4 3.9867 5.3333-5.3333 5.3333 5.3333 5.3333-5.32z"})})})]})}function Ee(e){return(0,P.jsxs)("svg",{...e,version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("title",{children:"Loading image upload"}),(0,P.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,P.jsx)("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero",children:(0,P.jsxs)("g",{transform:"translate(685 659)",children:[(0,P.jsx)("path",{d:"m15.67 9.414c-0.12139-0.24299-0.36467-0.40135-0.636-0.414-0.27276-0.023426-0.53433 0.11351-0.6705 0.351l-3.2505 5.199-2.3325-2.331c-0.16117-0.15568-0.38102-0.23533-0.6045-0.219-0.22394 0.02231-0.42603 0.144-0.5505 0.3315l-3 4.5c-0.1548 0.23022-0.16988 0.52708-0.039197 0.7718 0.13068 0.24471 0.38578 0.3973 0.6632 0.39671h13.5c0.26005 0 0.50153-0.13472 0.63814-0.35599 0.13661-0.22127 0.14886-0.49752 0.032357-0.73001l-3.75-7.5z"}),(0,P.jsx)("path",{d:"m21 0h-18c-1.6569 0-3 1.3431-3 3v18c0 1.6569 1.3431 3 3 3h18c1.6569 0 3-1.3431 3-3v-18c0-1.6569-1.3431-3-3-3zm-18 21v-18h18v18h-18z"}),(0,P.jsx)("circle",{cx:"7.5",cy:"7.5",r:"1.5"})]})})})]})}var Te=n(9514),je=n(5880),Ie=n(1308);function Oe(e){let{color:t="black",...n}=e;return(0,P.jsxs)("svg",{...n,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"M12 4.75V6.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M17.1265 6.87347L16.0659 7.93413",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M19.25 12L17.75 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M17.1265 17.1265L16.0659 16.0659",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12 17.75V19.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M7.93413 16.0659L6.87347 17.1265",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M6.24997 12L4.74997 12",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M7.93413 7.93413L6.87347 6.87347",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Le=i.Ay.button.withConfig({componentId:"sc-19ca8jq-0"})(["position:absolute;top:24px;right:24px;border:1px solid rgba(0,0,0,0.2);background:rgba(255,255,255,0.8);border-radius:6px;padding:5px;box-shadow:0 2px 4px rgba(0,0,0,0.1);transition:all 0.2s ease;cursor:pointer;& svg{display:block;}"]),Pe=i.Ay.dialog.withConfig({componentId:"sc-19ca8jq-1"})(["all:unset;position:fixed;display:flex;inset:0;align-items:center;justify-content:center;&::backdrop{background:rgba(0,0,0,0.5);}"]),Ne=i.Ay.img.withConfig({componentId:"sc-19ca8jq-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]),Me=()=>{const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e)return;const t=[],n=[...e.getElementsByTagName("img")].filter(e=>!e.complete||!e.naturalWidth).map(e=>new Promise(n=>{t.push({img:e,resolver:n}),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return 0===n.length?o(!0):Promise.all(n).then(()=>{o(!0)}),()=>{t.forEach(e=>{let{img:t,resolver:n}=e;t.removeEventListener("load",n),t.removeEventListener("error",n)})}},[e]),[t,n]};var ze=n(5650),Re=n(7636);function $e(e){const{browserName:t}=function(){const{userAgent:e}=navigator;let t;return t=e.match(/chrome|chromium|crios/i)?"chrome":e.match(/firefox|fxios/i)?"firefox":e.match(/safari/i)?"safari":e.match(/opr\//i)?"opera":e.match(/edg/i)?"edge":"No browser detection",{browserName:t,userAgent:e}}();return e===t}const De="6px",Fe=()=>`\n /* If browser support backdrop-filter */\n ${$e("chrome")&&"\n background: rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(8px);\n opacity: 1;\n\n &:hover {\n background: rgba(255, 255, 255, 0.4);\n background-color: rgba(255, 255, 255, 0.4);\n\n + svg path {\n mix-blend-mode: unset;\n stroke: black;\n }\n }\n "}\n`,Be=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${$e("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,He=i.Ay.div.withConfig({componentId:"sc-1uha618-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:",";position:relative;width:100%;min-height:100px;"," background:#232F41;color:#fff;font-size:var(--_kindlychat-font-size-p);"],e=>{let{$hasCaption:t}=e;return t?`${De} ${De} 0 0`:De},e=>e.$imageHeight&&`height: ${e.$imageHeight}px;`),Ue=i.Ay.div.withConfig({componentId:"sc-1uha618-1"})(["position:relative;overflow:hidden;margin-left:-25px;width:calc(100% + 50px);> div{",";}"],e=>e.$active&&"\n position: relative;\n width: 100000%;\n display: flex;\n "),Ve=i.Ay.div.withConfig({componentId:"sc-1uha618-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:fit-content;margin-right:5px;margin-top:2px;margin-bottom:2px;border-radius:",";box-shadow:0px 2px 6px rgba(0,0,0,0.06);overflow:hidden;color:",";",";&::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0px 0px 1px rgba(0,0,0,0.32);border-radius:",";}"],e=>e.$imageWidth,De,a.qd.textColor,e=>{let{$first:t,$isCarousel:n}=e;return t||!n?"margin-left: 25px":""},De),We=(0,i.AH)(["position:relative;display:",";min-height:100px;",""],e=>e.hidden?"none":"block",e=>e.$isCarousel?`height: ${e.$imageHeight}px;`:"height: auto;"),Ge=i.Ay.a.withConfig({componentId:"sc-1uha618-3"})(["",""],We),qe=i.Ay.div.withConfig({componentId:"sc-1uha618-4"})(["",""],We),Ke=i.Ay.img.withConfig({componentId:"sc-1uha618-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;display:block;"," ",""],e=>e.$carousel&&e.$imageHeight&&e.$imageWidth?`\n height: ${e.$imageHeight}px; \n object-fit: cover; \n width: ${e.$imageWidth}px;\n `:"",R.sF),Ye=i.Ay.div.withConfig({componentId:"sc-1uha618-6"})(["background:",";> *:last-child{margin-bottom:8px;}"],e=>{let{theme:t}=e;return t.panelBackground}),Xe=i.Ay.h3.withConfig({componentId:"sc-1uha618-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:var(--_kindlychat-font-size-p);line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--panel-background-white-black-contrast-1743170834);"]),Qe=i.Ay.div.withConfig({componentId:"sc-1uha618-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:var(--_kindlychat-font-size-sm);line-height:16px;color:var(--panel-background-white-black-contrast-1743170834);white-space:pre-line;opacity:0.6;"]),Ze=i.Ay.button.withConfig({componentId:"sc-1uha618-9"})(["all:unset;position:relative;display:flex;height:35px;max-width:100%;font-size:var(--_kindlychat-font-size-p);align-items:center;justify-content:center;padding:4px 12px;color:var(--panel-background-white-black-contrast-1743170834);background-color:",";border-top:1px solid ",";font-weight:500;gap:6px;cursor:pointer;"," &:hover{filter:brightness(0.9);}> span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}svg{flex-shrink:0;& path{stroke:currentColor;}}&:focus-visible{&::after{content:'';position:absolute;inset:3px;outline:2px solid white;mix-blend-mode:difference;}}"],e=>{let{theme:t}=e;return t.panelBackground},e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{$inView:t}=e;return!t&&"opacity: 0.5;"}),Je=i.Ay.button.withConfig({componentId:"sc-1uha618-10"})(["position:absolute;top:50%;transform:translateY(-50%);background:#fff;background-color:#fff;border:none;width:36px;height:36px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 0 2px 0px;border-radius:100px;opacity:0.8;transition:all 0.2s ease;box-shadow:0px 2px 6px rgba(0,0,0,0.04);&:hover{opacity:1;}&:active{background-color:#efeeee;opacity:1;}"," "," ",";",""],R.sF,e=>{let{$next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{$disabled:t}=e;return t&&"display: none"},Fe),et=(0,i.Ay)(Ie.A6).withConfig({componentId:"sc-1uha618-11"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Be),tt=(0,i.Ay)(Ie.fl).withConfig({componentId:"sc-1uha618-12"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Be),nt=i.Ay.div.withConfig({componentId:"sc-1uha618-13"})(["position:absolute;left:",";bottom:",";background:#fff;display:flex;align-items:center;justify-content:center;width:24px;height:24px;opacity:0.8;border-radius:50%;pointer-events:none;",""],a.Nl.wrapper,a.Nl.wrapper,Fe),rt=(0,i.Ay)(Ie.qY).withConfig({componentId:"sc-1uha618-14"})(["bottom:",";left:",";",""],a.Nl.icon,a.Nl.icon,Be),ot=(0,i.Ay)(Ie.Gr).withConfig({componentId:"sc-1uha618-15"})(["position:relative;left:-2px;top:1px;"]),it=i.Ay.button.withConfig({componentId:"sc-1uha618-16"})(["display:",";position:absolute;top:",";right:",";width:24px;height:24px;align-items:center;justify-content:center;border-radius:2px;border:none;cursor:pointer;background:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.04);opacity:0.8;padding:0px 0 0 1px;"," &:hover{opacity:1;}",""],e=>e.$inView?"flex":"none",a.Nl.wrapper,a.Nl.wrapper,R.sF,Fe),at=(0,i.Ay)(Ie.gp).withConfig({componentId:"sc-1uha618-17"})(["top:",";right:",";",""],a.Nl.icon,a.Nl.icon,Be);function st(e){return(0,P.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,P.jsx)("path",{d:"M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z",stroke:"#333333",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}const lt=(0,i.i7)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),ct=((0,i.i7)(["from{max-height:200px;}to{max-height:0;overflow:hidden;}"]),i.Ay.div.withConfig({componentId:"sc-kwvd9-0"})(["background:none;will-change:transform,opacity,max-height;width:auto;display:grid;position:relative;grid-template-columns:37px auto 37px;@media (prefers-reduced-motion){animation:none;}"])),ut=i.Ay.div.withConfig({componentId:"sc-kwvd9-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;margin:8px 0px;padding:10px 8px;align-self:center;background:",";background-color:",";"],e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.$loadingType?"transparent":e.theme.botMessageBackground),dt=i.Ay.span.withConfig({componentId:"sc-kwvd9-2"})(["height:3px;width:3px;margin:0 2px;background:",";background-color:",";display:block;opacity:1;border-radius:100px;&:nth-of-type(1){animation:1s "," infinite 0.3s;}&:nth-of-type(2){animation:1s "," infinite 0.6s;}&:nth-of-type(3){animation:1s "," infinite 0.9s;}"],e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")},e=>{let{theme:t,$loadingType:n}=e;return"image"===n?"#fff":(0,he.w5)(t.botMessageBackground,"#FFF","#000")},lt,lt,lt),ft=i.Ay.div.withConfig({componentId:"sc-kwvd9-3"})(["font-size:var(--_kindlychat-font-size-sm);display:flex;flex-direction:row;align-items:center;line-height:16px;margin:3px auto 0;padding:0 8px;color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),pt=i.Ay.span.withConfig({componentId:"sc-kwvd9-4"})(["font-weight:500;"]),ht=i.Ay.span.withConfig({componentId:"sc-kwvd9-5"})(["display:flex;flex-direction:row;align-items:center;"]),gt=i.Ay.div.withConfig({componentId:"sc-kwvd9-6"})(["display:inline-block;"]);function mt(e){let{loadingType:t,text:n,botName:r}=e;return(0,P.jsxs)(ct,{"data-testid":l.dT,children:[(0,P.jsxs)(ut,{$loadingType:t,children:[(0,P.jsx)(dt,{$loadingType:t}),(0,P.jsx)(dt,{$loadingType:t}),(0,P.jsx)(dt,{$loadingType:t})]}),n&&(0,P.jsxs)(ft,{children:[(0,P.jsx)(ht,{children:(0,P.jsx)(st,{width:16,height:16})})," ",(0,P.jsxs)(gt,{children:[(0,P.jsx)(pt,{children:r})," ",n]})]})]})}function bt(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return(0,P.jsxs)(He,{title:"Loading image...",$imageWidth:t,$imageHeight:n?Number(n):void 0,$hasCaption:r,children:[(0,P.jsx)(mt,{loadingType:"image"}),(0,P.jsx)("div",{children:"Loading image"})]})}const vt=(0,i.i7)(["from{background-position:0%;}to{background-position:-200%;}"]),yt=i.Ay.div.withConfig({componentId:"sc-jo8x8h-0"})(["position:absolute;left:0;width:100%;top:0;height:100%;color:black;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:",";transition:opacity "," ease-out;div:first-child{height:100%;width:100%;position:absolute;background:",";background-size:200% 100%;animation:1.3s linear "," infinite 0s;opacity:0.5;}div:nth-child(2){height:100%;width:100%;position:absolute;background:white;opacity:",";}div:nth-child(3){z-index:1;}"],e=>{let{$finished:t}=e;return t?0:1},e=>{let{$hideTransitionLength:t}=e;return`${t}s`},"\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(255, 255, 255, 0.738) 9.5%,\n rgba(255, 255, 255, 0.541) 17%,\n rgba(255, 255, 255, 0.382) 23.5%,\n rgba(255, 255, 255, 0.278) 28.3%,\n rgba(255, 255, 255, 0.194) 32.5%,\n rgba(255, 255, 255, 0.126) 36.5%,\n rgba(255, 255, 255, 0.075) 40.1%,\n rgba(255, 255, 255, 0.042) 43.1%,\n rgba(255, 255, 255, 0.021) 45.5%,\n rgba(255, 255, 255, 0.008) 46.3%,\n rgba(255, 255, 255, 0.002) 49.3%,\n rgba(255, 255, 255, 0) 50%,\n rgba(255, 255, 255, 0.002) 50.7%,\n rgba(255, 255, 255, 0.008) 53.7%,\n rgba(255, 255, 255, 0.021) 54.5%,\n rgba(255, 255, 255, 0.042) 59.9%,\n rgba(255, 255, 255, 0.075) 61.7%,\n rgba(255, 255, 255, 0.126) 63.5%,\n rgba(255, 255, 255, 0.194) 67.5%,\n rgba(255, 255, 255, 0.278) 71.7%,\n rgba(255, 255, 255, 0.382) 76.5%,\n rgba(255, 255, 255, 0.541) 83%,\n rgba(255, 255, 255, 0.738) 90.5%,\n rgba(255, 255, 255, 1) 100%\n )\n",vt,e=>{let{$opacity:t}=e;return t}),xt=.3;function wt(e){let{loading:t,children:n,opacity:o=.6}=e;const[i,a]=(0,r.useState)(!t);return(0,r.useEffect)(()=>{i||t||setTimeout(()=>a(!0),1e3*xt)},[i,t]),i?null:(0,P.jsxs)(yt,{$finished:!t,$hideTransitionLength:xt,$opacity:o,children:[(0,P.jsx)("div",{}),(0,P.jsx)("div",{}),(0,P.jsx)("div",{children:n})]})}const kt={link:(0,P.jsx)(ot,{size:20}),dialogue_trigger:(0,P.jsx)(Oe,{})};function Ct(e){var t,n,o,i;let{image:a,first:s,isCarousel:d,fromBot:f,inView:p,imageWidth:h,imageHeight:g,loading:m}=e;const[b,v]=Me(),y=(0,c.wA)(),{chatMessages:x}=(0,c.d4)(u.DZ)||[],w=(0,c.d4)(u.$P)||[],[k,C]=(0,r.useState)(!1),S=(0,r.useRef)(null),_=h===l.T5[600],A=e=>t=>{const n=x.map(Re.A),r=n[n.length-1];(0,je.fz)({event:t,button:(0,ze.A)(e),buttonType:e.button_type,chatLog:n,lastMessage:r,renderedBy:null==w?void 0:w.renderedBy})||(y((0,re.Bd)(e,r)),"link"===e.button_type&&setTimeout(()=>window.open(e.value,"_blank"),500))},E=Boolean((null===(t=a.title)||void 0===t?void 0:t.trim())||(null===(n=a.description)||void 0===n?void 0:n.trim())),T=null!=a&&a.newTab?"_blank":"_self",j=a.buttons||[],I=a.description&&(null===(o=a.description)||void 0===o?void 0:o.length)>100?a.description.slice(0,100).concat("..."):a.description;return(0,r.useEffect)(()=>{var e,t;k&&(null===(e=S.current)||void 0===e||e.close(),null===(t=S.current)||void 0===t||t.showModal())},[k]),(0,P.jsxs)(P.Fragment,{children:[k&&(0,Te.createPortal)((0,P.jsxs)(Pe,{onClick:()=>C(!1),ref:S,children:[(0,P.jsx)(Le,{onClick:()=>C(!1),autoFocus:!0,children:(0,P.jsx)(Ie.US,{width:"30",height:"30"})}),(0,P.jsx)(Ne,{src:a.imageUrl})]}),((null===(i=window.kindlyChat)||void 0===i?void 0:i.shadowRoot)||window.document).getElementById("chatContainer")),(0,P.jsxs)(Ve,{$first:s,ref:b,$imageWidth:h,$imageHeight:g,$isCarousel:d,$fromBot:f,inert:p?void 0:"true",children:[(0,P.jsx)(wt,{loading:!!m,children:"Uploading"}),a.linkUrl?(0,P.jsxs)(Ge,{$imageWidth:h,$imageHeight:g,hidden:!v,href:a.linkUrl,target:T,$isCarousel:d,children:[(0,P.jsx)(Ke,{src:a.imageUrl,alt:a.altText,tabIndex:0,$carousel:d,$fromBot:f,$imageWidth:h,$imageHeight:g}),a.linkUrl&&(0,P.jsx)(nt,{}),a.linkUrl&&(0,P.jsx)(rt,{width:16,height:16})]}):(0,P.jsx)(qe,{$imageWidth:h,$imageHeight:g,hidden:!v,$isCarousel:d,children:(0,P.jsx)(Ke,{src:a.imageUrl,alt:a.altText,tabIndex:-1,$carousel:d,$fromBot:f,$imageWidth:h,$imageHeight:g})}),!m&&(0,P.jsx)(it,{"data-testid":"enlarge-image-button","aria-label":"Enlarge image",onClick:()=>C(!0),$inView:p}),!m&&(0,P.jsx)(at,{}),!v&&(0,P.jsx)(bt,{imageWidth:h,imageHeight:g,hasCaption:E}),E&&(0,P.jsxs)(Ye,{children:[a.title&&(0,P.jsx)(Xe,{$imageWidth:h,$imageHeight:g,children:a.title}),I&&(0,P.jsx)(Qe,{$imageWidth:h,$imageHeight:g,children:I})]}),!_&&j.map(e=>(0,P.jsxs)(Ze,{title:e.label,onClick:A(e),$inView:p,children:[(0,P.jsx)("span",{children:e.label}),kt[e.button_type]]},e.id))]})]})}var St=n(4518),_t=n(4785);const At=e=>{let{fromUser:t,$hasError:n,theme:r}=e;return n?a.Tj.grayColor:t?r.userMessageBackground:r.botMessageBackground},Et=i.Ay.div.withConfig({componentId:"sc-3i0o6s-0"})(["position:relative;text-align:center;cursor:pointer;text-transform:none;width:80%;max-width:calc(80% - 25px);border-radius:17px;font-weight:500;border:none;padding:",";font-family:",";font-size:var(--_kindlychat-font-size-p);background:",";background-color:",";transition:opacity 0.2s ease-out;margin:8px 0 2px 25px;display:block;a,span{display:block;color:",";text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;z-index:2;}& > svg:first-child{position:absolute;top:-7px;left:-4px;width:15px;path{opacity:",";transition:opacity 0.2s ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{$hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},_t.m.default,At,At,e=>{let{fromUser:t,theme:n}=e;return(0,he.w5)(t?n.userMessageBackground:n.botMessageBackground,"#FFFFFF","#000000")},e=>{let{$loading:t}=e;return t?.5:1}),Tt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-1"})(["width:20px;height:20px;left:-10px;bottom:5px;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),jt=i.Ay.div.withConfig({componentId:"sc-3i0o6s-2"})(["width:175px;height:175px;position:relative;display:flex;justify-content:center;margin-bottom:4px;background:",";border-radius:15px;svg{width:24px;z-index:2;}"],a.Tj.grayColor),It=i.Ay.div.withConfig({componentId:"sc-3i0o6s-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});function Ot(e){let{avatar:t}=e;const n=t?{backgroundImage:`url(${t})`}:{};return t?(0,P.jsx)(Tt,{style:n}):null}var Lt=n(7133);const Pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{token:t}=(0,c.d4)(u.FI),{PAT_HOST:n}=(0,c.d4)(u.cA);return(0,Lt.l)(e,n,t)},Nt="\n background: black;\n border-radius: 15px;\n",Mt=i.Ay.iframe.withConfig({componentId:"sc-6x850n-0"})(["",""],Nt),zt=i.Ay.video.withConfig({componentId:"sc-6x850n-1"})(["",""],Nt);function Rt(e){var t;let{source:n,type:r}=e;const o=null===(t=n.split(".").pop())||void 0===t?void 0:t.toLowerCase();return(0,P.jsxs)(zt,{width:"240",controls:!0,"data-chromatic":"ignore",children:[(0,P.jsx)("source",{src:n,type:r||`video/${o}`}),"Your browser does not support HTML5 video."]})}function $t(e){var t;let{attachment:n,avatar:r,chatMessageStatus:o}=e;const i=n.sender===l.bS.USER,a=(0,St.A)(n),s=a===l.sl.IMAGE,c=a===l.sl.VIDEO,u=Boolean(o)||n.status===l.Le.ERROR||n.status===l.Le.INFECTED,d=Pt(n),f=!d,p={imageUrl:null!=d?d:"",altText:`Image ${n.name||`from ${null!==(t=null==n?void 0:n.sender)&&void 0!==t?t:"agent"}`}`};return s?(0,P.jsxs)(It,{fromUser:i,children:[(0,P.jsx)(Ot,{avatar:r}),!u&&!f&&(0,P.jsx)(Ct,{image:p,fromBot:!i,isCarousel:!1,imageWidth:"250",inView:!0,first:!1,loading:n.status===l.Le.PROCESSING}),!u&&f&&(0,P.jsxs)(jt,{isImage:s,children:[(0,P.jsx)(Ee,{}),(0,P.jsx)(wt,{loading:!0})]}),u&&(0,P.jsx)(jt,{children:(0,P.jsx)(Ae,{})})]}):c?(0,P.jsxs)(It,{fromUser:i,children:[(0,P.jsx)(Ot,{avatar:r}),!u&&!f&&(0,P.jsx)(Rt,{source:d,type:n.type}),!u&&f&&(0,P.jsxs)(jt,{children:[(0,P.jsx)(Ee,{}),(0,P.jsx)(wt,{loading:!0})]}),u&&(0,P.jsx)(jt,{children:(0,P.jsx)(Ae,{})})]}):(0,P.jsxs)(It,{fromUser:i,children:[(0,P.jsx)(Ot,{avatar:r}),(0,P.jsxs)(Et,{fromUser:i,$loading:f,$hasError:u,children:[(0,P.jsx)(_e.A,{height:10}),(0,P.jsx)(wt,{loading:!u&&f,opacity:.35}),!u&&!f&&(0,P.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:[n.name,(0,P.jsx)(D,{})]}),!u&&f&&(0,P.jsx)("span",{children:"Uploading"}),u&&(0,P.jsx)(Ae,{})]})]})}var Dt=n(9338),Ft=n(166),Bt=n(5516);const Ht=140;function Ut(e){let{chatMessage:t,imageCarousel:n}=e;const[o,i]=(0,r.useState)(0),[a,s]=(0,r.useState)(0),c=l.T5[t.image_carousel_size||1e3],[u,d]=(0,r.useState)(Ht.toString());(0,r.useEffect)(()=>{let e=!0;if(null!=n&&n.length){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/c,r=t.height/n;e&&d(r.toString())}}return()=>{e=!1}},[n,d,c]);const f=(0,r.useMemo)(()=>c===l.T5[800]?102:c===l.T5[600]?96:30,[c]),p=e=>c===l.T5[600]&&o===e-1||o===e,h=(0,r.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*c-f):-(e*c+5*e),i(e),s(n)},[c,f]),{handleTouchStart:g,handleTouchMove:m,handleTouchEnd:b}=(0,Ft.A)({carousel:n,index:o,setIndex:h}),v=(0,r.useCallback)(e=>{e&&setTimeout(()=>{e.scrollLeft=0},100)},[]);return(0,P.jsxs)(Ue,{$active:n.length>1,ref:v,children:[(0,P.jsx)(Bt.A,{carouselPosition:a,onTouchStart:g,onTouchMove:m,onTouchEnd:b,children:n.map((e,r)=>(0,P.jsx)(Ct,{first:0===r,image:e,fromBot:t.from_bot,isCarousel:n.length>1,inView:p(r),imageWidth:c,imageHeight:u},e.id||r))}),(0,P.jsx)(Je,{$previous:!0,$disabled:o<=0,"aria-label":"Go to previous image",onClick:()=>h(o-1,n)}),(0,P.jsx)(et,{disabled:o<=0}),(0,P.jsx)(Je,{$next:!0,$disabled:o>=n.length-1,"aria-label":"Go to next image",onClick:()=>h(o+1,n)}),(0,P.jsx)(tt,{disabled:o>=n.length-1})]})}var Vt=n(5134);const Wt=i.Ay.button.withConfig({componentId:"sc-1upnaey-0"})(["display:block;background:none;background-color:transparent;border:none;text-decoration:underline;font-weight:600;font-size:var(--_kindlychat-font-size-p);color:",";cursor:pointer;padding:0;",""],e=>{let{theme:t}=e;return(0,he.w5)(t.userMessageBackground,"#FFFFFF","#000000")},R.sF);function Gt(e){let{button:t}=e;const n=(0,Vt.jL)();return(0,P.jsx)(Wt,{onClick:()=>n((0,re.V$)(t)),children:t.contact_details.edit_text})}var qt=n(7041);const Kt=(0,i.i7)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Yt=(0,i.i7)(["0%{-webkit-font-smoothing:subpixel-antialiased;opacity:0;transform:scale(0.76);}35%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}75%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1.08);}100%{-webkit-font-smoothing:subpixel-antialiased;opacity:1;transform:scale(1);}"]),Xt=(0,i.AH)(["",";text-rendering:optimizeLegibility;animation-name:",";"],e=>{let{$isSystemMessage:t}=e;return(0,y.qL)(t?1200:600)},e=>{let{$isSystemMessage:t}=e;return t?Yt:Kt}),Qt=i.Ay.div.withConfig({componentId:"sc-1d179v9-0"})(["display:block;width:100%;"]),Zt=i.Ay.div.withConfig({componentId:"sc-1d179v9-1"})(["display:flex;flex-direction:column;",";",";"," @media (prefers-reduced-motion){animation:none;}"],Xt,e=>!e.$fromBot&&"display: block; ",e=>e.$hasSiblings&&"margin-bottom: 8px;"),Jt=i.Ay.div.withConfig({componentId:"sc-1d179v9-2"})(["display:flex;flex-direction:column;",";"," sup{position:relative;vertical-align:top;top:-0.3em;font-size:0.7em;}sup + sup{margin-left:0.2em;}"],e=>{let{$fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.$hasSiblings&&"margin-bottom: 8px;"),en=i.Ay.div.withConfig({componentId:"sc-1d179v9-3"})(["display:inline-flex;"," max-width:100%;flex-direction:",";"," margin-bottom:6px;flex-wrap:wrap;gap:6px;",";@media (prefers-reduced-motion){animation:none;}"],e=>{let{$orientation:t}=e;return t===l.Ii.VERTICAL&&"width: 240px;"},e=>{let{$orientation:t}=e;return t===l.Ii.HORIZONTAL?"row":"column"},e=>{let{$nextMessageType:t}=e;return t===l.bS.SYSTEM&&"margin-bottom: 16px;"},Xt),tn=(0,i.AH)(["white-space:pre-wrap;color:",";background:",";&:where(",":first-of-type:not(:only-of-type) &){border-radius:16px 16px 0px 16px;}&:where(",":last-of-type:not(:only-of-type) &){border-radius:16px 0px 16px 16px;}&:where(",":not(:first-of-type):not(:last-of-type) &){border-radius:16px 0px 0px 16px;}&:where(",":only-of-type &){border-radius:16px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.userMessageBackground,"#FFFFFF","#000000")},e=>e.theme.userMessageBackground,Qt,Qt,Qt,Qt),nn=(0,i.AH)(["color:",";background:",";&:first-child:not(:only-child){border-radius:16px 16px 16px 0px;}&:last-child:not(:only-child){border-radius:0px 16px 16px 16px;}&:not(:first-child):not(:last-child){border-radius:0px 16px 16px 0px;}&:only-child{border-radius:16px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.botMessageBackground,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return t.botMessageBackground}),rn=(0,i.AH)(["margin-left:25px;white-space:pre-wrap;"]),on=(0,i.AH)(["position:relative;display:inline-block;max-width:240px;min-width:32px;margin:1px 0px;padding-top:10px;padding-bottom:10px;border:0;border-radius:16px;font-size:var(--_kindlychat-font-size-p);line-height:18px;word-break:normal;overflow-wrap:anywhere;"," "," "," "," p{all:unset;}a{color:inherit;&:hover{background-color:color-mix(in srgb,currentColor 15%,transparent);}}pre{white-space:pre-wrap;}"],e=>e.$clickable&&"cursor: pointer;",e=>e.$fromBot?nn:tn,e=>e.$fromAgent&&rn,R.sF),an=i.Ay.div.withConfig({componentId:"sc-4agunw-0"})(["",""],on),sn=i.Ay.a.withConfig({componentId:"sc-4agunw-1"})(["text-decoration:none;",""],on),ln=i.Ay.div.withConfig({componentId:"sc-4agunw-2"})(["--padding-base:15px;padding-left:var(--padding-base);padding-right:var(--padding-base);& a{text-decoration:underline;}& ol,& ul{padding-left:calc(var(--padding-base) + 4px);}"]),cn=i.Ay.hr.withConfig({componentId:"sc-4agunw-3"})(["border:0;height:1px;background:",";margin-top:8px;margin-bottom:4px;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#636472","#dfe0e3")}),un=i.Ay.div.withConfig({componentId:"sc-4agunw-4"})(["width:20px;height:20px;left:-35px;bottom:0;position:absolute;border-radius:100px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground);var dn=n(2848);const fn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-0"})(["font-size:var(--_kindlychat-font-size-sm);margin-top:4px;margin-bottom:5px;"]),pn=i.Ay.div.withConfig({componentId:"sc-1hjf3xk-1"})(["display:flex;flex-wrap:wrap;gap:6px;overflow:hidden;padding:2px;font-size:var(--_kindlychat-font-size-sm);"]),hn=i.Ay.a.withConfig({componentId:"sc-1hjf3xk-2"})(["align-items:center;border-radius:4px;color:inherit;display:inline-flex;line-height:16px;outline:1px solid ",";overflow:hidden;padding:1px 3px;text-decoration:none !important;text-overflow:ellipsis;white-space:nowrap;transition:all 0.2s ease-in-out;&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}&:hover{outline-width:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);background-color:#f2f2f233;}svg{margin-left:4px;height:11px;width:11px;}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#F2F2F233","#0D0D0D33")}),gn=i.Ay.span.withConfig({componentId:"sc-1hjf3xk-3"})(["max-width:100%;overflow:hidden;text-overflow:ellipsis;margin-left:3px;"]),mn=i.Ay.sup.withConfig({componentId:"sc-1hjf3xk-4"})(["font-size:0.7em;bottom:0.33em;position:relative;"]);function bn(e){let{references:t,onReferenceClick:n}=e;const{reference_list_title:r,read_more_text:o}=(0,dn.A)(),i=t.map(e=>e.url),a=e=>{n(e.currentTarget.href)};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(fn,{children:r}),(0,P.jsx)(pn,{children:i.map((e,t)=>(0,P.jsxs)(hn,{href:e,target:"_blank",rel:"noopener noreferrer",onClick:a,children:[(0,P.jsx)(mn,{children:t+1}),(0,P.jsx)(gn,{children:o}),(0,P.jsx)(Ie.Gr,{color:"currentColor"}),(0,P.jsx)(D,{})]},e))})]})}const vn=[l.bS.WEBHOOK,l.bS.AGENT];function yn(e){let{children:t,chatMessage:n}=e;const{bot_id:r,exchange_id:o}=n,i="usersays"===n.exchange_type?"dialogue":n.exchange_type,a=`/workspace/${r}/build/${null==i?void 0:i.replace("_","-")}/${o}`;return(0,P.jsx)(sn,{$fromBot:n.from_bot,$clickable:!0,role:"link",tabIndex:0,href:a,children:t})}function xn(e){let{references:t,onReferenceClick:n}=e;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(cn,{}),(0,P.jsx)(ln,{children:(0,P.jsx)(bn,{references:t,onReferenceClick:n})})]})}function wn(e){var t;let{chatMessage:n,editContactDetailsButton:r,lineIndex:o,messageLine:i,numLines:a,preface:s,references:d=[]}=e;const f=(0,c.wA)(),{inPlatform:p}=(0,c.d4)(u.$P),{isTextDirectionRtl:h}=(0,c.d4)(u.Od),g=h?"rtl":void 0,m=p&&n.from_bot&&n.exchange_type&&!U()(t=vn).call(t,n.sender),b=d.length>0,v=n.sender===l.bS.AGENT,y=o===a-1,x=n.from_bot,w=(0,P.jsx)("p",{children:(0,P.jsx)("strong",{children:s})}),k=e=>{f((0,re.qJ)({url:e,messageId:n.id}))};return m?(0,P.jsxs)(yn,{chatMessage:n,children:[s&&w,(0,P.jsx)(ln,{children:x?(0,qt.A)(i):i}),y&&b&&(0,P.jsx)(xn,{references:d,onReferenceClick:k})]}):(0,P.jsxs)(an,{dir:g,$fromAgent:v,$fromBot:x,children:[(0,P.jsxs)(ln,{children:[s&&w,v&&(0,P.jsx)(un,{style:{backgroundImage:`url(${n.avatar})`}}),x?(0,qt.A)(i):i,y&&r&&(0,P.jsx)(Gt,{button:r})]}),y&&b&&(0,P.jsx)(xn,{references:d,onReferenceClick:k})]})}var kn=n(4174);const Cn=i.Ay.div.withConfig({componentId:"sc-285zcy-0"})(["display:flex;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:red;justify-content:flex-end;margin-bottom:2px;"]),Sn=i.Ay.div.withConfig({componentId:"sc-285zcy-1"})(["display:flex;"]),_n=i.Ay.button.withConfig({componentId:"sc-285zcy-2"})(["display:block;white-space:nowrap;font-size:var(--_kindlychat-font-size-sm);color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],a.Tj.darkColor,R.sF);function An(e){let{chatMessage:t,attachments:n}=e;const o=(0,Vt.jL)(),i=Boolean(t.message),a=(null==n?void 0:n.length)>0,s=(0,r.useCallback)(()=>{i&&o((0,re.tM)(t.message,t.id))},[t,o,i]),l=(0,r.useCallback)(()=>{i?o((0,re.aP)(t.message,t.id,{})):a&&kn.A.getInstance().getConnection().restart()},[t,o,a,i]);return t.status>=500?(0,P.jsxs)(Cn,{children:[a?"Upload failed":"Message not delivered"," ",(0,P.jsx)(Sn,{children:!a&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(_n,{onClick:s,children:"Try again"}),(0,P.jsx)(_n,{onClick:l,children:"Restart chat"})]})})]}):429===t.status?(0,P.jsxs)(Cn,{children:["Too many messages, please slow down."," ",(0,P.jsx)(Sn,{children:(0,P.jsx)(_n,{onClick:s,children:"Try again"})})]}):(0,P.jsxs)(Cn,{children:["An error occurred. ",(0,P.jsx)(_n,{onClick:l,children:"Restart chat"})]})}var En=n(7931);function Tn(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?(0,P.jsx)(Mt,{src:`https://player.vimeo.com/video/${n[2]}?title=0&byline=0&portrait=0`,width:"240",height:"auto",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,"data-chromatic":"ignore",title:"Vimeo video player"}):null}const jn=e=>e.replace("?t=","?start=").replace("&t=","&start="),In=e=>{const t=e.toLowerCase();let n=e;return U()(t).call(t,"youtube.com")?(n=e.replace("&","?"),n=jn(n),n.split("v=")[1]):U()(t).call(t,"youtu.be")?(n=jn(e),n.split("youtu.be/")[1]):n};function On(e){let{source:t}=e;const n=In(t);return(0,P.jsx)(Mt,{width:"240",height:"auto",src:`https://www.youtube-nocookie.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})}function Ln(e){let{source:t}=e;return U()(t).call(t,"youtube.com")||U()(t).call(t,"youtu.be")?(0,P.jsx)(On,{source:t}):U()(t).call(t,"vimeo.com")?(0,P.jsx)(Tn,{source:t}):(0,P.jsx)(Rt,{source:t})}const Pn=e=>{let{root:t=null,threshold:n=1,onChange:o,skip:i=!1}=e;const[a,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(i)return;l.current&&l.current.disconnect(),l.current=new IntersectionObserver(o,{root:t,threshold:n});const{current:e}=l;return a&&e.observe(a),()=>e.disconnect()},[a,t,o,i,n]),s};function Nn(e,t){if(!t||!t.length)return e;const n=Array.from(e);let r=0;return t.flatMap((e,t)=>e.offsets.map(e=>({offset:e,number:t+1}))).sort((e,t)=>e.offset-t.offset).forEach(e=>{let{offset:t,number:o}=e;const i=r+t,a=`<sup>${o}</sup>`;n.splice(i,0,...Array.from(a)),r+=a.length}),n.join("")}var Mn=n(9982),zn=n(8256),Rn=n(3551),$n=n(7279),Dn=n(1226),Fn=n(786),Bn=n(9990),Hn=n(27),Un=n(9492),Vn=n(8068);const Wn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"SUBMITTED";return async(r,o)=>{const{connection:{token:i}}=o(),{PAT_HOST:a}=o().environment,{headers:s}=(0,Bn.A)({token:i},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r((0,re.et)(`${a}/chatbubble/${l.Ak}/form/submit`,{method:"POST",body:c,headers:s}))}},Gn=e=>({...e,temporaryId:`tempId-${(0,Fn.A)()}`});var qn=n(914),Kn=n(7638),Yn=n(4557),Xn=function(e){return e.TEXT="TEXT",e.CHECKBOX="CHECKBOX",e.RANGE="RANGE",e.EMAIL="EMAIL",e.NUMBER="NUMBER",e.SELECT="SELECT",e.RADIO="RADIO",e}(Xn||{});const Qn=e=>{var t;const n={};return null!==(t=e.fields)&&void 0!==t&&t.length&&e.fields.forEach(e=>{var t,r;null!==(t=e.attributes)&&void 0!==t&&t.default_value&&(n[e.slug]=e.attributes.default_value),e.input_type!==Xn.SELECT||null!==(r=e.attributes)&&void 0!==r&&r.default_value||(n[e.slug]="")}),n},Zn=e=>{let t=0;return e.fields.forEach(e=>{var n,r;if(e.input_type===Yn.cJ.RANGE)t+=92;else if(e.input_type===Yn.cJ.SELECT)t+=51;else if(e.input_type===Yn.cJ.FILE)t+=113;else if(e.input_type===Yn.cJ.CHECKBOX||e.input_type===Yn.cJ.RADIO){var o;t+=30*((null===(o=e.attributes)||void 0===o?void 0:o.options.length)||1)+16}else t+=53;null!==(n=e.texts)&&void 0!==n&&n.label&&(t+=26),null!==(r=e.texts)&&void 0!==r&&r.help_text&&(t+=20)}),t+=48,t};var Jn=n(437);const er=i.Ay.div.withConfig({componentId:"sc-1sb6ll-0"})(["display:flex;flex-direction:column;"]),tr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-1"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),nr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-2"})(["display:flex;flex-direction:column;"]),rr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-3"})(["display:flex;flex-direction:column;margin-top:16px;color:var(--panel-background-white-black-contrast-1743170834);"]),or=i.Ay.div.withConfig({componentId:"sc-1sb6ll-4"})(["font-size:var(--_kindlychat-font-size-p);"]),ir=i.Ay.div.withConfig({componentId:"sc-1sb6ll-5"})(["font-weight:500;margin-top:4px;font-size:var(--_kindlychat-font-size-p);display:flex;align-items:flex-start;"]),ar=i.Ay.div.withConfig({componentId:"sc-1sb6ll-6"})(["padding:",";"],e=>{let{$affix:t}=e;return"PREFIX"===t?"0 6px 0 0":"0 0 0 6px"}),sr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-7"})(["margin-top:8px;"]),lr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-8"})(["display:flex;flex-direction:column;"]),cr=i.Ay.div.withConfig({componentId:"sc-1sb6ll-9"})(["flex:1;"]);var ur=n(9933);function dr(e){return function(t,n){return t===e&&n?(0,P.jsx)(ar,{$affix:t,children:n}):null}}const fr=dr("PREFIX"),pr=dr("SUFFIX");function hr(e){return e.type===Yn.cJ.FILE&&e.files?(0,P.jsx)(cr,{children:e.files.map(t=>(0,P.jsx)(ur.A,{file:t,canRemove:!1},`${t.name}-${e.type}-${t.size}`))}):Array.isArray(e.value)?(0,P.jsx)(lr,{children:e.value.map(e=>(0,P.jsx)(sr,{children:e.label},e.name))}):e.value}const gr=function(e){let{state:t,message:n,data:r=[]}=e;return(0,P.jsxs)(er,{children:[t!==Yn.KN.SUBMITTED&&n&&(0,P.jsx)(tr,{children:n}),t===Yn.KN.SUBMITTED&&r.length>0&&(0,P.jsx)(nr,{children:r.map(e=>e.value?(0,P.jsxs)(rr,{children:[(0,P.jsx)(or,{children:e.label}),(0,P.jsxs)(ir,{children:[fr(e.affix,e.affixValue),hr(e),pr(e.affix,e.affixValue)]})]},e.name):null)})]})};function mr(e){let{width:t=24,height:n=24,color:r="#333"}=e;return(0,P.jsxs)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,P.jsx)("path",{d:"M6.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 12a.5.5 0 11-1 0 .5.5 0 011 0zM6.5 18a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var br=n(1814);const vr=o().lazy(()=>Promise.resolve().then(n.bind(n,4901))),yr=e=>"object"==typeof e&&e.length&&e.every(e=>"[object File]"===Object.prototype.toString.call(e)),xr=function(e){var t,n,o,i,a,s,d,f,p;let{chatMessageId:h,formData:g,onSubmit:m,onCancel:b}=e;const v=(0,c.wA)(),y=(0,c.d4)(u.uO),{text:x}=(0,c.d4)(u.Od),{current:w}=(0,r.useRef)(`${g.id}_submission_${g.submission_id}`);let{current:k}=(0,r.useRef)(0);const{currentLanguageCode:C}=(0,de.A)();(0,r.useEffect)(()=>{var e,t,n;null==g||!g.id||null!=y&&y[w]?(null==y||null===(e=y[w])||void 0===e?void 0:e.formSubmitState)!==Yn.KN.UNANSWERED||null!=y&&null!==(t=y[w])&&void 0!==t&&t.formCompleteMessage||!g.texts.unanswered_text||v((0,re.Bu)({...y[w],formCompleteMessage:g.texts.unanswered_text})):v((0,re.Bu)({formId:g.id,formSubmissionId:g.submission_id,formSubmitState:Yn.KN.ACTIVE,formCompleteMessage:"",formKey:w,formValue:(null==y||null===(n=y[w])||void 0===n?void 0:n.formValue)||g.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[v,g,C,y,w]);const S=(0,r.useCallback)(e=>{var t,n,r,o,i;return e.input_type===Yn.cJ.SELECT?(null===(r=e.attributes.options.find(t=>{var n,r;return t.value===(null==y||null===(n=y[w])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])}))||void 0===r?void 0:r.label)||(null==y||null===(o=y[w])||void 0===o||null===(i=o.formValue)||void 0===i?void 0:i[e.slug]):null==y||null===(t=y[w])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug]},[w,y]),_=e=>{var t,n,r,o,i,a,s,l;if(e)switch(e.input_type){case Yn.cJ.CHECKBOX:case Yn.cJ.RADIO:return(0,P.jsx)($n.A,{name:e.slug,inputType:e.input_type,options:null===(t=e.attributes)||void 0===t?void 0:t.options,validators:(0,Jn.Bq)(e)});case Yn.cJ.RANGE:return(0,P.jsx)(Rn.Ap,{hasController:!0,value:parseFloat(null==y||null===(n=y[w])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[e.slug])||(null===(o=e.attributes)||void 0===o?void 0:o.default_value)||e.step,name:e.slug,step:null===(i=e.attributes)||void 0===i?void 0:i.step,affix:e.affix,affixValue:null===(a=e.texts)||void 0===a?void 0:a.affix_value,validators:(0,Jn.Bq)(e),ariaLabel:null===(s=e.texts)||void 0===s?void 0:s.label});case Yn.cJ.SELECT:return(0,P.jsx)(Rn.l6,{options:null===(l=e.attributes)||void 0===l?void 0:l.options,placeholder:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});case Yn.cJ.FILE:return(0,P.jsx)(Rn.ZH,{label:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});case Yn.cJ.TEXTAREA:return(0,P.jsx)(Dn.A,{placeholder:e.texts.placeholder_text,validators:(0,Jn.Bq)(e),name:e.slug});default:return(0,P.jsx)(Rn.pd,{placeholder:e.texts.placeholder_text,type:e.input_type,adornment:e.affix&&e.texts.affix_value?e.texts.affix_value:void 0,adornmentPosition:"PREFIX"===e.affix?"start":"end",validators:(0,Jn.Bq)(e),name:e.slug})}return null};return(0,P.jsxs)(Kn._H,{children:[(null===(t=g.texts)||void 0===t?void 0:t.title)&&(0,P.jsxs)(Kn.zE,{children:[(0,P.jsx)(mr,{width:20,height:20})," ",null===(n=g.texts)||void 0===n?void 0:n.title]}),(null==y||null===(o=y[w])||void 0===o?void 0:o.formSubmitState)&&(null==y||null===(i=y[w])||void 0===i?void 0:i.formSubmitState)!==Yn.KN.ACTIVE&&(0,P.jsx)(gr,{state:y[w].formSubmitState,message:y[w].formCompleteMessage,data:(()=>{var e,t;if(null!=g&&g.fields&&(null==y||null===(e=y[w])||void 0===e?void 0:e.formSubmitState)===Yn.KN.SUBMITTED&&null!=y&&null!==(t=y[w])&&void 0!==t&&t.formValue)return g.fields.reduce((e,t)=>{var n,r,o,i,a;return t.input_type!==Yn.cJ.CHECKBOX&&t.input_type!==Yn.cJ.RADIO||null===(n=t.attributes)||void 0===n||!n.options?[...e,{affix:t.affix,affixValue:t.texts.affix_value,name:t.slug,label:null===(r=t.texts)||void 0===r?void 0:r.label,type:t.input_type,value:S(t),files:null==y||null===(o=y[w])||void 0===o||null===(i=o.formFiles)||void 0===i?void 0:i[t.slug]}]:[...e,{name:`${t.input_type===Yn.cJ.CHECKBOX?"checkbox":"radio"}_list_${t.slug}`,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:t.attributes.options.reduce((e,n)=>{var r,o;const i=null==y||null===(r=y[w])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug];return(null==i?void 0:i.length)>0&&U()(i).call(i,n.value)?[...e||[],{name:n.value,label:n.label,value:n.value}]:e},null)}]},[]).sort((e,t)=>(e.order||0)-(t.order||0))})()}),(0,P.jsx)(r.Suspense,{fallback:(0,P.jsx)(br.A,{minHeight:Zn(g)}),children:(!(null!=y&&y[w])||(null==y||null===(a=y[w])||void 0===a?void 0:a.formSubmitState)===Yn.KN.ACTIVE)&&(0,P.jsx)(vr,{onCancel:async e=>{var t;return b&&b(e),await v(Wn(g.submission_id,null==y?void 0:y[w].formValue,Yn.KN.CANCELED)),await v((0,re.zh)(g.cancel_dialogue_id,{languageCode:C})),v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.CANCELED,formCompleteMessage:null===(t=g.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:Qn(g),onSubmit:async(e,t)=>{m&&m(e);let n={};Object.entries(e).filter(e=>{let[t,n]=e;return Array.isArray(n)?!!n.length:"object"==typeof n&&null!==n?!!Object.keys(n).length:!!n}).forEach(e=>{let[t,r]=e;r instanceof FileList?n[t]=Array.from(r):n[t]=r});const r=function(e){const t={};return Object.keys(e).forEach(n=>{yr(e[n])&&(t[n]=e[n])}),t}(n),o=Object.values(n).filter(e=>yr(e)).map(e=>Array.isArray(e)&&e.length?e.flat():e).flat();if(o.length){let e=!1;const a=()=>{e=!0},s=await Promise.all(o.map(e=>(0,zn.TA)(e))),c=await v((e=>{let{chatMessageId:t,files:n,onError:r}=e;return async(e,o)=>{var i;const{bot:{id:a},chatbubble:{chatId:s},connection:{token:c},environment:{PAT_HOST:u}}=o(),d=await e((0,re.z5)()),{headers:f}=(0,Bn.A)({token:c},{extra:d}),p=n.map(Gn).map((0,Hn.A)("file")),h=p.map((0,Hn.A)("url")),g=`${u}/chatbubble/${l.Ak}/attachment/create`,m={attachments:h},b=await e((0,re.et)(g,{method:"POST",body:m,headers:f}));if((0,Un.A)(b)||!Array.isArray(null==b||null===(i=b.data)||void 0===i?void 0:i.attachments))return r(new Error("Failed to upload")),[];const{attachments:v}=b.data;if(v.sort((e,t)=>p.findIndex(t=>t.temporaryId===e.temporaryId)-p.findIndex(e=>e.temporaryId===t.temporaryId)),v.length!==n.length)return r(new Error("Failed to upload")),[];const[y,x]=v.reduce((e,t)=>{let[n,r]=e,{id:o,upload_url:i}=t;return[[...n,o],[...r,i]]},[[],[]]),w={"x-goog-upload-bot-id":a,"x-goog-upload-chat-id":s},k=(0,Vn.A)(n,x).map(async t=>{let[{file:n},r]=t;const o=await(0,zn.Bu)(n),i={...w,"Content-Type":n.type};return await e((0,re.et)(r,{method:"PUT",body:o,headers:i},{onError:e=>new Error(e)}))});if((await Promise.all(k)).some(Un.A))return r(new Error("Failed to upload")),[];const C=`${u}/chatbubble/${l.Ak}/attachment/uploads-complete`,S={attachmentIds:y,chatMessageId:t,exchangeId:h[0].exchangeId};return await e((0,re.et)(C,{method:"POST",body:S,headers:f},{onError:()=>r(new Error("Failed to upload"))})),y}})({chatMessageId:h,files:s,onError:a}));try{const e=function(e,t){if(Object.values(e).reduce((e,t)=>e+t.length,0)!==t.length)throw new Error("Mismatched lengths between file objects and attachment IDs");const n={};let r=0;return Object.entries(e).forEach(e=>{let[o,i]=e;n[o]=i.map((e,n)=>t[r+n]).join(","),r+=i.length}),n}(r,c);n={...n,...e}}catch(e){a()}if(e){var i;if(k>=3)return v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.ERRORED,formCompleteMessage:null===(i=g.texts)||void 0===i?void 0:i.error_text,formValue:n}));const e=Object.keys(r);return e.length&&e.forEach(e=>{var n;t(e,{type:"custom",message:null===(n=x.upload_file_failed)||void 0===n?void 0:n[C]})}),void(k+=1)}}var a;return null===await v(Wn(g.submission_id,n))?v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.ERRORED,formCompleteMessage:null===(a=g.texts)||void 0===a?void 0:a.error_text,formValue:n})):(await v((0,re.zh)(g.submit_dialogue_id,{languageCode:C})),v((0,re.Bu)({formKey:w,formId:g.id,formSubmitState:Yn.KN.SUBMITTED,formValue:n,formFiles:Object.fromEntries(Object.entries(r).map(e=>{let[t,n]=e;return[t,n.map(e=>({name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}))]}))})))},ariaLabel:null===(s=g.texts)||void 0===s?void 0:s.title,sendButtonTitle:null===(d=g.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=g.texts)||void 0===f?void 0:f.cancel_button_text,children:null===(p=g.fields)||void 0===p?void 0:p.map((e,t)=>{var n,r,o;return(0,P.jsx)(qn.A,{className:0!==t||null!==(n=g.texts)&&void 0!==n&&n.title?void 0:"no-margin",helperText:null===(r=e.texts)||void 0===r?void 0:r.help_text,required:e.required,label:null===(o=e.texts)||void 0===o?void 0:o.label,children:_(e)},`form_field_${w}_${e.order}`)})})})]})},wr=e=>e,kr=e=>{let{button_type:t}=e;return t===l.lP.edit_contact_details?"editContactDetails":"regularButtons"},Cr=e=>function(){let{id:t,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:void 0,temporaryId:void 0};return t===e||n===e},Sr=e=>e?e.reduce((e,t)=>{let{offset:n,url:r}=t;const o=e.find(e=>e.url===r);return o?o.offsets.push(n):e.push({offsets:[n],url:r}),e},[]).sort((e,t)=>Math.min(...e.offsets)-Math.min(...t.offsets)):[];function _r(e){var t,n,o,i,a;let{chatMessage:s,buttonHandlers:d,messageCounter:f,nextMessageType:p}=e;const h=(0,c.wA)(),[g,m]=(0,r.useState)([]),{lastMessageSeen:b,attachments:v=[]}=(0,c.d4)(u.DZ),y=s.sender?s.sender===l.bS.USER:!s.from_bot,x=Sr(s.message_references),w=s.from_bot&&s.handler!==l.Gi.MIMIR?function(e){const t="%%%SPLIT_HERE%%%",n=(new DOMParser).parseFromString(e,"text/html"),r=Array.from(n.body.querySelectorAll("br"));return r.length<3?[e]:(r.forEach((e,o)=>{var i,a,s,l;e.nextSibling===r[o+1]&&(null===(i=r[o+1])||void 0===i?void 0:i.nextSibling)===r[o+2]&&(null===(a=e.parentNode)||void 0===a||a.insertBefore(n.createTextNode(t),e),e.remove(),null===(s=r[o+1])||void 0===s||s.remove(),null===(l=r[o+2])||void 0===l||l.remove())}),n.body.innerHTML.split(t))}(s.message||"").flatMap(e=>e.split(/\n\s*\n/)).map(e=>e.trim()).filter(e=>""!==e):[Nn(s.message||"",x)],{regularButtons:k,editContactDetails:C}=(0,r.useMemo)(()=>(0,Mn.A)(s.buttons,kr),[s.buttons]),S=(0,r.useMemo)(()=>{var e;return null==s||null===(e=s.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()||e.button_type===l.lP.SLIDER.toLowerCase())},[s]),_=(null==s?void 0:s.image_carousel)||(null==s?void 0:s.video_source),A=null==s||null===(t=s.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===l.lP.CHECKBOX.toLowerCase()),E=(0,r.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==b?void 0:b.index)>=f||h((0,re.pA)(s.id,f))},[s.id,h,b,f]),T=Pn({onChange:E,threshold:.95,skip:y}),j=(0,r.useCallback)(e=>{const t=g.find(t=>t.id===e.id);m(t?g.filter(t=>t.id!==e.id):[...g,e])},[g]),I=(0,r.useMemo)(()=>{var e,t;return[...null!==(e=s.attachments)&&void 0!==e?e:[],...(null!==(t=s.attachment_ids)&&void 0!==t?t:[]).map(e=>v.find(Cr(e))).filter(wr)]},[v,s.attachments,s.attachment_ids]),O=Boolean(s.message||(null==I?void 0:I.length)||(null===(n=s.buttons)||void 0===n?void 0:n.length)||(null===(o=s.image_carousel)||void 0===o?void 0:o.length));return(0,P.jsxs)(Qt,{ref:T,"data-testid":l.fl,children:[(0,P.jsxs)(Zt,{$fromBot:s.from_bot,$hasSiblings:Boolean(A),children:[s.sender===l.bS.SYSTEM&&s.event_message&&(0,P.jsx)(En.Ay,{chatMessage:s}),(0,P.jsx)(Jt,{$fromBot:s.from_bot,$hasSiblings:Boolean(_),children:w.map((e,t)=>e?(0,P.jsx)(wn,{chatMessage:s,messageLine:e,lineIndex:t,numLines:w.length,editContactDetailsButton:null==C?void 0:C[0],references:x},`chatMessage-${t}`):null)}),(null===(i=s.image_carousel)||void 0===i?void 0:i.length)>0&&(0,P.jsx)("div",{children:(0,P.jsx)(Ut,{imageCarousel:s.image_carousel,chatMessage:s})}),I.map(e=>(0,P.jsx)("div",{children:(0,P.jsx)($t,{attachment:e,avatar:s.avatar,chatMessageStatus:s.status})},e.id)),s.video_source&&(0,P.jsx)(Ln,{source:s.video_source}),(null===(a=s.form)||void 0===a?void 0:a.fields)&&(0,P.jsx)(xr,{chatMessageId:s.id,formData:s.form})]}),(null==k?void 0:k.length)>0&&(0,P.jsx)(en,{$orientation:s.buttons_display_orientation||l.Ii.VERTICAL,$nextMessageType:p,children:k.map(e=>(0,P.jsx)(Dt.A,{button:e,chatMessage:s,handlers:d,checked:g,setCheckboxValue:j,submitButtonsList:S},e.id))}),O&&s.status&&(0,P.jsx)(An,{chatMessage:s,attachments:I})]})}var Ar=n(15);function Er(e){e&&(e.scrollTop=e.scrollHeight,setTimeout(()=>{e.scrollTop=e.scrollHeight},1))}const Tr=(0,i.i7)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),jr=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(600),Tr),Ir=(0,i.i7)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Or=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(300),Ir),Lr=i.Ay.div.withConfig({componentId:"sc-2gibmd-0"})(["position:absolute;z-index:3;bottom:70px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.$show?"1":"0"),Pr=i.Ay.button.withConfig({componentId:"sc-2gibmd-1"})(["opacity:0;border-radius:100px;color:#2c2c2c;background:",";background-color:",";border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:",";display:flex;align-items:center;justify-content:center;min-width:35px;max-width:205px;width:35px;height:35px;",";",";svg{path{stroke:",";}}"],e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255,255,255, 0.08)","rgba(0,0,0, 0.08)")},e=>e.$show?"pointer":"default",e=>!e.$show&&(0,y.vW)(800),e=>e.$show?jr:Or,e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFF","#000")}),Nr=600;function Mr(e){let{bodyRef:t,isChatLooselyScrolledToBottom:n}=e;const[o,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=setTimeout(()=>{n||i(!0)},Nr);return n&&i(!1),()=>clearTimeout(e)},[n]),(0,P.jsx)(Lr,{$show:o,inert:!o,children:(0,P.jsx)(Pr,{$show:o,onClick:()=>{Er(t.current)},"aria-label":"Scroll to bottom of chat","data-testid":"chat-new-message",children:(0,P.jsx)(Ar.A,{})})})}var zr=n(8129),Rr=n(209);const $r=i.Ay.div.withConfig({componentId:"sc-1h90lvz-0"})(["height:100%;"]),Dr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-1"})(["width:100%;min-width:100%;height:100%;padding:0 16px;overflow-y:",";overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;scrollbar-gutter:stable;transition:opacity 0.3s ease;&[inert]{opacity:0.4;}",""],e=>{let{$isContentLongEnough:t}=e;return t?"auto":"hidden"},e=>e.theme.background,e=>e.theme.background,R.sF),Fr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-2"})(["display:flex;max-width:",";margin:auto;gap:16px;flex-direction:column;justify-content:flex-end;"],a.mb.tablet),Br=i.Ay.div.withConfig({componentId:"sc-1h90lvz-3"})(["display:flex;flex-direction:row;color:",";font-size:var(--_kindlychat-font-size-sm);justify-content:center;margin-bottom:16px;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.6)","rgba(0, 0, 0, 0.6)")}),Hr=i.Ay.span.withConfig({componentId:"sc-1h90lvz-4"})(["font-weight:500;align-self:flex-start;"]),Ur=i.Ay.span.withConfig({componentId:"sc-1h90lvz-5"})(["align-self:flex-start;"]),Vr=i.Ay.div.withConfig({componentId:"sc-1h90lvz-6"})(["display:inline-block;"]),Wr="filler-div-1741269268",Gr=(e,t)=>t.scrollHeight>=e.clientHeight,qr=(e,t)=>{if(!e)return;const n=e.querySelectorAll("img"),r=e.querySelectorAll("video"),o=e.querySelectorAll("iframe");(n.length>0||r.length>0||o.length>0)&&setTimeout(t,50),n.forEach(e=>{e.complete||e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})}),r.forEach(e=>{const n=()=>setTimeout(t,50);if(e.readyState>=1)return void n();const r=()=>{n()};e.addEventListener("loadedmetadata",r,{once:!0}),e.addEventListener("loadeddata",r,{once:!0}),e.addEventListener("canplaythrough",r,{once:!0})}),o.forEach(e=>{e.addEventListener("load",()=>{setTimeout(t,50)},{once:!0})})},Kr=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";if(!e||!t)return;const r=()=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect().top-r.top+e.scrollTop;e.scrollTo({top:o,behavior:n})};r(),qr(t,r)},Yr=function(){let e=0,t=null,n=null;const r=t=>{(e=>{Er(e)})(...t),e=Date.now()},o=function(){const o=Date.now()-e;null!==t&&(clearTimeout(t),t=null);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];o>=100||0===e?r(a):(n=a,t=setTimeout(()=>{n&&(r(n),n=null),t=null},100-o))};return o.cancel=()=>{null!==t&&(clearTimeout(t),t=null),n=null},o}();var Xr=n(893);function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e&&Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<t+1}const Zr=30,Jr=100;var eo=n(5765);const to=e=>{let t=null;const n=[],r=(e,t)=>!t||new Date(e.created).valueOf()-t>3e5;return e.forEach(e=>{(e=>{if(!t)return!1;const n=e.from_bot===t.from_bot,r=e.name===t.name,o=e.from_webhook===t.from_webhook,i=e.handler!==l.Gi.TRIGGER_DIALOGUE,a=!(e.sender===l.bS.SYSTEM&&t.sender===l.bS.SYSTEM);return n&&r&&o&&i&&a})(e)?n[n.length-1].messages.push(e):n.push({messages:[e],shouldShowTime:r(e,t&&new Date(t.created).valueOf())}),t=e}),n},no=(e,t,n)=>{var r;const o=e||(null===(r=t.slice(-1)[0])||void 0===r?void 0:r.id);return!!n.find(e=>{let{id:t}=e;return o===t})};function ro(e){let{bodyRef:t,buttonHandlers:n,inert:i}=e;const{currentLanguageCode:a}=(0,de.A)(),[s,d]=(0,r.useState)(!0),{isTyping:f}=(0,c.d4)(u.MA),{isTyping:p,typingType:h,text:g,botName:m}=(0,c.d4)(u.Od),{currentMessageId:b,inspectorOpen:v}=(0,c.d4)(u.qV),{chatMessages:y}=(0,c.d4)(u.DZ)||[],x=to(y),w=(0,r.useRef)(null),k=function(e){let{bodyRef:t,bodyMessagesRef:n,setIsContentLongEnough:o}=e;const i=(0,r.useRef)(null),a=(0,r.useRef)(null),s=(0,r.useRef)(void 0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{if(!e||!n.current)return i.current&&(i.current.disconnect(),i.current=null),a.current&&(a.current.disconnect(),a.current=null),s.current&&(clearTimeout(s.current),s.current=void 0),c.current=null,u.current=null,d.current=null,void Yr.cancel();t.current=e;const r=n.current,f=function(){let{shouldChangeImmediately:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Gr(e,r);return null!==u.current&&u.current===n?null:(s.current&&(clearTimeout(s.current),s.current=void 0),n?(t?(o(!0),u.current=!0):s.current=setTimeout(()=>{o(!0),u.current=!0,requestAnimationFrame(()=>{Kr(e,c.current,"instant")})},1e3),!0):(o(!1),u.current=!1,!1))};f({shouldChangeImmediately:!0}),Er(e),qr(r,()=>{f({shouldChangeImmediately:!0}),Er(e)}),i.current=new ResizeObserver(t=>{if(!t[0])return;const n=e.clientHeight,r=null!==d.current&&d.current!==n;d.current=n,r&&Yr(e),!1===f({shouldChangeImmediately:!0})&&Er(e)}),i.current.observe(e),a.current=new MutationObserver(t=>{const n=t.flatMap(e=>Array.from(e.addedNodes).filter(e=>{var t,n,r;return e instanceof HTMLElement&&((null===(t=e.dataset)||void 0===t?void 0:t.testid)===l.fl||(null===(n=e.dataset)||void 0===n?void 0:n.testid)===l.dT||(null===(r=e.dataset)||void 0===r?void 0:r.testid)===l.gH)}));let r=!1;if(n.length>0&&(c.current=n[n.length-1],r=!0),!c.current||!r)return;const o=c.current;f({shouldChangeImmediately:!1}),setTimeout(()=>{Kr(e,o)},50)}),a.current.observe(r,{childList:!0,subtree:!0})},[n,t,o]);return f}({bodyRef:t,bodyMessagesRef:w,setIsContentLongEnough:d}),C=function(e){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e.current)return;let t=!1;const r=e.current,o=()=>{const e=Qr(r,Zr);t!==e&&(t=e,n(e))},i=(0,Xr.A)(o,Jr);return o(),r.addEventListener("scroll",i),()=>{r.removeEventListener("scroll",i),i.cancel()}},[e]),t}(t);let S=0;return(0,P.jsxs)(Dr,{ref:k,id:"chat-body-container","data-testid":"chat-body-container",$isContentLongEnough:s,inert:i,children:[!s&&(0,P.jsx)($r,{id:Wr}),(0,P.jsxs)(Fr,{role:"log","aria-live":"polite","data-testid":"chat-log","data-cy":"chat-log",ref:w,children:[x.map((e,t)=>{const{messages:r,shouldShowTime:i}=e,s=v&&no(b,y,r),c=t===x.length-1,u=r[0].handler===l.Gi.MIMIR||"SMART_WEBHOOK"===r[0].reply_type||"SMART_REPLY"===r[0].reply_type;return(0,P.jsx)(o().Fragment,{children:(0,P.jsx)(Se,{fromBot:r[0].from_bot,created:r[0].created,shouldShowTime:i,inspected:s,isLastGroupMessage:c,disclaimerComponent:u?(0,P.jsxs)(Br,{children:[(0,P.jsxs)(Vr,{children:[(0,P.jsx)(Hr,{children:m})," ",(0,P.jsx)(Ur,{children:(0,Rr.A)(g.gpt_search_result_text,a)})]}),(0,P.jsx)(eo.A,{text:(0,Rr.A)(g.gpt_tooltip_disclaimer,a),position:"top",children:(0,P.jsx)(ue.A,{width:18,height:18})})]}):void 0,children:r.map((e,t)=>{var i;return S+=1,(0,P.jsx)(o().Fragment,{children:(0,P.jsx)(_r,{chatMessage:e,nextMessageType:null===(i=r[t+1])||void 0===i?void 0:i.sender,buttonHandlers:n,messageCounter:S})},`${e.key}`)})})},`message-group-${t}`)}),(f||p)&&(0,P.jsx)(mt,{botName:m,text:h===zr.cT.KINDLY_GPT?(0,Rr.A)(g.gpt_search_text,a):void 0})]}),(0,P.jsx)(Mr,{bodyRef:t,isChatLooselyScrolledToBottom:C})]})}const oo=i.Ay.div.withConfig({componentId:"sc-1e9j8ct-0"})(["position:absolute;right:7px;bottom:6px;height:28px;width:28px;display:flex;align-items:center;justify-content:center;z-index:2;"]),io=(0,i.Ay)(L.mt).withConfig({componentId:"sc-1e9j8ct-1"})(["margin:0;opacity:1;color:",";span{font-weight:500;}",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFF","#000")},y.jB),ao=i.Ay.svg.withConfig({componentId:"sc-1e9j8ct-2"})(["position:absolute;transform-origin:50% 50%;transform:rotate(-90deg);circle{&:first-child{stroke:",";}&:last-child{stroke:",";}}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255,255,255, 0.66)","rgba(0,0,0, 0.2)")},e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground);function so(e){let{radius:t,stroke:n,progress:o}=e;const[i,a]=(0,r.useState)(),[s,l]=(0,r.useState)();(0,r.useEffect)(()=>{const e=t-2*n,r=2*e*Math.PI;a(e),l(r)},[t,n]);const c=s?s-o/100*s:0;return(0,P.jsxs)(ao,{height:2*t,width:2*t,children:[(0,P.jsx)("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${s} ${s}`,style:{strokeDashoffset:0},r:i,cx:t,cy:t}),(0,P.jsx)("circle",{fill:"transparent",strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${s} ${s}`,style:{strokeDashoffset:c},r:i,cx:t,cy:t})]})}function lo(e){let{inputMax:t,inputLength:n,composerHeight:r,composerHeightInitial:o}=e;const i=t-n,a=n<t?n/t*100:100,s=t>=n,l=r>o,c=l&&t-20<n,u=c?16:13;return l?(0,P.jsx)(oo,{title:i>0?`You have used ${n} of the total of ${t} allowed characters`:`You have exceeded the message limit of ${t}`,children:(0,P.jsxs)(P.Fragment,{children:[s&&(0,P.jsx)(so,{radius:u,stroke:1.6,progress:a}),(0,P.jsx)(io,{children:c&&(0,P.jsx)("span",{children:i})})]})}):null}var co=n(8964),uo=n(3949);const fo=i.Ay.div.withConfig({componentId:"sc-1jba2dg-0"})(["width:min(100%,",");margin:auto;padding:16px;padding-top:6px;background:none;background:",";background-color:",";"],a.mb.tablet,e=>e.theme.background,e=>e.theme.background),po=i.Ay.div.withConfig({componentId:"sc-1jba2dg-1"})(["display:flex;align-items:flex-end;justify-content:space-between;gap:12px;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$submitHidden&&"\n gap: 0px;\n "),ho=i.Ay.div.withConfig({componentId:"sc-1jba2dg-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:var(--_kindlychat-font-size-p);line-height:37px;",""],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")},e=>e.$hide?"transform: translateY(-45px);":""),go=(0,i.Ay)(uo.A).attrs(e=>{let{inputProps:t}=e;return{...t}}).withConfig({componentId:"sc-1jba2dg-3"})([""," min-height:","px;outline-offset:-4px;"],ie.hF,e=>{let{$minHeight:t}=e;return t}),mo=i.Ay.div.withConfig({componentId:"sc-1jba2dg-4"})(["width:28px;display:flex;justify-content:center;align-items:flex-start;transition:all 450ms cubic-bezier(0.635,-0.6,0.3,1.65);",";"],e=>e.$hidden&&"\n width: 0px;\n pointer-events: none;\n "),bo=(0,i.AH)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:28px;width:100%;padding:0;margin-bottom:4px;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:28px;max-height:28px;background-color:transparent;"," &:focus-visible{outline:1px solid ",";}&:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{stroke:",";}}"],R.sF,e=>{let{theme:t}=e;return(0,he.w5)(t.background,"#FFFFFF","#000000")},e=>(0,he.J7)(e.theme.background,e.theme.buttonBackground)?e.theme.buttonText:e.theme.buttonBackground),vo=i.Ay.button.withConfig({componentId:"sc-1jba2dg-5"})(["",";z-index:15;padding:0px;transition:opacity 0.1s ease-in;",";svg{transition:all 0.2s ease;user-select:none;pointer-events:none;}",";"],bo,e=>{let{$active:t}=e;return!t&&"\n opacity: 0.3;\n pointer-events: none;\n "},e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),yo=i.Ay.div.withConfig({componentId:"sc-e0zhkb-0"})(["position:absolute;right:",";left:",";bottom:4px;z-index:2;width:28px;height:28px;display:",";align-items:center;justify-content:center;button{padding:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;}&:hover{opacity:0.8;}svg{path{stroke:",";}}"],e=>{let{$isTextDirectionRtl:t}=e;return t?"auto":"12px"},e=>{let{$isTextDirectionRtl:t}=e;return t?"12px":"auto"},e=>{let{hidden:t}=e;return t?"none":"flex"},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.64)","rgba(0, 0, 0, 0.64)")}),xo=5;function wo(e){let{accept:t=l.oY,multiple:n=!0,setMessage:o}=e;const i=(0,Vt.jL)(),{isTextDirectionRtl:a}=(0,Vt.GV)(u.Od),{takenOver:s,supportsAttachment:c}=(0,Vt.GV)(e=>{let{agent:t}=e;return t}),{attachments:d}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),f=(0,r.useRef)(null),p=s&&c||(0,x.A)()&&(null==d?void 0:d.exchangeId),h=(0,r.useCallback)(()=>{f.current&&(f.current.value="",f.current.click())},[f]);return(0,r.useEffect)(()=>{d.buttonClicked&&(i((0,re.B)()),h())},[d.buttonClicked,i,h]),(0,P.jsxs)(yo,{hidden:!p,$isTextDirectionRtl:a,children:[p&&(0,P.jsx)(ie.$n,{onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},"data-testid":"composer-file-upload-button",children:(0,P.jsx)(_e.A,{})}),(0,P.jsx)("input",{ref:f,hidden:!0,type:"file",accept:t,multiple:n,onChange:async e=>{let{target:t}=e;try{var n;if(o(""),(null===(n=t.files)||void 0===n?void 0:n.length)>xo)return void i((0,re.Dc)(`You can upload up to ${xo} files at a time`,3500));const e=await Promise.all(Array.from(t.files).map(zn.TA));i((0,re.Ln)(e))}catch(e){i((0,re.Dc)(e.message.replace(/^Error: ?/i,""),3500))}},style:{display:"none"}})]})}const ko=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-0"})(["display:flex;align-items:center;font-size:var(--_kindlychat-font-size-sm);> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:5px;padding-right:50px;}button{display:none;position:absolute;top:-4px;right:-4px;border:1px solid ",";border-radius:50%;width:14px;height:14px;padding:0px;background:",";z-index:1;path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")},e=>{let{theme:t}=e;return t.background},e=>{let{theme:t}=e;return(0,he.w5)(t.background,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),Co=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-1"})(["height:36px;width:36px;&:not(:first-child){margin-left:4px;}&:hover,&:focus-within{button{display:block;}}"]),So=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-2"})(["height:36px;width:36px;border-radius:6px;position:relative;overflow:hidden;img,video{position:absolute;width:100%;height:100%;object-fit:cover;}"]),_o=i.Ay.div.withConfig({componentId:"sc-1c1rsxp-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],a.Tj.grayColor);function Ao(e){let{file:t}=e;const n=(0,St.A)(t);return n===l.sl.IMAGE||n===l.sl.VIDEO?(0,P.jsxs)(So,{tabIndex:0,children:[n===l.sl.IMAGE&&(0,P.jsx)("img",{src:t.url,alt:`Uploaded ${t.name}`}),n===l.sl.VIDEO&&(0,P.jsx)("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,"aria-label":t.name,children:(0,P.jsx)("source",{src:t.url,type:t.type})})]}):(0,P.jsx)(_o,{children:(0,P.jsx)(_e.A,{})})}i.Ay.div.withConfig({componentId:"sc-1c1rsxp-4"})(["font-size:var(--_kindlychat-font-size-p);height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],a.Tj.grayColor);const Eo=(e,t)=>{const n=e.slice();return n.splice(t,1),n};function To(){const e=(0,Vt.jL)(),{attachments:{files:t}}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t});return(0,P.jsxs)(ko,{children:[t.map((n,r)=>(0,P.jsxs)(Co,{children:[(0,P.jsx)(Ao,{file:n}),(0,P.jsx)(ie.$n,{onClick:n=>{n.preventDefault(),(n=>{e((0,re.Ln)(Eo(t,n)))})(r)},children:(0,P.jsx)(Ie.US,{width:11,height:11,color:"#FFF"})})]},`uploaded-image-${n.name}-${r}`)),1===(null==t?void 0:t.length)&&(0,P.jsx)("span",{children:t[0].name})]})}let jo;const Io=37,Oo=1e3,Lo=1e3;function Po(e){let{active:t,chatHasStarted:n,currentlyPoppedUp:o=!1,bodyRef:i,inert:a}=e;const[s,l]=(0,r.useState)(Io),[c,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(0),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;!t&&!n||(0,x.A)()||o||!m.current||null===(e=m.current)||void 0===e||e.focus()},[t,n,o]);const b=(0,Vt.jL)(),{inputLimitEnabled:v,inputLimit:y,isTextDirectionRtl:w,replyInQueueEnabled:k}=(0,Vt.GV)(u.Od),{allGreetingsHideInput:C,attachments:{files:S},hideInputField:_}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{takenOver:A,userIsTyping:E,requestedHandoverAt:T,takeoverClosed:j}=(0,Vt.GV)(e=>{let{agent:t}=e;return t}),{chatMessages:I}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),O=w?"rtl":void 0,L=_&&!A&&0===S.length,N=Boolean(T)&&!j&&!A,M=!A&&v&&!(N&&!1===k),z=M?y:Oo,R=!f&&0===S.length,$=0===f.length&&0===S.length,D=L||C&&0===I.length||f.length>z||R||!n,{placeholder:F,disabled_input_text:B}=(0,dn.A)(),H=e=>{if(e.preventDefault(),e.stopPropagation(),E&&b((0,re.mw)()),D)return!1;if(!f.trim()&&0===S.length)return!1;if(S.length>0)b((0,re.Zn)());else{const e=(new Date).getTime();if(!(e-h>Lo))return!1;g(e),b((0,re.y2)(f.trim()))}return p(""),!0};return(0,co.A)("touchend",async()=>{let e=0;const t=setInterval(()=>{var n;null===(n=m.current)||void 0===n||n.scrollIntoView(),e+=1,e>=5&&clearInterval(t)},100)},m.current),(0,P.jsx)(fo,{dir:O,inert:a,children:(0,P.jsx)("form",{autoComplete:"off",action:"#",onSubmit:H,children:(0,P.jsxs)(po,{$submitHidden:$,children:[(0,P.jsxs)(ie.A0,{$initialHeight:Io,$targetHeight:s,$active:!R,$hasFiles:(null==S?void 0:S.length)>0,children:[0===S.length&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(go,{"data-testid":"chat-box-composer","aria-hidden":n?"false":"true","aria-label":F,name:"message",$hide:L,disabled:!n||L,$active:!R,ref:m,placeholder:F,onChange:e=>{const{value:t}=e.target;A&&(e=>{const t=e.length>0;clearTimeout(jo),!E&&t?b((0,re.Mb)()):E&&!t&&b((0,re.mw)()),jo=setTimeout(()=>{b((0,re.mw)())},5e3)})(t),p(t),Qr(i.current)&&setTimeout(()=>{Er(i.current)},5)},value:f,onFocus:()=>d(!0),onBlur:()=>d(!1),onMouseDown:()=>{c||Qr(i.current)||Er(i.current)},onHeightChange:l,$minHeight:Io,enterKeyHint:"send",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||H(e)}}),(0,P.jsx)(ho,{$hide:_,inert:!_,children:B})]}),(0,P.jsx)(To,{}),M&&(0,P.jsx)(lo,{inputMax:z,inputLength:f.length,composerHeight:s,composerHeightInitial:Io}),(0,P.jsx)(wo,{setMessage:p})]}),(0,P.jsx)(mo,{$hidden:$,children:(0,P.jsx)(vo,{"data-testid":"composer-submit","aria-hidden":D,$active:!D,disabled:D,role:"button",onClick:H,title:"Send message",onMouseDown:e=>{e.preventDefault()},children:(0,P.jsx)(Ie.qx,{width:24,height:24})})})]})})})}function No(e){return(0,P.jsxs)("svg",{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,P.jsx)("title",{children:"Bot Avatar"}),(0,P.jsxs)("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd",children:[(0,P.jsx)("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),(0,P.jsx)("path",{d:"M30.64 35.4a4.27 4.27 0 11-8.54 0 4.27 4.27 0 018.54 0M50.17 35.4a4.27 4.27 0 108.54 0 4.27 4.27 0 00-8.54 0",fill:"#000"}),(0,P.jsx)("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M16 29.03a12.39 12.39 0 0113.15-5.31 12.24 12.24 0 019.45 10.49v15.64h5.47M44.88 23.2H64",stroke:"#0069FF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}var Mo=n(9602),zo=n(850);function Ro(e){let{handleXButtonClick:t,settingsButtonRef:n}=e;const o=(0,Vt.jL)(),{name:i,avatar:a,fullscreenMode:s,isTextDirectionRtl:l}=(0,Vt.GV)(u.Od),{chatHasStarted:c,currentLanguage:d,overlayViews:f,currentModal:p}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{botConversationFeedback:h}=(0,Mo.A)(d),g=l?"rtl":void 0,m=f[f.length-1],b=!m||"FEEDBACK"===m,v=s&&h||b&&!s,y=()=>{o((0,re.Rh)())};return x=e=>{const{activeElement:t}=document;if(!t)return;const{tagName:n}=t;"Escape"===e.code&&"BODY"===n&&y(),"Escape"===e.code&&"BODY"!==n&&t instanceof HTMLElement&&t.blur()},(0,r.useEffect)(()=>(window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)),[x]),c?(0,P.jsxs)(zo.B3,{dir:g,"data-testid":"chat-box-header",children:[(0,P.jsxs)(zo.CE,{children:[a?(0,P.jsx)(zo.dl,{$avatar:a,"aria-hidden":"true"}):(0,P.jsx)(No,{height:30,"aria-hidden":"true"}),(0,P.jsx)(zo.Zw,{$isTextDirectionRtl:l,"aria-label":`Chat bot ${i||"Kindly"}`,children:i||"Kindly"})]}),(0,P.jsxs)(zo.HD,{children:[b&&(0,P.jsx)(zo.I$,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:()=>{o((0,re.wQ)("GENERIC"))},"data-testid":"chat-settings-button",ref:n,inert:"COMPLIANCE"===p||void 0,children:(0,P.jsx)(Ie.Ze,{width:24,height:24})}),b&&!s&&(0,P.jsx)(zo.I$,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:y,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",children:(0,P.jsx)(Ie.gR,{width:24,height:24})}),v&&(0,P.jsx)(zo.I$,{"aria-label":"End chat",title:"End chat",type:"button",onClick:t,"data-testid":"end-chat-button","data-cy":"end-chat-button",children:(0,P.jsx)(Ie.US,{width:24,height:24})})]})]}):null;var x}var $o=n(6834);const Do=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-0"})(["overflow:hidden;position:absolute;inset:0;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;z-index:16;",";animation-duration:0.2s;animation-timing-function:ease-in;"],y.jB),Fo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Bo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),Ho=(0,i.Ay)(L.fz).withConfig({componentId:"sc-1s4wj3o-3"})(["font-size:var(--_kindlychat-font-size-m);a{color:",";}"],a.Tj.primaryColor),Uo=i.Ay.div.withConfig({componentId:"sc-1s4wj3o-4"})(["a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),Vo=i.Ay.p.withConfig({componentId:"sc-1s4wj3o-5"})(["position:absolute;bottom:0;font-size:var(--_kindlychat-font-size-sm);color:",";"],a.CM[50]);function Wo(){const e=(0,Vt.jL)(),t=()=>{e((0,$o.eG)())},{back_to_chat_button:n}=(0,dn.A)();return(0,P.jsx)(Do,{children:(0,P.jsxs)(Fo,{children:[(0,P.jsxs)(Bo,{children:[(0,P.jsx)(L.H3,{children:"About Kindly"}),(0,P.jsxs)(Ho,{children:["This chatbot is powered by Kindly.",(0,P.jsx)("br",{}),"To learn more about Kindly, visit"," ",(0,P.jsxs)("a",{ref:e=>{e&&e.focus()},href:"https://www.kindly.ai",target:"_blank",rel:"noopener noreferrer",children:["this website.",(0,P.jsx)(D,{})]})]})]}),(0,P.jsx)(Uo,{children:(0,P.jsxs)(ie.N_,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button",children:["‹ ",n]})}),(0,P.jsxs)(Vo,{children:["v",window.kindlyChat.VERSION]})]})})}var Go=n(5758);const qo=i.Ay.div.withConfig({componentId:"sc-xpbg6h-0"})(["z-index:2;display:flex;justify-content:center;"]),Ko=i.Ay.span.withConfig({componentId:"sc-xpbg6h-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),Yo=i.Ay.p.withConfig({componentId:"sc-xpbg6h-2"})(["display:flex;font-size:var(--_kindlychat-font-size-xs);color:",";line-height:20px;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"],a.Tj.darkColor);function Xo(e){let{shouldAutoFocus:t}=e;const n=(0,Vt.jL)();return(0,P.jsx)(qo,{children:(0,P.jsxs)(Yo,{children:[(0,P.jsx)("span",{children:"Powered by"})," ",(0,P.jsx)(Ko,{}),(0,P.jsx)(L.cp,{children:(0,P.jsx)(ie.Bi,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:e=>{"click"===(null==e?void 0:e.type)&&n((0,re.wQ)("ABOUT_CHAT"))},type:"button",autoFocus:t,children:"Kindly"})})]})})}const Qo=i.Ay.div.withConfig({componentId:"sc-7eewng-0"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;padding:0 0 20px 0;",";animation-duration:0.2s;animation-timing-function:ease-in;"],y.jB),Zo=i.Ay.div.withConfig({componentId:"sc-7eewng-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Jo=i.Ay.div.withConfig({componentId:"sc-7eewng-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),ei=i.Ay.div.withConfig({componentId:"sc-7eewng-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:var(--_kindlychat-font-size-p);display:block;margin:60px 0 30px 0;&:hover,&:focus,&:active,&:visited{color:",";}}"],a.Tj.darkColor,a.Tj.darkColor),ti=i.Ay.div.withConfig({componentId:"sc-7eewng-4"})(["div{display:flex;position:unset;align-items:center;}"]);function ni(e){let{endChat:t}=e;const{whitelabelEnabled:n}=(0,Vt.GV)(u.Od),{currentLanguageCode:r}=(0,de.A)(),{preloadFeedbackImages:o}=(0,Mo.A)(r),i=(0,Vt.jL)(),s=(0,dn.A)(),{back_to_chat_button:l,cancel_chat_button:c,cancel_chat_text:d}=s;return(0,P.jsx)(Qo,{children:(0,P.jsxs)(Zo,{children:[(0,P.jsx)(Jo,{children:(0,P.jsx)(L.H2,{children:d})}),(0,P.jsxs)(ei,{children:[(0,P.jsx)(Go.A,{style:a.Nz,"aria-label":c,title:c,onClick:t,onMouseEnter:()=>{o("bot_conversation")},type:"button",text:c,cy:"cancel-chat-button",autoFocus:!0}),(0,P.jsxs)(ie.N_,{"aria-label":l,title:l,onClick:()=>{i((0,$o.eG)())},onKeyUp:e=>{"Enter"===e.key&&i((0,$o.eG)())},type:"button",tabIndex:0,children:["‹ ",l]})]}),(0,P.jsx)(ti,{children:!n&&(0,P.jsx)(Xo,{})})]})})}var ri=n(904);function oi(e){let{color:t="#232F41"}=e;return(0,P.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"M6.83317 4.5L3.1665 8L6.83317 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12.8335 8H3.3335",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ii(e){let{color:t="#232F41"}=e;return(0,P.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"M9.1665 4.5L12.8332 8L9.1665 11.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12.6665 8H3.1665",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}var ai=n(9245),si=n(8418);const li=window.matchMedia("(prefers-reduced-motion: reduce)").matches,ci="startViewTransition"in document;async function ui(e){if(li||!ci)return void e();const t=document;return await t.startViewTransition(()=>{(0,Te.flushSync)(e)})}var di=n(6848);const fi=(0,i.i7)(["0%{opacity:0;transform:translateY(4px);}100%{opacity:1;transform:translateY(0);}"]),pi=i.Ay.section.attrs({"data-testid":"chat-modal"}).withConfig({componentId:"sc-1nmbsmf-0"})(["position:absolute;width:100%;bottom:0;left:0;right:0;padding:16px;border-radius:12px;border:1px solid ",";background-color:",";color:var(--panel-background-white-black-contrast-1743170834);z-index:15;animation:"," 0.3s ease;"],e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","#0000000d")},e=>{let{theme:t}=e;return t.panelBackground},fi),hi=(0,i.Ay)(pi).withConfig({componentId:"sc-t0w48p-0"})(["display:flex;min-height:",";padding-top:38px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-modal-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(240px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"}),gi=(0,i.Ay)(Go.A).withConfig({componentId:"sc-t0w48p-1"})(["margin-inline:auto;"]),mi=i.Ay.button.withConfig({componentId:"sc-t0w48p-2"})(["background:none;border:none;position:absolute;top:8px;right:8px;cursor:pointer;svg{display:block;}"]),bi=i.Ay.h2.withConfig({componentId:"sc-t0w48p-3"})(["margin:",";font-size:var(--_kindlychat-font-size-p);font-weight:500;text-align:center;"],e=>{let{$isFullHeight:t}=e;return t?"auto 8px 8px 8px":"8px"}),vi=i.Ay.div.withConfig({componentId:"sc-t0w48p-4"})(["display:flex;flex-wrap:wrap;justify-content:center;row-gap:16px;@media only screen and (max-width:360px){flex-direction:column;align-items:center;}"]),yi=i.Ay.button.withConfig({componentId:"sc-t0w48p-5"})([""," display:flex;height:fit-content;gap:8px;flex-direction:column;align-items:center;justify-content:center;opacity:",";transition:opacity 0.2s;cursor:pointer;user-select:none;word-break:normal;overflow-wrap:anywhere;@media only screen and (max-width:360px){width:fit-content;}@media only screen and (min-width:361px){width:65px;}"],R.AF,e=>{let{$wasChoiceMade:t,$isSelected:n}=e;return t&&!n?.5:1}),xi=i.Ay.img.withConfig({componentId:"sc-t0w48p-6"})(["width:24px;height:24px;transition:scale 0.3s;scale:",";",":hover &{scale:1.25;}"],e=>{let{$isSelected:t}=e;return t?1.25:1},yi),wi=i.Ay.span.withConfig({componentId:"sc-t0w48p-7"})(["display:block;font-size:var(--_kindlychat-font-size-sm);font-weight:500;"]),ki=i.Ay.div.withConfig({componentId:"sc-t0w48p-8"})(["display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:20px;"]),Ci=i.Ay.button.withConfig({componentId:"sc-t0w48p-9"})(["border:1px solid rgba(0,0,0,0.08);padding:8px 12px;color:",";background-color:",";background-color:",";border-radius:6px;box-shadow:",";translate:",";transition:background-color 0.2s,translate 0.2s;cursor:pointer;user-select:none;"],e=>{let{theme:t}=e;return(0,he.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground},e=>{let{$isSelected:t,theme:n}=e;return t?(0,he.SW)(n.secondaryButtonBackground)?`oklch(from ${n.secondaryButtonBackground} calc(l * 0.90) c h / 0.9)`:`oklch(from ${n.secondaryButtonBackground} calc(l * 1.15) c h / 0.9)`:n.secondaryButtonBackground},a.FR.button,e=>{let{$isSelected:t}=e;return t?"0 -2px":"0 0"}),Si=i.Ay.textarea.withConfig({componentId:"sc-t0w48p-10"})(["font-family:inherit;color:inherit;border:none;outline:none;width:100%;height:75px;font-size:var(--_kindlychat-font-size-sm);background:",";border-radius:8px;padding:8px 12px;resize:none;&::placeholder{color:",";}"],e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")},e=>{let{theme:t}=e;return(0,he.w5)(t.panelBackground,"rgba(255, 255, 255, 0.50)","rgba(0, 0, 0, 0.50)")}),_i=i.Ay.div.withConfig({componentId:"sc-t0w48p-11"})(["",";display:grid;grid-template-columns:0.6fr 1fr 0.6fr;grid-template-areas:'back dots next';view-transition-name:'navigation-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t&&"margin-top: auto"}),Ai=i.Ay.button.withConfig({componentId:"sc-t0w48p-12"})(["display:flex;width:max-content;align-items:center;gap:2px;padding:7px 12px;border:1px solid #00000014;border-radius:6px;box-shadow:",";cursor:pointer;user-select:none;"],a.FR.button),Ei=(0,i.Ay)(Ai).withConfig({componentId:"sc-t0w48p-13"})(["grid-area:back;color:",";background-color:",";"],e=>{let{theme:t}=e;return(0,he.w5)(t.secondaryButtonBackground,a.AV.light,a.AV.dark)},e=>{let{theme:t}=e;return t.secondaryButtonBackground}),Ti=(0,i.Ay)(Ai).withConfig({componentId:"sc-t0w48p-14"})(["grid-area:next;place-self:end;align-items:center;background-color:",";color:",";outline-offset:4px;transition:opacity 0.2s;&:disabled{opacity:0.5;cursor:not-allowed;}"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),ji=i.Ay.div.withConfig({componentId:"sc-t0w48p-15"})(["grid-area:dots;display:flex;align-items:center;gap:8px;margin:auto;view-transition-name:'progress-dots-1723461511841';"]),Ii=i.Ay.span.withConfig({componentId:"sc-t0w48p-16"})(["width:",";height:",";border-radius:50%;background-color:",";transition:width 0.3s,height 0.3s,background-color 0.3s;box-shadow:",";"],e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isActive:t}=e;return t?"10px":"6px"},e=>{let{$isDotBeforeOrEqualCurrentStep:t,theme:n}=e;return t?`${n.buttonBackground}`:`${a.CM[20]}`},a.FR.button),Oi=i.Ay.div.withConfig({componentId:"sc-t0w48p-17"})(["font-size:var(--_kindlychat-font-size-p);font-weight:500;margin:auto;text-align:center;translate:0 0;transition:translate 0.2s;"]),Li=(0,i.Ay)(di.Ef).withConfig({componentId:"sc-t0w48p-18"})(["margin-top:16px;width:100%;"]),Pi=i.Ay.span.withConfig({componentId:"sc-t0w48p-19"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);function Ni(e){var t,n,o;let{feedbackToSubmit:s,isFullHeight:l,endChat:u,shouldEndChat:d=!1,inert:f}=e;const p=(0,Vt.jL)(),h=(0,c.Pj)().getState(),{currentLanguageCode:g}=(0,de.A)(),{botConversationFeedback:m,handoverConversationFeedback:b}=(0,Mo.A)(g),v="bot_conversation"===s.trigger_type?m:b,y=(0,dn.A)(),{start_over_button:x}=y,{buttonText:w,secondaryButtonBackground:k}=(0,r.useContext)(i.Dx),C=(0,r.useMemo)(()=>(0,he.w5)(k,a.AV.light,a.AV.dark),[k]),S="external_feedback"===v.feedback_type,_=[...null!=v&&v.rating_scale?["RATING_SCALE"]:[],...null!=v&&null!==(t=v.predefined_buttons)&&void 0!==t&&t.enable_step?["PREDEFINED_BUTTONS"]:[],...null!=v&&null!==(n=v.free_form)&&void 0!==n&&n.enable_step?["FREEFORM_TEXT"]:[],"THANK_YOU"],A=s.currentStep,E=A?_.indexOf(A):0,T=ri.Z.fullscreenMode,j=v.predefined_buttons.use_sentiment_buttons&&null!==(o=s.sentiment)&&void 0!==o?o:"no_sentiment";(0,r.useEffect)(()=>{if(!A)return;const e=_[0]===A;(0,je.tf)("show-feedback",{value:{feedbackType:A}},{storeState:h,source:e?"programmatic":"user"})},[A,h]);const I=e=>{(0,je.tf)("dismiss-feedback",{value:{feedbackType:A}},{storeState:h,source:e}),p((0,$o.zn)(null)),p((0,si.ot)()),d&&p((0,si.Dz)())},O=()=>{(0,je.tf)("restart-chat",void 0,{storeState:h}),p((0,$o.ky)(!0))};return S?(0,P.jsxs)(hi,{$isFullHeight:!!l,$justifyCenter:!0,children:[!l&&(0,P.jsx)(mi,{onClick:()=>I("user"),children:(0,P.jsx)(Ie.US,{color:"black",height:28,width:28})}),(0,P.jsx)(bi,{$isFullHeight:!!l,children:v.headline}),(0,P.jsx)(gi,{onClick:()=>{d&&(null==u||u("programmatic")),p((0,$o.zn)(null)),p((0,si.ot)())},href:v.url_for_feedback,target:"_blank",rel:"noreferrer",children:v.button_label})]}):(0,P.jsxs)(hi,{"aria-live":"polite",$isFullHeight:!!l,inert:f,children:[!l&&(0,P.jsx)(mi,{onClick:()=>I("user"),children:(0,P.jsx)(Ie.US,{color:"black",height:28,width:28})}),(()=>{var e;switch(A){case"RATING_SCALE":return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(bi,{$isFullHeight:Boolean(l),children:v.rating_scale.title}),(0,P.jsx)(vi,{children:v.rating_scale.edit_labels.map((e,t)=>{const n=0===t;return(0,P.jsxs)(yi,{$isSelected:s.index===t,"aria-pressed":s.index===t,"aria-label":e.rating,$wasChoiceMade:"number"==typeof s.index,onClick:()=>{return n=t,r=e.rating,o=e.sentiment,void(s.index===n?p((0,si.n_)()):p((0,si.wm)({index:n,rating:r,sentiment:o})));var n,r,o},...n&&{autoFocus:!0},children:[(0,P.jsx)(xi,{src:e.image,alt:e.rating,$isSelected:s.index===t}),e.show_rating&&(0,P.jsx)(wi,{children:e.rating})]},e.id)})})]});case"PREDEFINED_BUTTONS":return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(bi,{$isFullHeight:!!l,children:v.predefined_buttons.sentiments[j].title}),(0,P.jsx)(ki,{children:v.predefined_buttons.sentiments[j].buttons.map((e,t)=>{var n,r;const o=0===t;return(0,P.jsx)(Ci,{$isSelected:null===(n=s.buttons_chosen)||void 0===n?void 0:U()(n).call(n,e.text),"aria-pressed":null===(r=s.buttons_chosen)||void 0===r?void 0:U()(r).call(r,e.text),onClick:()=>{return t=e.text,void p((0,si.m9)(t));var t},...o&&{autoFocus:!0},children:e.text},e.id)})})]});case"FREEFORM_TEXT":return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(bi,{$isFullHeight:!!l,id:"feedback-freeform-title-1739894771",children:v.free_form.title}),(0,P.jsx)(Si,{value:null!==(e=s.freeform_text)&&void 0!==e?e:"",onChange:e=>{return t=e.target.value,void p((0,si.GY)(t));var t},placeholder:v.free_form.placeholder,"aria-labelledby":"feedback-freeform-title-1739894771",autoFocus:!0})]});case"THANK_YOU":return(0,P.jsxs)(Oi,{children:[(0,P.jsx)(bi,{$isFullHeight:!!l,children:v.thanks_text}),T&&(0,P.jsx)(Li,{"aria-label":x,title:x,onClick:O,type:"button",$loading:!1,children:(0,P.jsx)(Pi,{children:x})})]});default:return null}})(),"THANK_YOU"!==A?(0,P.jsxs)(_i,{$isFullHeight:l,children:[E>0&&(0,P.jsxs)(Ei,{onClick:()=>{ui(()=>{const e=_[E-1];e&&p((0,si.zp)(e))})},children:[(0,P.jsx)(oi,{color:C}),v.back_button]}),(0,P.jsx)(ji,{children:_.slice(0,-1).map((e,t)=>(0,P.jsx)(Ii,{$isActive:E===t,$isDotBeforeOrEqualCurrentStep:E>=t},e))}),(0,P.jsx)(Ti,{onClick:async()=>{ui(()=>{(async()=>{(0,je.tf)("submit-feedback",{value:{feedbackType:A,feedbackValue:s}},{storeState:h}),await p((0,ai.S)(s))})();const e=_[E+1];e&&(p((0,si.zp)(e)),"THANK_YOU"!==e||T||setTimeout(()=>{d?(null==u||u("programmatic"),p((0,$o.zn)(null))):I("programmatic"),p((0,si.ot)())},4e3))})},disabled:"RATING_SCALE"===A&&"number"!=typeof s.index||"PREDEFINED_BUTTONS"===A&&!s.buttons_chosen.length,children:A===_[_.length-2]?(0,P.jsxs)(P.Fragment,{children:[v.send_button,(0,P.jsx)(ii,{color:w})]}):(0,P.jsxs)(P.Fragment,{children:[v.next_button,(0,P.jsx)(ii,{color:w})]})})]}):(0,P.jsx)(P.Fragment,{children:l&&(0,P.jsx)(Xo,{shouldAutoFocus:!0})})]})}const Mi=(0,i.i7)(["0%{opacity:0;}100%{opacity:1;}"]),zi=((0,i.AH)(["",";animation-name:",";"],(0,y.qL)(100),Mi),(0,i.i7)(["0%{opacity:1;}100%{opacity:0;}"])),Ri=((0,i.AH)(["",";animation-delay:50ms;animation-name:",";"],(0,y.qL)(500),zi),(0,i.AH)(["",";"],e=>e.$fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px")),$i=i.Ay.div.withConfig({componentId:"sc-1pzvbin-0"})(["width:100%;overflow:hidden;"," position:absolute;z-index:",";background:#fff;background-color:#fff;opacity:1;transition:opacity 0.2s;@starting-style{opacity:0;}"],Ri,a.vI.overlayIndex),Di=(0,i.Ay)(ie.N_).withConfig({componentId:"sc-1pzvbin-1"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:var(--_kindlychat-font-size-p);&:hover,&:focus,&:active,&:visited{color:",";}"],a.Tj.darkColor,a.Tj.darkColor),Fi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-2"})(["overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;@media (max-height:610px){overflow-y:auto;}"]),Bi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Hi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],a.jO.maxPhoneHeight),Ui=i.Ay.div.withConfig({componentId:"sc-1pzvbin-5"})(["width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px 30px;h3{display:flex;align-items:center;justify-content:center;}"]),Vi=i.Ay.span.withConfig({componentId:"sc-1pzvbin-6"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),Wi=i.Ay.div.withConfig({componentId:"sc-1pzvbin-7"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]);function Gi(e){let{textContent:t}=e;const n=(0,c.wA)(),r=(0,c.Pj)().getState(),{chat_deleted_header:o,back_to_chat_button:i}=t,a=()=>{(0,je.tf)("restart-chat",void 0,{storeState:r}),n((0,re.ky)(!0))};return(0,P.jsxs)(Ui,{children:[(0,P.jsx)(L.H3,{children:o}),(0,P.jsx)(di.Ef,{"aria-label":i,title:i,onClick:a,onKeyUp:e=>{"Enter"===e.key&&a()},type:"button","data-testid":"back-to-chat-option",autoFocus:!0,$loading:!1,children:(0,P.jsx)(Vi,{children:i})})]})}const qi=i.Ay.div.withConfig({componentId:"sc-19fb7bu-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);function Ki(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),o=(0,c.wA)(),{back_to_chat_button:i,delete_text:s,delete_button:l}=t;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ui,{children:(0,P.jsx)(L.H3,{children:s})}),(0,P.jsxs)(qi,{children:[(0,P.jsx)(Go.A,{style:a.Nz,"aria-label":l,title:l,onClick:()=>{(0,je.tf)("delete-chat",void 0,{storeState:r}),o((0,re._e)())},type:"button",text:l,cy:"confirm-delete-chat",autoFocus:!0}),(0,P.jsxs)(Di,{"aria-label":i,title:i,onClick:()=>n(),onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0,children:["‹ ",i]})]})]})}const Yi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Xi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Qi=i.Ay.div.withConfig({componentId:"sc-13vd2wb-2"})(["color:",";font-size:var(--_kindlychat-font-size-m);margin:0 0 10px;line-height:24px;"],a.Tj.darkColor);function Zi(e){let{textContent:t,onNavigateBack:n}=e;const r=(0,c.Pj)().getState(),o=(0,c.wA)(),{back_to_chat_button:i,download_button:a,download_format_text:s}=t,l=e=>{(0,je.tf)("download-chat",void 0,{storeState:r}),o((0,re.VK)({},e))};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ui,{children:(0,P.jsx)(Qi,{children:s})}),(0,P.jsxs)(Yi,{children:[(0,P.jsxs)(Xi,{children:[(0,P.jsx)(di.Ef,{"aria-label":`${a} (HTML)`,title:`${a} (HTML)`,onClick:()=>l("html"),type:"button","data-testid":"download-chat-html",autoFocus:!0,$isSecondaryButton:!0,$loading:!1,children:(0,P.jsx)(Vi,{children:`${a} (HTML)`})}),(0,P.jsx)(di.Ef,{"aria-label":`${a} (JSON)`,title:`${a} (JSON)`,onClick:()=>l("json"),type:"button","data-testid":"download-chat-json",$isSecondaryButton:!0,$loading:!1,children:(0,P.jsx)(Vi,{children:`${a} (JSON)`})})]}),(0,P.jsxs)(Di,{"aria-label":i,title:i,onClick:n,onKeyUp:e=>{"Enter"===e.key&&n()},type:"button",tabIndex:0,children:["‹ ",i]})]})]})}const Ji=i.Ay.div.withConfig({componentId:"sc-eb968f-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.$long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.jO.maxPhoneHeight),ea=i.Ay.div.withConfig({componentId:"sc-eb968f-1"})(["min-width:60%;max-width:95%;margin:auto;display:flex;flex-direction:column;button{margin:5px 0;&:first-child{margin-top:10px;}svg{margin-right:15px;vertical-align:middle;}}"]);function ta(){const{supportedLanguages:e}=(0,de.A)(),t=(0,Vt.jL)(),n=(0,c.Pj)().getState(),r=e.length>1,{back_to_chat_button:o,change_language_button:i,download_button:a,delete_button:s,start_over_button:l}=(0,dn.A)(),u=e=>()=>{t((0,re.wQ)(e))};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ji,{$long:r}),(0,P.jsxs)(ea,{children:[r&&(0,P.jsx)(di.Ef,{"aria-label":i,title:i,onClick:u("SELECT_LANGUAGE"),type:"button","data-testid":"change-language-option",$isSecondaryButton:!0,autoFocus:r,children:(0,P.jsxs)(Vi,{children:[(0,P.jsx)(Ie.U,{width:16,height:16,crop:!0}),i]})}),(0,P.jsx)(di.Ef,{"aria-label":l,title:l,onClick:()=>{(0,je.tf)("restart-chat",void 0,{storeState:n}),t((0,re.ky)(!0))},type:"button","data-testid":"restart-chat-option",$isSecondaryButton:!0,autoFocus:!r,children:(0,P.jsx)(Vi,{children:l})}),(0,P.jsx)(di.Ef,{"aria-label":s,title:s,onClick:u("DELETE_CHAT_CONFIRMATION"),type:"button","data-testid":"delete-chat-option",$isSecondaryButton:!0,children:(0,P.jsx)(Vi,{children:s})}),(0,P.jsx)(di.Ef,{"aria-label":a,title:a,onClick:u("SELECT_DOWNLOAD"),type:"button","data-testid":"download-chat-option",$isSecondaryButton:!0,children:(0,P.jsx)(Vi,{children:a})}),(0,P.jsx)(di.Ef,{"aria-label":o,title:o,onClick:()=>{t((0,re.eG)())},type:"button","data-testid":"back-to-chat-option",children:(0,P.jsx)(Vi,{children:o})})]})]})}const na=i.Ay.fieldset.withConfig({componentId:"sc-6uesp5-0"})(["border:none;background-color:transparent;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),ra=i.Ay.div.withConfig({componentId:"sc-6uesp5-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;text-transform:capitalize;&:last-child{margin-top:0;}}"]),oa=i.Ay.div.withConfig({componentId:"sc-6uesp5-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),ia=(0,i.Ay)(L.H3).withConfig({componentId:"sc-6uesp5-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);function aa(e){let{onNavigateBack:t}=e;const{back_to_chat_button:n,change_language_button:o,confirm_action_button:i}=(0,dn.A)(),{currentLanguageCode:s,supportedLanguages:l}=(0,de.A)(),[u,d]=(0,r.useState)(s),f=l.find(e=>{let{code:t}=e;return t===s}),p=l.find(e=>{let{code:t}=e;return t===u}),h=(0,c.Pj)().getState(),g=(0,Vt.jL)();return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ui,{children:(0,P.jsxs)(ia,{children:[(0,P.jsx)(Ie.U,{width:50,height:50}),o]})}),(0,P.jsxs)(na,{children:[(0,P.jsx)(ra,{children:l.map((e,t)=>{const n=0===t;return(0,P.jsx)(Go.A,{"aria-label":e.name_local,title:e.name_local,onClick:()=>d(e.code),text:e.name_local,"aria-checked":e.code===u,selected:e.code===u,role:"radio",cy:`${e.code}-button`,autoFocus:n,isSecondaryButton:!0},e.code)})}),(0,P.jsxs)(oa,{children:[u!==s&&(0,P.jsx)(Go.A,{style:a.Nz,"aria-label":i,title:i,onClick:()=>{(0,je.tf)("change-language",{value:{languageCode:u,languageName:(null==p?void 0:p.name_english)||u,previousLanguageCode:s,previousLanguageName:(null==f?void 0:f.name_english)||s}},{storeState:h}),g((0,re.L4)(u,{skipRestart:!0})),g(re.RY),t()},type:"submit",text:i}),(0,P.jsxs)(Di,{"aria-label":n,title:n,onClick:t,onKeyUp:e=>{"Enter"===e.key&&t()},tabIndex:0,type:"button",children:["‹ ",n]})]})]})]})}var sa=n(6738);const la=i.Ay.div.withConfig({componentId:"sc-7s2wt6-0"})(["position:relative;width:fit-content;&:before{content:'';position:absolute;right:11px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:1;border-top:7px solid #2c2c2c;border-left:4px solid transparent;border-right:4px solid transparent;}"]),ca=i.Ay.div.withConfig({componentId:"sc-7s2wt6-1"})(["position:absolute;top:10px;left:8px;"]),ua=i.Ay.select.withConfig({componentId:"sc-7s2wt6-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:var(--_kindlychat-font-size-m);border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],e=>e.$icon&&"padding-left: 30px;",R.sF);function da(e){let{children:t,onClick:n=sa.A,onChange:r=sa.A,value:o,name:i,icon:a=!1,...s}=e;return(0,P.jsxs)(la,{children:[a&&(0,P.jsx)(ca,{children:(0,P.jsx)(Ie.U,{width:16,height:16,crop:!0})}),(0,P.jsx)(ua,{onClick:n,onChange:r,value:o,name:i,$icon:a,...s,children:t})]})}var fa=n(8833),pa=n(1970);const ha=i.Ay.div.withConfig({componentId:"sc-g6reae-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),ga=(0,i.AH)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.$welcomePageImage),ma=i.Ay.div.withConfig({componentId:"sc-g6reae-1"})(["flex:1;height:100%;max-height:250px;padding:18px 18px 0;background:",";background-color:",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>e.$welcomePageImage&&ga),ba=i.Ay.div.withConfig({componentId:"sc-g6reae-2"})(["flex:1;padding:15px 24px 24px;border-top:5px solid ",";@media ","{padding:24px;}"],e=>e.theme.headerBackground,a.jO.maxTablet),va=i.Ay.div.withConfig({componentId:"sc-g6reae-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),ya=i.Ay.div.withConfig({componentId:"sc-g6reae-4"})(["padding:20px 0;"]),xa=i.Ay.div.withConfig({componentId:"sc-g6reae-5"})(["display:flex;flex-direction:column;gap:10px;margin:24px;justify-content:space-between;"," button:first-child{@media ","{min-width:unset;}}"],e=>{const t=e.theme.background,n=(0,he.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return e.$complianceEnabled&&(0,i.AH)(["margin:0;padding:24px;border-top:1px solid rgba(0,0,0,0.02);color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)},a.jO.maxTablet),wa=((0,i.Ay)(ie.$n).withConfig({componentId:"sc-g6reae-6"})(["display:flex;align-items:center;padding:7px;color:",";background:",";background-color:",";border-color:",";border-radius:100px;"],e=>e.theme.buttonText,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>e.theme.buttonBackground),(0,i.Ay)(L.H2).withConfig({componentId:"sc-g6reae-7"})(["font-weight:500;font-size:var(--_kindlychat-font-size-h3);margin:0 0 15px;"])),ka=i.Ay.div.withConfig({componentId:"sc-g6reae-8"})(["max-height:180px;overflow:hidden;font-size:var(--_kindlychat-font-size-m);margin:30px 0 10px 0;line-height:24px;overflow-y:auto;div{& > :first-child{margin-top:0;}& > :last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"]);var Ca=n(353),Sa=n(4668);const _a=(0,i.AH)(["display:flex;flex-direction:column;gap:10px;font-size:13px;justify-content:space-between;a{color:currentColor;text-decoration:underline;text-underline-offset:2px;}"]),Aa=(0,i.AH)(["",""],e=>{const t=e.theme.background,n=(0,he.SW)(t),r=n?`color-mix(in srgb, ${t} 96%, black)`:`color-mix(in srgb, ${t} 96%, white)`;return(0,i.AH)(["color:",";background-color:",";"],n?`${a.AV.dark}`:`${a.AV.light}`,r)}),Ea=i.Ay.div.withConfig({componentId:"sc-8v2qcc-0"})([""," ",""],_a,Aa),Ta=(0,i.Ay)(pi).withConfig({componentId:"sc-8v2qcc-1"})(["border-top-left-radius:0;border-top-right-radius:0;border:none;border-top:1px solid rgba(0,0,0,0.02);padding:24px;"," ",""],_a,Aa),ja=i.Ay.div.withConfig({componentId:"sc-8v2qcc-2"})(["display:flex;align-items:start;gap:4px;font-weight:500;svg{flex-shrink:0;margin-top:2px;path{stroke-width:2;}}"]);function Ia(e){const t=(0,Vt.jL)();(0,r.useEffect)(()=>{e||t(re.RY)},[e,t])}function Oa(e){let{descriptionTextHtml:t}=e;const n=(0,Vt.jL)();return(0,r.useEffect)(()=>{n((0,Sa.Er)({wasShown:!0}))},[n]),Ia(t),(0,P.jsx)(Ea,{children:(0,P.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}})})}function La(e){let{descriptionTextHtml:t,buttonText:n,accessRequestText:r}=e;const o=(0,Vt.jL)(),{complianceWasRevoked:i}=(0,Vt.GV)(e=>e.chatbubble);return Ia(t),(0,P.jsxs)(Ta,{children:[i&&(0,P.jsxs)(ja,{children:[(0,P.jsx)(Ca.A,{size:16}),r]}),(0,P.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}}),(0,P.jsx)(Go.A,{type:"button",onClick:()=>{o((0,re.Sz)())},children:n})]})}const Pa=(e,t)=>({header:(0,Rr.A)(e.header,t),text:(0,Rr.A)(e.text,t),start_button:(0,Rr.A)(e.start_button,t)});function Na(){const{fullscreenMode:e}=ri.Z,t=(0,Vt.jL)(),n=(0,c.Pj)().getState(),[o,i]=(0,r.useState)(!1),{currentLanguageCode:a,supportedLanguages:s}=(0,de.A)(),{welcomePage:l,welcomePageType:d,isTextDirectionRtl:f}=(0,Vt.GV)(u.Od),{active:p}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{descriptionTextHtml:h,buttonText:g,isEnabled:m,requireAgreement:b}=(0,pa.A)(a),v=!e,y=f?"rtl":void 0,x=(0,r.useCallback)(e=>{e&&p&&setTimeout(()=>{e.focus()},0)},[p]),w=l?Pa(l,a):{header:"",text:"",start_button:""},k=w.start_button||"Start chat",C=m&&b?g:k;return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(ha,{children:[(0,P.jsx)(ma,{$welcomePageImage:"PICTURE"===d&&l.image,children:v&&(0,P.jsx)(zo.I$,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:()=>{t((0,re.Rh)())},"data-testid":"close-chat-button",children:(0,P.jsx)(Ie.US,{width:25,height:25})})}),(0,P.jsx)(ba,{children:(0,P.jsx)(va,{dir:y,children:(0,P.jsxs)("div",{children:[s.length>1&&(0,P.jsx)(da,{icon:!0,name:"language-select","data-testid":"language-select",value:a,onChange:e=>{return n=e.target.value,void t((0,re.L4)(n));var n},"aria-label":"Select a language",children:s.map(e=>(0,P.jsx)("option",{label:e.name_local,value:e.code,children:e.name_local},e.code))}),(0,P.jsxs)(ya,{children:[(0,P.jsx)(wa,{children:w.header}),(0,P.jsx)(ka,{children:w.text&&(0,qt.A)(w.text)})]})]})})}),(0,P.jsxs)(xa,{$complianceEnabled:m,children:[m&&(0,P.jsx)(Oa,{descriptionTextHtml:h}),(0,P.jsx)(Go.A,{cy:"start-chat-button",type:"button",title:C,onClick:()=>{i(!0),(0,je.tf)("welcome-page-start-chat",void 0,{storeState:n}),t((0,re.L4)(a)),t((0,re.mN)()),m&&b&&t((0,fa.Sz)())},loading:o,ref:x,children:C})]})]})})}function Ma(e){var t,n;let{endChat:r,feedbackToSubmit:o}=e;const i=(0,c.wA)(),{hideHeader:a}=(0,c.d4)(u.Od),{whitelabelEnabled:s}=(0,c.d4)(u.Od),l=(0,dn.A)(),{overlayViews:d}=(0,c.d4)(u.$P),f=d[d.length-1],p=a||"WELCOME_PAGE"===f,h=()=>{i((0,re.i1)())};return(0,P.jsxs)($i,{$fullHeight:p,children:["WELCOME_PAGE"===f&&(0,P.jsx)(Na,{}),U()(t=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE","DELETED_CHAT","DELETE_CHAT_CONFIRMATION"]).call(t,f)&&(0,P.jsxs)(Fi,{children:[U()(n=["GENERIC","SELECT_DOWNLOAD","SELECT_LANGUAGE"]).call(n,f)?(0,P.jsxs)(Bi,{children:["GENERIC"===f&&(0,P.jsx)(ta,{}),"SELECT_DOWNLOAD"===f&&(0,P.jsx)(Zi,{textContent:l,onNavigateBack:h}),"SELECT_LANGUAGE"===f&&(0,P.jsx)(aa,{onNavigateBack:h})]}):(0,P.jsxs)(Hi,{children:["DELETE_CHAT_CONFIRMATION"===f&&(0,P.jsx)(Ki,{onNavigateBack:h,textContent:l}),"DELETED_CHAT"===f&&(0,P.jsx)(Gi,{textContent:l})]}),(0,P.jsx)(Wi,{children:!s&&(0,P.jsx)(Xo,{})})]}),"CANCEL_CHAT"===f&&(0,P.jsx)(ni,{endChat:r}),"FEEDBACK"===f&&o&&(0,P.jsx)(Ni,{isFullHeight:!0,shouldEndChat:!0,feedbackToSubmit:o,endChat:r}),"ABOUT_CHAT"===f&&(0,P.jsx)(Wo,{})]})}const za=i.Ay.div.withConfig({componentId:"sc-1272hyw-0"})(["display:flex;flex-direction:column;align-items:center;background:",";background-color:",";padding:1px 0 0;"," span{background:",";background-color:",";width:90%;height:1px;z-index:21;}"],e=>e.theme.background,e=>e.theme.background,ie.D7,a.Tj.borderColorDarkGray,a.Tj.borderColorDarkGray),Ra=i.Ay.form.withConfig({componentId:"sc-1272hyw-1"})(["display:flex;flex-direction:column;width:100%;padding:0 24px 20px;input{margin-right:24px;border:1px solid rgba(0,0,0,0);:focus{border:1px solid rgba(0,0,0,0);}:invalid{","}}"],e=>{let{$hasSubmitted:t}=e;return t&&"border-color: red;"}),$a=(0,i.Ay)(ie.$n).withConfig({componentId:"sc-1272hyw-2"})(["min-height:25px;display:flex;align-items:center;font-size:var(--_kindlychat-font-size-h4);padding:0;&:hover{opacity:0.8;}"]),Da=i.Ay.div.withConfig({componentId:"sc-1272hyw-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:var(--_kindlychat-font-size-p);align-items:center;"],e=>{let{theme:t}=e;return(0,he.w5)(t.background,"white","black")}),Fa=i.Ay.div.withConfig({componentId:"sc-1272hyw-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Ba=i.Ay.input.withConfig({componentId:"sc-1272hyw-5"})(["",""],ie.hF),Ha=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Ua(e,t){var n,o;const s=(0,Vt.jL)(),{contactDetailsButton:l,currentModal:c}=(0,Vt.GV)(u.$P),[d,f]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),g=(0,r.useRef)(null),m=(0,i.DP)(),b=null==l||null===(n=l.contact_details)||void 0===n?void 0:n.contact_type,{label:v,placeholder:y}=null!==(o=null==l?void 0:l.contact_details)&&void 0!==o?o:{},x=(0,r.useMemo)(()=>(0,he.w5)(m.background,a.Tj.grayColor,a.Tj.darkColor),[m.background]),w=()=>{s((0,re.V$)())};return(0,P.jsxs)(za,{ref:t,inert:!!c,children:[(0,P.jsx)("span",{}),(0,P.jsxs)(Ra,{$hasSubmitted:p,children:[(0,P.jsxs)(Da,{children:[b&&(0,P.jsx)($a,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:w,"data-testid":"minimize-chat-button","data-cy":"minimize-chat-button",children:(0,P.jsx)(Ie.US,{width:25,height:12,color:x})}),v]}),(0,P.jsxs)(Fa,{children:[(0,P.jsx)(ie.A0,{children:(0,P.jsx)(Ba,{onChange:e=>{f(e.target.value)},value:d,type:b===Ha.EMAIL?"email":"tel",ref:g,placeholder:y,required:!0})}),(0,P.jsx)(vo,{onClick:e=>{var t,n;return h(!0),!(null==g||null===(t=g.current)||void 0===t||null===(n=t.validity)||void 0===n||!n.valid||(e.preventDefault(),s((0,re.j3)(l,d)),w(),1))},type:"submit",$active:!0,title:"Send your "+(b===Ha.EMAIL?"email address":"phone number"),"data-testid":"send-contact-details-button",children:(0,P.jsx)(Ie.qx,{width:24,height:24})})]})]})]})}const Va=(0,r.forwardRef)(Ua);var Wa=n(4097);const Ga=i.Ay.div.withConfig({componentId:"sc-14jnerp-0"})(["left:0;right:0;top:","px;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],zo.$A,e=>e.theme.headerBackground,e=>e.theme.headerBackground,a.Tj.shadowColor,y.yu),qa=i.Ay.div.withConfig({componentId:"sc-14jnerp-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);transition:opacity 0.3s ease;","[inert] &{opacity:0.4;}"],Ga),Ka=i.Ay.span.withConfig({componentId:"sc-14jnerp-2"})(["font-weight:600;"]),Ya=(0,i.Ay)(L.H3).withConfig({componentId:"sc-14jnerp-3"})(["margin:0;color:",";"," font-size:var(--_kindlychat-font-size-m);font-weight:normal;line-height:24px;"],e=>e.theme.headerText,e=>{let{$shouldTruncate:t}=e;return t&&"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"}),Xa=(0,i.Ay)(ie.N_).withConfig({componentId:"sc-14jnerp-4"})(["color:",";",""],e=>e.theme.headerText,e=>{let{$dontShrink:t}=e;return t&&"flex-shrink: 0;"}),Qa=(0,i.i7)(["from{background-position:-180px;}to{background-position:180px;}"]),Za=(0,i.i7)(["from{background-position:180px;}to{background-position:-180px;}"]),Ja=i.Ay.div.withConfig({componentId:"sc-14jnerp-5"})(["position:relative;border:0;"]),es=i.Ay.span.withConfig({componentId:"sc-14jnerp-6"})(["opacity:1;height:3px;width:100%;position:absolute;background-image:linear-gradient( 90deg,rgba(255,255,255,0) 25%,"," 45%,"," 55%,rgba(255,255,255,0) 75% );animation:1.3s linear "," infinite 0s;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,e=>{let{$hasCancelled:t}=e;return t?Za:Qa}),ts=3e3;let ns,rs;function os(e){let{waitTimeInMinutes:t,queuePosition:n,handoverQueueText:r,estimatedTimeText:o,queuePositionText:i}=e;return Number.isInteger(n)&&i?(0,P.jsxs)("span",{children:[i,": ",(0,P.jsx)(Ka,{children:n})]}):Number.isInteger(t)&&o?(0,P.jsxs)("span",{children:[o," ",(0,P.jsxs)(Ka,{children:[t," min"]})]}):(0,P.jsx)("span",{children:r})}function is(){const[e,t]=(0,r.useState)(!1),{currentLanguageCode:n}=(0,de.A)(),{botKey:o,currentModal:i}=(0,c.d4)(u.$P),{showTakeoverQueue:a}=(0,c.d4)(u.Od),{requestedHandoverAt:s,handoverWaitTimeEstimate:l,handoverQueuePosition:d,takeoverClosed:f,takenOver:p,name:h}=(0,c.d4)(u.MA),g=(0,c.wA)();(0,r.useEffect)(()=>{rs!==p&&p?(ns=n,rs=p):void 0===ns||ns===n||p||(kn.A.getInstance().getConnection().restart(!0),ns=void 0,rs=void 0)},[f,p,s,o,n,g]);const{takeover_queue_text:m,takeover_queue_link:b,leave_queue_text:v,leave_queue_link:y,estimated_time_text:x,queue_position_text:w,chatting_with_agent_text:k,user_end_handover_button_text:C}=(0,dn.A)();if((0,r.useEffect)(()=>{const n=setTimeout(()=>{e&&(g((0,re.cL)()),t(!1))},ts);return e||clearTimeout(n),()=>clearTimeout(n)},[e,g]),p){const e=`${k} ${h||"a human"}`;return(0,P.jsx)(Ga,{inert:!!i,children:(0,P.jsxs)(qa,{children:[(0,P.jsx)(Ya,{$shouldTruncate:!0,title:e,children:e})," ",(0,P.jsx)(Xa,{$dontShrink:!0,onClick:()=>g((0,re.zn)("END_HANDOVER")),children:C})]})})}if(!a)return null;if(!Boolean(s)||f||p)return null;const S="number"==typeof l?Math.max((_=l,Math.ceil(_/60/1e3)),1):void 0;var _;return(0,P.jsxs)(Ga,{children:[(0,P.jsx)(qa,{"aria-live":"polite","aria-atomic":"true","data-testid":"handover-queue",children:e?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ya,{children:v}),(0,P.jsx)(Xa,{onClick:()=>t(!1),"data-testid":"handover-queue-link",children:y})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ya,{children:(0,P.jsx)(os,{estimatedTimeText:x,handoverQueueText:m,queuePositionText:w,queuePosition:d,waitTimeInMinutes:S})}),(0,P.jsx)(Xa,{onClick:()=>t(!0),"data-testid":"handover-queue-link",children:b})]})}),(0,P.jsx)(Ja,{children:(0,P.jsx)(es,{$hasCancelled:e})})]})}const as=(0,i.i7)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),ss=(0,i.AH)(["",";animation-name:",";"],(0,y.qL)(),as),ls=i.Ay.div.withConfig({componentId:"sc-fbtzdd-0"})(["z-index:25;margin:8px;display:flex;padding:6px;justify-content:space-between;border-radius:6px;background-color:white;color:",";box-shadow:0px 0px 1px rgba(0,0,0,0.24),0px 2px 6px rgba(0,0,0,0.04);max-height:1000px;max-width:",";width:calc(100% - 16px);margin-left:auto;margin-right:auto;position:absolute;left:0;right:0;top:0;",";",";&[inert]{user-select:none;}"],a.Tj.primaryColor,a.mb.tablet,e=>{const t=e.$quantity-1===e.$index;return`\n transition:\n top 150ms ease,\n scale 200ms ease ${t?0:100}ms,\n ${!t&&"max-height 100ms ease 100ms"};\n top: ${8*e.$index+(e.$hasTopMargin?0:55)}px;\n scale: ${1-.05*(e.$quantity-1-e.$index)};\n ${!t&&"\n max-height: 10px;\n overflow: hidden;\n "}\n `},ss),cs=i.Ay.div.withConfig({componentId:"sc-fbtzdd-1"})(["flex:0;flex-basis:auto;align-self:center;margin-left:6px;margin-right:6px;"]),us=(0,i.Ay)(L.fz).withConfig({componentId:"sc-fbtzdd-2"})(["flex:1;margin:0;font-size:var(--_kindlychat-font-size-p);display:inline-block;padding:6px;"]),ds=(0,i.Ay)(Go.A).withConfig({componentId:"sc-fbtzdd-3"})(["margin-top:8px;font-weight:500;font-size:var(--_kindlychat-font-size-p);"]),fs=(0,i.Ay)(ie.$n).withConfig({componentId:"sc-fbtzdd-4"})(["flex:0;flex-basis:auto;z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}"]),ps=n(9907).env.STORYBOOK?0:2e3,hs=i.Ay.button.withConfig({componentId:"sc-iju6vd-0"})(["border:none;margin:0;text-decoration:none;font-family:inherit;font-size:inherit;line-height:inherit;cursor:pointer;transition:background 250ms ease-in-out,transform 150ms ease;appearance:none;&:hover,&:focus{background:#edf2f7;}&:focus{outline:medium auto currentColor;outline:5px auto -webkit-focus-ring-color;}background:#f7fafc;border-radius:4px;display:inline-block;svg{vertical-align:sub;}"]),gs=function(e){let{children:t,href:n,fallback:r,...o}=e;const i=(a=(0,c.wA)(),{"#settings/language-select":{icon:(0,P.jsx)(Ie.Ze,{width:16,height:16}),onClick:()=>{a((0,re.wQ)("SELECT_LANGUAGE")),a((0,re.Fe)(l.Jm.LANGUAGE_SWITCH))}}})[n];var a;return i?(0,P.jsxs)(hs,{...o,onClick:i.onClick,children:[i.icon," ",t]}):r||null};function ms(e){if(!e)return null;const t=[];let n=0;function r(e){e.length>0&&(t.push((0,P.jsx)("span",{children:e},n)),n+=e.length)}const o=/\[([^\\\]]+(?:\\.[^\\\]]*)*)\]\(([^)]+)\)/g;let i=o.exec(e);for(;null!==i;){const a=i[1],s=i[2];r(e.substring(n,i.index)),t.push((0,P.jsx)(gs,{href:s,fallback:`[${a}](${s})`,children:a},n+i.index)),n=i.index+i[0].length,i=o.exec(e)}return r(e.substring(n)),t}const bs={language:Ie.U};function vs(){const{chatHasStarted:e,overlayViews:t}=(0,c.d4)(u.$P),n=function(e){const[t,n]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{const t=setTimeout(()=>n(!1),e);return()=>clearTimeout(t)},[e]),e=>!t&&e()}(e?0:ps),{notifications:o}=(0,c.d4)(u.Hk),i=t.length>0,a=o.filter(e=>!e.dismissed).slice(-3),s=(0,c.wA)(),l=i,d=e=>t=>{t.stopPropagation(),s((0,re.Fe)(e))};if(null==a||!a.length)return null;const f=a.length;return n(()=>(0,P.jsx)(P.Fragment,{children:a.map((e,t)=>{let{id:n,content:r,buttonHref:o,buttonText:i,icon:a}=e;const s=t===f-1,c=s?void 0:-1,u=bs[a];return(0,P.jsxs)(ls,{"aria-live":s?"polite":void 0,"aria-atomic":s?"true":void 0,"aria-hidden":s?void 0:"true",inert:s?void 0:"",role:s?"alert":void 0,tabIndex:c,$hasTopMargin:l,$index:t,$quantity:f,children:[u&&(0,P.jsx)(cs,{children:(0,P.jsx)(u,{width:24,height:24})}),(0,P.jsxs)(us,{children:[ms(r),o&&i&&(0,P.jsx)(ds,{href:o,tabIndex:c,isSecondaryButton:!0,children:i})]}),(0,P.jsx)(fs,{"aria-label":"Dismiss notification",title:"Dismiss notification",onClick:d(n),disabled:!s,type:"button",children:(0,P.jsx)(Ie.WI,{})})]},n)})}))}var ys=n(3649),xs=n(8395);const ws=(e,t)=>{let{botId:n,currentLanguage:r,chatId:o}=t;return e.from_bot||e.sender||!e.id.startsWith("tempId-")?e:{botId:n,chatId:o,chat_source:(0,x.A)()?l.Je.WEB_MOBILE:l.Je.WEB,currentLanguage:r,from_bot:!1,sender:l.bS.USER,...(0,Hn.A)("buttonType","buttons")(e)}},{focusTrapOnFullView:ks}=ri.Z,Cs=["SCRIPT","STYLE","LINK","META"],Ss=()=>{var e;const t=Array.from(document.body.children),n=window.document.getElementById(null===(e=window.kindlyChat)||void 0===e?void 0:e.API_NODE_ID);n&&t.forEach(e=>{e.contains(n)||U()(Cs).call(Cs,e.tagName)||e.hasAttribute("inert")||(e.setAttribute("inert",""),e.setAttribute("data-kindly-inert",""))})},_s=()=>{document.querySelectorAll("[data-kindly-inert]").forEach(e=>{e.removeAttribute("inert"),e.removeAttribute("data-kindly-inert")})},As=(0,i.Ay)(pi).withConfig({componentId:"sc-19qip4y-0"})(["display:flex;min-height:",";padding:16px;gap:24px;flex-direction:column;justify-content:",";border-radius:",";",";view-transition-name:'feedback-end-chat-1723461511841';"],e=>{let{$isFullHeight:t}=e;return t?"100%":"clamp(120px, 25%, 600px)"},e=>{let{$isFullHeight:t,$justifyCenter:n}=e;return t||n?"center":"space-between"},e=>{let{$isFullHeight:t}=e;return t&&"unset"},e=>{let{$isFullHeight:t}=e;return t&&"border: none"});var Es=n(340);const Ts=()=>(0,P.jsx)(As,{children:(0,P.jsx)(Es.A,{})});function js(e){let{color:t="#0D0D0D"}=e;return(0,P.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,P.jsx)("path",{d:"M15.75 8.75L19.25 12L15.75 15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M19 12H10.75",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25H15.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Is=(0,i.Ay)(pi).withConfig({componentId:"sc-1e1ck6u-0"})(["display:flex;gap:24px;flex-direction:column;"]),Os=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-1"})(["display:flex;gap:8px;flex-direction:column;font-size:var(--_kindlychat-font-size-p);> p{margin:0;}"]),Ls=i.Ay.h3.withConfig({componentId:"sc-1e1ck6u-2"})(["margin:0;display:flex;gap:4px;align-items:center;font-size:var(--_kindlychat-font-size-p);font-weight:500;"]),Ps=i.Ay.div.withConfig({componentId:"sc-1e1ck6u-3"})(["display:flex;gap:8px;> button{flex:1;}"]);function Ns(e){let{handleCancel:t,handleEndHumanChat:n,descriptionText:r,titleText:o,cancelButtonText:i,confirmButtonText:a}=e;return(0,P.jsxs)(Is,{children:[(0,P.jsxs)(Os,{children:[(0,P.jsxs)(Ls,{children:[(0,P.jsx)(js,{color:"var(--panel-background-white-black-contrast-1743170834)"}),o]}),(0,P.jsx)("p",{children:r})]}),(0,P.jsxs)(Ps,{children:[(0,P.jsx)(Go.A,{isSecondaryButton:!0,onClick:t,children:i}),(0,P.jsx)(Go.A,{onClick:n,children:a})]})]})}function Ms(e){let{buttonHandlers:t,onMessage:n=null}=e;const o=(0,c.Pj)(),i=(0,Vt.jL)(),a=(0,r.useRef)(null),s=(0,r.useRef)(null),l=(0,r.useRef)(null),{hideHeader:d,fullscreenMode:f,offsetHeight:p,id:h}=(0,Vt.GV)(u.Od),{active:g,chatHasStarted:m,currentlyPoppedUp:b,contactDetailsButton:v,currentLanguage:y,currentModal:x,overlayViews:w,isChatFullWindow:k}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{chatMessages:C}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),S=function(e){const t=(0,ne.A)(e),n=(e||[]).length;let r;return n&&n!==(t||[]).length&&(r=e[n-1]),r}(C),{feedbackToDisplay:_,feedbackToSubmit:A}=(0,ys.A)(),{cancel_button:E,user_end_handover_button_text:T,user_end_handover_modal_title_text:j,user_end_handover_modal_description_text:I}=(0,dn.A)(),[L,N]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(L)return void N(!1);if(!S)return;const e=o.getState(),{chatMessages:t,attachments:r}=e.messages,{chatId:i,renderedBy:a}=e.chatbubble,{token:s}=e.connection,{PAT_HOST:l}=e.environment,c=t.map(e=>(0,xs.A)(e,r,l,s)),u=(0,xs.A)(S,r,l,s);(0,je.GJ)(ws(u,{botId:h,currentLanguage:y,chatId:i}),c,n,a)},[L,n,S,h,o,C.length]);const M=C.length>=3,z=w[w.length-1],R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user";_&&"CANCEL_CHAT"===z&&M?(i((0,si.WG)({ratingSystem:_.rating_scale.rating_system,triggerType:_.trigger_type,formTitle:_.form_title,step:"RATING_SCALE"})),i((0,re.wQ)("FEEDBACK"))):((0,je.tf)("end-chat",void 0,{storeState:o.getState(),source:e}),i((0,re.ky)(f)),i((0,re.zn)(null)))},{descriptionTextHtml:$,buttonText:D,accessRequestText:F}=(0,pa.A)(y);return function(e){const{isChatFullWindow:t,renderedBy:n}=(0,c.d4)(u.$P),o=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(e.current&&ks&&"API"===n)return o.current!==t&&(o.current=t,t?Ss():_s()),_s},[e,t])}(l),(0,P.jsx)(O,{"aria-live":"polite","data-cy":"chat-box","data-testid":"chat-box",ref:l,$active:g,$chatHasStarted:m,$fullscreen:!!f,$isChatFullWindow:k,$offsetHeight:p,children:(0,P.jsxs)(Wa.A,{errorPoint:"inside ChatBoxContainer",children:[!d&&(0,P.jsx)(Ro,{handleXButtonClick:()=>{"CANCEL_CHAT"!==z&&"FEEDBACK"!==z?i((0,re.wQ)("CANCEL_CHAT")):R()},settingsButtonRef:s}),!!z&&(0,P.jsx)(Ma,{endChat:R,feedbackToSubmit:A}),(0,P.jsx)(ce,{}),(0,P.jsx)(is,{}),(0,P.jsx)(vs,{}),(0,P.jsx)(ro,{bodyRef:a,buttonHandlers:t,inert:!!z||!!x}),v?(0,P.jsx)(Va,{}):(0,P.jsx)(Po,{active:g,chatHasStarted:m,currentlyPoppedUp:b,bodyRef:a,inert:!!z||!!x}),"FEEDBACK_END_CHAT"===x&&(0,P.jsx)(Ts,{}),"END_HANDOVER"===x&&(0,P.jsx)(Ns,{handleCancel:()=>i((0,re.zn)(null)),handleEndHumanChat:async()=>{await i((0,re.m8)()),i((0,re.zn)(null))},titleText:null!=j?j:"",descriptionText:null!=I?I:"",cancelButtonText:null!=E?E:"",confirmButtonText:null!=T?T:""}),"COMPLIANCE"===x&&(0,P.jsx)(La,{descriptionTextHtml:$,buttonText:D,accessRequestText:F}),("END_CHAT"===x||"handover_conversation"===(null==A?void 0:A.trigger_type)&&"FEEDBACK_END_HANDOVER"===x)&&(0,P.jsx)(Ni,{feedbackToSubmit:A,shouldEndChat:!("END_CHAT"!==x),endChat:R})]})})}Ms.displayName="KindlyChatBox";var zs=n(3473);const Rs=(e,t)=>Object.entries(e).filter(e=>{let[t,n]=e;return"object"==typeof n}).reduce((e,n)=>{let[r,o]=n;return{...e,[r]:(0,Rr.A)(o,t)}},{}),$s=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),Ds=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let Fs=!1;function Bs(e){const t=document.title;let n;n||Fs||(Fs=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",function e(){clearInterval(n),document.title=t,n=null,Fs=!1,window.removeEventListener("mousemove",e)}))}var Hs=n(9270),Us=n(7912),Vs=n(3821),Ws=n(4497);const Gs=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en};var qs=n(1576);const Ks=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[(0,qs.A)(n)]:r}},{})};function Ys(e){let{settings:t}=e;const n=(0,Vt.jL)(),{currentLanguageCode:o}=(0,de.A)(),{inspectorOpen:i}=(0,Vt.GV)(e=>{let{inspector:t}=e;return t}),{chatMessages:a}=(0,Vt.GV)(e=>{let{messages:t}=e;return t}),d=(0,r.useRef)(null),f=(0,ne.A)(a),p=localStorage.getItem("kindly-chat-restart-message"),h=(0,Us.A)(t,"zIndex",l.DP);(0,r.useEffect)(()=>{if(0===(null==f?void 0:f.length)&&1===(null==a?void 0:a.length)&&p){const{message:e,exchangeId:t,newContext:r}=JSON.parse(p);localStorage.removeItem("kindly-chat-restart-message"),n((0,Hs.y2)(e,t,r))}},[n,a,f,p]),function(){const{tabNotification:e,name:t}=(0,c.d4)(u.Od),{showTabNotification:n}=(0,c.d4)(u.Cv),{currentLanguageCode:o}=(0,de.A)(),{takenOver:i}=(0,c.d4)(u.MA),{agent:a}=(0,c.d4)(u.zD),s=(0,ne.A)(i);(0,r.useEffect)(()=>{var r;e&&n&&Bs((null!==(r=null==$s?void 0:$s[o])&&void 0!==r?r:$s.en)(t||"Kindly"))},[o,e,n,t]),(0,r.useEffect)(()=>{const e=Boolean(null==a?void 0:a.name);var t;s!==i&&i&&e&&Bs(null!==(t=null==Ds?void 0:Ds[o])&&void 0!==t?t:Ds.en)},[i,a,s,o])}(),function(){const e=(0,Vt.jL)(),{currentLanguage:t,active:n}=(0,Vt.GV)(u.$P),{maintenanceAlertEnabled:o,maintenanceAlert:i}=(0,Vt.GV)(u.Od);(0,r.useEffect)(()=>{if(!n||!o)return;const{text_content:r,link_location:a,link_text:s}=Rs(i,t);e((0,re.cC)({content:r,buttonText:s,buttonHref:a,once:!0},l.Jm.MAINTENANCE))},[n,t,e,i,o])}(),function(e){const t=(0,c.wA)(),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!e)return;const r=e.current;if(!r)return;const o=document.body||document.documentElement,i=()=>{const e=function(e){if(!e)return!1;const{width:t,height:n}=e.getBoundingClientRect();return t>=window.innerWidth&&n>=window.innerHeight}(r);e!==n.current&&(n.current=e,(e=>{t((0,$o.w7)(e)),e?o.classList.add("kindly-overflow-hidden"):o.classList.remove("kindly-overflow-hidden")})(e))};setTimeout(()=>i(),zs.X+10);const a=new ResizeObserver(i);return a.observe(r),()=>{t((0,$o.w7)(!1)),o.classList.remove("kindly-overflow-hidden"),a.disconnect()}},[t,e])}(d),function(e){const t=(0,r.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=(0,r.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);(0,r.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(d),function(){const e=(0,Vt.jL)(),{chatHasStarted:t}=(0,Vt.GV)(e=>{let{chatbubble:t}=e;return t}),{welcomePageType:n}=(0,Vt.GV)(u.Od);(0,r.useEffect)(()=>{!t&&n!==l.Lb.NONE&&e((0,re.wQ)("WELCOME_PAGE"))},[t,n,e])}(),function(){const e=(0,Vt.jL)(),t=(0,Vt.GV)(e=>e.announcement),n=(0,Vt.GV)(e=>e.bot),o=(0,Vt.GV)(e=>e.chatbubble),i=(0,r.useCallback)(()=>{if(!t.show){const t={text:Gs(n,o,Ws.WJ.OFFLINE),alertType:Ws.uV.WARNING};null==e||e({type:Vs.Y,payload:t})}},[t.show,n,o,e]);(0,r.useEffect)(()=>{window.navigator.onLine||i()},[i]),(0,co.A)("online",()=>{if(t.show){if(o.chatHasStarted&&kn.A.getInstance().getIsInitialized()){const e=kn.A.getInstance().getConnection();null!=e&&e.getToken()&&e.connect()}null==e||e({type:Vs.n})}}),(0,co.A)("offline",i)}();const g=(0,r.useMemo)(()=>Ks(t.buttonHandlers),[t.buttonHandlers]);return(0,P.jsxs)(s,{id:"chatContainer",ref:d,className:"chat-container",role:"complementary",$zIndex:h,"data-testid":"chat-box-container",lang:o,$inspectorOpen:i,children:[(0,P.jsx)(Ms,{buttonHandlers:g,onMessage:t.onMessage}),i&&(0,P.jsx)(oe,{})]})}},8832:(e,t,n)=>{"use strict";n.d(t,{$n:()=>f,A0:()=>p,Bi:()=>c,D7:()=>b,N_:()=>u,hF:()=>m,k5:()=>d});var r=n(1197),o=n(8663),i=n(8668),a=n(4785),s=n(8787),l=n(1708);const c=r.Ay.button.withConfig({componentId:"sc-o7eiww-0"})(["all:unset;cursor:pointer;outline:revert;"]),u=r.Ay.a.withConfig({componentId:"sc-o7eiww-1"})(["text-decoration:underline;cursor:pointer;",""],s.sF),d=(0,r.AH)(["border:0;text-align:center;border-radius:6px;font-weight:normal;background:none;cursor:pointer;text-transform:none;transition:all 0.2s ease;"]),f=r.Ay.button.withConfig({componentId:"sc-o7eiww-2"})([""," ",""],d,s.sF),p=r.Ay.div.withConfig({componentId:"sc-o7eiww-3"})(["position:relative;overflow:",";max-height:83px;min-height:",";height:","px;width:100%;min-width:0;"],e=>{let{$hasFiles:t}=e;return t?"visible":"hidden"},e=>{let{$initialHeight:t}=e;return`${(null!=t?t:0)+1}px`},e=>e.$active?e.$targetHeight:e.$initialHeight),h=(0,r.AH)(["max-height:41px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]),g=(0,r.AH)(["",";font-size:",";"],e=>!e.$active&&"max-height: 44px;",l.J.input),m=(0,r.AH)(["position:relative;z-index:2;margin-bottom:0;color:",";font-size:var(--_kindlychat-font-size-p);line-height:20px;padding:7px 50px 8px 16px;"," background-image:none;resize:none;box-shadow:none;border-radius:18px;max-height:83px;font-family:",";width:100%;min-height:0;border:1px solid transparent;transition:transform 0.3s ease;",";",";@media ","{","}"," &:focus{color:",";box-shadow:none;border:1px solid ",";","}&:focus-visible{outline:none;}::placeholder{color:",";opacity:0.5;}"],e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,s.Mo)(t.background,.08)},a.m.default,e=>e.$hide&&"transform: translateY(-60px)",e=>!e.$active&&h,l.jO.maxTablet,g,(0,i.A)()&&g,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFFFFF","#000000")},e=>{let{theme:t}=e;return(0,o.w5)(t.background,"rgba(255, 255, 255, 0.12)","rgba(0, 0, 0, 0.12)")},s.sF,e=>{let{theme:t}=e;return(0,o.w5)(t.background,"#FFF","#000")}),b=(0,r.AH)(["position:relative;&:before{content:'';left:0;right:20px;top:-15px;z-index:1;height:20px;position:absolute;background:linear-gradient( 0deg,"," 0%,"," 25%,rgba(248,248,248,0) 100% );opacity:1;transition:opacity linear 300ms;","}"],e=>e.theme.background,e=>e.theme.background,e=>{let{$inspectorOpen:t}=e;return t?"height: 0":""})},8833:(e,t,n)=>{"use strict";n.d(t,{R7:()=>C,RY:()=>k,Rm:()=>j,Sz:()=>x,TP:()=>I,c9:()=>w,et:()=>T,ez:()=>O,m8:()=>S,zX:()=>_});var r=n(9749),o=n.n(r),i=n(7931),a=n(5352),s=n(9449),l=n(4174),c=n(9990),u=n(9011),d=n(1970),f=n(5392),p=n(6885),h=n(485),g=n(6122),m=n(8094),b=n(3178),v=n(6834),y=n(4668);const x=()=>(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{acceptanceText:o,revokePermissionText:a}=(0,d.A)(n);e((0,y.Fu)({wasRevoked:!1})),"COMPLIANCE"===r&&e((0,v.zn)(null));const s=`\n ${o}\n <br>\n <span data-kindly-action="${i.Y$.REVOKE_PERMISSION}" style="cursor: pointer; text-decoration: underline;">${a}</span>`.trim();e({type:m.z2,payload:{message:s,system_dialogue_message_type:i.zV.COMPLIANCE}})},w=(e,t)=>{const{currentLanguage:n}=t().chatbubble,{isEnabled:r}=(0,d.A)(n);r&&(e((0,v.zn)("COMPLIANCE")),e((0,y.Fu)({wasRevoked:!0})))},k=(e,t)=>{const{currentLanguage:n,currentModal:r}=t().chatbubble,{isEnabled:o}=(0,d.A)(n);o||"COMPLIANCE"!==r||(e((0,y.Fu)({wasRevoked:!1})),e((0,v.zn)(null)))},C=e=>async(t,n)=>{const{connection:{token:r},environment:{PAT_HOST:o}}=n();return r?fetch(`${o}/chatbubble/${a.Ak}/user_left/`,{method:"PATCH",...(0,c.A)({token:r,botKey:e})}):null},S=()=>async(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:r},auth:{fullName:o}}=t();return n?fetch(`${r}/chatbubble/${a.Ak}/handover_cancel/`,{method:"POST",body:JSON.stringify({source:o}),...(0,c.A)({token:n},{extra:{"Content-Type":"application/json"}})}):null},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async(n,r)=>{const{agent:{takenOver:o,requestedHandoverAt:i},chatbubble:{active:s,chatHasStarted:l}}=r();t||n({type:g.d$,chatHasStarted:!1}),i?n({type:p.MM}):o&&n({type:p.II,data:{taken_over:!1}}),n({type:b.a1}),n(C(e)),n({type:h.wk});try{s&&!t?n({type:g.uS}):l&&n({type:g.kA})}catch(e){console.warn(e)}finally{n((0,f.F)(a.Jm.LANGUAGE_SWITCH)),n({type:g.CB,botKey:e,keepOpen:t})}}},A=Object.freeze({MAX:3,TIMEOUT_MS:2e3,TIMEOUT_MULTIPLIER:2,RESPONSE_STATUSES:[401,403]});let E=0;const T=function(e,t){let{onError:n,restartOnError:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async i=>{if(!e)return console.error("Tried to call transport without supplying url"),null;if(!t.method)return console.error("Tried to call transport without supplying method"),null;t.headers={"kindly-chat-version":"2.81.9",[s.B]:(0,s.U)(),...t.headers||{}};try{const n=await fetch(e,{...t,...t.body&&{body:t.body instanceof ArrayBuffer?t.body:JSON.stringify(t.body)},headers:{"Content-Type":"application/json",...t.headers&&{...t.headers}}});if(!(t.body instanceof ArrayBuffer)){const e=await n.json();return{status:n.status,statusText:n.statusText,ok:n.ok,data:e}}return n}catch(e){return n?n(e,t):r?i(((e,t)=>function(){var n,r,i,a;if(!e.response||!o()(n=A.RESPONSE_STATUSES).call(n,null===(r=e.response)||void 0===r?void 0:r.status))return console.error(e),null;if(E+=1,E>A.MAX)return console.error(`${t.url} returned ${null===(a=e.response)||void 0===a?void 0:a.status}, max chats restarts exceeded`),null;console.warn(`${t.url} returned ${null===(i=e.response)||void 0===i?void 0:i.status}, starting new chat`);const s=A.TIMEOUT_MS*A.TIMEOUT_MULTIPLIER**(E-1);return setTimeout(()=>l.A.getInstance().getConnection().restart(),s),null})(e,t)):null}}},j=e=>{let{message:t,error:n,level:r="info",extra:o={}}=e;return(e,i)=>{var s;const l=i(),{connection:{token:d},environment:{PAT_HOST:f},chatbubble:{chatId:p}}=l,h={tags:{chat_id:p,bot_id:null===(s=l.bot)||void 0===s?void 0:s.id}},g=(0,u.A)({level:r,error:n,message:t,reduxState:l,extra:{...(m=o,JSON.parse(JSON.stringify(m,(e,t)=>void 0===t?"undefined 🤷‍♂️":t))),...h}});var m;e(T(`${f}/chatbubble/${a.Ak}/log`,{method:"POST",body:g,...(0,c.A)({token:d},{withCurrentUrl:!0})}))}},I=e=>t=>{t({type:m.se,messageSentTime:e})},O=()=>{const e=l.A.getInstance();e.getIsInitialized()&&e.setExpectingReply(!0)}},8853:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>0===Object.keys(e).length},8900:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},8964:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);const o=function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(null===(n=window.kindlyChat)||void 0===n?void 0:n.shadowRoot)||window;const i=(0,r.useRef)(null);(0,r.useEffect)(()=>{i.current=t},[t]),(0,r.useEffect)(()=>{if(!o||!o.addEventListener)return()=>{};const t=async e=>{var t;await(null===(t=i.current)||void 0===t?void 0:t.call(i,e))};return o.addEventListener(e,t),()=>{o.removeEventListener(e,t)}},[e,o])}},9011:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8191),o=n(1715);const i=e=>{var t,n;let{level:i="info",error:a,message:s,reduxState:l,extra:c}=e;s||null!=a&&a.message||(console.error("Attempted to log without message"),s="No error message provided");const u=(0,o.A)(l||{},r.W$),d={version:"2.81.9",release:"2.81.9",userAgent:navigator.userAgent,state:l?JSON.stringify(u):void 0,...c},f={message:null!==(t=s)&&void 0!==t?t:null==a?void 0:a.message,name:null==a?void 0:a.name,stack:null==a?void 0:a.stack,code:null==a?void 0:a.code,signal:null==a?void 0:a.signal,filename:null==a?void 0:a.filename};return{message:null!==(n=s)&&void 0!==n?n:null==a?void 0:a.message,level:i,extra:d,error:f}}},9098:(e,t,n)=>{"use strict";var r=n(8900),o=n(7013),i=n(9344),a=n(2769),s=n(4543).f,l=n(8696),c=n(8099),u=n(4572),d=n(3999),f=n(701);n(3753);var p=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,o,h,g,m,b,v,y,x,w=e.target,k=e.global,C=e.stat,S=e.proto,_=k?r:C?r[w]:r[w]&&r[w].prototype,A=k?c:c[w]||d(c,w,{})[w],E=A.prototype;for(g in t)o=!(n=l(k?g:w+(C?".":"#")+g,e.forced))&&_&&f(_,g),b=A[g],o&&(v=e.dontCallGetSet?(x=s(_,g))&&x.value:_[g]),m=o&&v?v:t[g],(n||S||typeof b!=typeof m)&&(y=e.bind&&o?u(m,r):e.wrap&&o?p(m):S&&a(m)?i(m):m,(e.sham||m&&m.sham||b&&b.sham)&&d(y,"sham",!0),d(A,g,y),S&&(f(c,h=w+"Prototype")||d(c,h,{}),d(c[h],g,m),e.real&&E&&(n||!E[g])&&d(E,g,m)))}},9154:(e,t,n)=>{"use strict";n.d(t,{A:()=>o}),n(9155);var r=n(1085);function o(e){let{...t}=e;return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,r.jsx)("path",{d:"M9.98389 9C10.0518 8.86333 10.1332 8.73454 10.2264 8.61538C10.6382 8.08862 11.2795 7.75 12 7.75C13.2426 7.75 14.25 8.75736 14.25 10C14.25 10.6275 13.9931 11.195 13.5788 11.6031C13.0782 12.0961 12.4712 12.6282 12.1769 13.2533M12 16.25V16.26M12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25Z",stroke:"#141414",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}},9155:t=>{"use strict";t.exports=e},9159:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9155);function o(e){const t=(0,r.useRef)(void 0);return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}},9205:(e,t,n)=>{"use strict";var r=n(9098),o=n(8900),i=n(4713),a=n(6100),s=n(4871),l=n(5024),c=n(4603),u=n(1203),d=n(701),f=n(4317),p=n(7235),h=n(3273),g=n(5341),m=n(1139),b=n(480),v=n(5780),y=n(8364),x=n(5116),w=n(7150),k=n(7313),C=n(4543),S=n(9989),_=n(7389),A=n(7161),E=n(3508),T=n(4358),j=n(8141),I=n(4275),O=n(5241),L=n(1268),P=n(8655),N=n(1355),M=n(4531),z=n(86),R=n(1811),$=n(8417),D=n(9809).forEach,F=I("hidden"),B="Symbol",H="prototype",U=$.set,V=$.getterFor(B),W=Object[H],G=o.Symbol,q=G&&G[H],K=o.RangeError,Y=o.TypeError,X=o.QObject,Q=C.f,Z=S.f,J=w.f,ee=A.f,te=a([].push),ne=j("symbols"),re=j("op-symbols"),oe=j("wks"),ie=!X||!X[H]||!X[H].findChild,ae=function(e,t,n){var r=Q(W,t);r&&delete W[t],Z(e,t,n),r&&e!==W&&Z(W,t,r)},se=l&&u(function(){return 7!==v(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a})?ae:Z,le=function(e,t){var n=ne[e]=v(q);return U(n,{type:B,tag:e,description:t}),l||(n.description=t),n},ce=function(e,t,n){e===W&&ce(re,t,n),p(e);var r=g(t);return p(n),d(ne,r)?(n.enumerable?(d(e,F)&&e[F][r]&&(e[F][r]=!1),n=v(n,{enumerable:b(0,!1)})):(d(e,F)||Z(e,F,b(1,v(null))),e[F][r]=!0),se(e,r,n)):Z(e,r,n)},ue=function(e,t){p(e);var n=h(t),r=y(n).concat(he(n));return D(r,function(t){l&&!i(de,n,t)||ce(e,t,n[t])}),e},de=function(e){var t=g(e),n=i(ee,this,t);return!(this===W&&d(ne,t)&&!d(re,t))&&(!(n||!d(this,t)||!d(ne,t)||d(this,F)&&this[F][t])||n)},fe=function(e,t){var n=h(e),r=g(t);if(n!==W||!d(ne,r)||d(re,r)){var o=Q(n,r);return!o||!d(ne,r)||d(n,F)&&n[F][r]||(o.enumerable=!0),o}},pe=function(e){var t=J(h(e)),n=[];return D(t,function(e){d(ne,e)||d(O,e)||te(n,e)}),n},he=function(e){var t=e===W,n=J(t?re:h(e)),r=[];return D(n,function(e){!d(ne,e)||t&&!d(W,e)||te(r,ne[e])}),r};c||(E(q=(G=function(){if(f(q,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=L(e),n=function(e){var r=void 0===this?o:this;r===W&&i(n,re,e),d(r,F)&&d(r[F],t)&&(r[F][t]=!1);var a=b(1,e);try{se(r,t,a)}catch(e){if(!(e instanceof K))throw e;ae(r,t,a)}};return l&&ie&&se(W,t,{configurable:!0,set:n}),le(t,e)})[H],"toString",function(){return V(this).tag}),E(G,"withoutSetter",function(e){return le(L(e),e)}),A.f=de,S.f=ce,_.f=ue,C.f=fe,x.f=w.f=pe,k.f=he,N.f=function(e){return le(P(e),e)},l&&(T(q,"description",{configurable:!0,get:function(){return V(this).description}}),s||E(W,"propertyIsEnumerable",de,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),D(y(oe),function(e){M(e)}),r({target:B,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(e,t){return void 0===t?v(e):ue(v(e),t)},defineProperty:ce,defineProperties:ue,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pe}),z(),R(G,B),O[F]=!0},9239:(e,t,n)=>{"use strict";n(9205),n(2002),n(960),n(1210),n(5785)},9245:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(7251),o=n(5352),i=n(1304),a=n(9990);const s=(0,r.zD)("feedback/sendToPat",async(e,t)=>{let{getState:n,dispatch:r,rejectWithValue:s}=t;const{connection:{token:l},environment:{PAT_HOST:c}}=n();try{const t=await r((0,i.et)(`${c}/chatbubble/${o.Ak}/feedback`,{method:"POST",body:{feedback:e},...(0,a.A)({token:l})}));if(!t.ok)throw new Error(`Feedback submission failed with status: ${t.status}`);return t.data.data.id}catch(e){return s(e.message)}})},9258:(e,t,n)=>{"use strict";var r=n(4713),o=n(2769),i=n(262),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},9270:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>L,Bu:()=>S,Zn:()=>T,aP:()=>k,j3:()=>P,pA:()=>M,qJ:()=>z,tM:()=>C,y2:()=>_,zh:()=>j});var r=n(786),o=n(4557),i=n(5352),a=n(4174),s=n(9990),l=n(893),c=n(8256),u=n(27),d=n(9492),f=n(8068),p=n(8317),h=n(339),g=n(6834),m=n(8833),b=n(1576),v=n(485),y=n(6122),x=n(8094);const w=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:i}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:i}},k=(e,t,n)=>(r,o)=>{a.A.getInstance().getConnection().restart(!0),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},C=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:a}=w(r),l=await n((0,h.z5)()),{headers:c}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:l}),u={message:e,temporaryId:t},f=await n((0,m.et)(`${o}/chatbubble/${i.Ak}/message/`,{method:"POST",body:u,headers:c},{onError:e=>{var r;n({type:x.pz,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));(0,d.A)(f)||n({type:x.pz,...f.data})},S=e=>t=>{t({type:x.QA,formData:e})},_=function(e,t,n){let{responsePromise:a,tempId:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return async(f,p)=>{const{PAT_HOST:b}=w(p);let{token:y,local:k,forms:C}=w(p);if(!y){const{shouldOpenChat:e}=u;e&&(f((0,g.mN)()),f((0,g.lQ)({source:"programmatic"}))),({token:y,local:k,forms:C}=w(p))}const _=await f((0,h.z5)()),{headers:A}=(0,s.A)({token:y},{withCurrentUrl:!0,extra:_});C&&Object.values(C).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.KN.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.KN.UNANSWERED};f((0,m.et)(`${b}/chatbubble/${i.Ak}/form/submit`,{method:"POST",body:t,headers:A})),f(S({...e,formSubmitState:o.KN.UNANSWERED}))}});const E=l||`tempId-${(0,r.A)()}`;f({type:x.tq,data:{id:E,created:(new Date).toISOString(),message:e,buttonType:c}}),f((0,m.TP)((new Date).toISOString()));const T={message:e,exchange_id:t,temporaryId:E,new_context:{...k.context,...n||{}}};(0,m.ez)();const j=a?await a:await f((0,m.et)(`${b}/chatbubble/${i.Ak}/message/`,{method:"POST",body:T,headers:A},{onError:e=>{var t,n;console.error(`/chatbubble/${i.Ak}/message returned ${null==e||null===(t=e.response)||void 0===t?void 0:t.status}`),f({type:x.pz,temporaryId:E,status:null==e||null===(n=e.response)||void 0===n?void 0:n.status}),f({type:v.wk})}}));(0,d.A)(j)||f({type:x.pz,...j.data})}},A=e=>({...e,temporaryId:`tempId-${(0,r.A)()}`}),E=e=>{let{temporaryId:t}=e;return t},T=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:a,attachments:l},connection:{token:p},environment:{PAT_HOST:g}}=t(),b=await e((0,h.z5)()),{headers:v}=(0,s.A)({token:p},{extra:b}),w=`tempId-${(0,r.A)()}`,k=l.files.map(A).map((0,u.A)("file"));e({type:x.Os,data:{attachments:k}}),e({type:y.Q4}),e({type:x.tq,data:{id:w,created:(new Date).toISOString(),attachment_ids:k.map(E),message:""}}),e((0,m.TP)((new Date).toISOString()));const C=(t,n)=>{var r;e({type:x.pz,temporaryId:w,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:x.wP,attachment:{...n,status:i.Le.ERROR}}):k.forEach(t=>e({type:x.wP,attachment:{...t,status:i.Le.ERROR}}))},S=k.map((0,u.A)("file","url")),_=`${g}/chatbubble/${i.Ak}/attachment/create`,T={attachments:S,temporaryChatMessageId:w},j=await e((0,m.et)(_,{method:"POST",body:T,headers:v},{onError:e=>C(e)}));if((0,d.A)(j)||!Array.isArray(null==j||null===(n=j.data)||void 0===n?void 0:n.attachments))return;const[I,O]=j.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:i,temporary_id:a,upload_url:s}=n;return e({type:x.wP,attachment:{temporaryId:a,id:i}}),[[...r,i],[...o,s]]},[[],[]]),L={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":a},P=(0,f.A)(l.files,O).map(async t=>{let[{file:n,...r},o]=t;const i=await(0,c.Bu)(n),a={...L,"Content-Type":n.type};return await e((0,m.et)(o,{method:"PUT",body:i,headers:a},{onError:e=>C(e,r)}))}),N=await Promise.all(P);if(N.some(e=>void 0===e))return;if(N.some(d.A))return;const M=`${g}/chatbubble/${i.Ak}/attachment/uploads-complete`,z={attachmentIds:I,temporaryChatMessageId:w,exchangeId:l.exchangeId};e((0,m.TP)((new Date).toISOString())),await e((0,m.et)(M,{method:"POST",body:z,headers:v},{onError:e=>C(e)}))},j=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(c,u)=>{const{connection:{token:f},chatbubble:{currentLanguage:p},local:{context:h}}=u(),{PAT_HOST:b}=u().environment;if(!f){const r={triggerDialogueSlug:e,languageCode:n};return await a.A.getInstance().getConnection().connect({triggerConfig:r}),void(t&&c((0,g.lQ)({source:"programmatic"})))}if(n&&n!==p){const e="Tried to trigger a dialogue in another language on an existing chat";c((0,m.Rm)({message:e,level:"error",extra:{languageCode:n,currentLanguage:p}}))}const v=o||(0,r.A)();c({type:x.IM,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),c((0,m.TP)((new Date).toISOString()));const y={exchange_id:e,temporaryId:v,new_context:{...h}},{headers:w}=(0,s.A)({token:f},{withCurrentUrl:!0});(0,m.ez)();const k=l?await l:await c((0,m.et)(`${b}/chatbubble/${i.Ak}/trigger/`,{method:"POST",body:y,headers:w}));k&&!(0,d.A)(k)&&t&&c((0,g.lQ)({source:"programmatic"}))}},I=(e,t)=>n=>{n({type:x.Y6,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},O=(e,t,n)=>async(r,o)=>{const{connection:{token:a},environment:{PAT_HOST:l,VERSION:c}}=o(),u=await r((0,h.z5)()),{headers:d}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:u}),f={method:"POST",body:{button:t,chatMessage:e,temporaryId:n,version:c},headers:d};return(0,m.ez)(),r((0,m.et)(`${l}/chatbubble/${i.Ak}/button/click/`,f))},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return async(a,s)=>{const{local:l}=s(),c=(0,b.A)(e.button_type),u=`tempId-${(0,r.A)()}`,d={};o.length>0&&o.forEach(e=>{var r,o,s;e.button_type===i.lP.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value?(d[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,a(I(t,e))):e.button_type===i.lP.CHECKBOX.toLowerCase()&&n.find(t=>t.id===e.id)?(d[e.value]=e.value,a(I(t,e)),a(O(t,e,u))):d[e.value]=""});const f=a(O(t,{...e,new_context:{...l.context,...d||{}}},u));switch(a({type:x.Y6,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),c){case i.lP.QUICK_REPLY:{const n={responsePromise:f,tempId:u};a(_(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case i.lP.HANDOVER_REQUEST:a((0,p.Du)(f));break;case i.lP.DIALOGUE_TRIGGER:a(j(e.value,{tempId:u,responsePromise:f}));break;case i.lP.PRIVACY_EXPORT:a((0,g.VK)({responsePromise:f}));break;case i.lP.PRIVACY_DELETE:a((0,g._e)({responsePromise:f}));break;case i.lP.CONTACT_DETAILS:a((0,g.V$)(e));break;case i.lP.UPLOAD_ATTACHMENT:a((0,g.jz)(e))}}},P=(e,t)=>async(n,o)=>{const{connection:{token:a},environment:{PAT_HOST:l,VERSION:c}}=o(),u=`tempId-${(0,r.A)()}`,f=e.contact_details.contact_type,p={...e,button_type:i.lP.edit_contact_details};n({type:x.tq,data:{id:u,created:(new Date).toISOString(),message:t,buttons:[p],isContactDetails:!0}});const g=await n((0,h.z5)()),{headers:b}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:g}),v={contactType:f,value:t,version:c,buttons:[p],temporaryId:u},y=await n((0,m.et)(`${l}/chatbubble/${i.Ak}/button/contact-details/`,{method:"POST",body:v,headers:b}));(0,d.A)(y)||n({type:x.pz,...y.data})},N=(0,l.A)(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:a},environment:{PAT_HOST:l,VERSION:c}}=n(),u=await t((0,h.z5)()),{headers:d}=(0,s.A)({token:a},{withCurrentUrl:!0,extra:u}),f={chatMessageId:r,version:c};t({type:x.kU,id:r,index:o}),t((0,m.et)(`${l}/chatbubble/${i.Ak}/message-seen`,{method:"PATCH",body:f,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),M=(e,t)=>(n,r)=>N({id:e,index:t},n,r),z=e=>{let{url:t,messageId:n}=e;return async(e,r)=>{const{botKey:o}=r().chatbubble,{PAT_HOST:a}=r().environment,{token:l}=r().connection,c=await e((0,h.z5)());e((0,m.et)(`${a}/chatbubble/${i.Ak}/message/reference-click/${n}`,{method:"POST",body:{url:t},...(0,s.A)({botKey:o,token:l},{withCurrentUrl:!0,extra:c})}))}}},9338:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(9749),o=n.n(r),i=n(9155),a=n(541),s=n(1197),l=n(5880),c=n(1308),u=n(5352),d=n(3649),f=n(2362),p=n(1304),h=n(5134),g=n(8278),m=n(8418),b=n(5650),v=n(8395),y=n(1576);const x=s.Ay.div.withConfig({componentId:"sc-lsdvgt-0"})(["width:100%;position:relative;text-align:left;"]),w=(0,s.Ay)(c.Gr).withConfig({componentId:"sc-lsdvgt-1"})(["&& path{fill:none;}"]);var k=n(5758),C=n(2327),S=n(660),_=n(1085);const{EXTERNAL_LINK:A,EMAIL:E,PHONE:T,CHECKBOX:j,SLIDER:I,END_CHAT:O}=u.lP,L=e=>null!=e&&e.match(/^https?:\/\//i)?e:`http://${e}`;function P(e,t){t?window.open(e,t):window.location.href=e}function N(e){var t,n,r;let{button:N,setCheckboxValue:M,checked:z,chatMessage:R,disabled:$=!1,handlers:D,isNudge:F=!1,onClick:B,submitButtonsList:H}=e;const U=(0,h.jL)(),V=(0,y.A)(N.button_type),{chatMessages:W,buttonClicks:G}=(0,a.d4)(g.DZ)||[],q=(0,a.d4)(g.$P)||[],{buttonText:K}=(0,i.useContext)(s.Dx),Y=(0,h.CU)(),{feedbackToDisplay:X}=(0,d.A)(),Q=o()(t=[A,T,E]).call(t,V),Z=o()(n=[j]).call(n,V),J=o()(r=[I]).call(r,V),ee=Boolean((Array.isArray(z)?z:[]).find(e=>e.id===N.id)),te=N.open_in_new_tab||void 0===N.open_in_new_tab?"_blank":"_self",ne=V===O,re=(0,i.useRef)(H);let oe="";V===T&&(oe="tel:"),V===E&&(oe="mailto:");const ie=(0,i.useCallback)(e=>{e.preventDefault();const t=Y.getState(),{token:n}=t.connection,{PAT_HOST:r}=t.environment,{attachments:o}=t.messages,i=W.map(e=>(0,v.A)(e,o,r,n)),a=(0,v.A)(R,o,r,n);if((0,l.fz)({event:e,handlers:D,buttonType:V,button:(0,b.A)(N),lastMessage:a,chatLog:i,renderedBy:null==q?void 0:q.renderedBy}))return;"function"==typeof B&&B(),F||U((0,p.Bd)(N,R,z,re.current));const{href:s,target:c}=e.currentTarget;s&&(c&&"_self"!==c?P(s,c):setTimeout(()=>{P(s,c)},250))},[V,R,W,N,U,D,z,re,B,null==q?void 0:q.renderedBy,F,Y]),ae=(0,f.A)(ie,3e3),se=(null!=G?G:[]).find(e=>{let{chatMessageId:t,buttonId:n}=e;return t===(null==R?void 0:R.id)&&n===N.id}),le=(0,i.useCallback)(()=>{null==M||M(N)},[N,M]);return(0,i.useEffect)(()=>{se&&Z&&!ee&&(null==M||M(N))},[se,Z,N,M,ee]),J&&null!=N&&N.slider_details?(0,_.jsx)("div",{children:(0,_.jsx)(S.A,{name:`slider_${N.id}`,onChange:e=>{const t=parseFloat(e);var n;t&&Array.isArray(re.current)&&(null===(n=re.current)||void 0===n||n.map(e=>e.id===N.id?(e.slider_details.value=t,e):e))},from:N.slider_details.from_value,to:N.slider_details.to_value,value:N.slider_details.value,step:N.slider_details.step_value,affix:N.slider_details.affix,affixValue:N.slider_details.affix_value,ariaLabel:N.label})}):(0,_.jsxs)(k.A,{cy:"message-button",isCheckbox:Z,type:"button",...Q&&{href:`${oe}${V===A?L(N.value):N.value}`,target:`${V!==A||F?"_self":te}`},...Z&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":N.label,"aria-checked":ee?"true":"false"},icon:V===A&&F&&(0,_.jsx)(c.fl,{})||V===A&&!F&&(0,_.jsx)(w,{color:K,size:20}),disabled:$,onClick:e=>Z?le():Q?ie(e):(ne&&(X?(U((0,m.WG)({ratingSystem:X.rating_scale.rating_system,triggerType:X.trigger_type,formTitle:X.form_title,step:"RATING_SCALE"})),U((0,m.ZG)("button_click")),U((0,p.zn)("END_CHAT"))):U((0,p.wQ)("CANCEL_CHAT"))),ae(e)),children:[Z&&(0,_.jsx)(x,{children:(0,_.jsx)(C.A,{disabled:!0,"aria-disabled":!0,inputType:u.lP.CHECKBOX,name:`checkbox-${N.id}`,id:N.id,checked:ee,label:N.label})}),Z?"":N.label]})}},9344:(e,t,n)=>{"use strict";var r=n(9932),o=n(6100);e.exports=function(e){if("Function"===r(e))return o(e)}},9437:(e,t,n)=>{"use strict";n(9098)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(3678)})},9449:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,U:()=>i});var r=n(786);const o="kindly-chat-browser-id",i=()=>{const e=localStorage.getItem(o);if(!e){const e=(0,r.A)();return localStorage.setItem(o,e),e}return e}},9466:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8089),o=n.n(r);const i=(e,t)=>o()({},e,t)},9492:(e,t,n)=>{"use strict";function r(e){const t=null==e?void 0:e.status;return Boolean(t&&!(t>=200&&t<=299))}n.d(t,{A:()=>r})},9504:()=>{},9514:e=>{"use strict";e.exports=t},9559:(e,t,n)=>{"use strict";var r=n(4904),o=n(8407);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9602:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(904);const o=new Set;function i(e){var t,n;const{feedbackSettings:i}=r.Z,a=null==i||null===(t=i[e])||void 0===t?void 0:t.forms.find(e=>"bot_conversation"===e.trigger_type&&e.is_active),s=null==i||null===(n=i[e])||void 0===n?void 0:n.forms.find(e=>"handover_conversation"===e.trigger_type&&e.is_active);return{botConversationFeedback:a,handoverConversationFeedback:s,preloadFeedbackImages:e=>{const t="bot_conversation"===e?a:s;t&&t.rating_scale.edit_labels.forEach(e=>{if(o.has(e.image))return;const t=new Image;t.src=e.image,o.add(t.src)})}}}},9619:(e,t,n)=>{"use strict";var r=n(8900),o=n(262),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},9665:(e,t,n)=>{"use strict";var r=n(5024),o=n(1203),i=n(9619);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},9683:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9749:(e,t,n)=>{e.exports=n(1726)},9809:(e,t,n)=>{"use strict";var r=n(4572),o=n(6100),i=n(1395),a=n(2137),s=n(8130),l=n(4417),c=o([].push),u=function(e){var t=1===e,n=2===e,o=3===e,u=4===e,d=6===e,f=7===e,p=5===e||d;return function(h,g,m,b){for(var v,y,x=a(h),w=i(x),k=s(w),C=r(g,m),S=0,_=b||l,A=t?_(h,k):n||f?_(h,0):void 0;k>S;S++)if((p||S in w)&&(y=C(v=w[S],S,x),e))if(t)A[S]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return S;case 2:c(A,v)}else switch(e){case 4:return!1;case 7:c(A,v)}return d?-1:o||u?u:A}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},9828:(e,t,n)=>{"use strict";var r=n(3273),o=n(8137),i=n(6625),a=n(8417),s=n(9989).f,l=n(164),c=n(877),u=n(4871),d=n(5024),f="Array Iterator",p=a.set,h=a.getterFor(f);e.exports=l(Array,"Array",function(e,t){p(this,{type:f,target:r(e),index:0,kind:t})},function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(n,!1);case"values":return c(t[n],!1)}return c([n,t[n]],!1)},"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!u&&d&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(e){}},9850:(e,t,n)=>{"use strict";n(4531)("matchAll")},9903:(e,t,n)=>{"use strict";var r=n(5777);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},9907:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u<t;)s&&s[u].run();u=-1,t=l.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},9932:(e,t,n)=>{"use strict";var r=n(6100),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},9933:(e,t,n)=>{"use strict";n.d(t,{A:()=>g}),n(9155);var r=n(1308),o=n(6865),i=n(8256),a=n(1197),s=n(8663);const l=a.Ay.div.withConfig({componentId:"sc-11sa2m4-0"})(["display:flex;flex-direction:row;padding:8px 12px;gap:8px;margin-top:8px;border-radius:6px;border:",";"],e=>{let{theme:t}=e;return`1px solid ${(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.08)","rgba(0, 0, 0, 0.08)")}`}),c=a.Ay.div.withConfig({componentId:"sc-11sa2m4-1"})(["display:flex;flex-direction:column;flex:1;"]),u=a.Ay.div.withConfig({componentId:"sc-11sa2m4-2"})(["font-size:var(--_kindlychat-font-size-p);color:var(--panel-background-white-black-contrast-1743170834);font-weight:450;word-break:break-all;"]),d=a.Ay.div.withConfig({componentId:"sc-11sa2m4-3"})(["font-size:var(--_kindlychat-font-size-sm);color:",";"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),f=a.Ay.div.withConfig({componentId:"sc-11sa2m4-4"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:6px;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")}),p=a.Ay.div.withConfig({componentId:"sc-11sa2m4-5"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;font-size:calc(var(--_kindlychat-font-size-m) * 1.25);cursor:pointer;& svg{& > path{stroke:",";}}"],e=>{let{theme:t}=e;return(0,s.w5)(t.panelBackground,"rgba(255, 255, 255, 0.8)","rgba(0, 0, 0, 0.8)")});var h=n(1085);const g=function(e){let{file:t,canRemove:n=!0,onRemove:a}=e;return(0,h.jsxs)(l,{children:[(0,h.jsx)(f,{children:(0,h.jsx)(o.A,{title:"attachment"})}),(0,h.jsxs)(c,{children:[(0,h.jsx)(u,{children:t.name}),(0,h.jsx)(d,{children:(0,i.B$)(t.size)})]}),n&&(0,h.jsx)(p,{onClick:a,children:(0,h.jsx)(r.US,{width:24,height:24})})]})}},9982:(e,t,n)=>{"use strict";function r(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((t,n)=>{var r;const o=e(n),i=null!==(r=t[o])&&void 0!==r?r:[];return i.push(n),t[o]=i,t},{})}n.d(t,{A:()=>r})},9989:(e,t,n)=>{"use strict";var r=n(5024),o=n(9665),i=n(1330),a=n(7235),s=n(5341),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",p="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},9990:(e,t,n)=>{"use strict";function r(e){let{token:t,botKey:n,jwt:r}=e,{withCurrentUrl:o,withVersion:i,extra:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{headers:{...t?{"kindly-chatbubble-token":t}:{},...n?{"kindly-bot-key":n}:{},...r?{Authorization:`Bearer ${r}`}:{},...o?{"Current-Url":window.location.href}:{},...i?{"kindly-chat-version":"2.81.9"}:{},...a}}}n.d(t,{A:()=>r})}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.amdO={},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{if(void 0!==a){var e=a.u,t=a.e,n={},r={};a.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},a.e=function(o){return t(o).catch(function(t){var i=r.hasOwnProperty(o)?r[o]:5;if(i<1){var s=e(o);throw t.message="Loading chunk "+o+" failed after 5 retries.\n("+s+")",t.request=s,t}return new Promise(function(e){var t=5-i+1;setTimeout(function(){var s="cache-bust=true&retry-attempt="+t;n[o]=s,r[o]=i-1,e(a.e(o))},e=>300*e)})})}}})(),a.nc=void 0;var s={};return(()=>{"use strict";a.r(s),a.d(s,{default:()=>r});var e=a(9155),t=a(1717),n=a(1085);const r=function(r){let{botKey:o,setKindlyChatRef:i,options:a}=r;return(0,n.jsx)(e.Suspense,{fallback:"",children:(0,n.jsx)(t.default,{botKey:o,setKindlyChatRef:i,options:a})})}})(),s})());