@kindly/react-chat 2.39.9 → 2.39.11
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 +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=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}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}var l=n(0);var u=0,d="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){var t=Date.now(),n=Math.max(0,16.7-(t-u));u=t+n,setTimeout((function(){return e(u)}),n)},f=1/60*1e3,p=!0,h=!1,m=!1,g={delta:0,timestamp:0},b=["read","update","preRender","render","postRender"],v=function(e){return h=e},y=b.reduce((function(e,t){var n,r,o,a,i,s,c,l,u;return e[t]=(n=v,r=[],o=[],a=0,i=!1,s=0,c=new WeakSet,l=new WeakSet,u={cancel:function(e){var t=o.indexOf(e);c.add(e),-1!==t&&o.splice(t,1)},process:function(e){var t,d;if(i=!0,r=(t=[o,r])[0],(o=t[1]).length=0,a=r.length)for(s=0;s<a;s++)(d=r[s])(e),!0!==l.has(d)||c.has(d)||(u.schedule(d),n(!0));i=!1},schedule:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var s=n&&i,u=s?r:o;c.delete(e),t&&l.add(e),-1===u.indexOf(e)&&(u.push(e),s&&(a=r.length))}}),e}),{}),w=b.reduce((function(e,t){var n=y[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),h||k(),n.schedule(e,t,r),e},e}),{}),x=b.reduce((function(e,t){return e[t]=y[t].cancel,e}),{}),E=function(e){return y[e].process(g)},O=function(e){h=!1,g.delta=p?f:Math.max(Math.min(e-g.timestamp,40),1),p||(f=g.delta),g.timestamp=e,m=!0,b.forEach(E),m=!1,h&&(p=!1,d(O))},k=function(){h=!0,p=!0,m||d(O)},_=function(){return g},C=w,j=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},T=function(e){return e%1?Number(e.toFixed(5)):e},S=/(-)?(\d[\d\.]*)/g,I=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,A=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,N={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},P=i(i({},N),{transform:j(0,1)}),M=i(i({},N),{default:1}),L=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},R=L("deg"),D=L("%"),B=L("px"),F=L("vh"),z=L("vw"),U=i(i({},D),{parse:function(e){return D.parse(e)/100},transform:function(e){return D.transform(100*e)}}),H=j(0,255),$=function(e){return void 0!==e.red},V=function(e){return void 0!==e.hue};var q=function(e){return function(t){if("string"!=typeof t)return t;for(var n={},r=function(e){return e.substring(e.indexOf("(")+1,e.lastIndexOf(")"))}(t).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)n[e[o]]=void 0!==r[o]?parseFloat(r[o]):1;return n}},G=i(i({},N),{transform:function(e){return Math.round(H(e))}});function W(e,t){return e.startsWith(t)&&A.test(e)}var Y={test:function(e){return"string"==typeof e?W(e,"rgb"):$(e)},parse:q(["red","green","blue","alpha"]),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha;return"rgba("+t+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({red:G.transform(t),green:G.transform(n),blue:G.transform(r),alpha:T(P.transform(a))})}},K={test:function(e){return"string"==typeof e?W(e,"hsl"):V(e)},parse:q(["hue","saturation","lightness","alpha"]),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha;return"hsla("+t+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(t),saturation:D.transform(T(n)),lightness:D.transform(T(r)),alpha:T(P.transform(a))})}},X=i(i({},Y),{test:function(e){return"string"==typeof e&&W(e,"#")},parse:function(e){var t="",n="",r="";return e.length>4?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),t+=t,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(e){return"string"==typeof e&&A.test(e)||$(e)||V(e)},parse:function(e){return Y.test(e)?Y.parse(e):K.test(e)?K.parse(e):X.test(e)?X.parse(e):e},transform:function(e){return $(e)?Y.transform(e):V(e)?K.transform(e):e}},Q=function(e){return"number"==typeof e?0:e},Z={test:function(e){if("string"!=typeof e||!isNaN(e))return!1;var t=0,n=e.match(S),r=e.match(I);return n&&(t+=n.length),r&&(t+=r.length),t>0},parse:function(e){var t=e,n=[],r=t.match(I);r&&(t=t.replace(I,"${c}"),n.push.apply(n,r.map(J.parse)));var o=t.match(S);return o&&n.push.apply(n,o.map(N.parse)),n},createTransformer:function(e){var t=e,n=0,r=e.match(I),o=r?r.length:0;if(r)for(var a=0;a<o;a++)t=t.replace(r[a],"${c}"),n++;var i=t.match(S),s=i?i.length:0;if(i)for(a=0;a<s;a++)t=t.replace(i[a],"${n}"),n++;return function(e){for(var r=t,a=0;a<n;a++)r=r.replace(a<o?"${c}":"${n}",a<o?J.transform(e[a]):T(e[a]));return r}},getAnimatableNone:function(e){var t=Z.parse(e);return Z.createTransformer(e)(t.map(Q))}},ee=function(e){return function(t){return 1-e(1-t)}},te=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},ne=ee,re=te,oe=function(e){return function(t){return Math.pow(t,e)}},ae=function(e){return function(t){return t*t*((e+1)*t-e)}},ie=function(e){var t=ae(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},se=function(e){return e},ce=oe(2),le=ee(ce),ue=te(ce),de=function(e){return 1-Math.sin(Math.acos(e))},fe=ee(de),pe=te(fe),he=ae(1.525),me=ee(he),ge=te(he),be=ie(1.525),ve=function(e){var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},ye=function(e){return 1-ve(1-e)},we=function(e){return e<.5?.5*(1-ve(1-2*e)):.5*ve(2*e-1)+.5},xe="undefined"!=typeof Float32Array,Ee=function(e,t){return 1-3*t+3*e},Oe=function(e,t){return 3*t-6*e},ke=function(e){return 3*e},_e=function(e,t,n){return 3*Ee(t,n)*e*e+2*Oe(t,n)*e+ke(t)},Ce=function(e,t,n){return((Ee(t,n)*e+Oe(t,n))*e+ke(t))*e};function je(e,t,n,r){var o=xe?new Float32Array(11):new Array(11),a=function(t){for(var r,a,i,s=0,c=1;10!==c&&o[c]<=t;++c)s+=.1;return--c,r=(t-o[c])/(o[c+1]-o[c]),(i=_e(a=s+.1*r,e,n))>=.001?function(t,r){for(var o=0,a=0;o<8;++o){if(0===(a=_e(r,e,n)))return r;r-=(Ce(r,e,n)-t)/a}return r}(t,a):0===i?a:function(t,r,o){var a,i,s=0;do{(a=Ce(i=r+(o-r)/2,e,n)-t)>0?o=i:r=i}while(Math.abs(a)>1e-7&&++s<10);return i}(t,s,s+.1)};!function(){for(var t=0;t<11;++t)o[t]=Ce(.1*t,e,n)}();return function(o){return e===t&&n===r?o:0===o?0:1===o?1:Ce(a(o),t,r)}}var Te={x:0,y:0,z:0},Se=function(e){return"number"==typeof e},Ie=function(e){return function(t,n,r){return void 0!==r?e(t,n,r):function(r){return e(t,n,r)}}},Ae=Ie((function(e,t,n){return Math.min(Math.max(n,e),t)})),Ne=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Pe=function(e){return Ne(e)&&e.hasOwnProperty("z")},Me=function(e,t){return Math.abs(e-t)},Le=function(e,t){if(void 0===t&&(t=Te),Se(e)&&Se(t))return Me(e,t);if(Ne(e)&&Ne(t)){var n=Me(e.x,t.x),r=Me(e.y,t.y),o=Pe(e)&&Pe(t)?Me(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Re=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},De=function(e,t,n){return-n*e+n*t+e},Be=function(){return(Be=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}).apply(this,arguments)},Fe=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},ze=[X,Y,K],Ue=function(e){return ze.find((function(t){return t.test(e)}))},He=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},$e=function(e,t){var n=Ue(e),r=Ue(t);He(e),He(t),n.transform,r.transform;var o=n.parse(e),a=r.parse(t),i=Be({},o),s=n===K?De:Fe;return function(e){for(var t in i)"alpha"!==t&&(i[t]=s(o[t],a[t],e));return i.alpha=De(o.alpha,a.alpha,e),n.transform(i)}},Ve=function(e,t){return function(n){return t(e(n))}},qe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(Ve)};function Ge(e,t){return Se(e)?function(n){return De(e,t,n)}:J.test(e)?$e(e,t):Ke(e,t)}var We=function(e,t){var n=e.slice(),r=n.length,o=e.map((function(e,n){return Ge(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}};function Ye(e){for(var t=Z.parse(e),n=t.length,r=0,o=0,a=0,i=0;i<n;i++)r||"number"==typeof t[i]?r++:void 0!==t[i].hue?a++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:a}}var Ke=function(e,t){var n=Z.createTransformer(t),r=Ye(e),o=Ye(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),qe(We(r.parsed,o.parsed),n)};var Xe,Je=function(e){return e},Qe=function(e){return void 0===e&&(e=Je),Ie((function(t,n,r){var o=n-r,a=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?n+a:n-a}))},Ze=(Qe(),Qe(Math.sqrt),function(e,t){return t?e*(1e3/t):0}),et=(Ie((function(e,t,n){var r=t-e;return((n-e)%r+r)%r+e})),Ae(0,1),function(e){var t=e.onRead,n=e.onRender,r=e.uncachedValues,o=void 0===r?new Set:r,a=e.useCache,i=void 0===a||a;return function(e){void 0===e&&(e={});var r=s(e,[]),a={},c=[],l=!1;function u(e,t){e.startsWith("--")&&(r.hasCSSVariable=!0);var n=a[e];a[e]=t,a[e]!==n&&(-1===c.indexOf(e)&&c.push(e),l||(l=!0,C.render(d.render)))}var d={get:function(e,n){return void 0===n&&(n=!1),!n&&i&&!o.has(e)&&void 0!==a[e]?a[e]:t(e,r)},set:function(e,t){if("string"==typeof e)u(e,t);else for(var n in e)u(n,e[n]);return this},render:function(e){return void 0===e&&(e=!1),(l||!0===e)&&(n(a,r,c),l=!1,c.length=0),this}};return d}}),tt=/([a-z])([A-Z])/g,nt=function(e){return e.replace(tt,"$1-$2").toLowerCase()},rt=new Map,ot=new Map,at=["Webkit","Moz","O","ms",""],it=at.length,st="undefined"!=typeof document,ct=function(e,t){return ot.set(e,nt(t))},lt=function(e,t){void 0===t&&(t=!1);var n=t?ot:rt;return n.has(e)||(st?function(e){Xe=Xe||document.createElement("div");for(var t=0;t<it;t++){var n=at[t],r=""===n,o=r?e:n+e.charAt(0).toUpperCase()+e.slice(1);if(o in Xe.style||r){if(r&&"clipPath"===e&&ot.has(e))return;rt.set(e,o),ct(e,(r?"":"-")+nt(o))}}}(e):function(e){ct(e,e)}(e)),n.get(e)||e},ut=["","X","Y","Z"],dt=["translate","scale","rotate","skew","transformPerspective"].reduce((function(e,t){return ut.reduce((function(e,n){return e.push(t+n),e}),e)}),["x","y","z"]),ft=dt.reduce((function(e,t){return e[t]=!0,e}),{});function pt(e){return!0===ft[e]}function ht(e,t){return dt.indexOf(e)-dt.indexOf(t)}var mt=new Set(["originX","originY","originZ"]);function gt(e){return mt.has(e)}var bt=i(i({},N),{transform:Math.round}),vt={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:M,scaleX:M,scaleY:M,scaleZ:M,skew:R,skewX:R,skewY:R,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,opacity:P,originX:U,originY:U,originZ:B,zIndex:bt,fillOpacity:P,strokeOpacity:P,numOctaves:bt},yt=function(e){return vt[e]},wt=function(e,t){return t&&"number"==typeof e?t.transform(e):e},xt=new Set(["scrollLeft","scrollTop"]),Et=new Set(["scrollLeft","scrollTop","transform"]),Ot={x:"translateX",y:"translateY",z:"translateZ"};function kt(e){return"function"==typeof e}function _t(e,t,n,r,o,a,i,s){void 0===t&&(t=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===a&&(a=[]),void 0===i&&(i=!1),void 0===s&&(s=!0);var c=!0,l=!1,u=!1;for(var d in e){var f=e[d],p=yt(d),h=wt(f,p);pt(d)?(l=!0,r[d]=h,a.push(d),c&&(p.default&&f!==p.default||!p.default&&0!==f)&&(c=!1)):gt(d)?(o[d]=h,u=!0):Et.has(d)&&kt(h)||(n[lt(d,i)]=h)}return(l||"function"==typeof e.transform)&&(n.transform=function(e,t,n,r,o,a){void 0===a&&(a=!0);var i="",s=!1;n.sort(ht);for(var c=n.length,l=0;l<c;l++){var u=n[l];i+=(Ot[u]||u)+"("+t[u]+") ",s="z"===u||s}return!s&&o?i+="translateZ(0)":i=i.trim(),kt(e.transform)?i=e.transform(t,r?"":i):a&&r&&(i="none"),i}(e,r,a,c,t,s)),u&&(n.transformOrigin=(o.originX||"50%")+" "+(o.originY||"50%")+" "+(o.originZ||0)),n}function Ct(e){var t=void 0===e?{}:e,n=t.enableHardwareAcceleration,r=void 0===n||n,o=t.isDashCase,a=void 0===o||o,i=t.allowTransformNone,s=void 0===i||i,c={},l={},u={},d=[];return function(e){return d.length=0,_t(e,r,c,l,u,d,a,s),c}}var jt=et({onRead:function(e,t){var n=t.element,r=t.preparseOutput,o=yt(e);if(pt(e))return o&&o.default||0;if(xt.has(e))return n[e];var a=window.getComputedStyle(n,null).getPropertyValue(lt(e,!0))||0;return r&&o&&o.test(a)&&o.parse?o.parse(a):a},onRender:function(e,t,n){var r=t.element,o=t.buildStyles,a=t.hasCSSVariable;if(Object.assign(r.style,o(e)),a)for(var i=n.length,s=0;s<i;s++){var c=n[s];c.startsWith("--")&&r.style.setProperty(c,e[c])}-1!==n.indexOf("scrollLeft")&&(r.scrollLeft=e.scrollLeft),-1!==n.indexOf("scrollTop")&&(r.scrollTop=e.scrollTop)},uncachedValues:xt});var Tt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),St=function(e,t){return B.transform(e*t)},It={x:0,y:0,width:0,height:0};function At(e,t,n){return"string"==typeof e?e:B.transform(t+n*e)}var Nt={enableHardwareAcceleration:!1,isDashCase:!1};function Pt(e,t,n,r,o,a){void 0===t&&(t=It),void 0===r&&(r=Ct(Nt)),void 0===o&&(o={style:{}}),void 0===a&&(a=!0);var i=e.attrX,c=e.attrY,l=e.originX,u=e.originY,d=e.pathLength,f=e.pathSpacing,p=void 0===f?1:f,h=e.pathOffset,m=void 0===h?0:h,g=r(s(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var b in g){if("transform"===b)o.style.transform=g[b];else o[a&&!Tt.has(b)?nt(b):b]=g[b]}return(void 0!==l||void 0!==u||g.transform)&&(o.style.transformOrigin=function(e,t,n){return At(t,e.x,e.width)+" "+At(n,e.y,e.height)}(t,void 0!==l?l:.5,void 0!==u?u:.5)),void 0!==i&&(o.x=i),void 0!==c&&(o.y=c),void 0!==n&&void 0!==d&&(o[a?"stroke-dashoffset":"strokeDashoffset"]=St(-m,n),o[a?"stroke-dasharray":"strokeDasharray"]=St(d,n)+" "+St(p,n)),o}function Mt(e,t,n){void 0===n&&(n=!0);var r={style:{}},o=Ct(Nt);return function(a){return Pt(a,e,t,o,r,n)}}var Lt=et({onRead:function(e,t){var n=t.element;if(pt(e=Tt.has(e)?e:nt(e))){var r=yt(e);return r&&r.default||0}return n.getAttribute(e)},onRender:function(e,t){var n=t.element,r=(0,t.buildAttrs)(e);for(var o in r)"style"===o?Object.assign(n.style,r.style):n.setAttribute(o,r[o])}}),Rt=et({useCache:!1,onRead:function(e){return"scrollTop"===e?window.pageYOffset:window.pageXOffset},onRender:function(e){var t=e.scrollTop,n=void 0===t?0:t,r=e.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),Dt=new WeakMap,Bt=function(e,t){var n,r,o,a;return e===window?n=Rt(e):!function(e){return e instanceof HTMLElement||"function"==typeof e.click}(e)?function(e){return e instanceof SVGElement||"ownerSVGElement"in e}(e)&&(o=function(e){try{return function(e){return"function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}(e)}catch(e){return{x:0,y:0,width:0,height:0}}}(r=e),a=function(e){return"path"===e.tagName}(r)&&r.getTotalLength?r.getTotalLength():void 0,n=Lt({element:r,buildAttrs:Mt(o,a)})):n=function(e,t){void 0===t&&(t={});var n=t.enableHardwareAcceleration,r=t.allowTransformNone,o=s(t,["enableHardwareAcceleration","allowTransformNone"]);return jt(i({element:e,buildStyles:Ct({enableHardwareAcceleration:n,allowTransformNone:r}),preparseOutput:!0},o))}(e,t),Dt.set(e,n),n};var Ft=function(e,t){return function(e,t){return Dt.has(e)?Dt.get(e):Bt(e,t)}("string"==typeof e?document.querySelector(e):e,t)},zt=function(){return function(e,t){var n=this,r=e.middleware,o=e.onComplete;this.isActive=!0,this.update=function(e){n.observer.update&&n.updateObserver(e)},this.complete=function(){n.observer.complete&&n.isActive&&n.observer.complete(),n.onComplete&&n.onComplete(),n.isActive=!1},this.error=function(e){n.observer.error&&n.isActive&&n.observer.error(e),n.isActive=!1},this.observer=t,this.updateObserver=function(e){return t.update(e)},this.onComplete=o,t.update&&r&&r.length&&r.forEach((function(e){return n.updateObserver=e(n.updateObserver,n.complete)}))}}(),Ut=function(e,t,n){var r=t.middleware;return new zt({middleware:r,onComplete:n},"function"==typeof e?{update:e}:e)},Ht=function(){function e(e){void 0===e&&(e={}),this.props=e}return e.prototype.create=function(t){return new e(t)},e.prototype.start=function(e){void 0===e&&(e={});var t=!1,n={stop:function(){}},r=this.props,o=r.init,a=s(r,["init"]),c=o(Ut(e,a,(function(){t=!0,n.stop()})));return n=c?i({},n,c):n,t&&n.stop(),n},e.prototype.applyMiddleware=function(e){return this.create(i({},this.props,{middleware:this.props.middleware?[e].concat(this.props.middleware):[e]}))},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=1===e.length?e[0]:qe.apply(void 0,e);return this.applyMiddleware((function(e){return function(t){return e(n(t))}}))},e}(),$t=function(e){return new Ht({init:e})},Vt=[B,D,R,F,z],qt=function(e){return Vt.find((function(t){return t.test(e)}))},Gt=function(e,t){return e(t)},Wt=function(e,t){var n=t.from,r=t.to,o=s(t,["from","to"]),a=qt(n)||qt(r),c=a.transform,l=a.parse;return e(i({},o,{from:"string"==typeof n?l(n):n,to:"string"==typeof r?l(r):r})).pipe(c)},Yt=function(e){return function(t,n){var r=n.from,o=n.to,a=s(n,["from","to"]);return t(i({},a,{from:0,to:1})).pipe(e(r,o))}},Kt=Yt($e),Xt=Yt(Ke),Jt=function(e,t){var n=function(e){var t=Object.keys(e),n=function(t,n){return void 0!==t&&!e[n](t)};return{getVectorKeys:function(e){return t.reduce((function(t,r){return n(e[r],r)&&t.push(r),t}),[])},testVectorProps:function(e){return e&&t.some((function(t){return n(e[t],t)}))}}}(t),r=n.testVectorProps,o=n.getVectorKeys;return function(t){if(!r(t))return e(t);var n=o(t),a=t[n[0]];return Qt(a)(e,t,n)}},Qt=function(e){return"number"==typeof e?Gt:function(e){return Boolean(qt(e))}(e)?Wt:J.test(e)?Kt:Z.test(e)?Xt:Gt},Zt=Jt((function(e){return void 0===e&&(e={}),$t((function(t){var n=t.complete,r=t.update,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,c=e.power,l=void 0===c?.8:c,u=e.timeConstant,d=void 0===u?350:u,f=e.restDelta,p=void 0===f?.5:f,h=e.modifyTarget,m=0,g=l*a,b=Math.round(s+g),v=void 0===h?b:h(b),y=C.update((function(e){var t=e.delta;m+=t;var o=-g*Math.exp(-m/d),a=o>p||o<-p;r(a?v+o:v),a||(x.update(y),n())}),!0);return{stop:function(){return x.update(y)}}}))}),{from:N.test,modifyTarget:function(e){return"function"==typeof e},velocity:N.test}),en=Jt((function(e){return void 0===e&&(e={}),$t((function(t){var n=t.update,r=t.complete,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,c=e.to,l=void 0===c?0:c,u=e.stiffness,d=void 0===u?100:u,f=e.damping,p=void 0===f?10:f,h=e.mass,m=void 0===h?1:h,g=e.restSpeed,b=void 0===g?.01:g,v=e.restDelta,y=void 0===v?.01:v,w=a?-a/1e3:0,E=0,O=l-s,k=s,_=k,j=C.update((function(e){var t=e.delta;E+=t;var o=p/(2*Math.sqrt(d*m)),i=Math.sqrt(d/m)/1e3;if(_=k,o<1){var s=Math.exp(-o*i*E),c=i*Math.sqrt(1-o*o);k=l-s*((w+o*i*O)/c*Math.sin(c*E)+O*Math.cos(c*E))}else{s=Math.exp(-i*E);k=l-s*(O+(w+i*O)*E)}a=Ze(k-_,t);var u=Math.abs(a)<=b,f=Math.abs(l-k)<=y;u&&f?(n(k=l),x.update(j),r()):n(k)}),!0);return{stop:function(){return x.update(j)}}}))}),{from:N.test,to:N.test,stiffness:N.test,damping:N.test,mass:N.test,velocity:N.test}),tn=Jt((function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,o=void 0===r?0:r,a=e.min,s=e.max,c=e.power,l=void 0===c?.8:c,u=e.timeConstant,d=void 0===u?700:u,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,m=void 0===h?10:h,g=e.restDelta,b=void 0===g?1:g,v=e.modifyTarget;return $t((function(e){var t,r=e.update,c=e.complete,u=n,f=n,h=!1,g=function(e){return void 0!==a&&e<=a},y=function(e){return void 0!==s&&e>=s},w=function(e){return g(e)||y(e)},x=function(e){r(e),u=f,o=Ze((f=e)-u,_().delta),t&&!h&&function(e,t){return g(e)&&t<0||y(e)&&t>0}(e,o)&&O({from:e,velocity:o})},E=function(e,n){t&&t.stop(),t=e.start({update:x,complete:function(){n?n():c()}})},O=function(e){h=!0,E(en(i({},e,{to:g(e.from)?a:s,stiffness:p,damping:m,restDelta:b})))};if(w(n))O({from:n,velocity:o});else if(0!==o){var k=Zt({from:n,velocity:o,timeConstant:d,power:l,restDelta:w(n)?20:b,modifyTarget:v});E(k,(function(){w(f)?O({from:f,velocity:o}):c()}))}else c();return{stop:function(){return t&&t.stop()}}}))}),{from:N.test,velocity:N.test,min:N.test,max:N.test,damping:N.test,stiffness:N.test,modifyTarget:function(e){return"function"==typeof e}}),nn=Jt((function(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=void 0===a?se:a,s=e.reverseEase;return void 0!==s&&s&&(i=ne(i)),$t((function(e){var t=e.update;return{seek:function(e){return t(e)}}})).pipe(i,(function(e){return De(n,o,e)}))}),{ease:function(e){return"function"==typeof e},from:N.test,to:N.test}),rn=Ae(0,1),on=function(e){return void 0===e&&(e={}),$t((function(t){var n,r=t.update,o=t.complete,a=e.duration,i=void 0===a?300:a,s=e.ease,c=void 0===s?le:s,l=e.flip,u=void 0===l?0:l,d=e.loop,f=void 0===d?0:d,p=e.yoyo,h=void 0===p?0:p,m=e.repeatDelay,g=void 0===m?0:m,b=e.from,v=void 0===b?0:b,y=e.to,w=void 0===y?1:y,E=e.elapsed,O=void 0===E?0:E,k=e.flipCount,_=void 0===k?0:k,j=e.yoyoCount,T=void 0===j?0:j,S=e.loopCount,I=void 0===S?0:S,A=nn({from:v,to:w,ease:c}).start(r),N=0,P=!1,M=function(e){var t;void 0===e&&(e=!1),A=nn({from:v=(t=[w,v])[0],to:w=t[1],ease:c,reverseEase:e}).start(r)},L=function(){N=rn(Re(0,i,O)),A.seek(N)},R=function(){P=!0,n=C.update((function(e){var t,r=e.delta;O+=r,L(),!(t=P&&O>i+g)||(!t||f||u||h)&&(O=O-i-g,f&&I<f?(I++,1):u&&_<u?(_++,M(),1):h&&T<h&&(T++,M(T%2!=0),1))||(x.update(n),o&&C.update(o,!1,!0))}),!0)},D=function(){P=!1,n&&x.update(n)};return R(),{isActive:function(){return P},getElapsed:function(){return Ae(0,i,O)},getProgress:function(){return N},stop:function(){D()},pause:function(){return D(),this},resume:function(){return P||R(),this},seek:function(e){return O=De(0,i,e),C.update(L,!1,!0),this},reverse:function(){return M(),this}}}))},an=Ae(0,1),sn=function(e){var t=e.easings,n=e.ease,r=void 0===n?se:n,o=e.times,a=e.values,c=s(e,["easings","ease","times","values"]);t=Array.isArray(t)?t:function(e,t){return e.map((function(){return t||le})).splice(0,e.length-1)}(a,t),o=o||function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(a);var l=t.map((function(e,t){return nn({from:a[t],to:a[t+1],ease:e})}));return on(i({},c,{ease:r})).applyMiddleware((function(e){return function(e,t,n){var r=e.length,o=r-1,a=o-1,i=t.map((function(e){return e.start(n)}));return function(t){t<=e[0]&&i[0].seek(0),t>=e[o]&&i[a].seek(1);for(var n=1;n<r&&!(e[n]>t||n===o);n++);var s=Re(e[n-1],e[n],t);i[n-1].seek(an(s))}}(o,l,e)}))},cn=function(e,t,n){return $t((function(r){var o=r.update,a=t.split(" ").map((function(t){return e.addEventListener(t,o,n),t}));return{stop:function(){return a.forEach((function(t){return e.removeEventListener(t,o,n)}))}}}))},ln=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},un=function(e,t){return void 0===t&&(t={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),t.clientX=t.x=e.clientX,t.clientY=t.y=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t},dn=[ln()];if("undefined"!=typeof document){cn(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(e){var t=e.touches;!0;var n=t.length;dn.length=0;for(var r=0;r<n;r++){var o=t[r];dn.push(un(o))}}))}var fn=ln();if("undefined"!=typeof document){cn(document,"mousedown mousemove",!0).start((function(e){!0,un(e,fn)}))}var pn=function(e){return $t((function(t){var n=t.complete,r=setTimeout(n,e);return{stop:function(){return clearTimeout(r)}}}))},hn=function(){function e(e,t){var n,r=this,o=void 0===t?{}:t,a=o.transformer,i=o.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),r.prev=r.current,r.current=r.transformer?r.transformer(e):e,r.updateSubscribers&&r.prev!==r.current&&r.updateSubscribers.forEach(r.notifySubscriber),r.children&&r.children.forEach(r.setChild),t&&r.renderSubscribers&&r.renderSubscribers.forEach(r.notifySubscriber);var n=_(),o=n.delta,a=n.timestamp;r.lastUpdated!==a&&(r.timeDelta=o,r.lastUpdated=a,C.postRender(r.scheduleVelocityCheck))},this.notifySubscriber=function(e){e(r.current)},this.scheduleVelocityCheck=function(){return C.postRender(r.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==r.lastUpdated&&(r.prev=r.current)},this.setChild=function(e){return e.set(r.current)},this.parent=i,this.transformer=a,this.set(e,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return e.prototype.addChild=function(t){void 0===t&&(t={});var n=new e(this.current,i({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.subscribeTo=function(e,t){var n=this,r=function(){return t(n.current)};return e.add(r),function(){return e.delete(r)}},e.prototype.onChange=function(e){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,e)},e.prototype.onRenderRequest=function(e){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(e),this.subscribeTo(this.renderSubscribers,e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.canTrackVelocity?Ze(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},e}();function mn(e,t){return new hn(e,t)}function gn(e){var t=Object(l.useRef)(null);return null===t.current&&(t.current=e()),t.current}var bn,vn=function(e){return e instanceof hn},yn=et({onRead:function(){return null},onRender:function(e,t){return(0,t.onUpdate)(e)}}),wn=function(){function e(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return e.prototype.has=function(e){return this.values.has(e)},e.prototype.set=function(e,t){this.values.set(e,t),this.hasMounted&&this.bindValueToOutput(e,t)},e.prototype.get=function(e,t){var n=this.values.get(e);return void 0===n&&void 0!==t&&(n=new hn(t),this.set(e,n)),n},e.prototype.forEach=function(e){return this.values.forEach(e)},e.prototype.bindValueToOutput=function(e,t){var n=this,r=t.onRenderRequest((function(t){return n.output&&n.output(e,t)})),o=t.onChange((function(t){n.onUpdate&&n.onUpdate.set(e,t)}));this.unsubscribers.has(e)&&this.unsubscribers.get(e)(),this.unsubscribers.set(e,(function(){r(),o()}))},e.prototype.setOnUpdate=function(e){this.onUpdate=void 0,e&&(this.onUpdate=yn({onUpdate:e}))},e.prototype.setTransformTemplate=function(e){this.transformTemplate!==e&&(this.transformTemplate=e,this.updateTransformTemplate())},e.prototype.getTransformTemplate=function(){return this.transformTemplate},e.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},e.prototype.mount=function(e){var t=this;this.hasMounted=!0,e&&(this.output=e),this.values.forEach((function(e,n){return t.bindValueToOutput(n,e)})),this.updateTransformTemplate()},e.prototype.unmount=function(){var e=this;this.values.forEach((function(t,n){var r=e.unsubscribers.get(n);r&&r()}))},e}(),xn=new Set(["dragOriginX","dragOriginY"]),En=function(e){var t=gn((function(){var t=new wn;for(var n in e)vn(e[n])&&!xn.has(n)&&t.set(n,e[n]);return t}));return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t},On=null,kn=function(){return null!==On},_n=function(){On=[]},Cn=function(){On&&On.forEach((function(e){return e.render()})),On=null},jn=function(e){On&&On.push(e)},Tn=Object(l.memo)((function(e){var t=e.innerRef,n=e.values,r=e.isStatic;return Object(l.useEffect)((function(){t.current,Element;var e=Ft(t.current,{preparseOutput:!1,enableHardwareAcceleration:!r});return n.mount((function(t,n){e.set(t,n),kn()&&jn(e)})),function(){return n.unmount()}}),[]),null})),Sn=(bn=function(e){return e.get()},function(e){var t={};return e.forEach((function(e,n){return t[n]=bn(e)})),t}),In=new Set(["originX","originY","originZ"]),An=function(e){return In.has(e)},Nn=function(e,t,n){var r=Sn(e),o=e.getTransformTemplate();return o&&(r.transform=t.transform?o({},t.transform):o),_t(i(i({},t),r),!n)},Pn=function(e){return Array.isArray(e)},Mn=function(e){return Pn(e)?e[e.length-1]||0:e},Ln=[N,B,D,R,z,F,{test:function(e){return"auto"===e},parse:function(e){return e}}],Rn=c(Ln,[J,Z]),Dn=function(e){return function(t){return t.test(e)}},Bn=function(e){return Ln.find(Dn(e))},Fn=function(e){return Rn.find(Dn(e))},zn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Un=function(e){return{type:"spring",stiffness:700,damping:0===e?100:35}},Hn=function(){return{ease:"linear",duration:.3}},$n=function(e){return{type:"keyframes",duration:.8,values:e}},Vn={x:zn,y:zn,z:zn,rotate:zn,rotateX:zn,rotateY:zn,rotateZ:zn,scaleX:Un,scaleY:Un,scale:Un,opacity:Hn,backgroundColor:Hn,color:Hn,default:Un},qn=function(e){var t=e.to,n=e.duration;return $t((function(e){var r=e.update,o=e.complete;r(t),n?pn(n).start({complete:o}):o()}))},Gn=function(e){return Array.isArray(e)?(e.length,je(e[0],e[1],e[2],e[3])):"string"==typeof e?r[e]:e},Wn=function(e){return Array.isArray(e)&&"number"!=typeof e[0]},Yn=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Z.test(t)||t.startsWith("url(")))},Kn=function(e){return 1e3*e},Xn={tween:on,spring:en,keyframes:sn,inertia:tn,just:qn},Jn={tween:function(e){if(e.ease){var t=Wn(e.ease)?e.ease[0]:e.ease;e.ease=Gn(t)}return e},keyframes:function(e){var t=e.from,n=(e.to,e.velocity,s(e,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=c(n.values);r[0]=t,n.values=r}return n.ease&&(n.easings=Wn(n.ease)?n.ease.map(Gn):Gn(n.ease)),n.ease=se,n}},Qn=function(e,t,n){var r=n?n.delay:0;if(void 0===n||!function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection;var t=s(e,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(t).length}(n))return i({delay:r},function(e,t){var n;return n=Pn(t)?$n:Vn[e]||Vn.default,i({to:t},n(t))}(e,t));var o=n[e]||n.default||n;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:Pn(t)?t[t.length-1]:t,type:"just"}:Pn(t)?i(i({values:t,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):i({type:"tween",to:t,delay:r},o)},Zn=function(e,t,n,r){var o,a=t.get(),c=Yn(e,a),l=Yn(e,n),u=Qn(e,n,r),d=u.type,f=void 0===d?"tween":d,p=s(u,["type"]),h=c&&l?Xn[f]:qn,m=function(e,t){return Jn[e]?Jn[e](t):t}(f,i({from:a,velocity:t.getVelocity()},p));return((o=m).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(m.duration&&(m.duration=Kn(m.duration)),m.repeatDelay&&(m.repeatDelay=Kn(m.repeatDelay))),[h,m]};function er(e,t,n,r){var o=r.delay,a=void 0===o?0:o,i=s(r,["delay"]);return t.start((function(r){var o,c=Zn(e,t,n,i),l=c[0],u=c[1],d=u.delay,f=s(u,["delay"]);void 0!==d&&(a=d);var p=function(){var e=l(f);o=e.start({update:function(e){return t.set(e)},complete:r})};return a?o=pn(Kn(a)).start({complete:p}):p(),function(){o&&o.stop()}}))}var tr=function(){function e(e){var t=this,n=e.values,r=e.readValueFromSource,o=e.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(e){return!t.values.has(e)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=o,this.values.forEach((function(e,n){return t.baseTarget[n]=e.get()}))}return e.prototype.setProps=function(e){this.props=e},e.prototype.setVariants=function(e){e&&(this.variants=e)},e.prototype.setDefaultTransition=function(e){e&&(this.defaultTransition=e)},e.prototype.setValues=function(e,t){var n=this,r=void 0===t?{}:t,o=r.isActive,a=void 0===o?new Set:o,s=r.priority,c=this.resolveVariant(e),l=c.target,u=c.transitionEnd;return l=this.transformValues(i(i({},l),u)),Object.keys(l).forEach((function(e){if(!a.has(e)&&(a.add(e),l)){var t=Mn(l[e]);if(n.values.has(e)){var r=n.values.get(e);r&&r.set(t)}else n.values.set(e,mn(t));s||(n.baseTarget[e]=t)}}))},e.prototype.transformValues=function(e){var t=this.props.transformValues;return t?t(e):e},e.prototype.checkForNewValues=function(e){var t=Object.keys(e).filter(this.hasValue),n=t.length;if(n)for(var r=0;r<n;r++){var o=t[r],a=e[o],i=null;Array.isArray(a)&&(i=a[0]),null===i&&(i=this.readValueFromSource(o)),"string"==typeof i&&/^\d*\.?\d+$/.test(i)?i=parseFloat(i):!Fn(i)&&Z.test(a)&&(i=Z.getAnimatableNone(a)),this.values.set(o,mn(i)),this.baseTarget[o]=i}},e.prototype.resolveVariant=function(e){if(!e)return{target:void 0,transition:void 0,transitionEnd:void 0};var t,n;"function"==typeof e&&(e=e(this.props.custom,(t=this.values,n={},t.forEach((function(e,t){return n[t]=e.get()})),n),function(e){var t={};return e.forEach((function(e,n){return t[n]=e.getVelocity()})),t}(this.values)));var r=e.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:e.transitionEnd,target:s(e,["transition","transitionEnd"])}},e.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},e.prototype.setOverride=function(e,t){this.overrides[t]=e,this.children&&this.children.forEach((function(n){return n.setOverride(e,t)}))},e.prototype.startOverride=function(e){var t=this.overrides[e];if(t)return this.start(t,{priority:e})},e.prototype.clearOverride=function(e){var t=this;if(this.children&&this.children.forEach((function(t){return t.clearOverride(e)})),this.overrides[e]){this.activeOverrides.delete(e);var n=this.getHighestPriority();if(this.resetIsAnimating(),n)this.overrides[n]&&this.startOverride(n);var r=this.resolvedOverrides[e];if(r){var o={};for(var a in this.baseTarget)void 0!==r[a]&&(o[a]=this.baseTarget[a]);this.onStart(),this.animate(o).then((function(){return t.onComplete()}))}}},e.prototype.apply=function(e){return Array.isArray(e)?this.applyVariantLabels(e):"string"==typeof e?this.applyVariantLabels([e]):void this.setValues(e)},e.prototype.applyVariantLabels=function(e){var t=this,n=new Set;c(e).reverse().forEach((function(r){var o=t.resolveVariant(t.variants[r]),a=o.target,i=o.transitionEnd;i&&t.setValues(i,{isActive:n}),a&&t.setValues(a,{isActive:n}),t.children&&t.children.size&&t.children.forEach((function(t){return t.applyVariantLabels(e)}))}))},e.prototype.start=function(e,t){var n,r,o=this;return void 0===t&&(t={}),t.priority&&this.activeOverrides.add(t.priority),this.resetIsAnimating(t.priority),r=e,n=Array.isArray(r)?this.animateVariantLabels(e,t):"string"==typeof e?this.animateVariant(e,t):this.animate(e,t),this.onStart(),n.then((function(){return o.onComplete()}))},e.prototype.animate=function(e,t){var n=this,r=void 0===t?{}:t,o=r.delay,a=void 0===o?0:o,s=r.priority,c=void 0===s?0:s,l=r.transitionOverride,u=this.resolveVariant(e),d=u.target,f=u.transition,p=u.transitionEnd;if(l&&(f=l),!d)return Promise.resolve();if(d=this.transformValues(d),p&&(p=this.transformValues(p)),this.checkForNewValues(d),this.makeTargetAnimatable){var h=this.makeTargetAnimatable(d,p);d=h.target,p=h.transitionEnd}c&&(this.resolvedOverrides[c]=d),this.checkForNewValues(d);var m=[];for(var g in d){var b=this.values.get(g);if(b&&d&&void 0!==d[g]){var v=d[g];c||(this.baseTarget[g]=Mn(v)),this.isAnimating.has(g)||(this.isAnimating.add(g),m.push(er(g,b,v,i({delay:a},f))))}}var y=Promise.all(m);return p?y.then((function(){n.setValues(p,{priority:c})})):y},e.prototype.animateVariantLabels=function(e,t){var n=this,r=c(e).reverse().map((function(e){return n.animateVariant(e,t)}));return Promise.all(r)},e.prototype.animateVariant=function(e,t){var n=this,r=!1,o=0,a=0,i=1,s=t&&t.priority||0,c=this.variants[e],l=c?function(){return n.animate(c,t)}:function(){return Promise.resolve()},u=this.children?function(){return n.animateChildren(e,o,a,i,s)}:function(){return Promise.resolve()};if(c&&this.children){var d=this.resolveVariant(c).transition;d&&(r=d.when||r,o=d.delayChildren||o,a=d.staggerChildren||a,i=d.staggerDirection||i)}if(r){var f="beforeChildren"===r?[l,u]:[u,l],p=f[1];return(0,f[0])().then(p)}return Promise.all([l(),u()])},e.prototype.animateChildren=function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var a=[],i=(this.children.size-1)*n,s=1===r?function(e){return e*n}:function(e){return i-e*n};return Array.from(this.children).forEach((function(n,r){var i=n.animateVariant(e,{priority:o,delay:t+s(r)});a.push(i)})),Promise.all(a)},e.prototype.onStart=function(){var e=this.props.onAnimationStart;e&&e()},e.prototype.onComplete=function(){var e=this.props.onAnimationComplete;e&&e()},e.prototype.checkOverrideIsAnimating=function(e){for(var t=this.overrides.length,n=e+1;n<t;n++){var r=this.resolvedOverrides[n];if(r)for(var o in r)this.isAnimating.add(o)}},e.prototype.resetIsAnimating=function(e){void 0===e&&(e=0),this.isAnimating.clear(),e<this.getHighestPriority()&&this.checkOverrideIsAnimating(e),this.children&&this.children.forEach((function(t){return t.resetIsAnimating(e)}))},e.prototype.stop=function(){this.values.forEach((function(e){return e.stop()}))},e.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach((function(t,n){t&&e.setOverride(t,n)}))},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.resetChildren=function(){this.children&&this.children.clear()},e}();var nr=function(){function e(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return e.prototype.setVariants=function(e){this.variants=e,this.componentControls.forEach((function(t){return t.setVariants(e)}))},e.prototype.setDefaultTransition=function(e){this.defaultTransition=e,this.componentControls.forEach((function(t){return t.setDefaultTransition(e)}))},e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),this.variants&&e.setVariants(this.variants),this.defaultTransition&&e.setDefaultTransition(this.defaultTransition),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){var n=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(n){var o=n.start(e,{transitionOverride:t});r.push(o)})),Promise.all(r)}return new Promise((function(r){n.pendingAnimations.push({animation:[e,t],resolve:r})}))},e.prototype.set=function(e){return this.hasMounted,this.componentControls.forEach((function(t){return t.apply(e)}))},e.prototype.stop=function(){this.componentControls.forEach((function(e){return e.stop()}))},e.prototype.mount=function(){var e=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(t){var n=t.animation,r=t.resolve;return e.start.apply(e,n).then(r)}))},e.prototype.unmount=function(){this.hasMounted=!1,this.stop()},e}(),rr=Object(l.createContext)(null),or=Object(l.createContext)({static:!1}),ar=function(e){return"string"==typeof e||Array.isArray(e)},ir=function(e){return e instanceof nr},sr=function(e,t,n,r,o){void 0===r&&(r=!1);var a,i,s=o.initial,c=o.animate,u=o.variants,d=o.whileTap,f=o.whileHover,p=Object(l.useContext)(rr);void 0!==(null===(a=p)||void 0===a?void 0:a.initial)&&(s=p.initial),!1!==s||ir(c)?"boolean"!=typeof s&&(i=s):i=c;var h=Object(l.useRef)(!1),m=u||ar(c)||ar(d)||ar(f)||ir(c),g=ar(i)?i:e.initial,b=ar(c)?c:e.animate,v=r?g:null,y=m&&ar(b)?b:null,w=Object(l.useMemo)((function(){return{controls:m?t:e.controls,initial:g,animate:b,values:n,hasMounted:h,isReducedMotion:e.isReducedMotion}}),[v,y,e.isReducedMotion]);return w.static=r,function(e,t){void 0===t&&(t=!1);var n=Object(l.useRef)(!0);(!t||t&&n.current)&&e(),n.current=!1}((function(){var n=i||e.initial;n&&t.apply(n)}),!r),Object(l.useEffect)((function(){h.current=!0}),[]),w};function cr(e,t,n){var r=t.variants,o=t.transition,a=Object(l.useContext)(or).controls,i=Object(l.useContext)(rr),c=gn((function(){return new tr(e)}));return i&&!i.isPresent||(c.resetChildren(),c.setProps(t),c.setVariants(r),c.setDefaultTransition(o)),Object(l.useEffect)((function(){n&&a&&a.addChild(c)})),Object(l.useEffect)((function(){return function(){t.onAnimationComplete;var e=s(t,["onAnimationComplete"]);c.setProps(e),a&&a.removeChild(c)}}),[]),c}var lr=function(e){var t=e.animate,n=e.variants,r=e.inherit;return(void 0===r||r)&&!!n&&(!t||t instanceof nr)};var ur=function(e){var t=e.getValueControlsConfig,n=e.loadFunctionalityComponents,r=e.renderComponent;return Object(l.forwardRef)((function(e,o){var a=function(e){var t=e&&"function"!=typeof e?e:Object(l.useRef)(null);return e&&"function"==typeof e&&Object(l.useEffect)((function(){return e(t.current),function(){return e(null)}}),[]),t}(o),i=Object(l.useContext)(or),s=i.static||e.static||!1,c=En(e),u=function(e,t,n,r){void 0===t&&(t={});var o={},a=Object(l.useRef)({}).current;for(var i in t){var s=t[i];if(vn(s))e.set(i,s);else if(n||!pt(i)&&!An(i))o[i]=s;else{if(e.has(i)){if(s!==a[i])e.get(i).set(s)}else e.set(i,mn(s));a[i]=s}}return r?r(o):o}(c,e.style,s,e.transformValues),d=lr(e),f=cr(gn((function(){return t(a,c)})),e,d),p=sr(i,f,c,s,e),h=s?null:n(a,c,e,i,f,d),m=r(a,u,c,e,s);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(or.Provider,{value:p},m),Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Tn,{innerRef:a,values:c,isStatic:s}),h))}))},dr=["animate","circle","clipPath","defs","desc","ellipse","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","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],fr=Object(l.createContext)({transformPagePoint:function(e){return e}});function pr(e){return Object(l.useEffect)((function(){return function(){return e()}}),[])}function hr(e,t,n,r){if(n)return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function mr(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function gr(e){return!!e.touches}var br={pageX:0,pageY:0};function vr(e){var t=e.pageX,n=void 0===t?0:t,r=e.pageY;return{x:n,y:void 0===r?0:r}}function yr(e){return{point:gr(e)?(t=e,n=t.touches[0]||t.changedTouches[0]||br,{x:n.pageX,y:n.pageY}):vr(e)};var t,n}var wr,xr=function(e,t){if(void 0===t&&(t=!1),e){var n=function(t){return e(t,yr(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(n):n}},Er="undefined"!=typeof window,Or={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},kr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function _r(e){return Er&&null===window.onpointerdown?e:Er&&null===window.ontouchstart?kr[e]:Er&&null===window.onmousedown?Or[e]:e}function Cr(e,t,n,r){return hr(e,_r(t),xr(n,"pointerdown"===t),r)}function jr(e,t,n,r){return function(e,t,n,r){Object(l.useEffect)((function(){var o=e.current;if(n&&o)return hr(o,t,n,r)}),[e,t,n,r])}(e,_r(t),xr(n,"pointerdown"===t),r)}!function(e){e.subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},e.relativeTo=function(e){var t;return function(n){var r=n.x,o=n.y,a=void 0!==t?t:t="string"==typeof e?document.getElementById(e):e;if(a){var i=a.getBoundingClientRect();return{x:r-i.left-window.scrollX,y:o-i.top-window.scrollY}}}}}(wr||(wr={}));var Tr=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(e){Tr&&e.preventDefault()}),{passive:!1});var Sr=function(){return Tr=!1},Ir=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=Nr(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=Le(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,a=_().timestamp;r.history.push(i(i({},o),{timestamp:a}));var s=r.handlers,c=s.onStart,l=s.onMove;t||(c&&c(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},!(gr(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var a=Ar(yr(e),this.transformPagePoint),s=a.point,c=_().timestamp;this.history=[i(i({},s),{timestamp:c})];var l=t.onSessionStart;l&&l(e,Nr(a,this.history));var u=Cr(window,"pointermove",(function(e,t){return r.handlePointerMove(e,t)})),d=Cr(window,"pointerup",(function(e,t){return r.handlePointerUp(e,t)}));this.removeListeners=function(){u&&u(),d&&d()}}}return e.prototype.handlePointerMove=function(e,t){this.lastMoveEvent=e,this.lastMoveEventInfo=Ar(t,this.transformPagePoint),mr(e)&&0===e.buttons?this.handlePointerUp(e,t):C.update(this.updatePoint,!0)},e.prototype.handlePointerUp=function(e,t){this.end();var n=this.handlers.onEnd;if(n){var r=Nr(Ar(t,this.transformPagePoint),this.history);n&&n(e,r)}},e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),x.update(this.updatePoint),Sr()},e}();function Ar(e,t){return t?{point:t(e.point)}:e}function Nr(e,t){var n=e.point;return{point:n,delta:wr.subtract(n,Mr(t)),offset:wr.subtract(n,Pr(t)),velocity:Lr(t,.1)}}function Pr(e){return e[0]}function Mr(e){return e[e.length-1]}function Lr(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Mr(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Kn(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Rr=function(e,t){return!!t&&(e===t||Rr(e,t.parentElement))},Dr=["whileHover","whileTap","whileDrag"],Br=function(e){return Dr.indexOf(e)+1};function Fr(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var zr=Fr("dragHorizontal"),Ur=Fr("dragVertical");function Hr(e){var t=!1;if("y"===e)t=Ur();else if("x"===e)t=zr();else{var n=zr(),r=Ur();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}var $r=Br("whileTap");var Vr=Br("whileHover"),qr=function(e){return function(t,n){mr(t)&&e(t,n)}};function Gr(e,t){!function(e,t){var n=e.onPan,r=e.onPanStart,o=e.onPanEnd,a=e.onPanSessionStart,i=n||r||o||a,s=Object(l.useRef)(null),c=Object(l.useContext)(fr).transformPagePoint,u={onSessionStart:a,onStart:r,onMove:n,onEnd:function(e,t){s.current=null,o&&o(e,t)}};Object(l.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),jr(t,"pointerdown",i&&function(e){s.current=new Ir(e,u,{transformPagePoint:c})}),pr((function(){return s.current&&s.current.end()}))}(e,t),function(e,t){var n=e.onTap,r=e.onTapStart,o=e.onTapCancel,a=e.whileTap,i=e.controls,s=n||r||o||a,c=Object(l.useRef)(!1),u=Object(l.useRef)(null);function d(){u.current&&u.current(),u.current=null}a&&i&&i.setOverride(a,$r);var f=Object(l.useRef)(null);f.current=function(e,r){var s=t.current;if(d(),c.current&&s){c.current=!1,i&&a&&i.clearOverride($r);var l=Hr(!0);l&&(l(),Rr(s,e.target)?n&&n(e,r):o&&o(e,r))}},jr(t,"pointerdown",s?function(e,n){d(),u.current=Cr(window,"pointerup",(function(e,t){return f.current(e,t)})),t.current&&!c.current&&(c.current=!0,r&&r(e,n),i&&a&&i.startOverride($r))}:void 0),pr(d)}(e,t),function(e,t){var n=e.whileHover,r=e.onHoverStart,o=e.onHoverEnd,a=e.controls;n&&a&&a.setOverride(n,Vr),jr(t,"pointerenter",qr((function(e,t){r&&r(e,t),n&&a&&a.startOverride(Vr)}))),jr(t,"pointerleave",qr((function(e,t){o&&o(e,t),n&&a&&a.clearOverride(Vr)})))}(e,t)}var Wr=function(e){return function(t){return e(t),null}},Yr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Kr={key:"gestures",shouldRender:function(e){return Yr.some((function(t){return e.hasOwnProperty(t)}))},Component:Wr((function(e){var t=e.innerRef;Gr(s(e,["innerRef"]),t)}))},Xr=function(e){return"object"==typeof e&&e.hasOwnProperty("current")},Jr=function(e){return e},Qr=function(){function e(e){var t=e.ref,n=e.values,r=e.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Jr},this.point={},this.origin={x:mn(0),y:mn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=t,this.values=n,this.controls=r}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor;void 0!==r&&r&&this.snapToCursor(e);var o=this.props.transformPagePoint;this.panSession=new Ir(e,{onSessionStart:function(){Tr=!0,Zr((function(e){var t=n.point[e];t&&t.stop()}))},onStart:function(e,t){if(n.constraintsNeedResolution){var r=n.props,o=r.dragConstraints,a=r.transformPagePoint;n.constraints=ro(o,n.ref,n.point,a),n.applyConstraintsToPoint()}Zr((function(e){var t=n.point[e];t&&n.origin[e].set(t.get())}));var i=n.props,s=i.drag,c=i.dragPropagation;if(!s||c||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Hr(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var l=n.props.onDragStart;l&&l(e,eo(t,n.point))}},onMove:function(e,t){var r=n.props,o=r.dragPropagation,a=r.dragDirectionLock;if(o||n.openGlobalLock){var i=t.offset;if(a&&null===n.currentDirection){if(n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",i),n.updatePoint("y",i);var c=n.props.onDrag;c&&c(e,eo(t,n.point))}}},onEnd:function(e,t){n.stop(e,t)}},{transformPagePoint:o})},e.prototype.cancelDrag=function(){Sr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},e.prototype.stop=function(e,t){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,a=o.dragMomentum,i=o.dragElastic,s=o.onDragEnd;if(a||i){var c=t.velocity;this.animateDragEnd(c)}else this.recordBoxInfo(this.constraints);s&&s(e,eo(t,this.point))}},e.prototype.recordBoxInfo=function(e){if(e){var t=e.right,n=e.left,r=e.bottom,o=e.top;this.prevConstraintsBox.width=(t||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},e.prototype.snapToCursor=function(e){var t=this,n=this.props.transformPagePoint,r=yr(e).point,o=oo(this.ref,n),a=o.width/2+o.left+window.scrollX,i=o.height/2+o.top+window.scrollY,s={x:r.x-a,y:r.y-i};Zr((function(e){var n=t.point[e];n&&t.origin[e].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},e.prototype.setPoint=function(e,t){this.point[e]=t},e.prototype.updatePoint=function(e,t){var n=this.props,r=n.drag,o=n.dragElastic,a=this.point[e];if(no(e,r,this.currentDirection)&&a){var i=io(e,this.origin[e].get()+t[e],this.constraints,o);a.set(i)}},e.prototype.updateProps=function(e){var t=this,n=e.drag,r=void 0!==n&&n,o=e.dragDirectionLock,a=void 0!==o&&o,c=e.dragPropagation,l=void 0!==c&&c,u=e.dragConstraints,d=void 0!==u&&u,f=e.dragElastic,p=void 0===f||f,h=e.dragMomentum,m=void 0===h||h,g=s(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=i({drag:r,dragDirectionLock:a,dragPropagation:l,dragConstraints:d,dragElastic:p,dragMomentum:m},g);var b=g._dragValueX,v=g._dragValueY,y=g.dragOriginX,w=g.dragOriginY;y&&(this.origin.x=y),w&&(this.origin.y=w),Zr((function(e){if(no(e,r,t.currentDirection)){var n="x"===e?b:v;t.setPoint(e,n||t.values.get(e,0))}})),this.constraintsNeedResolution=Xr(d),this.constraints=this.constraintsNeedResolution?this.constraints||!1:d},e.prototype.applyConstraintsToPoint=function(e){var t=this;return void 0===e&&(e=this.constraints),Zr((function(n){var r=t.point[n];r&&!r.isAnimating()&&io(n,r,e,0)}))},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,c=n._dragValueX,l=n._dragValueY,u=n._dragTransitionControls,d=Zr((function(n){var d;if(no(n,r,t.currentDirection)){var f=t.constraints?to(n,t.constraints):{},p=a?200:1e6,h=a?40:1e7,m=u||t.controls,g=i(i({type:"inertia",velocity:o?e[n]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1},s),f),b="x"===n?c:l;return b?er(n,b,0,g):m.start(((d={})[n]=0,d.transition=g,d))}}));return Promise.all(d).then((function(){t.recordBoxInfo(t.constraints),t.scalePoint();var e=t.props.onDragTransitionEnd;e&&e()}))},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.transformPagePoint;if(Xr(n)){var o=oo(n,r),a=oo(this.ref,r),i=function(t,n){var r=e.point[t];if(r){if(r.isAnimating())return r.stop(),void e.recordBoxInfo();var i=e.prevConstraintsBox[n]?(o[n]-a[n])/e.prevConstraintsBox[n]:1;r.set(e.prevConstraintsBox[t]*i)}};i("x","width"),i("y","height")}},e.prototype.mount=function(e){var t=this,n=Cr(e,"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=hr(window,"resize",(function(){return t.scalePoint()}));if(this.constraintsNeedResolution){var o=this.props,a=o.dragConstraints,i=o.transformPagePoint,s=ro(a,this.ref,this.point,i);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),t.cancelDrag()}},e}();function Zr(e){return[e("x"),e("y")]}function eo(e,t){return i(i({},e),{point:{x:t.x?t.x.get():0,y:t.y?t.y.get():0}})}function to(e,t){var n=t.top,r=t.right,o=t.bottom,a=t.left;return"x"===e?{min:a,max:r}:{min:n,max:o}}function no(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function ro(e,t,n,r){null!==e.current&&t.current;var o=oo(e,r),a=oo(t,r),i=o.left-a.left+ao(n.x),s=o.top-a.top+ao(n.y);return{top:s,left:i,right:o.width-a.width+i,bottom:o.height-a.height+s}}function oo(e,t){var n=e.current.getBoundingClientRect(),r=t({x:n.left,y:n.top}),o=r.x,a=r.y,i=t({x:n.width,y:n.height});return{left:o,top:a,width:i.x,height:i.y}}function ao(e){return e?e.get():0}function io(e,t,n,r){var o=t instanceof hn?t.get():t;if(!n)return o;var a=to(e,n),i=a.min,s=a.max;return void 0!==i&&o<i?o=r?so(i,o,r):Math.max(i,o):void 0!==s&&o>s&&(o=r?so(s,o,r):Math.min(s,o)),t instanceof hn&&t.set(o),o}function so(e,t,n){return De(e,t,"number"==typeof n?n:.35)}var co={key:"drag",shouldRender:function(e){return!!e.drag},Component:Wr((function(e){var t=e.innerRef,n=e.values,r=e.controls;return function(e,t,n,r){var o=e.dragControls,a=Object(l.useContext)(fr).transformPagePoint,s=gn((function(){return new Qr({ref:t,values:n,controls:r})}));s.updateProps(i(i({},e),{transformPagePoint:a})),Object(l.useEffect)((function(){return o&&o.subscribe(s)}),[s]),Object(l.useEffect)((function(){return s.mount(t.current)}),[])}(s(e,["innerRef","values","controls"]),t,n,r)}))};function lo(e){return"string"==typeof e&&e.startsWith("var(--")}var uo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fo(e,t,n){void 0===n&&(n=1);var r=function(e){var t=uo.exec(e);return t?[t[1],t[2]]:[,]}(e),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i||(lo(a)?fo(a,t,n+1):a)}}var po,ho=new Set(["width","height","top","left","right","bottom","x","y"]),mo=function(e){return ho.has(e)},go=function(e,t){e.set(t,!1),e.set(t)},bo=function(e){return e===N||e===B};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(po||(po={}));var vo=function(e,t){return parseFloat(e.split(", ")[t])},yo=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return vo(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?vo(i[1],e):0}},wo=new Set(["x","y","z"]),xo=dt.filter((function(e){return!wo.has(e)}));var Eo={width:function(e){return e.width},height:function(e){return e.height},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.height,r=t.top;return parseFloat(r)+n},right:function(e,t){var n=e.width,r=t.left;return parseFloat(r)+n},x:yo(4,13),y:yo(5,14)},Oo=function(e,t,n,r){void 0===r&&(r={}),n=i({},n),r=i({},r);var o=t.current,a=Ft(o),s=Object.keys(n).filter(mo),c=[],l=!1,u=s.reduce((function(t,o){var i=e.get(o);if(!i)return t;var s,u=i.get(),d=n[o],f=Bn(u);if(Pn(d))for(var p=d.length,h=null===d[0]?1:0;h<p;h++)s?Bn(d[h]):(s=Bn(d[h]))===f||bo(f)&&bo(s);else s=Bn(d);if(f!==s)if(bo(f)&&bo(s)){var m=i.get();"string"==typeof m&&i.set(parseFloat(m)),"string"==typeof d?n[o]=parseFloat(d):Array.isArray(d)&&s===B&&(n[o]=d.map(parseFloat))}else l||(c=function(e,t){var n=[];return xo.forEach((function(t){var r=e.get(t);void 0!==r&&(n.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))})),n.length&&t.render(),n}(e,a),l=!0),t.push(o),r[o]=void 0!==r[o]?r[o]:n[o],go(i,d);return t}),[]);if(u.length){var d=function(e,t,n,r,o){var a=n.getBoundingClientRect(),i=getComputedStyle(n),s=i.display,c={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===s&&r.set("display",e.display||"block"),r.render();var l=n.getBoundingClientRect();return o.forEach((function(n){var r=t.get(n);go(r,Eo[n](a,c)),e[n]=Eo[n](l,i)})),e}(n,e,o,a,u);return c.length&&c.forEach((function(t){var n=t[0],r=t[1];e.get(n).set(r)})),a.render(),{target:d,transitionEnd:r}}return{target:n,transitionEnd:r}};function ko(e,t,n,r){return function(e){return Object.keys(e).some(mo)}(n)?Oo(e,t,n,r):{target:n,transitionEnd:r}}var _o=function(e,t){return function(n,r){var o=function(e,t,n,r){var o=s(n,[]),a=t.current;if(!(a instanceof HTMLElement))return{target:o,transitionEnd:r};for(var c in r&&(r=i({},r)),e.forEach((function(e){var t=e.get();if(lo(t)){var n=fo(t,a);n&&e.set(n)}})),o){var l=o[c];if(lo(l)){var u=fo(l,a);u&&(o[c]=u,r&&void 0===r[c]&&(r[c]=l))}}return{target:o,transitionEnd:r}}(e,t,n,r);return n=o.target,r=o.transitionEnd,ko(e,t,n,r)}};var Co,jo,To=Object(l.createContext)(null);!function(e){e.Prepare="prepare",e.Read="read",e.Render="render"}(jo||(jo={}));var So=[jo.Prepare,jo.Read,jo.Render].reduce((function(e,t){return e[t]=[],e}),{}),Io=!1;function Ao(e){for(var t=e.length,n=0;n<t;n++)e[n]();e.length=0}var No=function(e){return function(t){t&&(Io=!0,So[e].push(t))}},Po=((Co={})[jo.Prepare]=No(jo.Prepare),Co[jo.Read]=No(jo.Read),Co[jo.Render]=No(jo.Render),Co.flush=function(){Io&&(Ao(So.prepare),Ao(So.read),Ao(So.render),Io=!1)},Co);var Mo={duration:.8,ease:[.45,.05,.19,1]},Lo={type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10};var Ro={id:"x",size:"width",min:"left",max:"right",origin:"originX"},Do={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function Bo(e,t){return(e+t)/2}function Fo(e,t,n){var r,o=e[n.size]-t[n.size],a=.5;return o&&(e[n.min]===t[n.min]?a=0:e[n.max]===t[n.max]&&(a=1)),(r={})[n.size]=o,r[n.origin]=a,r[n.id]=.5===a?Bo(e[n.min],e[n.max])-Bo(t[n.min],t[n.max]):0,r}var zo={getLayout:function(e){return e.offset},measure:function(e){var t=e.offsetLeft,n=e.offsetTop,r=e.offsetWidth,o=e.offsetHeight;return{left:t,top:n,right:t+r,bottom:n+o,width:r,height:o}}},Uo={getLayout:function(e){return e.boundingBox},measure:function(e){var t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height,right:t.right,bottom:t.bottom}}};function Ho(e){return window.getComputedStyle(e).position}function $o(e){return"width"===e||"height"===e}var Vo,qo={key:"layout",shouldRender:function(e){var t=e.positionTransition,n=e.layoutTransition;return"undefined"!=typeof window&&!(!t&&!n)},Component:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.innerRef,n=e.positionTransition,r=e.values,o=e.controls,a=t.current;if(function(e){return e instanceof HTMLElement}(a)){var s,c,l,u=function(e){var t=e.layoutTransition,n=e.positionTransition;return t||n}(this.props),d=!!n,f=Ho(a),p={offset:zo.measure(a),boundingBox:Uo.measure(a)};return Po.prepare((function(){s=a.style.transform,a.style.transform=""})),Po.read((function(){c={offset:zo.measure(a),boundingBox:Uo.measure(a)};var e=Ho(a);l=function(e,t,n){return n&&e===t?zo:Uo}(f,e,d)})),Po.render((function(){var e=function(e,t){return i(i({},Fo(e,t,Ro)),Fo(e,t,Do))}(l.getLayout(p),l.getLayout(c));if(e.x||e.y||e.width||e.height){Ft(a).set({originX:e.originX,originY:e.originY}),_n();var t={},n={},f=function(e){return"function"==typeof e}(u)?u({delta:e}):u;h("left","x",0,e.x),h("top","y",0,e.y),d||(h("width","scaleX",1,p.boundingBox.width/c.boundingBox.width),h("height","scaleY",1,p.boundingBox.height/c.boundingBox.height)),t.transition=n,f&&o.start(t),Cn()}else s&&(a.style.transform=s);function h(o,a,s,c){var u=$o(o)?o:a;if(e[u]){var p="boolean"==typeof f?i({},function(e){return e?Lo:Mo}(d)):f,h=r.get(a,s),m=h.getVelocity();n[a]=p[a]?i({},p[a]):i({},p),void 0===n[a].velocity&&(n[a].velocity=m||0),t[a]=s;var g=$o(o)||l!==zo?0:h.get();h.set(c+g)}}})),null}},t.prototype.componentDidUpdate=function(){Po.flush()},t.prototype.render=function(){return null},t.contextType=To,t}(l.Component)},Go=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function Wo(e){return Go.has(e)}!function(e){e.Target="Target",e.VariantLabel="VariantLabel",e.AnimationSubscription="AnimationSubscription"}(Vo||(Vo={}));function Yo(e,t){void 0===t&&(t=!1);e.transition;var n=e.transitionEnd,r=s(e,["transition","transitionEnd"]);return t?i(i({},r),n):r}var Ko,Xo,Jo=function(e){var t,n=e instanceof hn?e.get():e;return Array.from(new Set((t=n)?Array.isArray(t)?t:[t]:[]))};var Qo=((Ko={})[Vo.Target]=Wr((function(e){return function(e,t,n,r){var o=Object(l.useRef)(!0),a=Object(l.useRef)(null);a.current||(a.current=Yo(e,!0)),Object(l.useEffect)((function(){var s,c,l={},u=Yo(e),d=Yo(e,!0);for(var f in u){var p=o.current&&(!n.has(f)||n.get(f).get()!==d[f]),h=null!==d[f],m=(s=a.current[f],void 0!==(c=d[f])&&(Array.isArray(s)&&Array.isArray(c)?!function(e,t){if(null===t)return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}(c,s):s!==c));h&&(m||p)&&(l[f]=u[f])}o.current=!1,a.current=i(i({},a.current),d),Object.keys(l).length&&t.start(i(i({},l),{transition:e.transition||r,transitionEnd:e.transitionEnd}))}),[e])}(e.animate,e.controls,e.values,e.transition)})),Ko[Vo.VariantLabel]=Wr((function(e){var t=e.animate,n=e.inherit,r=void 0===n||n,o=e.controls;return function(e,t,n,r){var o=Jo(t),a=Object(l.useContext)(or),i=a.hasMounted&&a.hasMounted.current,s=Object(l.useRef)(!1);Object(l.useEffect)((function(){var t,c,l=!1;n?(l=!!i,o=Jo(a.animate)):l=s.current||(t=Jo(e),c=o,t.join(",")!==c.join(",")),l&&r.start(o),s.current=!0}),[o.join(",")])}(e.initial,t,r,o)})),Ko[Vo.AnimationSubscription]=Wr((function(e){return function(e,t){var n=Object(l.useMemo)((function(){return e.subscribe(t)}),[e]);Object(l.useEffect)((function(){return function(){n&&n()}}),[n])}(e.animate,e.controls)})),Ko),Zo=function(e){return e.animate instanceof nr},ea=["initial","animate","whileTap","whileHover"],ta=((Xo={})[Vo.Target]=function(e){return!(void 0===e.animate||(t=e.animate,Array.isArray(t)||"string"==typeof t)||Zo(e));var t},Xo[Vo.VariantLabel]=function(e){return void 0!==e.variants||ea.some((function(t){return"string"==typeof e[t]}))},Xo[Vo.AnimationSubscription]=Zo,Xo);var na={key:"exit",shouldRender:function(e){return!!e.exit&&!lr(e)},Component:Wr((function(e){var t,n=e.animate,r=e.controls,o=e.exit,a=function(){var e=Object(l.useContext)(rr);if(null===e)return[!0];var t=e.isPresent,n=e.onExitComplete,r=e.register;return Object(l.useEffect)(r,[]),!t&&n?[!1,n]:[!0]}(),s=a[0],c=a[1],u=Object(l.useContext)(rr),d=Object(l.useRef)(!1),f=void 0!==(null===(t=u)||void 0===t?void 0:t.custom)?u.custom:e.custom;Object(l.useEffect)((function(){s?!d.current||!n||n instanceof nr||r.start(n):(!d.current&&o&&(r.setProps(i(i({},e),{custom:f})),r.start(o).then(c)),d.current=!0),s&&(d.current=!1)}),[s])}))},ra=function(e){return!Wo(e)};try{var oa=n(110).default;ra=function(e){return e.startsWith("on")?!Wo(e):oa(e)}}catch(e){}var aa=[qo,co,Kr,na],ia=aa.length;function sa(e){var t="string"==typeof e,n=t&&-1!==dr.indexOf(e);return{renderComponent:function(r,o,a,s,c){var u=t?function(e){var t={};for(var n in e)ra(n)&&(t[n]=e[n]);return t}(s):s,d=n?function(e,t){var n=Pt(Sn(e),void 0,void 0,void 0,void 0,!1);return n.style=i(i({},t),n.style),n}(a,o):function(e,t,n,r){var o={style:Nn(e,t,n)};return r&&(o.style.userSelect="none",o.draggable=!1),o}(a,o,c,!!s.drag);return Object(l.createElement)(e,i(i(i({},u),{ref:r}),d))},loadFunctionalityComponents:function(e,t,n,r,o,a){var s=[],c=function(e){var t=void 0;for(var n in Vo)ta[n](e)&&(t=n);return t?Qo[t]:void 0}(n);c&&s.push(Object(l.createElement)(c,{key:"animation",initial:n.initial,animate:n.animate,variants:n.variants,transition:n.transition,controls:o,inherit:a,values:t}));for(var u=0;u<ia;u++){var d=aa[u],f=d.shouldRender,p=d.key,h=d.Component;f(n,r)&&s.push(Object(l.createElement)(h,i({key:p},n,{parentContext:r,values:t,controls:o,innerRef:e})))}return s},getValueControlsConfig:function(e,t){return{values:t,readValueFromSource:function(t){return Ft(e.current).get(t)},makeTargetAnimatable:_o(t,e)}}}}var ca=["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","head","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","title","tr","track","u","ul","var","video","wbr","webview"].reduce((function(e,t){var n=sa(t);return e[t]=ur(n),e}),{}),la=dr.reduce((function(e,t){return e[t]=ur(sa(t)),e}),{}),ua=i(i({custom:function(e){return ur(sa(e))}},ca),la);function da(e){return gn((function(){return mn(e)}))}function fa(){return{scrollX:mn(0),scrollY:mn(0),scrollXProgress:mn(0),scrollYProgress:mn(0)}}"undefined"!=typeof window?l.useLayoutEffect:l.useEffect;fa();!function(){function e(){this.componentControls=new Set}e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){this.componentControls.forEach((function(n){n.start(e.nativeEvent||e,t)}))}}();var pa=mn(null);if("undefined"!=typeof window)if(window.matchMedia){var ha=window.matchMedia("(prefers-reduced-motion)"),ma=function(){return pa.set(ha.matches)};ha.addListener(ma),ma()}else pa.set(!1)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(103),o=n(22);const a=e=>/\/(.*)\/(.*)/.exec(e),i=e=>{const t={};for(let n=0;n<e.length;n+=1){const i=Object.keys(e[n]),s=e[n].text;i.forEach(i=>{Object.values(o.c).includes(i)&&(t[Object(r.a)(i)]={value:"pattern"===i?new RegExp(a(e[n][i])[1],a(e[n][i])[2]):e[n][i],...s&&{message:s}})})}return t},s=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;null!=r&&r.text||(t[n]=r.value)}),t},c=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},function(e,t,n){"use strict";var r=n(4),o=n.n(r);o.a.oneOfType([o.a.node,o.a.arrayOf(o.a.node)])},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";t.a=(e,t)=>Boolean((e=>{const t=e.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\//g,"\\/").replace(/\?/g,"\\?");return new RegExp(t,"i")})(t).test(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(239);const o="kindly-chat-browser-id",a=()=>{const e=localStorage.getItem(o);if(!e){const e=Object(r.a)();return localStorage.setItem(o,e),e}return e}},function(e){e.exports=JSON.parse('{"a":"2.39.9"}')},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"l",(function(){return h})),n.d(t,"f",(function(){return m})),n.d(t,"o",(function(){return g})),n.d(t,"g",(function(){return b})),n.d(t,"k",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"j",(function(){return w})),n.d(t,"i",(function(){return x})),n.d(t,"p",(function(){return E})),n.d(t,"a",(function(){return O})),n.d(t,"m",(function(){return k})),n.d(t,"b",(function(){return _}));var r=n(18),o=n(5),a=n(77),i=n(2),s=n(66),c=n(9);const l=(e,t)=>{if(e.feedbackFormType===o.r.NONE)return!1;if(e.feedbackFormType===o.r.EXTERNAL_LINK){var n,r,a;const{feedbackForm:o}=e;return(null===(n=o.external_link_url)||void 0===n?void 0:n[t])&&((null===(r=o.external_link_headline)||void 0===r?void 0:r[t])||(null===(a=o.external_link_text)||void 0===a?void 0:a[t]))}return!0},u=e=>(t,n)=>{const{chatHasStarted:r}=n().chatbubble;t({type:i.sb,botKey:e}),r&&t(Object(s.a)())},d=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n,r)=>{const{botKey:o,chatHasStarted:a}=r().chatbubble,{takenOver:s}=r().agent;n({type:i.eb,code:e}),t||!a||s||n(Object(c.d)(o,!0))}},f=()=>e=>{e({type:i.n})},p=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{bot:o,chatbubble:{currentLanguage:a,botKey:s,optionsScreenOpen:u},connection:{token:d},feedback:{feedbackFormOpen:f},messages:{chatMessages:p},agent:{hasHadHandover:h}}=n(),m=o.noFeedbackAfterHandover&&h;u&&t({type:i.q}),!e&&l(o,a)&&!f&&p&&!m&&p.length>1&&setTimeout(()=>t({type:i.L,token:d}),o.fullscreenMode?0:1500),t(Object(c.d)(s,e));try{Object(r.disconnect)()}catch(e){console.error(e)}}},h=()=>e=>{e({type:i.N})},m=()=>(e,t)=>{const{optionsScreenOpen:n}=t().chatbubble;n&&e({type:i.q})},g=()=>(e,t)=>{const{agent:{takenOver:n},connection:{token:r},environment:{PAT_HOST:a},chatbubble:{chatHasStarted:s,hasRequestedGreeting:l},local:{labels:u}}=t();s||e({type:i.Y,chatHasStarted:!0}),!l&&!n&&(null==u?void 0:u.length)>0&&(e({type:i.bb,hasRequestedGreeting:!0}),e(Object(c.f)({method:"post",url:`${a}/chatbubble/${o.j}/manual_greet/`,...Object(c.a)({token:r})})))},b=()=>(e,t)=>{const{token:n,feedbackFormOpen:r}=t().feedback;(n||r)&&e({type:i.o}),e(g())},v=()=>(e,t)=>{const{pushMessages:n,alerts:r,bot:a,nudge:s}=t();n.show&&e({type:i.B}),s.show&&e({type:i.A}),(r.showTabNotification||r.showBubbleNotification)&&e({type:i.z}),e({type:i.K}),a.welcomePage&&a.welcomePageType!==o.s.NONE||e(g())},y=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(v()),e({type:i.Q}))},w=()=>e=>{e({type:i.jb,userIsIdle:!0}),Object(a.b)()},x=e=>(t,n)=>{const{userIsIdle:r}=n().chatbubble;r&&(t({type:i.jb,userIsIdle:!1}),Object(a.a)(e))},E=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:a}}=n();(null==a||null===(r=a.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:i.D}):t({type:i.lb,button:e})},O=e=>t=>{t({type:i.f,button:e})},k=e=>t=>{0===e.length?t({type:i.k}):t({type:i.X,files:e})},_=()=>e=>{e({type:i.g})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d}));var r=n(1),o=n(6),a=n(40);const i=r.c.label.withConfig({displayName:"styles__CheckboxContainer",componentId:"sc-1ot9z69-0"})(["cursor:pointer;display:flex;justify-content:center;align-items:center;"]),s=r.c.svg.withConfig({displayName:"styles__CheckboxIcon",componentId:"sc-1ot9z69-1"})(["fill:none;stroke:white;stroke-width:2px;"]),c=r.c.div.withConfig({displayName:"styles__StyledCheckbox",componentId:"sc-1ot9z69-2"})(["display:inline-block;width:16px;height:16px;border-radius:3px;background:",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{theme:{buttonBackground:t}}=e;return t},e=>{let{theme:{buttonBackground:t}}=e;return Object(a.b)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},s),l=r.c.input.attrs({type:"checkbox"}).withConfig({displayName:"styles__HiddenCheckbox",componentId:"sc-1ot9z69-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}"],c,e=>{let{theme:{buttonBackground:t}}=e;return t},s,e=>{let{theme:{buttonBackground:t}}=e;return(e=>Object(r.d)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)}),u=r.c.div.withConfig({displayName:"styles__CheckboxLabel",componentId:"sc-1ot9z69-4"})(["font-size:",";font-weight:400;margin:0 28px;"],o.d.fontSizeP),d=r.c.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-1ot9z69-5"})(["margin-top:12px;display:flex;flex-direction:row;"])},function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"c",(function(){return g})),n.d(t,"d",(function(){return b.a})),n.d(t,"b",(function(){return v.a}));var r=n(67),o=(n(4),n(0)),a=n.n(o),i=n(36),s=n(1),c=n(6);const l=s.c.div.withConfig({displayName:"styles__MaxLengthWrapper",componentId:"sc-bl0zra-0"})(["position:absolute;top:50%;transform:translateY(-50%);right:8px;font-size:",";color:",";"],c.d.fontSize12,c.h.textColorLight);var u=function(e){let{fieldName:t,maxLength:n,control:r}=e;const o=Object(i.d)({control:r,name:t});return a.a.createElement(l,null,`${o.length}/${n}`)},d=n(106),f=n(48);const p=s.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cahfhf-0"})(["position:relative;display:flex;"]),h=s.c.input.withConfig({displayName:"styles__Input",componentId:"sc-1cahfhf-1"})(["background-color:",";color:",";padding:",";border-radius:18px;border:1px solid transparent;outline:none;flex:1;&::placeholder{opacity:0.42;}&:invalid{border:1px solid ",";}"],e=>{let{theme:t}=e;return t.inputBackground},e=>{let{theme:t}=e;return t.inputText},e=>{let{hasRightAdornment:t}=e;return t?"10px 56px 10px 16px":"10px 16px"},c.a.errorColor);function m(e){var t,n,r;let{autoComplete:i,name:s,type:c,register:l,validators:m,control:g,id:b,setError:v,clearErrors:y,trigger:w,...x}=e;const E=Object(f.c)(m),O=Object(o.useRef)(null),{ref:k,..._}=l?l(s,E):{};return a.a.createElement(a.a.Fragment,null,a.a.createElement(p,null,a.a.createElement(h,Object.assign({autoComplete:i,name:s,type:c,hasRightAdornment:null===(t=E.maxLength)||void 0===t?void 0:t.value,id:b||`input__${c}_${s}`},Object(f.b)(E),_&&{..._},{ref:e=>{O.current=e,k&&k(e)}},x)),!(null===(n=E.maxLength)||void 0===n||!n.value)&&g&&s&&a.a.createElement(u,{fieldName:s,control:g,maxLength:null===(r=E.maxLength)||void 0===r?void 0:r.value})),a.a.createElement(d.a,{inputRef:O,trigger:w,control:g,name:s,setError:v,clearErrors:y}))}m.defaultProps={register:null,autoComplete:"off",id:null,validators:null,type:"text"};var g=m,b=n(95),v=n(94)},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(122);o.a.shape({message:o.a.string,from_bot:o.a.bool,image_carousel:o.a.arrayOf(o.a.object),thon_image_above_text:o.a.bool,exchange_type:o.a.string,exchange_id:o.a.string,avatar:o.a.string,sender:o.a.oneOf(Object.values(a.l)),skill_subscription_id:o.a.number,bot_id:o.a.number,score:o.a.number,title:o.a.string,reply_candidates:i.a,is_followup:o.a.bool,handler:o.a.oneOf(Object.values(a.f)),corrected_message:o.a.string,new_context:o.a.objectOf(o.a.string)})},function(e,t,n){e.exports=n(178)},function(e,t,n){"use strict";var r=n(240);t.a=e=>"number"==typeof e?new Date(e):Object(r.a)(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return s}));var r=n(123),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function i(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var c=e,l=t,u=[],d=u,f=!1;function p(){d===u&&(d=u.slice())}function h(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,p();var n=d.indexOf(e);d.splice(n,1),u=null}}}function g(e){if(!i(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,l=c(l,e)}finally{f=!1}for(var t=u=d,n=0;n<t.length;n++){(0,t[n])()}return e}function b(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");c=e,g({type:a.REPLACE})}function v(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(h())}return n(),{unsubscribe:t(n)}}})[r.a]=function(){return this},e}return g({type:a.INIT}),(o={dispatch:g,subscribe:m,getState:h,replaceReducer:b})[r.a]=v,o}function c(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function l(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},a=0;a<s.length;a++){var l=s[a],u=n[l],d=e[l],f=u(d,t);if(void 0===f){var p=c(l,t);throw new Error(p)}o[l]=f,r=r||f!==d}return(r=r||s.length!==Object.keys(e).length)?o:e}}function u(e,t){return function(){return t(e.apply(this,arguments))}}function d(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=u(o,t))}return n}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(o)}));return h({},n,{dispatch:r=m.apply(void 0,a)(n.dispatch)})}}}},function(e,t,n){var r=n(29);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){var r=n(63),o=n(113),a=n(90);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(50);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(61);e.exports=function(e){if(r(e))return e;throw TypeError(String(e)+" is not an object")}},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(83);t.a=o.a.shape(Object(i.a)(e=>({[e]:o.a.func}),Object.values(a.b)))},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(18),o=n(5),a=n(2),i=n(30),s=n(9);const c=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:a.r})},l=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:a.w})},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=JSON.parse(window.localStorage.getItem("pusherTransportEncrypted"));t.indexOf("ws")<0&&n&&"ws"!==n.transport&&window.localStorage.removeItem("pusherTransportEncrypted"),Object(r.startConfiguration)({auth:{...Object(s.a)({token:e},{withVersion:!0})},disabledTransports:t}),Object(s.e)(e)},d=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(c,l)=>{const{local:{context:d,labels:f},chatbubble:{botKey:p,currentLanguage:h,disabledTransports:m},environment:{PAT_HOST:g,VERSION:b},bot:{includeDisabledLanguages:v}}=l();c({type:a.bb,hasRequestedGreeting:n});const y={context:d,labels:f.join(","),language_code:t||h,trigger_dialogue_slug:e,include_disabled_languages:v,should_greet:n,version:b},w=await c(Object(s.f)({method:"post",url:`${g}/chatbubble/${o.j}/connect`,params:y,...Object(s.a)({botKey:p},{withCurrentUrl:!0})}));if(!w)return;const{pusherConnected:x}=l().connection;if(x)try{Object(r.disconnect)()}catch(e){console.warn(e)}const{token:E,chat_id:O,created:k,all_greetings_hide_input:_}=w.data;c({type:a.J,token:E}),c({type:a.H,chatId:O,allGreetingsHideInput:_}),c({type:a.ib,startedAt:k}),c(Object(s.c)((new Date).toISOString())),u(E,m),c(Object(i.a)())}},f=e=>t=>t({type:a.s,triggerConfig:e})},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(22),i=n(55);function s(e){let{name:t,label:n,register:r,id:s,...c}=e;return o.a.createElement(i.a,{htmlFor:s||t&&`${a.a.CHECKBOX}_${t}`},o.a.createElement(i.e,Object.assign({name:t,type:a.a.CHECKBOX,id:s||t&&`${a.a.CHECKBOX}_${t}`},r&&{...r(t)},c)),o.a.createElement(i.f,null,o.a.createElement(i.b,{viewBox:"0 0 24 24"},o.a.createElement("polyline",{points:"20 6 9 17 4 12"}))),n&&o.a.createElement(i.c,null,n))}s.defaultProps={register:null,id:null},t.a=s},function(e,t,n){"use strict";n.d(t,"c",(function(){return y})),n.d(t,"b",(function(){return w})),n.d(t,"f",(function(){return x})),n.d(t,"h",(function(){return E})),n.d(t,"d",(function(){return _})),n.d(t,"i",(function(){return C})),n.d(t,"a",(function(){return I})),n.d(t,"e",(function(){return A})),n.d(t,"g",(function(){return P}));var r=n(239),o=n(22),a=n(5),i=n(17),s=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,o]=n;return{...e,...Object(i.a)(r,t)?{}:{[r]:o}}},{})}},c=function(){let{status:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!(e>=200&&e<=299)},l=n(46),u=n(2),d=n(93),f=n(30),p=n(54),h=n(66),m=n(75),g=n(9),b=n(42);const v=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:a}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:a}},y=(e,t,n)=>(r,o)=>{const{botKey:a}=v(o);r(Object(g.d)(a,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},w=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:i}=v(r),s=await n(Object(f.b)()),{headers:l}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:s}),d={message:e,temporaryId:t},p=await n(Object(g.f)({method:"post",url:`${o}/chatbubble/${a.j}/message/`,data:d,headers:l},{onError:e=>{var r;n({type:u.Bb,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));c(p)||(n({type:u.Bb,...p.data}),n(Object(b.e)()))},x=e=>t=>{t({type:u.ab,formData:e})},E=function(e,t,n){let{responsePromise:i,tempId:s}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4?arguments[4]:void 0;return async(d,p)=>{const{PAT_HOST:h,token:m,local:y,forms:w}=v(p),E=await d(Object(f.b)()),{headers:O}=Object(g.a)({token:m},{withCurrentUrl:!0,extra:E});w&&Object.values(w).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.b.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.b.UNANSWERED};d(Object(g.f)({method:"post",url:`${h}/chatbubble/${a.j}/form/submit`,data:t,headers:O})),d(x({...e,formSubmitState:o.b.UNANSWERED}))}});const k=s||Object(r.a)();d({type:u.I,data:{id:k,created:(new Date).toISOString(),message:e,buttonType:l}}),d(Object(g.c)((new Date).toISOString()));const _={message:e,exchange_id:t,temporaryId:k,new_context:{...y.context,...n||{}}},C=i?await i:await d(Object(g.f)({method:"post",url:`${h}/chatbubble/${a.j}/message/`,data:_,headers:O},{onError:e=>{var t;console.error(`/chatbubble/${a.j}/message returned ${e.response.status}`),d({type:u.Bb,temporaryId:k,status:null==e||null===(t=e.response)||void 0===t?void 0:t.status}),d({type:u.i,isTyping:!1})}}));c(C)||(d({type:u.Bb,...C.data}),d(Object(b.e)()))}},O=e=>({...e,temporaryId:Object(r.a)()}),k=e=>{let{temporaryId:t}=e;return t},_=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:i,attachments:l},connection:{token:d},environment:{PAT_HOST:p}}=t(),h=await e(Object(f.b)()),{headers:m}=Object(g.a)({token:d},{extra:h}),b=Object(r.a)(),v=l.files.map(O).map(s("file"));e({type:u.G,data:{attachments:v}}),e({type:u.k}),e({type:u.I,data:{id:b,created:(new Date).toISOString(),attachment_ids:v.map(k),message:""}}),e(Object(g.c)((new Date).toISOString()));const y=(t,n)=>{var r;e({type:u.Bb,temporaryId:b,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:u.Ab,attachment:{...n,status:a.a.ERROR}}):v.forEach(t=>e({type:u.Ab,attachment:{...t,status:a.a.ERROR}}))},w=v.map(s("file","url")),x=`${p}/chatbubble/${a.j}/attachment/create`,E={attachments:w,temporaryChatMessageId:b},_=await e(Object(g.f)({method:"post",url:x,data:E,headers:m},{onError:e=>y(e)}));if(c(_)||!Array.isArray(null==_||null===(n=_.data)||void 0===n?void 0:n.attachments))return;const[C,j]=_.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:a,temporary_id:i,upload_url:s}=n;return e({type:u.Ab,attachment:{temporaryId:i,id:a}}),[[...r,a],[...o,s]]},[[],[]]),T={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":i},S=(I=l.files,A=j,"number"!=typeof(null==I?void 0:I.length)||I.length!==(null==A?void 0:A.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):I.map((e,t)=>[e,A[t]])).map(async t=>{let[{file:n,...r},o]=t;const a=await(e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))}))(n),i={...T,"Content-Type":n.type};return await e(Object(g.f)({method:"put",url:o,data:a,headers:i},{onError:e=>y(e,r)}))});var I,A;if((await Promise.all(S)).some(c))return;const N=`${p}/chatbubble/${a.j}/attachment/uploads-complete`,P={attachmentIds:C,temporaryChatMessageId:b,exchangeId:l.exchangeId};e(Object(g.c)((new Date).toISOString())),e(Object(g.f)({method:"post",url:N,data:P,headers:m},{onError:e=>y(e)}))},C=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(s,l)=>{const{connection:{token:d},chatbubble:{currentLanguage:f}}=l(),{PAT_HOST:m}=l().environment;if(!d){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return s(Object(h.c)(r)),s(Object(p.g)()),void(t&&s(Object(p.k)()))}if(n&&n!==f){const e="Tried to trigger a dialogue in another language on an existing chat";s(Object(g.b)({message:e,level:"error",extra:{languageCode:n,currentLanguage:f}}))}const v=o||Object(r.a)();s({type:u.yb,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),s(Object(g.c)((new Date).toISOString()));const y={exchange_id:e,temporaryId:v},{headers:w}=Object(g.a)({token:d},{withCurrentUrl:!0}),x=i?await i:await s(Object(g.f)({method:"post",url:`${m}/chatbubble/${a.j}/trigger/`,data:y,headers:w}));c(x)||(t&&s(Object(p.k)()),s(Object(b.e)()))}},j=(e,t)=>!!t.find(t=>{let{buttons:n=[]}=t;return!!n.find(t=>{let{language_code:n,button_type:r}=t;return n===e&&Object(l.a)(r)===a.b.HANDOVER_REQUEST})}),T=(e,t)=>n=>{n({type:u.j,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},S=(e,t,n)=>async(r,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=o(),l=await r(Object(f.b)()),{headers:u}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:l}),d={button:t,chatMessage:e,temporaryId:n,version:c},p=(null==(h=t.button_type)?void 0:h.toLowerCase())===a.b.PRIVACY_EXPORT.toLowerCase()?Object(m.c)():{};var h;return r(Object(g.f)({method:"post",url:`${s}/chatbubble/${a.j}/button/click/`,data:d,headers:u,...p}))},I=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(i,s)=>{const{environment:{VERSION:c},messages:{chatMessages:f},chatbubble:{currentLanguage:h},local:b}=s(),v=Object(l.a)(e.button_type),y=Object(r.a)(),w={};o.length>0&&o.forEach(e=>{var r,o,s;if(e.button_type===a.b.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value)w[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,i(T(i,t));else if(e.button_type===a.b.CHECKBOX.toLowerCase()){n.find(t=>t.id===e.id)?(w[e.value]=e.value,i(T(t,e)),i(S(t,e,y))):w[e.value]=""}else w[e.value]=""});const x=i(S(t,{...e,new_context:{...b.context,...w||{}}},y));switch(i({type:u.j,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),v){case a.b.QUICK_REPLY:{const n={responsePromise:x,tempId:y};i(E(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case a.b.HANDOVER_REQUEST:if(!j(h,f)){const e={version:c};i(Object(g.b)({message:"Requested handover with no button",level:"error",extra:e}))}i(Object(d.b)(x));break;case a.b.DIALOGUE_TRIGGER:case a.b.SUGGESTION_DIALOGUE_TRIGGER:i(C(e.value,{tempId:y,responsePromise:x}));break;case a.b.PRIVACY_EXPORT:i(Object(m.b)({responsePromise:x}));break;case a.b.PRIVACY_DELETE:i(Object(m.a)({responsePromise:x}));break;case a.b.CONTACT_DETAILS:i(Object(p.p)(e));break;case a.b.UPLOAD_ATTACHMENT:i(Object(p.a)(e))}}},A=(e,t)=>async(n,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:l}}=o(),d=Object(r.a)(),p=e.contact_details.contact_type,h={...e,button_type:a.b.edit_contact_details};n({type:u.I,data:{id:d,created:(new Date).toISOString(),message:t,buttons:[h],isContactDetails:!0}});const m=await n(Object(f.b)()),{headers:b}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:m}),v={contactType:p,value:t,version:l,buttons:[h],temporaryId:d},y=await n(Object(g.f)({method:"post",url:`${s}/chatbubble/${a.j}/button/contact-details/`,data:v,headers:b}));c(y)||n({type:u.Bb,...y.data})},N=((e,t,n)=>{let r,o=[];return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n&&o.push(i),clearTimeout(r),r=setTimeout(()=>{n||e(...i);const t=o.slice(1).reduce((e,t)=>n(t,e),o[0]);e(...t),o=[]},t)}})(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=n(),l=await t(Object(f.b)()),{headers:d}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:l}),p={chatMessageId:r,version:c};t({type:u.fb,id:r,index:o}),t(Object(g.f)({method:"patch",url:`${s}/chatbubble/${a.j}/message-seen`,data:p,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),P=(e,t)=>(n,r)=>N({id:e,index:t},n,r)},function(e,t,n){"use strict";e.exports=n(176)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.";const a=(e,t,n,a)=>{var i,s;if(-1!==r.indexOf(e)&&Boolean(a)&&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 a=Object.values(n);try{e(...a)}catch(e){console.error(e)}}(a,e,t),"API"!==n)return;if(null===(i=window)||void 0===i||null===(s=i.kindlyChat)||void 0===s||!s.APIRoot)return void console.warn("No APIRoot when rendered using kindly-chat API");"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0}))};function i(e,t,n,r){e&&a("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function c(e){!1===s&&(s=!0,a("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const l=(e,t,n,r,a,i,s)=>{let c=!1;const l=null==e?void 0:e[n];if(l){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(l(t,r,a,i,n))}catch(e){console.error(e)}}return"API"===s&&(c=!window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:r,lastMessage:a,chatLog:i,buttonType:n},bubbles:!0,cancelable:!0}))),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(17),o=n(2);const a={TAKEOVER:"takeover",MESSAGE:"message"},i=e=>(t,n)=>{const{dismissedMessages:i}=n().pushMessages,{autopopupTime:s,enabled:c,title:l,message:u}=e;if(!c||Object(r.a)(l,i))return;const d={type:o.pb,pushMessageTitle:l,pushMessageType:a.MESSAGE,pushMessageText:u};s&&0!==s?setTimeout(()=>t(d),s):t(d)},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:o.B})}},function(e,t,n){"use strict";var r=n(0);t.a=(e,t)=>{const n=Object(r.useRef)();return Object(r.useCallback)(r=>{new Date-n.current<t||(e(r),n.current=new Date)},[t,e])}},function(e,t,n){"use strict";t.a=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(3),i=n(70),s=n(10),c=e=>{let{styles:t={},...n}=e;return o.a.createElement("svg",Object.assign({viewBox:"0 0 1792 1792",xmlns:"https://www.w3.org/2000/svg"},n),o.a.createElement("path",{d:"M1408 928v320q0 119-84.5 203.5T1120 1536H288q-119 0-203.5-84.5T0 1248V416q0-119 84.5-203.5T288 128h704q14 0 23 9t9 23v64q0 14-9 23t-23 9H288q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113V928q0-14 9-23t23-9h64q14 0 23 9t9 23zm384-864v512q0 26-19 45t-45 19-45-19l-176-176-652 652q-10 10-23 10t-23-10L695 983q-10-10-10-23t10-23l652-652-176-176q-19-19-19-45t19-45 45-19h512q26 0 45 19t19 45z",fill:"#fff"}))},l=n(5),u=n(72),d=(n(121),n(57),n(8)),f=n(7),p=n(104),h=n(79),m=n(17),g=n(46),b=n(21),v=n(67),y=n(95);const w=n(1).c.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-sn3ww8-0"})(["width:100%;position:relative;"]),{EXTERNAL_LINK:x,EMAIL:E,PHONE:O,CHECKBOX:k,SLIDER:_}=l.b;function C(e){let{button:t,setCheckboxValue:n,checked:l,chatMessage:C,disabled:j=!1,handlers:T=null,hasSuggestion:S=!1,isNudge:I=!1,onClick:A=null,submitButtonsList:N}=e;const P=Object(a.c)(),M=Object(g.a)(t.button_type),{chatMessages:L,buttonClicks:R}=Object(a.d)(f.n)||[],D=Object(a.d)(f.e)||[],B=Object(m.a)(M,[x,O,E]),F=Object(m.a)(M,[k]),z=Object(m.a)(M,[_]),U=Boolean(l.find(e=>e.id===t.id)),H=Object(r.useRef)(N);let $="";M===O&&($="tel:"),M===E&&($="mailto:");const V=e=>{const n=parseFloat(e);var r;n&&Array.isArray(H.current)&&(null===(r=H.current)||void 0===r||r.map(e=>e.id===t.id?(e.slider_details.value=n,e):e))},q=Object(r.useCallback)(e=>{if(e.preventDefault(),Object(i.a)(e,T,M,Object(p.a)(t),Object(h.a)(C||{}),L.map(h.a),null==D?void 0:D.renderedBy))return;"function"==typeof A&&A(),P(Object(d.g)(t,C,l,H.current));const{href:n,target:r}=e.target;if(n){const e=Boolean(r);setTimeout(()=>{e?window.open(n,r):window.location.href=n},250)}},[M,C,L,t,P,T,l,H,A,null==D?void 0:D.renderedBy]),G=Object(u.a)(q,3e3),W=(null!=R?R:[]).find(e=>{let{chatMessageId:n,buttonId:r}=e;return n===(null==C?void 0:C.id)&&r===t.id}),Y=Object(r.useCallback)(()=>{n(t)},[t,n]);return Object(r.useEffect)(()=>{W&&F&&!U&&n(t)},[W,F,t,n,U]),z&&null!=t&&t.slider_details?o.a.createElement("div",null,o.a.createElement(y.a,{name:`slider_${t.id}`,onChange:V,from:t.slider_details.from_value,to:t.slider_details.to_value,value:t.slider_details.value,step:t.slider_details.step_value,affix:t.slider_details.affix,affixValue:t.slider_details.affix_value,ariaLabel:t.label})):o.a.createElement(b.b,Object.assign({truncateText:S,cy:"message-button",color:!F,type:"button"},B&&{href:`${$}${M===x?(K=t.value,K.match(/^https?:\/\//i)?K:`http://${K}`):t.value}`},B&&{target:`${M!==x||I?"_self":"_blank"}`},F&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":t.label,"aria-checked":U?"true":"false"},{icon:M===x&&I&&o.a.createElement(s.b,{fill:"#FFF",width:10,height:16})||M===x&&!I&&o.a.createElement(c,{width:14,height:14}),disabled:j,onClick:e=>{F?Y():G(e)},hasBeenClicked:W}),F&&o.a.createElement(w,null,o.a.createElement(v.a,{disabled:!0,"aria-disabled":!0,name:`checkbox-${t.id}`,checked:U,label:t.label})),F?"":t.label);var K}C.defaultProps={checked:[]};t.a=C},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(159),o=n.n(r),a=n(5);function i(e){if(!e)return null;const t=e.match(/filename="(.+)"/);return t&&2===t.length?t[1]:null}var s=n(2),c=n(9);const l=()=>({transformResponse:e=>e,responseType:"text"}),u=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)=>{var s;let u=e?await e:null;if(!u){const{connection:{token:e},environment:{PAT_HOST:o}}=r(),i=`${o}/chatbubble/${a.j}/privacy/export/${t}`,{headers:s}=Object(c.a)({token:e}),d=l();u=await n(Object(c.f)({method:"get",url:i,...d,headers:s}))}if(200!==(null===(s=u)||void 0===s?void 0:s.status))return;const{headers:d,data:f}=u,p=i(d["content-disposition"])||"export.json",h=new Blob([f],{type:d["content-type"]});o()(h,p)}},d=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:o},environment:{PAT_HOST:i}}=n(),l=`${i}/chatbubble/${a.j}/privacy/delete/`,u=e?await e:await t(Object(c.f)({method:"delete",url:l,...Object(c.a)({token:r})}));200===(null==u?void 0:u.status)&&(setTimeout(()=>t(Object(c.d)(o)),5e3),t({type:s.v}),t({type:s.V}))}}},function(e,t,n){"use strict";var r=n(69),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<i.length;++g){var b=i[g];if(!(a[b]||r&&r[b]||m&&m[b]||s&&s[b])){var v=f(n,b);try{l(t,b,v)}catch(e){}}}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(158);let o,a;const i=e=>(t,n)=>{const{SAGE_WS_HOST:i}=n().environment;if(!o||!o.isConnected())try{o=new r.Socket(`${i}/chatbubble/socket`),o.connect()}catch(e){console.warn("Could not connect to sage socket",e)}try{a=o.channel(`chatbubble_active:${e}`),a.join()}catch(e){console.warn("Could not join active channel",e)}},s=()=>{if(o&&a)try{a.leave()}catch(e){console.warn("Could not leave active channel",e)}if(o)try{o.disconnect()}catch(e){console.warn("Could not disconnect from sage socket",e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},function(e,t,n){"use strict";var r=n(104);t.a=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.a)}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(1),o=n(6);const a=r.c.div.withConfig({displayName:"styles__FormWrapper",componentId:"sc-147n8gc-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;"]),i=r.c.form.withConfig({displayName:"styles__Form",componentId:"sc-147n8gc-1"})(["display:flex;flex-direction:column;flex:1;",""],e=>{let{isSubmitted:t}=e;return t?`*:invalid {\n border: 1px solid ${o.a.errorColor};\n }`:"*:invalid {\n border: 1px solid transparent;\n }"}),s=r.c.div.withConfig({displayName:"styles__FormTitle",componentId:"sc-147n8gc-2"})(["font-size:",";font-weight:500;display:flex;align-items:center;& > svg{margin-right:4px;}"],o.d.fontSizeP),c=r.c.div.withConfig({displayName:"styles__FormActionsWrapper",componentId:"sc-147n8gc-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:36px;& > button{&:last-child{margin-left:12px;}}"])},function(e,t){e.exports={}},function(e,t,n){var r=n(120),o=n(29),a=n(135),i=n(38)("toStringTag"),s="Arguments"==a(function(){return arguments}());e.exports=r?a: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=Object(e),i))?n:s?a(t):"Object"==(r=a(t))&&o(t.callee)?"Arguments":r}},function(e,t,n){"use strict";t.a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((t,n)=>({...t,...e(n)}),{})}},function(e,t,n){"use strict";t.a=()=>{}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var c,l=[],u=!1,d=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.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 h(e,t)),1!==l.length||u||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(204),o=n(136);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(114),o=n(37),a=n(29),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(62);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","feedback","privacy","websocketFallback","lightbox","nudge"])},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(5),o=n(2),a=n(9),i=n(42);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:o.wb,...n.data,requestedTakeover:!0}),t(Object(i.e)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/takeover_cancel/`,...Object(a.a)({token:n})})),e({type:o.vb})},l=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Db}),e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/user_started_typing/`,...Object(a.a)({token:n})}))},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Eb}),e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/user_stopped_typing/`,...Object(a.a)({token:n})}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(36),i=n(106),s=n(67),c=n(55);t.a=function(e){let{name:t,control:n,list:l,validators:u,formId:d,register:f,setError:p,clearErrors:h}=e;const m=Object(a.d)({control:n,name:l.map(e=>e.slug)}),g=Object(a.c)({control:n,name:l.map(e=>e.slug)});return Object(r.useEffect)(()=>{if(u)for(let e=0;e<u.length;e+=1){Object.keys(u[e]).forEach(n=>{var r;"texts"!==n&&(n&&(m.some(e=>!!e)?h(t):p(t,{type:n,message:g.isDirty||g.isSubmitted?null===(r=u[e].texts)||void 0===r?void 0:r.text:""})))})}},[m,u,p,h,d,l,t,g]),o.a.createElement(o.a.Fragment,null,l.map(e=>{var t;return o.a.createElement(c.d,{key:`${e.slug}_${e.order}`},o.a.createElement(s.a,{register:f,value:e.value,label:null===(t=e.texts)||void 0===t?void 0:t.label,name:e.slug}))}).sort(e=>e.order),o.a.createElement(i.a,{name:t,control:n}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(5),i=n(1);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t/=100),`rgba(${r},${o},${a},${t})`},c=i.c.div.withConfig({displayName:"styles__SliderWrapper",componentId:"sc-1isvbdy-0"})(["margin:6px 0;display:flex;flex-direction:column;position:relative;padding:12px 12px 16px 12px;width:100%;border-radius:6px;border:",";"],e=>{let{theme:t}=e;return`1px solid ${t.botMessageBackground}`}),l=i.c.div.withConfig({displayName:"styles__SliderAffix",componentId:"sc-1isvbdy-1"})(["padding:0px 8px;font-size:14px;"]),u=i.c.div.withConfig({displayName:"styles__SliderInfoContainer",componentId:"sc-1isvbdy-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:28px;"]),d=i.c.span.withConfig({displayName:"styles__SliderInfo",componentId:"sc-1isvbdy-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:14px;"]),f=i.c.div.withConfig({displayName:"styles__SliderContainer",componentId:"sc-1isvbdy-4"})(["position:relative;display:flex;flex:1;"]),p=Object(i.b)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-8px;border:1px solid ",";"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),h=(e,t,n)=>(e-n)/(t-n)*100,m=i.c.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} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} 100%)`}}}).withConfig({displayName:"styles__Slider",componentId:"sc-1isvbdy-5"})(["cursor:pointer;&[type='range']{appearance:none;width:100%;border-radius:25px;height:6px;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:6px;cursor:pointer;border-radius:25px;}}"],p,p);function g(e){let{from:t,to:n,value:i,affix:s,affixValue:p,step:h=1,onChange:g,name:b,field:v,ariaLabel:y}=e;const[w,x]=Object(r.useState)(((e,t,n)=>t<e?e+n:t)(h,i,t));return o.a.createElement(c,null,o.a.createElement(u,null,s===a.n.PREFIX&&o.a.createElement(l,null,p),o.a.createElement(d,null,w),s===a.n.SUFFIX&&o.a.createElement(l,null,p)),o.a.createElement(f,null,o.a.createElement(m,{type:"range",name:b,step:h,min:t,max:n,value:w,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(g&&g(e.target.value),null!=v&&v.onChange&&v.onChange(e),x(e.target.value))},"aria-label":y})))}g.defaultProps={value:1};t.a=g},function(e,t,n){"use strict";var r=n(17);t.a=function(){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[o,a]=n;return{...e,...Object(r.a)(o,t)?{[o]:a}:{}}},{})}},function(e,t,n){"use strict";const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`};t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},function(e,t,n){"use strict";t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce((e,n)=>{var r;return{...e,[t(n)]:[...null!==(r=e[t(n)])&&void 0!==r?r:[],n]}},{})}},function(e,t,n){"use strict";t.a=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find(e=>{let{id:t}=e;return n===t||r===t})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));let r=null;async function o(){try{if(!r){const{default:e}=await Promise.resolve().then(n.t.bind(null,237,7));r=new Audio(e)}await r.play()}catch(e){console.error("Could not play notification sound:",e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(28),o=n(20),a=n(14);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.a)(e).getTime(),i=Object(r.a)(t);return new Date(n+i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(3),a=n(7);function i(){const{nudges:e}=Object(o.d)(a.d);return Object(r.useMemo)(()=>{var t,n,r,o,a;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!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]},[e])}},function(e,t,n){"use strict";t.a=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},function(e,t,n){"use strict";var r=n(46),o=n(73);t.a=e=>{let{button_type:t,...n}=e;return{...n,button_type:Object(o.a)(t),category:Object(r.a)(t)}}},function(e,t,n){"use strict";var r=n(0);function o(e){return e.touches||e.originalEvent.touches}let a=null;t.a=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:Object(r.useCallback)(e=>{const t=o(e)[0];a=t.clientX},[]),handleTouchMove:Object(r.useCallback)(e=>{if(!a)return;const r=o(e)[0].clientX;t(a-r>5?n+1:n-1,i),a=null},[i,n,t]),handleTouchEnd:Object(r.useCallback)(()=>{a=null},[])}}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(36);var i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const o=Object(r.useRef)();Object(r.useEffect)(()=>{o.current=t},[t]),Object(r.useEffect)(()=>{if(!(n&&n.addEventListener))return()=>{};const t=async e=>{await o.current(e)};return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}},[e,n])},s=n(6);function c(e){let{width:t,height:n,color:r}=e;return o.a.createElement("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none"},o.a.createElement("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"}),o.a.createElement("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r}))}c.defaultProps={width:24,height:24,color:"#333"};var l=c;const u=n(1).c.div.withConfig({displayName:"style__FormError",componentId:"sc-13lpm2f-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:12px;margin-top:4px;right:0;left:auto;color:",";max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";"],s.a.errorColor,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});t.a=function(e){var t,n,r;let{name:c,control:d,inputRef:f,setError:p,clearErrors:h,trigger:m}=e;const{errors:g,isSubmitted:b}=Object(a.c)({name:c,control:d});i("input",e=>{var t;null!==(t=e.target)&&void 0!==t&&t.validationMessage&&!g[c]&&p?p(`browser_error_${c}`,{type:"browser_error",message:e.target.validationMessage},{shouldFocus:!0}):h&&h(`browser_error_${c}`),b&&m&&m(c)},f.current);const v=(null===(t=g[c])||void 0===t?void 0:t.message)||(null===(n=g[`browser_error_${c}`])||void 0===n?void 0:n.message)||(null===(r=f.current)||void 0===r?void 0:r.validationMessage);return o.a.createElement(u,{show:v&&b},o.a.createElement(l,{width:16,height:16,color:s.a.errorColor}),v)}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(3),i=(n(49),n(8)),s=n(10),c=n(21),l=n(34),u=n(1),d=n(6);const f=Object(u.b)(["border-radius:100px;background-color:",";"],d.a.grayColor),p=u.c.div.withConfig({displayName:"styles__ErrorContent",componentId:"sc-1lhoync-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),h=u.c.div.withConfig({displayName:"styles__ErrorHeader",componentId:"sc-1lhoync-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],d.a.shadowColor),m=u.c.div.withConfig({displayName:"styles__ErrorName",componentId:"sc-1lhoync-2"})(["height:20px;width:110px;margin-left:20px;",""],f),g=u.c.div.withConfig({displayName:"styles__ErrorContainer",componentId:"sc-1lhoync-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),b=u.c.span.withConfig({displayName:"styles__ErrorText",componentId:"sc-1lhoync-4"})(["font-size:14px;margin:16px 0 24px 0;",";"],e=>e.heading&&"font-size: 19px; font-weight: 400; \n margin: 0"),v=u.c.div.withConfig({displayName:"styles__ErrorCircle",componentId:"sc-1lhoync-5"})(["height:","px;min-width:","px;",""],e=>e.size,e=>e.size,f),y=u.c.div.withConfig({displayName:"styles__ErrorComposer",componentId:"sc-1lhoync-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],d.a.grayColor),w=u.c.div.withConfig({displayName:"styles__ErrorInput",componentId:"sc-1lhoync-7"})(["height:40px;width:100%;margin-right:20px;",""],f);var x=function(){const e=Object(a.c)(),t=Object(r.useCallback)(()=>{e(Object(i.w)())},[e]);return o.a.createElement(p,null,o.a.createElement(h,null,o.a.createElement(v,{size:30}),o.a.createElement(m,null),o.a.createElement(l.b,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-cy":"close-chat-button"},o.a.createElement(s.e,{width:25,height:25}))),o.a.createElement(g,null,o.a.createElement(b,{heading:!0},"Oh no..."),o.a.createElement(b,null,"We were unable to load the chat. Please refresh or try again later."),o.a.createElement(c.b,{onClick:t,color:!0},"Refresh chat")),o.a.createElement(y,null,o.a.createElement(w,null),o.a.createElement(v,{size:40})))};class E 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(Object(i.C)({message:a,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?o.a.createElement(x,null):e?null:t}}E.defaultProps={displayError:!0};t.a=Object(a.b)()(E)},function(e,t,n){"use strict";var r=n(28),o=n(101),a=n(14);var i=n(240),s=n(20);t.a=e=>{let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!0;if(0!==n){return function(e,t){Object(a.a)(2,arguments);var n=Object(s.a)(e),r=Object(s.a)(t);return n.getTime()>r.getTime()}(function(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(o.a)(e,1e3*n)}(Object(i.a)(t),n),new Date)}}return!1}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(36),i=n(56);const s=[i.c.name,i.a.name,i.d.name,a.a.name,i.b.name];var c=n(1),l=n(6);const u=c.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cfm2l6-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;"]),d=c.c.label.withConfig({displayName:"styles__Label",componentId:"sc-1cfm2l6-1"})(["font-size:",";margin:4px 0;font-weight:500;"],l.d.fontSize12),f=c.c.div.withConfig({displayName:"styles__HelpText",componentId:"sc-1cfm2l6-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:",";color:",";"],l.d.fontSize12,l.h.textColorLight);function p(e){var t;let{className:n,children:r,label:a,htmlFor:i,helperText:c,required:l}=e;return(null==r||!r.length||r.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${r.length}`),null!=s&&s.includes(null===(t=r[0].type)||void 0===t?void 0:t.name)||console.error(`InputWrapper child can only be one of the following: ${s.join(", ")}`),o.a.createElement(u,{className:n},a&&o.a.createElement(d,{htmlFor:i},a,l?o.a.createElement(o.a.Fragment,null,"*"):""),r,c&&o.a.createElement(f,null,c))}p.defaultProps={label:null,htmlFor:null,helperText:null,required:!1};t.a=p},function(e,t,n){"use strict";n.r(t);var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.default=o},function(e,t,n){"use strict";(function(t){var r=n(32),o=n(183),a=n(128),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=n(129)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(i)})),e.exports=l}).call(this,n(86))},function(e,t,n){var r=n(37),o=n(208),a=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=a},function(e,t,n){var r=n(63),o=n(138),a=n(64),i=n(140),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(a(e),t=i(t),a(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports={}},function(e,t,n){var r=n(29),o=n(212);e.exports=function(e){if(r(e))return e;throw TypeError(o(e)+" is not a function")}},function(e,t,n){var r=n(145),o=n(147),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},function(e,t){e.exports={}},function(e,t,n){var r,o=n(64),a=n(219),i=n(153),s=n(117),c=n(225),l=n(139),u=n(116),d=u("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"<\/script>"},h=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?h(r):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):h(r);for(var n=i.length;n--;)delete m.prototype[i[n]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=o(e),n=new f,f.prototype=null,n[d]=e):n=m(),void 0===t?n:a(n,t)}},function(e,t,n){var r=n(120),o=n(113).f,a=n(62),i=n(44),s=n(227),c=n(38)("toStringTag");e.exports=function(e,t,n,l){if(e){var u=n?e:e.prototype;i(u,c)||o(u,c,{configurable:!0,value:t}),l&&!r&&a(u,"toString",s)}}},function(e,t,n){var r={};r[n(38)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(73);o.a.shape({button_type:o.a.oneOf([...Object.values(a.b),...Object.values(a.b).map(i.a)]).isRequired,is_active:o.a.bool,label:o.a.string.isRequired,value:o.a.string,new_context:o.a.object,index:o.a.number,language_code:o.a.string})},function(e,t,n){"use strict";var r=n(4),o=n.n(r);t.a=o.a.arrayOf(o.a.shape({selected:o.a.bool.isRequired,_id:o.a.string.isRequired,score:o.a.number.isRequired,sample:o.a.string.isRequired}))},function(e,t,n){"use strict";(function(e,r){var o,a=n(156);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var i=Object(a.a)(o);t.a=i}).call(this,n(85),n(177)(e))},,function(e,t){e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(32);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(32),o=n(184),a=n(185),i=n(127),s=n(186),c=n(189),l=n(190),u=n(130);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var b=s(e.baseURL,e.url);function v(){if(h){var r="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,a={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,a),h=null}}if(h.open(e.method.toUpperCase(),i(b,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||l(b))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},function(e,t,n){"use strict";var r=n(128);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(a,l),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var u=o.concat(a).concat(i).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,l),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=n(87),o=n(205),a=n(81),i=n(137),s=n(214),c=i.set,l=i.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){c(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r,o,a,i=n(206),s=n(37),c=n(61),l=n(62),u=n(44),d=n(112),f=n(116),p=n(117),h=s.WeakMap;if(i||d.state){var m=d.state||(d.state=new h),g=m.get,b=m.has,v=m.set;r=function(e,t){if(b.call(m,e))throw new TypeError("Object already initialized");return t.facade=e,v.call(m,e,t),t},o=function(e){return g.call(m,e)||{}},a=function(e){return b.call(m,e)}}else{var y=f("state");p[y]=!0,r=function(e,t){if(u(e,y))throw new TypeError("Object already initialized");return t.facade=e,l(e,y,t),t},o=function(e){return u(e,y)?e[y]:{}},a=function(e){return u(e,y)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(63),o=n(50),a=n(139);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(37),o=n(61),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){var r=n(209),o=n(141);e.exports=function(e){var t=r(e,"string");return o(t)?t:String(t)}},function(e,t,n){var r=n(29),o=n(88),a=n(142);e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return r(t)&&Object(e)instanceof t}},function(e,t,n){var r=n(143);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(210),o=n(50);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(115);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t,n){var r=n(89),o=n(112);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.18.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(136);e.exports=function(e){return Object(r(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){"use strict";var r=n(37),o=n(29),a=n(215).f,i=n(217),s=n(114),c=n(149),l=n(62),u=n(44),d=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,h,m,g,b,v,y=e.target,w=e.global,x=e.stat,E=e.proto,O=w?r:x?r[y]:(r[y]||{}).prototype,k=w?s:s[y]||l(s,y,{})[y],_=k.prototype;for(p in t)n=!i(w?p:y+(x?".":"#")+p,e.forced)&&O&&u(O,p),m=k[p],n&&(g=e.noTargetGet?(v=a(O,p))&&v.value:O[p]),h=n&&g?g:t[p],n&&typeof m==typeof h||(b=e.bind&&n?c(h,r):e.wrap&&n?d(h):E&&o(h)?c(Function.call,h):h,(e.sham||h&&h.sham||m&&m.sham)&&l(b,"sham",!0),l(k,p,b),E&&(u(s,f=y+"Prototype")||l(s,f,{}),l(s[f],p,h),e.real&&_&&!_[p]&&l(_,p,h)))}},function(e,t,n){var r=n(115);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(151).IteratorPrototype,o=n(118),a=n(90),i=n(119),s=n(81),c=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=o(r,{next:a(1,n)}),i(e,l,!1,!0),s[l]=c,e}},function(e,t,n){"use strict";var r,o,a,i=n(50),s=n(29),c=n(118),l=n(154),u=n(91),d=n(38),f=n(89),p=d("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(o=l(l(a)))!==Object.prototype&&(r=o):h=!0),null==r||i((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=c(r)),s(r[p])||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(44),o=n(29),a=n(146),i=n(116),s=n(226),c=i("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof Object?l:null}},function(e,t,n){var r=n(82),o=n(144),a=n(81),i=n(38)("iterator");e.exports=function(e){if(null!=e)return o(e,i)||o(e,"@@iterator")||a[r(e)]}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var r=n(92),o=n(96);t.a=t=>{var n,a;let{level:i="info",error:s,message:c,reduxState:l,extra:u}=t;c||null!=s&&s.message||(console.error("Attempted to log without message"),c="No error message provided");const d=Object(o.a)(l||{},r.b),f={version:e.env.VERSION,release:e.env.IS_PURE_BUILD?`${e.env.VERSION}-pure`:e.env.VERSION,userAgent:navigator.userAgent,state:l?JSON.stringify(d):void 0,...u},p={message:null!==(n=c)&&void 0!==n?n:null==s?void 0:s.message,name:null==s?void 0:s.name,stack:null==s?void 0:s.stack,code:null==s?void 0:s.code,signal:null==s?void 0:s.signal};return{message:null!==(a=c)&&void 0!==a?a:null==s?void 0:s.message,level:i,extra:f,error:p}}}).call(this,n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=0,s=1,c=2,l=3,u="closed",d="errored",f="joined",p="joining",h="leaving",m="phx_close",g="phx_error",b="phx_join",v="phx_reply",y="phx_leave",w="longpoll",x="websocket",E=function(){function e(t,n,r,o){a(this,e),this.channel=t,this.event=n,this.payload=r||{},this.receivedResp=null,this.timeout=o,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return o(e,[{key:"resend",value:function(e){this.timeout=e,this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref;this.recHooks.filter((function(e){return e.status===t})).forEach((function(e){return e.callback(n)}))}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer||(this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)})),this.timeoutTimer=setTimeout((function(){e.trigger("timeout",{})}),this.timeout))}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),O=t.Channel=function(){function e(t,n,r){var o=this;a(this,e),this.state=u,this.topic=t,this.params=n||{},this.socket=r,this.bindings=[],this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new E(this,b,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new C((function(){return o.rejoinUntilConnected()}),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(function(){o.state=f,o.rejoinTimer.reset(),o.pushBuffer.forEach((function(e){return e.send()})),o.pushBuffer=[]})),this.onClose((function(){o.rejoinTimer.reset(),o.socket.log("channel","close "+o.topic+" "+o.joinRef()),o.state=u,o.socket.remove(o)})),this.onError((function(e){o.isLeaving()||o.isClosed()||(o.socket.log("channel","error "+o.topic,e),o.state=d,o.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(function(){o.isJoining()&&(o.socket.log("channel","timeout "+o.topic,o.joinPush.timeout),o.state=d,o.rejoinTimer.scheduleTimeout())})),this.on(v,(function(e,t){o.trigger(o.replyEventName(t),e)}))}return o(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(m,e)}},{key:"onError",value:function(e){this.on(g,(function(t){return e(t)}))}},{key:"on",value:function(e,t){this.bindings.push({event:e,callback:t})}},{key:"off",value:function(e){this.bindings=this.bindings.filter((function(t){return t.event!==e}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var r=new E(this,e,t,n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=h;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(m,"leave",e.joinRef())},r=new E(this,y,{},t);return r.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),r.send(),this.canPush()||r.trigger("ok",{}),r}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e){return this.topic===e}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=p,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n){if(!(n&&[m,g,y,b].indexOf(e)>=0&&n!==this.joinRef())){var r=this.onMessage(e,t,n);if(t&&!r)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter((function(t){return t.event===e})).map((function(e){return e.callback(r,n)}))}}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===u}},{key:"isErrored",value:function(){return this.state===d}},{key:"isJoined",value:function(){return this.state===f}},{key:"isJoining",value:function(){return this.state===p}},{key:"isLeaving",value:function(){return this.state===h}}]),e}(),k=(t.Socket=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=r.timeout||1e4,this.transport=r.transport||window.WebSocket||k,this.heartbeatIntervalMs=r.heartbeatIntervalMs||3e4,this.reconnectAfterMs=r.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=r.logger||function(){},this.longpollerTimeout=r.longpollerTimeout||2e4,this.params=r.params||{},this.endPoint=t+"/"+x,this.reconnectTimer=new C((function(){n.disconnect((function(){return n.connect()}))}),this.reconnectAfterMs)}return o(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=_.appendParams(_.appendParams(this.endPoint,this.params),{vsn:"1.0.0"});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=e),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL(),this.transport.prototype),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach((function(e){return e()}))}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return t(e)}))}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return t(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){return e.trigger(g)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case i:return"connecting";case s:return"open";case c:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"channel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new O(e,t,this);return this.channels.push(n),n}},{key:"push",value:function(e){var t=this,n=e.topic,r=e.event,o=e.payload,a=e.ref,i=function(){return t.conn.send(JSON.stringify(e))};this.log("push",n+" "+r+" ("+a+")",o),this.isConnected()?i():this.sendBuffer.push(i)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){this.isConnected()&&this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.makeRef()})}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=JSON.parse(e.data),n=t.topic,r=t.event,o=t.payload,a=t.ref;this.log("receive",(o.status||"")+" "+n+" "+r+" "+(a&&"("+a+")"||""),o),this.channels.filter((function(e){return e.isMember(n)})).forEach((function(e){return e.trigger(r,o,a)})),this.stateChangeCallbacks.message.forEach((function(e){return e(t)}))}}]),e}(),t.LongPoll=function(){function e(t){a(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=i,this.poll()}return o(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+x),"$1/"+w)}},{key:"endpointURL",value:function(){return _.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=i}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==s&&this.readyState!==i||_.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),(function(t){if(t){var n=t.status,r=t.token,o=t.messages;e.token=r}else n=0;switch(n){case 200:o.forEach((function(t){return e.onmessage({data:JSON.stringify(t)})})),e.poll();break;case 204:e.poll();break;case 410:e.readyState=s,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}}))}},{key:"send",value:function(e){var t=this;_.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),(function(e){e&&200===e.status||(t.onerror(status),t.closeAndRetry())}))}},{key:"close",value:function(e,t){this.readyState=l,this.onclose()}}]),e}()),_=t.Ajax=function(){function e(){a(this,e)}return o(e,null,[{key:"request",value:function(e,t,n,r,o,a,i){if(window.XDomainRequest){var s=new XDomainRequest;this.xdomainRequest(s,e,t,r,o,a,i)}else{var c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(c,e,t,n,r,o,a,i)}}},{key:"xdomainRequest",value:function(e,t,n,r,o,a,i){var s=this;e.timeout=o,e.open(t,n),e.onload=function(){var t=s.parseJSON(e.responseText);i&&i(t)},a&&(e.ontimeout=a),e.onprogress=function(){},e.send(r)}},{key:"xhrRequest",value:function(e,t,n,r,o,a,i,s){var c=this;e.timeout=a,e.open(t,n,!0),e.setRequestHeader("Content-Type",r),e.onerror=function(){s&&s(null)},e.onreadystatechange=function(){if(e.readyState===c.states.complete&&s){var t=c.parseJSON(e.responseText);s(t)}},i&&(e.ontimeout=i),e.send(o)}},{key:"parseJSON",value:function(e){return e&&""!==e?JSON.parse(e):null}},{key:"serialize",value:function(e,t){var n=[];for(var o in e)if(e.hasOwnProperty(o)){var a=t?t+"["+o+"]":o,i=e[o];"object"===(void 0===i?"undefined":r(i))?n.push(this.serialize(i,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(i))}return n.join("&")}},{key:"appendParams",value:function(e,t){if(0===Object.keys(t).length)return e;var n=e.match(/\?/)?"&":"?";return""+e+n+this.serialize(t)}}]),e}();_.states={complete:4};t.Presence={syncState:function(e,t,n,r){var o=this,a=this.clone(e),i={},s={};return this.map(a,(function(e,n){t[e]||(s[e]=n)})),this.map(t,(function(e,t){var n=a[e];if(n){var r=t.metas.map((function(e){return e.phx_ref})),c=n.metas.map((function(e){return e.phx_ref})),l=t.metas.filter((function(e){return c.indexOf(e.phx_ref)<0})),u=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));l.length>0&&(i[e]=t,i[e].metas=l),u.length>0&&(s[e]=o.clone(n),s[e].metas=u)}else i[e]=t})),this.syncDiff(a,{joins:i,leaves:s},n,r)},syncDiff:function(e,t,n,r){var o=t.joins,a=t.leaves,i=this.clone(e);return n||(n=function(){}),r||(r=function(){}),this.map(o,(function(e,t){var r,o=i[e];(i[e]=t,o)&&(r=i[e].metas).unshift.apply(r,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o.metas));n(e,o,t)})),this.map(a,(function(e,t){var n=i[e];if(n){var o=t.metas.map((function(e){return e.phx_ref}));n.metas=n.metas.filter((function(e){return o.indexOf(e.phx_ref)<0})),r(e,n,t),0===n.metas.length&&delete i[e]}})),i},list:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,n){return t(e,n)}))},map:function(e,t){return Object.getOwnPropertyNames(e).map((function(n){return t(n,e[n])}))},clone:function(e){return JSON.parse(JSON.stringify(e))}};var C=function(){function e(t,n){a(this,e),this.callback=t,this.timerCalc=n,this.timer=null,this.tries=0}return o(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()},function(e,t,n){(function(n){var r,o,a;o=[],void 0===(a="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var s=a.URL||a.webkitURL,c=document.createElement("a");n=n||e.name||"download",c.download=n,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?o(c):r(c.href)?t(e,n,i):o(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){o(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,a),n);else if(r(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){o(i)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},l.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,d=u.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i})?r.apply(t,o):r)||(e.exports=a)}).call(this,n(85))},function(e,t){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 a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<i;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,a){var i=e+";",s=2*t+3*n+4*a;if(944===s){e=i.indexOf(":",9)+1;var c=i.substring(e,i.length-1).trim();return c=i.substring(0,e).trim()+c+";",1===S||2===S&&o(c,1)?"-webkit-"+c+c:c}if(0===S||2===S&&!o(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(_,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(c=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+c+i;case 1005:return f.test(i)?i.replace(d,":-webkit-")+i.replace(d,":-moz-")+i:i;case 1e3:switch(t=(c=i.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=i.replace(y,"tb");break;case 232:c=i.replace(y,"tb-rl");break;case 220:c=i.replace(y,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+c+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(c=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(c,"-webkit-"+c)+";"+i.replace(c,"-ms-"+c+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return c=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+c+"-ms-flex-"+c+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(E,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(E,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,a).replace(":fill-available",":stretch"):i.replace(c,"-webkit-"+c)+i.replace(c,"-moz-"+c.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+i}return i}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(O,"$1"),n,t)}function a(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function i(e,t,n,r,o,a,i,s,l,u){for(var d,f=0,p=t;f<N;++f)switch(d=A[f].call(c,e,p,n,r,o,a,i,s,l,u)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?S=1:(S=2,P=e):S=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<N){var c=i(-1,n,s,s,j,C,0,0,0,0);void 0!==c&&"string"==typeof c&&(n=c)}var d=function e(n,s,c,d,f){for(var p,h,m,y,x,E=0,O=0,k=0,_=0,A=0,P=0,L=m=p=0,R=0,D=0,B=0,F=0,z=c.length,U=z-1,H="",$="",V="",q="";R<z;){if(h=c.charCodeAt(R),R===U&&0!==O+_+k+E&&(0!==O&&(h=47===O?10:47),_=k=E=0,z++,U++),0===O+_+k+E){if(R===U&&(0<D&&(H=H.replace(u,"")),0<H.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(R)}h=59}switch(h){case 123:for(p=(H=H.trim()).charCodeAt(0),m=1,F=++R;R<z;){switch(h=c.charCodeAt(R)){case 123:m++;break;case 125:m--;break;case 47:switch(h=c.charCodeAt(R+1)){case 42:case 47:e:{for(L=R+1;L<U;++L)switch(c.charCodeAt(L)){case 47:if(42===h&&42===c.charCodeAt(L-1)&&R+2!==L){R=L+1;break e}break;case 10:if(47===h){R=L+1;break e}}R=L}}break;case 91:h++;case 40:h++;case 34:case 39:for(;R++<U&&c.charCodeAt(R)!==h;);}if(0===m)break;R++}switch(m=c.substring(F,R),0===p&&(p=(H=H.replace(l,"").trim()).charCodeAt(0)),p){case 64:switch(0<D&&(H=H.replace(u,"")),h=H.charCodeAt(1)){case 100:case 109:case 115:case 45:D=s;break;default:D=I}if(F=(m=e(s,D,m,h,f+1)).length,0<N&&(x=i(3,m,D=t(I,H,B),s,j,C,F,h,f,d),H=D.join(""),void 0!==x&&0===(F=(m=x.trim()).length)&&(h=0,m="")),0<F)switch(h){case 115:H=H.replace(w,a);case 100:case 109:case 45:m=H+"{"+m+"}";break;case 107:m=(H=H.replace(g,"$1 $2"))+"{"+m+"}",m=1===S||2===S&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=H+m,112===d&&($+=m,m="")}else m="";break;default:m=e(s,t(s,H,B),m,d,f+1)}V+=m,m=B=D=L=p=0,H="",h=c.charCodeAt(++R);break;case 125:case 59:if(1<(F=(H=(0<D?H.replace(u,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(F=(H=H.replace(" ",":")).length),0<N&&void 0!==(x=i(1,H,s,n,j,C,$.length,d,f,d))&&0===(F=(H=x.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),h=H.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){q+=H+c.charAt(R);break}default:58!==H.charCodeAt(F-1)&&($+=r(H,p,h,H.charCodeAt(2)))}B=D=L=p=0,H="",h=c.charCodeAt(++R)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==d&&0<H.length&&(D=1,H+="\0"),0<N*M&&i(0,H,s,n,j,C,$.length,d,f,d),C=1,j++;break;case 59:case 125:if(0===O+_+k+E){C++;break}default:switch(C++,y=c.charAt(R),h){case 9:case 32:if(0===_+E+O)switch(A){case 44:case 58:case 9:case 32:y="";break;default:32!==h&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===_+O+E&&(D=B=1,y="\f"+y);break;case 108:if(0===_+O+E+T&&0<L)switch(R-L){case 2:112===A&&58===c.charCodeAt(R-3)&&(T=A);case 8:111===P&&(T=P)}break;case 58:0===_+O+E&&(L=R);break;case 44:0===O+k+_+E&&(D=1,y+="\r");break;case 34:case 39:0===O&&(_=_===h?0:0===_?h:_);break;case 91:0===_+O+k&&E++;break;case 93:0===_+O+k&&E--;break;case 41:0===_+O+E&&k--;break;case 40:if(0===_+O+E){if(0===p)switch(2*A+3*P){case 533:break;default:p=1}k++}break;case 64:0===O+k+_+E+L+m&&(m=1);break;case 42:case 47:if(!(0<_+E+k))switch(O){case 0:switch(2*h+3*c.charCodeAt(R+1)){case 235:O=47;break;case 220:F=R,O=42}break;case 42:47===h&&42===A&&F+2!==R&&(33===c.charCodeAt(F+2)&&($+=c.substring(F,R+1)),y="",O=0)}}0===O&&(H+=y)}P=A,A=h,R++}if(0<(F=$.length)){if(D=s,0<N&&(void 0!==(x=i(2,$,D,n,j,C,F,d,f,d))&&0===($=x).length))return q+$+V;if($=D.join(",")+"{"+$+"}",0!=S*T){switch(2!==S||o($,2)||(T=0),T){case 111:$=$.replace(v,":-moz-$1")+$;break;case 112:$=$.replace(b,"::-webkit-input-$1")+$.replace(b,"::-moz-$1")+$.replace(b,":-ms-input-$1")+$}T=0}}return q+$+V}(I,s,n,0,0);return 0<N&&(void 0!==(c=i(-2,d,s,s,j,C,d.length,0,0,0))&&(d=c)),"",T=0,C=j=1,d}var l=/^\0+/g,u=/[\0\r\f]/g,d=/: */g,f=/zoo|gra/,p=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,E=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,_=/([^-])(image-set\()/,C=1,j=1,T=0,S=1,I=[],A=[],N=0,P=null,M=0;return c.use=function e(t){switch(t){case void 0:case null:N=A.length=0;break;default:if("function"==typeof t)A[N++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else M=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}},function(e,t,n){"use strict";t.a={animationIterationCount: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}},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.ttf"},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.ttf"},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/KindlySans-Regular.otf"},function(e,t){e.exports="http://localhost:8081/src/assets/images/santaHat.png"},function(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:i.default,slicer:a.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,c=n.slicer,l=n.serialize,u=n.deserialize;return function(t){return function(n,r,a){"function"==typeof r&&void 0===a&&(a=r,r=void 0);var i=void 0,d=void 0;try{i=u(localStorage.getItem(o)),d=s(r,i)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,a),p=c(e);return f.subscribe((function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,l(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}})),f}}};var a=o(n(196)),i=o(n(199));e.exports=t.default},function(e,t,n){(function(e,n){var r=/^\[object .+?Constructor\]$/,o=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var i="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,c=i||s||Function("return this")(),l=t&&!t.nodeType&&t,u=l&&"object"==typeof n&&n&&!n.nodeType&&n,d=u&&u.exports===l,f=d&&i.process,p=function(){try{var e=u&&u.require&&u.require("util").types;return e||f&&f.binding&&f.binding("util")}catch(e){}}(),h=p&&p.isTypedArray;function m(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)}var g,b,v,y=Array.prototype,w=Function.prototype,x=Object.prototype,E=c["__core-js_shared__"],O=w.toString,k=x.hasOwnProperty,_=(g=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",C=x.toString,j=O.call(Object),T=RegExp("^"+O.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=d?c.Buffer:void 0,I=c.Symbol,A=c.Uint8Array,N=S?S.allocUnsafe:void 0,P=(b=Object.getPrototypeOf,v=Object,function(e){return b(v(e))}),M=Object.create,L=x.propertyIsEnumerable,R=y.splice,D=I?I.toStringTag:void 0,B=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),F=S?S.isBuffer:void 0,z=Math.max,U=Date.now,H=le(c,"Map"),$=le(Object,"create"),V=function(){function e(){}return function(t){if(!xe(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function q(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 G(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 W(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=this.__data__=new G(e);this.size=t.size}function K(e,t){var n=ge(e),r=!n&&me(e),o=!n&&!r&&ve(e),a=!n&&!r&&!o&&Oe(e),i=n||r||o||a,s=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var l in e)!t&&!k.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ue(l,c))||s.push(l);return s}function X(e,t,n){(void 0!==n&&!he(e[t],n)||void 0===n&&!(t in e))&&Z(e,t,n)}function J(e,t,n){var r=e[t];k.call(e,t)&&he(r,n)&&(void 0!==n||t in e)||Z(e,t,n)}function Q(e,t){for(var n=e.length;n--;)if(he(e[n][0],t))return n;return-1}function Z(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}q.prototype.clear=function(){this.__data__=$?$(null):{},this.size=0},q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},q.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return k.call(t,e)?t[e]:void 0},q.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:k.call(t,e)},q.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$&&void 0===t?"__lodash_hash_undefined__":t,this},G.prototype.clear=function(){this.__data__=[],this.size=0},G.prototype.delete=function(e){var t=this.__data__,n=Q(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),--this.size,!0)},G.prototype.get=function(e){var t=this.__data__,n=Q(t,e);return n<0?void 0:t[n][1]},G.prototype.has=function(e){return Q(this.__data__,e)>-1},G.prototype.set=function(e,t){var n=this.__data__,r=Q(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},W.prototype.clear=function(){this.size=0,this.__data__={hash:new q,map:new(H||G),string:new q}},W.prototype.delete=function(e){var t=ce(this,e).delete(e);return this.size-=t?1:0,t},W.prototype.get=function(e){return ce(this,e).get(e)},W.prototype.has=function(e){return ce(this,e).has(e)},W.prototype.set=function(e,t){var n=ce(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Y.prototype.clear=function(){this.__data__=new G,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof G){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(r)}return n.set(e,t),this.size=n.size,this};var ee,te=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var s=a[ee?i:++r];if(!1===t(o[s],s,o))break}return e};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":D&&D in Object(e)?function(e){var t=k.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch(e){}var o=C.call(e);r&&(t?e[D]=n:delete e[D]);return o}(e):function(e){return C.call(e)}(e)}function re(e){return Ee(e)&&"[object Arguments]"==ne(e)}function oe(e){return!(!xe(e)||function(e){return!!_&&_ in e}(e))&&(ye(e)?T:r).test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ae(e){if(!xe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}function ie(e,t,n,r,o){e!==t&&te(t,(function(a,i){if(o||(o=new Y),xe(a))!function(e,t,n,r,o,a,i){var s=fe(e,n),c=fe(t,n),l=i.get(c);if(l)return void X(e,n,l);var u=a?a(s,c,n+"",e,t,i):void 0,d=void 0===u;if(d){var f=ge(c),p=!f&&ve(c),h=!f&&!p&&Oe(c);u=c,f||p||h?ge(s)?u=s:Ee(y=s)&&be(y)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(s):p?(d=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=N?N(n):new e.constructor(n);return e.copy(r),r}(c,!0)):h?(d=!1,m=c,g=!0?(b=m.buffer,v=new b.constructor(b.byteLength),new A(v).set(new A(b)),v):m.buffer,u=new m.constructor(g,m.byteOffset,m.length)):u=[]:function(e){if(!Ee(e)||"[object Object]"!=ne(e))return!1;var t=P(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&O.call(n)==j}(c)||me(c)?(u=s,me(s)?u=function(e){return function(e,t,n,r){var o=!n;n||(n={});var a=-1,i=t.length;for(;++a<i;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?Z(n,s,c):J(n,s,c)}return n}(e,ke(e))}(s):xe(s)&&!ye(s)||(u=function(e){return"function"!=typeof e.constructor||de(e)?{}:V(P(e))}(c))):d=!1}var m,g,b,v;var y;d&&(i.set(c,u),o(u,c,r,a,i),i.delete(c));X(e,n,u)}(e,t,i,n,ie,r,o);else{var s=r?r(fe(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),X(e,i,s)}}),ke)}function se(e,t){return pe(function(e,t,n){return t=z(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=z(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),m(e,this,s)}}(e,t,je),e+"")}function ce(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 le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return oe(n)?n:void 0}function ue(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}function fe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pe=function(e){var t=0,n=0;return function(){var r=U(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:je);function he(e,t){return e===t||e!=e&&t!=t}var me=re(function(){return arguments}())?re:function(e){return Ee(e)&&k.call(e,"callee")&&!L.call(e,"callee")},ge=Array.isArray;function be(e){return null!=e&&we(e.length)&&!ye(e)}var ve=F||function(){return!1};function ye(e){if(!xe(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function we(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Oe=h?function(e){return function(t){return e(t)}}(h):function(e){return Ee(e)&&we(e.length)&&!!a[ne(e)]};function ke(e){return be(e)?K(e,!0):ae(e)}var _e,Ce=(_e=function(e,t,n){ie(e,t,n)},se((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=_e.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!xe(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ue(t,n.length):"string"==r&&t in n)&&he(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var i=t[n];i&&_e(e,i,n,o)}return e})));function je(e){return e}n.exports=Ce}).call(this,n(85),n(200)(e))},function(e,t,n){var r=n(201);e.exports=r},function(e,t,n){
|
|
16
|
+
var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=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}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}var l=n(0);var u=0,d="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){var t=Date.now(),n=Math.max(0,16.7-(t-u));u=t+n,setTimeout((function(){return e(u)}),n)},f=1/60*1e3,p=!0,h=!1,m=!1,g={delta:0,timestamp:0},b=["read","update","preRender","render","postRender"],v=function(e){return h=e},y=b.reduce((function(e,t){var n,r,o,a,i,s,c,l,u;return e[t]=(n=v,r=[],o=[],a=0,i=!1,s=0,c=new WeakSet,l=new WeakSet,u={cancel:function(e){var t=o.indexOf(e);c.add(e),-1!==t&&o.splice(t,1)},process:function(e){var t,d;if(i=!0,r=(t=[o,r])[0],(o=t[1]).length=0,a=r.length)for(s=0;s<a;s++)(d=r[s])(e),!0!==l.has(d)||c.has(d)||(u.schedule(d),n(!0));i=!1},schedule:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var s=n&&i,u=s?r:o;c.delete(e),t&&l.add(e),-1===u.indexOf(e)&&(u.push(e),s&&(a=r.length))}}),e}),{}),w=b.reduce((function(e,t){var n=y[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),h||k(),n.schedule(e,t,r),e},e}),{}),x=b.reduce((function(e,t){return e[t]=y[t].cancel,e}),{}),E=function(e){return y[e].process(g)},O=function(e){h=!1,g.delta=p?f:Math.max(Math.min(e-g.timestamp,40),1),p||(f=g.delta),g.timestamp=e,m=!0,b.forEach(E),m=!1,h&&(p=!1,d(O))},k=function(){h=!0,p=!0,m||d(O)},_=function(){return g},C=w,j=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},T=function(e){return e%1?Number(e.toFixed(5)):e},S=/(-)?(\d[\d\.]*)/g,I=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,A=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,N={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},P=i(i({},N),{transform:j(0,1)}),M=i(i({},N),{default:1}),L=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},R=L("deg"),D=L("%"),B=L("px"),F=L("vh"),z=L("vw"),U=i(i({},D),{parse:function(e){return D.parse(e)/100},transform:function(e){return D.transform(100*e)}}),H=j(0,255),$=function(e){return void 0!==e.red},V=function(e){return void 0!==e.hue};var q=function(e){return function(t){if("string"!=typeof t)return t;for(var n={},r=function(e){return e.substring(e.indexOf("(")+1,e.lastIndexOf(")"))}(t).replace(/(,|\/)/g," ").split(/ \s*/),o=0;o<4;o++)n[e[o]]=void 0!==r[o]?parseFloat(r[o]):1;return n}},G=i(i({},N),{transform:function(e){return Math.round(H(e))}});function W(e,t){return e.startsWith(t)&&A.test(e)}var Y={test:function(e){return"string"==typeof e?W(e,"rgb"):$(e)},parse:q(["red","green","blue","alpha"]),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha;return"rgba("+t+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({red:G.transform(t),green:G.transform(n),blue:G.transform(r),alpha:T(P.transform(a))})}},K={test:function(e){return"string"==typeof e?W(e,"hsl"):V(e)},parse:q(["hue","saturation","lightness","alpha"]),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,a=void 0===o?1:o;return function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha;return"hsla("+t+", "+n+", "+r+", "+(void 0===o?1:o)+")"}({hue:Math.round(t),saturation:D.transform(T(n)),lightness:D.transform(T(r)),alpha:T(P.transform(a))})}},X=i(i({},Y),{test:function(e){return"string"==typeof e&&W(e,"#")},parse:function(e){var t="",n="",r="";return e.length>4?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),t+=t,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(e){return"string"==typeof e&&A.test(e)||$(e)||V(e)},parse:function(e){return Y.test(e)?Y.parse(e):K.test(e)?K.parse(e):X.test(e)?X.parse(e):e},transform:function(e){return $(e)?Y.transform(e):V(e)?K.transform(e):e}},Q=function(e){return"number"==typeof e?0:e},Z={test:function(e){if("string"!=typeof e||!isNaN(e))return!1;var t=0,n=e.match(S),r=e.match(I);return n&&(t+=n.length),r&&(t+=r.length),t>0},parse:function(e){var t=e,n=[],r=t.match(I);r&&(t=t.replace(I,"${c}"),n.push.apply(n,r.map(J.parse)));var o=t.match(S);return o&&n.push.apply(n,o.map(N.parse)),n},createTransformer:function(e){var t=e,n=0,r=e.match(I),o=r?r.length:0;if(r)for(var a=0;a<o;a++)t=t.replace(r[a],"${c}"),n++;var i=t.match(S),s=i?i.length:0;if(i)for(a=0;a<s;a++)t=t.replace(i[a],"${n}"),n++;return function(e){for(var r=t,a=0;a<n;a++)r=r.replace(a<o?"${c}":"${n}",a<o?J.transform(e[a]):T(e[a]));return r}},getAnimatableNone:function(e){var t=Z.parse(e);return Z.createTransformer(e)(t.map(Q))}},ee=function(e){return function(t){return 1-e(1-t)}},te=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},ne=ee,re=te,oe=function(e){return function(t){return Math.pow(t,e)}},ae=function(e){return function(t){return t*t*((e+1)*t-e)}},ie=function(e){var t=ae(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},se=function(e){return e},ce=oe(2),le=ee(ce),ue=te(ce),de=function(e){return 1-Math.sin(Math.acos(e))},fe=ee(de),pe=te(fe),he=ae(1.525),me=ee(he),ge=te(he),be=ie(1.525),ve=function(e){var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},ye=function(e){return 1-ve(1-e)},we=function(e){return e<.5?.5*(1-ve(1-2*e)):.5*ve(2*e-1)+.5},xe="undefined"!=typeof Float32Array,Ee=function(e,t){return 1-3*t+3*e},Oe=function(e,t){return 3*t-6*e},ke=function(e){return 3*e},_e=function(e,t,n){return 3*Ee(t,n)*e*e+2*Oe(t,n)*e+ke(t)},Ce=function(e,t,n){return((Ee(t,n)*e+Oe(t,n))*e+ke(t))*e};function je(e,t,n,r){var o=xe?new Float32Array(11):new Array(11),a=function(t){for(var r,a,i,s=0,c=1;10!==c&&o[c]<=t;++c)s+=.1;return--c,r=(t-o[c])/(o[c+1]-o[c]),(i=_e(a=s+.1*r,e,n))>=.001?function(t,r){for(var o=0,a=0;o<8;++o){if(0===(a=_e(r,e,n)))return r;r-=(Ce(r,e,n)-t)/a}return r}(t,a):0===i?a:function(t,r,o){var a,i,s=0;do{(a=Ce(i=r+(o-r)/2,e,n)-t)>0?o=i:r=i}while(Math.abs(a)>1e-7&&++s<10);return i}(t,s,s+.1)};!function(){for(var t=0;t<11;++t)o[t]=Ce(.1*t,e,n)}();return function(o){return e===t&&n===r?o:0===o?0:1===o?1:Ce(a(o),t,r)}}var Te={x:0,y:0,z:0},Se=function(e){return"number"==typeof e},Ie=function(e){return function(t,n,r){return void 0!==r?e(t,n,r):function(r){return e(t,n,r)}}},Ae=Ie((function(e,t,n){return Math.min(Math.max(n,e),t)})),Ne=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Pe=function(e){return Ne(e)&&e.hasOwnProperty("z")},Me=function(e,t){return Math.abs(e-t)},Le=function(e,t){if(void 0===t&&(t=Te),Se(e)&&Se(t))return Me(e,t);if(Ne(e)&&Ne(t)){var n=Me(e.x,t.x),r=Me(e.y,t.y),o=Pe(e)&&Pe(t)?Me(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Re=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},De=function(e,t,n){return-n*e+n*t+e},Be=function(){return(Be=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}).apply(this,arguments)},Fe=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},ze=[X,Y,K],Ue=function(e){return ze.find((function(t){return t.test(e)}))},He=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},$e=function(e,t){var n=Ue(e),r=Ue(t);He(e),He(t),n.transform,r.transform;var o=n.parse(e),a=r.parse(t),i=Be({},o),s=n===K?De:Fe;return function(e){for(var t in i)"alpha"!==t&&(i[t]=s(o[t],a[t],e));return i.alpha=De(o.alpha,a.alpha,e),n.transform(i)}},Ve=function(e,t){return function(n){return t(e(n))}},qe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(Ve)};function Ge(e,t){return Se(e)?function(n){return De(e,t,n)}:J.test(e)?$e(e,t):Ke(e,t)}var We=function(e,t){var n=e.slice(),r=n.length,o=e.map((function(e,n){return Ge(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}};function Ye(e){for(var t=Z.parse(e),n=t.length,r=0,o=0,a=0,i=0;i<n;i++)r||"number"==typeof t[i]?r++:void 0!==t[i].hue?a++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:a}}var Ke=function(e,t){var n=Z.createTransformer(t),r=Ye(e),o=Ye(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),qe(We(r.parsed,o.parsed),n)};var Xe,Je=function(e){return e},Qe=function(e){return void 0===e&&(e=Je),Ie((function(t,n,r){var o=n-r,a=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?n+a:n-a}))},Ze=(Qe(),Qe(Math.sqrt),function(e,t){return t?e*(1e3/t):0}),et=(Ie((function(e,t,n){var r=t-e;return((n-e)%r+r)%r+e})),Ae(0,1),function(e){var t=e.onRead,n=e.onRender,r=e.uncachedValues,o=void 0===r?new Set:r,a=e.useCache,i=void 0===a||a;return function(e){void 0===e&&(e={});var r=s(e,[]),a={},c=[],l=!1;function u(e,t){e.startsWith("--")&&(r.hasCSSVariable=!0);var n=a[e];a[e]=t,a[e]!==n&&(-1===c.indexOf(e)&&c.push(e),l||(l=!0,C.render(d.render)))}var d={get:function(e,n){return void 0===n&&(n=!1),!n&&i&&!o.has(e)&&void 0!==a[e]?a[e]:t(e,r)},set:function(e,t){if("string"==typeof e)u(e,t);else for(var n in e)u(n,e[n]);return this},render:function(e){return void 0===e&&(e=!1),(l||!0===e)&&(n(a,r,c),l=!1,c.length=0),this}};return d}}),tt=/([a-z])([A-Z])/g,nt=function(e){return e.replace(tt,"$1-$2").toLowerCase()},rt=new Map,ot=new Map,at=["Webkit","Moz","O","ms",""],it=at.length,st="undefined"!=typeof document,ct=function(e,t){return ot.set(e,nt(t))},lt=function(e,t){void 0===t&&(t=!1);var n=t?ot:rt;return n.has(e)||(st?function(e){Xe=Xe||document.createElement("div");for(var t=0;t<it;t++){var n=at[t],r=""===n,o=r?e:n+e.charAt(0).toUpperCase()+e.slice(1);if(o in Xe.style||r){if(r&&"clipPath"===e&&ot.has(e))return;rt.set(e,o),ct(e,(r?"":"-")+nt(o))}}}(e):function(e){ct(e,e)}(e)),n.get(e)||e},ut=["","X","Y","Z"],dt=["translate","scale","rotate","skew","transformPerspective"].reduce((function(e,t){return ut.reduce((function(e,n){return e.push(t+n),e}),e)}),["x","y","z"]),ft=dt.reduce((function(e,t){return e[t]=!0,e}),{});function pt(e){return!0===ft[e]}function ht(e,t){return dt.indexOf(e)-dt.indexOf(t)}var mt=new Set(["originX","originY","originZ"]);function gt(e){return mt.has(e)}var bt=i(i({},N),{transform:Math.round}),vt={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:M,scaleX:M,scaleY:M,scaleZ:M,skew:R,skewX:R,skewY:R,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,opacity:P,originX:U,originY:U,originZ:B,zIndex:bt,fillOpacity:P,strokeOpacity:P,numOctaves:bt},yt=function(e){return vt[e]},wt=function(e,t){return t&&"number"==typeof e?t.transform(e):e},xt=new Set(["scrollLeft","scrollTop"]),Et=new Set(["scrollLeft","scrollTop","transform"]),Ot={x:"translateX",y:"translateY",z:"translateZ"};function kt(e){return"function"==typeof e}function _t(e,t,n,r,o,a,i,s){void 0===t&&(t=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===a&&(a=[]),void 0===i&&(i=!1),void 0===s&&(s=!0);var c=!0,l=!1,u=!1;for(var d in e){var f=e[d],p=yt(d),h=wt(f,p);pt(d)?(l=!0,r[d]=h,a.push(d),c&&(p.default&&f!==p.default||!p.default&&0!==f)&&(c=!1)):gt(d)?(o[d]=h,u=!0):Et.has(d)&&kt(h)||(n[lt(d,i)]=h)}return(l||"function"==typeof e.transform)&&(n.transform=function(e,t,n,r,o,a){void 0===a&&(a=!0);var i="",s=!1;n.sort(ht);for(var c=n.length,l=0;l<c;l++){var u=n[l];i+=(Ot[u]||u)+"("+t[u]+") ",s="z"===u||s}return!s&&o?i+="translateZ(0)":i=i.trim(),kt(e.transform)?i=e.transform(t,r?"":i):a&&r&&(i="none"),i}(e,r,a,c,t,s)),u&&(n.transformOrigin=(o.originX||"50%")+" "+(o.originY||"50%")+" "+(o.originZ||0)),n}function Ct(e){var t=void 0===e?{}:e,n=t.enableHardwareAcceleration,r=void 0===n||n,o=t.isDashCase,a=void 0===o||o,i=t.allowTransformNone,s=void 0===i||i,c={},l={},u={},d=[];return function(e){return d.length=0,_t(e,r,c,l,u,d,a,s),c}}var jt=et({onRead:function(e,t){var n=t.element,r=t.preparseOutput,o=yt(e);if(pt(e))return o&&o.default||0;if(xt.has(e))return n[e];var a=window.getComputedStyle(n,null).getPropertyValue(lt(e,!0))||0;return r&&o&&o.test(a)&&o.parse?o.parse(a):a},onRender:function(e,t,n){var r=t.element,o=t.buildStyles,a=t.hasCSSVariable;if(Object.assign(r.style,o(e)),a)for(var i=n.length,s=0;s<i;s++){var c=n[s];c.startsWith("--")&&r.style.setProperty(c,e[c])}-1!==n.indexOf("scrollLeft")&&(r.scrollLeft=e.scrollLeft),-1!==n.indexOf("scrollTop")&&(r.scrollTop=e.scrollTop)},uncachedValues:xt});var Tt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),St=function(e,t){return B.transform(e*t)},It={x:0,y:0,width:0,height:0};function At(e,t,n){return"string"==typeof e?e:B.transform(t+n*e)}var Nt={enableHardwareAcceleration:!1,isDashCase:!1};function Pt(e,t,n,r,o,a){void 0===t&&(t=It),void 0===r&&(r=Ct(Nt)),void 0===o&&(o={style:{}}),void 0===a&&(a=!0);var i=e.attrX,c=e.attrY,l=e.originX,u=e.originY,d=e.pathLength,f=e.pathSpacing,p=void 0===f?1:f,h=e.pathOffset,m=void 0===h?0:h,g=r(s(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var b in g){if("transform"===b)o.style.transform=g[b];else o[a&&!Tt.has(b)?nt(b):b]=g[b]}return(void 0!==l||void 0!==u||g.transform)&&(o.style.transformOrigin=function(e,t,n){return At(t,e.x,e.width)+" "+At(n,e.y,e.height)}(t,void 0!==l?l:.5,void 0!==u?u:.5)),void 0!==i&&(o.x=i),void 0!==c&&(o.y=c),void 0!==n&&void 0!==d&&(o[a?"stroke-dashoffset":"strokeDashoffset"]=St(-m,n),o[a?"stroke-dasharray":"strokeDasharray"]=St(d,n)+" "+St(p,n)),o}function Mt(e,t,n){void 0===n&&(n=!0);var r={style:{}},o=Ct(Nt);return function(a){return Pt(a,e,t,o,r,n)}}var Lt=et({onRead:function(e,t){var n=t.element;if(pt(e=Tt.has(e)?e:nt(e))){var r=yt(e);return r&&r.default||0}return n.getAttribute(e)},onRender:function(e,t){var n=t.element,r=(0,t.buildAttrs)(e);for(var o in r)"style"===o?Object.assign(n.style,r.style):n.setAttribute(o,r[o])}}),Rt=et({useCache:!1,onRead:function(e){return"scrollTop"===e?window.pageYOffset:window.pageXOffset},onRender:function(e){var t=e.scrollTop,n=void 0===t?0:t,r=e.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),Dt=new WeakMap,Bt=function(e,t){var n,r,o,a;return e===window?n=Rt(e):!function(e){return e instanceof HTMLElement||"function"==typeof e.click}(e)?function(e){return e instanceof SVGElement||"ownerSVGElement"in e}(e)&&(o=function(e){try{return function(e){return"function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}(e)}catch(e){return{x:0,y:0,width:0,height:0}}}(r=e),a=function(e){return"path"===e.tagName}(r)&&r.getTotalLength?r.getTotalLength():void 0,n=Lt({element:r,buildAttrs:Mt(o,a)})):n=function(e,t){void 0===t&&(t={});var n=t.enableHardwareAcceleration,r=t.allowTransformNone,o=s(t,["enableHardwareAcceleration","allowTransformNone"]);return jt(i({element:e,buildStyles:Ct({enableHardwareAcceleration:n,allowTransformNone:r}),preparseOutput:!0},o))}(e,t),Dt.set(e,n),n};var Ft=function(e,t){return function(e,t){return Dt.has(e)?Dt.get(e):Bt(e,t)}("string"==typeof e?document.querySelector(e):e,t)},zt=function(){return function(e,t){var n=this,r=e.middleware,o=e.onComplete;this.isActive=!0,this.update=function(e){n.observer.update&&n.updateObserver(e)},this.complete=function(){n.observer.complete&&n.isActive&&n.observer.complete(),n.onComplete&&n.onComplete(),n.isActive=!1},this.error=function(e){n.observer.error&&n.isActive&&n.observer.error(e),n.isActive=!1},this.observer=t,this.updateObserver=function(e){return t.update(e)},this.onComplete=o,t.update&&r&&r.length&&r.forEach((function(e){return n.updateObserver=e(n.updateObserver,n.complete)}))}}(),Ut=function(e,t,n){var r=t.middleware;return new zt({middleware:r,onComplete:n},"function"==typeof e?{update:e}:e)},Ht=function(){function e(e){void 0===e&&(e={}),this.props=e}return e.prototype.create=function(t){return new e(t)},e.prototype.start=function(e){void 0===e&&(e={});var t=!1,n={stop:function(){}},r=this.props,o=r.init,a=s(r,["init"]),c=o(Ut(e,a,(function(){t=!0,n.stop()})));return n=c?i({},n,c):n,t&&n.stop(),n},e.prototype.applyMiddleware=function(e){return this.create(i({},this.props,{middleware:this.props.middleware?[e].concat(this.props.middleware):[e]}))},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=1===e.length?e[0]:qe.apply(void 0,e);return this.applyMiddleware((function(e){return function(t){return e(n(t))}}))},e}(),$t=function(e){return new Ht({init:e})},Vt=[B,D,R,F,z],qt=function(e){return Vt.find((function(t){return t.test(e)}))},Gt=function(e,t){return e(t)},Wt=function(e,t){var n=t.from,r=t.to,o=s(t,["from","to"]),a=qt(n)||qt(r),c=a.transform,l=a.parse;return e(i({},o,{from:"string"==typeof n?l(n):n,to:"string"==typeof r?l(r):r})).pipe(c)},Yt=function(e){return function(t,n){var r=n.from,o=n.to,a=s(n,["from","to"]);return t(i({},a,{from:0,to:1})).pipe(e(r,o))}},Kt=Yt($e),Xt=Yt(Ke),Jt=function(e,t){var n=function(e){var t=Object.keys(e),n=function(t,n){return void 0!==t&&!e[n](t)};return{getVectorKeys:function(e){return t.reduce((function(t,r){return n(e[r],r)&&t.push(r),t}),[])},testVectorProps:function(e){return e&&t.some((function(t){return n(e[t],t)}))}}}(t),r=n.testVectorProps,o=n.getVectorKeys;return function(t){if(!r(t))return e(t);var n=o(t),a=t[n[0]];return Qt(a)(e,t,n)}},Qt=function(e){return"number"==typeof e?Gt:function(e){return Boolean(qt(e))}(e)?Wt:J.test(e)?Kt:Z.test(e)?Xt:Gt},Zt=Jt((function(e){return void 0===e&&(e={}),$t((function(t){var n=t.complete,r=t.update,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,c=e.power,l=void 0===c?.8:c,u=e.timeConstant,d=void 0===u?350:u,f=e.restDelta,p=void 0===f?.5:f,h=e.modifyTarget,m=0,g=l*a,b=Math.round(s+g),v=void 0===h?b:h(b),y=C.update((function(e){var t=e.delta;m+=t;var o=-g*Math.exp(-m/d),a=o>p||o<-p;r(a?v+o:v),a||(x.update(y),n())}),!0);return{stop:function(){return x.update(y)}}}))}),{from:N.test,modifyTarget:function(e){return"function"==typeof e},velocity:N.test}),en=Jt((function(e){return void 0===e&&(e={}),$t((function(t){var n=t.update,r=t.complete,o=e.velocity,a=void 0===o?0:o,i=e.from,s=void 0===i?0:i,c=e.to,l=void 0===c?0:c,u=e.stiffness,d=void 0===u?100:u,f=e.damping,p=void 0===f?10:f,h=e.mass,m=void 0===h?1:h,g=e.restSpeed,b=void 0===g?.01:g,v=e.restDelta,y=void 0===v?.01:v,w=a?-a/1e3:0,E=0,O=l-s,k=s,_=k,j=C.update((function(e){var t=e.delta;E+=t;var o=p/(2*Math.sqrt(d*m)),i=Math.sqrt(d/m)/1e3;if(_=k,o<1){var s=Math.exp(-o*i*E),c=i*Math.sqrt(1-o*o);k=l-s*((w+o*i*O)/c*Math.sin(c*E)+O*Math.cos(c*E))}else{s=Math.exp(-i*E);k=l-s*(O+(w+i*O)*E)}a=Ze(k-_,t);var u=Math.abs(a)<=b,f=Math.abs(l-k)<=y;u&&f?(n(k=l),x.update(j),r()):n(k)}),!0);return{stop:function(){return x.update(j)}}}))}),{from:N.test,to:N.test,stiffness:N.test,damping:N.test,mass:N.test,velocity:N.test}),tn=Jt((function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,o=void 0===r?0:r,a=e.min,s=e.max,c=e.power,l=void 0===c?.8:c,u=e.timeConstant,d=void 0===u?700:u,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,m=void 0===h?10:h,g=e.restDelta,b=void 0===g?1:g,v=e.modifyTarget;return $t((function(e){var t,r=e.update,c=e.complete,u=n,f=n,h=!1,g=function(e){return void 0!==a&&e<=a},y=function(e){return void 0!==s&&e>=s},w=function(e){return g(e)||y(e)},x=function(e){r(e),u=f,o=Ze((f=e)-u,_().delta),t&&!h&&function(e,t){return g(e)&&t<0||y(e)&&t>0}(e,o)&&O({from:e,velocity:o})},E=function(e,n){t&&t.stop(),t=e.start({update:x,complete:function(){n?n():c()}})},O=function(e){h=!0,E(en(i({},e,{to:g(e.from)?a:s,stiffness:p,damping:m,restDelta:b})))};if(w(n))O({from:n,velocity:o});else if(0!==o){var k=Zt({from:n,velocity:o,timeConstant:d,power:l,restDelta:w(n)?20:b,modifyTarget:v});E(k,(function(){w(f)?O({from:f,velocity:o}):c()}))}else c();return{stop:function(){return t&&t.stop()}}}))}),{from:N.test,velocity:N.test,min:N.test,max:N.test,damping:N.test,stiffness:N.test,modifyTarget:function(e){return"function"==typeof e}}),nn=Jt((function(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=void 0===a?se:a,s=e.reverseEase;return void 0!==s&&s&&(i=ne(i)),$t((function(e){var t=e.update;return{seek:function(e){return t(e)}}})).pipe(i,(function(e){return De(n,o,e)}))}),{ease:function(e){return"function"==typeof e},from:N.test,to:N.test}),rn=Ae(0,1),on=function(e){return void 0===e&&(e={}),$t((function(t){var n,r=t.update,o=t.complete,a=e.duration,i=void 0===a?300:a,s=e.ease,c=void 0===s?le:s,l=e.flip,u=void 0===l?0:l,d=e.loop,f=void 0===d?0:d,p=e.yoyo,h=void 0===p?0:p,m=e.repeatDelay,g=void 0===m?0:m,b=e.from,v=void 0===b?0:b,y=e.to,w=void 0===y?1:y,E=e.elapsed,O=void 0===E?0:E,k=e.flipCount,_=void 0===k?0:k,j=e.yoyoCount,T=void 0===j?0:j,S=e.loopCount,I=void 0===S?0:S,A=nn({from:v,to:w,ease:c}).start(r),N=0,P=!1,M=function(e){var t;void 0===e&&(e=!1),A=nn({from:v=(t=[w,v])[0],to:w=t[1],ease:c,reverseEase:e}).start(r)},L=function(){N=rn(Re(0,i,O)),A.seek(N)},R=function(){P=!0,n=C.update((function(e){var t,r=e.delta;O+=r,L(),!(t=P&&O>i+g)||(!t||f||u||h)&&(O=O-i-g,f&&I<f?(I++,1):u&&_<u?(_++,M(),1):h&&T<h&&(T++,M(T%2!=0),1))||(x.update(n),o&&C.update(o,!1,!0))}),!0)},D=function(){P=!1,n&&x.update(n)};return R(),{isActive:function(){return P},getElapsed:function(){return Ae(0,i,O)},getProgress:function(){return N},stop:function(){D()},pause:function(){return D(),this},resume:function(){return P||R(),this},seek:function(e){return O=De(0,i,e),C.update(L,!1,!0),this},reverse:function(){return M(),this}}}))},an=Ae(0,1),sn=function(e){var t=e.easings,n=e.ease,r=void 0===n?se:n,o=e.times,a=e.values,c=s(e,["easings","ease","times","values"]);t=Array.isArray(t)?t:function(e,t){return e.map((function(){return t||le})).splice(0,e.length-1)}(a,t),o=o||function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(a);var l=t.map((function(e,t){return nn({from:a[t],to:a[t+1],ease:e})}));return on(i({},c,{ease:r})).applyMiddleware((function(e){return function(e,t,n){var r=e.length,o=r-1,a=o-1,i=t.map((function(e){return e.start(n)}));return function(t){t<=e[0]&&i[0].seek(0),t>=e[o]&&i[a].seek(1);for(var n=1;n<r&&!(e[n]>t||n===o);n++);var s=Re(e[n-1],e[n],t);i[n-1].seek(an(s))}}(o,l,e)}))},cn=function(e,t,n){return $t((function(r){var o=r.update,a=t.split(" ").map((function(t){return e.addEventListener(t,o,n),t}));return{stop:function(){return a.forEach((function(t){return e.removeEventListener(t,o,n)}))}}}))},ln=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},un=function(e,t){return void 0===t&&(t={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),t.clientX=t.x=e.clientX,t.clientY=t.y=e.clientY,t.pageX=e.pageX,t.pageY=e.pageY,t},dn=[ln()];if("undefined"!=typeof document){cn(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(e){var t=e.touches;!0;var n=t.length;dn.length=0;for(var r=0;r<n;r++){var o=t[r];dn.push(un(o))}}))}var fn=ln();if("undefined"!=typeof document){cn(document,"mousedown mousemove",!0).start((function(e){!0,un(e,fn)}))}var pn=function(e){return $t((function(t){var n=t.complete,r=setTimeout(n,e);return{stop:function(){return clearTimeout(r)}}}))},hn=function(){function e(e,t){var n,r=this,o=void 0===t?{}:t,a=o.transformer,i=o.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),r.prev=r.current,r.current=r.transformer?r.transformer(e):e,r.updateSubscribers&&r.prev!==r.current&&r.updateSubscribers.forEach(r.notifySubscriber),r.children&&r.children.forEach(r.setChild),t&&r.renderSubscribers&&r.renderSubscribers.forEach(r.notifySubscriber);var n=_(),o=n.delta,a=n.timestamp;r.lastUpdated!==a&&(r.timeDelta=o,r.lastUpdated=a,C.postRender(r.scheduleVelocityCheck))},this.notifySubscriber=function(e){e(r.current)},this.scheduleVelocityCheck=function(){return C.postRender(r.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==r.lastUpdated&&(r.prev=r.current)},this.setChild=function(e){return e.set(r.current)},this.parent=i,this.transformer=a,this.set(e,!1),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return e.prototype.addChild=function(t){void 0===t&&(t={});var n=new e(this.current,i({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.subscribeTo=function(e,t){var n=this,r=function(){return t(n.current)};return e.add(r),function(){return e.delete(r)}},e.prototype.onChange=function(e){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,e)},e.prototype.onRenderRequest=function(e){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(e),this.subscribeTo(this.renderSubscribers,e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.canTrackVelocity?Ze(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},e}();function mn(e,t){return new hn(e,t)}function gn(e){var t=Object(l.useRef)(null);return null===t.current&&(t.current=e()),t.current}var bn,vn=function(e){return e instanceof hn},yn=et({onRead:function(){return null},onRender:function(e,t){return(0,t.onUpdate)(e)}}),wn=function(){function e(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return e.prototype.has=function(e){return this.values.has(e)},e.prototype.set=function(e,t){this.values.set(e,t),this.hasMounted&&this.bindValueToOutput(e,t)},e.prototype.get=function(e,t){var n=this.values.get(e);return void 0===n&&void 0!==t&&(n=new hn(t),this.set(e,n)),n},e.prototype.forEach=function(e){return this.values.forEach(e)},e.prototype.bindValueToOutput=function(e,t){var n=this,r=t.onRenderRequest((function(t){return n.output&&n.output(e,t)})),o=t.onChange((function(t){n.onUpdate&&n.onUpdate.set(e,t)}));this.unsubscribers.has(e)&&this.unsubscribers.get(e)(),this.unsubscribers.set(e,(function(){r(),o()}))},e.prototype.setOnUpdate=function(e){this.onUpdate=void 0,e&&(this.onUpdate=yn({onUpdate:e}))},e.prototype.setTransformTemplate=function(e){this.transformTemplate!==e&&(this.transformTemplate=e,this.updateTransformTemplate())},e.prototype.getTransformTemplate=function(){return this.transformTemplate},e.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},e.prototype.mount=function(e){var t=this;this.hasMounted=!0,e&&(this.output=e),this.values.forEach((function(e,n){return t.bindValueToOutput(n,e)})),this.updateTransformTemplate()},e.prototype.unmount=function(){var e=this;this.values.forEach((function(t,n){var r=e.unsubscribers.get(n);r&&r()}))},e}(),xn=new Set(["dragOriginX","dragOriginY"]),En=function(e){var t=gn((function(){var t=new wn;for(var n in e)vn(e[n])&&!xn.has(n)&&t.set(n,e[n]);return t}));return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t},On=null,kn=function(){return null!==On},_n=function(){On=[]},Cn=function(){On&&On.forEach((function(e){return e.render()})),On=null},jn=function(e){On&&On.push(e)},Tn=Object(l.memo)((function(e){var t=e.innerRef,n=e.values,r=e.isStatic;return Object(l.useEffect)((function(){t.current,Element;var e=Ft(t.current,{preparseOutput:!1,enableHardwareAcceleration:!r});return n.mount((function(t,n){e.set(t,n),kn()&&jn(e)})),function(){return n.unmount()}}),[]),null})),Sn=(bn=function(e){return e.get()},function(e){var t={};return e.forEach((function(e,n){return t[n]=bn(e)})),t}),In=new Set(["originX","originY","originZ"]),An=function(e){return In.has(e)},Nn=function(e,t,n){var r=Sn(e),o=e.getTransformTemplate();return o&&(r.transform=t.transform?o({},t.transform):o),_t(i(i({},t),r),!n)},Pn=function(e){return Array.isArray(e)},Mn=function(e){return Pn(e)?e[e.length-1]||0:e},Ln=[N,B,D,R,z,F,{test:function(e){return"auto"===e},parse:function(e){return e}}],Rn=c(Ln,[J,Z]),Dn=function(e){return function(t){return t.test(e)}},Bn=function(e){return Ln.find(Dn(e))},Fn=function(e){return Rn.find(Dn(e))},zn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Un=function(e){return{type:"spring",stiffness:700,damping:0===e?100:35}},Hn=function(){return{ease:"linear",duration:.3}},$n=function(e){return{type:"keyframes",duration:.8,values:e}},Vn={x:zn,y:zn,z:zn,rotate:zn,rotateX:zn,rotateY:zn,rotateZ:zn,scaleX:Un,scaleY:Un,scale:Un,opacity:Hn,backgroundColor:Hn,color:Hn,default:Un},qn=function(e){var t=e.to,n=e.duration;return $t((function(e){var r=e.update,o=e.complete;r(t),n?pn(n).start({complete:o}):o()}))},Gn=function(e){return Array.isArray(e)?(e.length,je(e[0],e[1],e[2],e[3])):"string"==typeof e?r[e]:e},Wn=function(e){return Array.isArray(e)&&"number"!=typeof e[0]},Yn=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Z.test(t)||t.startsWith("url(")))},Kn=function(e){return 1e3*e},Xn={tween:on,spring:en,keyframes:sn,inertia:tn,just:qn},Jn={tween:function(e){if(e.ease){var t=Wn(e.ease)?e.ease[0]:e.ease;e.ease=Gn(t)}return e},keyframes:function(e){var t=e.from,n=(e.to,e.velocity,s(e,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=c(n.values);r[0]=t,n.values=r}return n.ease&&(n.easings=Wn(n.ease)?n.ease.map(Gn):Gn(n.ease)),n.ease=se,n}},Qn=function(e,t,n){var r=n?n.delay:0;if(void 0===n||!function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection;var t=s(e,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(t).length}(n))return i({delay:r},function(e,t){var n;return n=Pn(t)?$n:Vn[e]||Vn.default,i({to:t},n(t))}(e,t));var o=n[e]||n.default||n;return!1===o.type?{delay:o.hasOwnProperty("delay")?o.delay:r,to:Pn(t)?t[t.length-1]:t,type:"just"}:Pn(t)?i(i({values:t,duration:.8,delay:r,ease:"linear"},o),{type:"keyframes"}):i({type:"tween",to:t,delay:r},o)},Zn=function(e,t,n,r){var o,a=t.get(),c=Yn(e,a),l=Yn(e,n),u=Qn(e,n,r),d=u.type,f=void 0===d?"tween":d,p=s(u,["type"]),h=c&&l?Xn[f]:qn,m=function(e,t){return Jn[e]?Jn[e](t):t}(f,i({from:a,velocity:t.getVelocity()},p));return((o=m).hasOwnProperty("duration")||o.hasOwnProperty("repeatDelay"))&&(m.duration&&(m.duration=Kn(m.duration)),m.repeatDelay&&(m.repeatDelay=Kn(m.repeatDelay))),[h,m]};function er(e,t,n,r){var o=r.delay,a=void 0===o?0:o,i=s(r,["delay"]);return t.start((function(r){var o,c=Zn(e,t,n,i),l=c[0],u=c[1],d=u.delay,f=s(u,["delay"]);void 0!==d&&(a=d);var p=function(){var e=l(f);o=e.start({update:function(e){return t.set(e)},complete:r})};return a?o=pn(Kn(a)).start({complete:p}):p(),function(){o&&o.stop()}}))}var tr=function(){function e(e){var t=this,n=e.values,r=e.readValueFromSource,o=e.makeTargetAnimatable;this.props={},this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(e){return!t.values.has(e)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=o,this.values.forEach((function(e,n){return t.baseTarget[n]=e.get()}))}return e.prototype.setProps=function(e){this.props=e},e.prototype.setVariants=function(e){e&&(this.variants=e)},e.prototype.setDefaultTransition=function(e){e&&(this.defaultTransition=e)},e.prototype.setValues=function(e,t){var n=this,r=void 0===t?{}:t,o=r.isActive,a=void 0===o?new Set:o,s=r.priority,c=this.resolveVariant(e),l=c.target,u=c.transitionEnd;return l=this.transformValues(i(i({},l),u)),Object.keys(l).forEach((function(e){if(!a.has(e)&&(a.add(e),l)){var t=Mn(l[e]);if(n.values.has(e)){var r=n.values.get(e);r&&r.set(t)}else n.values.set(e,mn(t));s||(n.baseTarget[e]=t)}}))},e.prototype.transformValues=function(e){var t=this.props.transformValues;return t?t(e):e},e.prototype.checkForNewValues=function(e){var t=Object.keys(e).filter(this.hasValue),n=t.length;if(n)for(var r=0;r<n;r++){var o=t[r],a=e[o],i=null;Array.isArray(a)&&(i=a[0]),null===i&&(i=this.readValueFromSource(o)),"string"==typeof i&&/^\d*\.?\d+$/.test(i)?i=parseFloat(i):!Fn(i)&&Z.test(a)&&(i=Z.getAnimatableNone(a)),this.values.set(o,mn(i)),this.baseTarget[o]=i}},e.prototype.resolveVariant=function(e){if(!e)return{target:void 0,transition:void 0,transitionEnd:void 0};var t,n;"function"==typeof e&&(e=e(this.props.custom,(t=this.values,n={},t.forEach((function(e,t){return n[t]=e.get()})),n),function(e){var t={};return e.forEach((function(e,n){return t[n]=e.getVelocity()})),t}(this.values)));var r=e.transition;return{transition:void 0===r?this.defaultTransition:r,transitionEnd:e.transitionEnd,target:s(e,["transition","transitionEnd"])}},e.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},e.prototype.setOverride=function(e,t){this.overrides[t]=e,this.children&&this.children.forEach((function(n){return n.setOverride(e,t)}))},e.prototype.startOverride=function(e){var t=this.overrides[e];if(t)return this.start(t,{priority:e})},e.prototype.clearOverride=function(e){var t=this;if(this.children&&this.children.forEach((function(t){return t.clearOverride(e)})),this.overrides[e]){this.activeOverrides.delete(e);var n=this.getHighestPriority();if(this.resetIsAnimating(),n)this.overrides[n]&&this.startOverride(n);var r=this.resolvedOverrides[e];if(r){var o={};for(var a in this.baseTarget)void 0!==r[a]&&(o[a]=this.baseTarget[a]);this.onStart(),this.animate(o).then((function(){return t.onComplete()}))}}},e.prototype.apply=function(e){return Array.isArray(e)?this.applyVariantLabels(e):"string"==typeof e?this.applyVariantLabels([e]):void this.setValues(e)},e.prototype.applyVariantLabels=function(e){var t=this,n=new Set;c(e).reverse().forEach((function(r){var o=t.resolveVariant(t.variants[r]),a=o.target,i=o.transitionEnd;i&&t.setValues(i,{isActive:n}),a&&t.setValues(a,{isActive:n}),t.children&&t.children.size&&t.children.forEach((function(t){return t.applyVariantLabels(e)}))}))},e.prototype.start=function(e,t){var n,r,o=this;return void 0===t&&(t={}),t.priority&&this.activeOverrides.add(t.priority),this.resetIsAnimating(t.priority),r=e,n=Array.isArray(r)?this.animateVariantLabels(e,t):"string"==typeof e?this.animateVariant(e,t):this.animate(e,t),this.onStart(),n.then((function(){return o.onComplete()}))},e.prototype.animate=function(e,t){var n=this,r=void 0===t?{}:t,o=r.delay,a=void 0===o?0:o,s=r.priority,c=void 0===s?0:s,l=r.transitionOverride,u=this.resolveVariant(e),d=u.target,f=u.transition,p=u.transitionEnd;if(l&&(f=l),!d)return Promise.resolve();if(d=this.transformValues(d),p&&(p=this.transformValues(p)),this.checkForNewValues(d),this.makeTargetAnimatable){var h=this.makeTargetAnimatable(d,p);d=h.target,p=h.transitionEnd}c&&(this.resolvedOverrides[c]=d),this.checkForNewValues(d);var m=[];for(var g in d){var b=this.values.get(g);if(b&&d&&void 0!==d[g]){var v=d[g];c||(this.baseTarget[g]=Mn(v)),this.isAnimating.has(g)||(this.isAnimating.add(g),m.push(er(g,b,v,i({delay:a},f))))}}var y=Promise.all(m);return p?y.then((function(){n.setValues(p,{priority:c})})):y},e.prototype.animateVariantLabels=function(e,t){var n=this,r=c(e).reverse().map((function(e){return n.animateVariant(e,t)}));return Promise.all(r)},e.prototype.animateVariant=function(e,t){var n=this,r=!1,o=0,a=0,i=1,s=t&&t.priority||0,c=this.variants[e],l=c?function(){return n.animate(c,t)}:function(){return Promise.resolve()},u=this.children?function(){return n.animateChildren(e,o,a,i,s)}:function(){return Promise.resolve()};if(c&&this.children){var d=this.resolveVariant(c).transition;d&&(r=d.when||r,o=d.delayChildren||o,a=d.staggerChildren||a,i=d.staggerDirection||i)}if(r){var f="beforeChildren"===r?[l,u]:[u,l],p=f[1];return(0,f[0])().then(p)}return Promise.all([l(),u()])},e.prototype.animateChildren=function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var a=[],i=(this.children.size-1)*n,s=1===r?function(e){return e*n}:function(e){return i-e*n};return Array.from(this.children).forEach((function(n,r){var i=n.animateVariant(e,{priority:o,delay:t+s(r)});a.push(i)})),Promise.all(a)},e.prototype.onStart=function(){var e=this.props.onAnimationStart;e&&e()},e.prototype.onComplete=function(){var e=this.props.onAnimationComplete;e&&e()},e.prototype.checkOverrideIsAnimating=function(e){for(var t=this.overrides.length,n=e+1;n<t;n++){var r=this.resolvedOverrides[n];if(r)for(var o in r)this.isAnimating.add(o)}},e.prototype.resetIsAnimating=function(e){void 0===e&&(e=0),this.isAnimating.clear(),e<this.getHighestPriority()&&this.checkOverrideIsAnimating(e),this.children&&this.children.forEach((function(t){return t.resetIsAnimating(e)}))},e.prototype.stop=function(){this.values.forEach((function(e){return e.stop()}))},e.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach((function(t,n){t&&e.setOverride(t,n)}))},e.prototype.removeChild=function(e){this.children&&this.children.delete(e)},e.prototype.resetChildren=function(){this.children&&this.children.clear()},e}();var nr=function(){function e(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return e.prototype.setVariants=function(e){this.variants=e,this.componentControls.forEach((function(t){return t.setVariants(e)}))},e.prototype.setDefaultTransition=function(e){this.defaultTransition=e,this.componentControls.forEach((function(t){return t.setDefaultTransition(e)}))},e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),this.variants&&e.setVariants(this.variants),this.defaultTransition&&e.setDefaultTransition(this.defaultTransition),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){var n=this;if(this.hasMounted){var r=[];return this.componentControls.forEach((function(n){var o=n.start(e,{transitionOverride:t});r.push(o)})),Promise.all(r)}return new Promise((function(r){n.pendingAnimations.push({animation:[e,t],resolve:r})}))},e.prototype.set=function(e){return this.hasMounted,this.componentControls.forEach((function(t){return t.apply(e)}))},e.prototype.stop=function(){this.componentControls.forEach((function(e){return e.stop()}))},e.prototype.mount=function(){var e=this;this.hasMounted=!0,this.pendingAnimations.forEach((function(t){var n=t.animation,r=t.resolve;return e.start.apply(e,n).then(r)}))},e.prototype.unmount=function(){this.hasMounted=!1,this.stop()},e}(),rr=Object(l.createContext)(null),or=Object(l.createContext)({static:!1}),ar=function(e){return"string"==typeof e||Array.isArray(e)},ir=function(e){return e instanceof nr},sr=function(e,t,n,r,o){void 0===r&&(r=!1);var a,i,s=o.initial,c=o.animate,u=o.variants,d=o.whileTap,f=o.whileHover,p=Object(l.useContext)(rr);void 0!==(null===(a=p)||void 0===a?void 0:a.initial)&&(s=p.initial),!1!==s||ir(c)?"boolean"!=typeof s&&(i=s):i=c;var h=Object(l.useRef)(!1),m=u||ar(c)||ar(d)||ar(f)||ir(c),g=ar(i)?i:e.initial,b=ar(c)?c:e.animate,v=r?g:null,y=m&&ar(b)?b:null,w=Object(l.useMemo)((function(){return{controls:m?t:e.controls,initial:g,animate:b,values:n,hasMounted:h,isReducedMotion:e.isReducedMotion}}),[v,y,e.isReducedMotion]);return w.static=r,function(e,t){void 0===t&&(t=!1);var n=Object(l.useRef)(!0);(!t||t&&n.current)&&e(),n.current=!1}((function(){var n=i||e.initial;n&&t.apply(n)}),!r),Object(l.useEffect)((function(){h.current=!0}),[]),w};function cr(e,t,n){var r=t.variants,o=t.transition,a=Object(l.useContext)(or).controls,i=Object(l.useContext)(rr),c=gn((function(){return new tr(e)}));return i&&!i.isPresent||(c.resetChildren(),c.setProps(t),c.setVariants(r),c.setDefaultTransition(o)),Object(l.useEffect)((function(){n&&a&&a.addChild(c)})),Object(l.useEffect)((function(){return function(){t.onAnimationComplete;var e=s(t,["onAnimationComplete"]);c.setProps(e),a&&a.removeChild(c)}}),[]),c}var lr=function(e){var t=e.animate,n=e.variants,r=e.inherit;return(void 0===r||r)&&!!n&&(!t||t instanceof nr)};var ur=function(e){var t=e.getValueControlsConfig,n=e.loadFunctionalityComponents,r=e.renderComponent;return Object(l.forwardRef)((function(e,o){var a=function(e){var t=e&&"function"!=typeof e?e:Object(l.useRef)(null);return e&&"function"==typeof e&&Object(l.useEffect)((function(){return e(t.current),function(){return e(null)}}),[]),t}(o),i=Object(l.useContext)(or),s=i.static||e.static||!1,c=En(e),u=function(e,t,n,r){void 0===t&&(t={});var o={},a=Object(l.useRef)({}).current;for(var i in t){var s=t[i];if(vn(s))e.set(i,s);else if(n||!pt(i)&&!An(i))o[i]=s;else{if(e.has(i)){if(s!==a[i])e.get(i).set(s)}else e.set(i,mn(s));a[i]=s}}return r?r(o):o}(c,e.style,s,e.transformValues),d=lr(e),f=cr(gn((function(){return t(a,c)})),e,d),p=sr(i,f,c,s,e),h=s?null:n(a,c,e,i,f,d),m=r(a,u,c,e,s);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(or.Provider,{value:p},m),Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Tn,{innerRef:a,values:c,isStatic:s}),h))}))},dr=["animate","circle","clipPath","defs","desc","ellipse","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","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],fr=Object(l.createContext)({transformPagePoint:function(e){return e}});function pr(e){return Object(l.useEffect)((function(){return function(){return e()}}),[])}function hr(e,t,n,r){if(n)return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function mr(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function gr(e){return!!e.touches}var br={pageX:0,pageY:0};function vr(e){var t=e.pageX,n=void 0===t?0:t,r=e.pageY;return{x:n,y:void 0===r?0:r}}function yr(e){return{point:gr(e)?(t=e,n=t.touches[0]||t.changedTouches[0]||br,{x:n.pageX,y:n.pageY}):vr(e)};var t,n}var wr,xr=function(e,t){if(void 0===t&&(t=!1),e){var n=function(t){return e(t,yr(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(n):n}},Er="undefined"!=typeof window,Or={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},kr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function _r(e){return Er&&null===window.onpointerdown?e:Er&&null===window.ontouchstart?kr[e]:Er&&null===window.onmousedown?Or[e]:e}function Cr(e,t,n,r){return hr(e,_r(t),xr(n,"pointerdown"===t),r)}function jr(e,t,n,r){return function(e,t,n,r){Object(l.useEffect)((function(){var o=e.current;if(n&&o)return hr(o,t,n,r)}),[e,t,n,r])}(e,_r(t),xr(n,"pointerdown"===t),r)}!function(e){e.subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},e.relativeTo=function(e){var t;return function(n){var r=n.x,o=n.y,a=void 0!==t?t:t="string"==typeof e?document.getElementById(e):e;if(a){var i=a.getBoundingClientRect();return{x:r-i.left-window.scrollX,y:o-i.top-window.scrollY}}}}}(wr||(wr={}));var Tr=!1;"undefined"!=typeof window&&document.addEventListener("touchmove",(function(e){Tr&&e.preventDefault()}),{passive:!1});var Sr=function(){return Tr=!1},Ir=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=Nr(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=Le(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,a=_().timestamp;r.history.push(i(i({},o),{timestamp:a}));var s=r.handlers,c=s.onStart,l=s.onMove;t||(c&&c(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},!(gr(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var a=Ar(yr(e),this.transformPagePoint),s=a.point,c=_().timestamp;this.history=[i(i({},s),{timestamp:c})];var l=t.onSessionStart;l&&l(e,Nr(a,this.history));var u=Cr(window,"pointermove",(function(e,t){return r.handlePointerMove(e,t)})),d=Cr(window,"pointerup",(function(e,t){return r.handlePointerUp(e,t)}));this.removeListeners=function(){u&&u(),d&&d()}}}return e.prototype.handlePointerMove=function(e,t){this.lastMoveEvent=e,this.lastMoveEventInfo=Ar(t,this.transformPagePoint),mr(e)&&0===e.buttons?this.handlePointerUp(e,t):C.update(this.updatePoint,!0)},e.prototype.handlePointerUp=function(e,t){this.end();var n=this.handlers.onEnd;if(n){var r=Nr(Ar(t,this.transformPagePoint),this.history);n&&n(e,r)}},e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),x.update(this.updatePoint),Sr()},e}();function Ar(e,t){return t?{point:t(e.point)}:e}function Nr(e,t){var n=e.point;return{point:n,delta:wr.subtract(n,Mr(t)),offset:wr.subtract(n,Pr(t)),velocity:Lr(t,.1)}}function Pr(e){return e[0]}function Mr(e){return e[e.length-1]}function Lr(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Mr(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Kn(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Rr=function(e,t){return!!t&&(e===t||Rr(e,t.parentElement))},Dr=["whileHover","whileTap","whileDrag"],Br=function(e){return Dr.indexOf(e)+1};function Fr(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var zr=Fr("dragHorizontal"),Ur=Fr("dragVertical");function Hr(e){var t=!1;if("y"===e)t=Ur();else if("x"===e)t=zr();else{var n=zr(),r=Ur();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}var $r=Br("whileTap");var Vr=Br("whileHover"),qr=function(e){return function(t,n){mr(t)&&e(t,n)}};function Gr(e,t){!function(e,t){var n=e.onPan,r=e.onPanStart,o=e.onPanEnd,a=e.onPanSessionStart,i=n||r||o||a,s=Object(l.useRef)(null),c=Object(l.useContext)(fr).transformPagePoint,u={onSessionStart:a,onStart:r,onMove:n,onEnd:function(e,t){s.current=null,o&&o(e,t)}};Object(l.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),jr(t,"pointerdown",i&&function(e){s.current=new Ir(e,u,{transformPagePoint:c})}),pr((function(){return s.current&&s.current.end()}))}(e,t),function(e,t){var n=e.onTap,r=e.onTapStart,o=e.onTapCancel,a=e.whileTap,i=e.controls,s=n||r||o||a,c=Object(l.useRef)(!1),u=Object(l.useRef)(null);function d(){u.current&&u.current(),u.current=null}a&&i&&i.setOverride(a,$r);var f=Object(l.useRef)(null);f.current=function(e,r){var s=t.current;if(d(),c.current&&s){c.current=!1,i&&a&&i.clearOverride($r);var l=Hr(!0);l&&(l(),Rr(s,e.target)?n&&n(e,r):o&&o(e,r))}},jr(t,"pointerdown",s?function(e,n){d(),u.current=Cr(window,"pointerup",(function(e,t){return f.current(e,t)})),t.current&&!c.current&&(c.current=!0,r&&r(e,n),i&&a&&i.startOverride($r))}:void 0),pr(d)}(e,t),function(e,t){var n=e.whileHover,r=e.onHoverStart,o=e.onHoverEnd,a=e.controls;n&&a&&a.setOverride(n,Vr),jr(t,"pointerenter",qr((function(e,t){r&&r(e,t),n&&a&&a.startOverride(Vr)}))),jr(t,"pointerleave",qr((function(e,t){o&&o(e,t),n&&a&&a.clearOverride(Vr)})))}(e,t)}var Wr=function(e){return function(t){return e(t),null}},Yr=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],Kr={key:"gestures",shouldRender:function(e){return Yr.some((function(t){return e.hasOwnProperty(t)}))},Component:Wr((function(e){var t=e.innerRef;Gr(s(e,["innerRef"]),t)}))},Xr=function(e){return"object"==typeof e&&e.hasOwnProperty("current")},Jr=function(e){return e},Qr=function(){function e(e){var t=e.ref,n=e.values,r=e.controls;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.props={transformPagePoint:Jr},this.point={},this.origin={x:mn(0),y:mn(0)},this.openGlobalLock=null,this.panSession=null,this.prevConstraintsBox={width:0,height:0,x:0,y:0},this.ref=t,this.values=n,this.controls=r}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor;void 0!==r&&r&&this.snapToCursor(e);var o=this.props.transformPagePoint;this.panSession=new Ir(e,{onSessionStart:function(){Tr=!0,Zr((function(e){var t=n.point[e];t&&t.stop()}))},onStart:function(e,t){if(n.constraintsNeedResolution){var r=n.props,o=r.dragConstraints,a=r.transformPagePoint;n.constraints=ro(o,n.ref,n.point,a),n.applyConstraintsToPoint()}Zr((function(e){var t=n.point[e];t&&n.origin[e].set(t.get())}));var i=n.props,s=i.drag,c=i.dragPropagation;if(!s||c||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Hr(s),n.openGlobalLock)){n.isDragging=!0,n.currentDirection=null;var l=n.props.onDragStart;l&&l(e,eo(t,n.point))}},onMove:function(e,t){var r=n.props,o=r.dragPropagation,a=r.dragDirectionLock;if(o||n.openGlobalLock){var i=t.offset;if(a&&null===n.currentDirection){if(n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),null!==n.currentDirection){var s=n.props.onDirectionLock;s&&s(n.currentDirection)}}else{n.updatePoint("x",i),n.updatePoint("y",i);var c=n.props.onDrag;c&&c(e,eo(t,n.point))}}},onEnd:function(e,t){n.stop(e,t)}},{transformPagePoint:o})},e.prototype.cancelDrag=function(){Sr(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},e.prototype.stop=function(e,t){var n;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,a=o.dragMomentum,i=o.dragElastic,s=o.onDragEnd;if(a||i){var c=t.velocity;this.animateDragEnd(c)}else this.recordBoxInfo(this.constraints);s&&s(e,eo(t,this.point))}},e.prototype.recordBoxInfo=function(e){if(e){var t=e.right,n=e.left,r=e.bottom,o=e.top;this.prevConstraintsBox.width=(t||0)-(n||0),this.prevConstraintsBox.height=(r||0)-(o||0)}this.point.x&&(this.prevConstraintsBox.x=this.point.x.get()),this.point.y&&(this.prevConstraintsBox.y=this.point.y.get())},e.prototype.snapToCursor=function(e){var t=this,n=this.props.transformPagePoint,r=yr(e).point,o=oo(this.ref,n),a=o.width/2+o.left+window.scrollX,i=o.height/2+o.top+window.scrollY,s={x:r.x-a,y:r.y-i};Zr((function(e){var n=t.point[e];n&&t.origin[e].set(n.get())})),this.updatePoint("x",s),this.updatePoint("y",s)},e.prototype.setPoint=function(e,t){this.point[e]=t},e.prototype.updatePoint=function(e,t){var n=this.props,r=n.drag,o=n.dragElastic,a=this.point[e];if(no(e,r,this.currentDirection)&&a){var i=io(e,this.origin[e].get()+t[e],this.constraints,o);a.set(i)}},e.prototype.updateProps=function(e){var t=this,n=e.drag,r=void 0!==n&&n,o=e.dragDirectionLock,a=void 0!==o&&o,c=e.dragPropagation,l=void 0!==c&&c,u=e.dragConstraints,d=void 0!==u&&u,f=e.dragElastic,p=void 0===f||f,h=e.dragMomentum,m=void 0===h||h,g=s(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=i({drag:r,dragDirectionLock:a,dragPropagation:l,dragConstraints:d,dragElastic:p,dragMomentum:m},g);var b=g._dragValueX,v=g._dragValueY,y=g.dragOriginX,w=g.dragOriginY;y&&(this.origin.x=y),w&&(this.origin.y=w),Zr((function(e){if(no(e,r,t.currentDirection)){var n="x"===e?b:v;t.setPoint(e,n||t.values.get(e,0))}})),this.constraintsNeedResolution=Xr(d),this.constraints=this.constraintsNeedResolution?this.constraints||!1:d},e.prototype.applyConstraintsToPoint=function(e){var t=this;return void 0===e&&(e=this.constraints),Zr((function(n){var r=t.point[n];r&&!r.isAnimating()&&io(n,r,e,0)}))},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,c=n._dragValueX,l=n._dragValueY,u=n._dragTransitionControls,d=Zr((function(n){var d;if(no(n,r,t.currentDirection)){var f=t.constraints?to(n,t.constraints):{},p=a?200:1e6,h=a?40:1e7,m=u||t.controls,g=i(i({type:"inertia",velocity:o?e[n]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1},s),f),b="x"===n?c:l;return b?er(n,b,0,g):m.start(((d={})[n]=0,d.transition=g,d))}}));return Promise.all(d).then((function(){t.recordBoxInfo(t.constraints),t.scalePoint();var e=t.props.onDragTransitionEnd;e&&e()}))},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.transformPagePoint;if(Xr(n)){var o=oo(n,r),a=oo(this.ref,r),i=function(t,n){var r=e.point[t];if(r){if(r.isAnimating())return r.stop(),void e.recordBoxInfo();var i=e.prevConstraintsBox[n]?(o[n]-a[n])/e.prevConstraintsBox[n]:1;r.set(e.prevConstraintsBox[t]*i)}};i("x","width"),i("y","height")}},e.prototype.mount=function(e){var t=this,n=Cr(e,"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=hr(window,"resize",(function(){return t.scalePoint()}));if(this.constraintsNeedResolution){var o=this.props,a=o.dragConstraints,i=o.transformPagePoint,s=ro(a,this.ref,this.point,i);this.applyConstraintsToPoint(s),this.recordBoxInfo(s)}else!this.isDragging&&this.constraints&&this.applyConstraintsToPoint();return function(){n&&n(),r&&r(),t.cancelDrag()}},e}();function Zr(e){return[e("x"),e("y")]}function eo(e,t){return i(i({},e),{point:{x:t.x?t.x.get():0,y:t.y?t.y.get():0}})}function to(e,t){var n=t.top,r=t.right,o=t.bottom,a=t.left;return"x"===e?{min:a,max:r}:{min:n,max:o}}function no(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}function ro(e,t,n,r){null!==e.current&&t.current;var o=oo(e,r),a=oo(t,r),i=o.left-a.left+ao(n.x),s=o.top-a.top+ao(n.y);return{top:s,left:i,right:o.width-a.width+i,bottom:o.height-a.height+s}}function oo(e,t){var n=e.current.getBoundingClientRect(),r=t({x:n.left,y:n.top}),o=r.x,a=r.y,i=t({x:n.width,y:n.height});return{left:o,top:a,width:i.x,height:i.y}}function ao(e){return e?e.get():0}function io(e,t,n,r){var o=t instanceof hn?t.get():t;if(!n)return o;var a=to(e,n),i=a.min,s=a.max;return void 0!==i&&o<i?o=r?so(i,o,r):Math.max(i,o):void 0!==s&&o>s&&(o=r?so(s,o,r):Math.min(s,o)),t instanceof hn&&t.set(o),o}function so(e,t,n){return De(e,t,"number"==typeof n?n:.35)}var co={key:"drag",shouldRender:function(e){return!!e.drag},Component:Wr((function(e){var t=e.innerRef,n=e.values,r=e.controls;return function(e,t,n,r){var o=e.dragControls,a=Object(l.useContext)(fr).transformPagePoint,s=gn((function(){return new Qr({ref:t,values:n,controls:r})}));s.updateProps(i(i({},e),{transformPagePoint:a})),Object(l.useEffect)((function(){return o&&o.subscribe(s)}),[s]),Object(l.useEffect)((function(){return s.mount(t.current)}),[])}(s(e,["innerRef","values","controls"]),t,n,r)}))};function lo(e){return"string"==typeof e&&e.startsWith("var(--")}var uo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fo(e,t,n){void 0===n&&(n=1);var r=function(e){var t=uo.exec(e);return t?[t[1],t[2]]:[,]}(e),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i||(lo(a)?fo(a,t,n+1):a)}}var po,ho=new Set(["width","height","top","left","right","bottom","x","y"]),mo=function(e){return ho.has(e)},go=function(e,t){e.set(t,!1),e.set(t)},bo=function(e){return e===N||e===B};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(po||(po={}));var vo=function(e,t){return parseFloat(e.split(", ")[t])},yo=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return vo(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?vo(i[1],e):0}},wo=new Set(["x","y","z"]),xo=dt.filter((function(e){return!wo.has(e)}));var Eo={width:function(e){return e.width},height:function(e){return e.height},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.height,r=t.top;return parseFloat(r)+n},right:function(e,t){var n=e.width,r=t.left;return parseFloat(r)+n},x:yo(4,13),y:yo(5,14)},Oo=function(e,t,n,r){void 0===r&&(r={}),n=i({},n),r=i({},r);var o=t.current,a=Ft(o),s=Object.keys(n).filter(mo),c=[],l=!1,u=s.reduce((function(t,o){var i=e.get(o);if(!i)return t;var s,u=i.get(),d=n[o],f=Bn(u);if(Pn(d))for(var p=d.length,h=null===d[0]?1:0;h<p;h++)s?Bn(d[h]):(s=Bn(d[h]))===f||bo(f)&&bo(s);else s=Bn(d);if(f!==s)if(bo(f)&&bo(s)){var m=i.get();"string"==typeof m&&i.set(parseFloat(m)),"string"==typeof d?n[o]=parseFloat(d):Array.isArray(d)&&s===B&&(n[o]=d.map(parseFloat))}else l||(c=function(e,t){var n=[];return xo.forEach((function(t){var r=e.get(t);void 0!==r&&(n.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))})),n.length&&t.render(),n}(e,a),l=!0),t.push(o),r[o]=void 0!==r[o]?r[o]:n[o],go(i,d);return t}),[]);if(u.length){var d=function(e,t,n,r,o){var a=n.getBoundingClientRect(),i=getComputedStyle(n),s=i.display,c={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===s&&r.set("display",e.display||"block"),r.render();var l=n.getBoundingClientRect();return o.forEach((function(n){var r=t.get(n);go(r,Eo[n](a,c)),e[n]=Eo[n](l,i)})),e}(n,e,o,a,u);return c.length&&c.forEach((function(t){var n=t[0],r=t[1];e.get(n).set(r)})),a.render(),{target:d,transitionEnd:r}}return{target:n,transitionEnd:r}};function ko(e,t,n,r){return function(e){return Object.keys(e).some(mo)}(n)?Oo(e,t,n,r):{target:n,transitionEnd:r}}var _o=function(e,t){return function(n,r){var o=function(e,t,n,r){var o=s(n,[]),a=t.current;if(!(a instanceof HTMLElement))return{target:o,transitionEnd:r};for(var c in r&&(r=i({},r)),e.forEach((function(e){var t=e.get();if(lo(t)){var n=fo(t,a);n&&e.set(n)}})),o){var l=o[c];if(lo(l)){var u=fo(l,a);u&&(o[c]=u,r&&void 0===r[c]&&(r[c]=l))}}return{target:o,transitionEnd:r}}(e,t,n,r);return n=o.target,r=o.transitionEnd,ko(e,t,n,r)}};var Co,jo,To=Object(l.createContext)(null);!function(e){e.Prepare="prepare",e.Read="read",e.Render="render"}(jo||(jo={}));var So=[jo.Prepare,jo.Read,jo.Render].reduce((function(e,t){return e[t]=[],e}),{}),Io=!1;function Ao(e){for(var t=e.length,n=0;n<t;n++)e[n]();e.length=0}var No=function(e){return function(t){t&&(Io=!0,So[e].push(t))}},Po=((Co={})[jo.Prepare]=No(jo.Prepare),Co[jo.Read]=No(jo.Read),Co[jo.Render]=No(jo.Render),Co.flush=function(){Io&&(Ao(So.prepare),Ao(So.read),Ao(So.render),Io=!1)},Co);var Mo={duration:.8,ease:[.45,.05,.19,1]},Lo={type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10};var Ro={id:"x",size:"width",min:"left",max:"right",origin:"originX"},Do={id:"y",size:"height",min:"top",max:"bottom",origin:"originY"};function Bo(e,t){return(e+t)/2}function Fo(e,t,n){var r,o=e[n.size]-t[n.size],a=.5;return o&&(e[n.min]===t[n.min]?a=0:e[n.max]===t[n.max]&&(a=1)),(r={})[n.size]=o,r[n.origin]=a,r[n.id]=.5===a?Bo(e[n.min],e[n.max])-Bo(t[n.min],t[n.max]):0,r}var zo={getLayout:function(e){return e.offset},measure:function(e){var t=e.offsetLeft,n=e.offsetTop,r=e.offsetWidth,o=e.offsetHeight;return{left:t,top:n,right:t+r,bottom:n+o,width:r,height:o}}},Uo={getLayout:function(e){return e.boundingBox},measure:function(e){var t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height,right:t.right,bottom:t.bottom}}};function Ho(e){return window.getComputedStyle(e).position}function $o(e){return"width"===e||"height"===e}var Vo,qo={key:"layout",shouldRender:function(e){var t=e.positionTransition,n=e.layoutTransition;return"undefined"!=typeof window&&!(!t&&!n)},Component:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.innerRef,n=e.positionTransition,r=e.values,o=e.controls,a=t.current;if(function(e){return e instanceof HTMLElement}(a)){var s,c,l,u=function(e){var t=e.layoutTransition,n=e.positionTransition;return t||n}(this.props),d=!!n,f=Ho(a),p={offset:zo.measure(a),boundingBox:Uo.measure(a)};return Po.prepare((function(){s=a.style.transform,a.style.transform=""})),Po.read((function(){c={offset:zo.measure(a),boundingBox:Uo.measure(a)};var e=Ho(a);l=function(e,t,n){return n&&e===t?zo:Uo}(f,e,d)})),Po.render((function(){var e=function(e,t){return i(i({},Fo(e,t,Ro)),Fo(e,t,Do))}(l.getLayout(p),l.getLayout(c));if(e.x||e.y||e.width||e.height){Ft(a).set({originX:e.originX,originY:e.originY}),_n();var t={},n={},f=function(e){return"function"==typeof e}(u)?u({delta:e}):u;h("left","x",0,e.x),h("top","y",0,e.y),d||(h("width","scaleX",1,p.boundingBox.width/c.boundingBox.width),h("height","scaleY",1,p.boundingBox.height/c.boundingBox.height)),t.transition=n,f&&o.start(t),Cn()}else s&&(a.style.transform=s);function h(o,a,s,c){var u=$o(o)?o:a;if(e[u]){var p="boolean"==typeof f?i({},function(e){return e?Lo:Mo}(d)):f,h=r.get(a,s),m=h.getVelocity();n[a]=p[a]?i({},p[a]):i({},p),void 0===n[a].velocity&&(n[a].velocity=m||0),t[a]=s;var g=$o(o)||l!==zo?0:h.get();h.set(c+g)}}})),null}},t.prototype.componentDidUpdate=function(){Po.flush()},t.prototype.render=function(){return null},t.contextType=To,t}(l.Component)},Go=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","static","positionTransition","layoutTransition","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragElastic","dragMomentum","dragPropagation","dragTransition","_dragValueX","_dragValueY","_dragTransitionControls","dragOriginX","dragOriginY","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileHover","whileTap","onHoverEnd","onHoverStart"]);function Wo(e){return Go.has(e)}!function(e){e.Target="Target",e.VariantLabel="VariantLabel",e.AnimationSubscription="AnimationSubscription"}(Vo||(Vo={}));function Yo(e,t){void 0===t&&(t=!1);e.transition;var n=e.transitionEnd,r=s(e,["transition","transitionEnd"]);return t?i(i({},r),n):r}var Ko,Xo,Jo=function(e){var t,n=e instanceof hn?e.get():e;return Array.from(new Set((t=n)?Array.isArray(t)?t:[t]:[]))};var Qo=((Ko={})[Vo.Target]=Wr((function(e){return function(e,t,n,r){var o=Object(l.useRef)(!0),a=Object(l.useRef)(null);a.current||(a.current=Yo(e,!0)),Object(l.useEffect)((function(){var s,c,l={},u=Yo(e),d=Yo(e,!0);for(var f in u){var p=o.current&&(!n.has(f)||n.get(f).get()!==d[f]),h=null!==d[f],m=(s=a.current[f],void 0!==(c=d[f])&&(Array.isArray(s)&&Array.isArray(c)?!function(e,t){if(null===t)return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}(c,s):s!==c));h&&(m||p)&&(l[f]=u[f])}o.current=!1,a.current=i(i({},a.current),d),Object.keys(l).length&&t.start(i(i({},l),{transition:e.transition||r,transitionEnd:e.transitionEnd}))}),[e])}(e.animate,e.controls,e.values,e.transition)})),Ko[Vo.VariantLabel]=Wr((function(e){var t=e.animate,n=e.inherit,r=void 0===n||n,o=e.controls;return function(e,t,n,r){var o=Jo(t),a=Object(l.useContext)(or),i=a.hasMounted&&a.hasMounted.current,s=Object(l.useRef)(!1);Object(l.useEffect)((function(){var t,c,l=!1;n?(l=!!i,o=Jo(a.animate)):l=s.current||(t=Jo(e),c=o,t.join(",")!==c.join(",")),l&&r.start(o),s.current=!0}),[o.join(",")])}(e.initial,t,r,o)})),Ko[Vo.AnimationSubscription]=Wr((function(e){return function(e,t){var n=Object(l.useMemo)((function(){return e.subscribe(t)}),[e]);Object(l.useEffect)((function(){return function(){n&&n()}}),[n])}(e.animate,e.controls)})),Ko),Zo=function(e){return e.animate instanceof nr},ea=["initial","animate","whileTap","whileHover"],ta=((Xo={})[Vo.Target]=function(e){return!(void 0===e.animate||(t=e.animate,Array.isArray(t)||"string"==typeof t)||Zo(e));var t},Xo[Vo.VariantLabel]=function(e){return void 0!==e.variants||ea.some((function(t){return"string"==typeof e[t]}))},Xo[Vo.AnimationSubscription]=Zo,Xo);var na={key:"exit",shouldRender:function(e){return!!e.exit&&!lr(e)},Component:Wr((function(e){var t,n=e.animate,r=e.controls,o=e.exit,a=function(){var e=Object(l.useContext)(rr);if(null===e)return[!0];var t=e.isPresent,n=e.onExitComplete,r=e.register;return Object(l.useEffect)(r,[]),!t&&n?[!1,n]:[!0]}(),s=a[0],c=a[1],u=Object(l.useContext)(rr),d=Object(l.useRef)(!1),f=void 0!==(null===(t=u)||void 0===t?void 0:t.custom)?u.custom:e.custom;Object(l.useEffect)((function(){s?!d.current||!n||n instanceof nr||r.start(n):(!d.current&&o&&(r.setProps(i(i({},e),{custom:f})),r.start(o).then(c)),d.current=!0),s&&(d.current=!1)}),[s])}))},ra=function(e){return!Wo(e)};try{var oa=n(110).default;ra=function(e){return e.startsWith("on")?!Wo(e):oa(e)}}catch(e){}var aa=[qo,co,Kr,na],ia=aa.length;function sa(e){var t="string"==typeof e,n=t&&-1!==dr.indexOf(e);return{renderComponent:function(r,o,a,s,c){var u=t?function(e){var t={};for(var n in e)ra(n)&&(t[n]=e[n]);return t}(s):s,d=n?function(e,t){var n=Pt(Sn(e),void 0,void 0,void 0,void 0,!1);return n.style=i(i({},t),n.style),n}(a,o):function(e,t,n,r){var o={style:Nn(e,t,n)};return r&&(o.style.userSelect="none",o.draggable=!1),o}(a,o,c,!!s.drag);return Object(l.createElement)(e,i(i(i({},u),{ref:r}),d))},loadFunctionalityComponents:function(e,t,n,r,o,a){var s=[],c=function(e){var t=void 0;for(var n in Vo)ta[n](e)&&(t=n);return t?Qo[t]:void 0}(n);c&&s.push(Object(l.createElement)(c,{key:"animation",initial:n.initial,animate:n.animate,variants:n.variants,transition:n.transition,controls:o,inherit:a,values:t}));for(var u=0;u<ia;u++){var d=aa[u],f=d.shouldRender,p=d.key,h=d.Component;f(n,r)&&s.push(Object(l.createElement)(h,i({key:p},n,{parentContext:r,values:t,controls:o,innerRef:e})))}return s},getValueControlsConfig:function(e,t){return{values:t,readValueFromSource:function(t){return Ft(e.current).get(t)},makeTargetAnimatable:_o(t,e)}}}}var ca=["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","head","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","title","tr","track","u","ul","var","video","wbr","webview"].reduce((function(e,t){var n=sa(t);return e[t]=ur(n),e}),{}),la=dr.reduce((function(e,t){return e[t]=ur(sa(t)),e}),{}),ua=i(i({custom:function(e){return ur(sa(e))}},ca),la);function da(e){return gn((function(){return mn(e)}))}function fa(){return{scrollX:mn(0),scrollY:mn(0),scrollXProgress:mn(0),scrollYProgress:mn(0)}}"undefined"!=typeof window?l.useLayoutEffect:l.useEffect;fa();!function(){function e(){this.componentControls=new Set}e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){this.componentControls.forEach((function(n){n.start(e.nativeEvent||e,t)}))}}();var pa=mn(null);if("undefined"!=typeof window)if(window.matchMedia){var ha=window.matchMedia("(prefers-reduced-motion)"),ma=function(){return pa.set(ha.matches)};ha.addListener(ma),ma()}else pa.set(!1)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(103),o=n(22);const a=e=>/\/(.*)\/(.*)/.exec(e),i=e=>{const t={};for(let n=0;n<e.length;n+=1){const i=Object.keys(e[n]),s=e[n].text;i.forEach(i=>{Object.values(o.c).includes(i)&&(t[Object(r.a)(i)]={value:"pattern"===i?new RegExp(a(e[n][i])[1],a(e[n][i])[2]):e[n][i],...s&&{message:s}})})}return t},s=e=>{if("object"!=typeof e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;null!=r&&r.text||(t[n]=r.value)}),t},c=e=>{const t=[...e.validators||[]];return e.required&&t.push({required:e.required,text:e.texts.required_text}),t}},function(e,t,n){"use strict";var r=n(4),o=n.n(r);o.a.oneOfType([o.a.node,o.a.arrayOf(o.a.node)])},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";t.a=(e,t)=>Boolean((e=>{const t=e.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\//g,"\\/").replace(/\?/g,"\\?");return new RegExp(t,"i")})(t).test(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(239);const o="kindly-chat-browser-id",a=()=>{const e=localStorage.getItem(o);if(!e){const e=Object(r.a)();return localStorage.setItem(o,e),e}return e}},function(e){e.exports=JSON.parse('{"a":"2.39.11"}')},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"l",(function(){return h})),n.d(t,"f",(function(){return m})),n.d(t,"o",(function(){return g})),n.d(t,"g",(function(){return b})),n.d(t,"k",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"j",(function(){return w})),n.d(t,"i",(function(){return x})),n.d(t,"p",(function(){return E})),n.d(t,"a",(function(){return O})),n.d(t,"m",(function(){return k})),n.d(t,"b",(function(){return _}));var r=n(18),o=n(5),a=n(77),i=n(2),s=n(66),c=n(9);const l=(e,t)=>{if(e.feedbackFormType===o.r.NONE)return!1;if(e.feedbackFormType===o.r.EXTERNAL_LINK){var n,r,a;const{feedbackForm:o}=e;return(null===(n=o.external_link_url)||void 0===n?void 0:n[t])&&((null===(r=o.external_link_headline)||void 0===r?void 0:r[t])||(null===(a=o.external_link_text)||void 0===a?void 0:a[t]))}return!0},u=e=>(t,n)=>{const{chatHasStarted:r}=n().chatbubble;t({type:i.sb,botKey:e}),r&&t(Object(s.a)())},d=function(e){let{skipRestart:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n,r)=>{const{botKey:o,chatHasStarted:a}=r().chatbubble,{takenOver:s}=r().agent;n({type:i.eb,code:e}),t||!a||s||n(Object(c.d)(o,!0))}},f=()=>e=>{e({type:i.n})},p=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n)=>{const{bot:o,chatbubble:{currentLanguage:a,botKey:s,optionsScreenOpen:u},connection:{token:d},feedback:{feedbackFormOpen:f},messages:{chatMessages:p},agent:{hasHadHandover:h}}=n(),m=o.noFeedbackAfterHandover&&h;u&&t({type:i.q}),!e&&l(o,a)&&!f&&p&&!m&&p.length>1&&setTimeout(()=>t({type:i.L,token:d}),o.fullscreenMode?0:1500),t(Object(c.d)(s,e));try{Object(r.disconnect)()}catch(e){console.error(e)}}},h=()=>e=>{e({type:i.N})},m=()=>(e,t)=>{const{optionsScreenOpen:n}=t().chatbubble;n&&e({type:i.q})},g=()=>(e,t)=>{const{agent:{takenOver:n},connection:{token:r},environment:{PAT_HOST:a},chatbubble:{chatHasStarted:s,hasRequestedGreeting:l},local:{labels:u}}=t();s||e({type:i.Y,chatHasStarted:!0}),!l&&!n&&(null==u?void 0:u.length)>0&&(e({type:i.bb,hasRequestedGreeting:!0}),e(Object(c.f)({method:"post",url:`${a}/chatbubble/${o.j}/manual_greet/`,...Object(c.a)({token:r})})))},b=()=>(e,t)=>{const{token:n,feedbackFormOpen:r}=t().feedback;(n||r)&&e({type:i.o}),e(g())},v=()=>(e,t)=>{const{pushMessages:n,alerts:r,bot:a,nudge:s}=t();n.show&&e({type:i.B}),s.show&&e({type:i.A}),(r.showTabNotification||r.showBubbleNotification)&&e({type:i.z}),e({type:i.K}),a.welcomePage&&a.welcomePageType!==o.s.NONE||e(g())},y=()=>(e,t)=>{const{active:n,previouslyPoppedUp:r}=t().chatbubble;n||r||(e(v()),e({type:i.Q}))},w=()=>e=>{e({type:i.jb,userIsIdle:!0}),Object(a.b)()},x=e=>(t,n)=>{const{userIsIdle:r}=n().chatbubble;r&&(t({type:i.jb,userIsIdle:!1}),Object(a.a)(e))},E=e=>(t,n)=>{var r,o;const{chatbubble:{contactDetailsButton:a}}=n();(null==a||null===(r=a.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:i.D}):t({type:i.lb,button:e})},O=e=>t=>{t({type:i.f,button:e})},k=e=>t=>{0===e.length?t({type:i.k}):t({type:i.X,files:e})},_=()=>e=>{e({type:i.g})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d}));var r=n(1),o=n(6),a=n(40);const i=r.c.label.withConfig({displayName:"styles__CheckboxContainer",componentId:"sc-1ot9z69-0"})(["cursor:pointer;display:flex;justify-content:center;align-items:center;"]),s=r.c.svg.withConfig({displayName:"styles__CheckboxIcon",componentId:"sc-1ot9z69-1"})(["fill:none;stroke:white;stroke-width:2px;"]),c=r.c.div.withConfig({displayName:"styles__StyledCheckbox",componentId:"sc-1ot9z69-2"})(["display:inline-block;width:16px;height:16px;border-radius:3px;background:",";",";","{visibility:hidden;}left:0;position:absolute;"],e=>{let{theme:{buttonBackground:t}}=e;return t},e=>{let{theme:{buttonBackground:t}}=e;return Object(a.b)(t)?"filter: brightness(0.7);":"filter: opacity(0.3);"},s),l=r.c.input.attrs({type:"checkbox"}).withConfig({displayName:"styles__HiddenCheckbox",componentId:"sc-1ot9z69-3"})(["height:16px;width:16px;opacity:0;margin:0;left:0;position:absolute;&:checked ~ ","{background:",";filter:opacity(1);","{visibility:visible;}animation:"," 150ms ease;}"],c,e=>{let{theme:{buttonBackground:t}}=e;return t},s,e=>{let{theme:{buttonBackground:t}}=e;return(e=>Object(r.d)(["50%{box-shadow:0 0 0 3px ",";}"],e))(t)}),u=r.c.div.withConfig({displayName:"styles__CheckboxLabel",componentId:"sc-1ot9z69-4"})(["font-size:",";font-weight:400;margin:0 28px;"],o.d.fontSizeP),d=r.c.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-1ot9z69-5"})(["margin-top:12px;display:flex;flex-direction:row;"])},function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"c",(function(){return g})),n.d(t,"d",(function(){return b.a})),n.d(t,"b",(function(){return v.a}));var r=n(67),o=(n(4),n(0)),a=n.n(o),i=n(36),s=n(1),c=n(6);const l=s.c.div.withConfig({displayName:"styles__MaxLengthWrapper",componentId:"sc-bl0zra-0"})(["position:absolute;top:50%;transform:translateY(-50%);right:8px;font-size:",";color:",";"],c.d.fontSize12,c.h.textColorLight);var u=function(e){let{fieldName:t,maxLength:n,control:r}=e;const o=Object(i.d)({control:r,name:t});return a.a.createElement(l,null,`${o.length}/${n}`)},d=n(106),f=n(48);const p=s.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cahfhf-0"})(["position:relative;display:flex;"]),h=s.c.input.withConfig({displayName:"styles__Input",componentId:"sc-1cahfhf-1"})(["background-color:",";color:",";padding:",";border-radius:18px;border:1px solid transparent;outline:none;flex:1;&::placeholder{opacity:0.42;}&:invalid{border:1px solid ",";}"],e=>{let{theme:t}=e;return t.inputBackground},e=>{let{theme:t}=e;return t.inputText},e=>{let{hasRightAdornment:t}=e;return t?"10px 56px 10px 16px":"10px 16px"},c.a.errorColor);function m(e){var t,n,r;let{autoComplete:i,name:s,type:c,register:l,validators:m,control:g,id:b,setError:v,clearErrors:y,trigger:w,...x}=e;const E=Object(f.c)(m),O=Object(o.useRef)(null),{ref:k,..._}=l?l(s,E):{};return a.a.createElement(a.a.Fragment,null,a.a.createElement(p,null,a.a.createElement(h,Object.assign({autoComplete:i,name:s,type:c,hasRightAdornment:null===(t=E.maxLength)||void 0===t?void 0:t.value,id:b||`input__${c}_${s}`},Object(f.b)(E),_&&{..._},{ref:e=>{O.current=e,k&&k(e)}},x)),!(null===(n=E.maxLength)||void 0===n||!n.value)&&g&&s&&a.a.createElement(u,{fieldName:s,control:g,maxLength:null===(r=E.maxLength)||void 0===r?void 0:r.value})),a.a.createElement(d.a,{inputRef:O,trigger:w,control:g,name:s,setError:v,clearErrors:y}))}m.defaultProps={register:null,autoComplete:"off",id:null,validators:null,type:"text"};var g=m,b=n(95),v=n(94)},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(122);o.a.shape({message:o.a.string,from_bot:o.a.bool,image_carousel:o.a.arrayOf(o.a.object),thon_image_above_text:o.a.bool,exchange_type:o.a.string,exchange_id:o.a.string,avatar:o.a.string,sender:o.a.oneOf(Object.values(a.l)),skill_subscription_id:o.a.number,bot_id:o.a.number,score:o.a.number,title:o.a.string,reply_candidates:i.a,is_followup:o.a.bool,handler:o.a.oneOf(Object.values(a.f)),corrected_message:o.a.string,new_context:o.a.objectOf(o.a.string)})},function(e,t,n){e.exports=n(178)},function(e,t,n){"use strict";var r=n(240);t.a=e=>"number"==typeof e?new Date(e):Object(r.a)(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return s}));var r=n(123),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function i(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var c=e,l=t,u=[],d=u,f=!1;function p(){d===u&&(d=u.slice())}function h(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,p();var n=d.indexOf(e);d.splice(n,1),u=null}}}function g(e){if(!i(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,l=c(l,e)}finally{f=!1}for(var t=u=d,n=0;n<t.length;n++){(0,t[n])()}return e}function b(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");c=e,g({type:a.REPLACE})}function v(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(h())}return n(),{unsubscribe:t(n)}}})[r.a]=function(){return this},e}return g({type:a.INIT}),(o={dispatch:g,subscribe:m,getState:h,replaceReducer:b})[r.a]=v,o}function c(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function l(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},a=0;a<s.length;a++){var l=s[a],u=n[l],d=e[l],f=u(d,t);if(void 0===f){var p=c(l,t);throw new Error(p)}o[l]=f,r=r||f!==d}return(r=r||s.length!==Object.keys(e).length)?o:e}}function u(e,t){return function(){return t(e.apply(this,arguments))}}function d(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=u(o,t))}return n}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(o)}));return h({},n,{dispatch:r=m.apply(void 0,a)(n.dispatch)})}}}},function(e,t,n){var r=n(29);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){var r=n(63),o=n(113),a=n(90);e.exports=r?function(e,t,n){return o.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(50);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(61);e.exports=function(e){if(r(e))return e;throw TypeError(String(e)+" is not an object")}},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(83);t.a=o.a.shape(Object(i.a)(e=>({[e]:o.a.func}),Object.values(a.b)))},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(18),o=n(5),a=n(2),i=n(30),s=n(9);const c=()=>(e,t)=>{const{connected:n}=t().connection;n||e({type:a.r})},l=()=>(e,t)=>{const{connected:n}=t().connection;n&&e({type:a.w})},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=JSON.parse(window.localStorage.getItem("pusherTransportEncrypted"));t.indexOf("ws")<0&&n&&"ws"!==n.transport&&window.localStorage.removeItem("pusherTransportEncrypted"),Object(r.startConfiguration)({auth:{...Object(s.a)({token:e},{withVersion:!0})},disabledTransports:t}),Object(s.e)(e)},d=function(){let{triggerDialogueSlug:e,languageCode:t,shouldGreet:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(c,l)=>{const{local:{context:d,labels:f},chatbubble:{botKey:p,currentLanguage:h,disabledTransports:m},environment:{PAT_HOST:g,VERSION:b},bot:{includeDisabledLanguages:v}}=l();c({type:a.bb,hasRequestedGreeting:n});const y={context:d,labels:f.join(","),language_code:t||h,trigger_dialogue_slug:e,include_disabled_languages:v,should_greet:n,version:b},w=await c(Object(s.f)({method:"post",url:`${g}/chatbubble/${o.j}/connect`,params:y,...Object(s.a)({botKey:p},{withCurrentUrl:!0})}));if(!w)return;const{pusherConnected:x}=l().connection;if(x)try{Object(r.disconnect)()}catch(e){console.warn(e)}const{token:E,chat_id:O,created:k,all_greetings_hide_input:_}=w.data;c({type:a.J,token:E}),c({type:a.H,chatId:O,allGreetingsHideInput:_}),c({type:a.ib,startedAt:k}),c(Object(s.c)((new Date).toISOString())),u(E,m),c(Object(i.a)())}},f=e=>t=>t({type:a.s,triggerConfig:e})},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(22),i=n(55);function s(e){let{name:t,label:n,register:r,id:s,...c}=e;return o.a.createElement(i.a,{htmlFor:s||t&&`${a.a.CHECKBOX}_${t}`},o.a.createElement(i.e,Object.assign({name:t,type:a.a.CHECKBOX,id:s||t&&`${a.a.CHECKBOX}_${t}`},r&&{...r(t)},c)),o.a.createElement(i.f,null,o.a.createElement(i.b,{viewBox:"0 0 24 24"},o.a.createElement("polyline",{points:"20 6 9 17 4 12"}))),n&&o.a.createElement(i.c,null,n))}s.defaultProps={register:null,id:null},t.a=s},function(e,t,n){"use strict";n.d(t,"c",(function(){return y})),n.d(t,"b",(function(){return w})),n.d(t,"f",(function(){return x})),n.d(t,"h",(function(){return E})),n.d(t,"d",(function(){return _})),n.d(t,"i",(function(){return C})),n.d(t,"a",(function(){return I})),n.d(t,"e",(function(){return A})),n.d(t,"g",(function(){return P}));var r=n(239),o=n(22),a=n(5),i=n(17),s=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,o]=n;return{...e,...Object(i.a)(r,t)?{}:{[r]:o}}},{})}},c=function(){let{status:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!(e>=200&&e<=299)},l=n(46),u=n(2),d=n(93),f=n(30),p=n(54),h=n(66),m=n(75),g=n(9),b=n(42);const v=e=>{const{PAT_HOST:t}=e().environment,{local:n,chatbubble:{botKey:r},connection:{token:o},messages:{forms:a}}=e();return{token:o,PAT_HOST:t,botKey:r,local:n,forms:a}},y=(e,t,n)=>(r,o)=>{const{botKey:a}=v(o);r(Object(g.d)(a,!0)),localStorage.setItem("kindly-chat-restart-message",JSON.stringify({message:e,exchangeId:t,newContext:n}))},w=(e,t)=>async(n,r)=>{const{PAT_HOST:o,token:i}=v(r),s=await n(Object(f.b)()),{headers:l}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:s}),d={message:e,temporaryId:t},p=await n(Object(g.f)({method:"post",url:`${o}/chatbubble/${a.j}/message/`,data:d,headers:l},{onError:e=>{var r;n({type:u.Bb,temporaryId:t,status:null==e||null===(r=e.response)||void 0===r?void 0:r.status})}}));c(p)||(n({type:u.Bb,...p.data}),n(Object(b.e)()))},x=e=>t=>{t({type:u.ab,formData:e})},E=function(e,t,n){let{responsePromise:i,tempId:s}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4?arguments[4]:void 0;return async(d,p)=>{const{PAT_HOST:h,token:m,local:y,forms:w}=v(p),E=await d(Object(f.b)()),{headers:O}=Object(g.a)({token:m},{withCurrentUrl:!0,extra:E});w&&Object.values(w).forEach(e=>{if((null==e?void 0:e.formSubmitState)===o.b.ACTIVE){const t={submission_id:e.formSubmissionId,context:e.formValue,state:o.b.UNANSWERED};d(Object(g.f)({method:"post",url:`${h}/chatbubble/${a.j}/form/submit`,data:t,headers:O})),d(x({...e,formSubmitState:o.b.UNANSWERED}))}});const k=s||Object(r.a)();d({type:u.I,data:{id:k,created:(new Date).toISOString(),message:e,buttonType:l}}),d(Object(g.c)((new Date).toISOString()));const _={message:e,exchange_id:t,temporaryId:k,new_context:{...y.context,...n||{}}},C=i?await i:await d(Object(g.f)({method:"post",url:`${h}/chatbubble/${a.j}/message/`,data:_,headers:O},{onError:e=>{var t;console.error(`/chatbubble/${a.j}/message returned ${e.response.status}`),d({type:u.Bb,temporaryId:k,status:null==e||null===(t=e.response)||void 0===t?void 0:t.status}),d({type:u.i,isTyping:!1})}}));c(C)||(d({type:u.Bb,...C.data}),d(Object(b.e)()))}},O=e=>({...e,temporaryId:Object(r.a)()}),k=e=>{let{temporaryId:t}=e;return t},_=()=>async(e,t)=>{var n;const{bot:{id:o},chatbubble:{chatId:i,attachments:l},connection:{token:d},environment:{PAT_HOST:p}}=t(),h=await e(Object(f.b)()),{headers:m}=Object(g.a)({token:d},{extra:h}),b=Object(r.a)(),v=l.files.map(O).map(s("file"));e({type:u.G,data:{attachments:v}}),e({type:u.k}),e({type:u.I,data:{id:b,created:(new Date).toISOString(),attachment_ids:v.map(k),message:""}}),e(Object(g.c)((new Date).toISOString()));const y=(t,n)=>{var r;e({type:u.Bb,temporaryId:b,status:null==t||null===(r=t.response)||void 0===r?void 0:r.status}),n?e({type:u.Ab,attachment:{...n,status:a.a.ERROR}}):v.forEach(t=>e({type:u.Ab,attachment:{...t,status:a.a.ERROR}}))},w=v.map(s("file","url")),x=`${p}/chatbubble/${a.j}/attachment/create`,E={attachments:w,temporaryChatMessageId:b},_=await e(Object(g.f)({method:"post",url:x,data:E,headers:m},{onError:e=>y(e)}));if(c(_)||!Array.isArray(null==_||null===(n=_.data)||void 0===n?void 0:n.attachments))return;const[C,j]=_.data.attachments.reduce((t,n)=>{let[r,o]=t,{id:a,temporary_id:i,upload_url:s}=n;return e({type:u.Ab,attachment:{temporaryId:i,id:a}}),[[...r,a],[...o,s]]},[[],[]]),T={"x-goog-upload-bot-id":o,"x-goog-upload-chat-id":i},S=(I=l.files,A=j,"number"!=typeof(null==I?void 0:I.length)||I.length!==(null==A?void 0:A.length)?(console.error("Trying to zip non-array of arrays of unequal length"),[]):I.map((e,t)=>[e,A[t]])).map(async t=>{let[{file:n,...r},o]=t;const a=await(e=>new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onabort=()=>n(new Error(r.error))}))(n),i={...T,"Content-Type":n.type};return await e(Object(g.f)({method:"put",url:o,data:a,headers:i},{onError:e=>y(e,r)}))});var I,A;if((await Promise.all(S)).some(c))return;const N=`${p}/chatbubble/${a.j}/attachment/uploads-complete`,P={attachmentIds:C,temporaryChatMessageId:b,exchangeId:l.exchangeId};e(Object(g.c)((new Date).toISOString())),e(Object(g.f)({method:"post",url:N,data:P,headers:m},{onError:e=>y(e)}))},C=function(e){let{openChat:t,languageCode:n,tempId:o,responsePromise:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async(s,l)=>{const{connection:{token:d},chatbubble:{currentLanguage:f}}=l(),{PAT_HOST:m}=l().environment;if(!d){const r={triggerDialogueSlug:e,languageCode:n,openChat:t};return s(Object(h.c)(r)),s(Object(p.g)()),void(t&&s(Object(p.k)()))}if(n&&n!==f){const e="Tried to trigger a dialogue in another language on an existing chat";s(Object(g.b)({message:e,level:"error",extra:{languageCode:n,currentLanguage:f}}))}const v=o||Object(r.a)();s({type:u.yb,data:{id:v,created:(new Date).toISOString(),exchangeId:e}}),s(Object(g.c)((new Date).toISOString()));const y={exchange_id:e,temporaryId:v},{headers:w}=Object(g.a)({token:d},{withCurrentUrl:!0}),x=i?await i:await s(Object(g.f)({method:"post",url:`${m}/chatbubble/${a.j}/trigger/`,data:y,headers:w}));c(x)||(t&&s(Object(p.k)()),s(Object(b.e)()))}},j=(e,t)=>!!t.find(t=>{let{buttons:n=[]}=t;return!!n.find(t=>{let{language_code:n,button_type:r}=t;return n===e&&Object(l.a)(r)===a.b.HANDOVER_REQUEST})}),T=(e,t)=>n=>{n({type:u.j,buttonClick:{chatMessageId:e.id,buttonId:t.id,time:(new Date).toISOString()}})},S=(e,t,n)=>async(r,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=o(),l=await r(Object(f.b)()),{headers:u}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:l}),d={button:t,chatMessage:e,temporaryId:n,version:c},p=(null==(h=t.button_type)?void 0:h.toLowerCase())===a.b.PRIVACY_EXPORT.toLowerCase()?Object(m.c)():{};var h;return r(Object(g.f)({method:"post",url:`${s}/chatbubble/${a.j}/button/click/`,data:d,headers:u,...p}))},I=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(i,s)=>{const{environment:{VERSION:c},messages:{chatMessages:f},chatbubble:{currentLanguage:h},local:b}=s(),v=Object(l.a)(e.button_type),y=Object(r.a)(),w={};o.length>0&&o.forEach(e=>{var r,o,s;if(e.button_type===a.b.SLIDER.toLowerCase()&&null!==(r=e.slider_details)&&void 0!==r&&r.value)w[null===(o=e.label)||void 0===o?void 0:o.toLowerCase()]=null===(s=e.slider_details)||void 0===s?void 0:s.value,i(T(i,t));else if(e.button_type===a.b.CHECKBOX.toLowerCase()){n.find(t=>t.id===e.id)?(w[e.value]=e.value,i(T(t,e)),i(S(t,e,y))):w[e.value]=""}else w[e.value]=""});const x=i(S(t,{...e,new_context:{...b.context,...w||{}}},y));switch(i({type:u.j,buttonClick:{chatMessageId:t.id,buttonId:e.id||e._id,time:(new Date).toISOString()}}),v){case a.b.QUICK_REPLY:{const n={responsePromise:x,tempId:y};i(E(e.value,t.exchange_id,e.new_context,n,e.button_type));break}case a.b.HANDOVER_REQUEST:if(!j(h,f)){const e={version:c};i(Object(g.b)({message:"Requested handover with no button",level:"error",extra:e}))}i(Object(d.b)(x));break;case a.b.DIALOGUE_TRIGGER:case a.b.SUGGESTION_DIALOGUE_TRIGGER:i(C(e.value,{tempId:y,responsePromise:x}));break;case a.b.PRIVACY_EXPORT:i(Object(m.b)({responsePromise:x}));break;case a.b.PRIVACY_DELETE:i(Object(m.a)({responsePromise:x}));break;case a.b.CONTACT_DETAILS:i(Object(p.p)(e));break;case a.b.UPLOAD_ATTACHMENT:i(Object(p.a)(e))}}},A=(e,t)=>async(n,o)=>{const{connection:{token:i},environment:{PAT_HOST:s,VERSION:l}}=o(),d=Object(r.a)(),p=e.contact_details.contact_type,h={...e,button_type:a.b.edit_contact_details};n({type:u.I,data:{id:d,created:(new Date).toISOString(),message:t,buttons:[h],isContactDetails:!0}});const m=await n(Object(f.b)()),{headers:b}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:m}),v={contactType:p,value:t,version:l,buttons:[h],temporaryId:d},y=await n(Object(g.f)({method:"post",url:`${s}/chatbubble/${a.j}/button/contact-details/`,data:v,headers:b}));c(y)||n({type:u.Bb,...y.data})},N=((e,t,n)=>{let r,o=[];return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n&&o.push(i),clearTimeout(r),r=setTimeout(()=>{n||e(...i);const t=o.slice(1).reduce((e,t)=>n(t,e),o[0]);e(...t),o=[]},t)}})(async(e,t,n)=>{let{id:r,index:o}=e;const{connection:{token:i},environment:{PAT_HOST:s,VERSION:c}}=n(),l=await t(Object(f.b)()),{headers:d}=Object(g.a)({token:i},{withCurrentUrl:!0,extra:l}),p={chatMessageId:r,version:c};t({type:u.fb,id:r,index:o}),t(Object(g.f)({method:"patch",url:`${s}/chatbubble/${a.j}/message-seen`,data:p,headers:d}))},1500,(e,t)=>{const[{index:n}]=e,[{index:r}]=t;return n>r?e:t}),P=(e,t)=>(n,r)=>N({id:e,index:t},n,r)},function(e,t,n){"use strict";e.exports=n(176)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));const r=["load","message"],o="See https://docs.kindly.ai/api/chat#handlers for how to switch.";const a=(e,t,n,a)=>{var i,s;if(-1!==r.indexOf(e)&&Boolean(a)&&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 a=Object.values(n);try{e(...a)}catch(e){console.error(e)}}(a,e,t),"API"!==n)return;if(null===(i=window)||void 0===i||null===(s=i.kindlyChat)||void 0===s||!s.APIRoot)return void console.warn("No APIRoot when rendered using kindly-chat API");"message"===e&&window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("onMessage",{detail:t}));const c=`kindly:${e}`;window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent(c,{detail:t,bubbles:!0}))};function i(e,t,n,r){e&&a("message",{newMessage:e,chatLog:t},r,n)}let s=!1;function c(e){!1===s&&(s=!0,a("load",{settings:e},null==e?void 0:e.renderedBy,null==e?void 0:e.onLoad))}const l=(e,t,n,r,a,i,s)=>{let c=!1;const l=null==e?void 0:e[n];if(l){console.warn(`kindlyOptions.buttonHandlers is deprecated in favor of standard event handlers. ${o}`);try{c=Boolean(l(t,r,a,i,n))}catch(e){console.error(e)}}return"API"===s&&(c=!window.kindlyChat.APIRoot.dispatchEvent(new CustomEvent("kindly:buttonclick",{detail:{button:r,lastMessage:a,chatLog:i,buttonType:n},bubbles:!0,cancelable:!0}))),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(17),o=n(2);const a={TAKEOVER:"takeover",MESSAGE:"message"},i=e=>(t,n)=>{const{dismissedMessages:i}=n().pushMessages,{autopopupTime:s,enabled:c,title:l,message:u}=e;if(!c||Object(r.a)(l,i))return;const d={type:o.pb,pushMessageTitle:l,pushMessageType:a.MESSAGE,pushMessageText:u};s&&0!==s?setTimeout(()=>t(d),s):t(d)},s=()=>(e,t)=>{const{show:n}=t().pushMessages;n&&e({type:o.B})}},function(e,t,n){"use strict";var r=n(0);t.a=(e,t)=>{const n=Object(r.useRef)();return Object(r.useCallback)(r=>{new Date-n.current<t||(e(r),n.current=new Date)},[t,e])}},function(e,t,n){"use strict";t.a=e=>{const t=(null!=e?e:"").toLowerCase();return"external_link"===t?"link":"handover_request"===t?"takeover_request":t}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(3),i=n(70),s=n(10),c=e=>{let{styles:t={},...n}=e;return o.a.createElement("svg",Object.assign({viewBox:"0 0 1792 1792",xmlns:"https://www.w3.org/2000/svg"},n),o.a.createElement("path",{d:"M1408 928v320q0 119-84.5 203.5T1120 1536H288q-119 0-203.5-84.5T0 1248V416q0-119 84.5-203.5T288 128h704q14 0 23 9t9 23v64q0 14-9 23t-23 9H288q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113V928q0-14 9-23t23-9h64q14 0 23 9t9 23zm384-864v512q0 26-19 45t-45 19-45-19l-176-176-652 652q-10 10-23 10t-23-10L695 983q-10-10-10-23t10-23l652-652-176-176q-19-19-19-45t19-45 45-19h512q26 0 45 19t19 45z",fill:"#fff"}))},l=n(5),u=n(72),d=(n(121),n(57),n(8)),f=n(7),p=n(104),h=n(79),m=n(17),g=n(46),b=n(21),v=n(67),y=n(95);const w=n(1).c.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"sc-sn3ww8-0"})(["width:100%;position:relative;"]),{EXTERNAL_LINK:x,EMAIL:E,PHONE:O,CHECKBOX:k,SLIDER:_}=l.b;function C(e){let{button:t,setCheckboxValue:n,checked:l,chatMessage:C,disabled:j=!1,handlers:T=null,hasSuggestion:S=!1,isNudge:I=!1,onClick:A=null,submitButtonsList:N}=e;const P=Object(a.c)(),M=Object(g.a)(t.button_type),{chatMessages:L,buttonClicks:R}=Object(a.d)(f.n)||[],D=Object(a.d)(f.e)||[],B=Object(m.a)(M,[x,O,E]),F=Object(m.a)(M,[k]),z=Object(m.a)(M,[_]),U=Boolean(l.find(e=>e.id===t.id)),H=Object(r.useRef)(N);let $="";M===O&&($="tel:"),M===E&&($="mailto:");const V=e=>{const n=parseFloat(e);var r;n&&Array.isArray(H.current)&&(null===(r=H.current)||void 0===r||r.map(e=>e.id===t.id?(e.slider_details.value=n,e):e))},q=Object(r.useCallback)(e=>{if(e.preventDefault(),Object(i.a)(e,T,M,Object(p.a)(t),Object(h.a)(C||{}),L.map(h.a),null==D?void 0:D.renderedBy))return;"function"==typeof A&&A(),P(Object(d.g)(t,C,l,H.current));const{href:n,target:r}=e.target;if(n){const e=Boolean(r);setTimeout(()=>{e?window.open(n,r):window.location.href=n},250)}},[M,C,L,t,P,T,l,H,A,null==D?void 0:D.renderedBy]),G=Object(u.a)(q,3e3),W=(null!=R?R:[]).find(e=>{let{chatMessageId:n,buttonId:r}=e;return n===(null==C?void 0:C.id)&&r===t.id}),Y=Object(r.useCallback)(()=>{n(t)},[t,n]);return Object(r.useEffect)(()=>{W&&F&&!U&&n(t)},[W,F,t,n,U]),z&&null!=t&&t.slider_details?o.a.createElement("div",null,o.a.createElement(y.a,{name:`slider_${t.id}`,onChange:V,from:t.slider_details.from_value,to:t.slider_details.to_value,value:t.slider_details.value,step:t.slider_details.step_value,affix:t.slider_details.affix,affixValue:t.slider_details.affix_value,ariaLabel:t.label})):o.a.createElement(b.b,Object.assign({truncateText:S,cy:"message-button",color:!F,type:"button"},B&&{href:`${$}${M===x?(K=t.value,K.match(/^https?:\/\//i)?K:`http://${K}`):t.value}`},B&&{target:`${M!==x||I?"_self":"_blank"}`},F&&{style:{backgroundColor:"transparent",background:"transparent"},role:"checkbox","aria-label":t.label,"aria-checked":U?"true":"false"},{icon:M===x&&I&&o.a.createElement(s.b,{fill:"#FFF",width:10,height:16})||M===x&&!I&&o.a.createElement(c,{width:14,height:14}),disabled:j,onClick:e=>{F?Y():G(e)},hasBeenClicked:W}),F&&o.a.createElement(w,null,o.a.createElement(v.a,{disabled:!0,"aria-disabled":!0,name:`checkbox-${t.id}`,checked:U,label:t.label})),F?"":t.label);var K}C.defaultProps={checked:[]};t.a=C},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(159),o=n.n(r),a=n(5);function i(e){if(!e)return null;const t=e.match(/filename="(.+)"/);return t&&2===t.length?t[1]:null}var s=n(2),c=n(9);const l=()=>({transformResponse:e=>e,responseType:"text"}),u=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)=>{var s;let u=e?await e:null;if(!u){const{connection:{token:e},environment:{PAT_HOST:o}}=r(),i=`${o}/chatbubble/${a.j}/privacy/export/${t}`,{headers:s}=Object(c.a)({token:e}),d=l();u=await n(Object(c.f)({method:"get",url:i,...d,headers:s}))}if(200!==(null===(s=u)||void 0===s?void 0:s.status))return;const{headers:d,data:f}=u,p=i(d["content-disposition"])||"export.json",h=new Blob([f],{type:d["content-type"]});o()(h,p)}},d=function(){let{responsePromise:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{connection:{token:r},chatbubble:{botKey:o},environment:{PAT_HOST:i}}=n(),l=`${i}/chatbubble/${a.j}/privacy/delete/`,u=e?await e:await t(Object(c.f)({method:"delete",url:l,...Object(c.a)({token:r})}));200===(null==u?void 0:u.status)&&(setTimeout(()=>t(Object(c.d)(o)),5e3),t({type:s.v}),t({type:s.V}))}}},function(e,t,n){"use strict";var r=n(69),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<i.length;++g){var b=i[g];if(!(a[b]||r&&r[b]||m&&m[b]||s&&s[b])){var v=f(n,b);try{l(t,b,v)}catch(e){}}}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(158);let o,a;const i=e=>(t,n)=>{const{SAGE_WS_HOST:i}=n().environment;if(!o||!o.isConnected())try{o=new r.Socket(`${i}/chatbubble/socket`),o.connect()}catch(e){console.warn("Could not connect to sage socket",e)}try{a=o.channel(`chatbubble_active:${e}`),a.join()}catch(e){console.warn("Could not join active channel",e)}},s=()=>{if(o&&a)try{a.leave()}catch(e){console.warn("Could not leave active channel",e)}if(o)try{o.disconnect()}catch(e){console.warn("Could not disconnect from sage socket",e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="SET_NEW_CONTEXT",o="SET_NEW_LABEL"},function(e,t,n){"use strict";var r=n(104);t.a=e=>{let{buttons:t=[],...n}=e;return{...n,buttons:t.map(r.a)}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(1),o=n(6);const a=r.c.div.withConfig({displayName:"styles__FormWrapper",componentId:"sc-147n8gc-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;"]),i=r.c.form.withConfig({displayName:"styles__Form",componentId:"sc-147n8gc-1"})(["display:flex;flex-direction:column;flex:1;",""],e=>{let{isSubmitted:t}=e;return t?`*:invalid {\n border: 1px solid ${o.a.errorColor};\n }`:"*:invalid {\n border: 1px solid transparent;\n }"}),s=r.c.div.withConfig({displayName:"styles__FormTitle",componentId:"sc-147n8gc-2"})(["font-size:",";font-weight:500;display:flex;align-items:center;& > svg{margin-right:4px;}"],o.d.fontSizeP),c=r.c.div.withConfig({displayName:"styles__FormActionsWrapper",componentId:"sc-147n8gc-3"})(["display:flex;flex-direction:row;align-self:flex-end;justify-content:flex-end;margin-top:36px;& > button{&:last-child{margin-left:12px;}}"])},function(e,t){e.exports={}},function(e,t,n){var r=n(120),o=n(29),a=n(135),i=n(38)("toStringTag"),s="Arguments"==a(function(){return arguments}());e.exports=r?a: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=Object(e),i))?n:s?a(t):"Object"==(r=a(t))&&o(t.callee)?"Arguments":r}},function(e,t,n){"use strict";t.a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((t,n)=>({...t,...e(n)}),{})}},function(e,t,n){"use strict";t.a=()=>{}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var c,l=[],u=!1,d=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.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 h(e,t)),1!==l.length||u||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(204),o=n(136);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(114),o=n(37),a=n(29),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(62);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="v2",o=Object.freeze(["agent","alerts","bot","chatbubble","feedback","privacy","websocketFallback","lightbox","nudge"])},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(5),o=n(2),a=n(9),i=n(42);const s=e=>async t=>{const n=await e;200===(null==n?void 0:n.status)&&(t({type:o.wb,...n.data,requestedTakeover:!0}),t(Object(i.e)()))},c=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/takeover_cancel/`,...Object(a.a)({token:n})})),e({type:o.vb})},l=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Db}),e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/user_started_typing/`,...Object(a.a)({token:n})}))},u=()=>(e,t)=>{const{connection:{token:n},environment:{PAT_HOST:i}}=t();e({type:o.Eb}),e(Object(a.f)({method:"post",url:`${i}/chatbubble/${r.j}/user_stopped_typing/`,...Object(a.a)({token:n})}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(36),i=n(106),s=n(67),c=n(55);t.a=function(e){let{name:t,control:n,list:l,validators:u,formId:d,register:f,setError:p,clearErrors:h}=e;const m=Object(a.d)({control:n,name:l.map(e=>e.slug)}),g=Object(a.c)({control:n,name:l.map(e=>e.slug)});return Object(r.useEffect)(()=>{if(u)for(let e=0;e<u.length;e+=1){Object.keys(u[e]).forEach(n=>{var r;"texts"!==n&&(n&&(m.some(e=>!!e)?h(t):p(t,{type:n,message:g.isDirty||g.isSubmitted?null===(r=u[e].texts)||void 0===r?void 0:r.text:""})))})}},[m,u,p,h,d,l,t,g]),o.a.createElement(o.a.Fragment,null,l.map(e=>{var t;return o.a.createElement(c.d,{key:`${e.slug}_${e.order}`},o.a.createElement(s.a,{register:f,value:e.value,label:null===(t=e.texts)||void 0===t?void 0:t.label,name:e.slug}))}).sort(e=>e.order),o.a.createElement(i.a,{name:t,control:n}))}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(5),i=n(1);const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace("#","");3===n.length&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t/=100),`rgba(${r},${o},${a},${t})`},c=i.c.div.withConfig({displayName:"styles__SliderWrapper",componentId:"sc-1isvbdy-0"})(["margin:6px 0;display:flex;flex-direction:column;position:relative;padding:12px 12px 16px 12px;width:100%;border-radius:6px;border:",";"],e=>{let{theme:t}=e;return`1px solid ${t.botMessageBackground}`}),l=i.c.div.withConfig({displayName:"styles__SliderAffix",componentId:"sc-1isvbdy-1"})(["padding:0px 8px;font-size:14px;"]),u=i.c.div.withConfig({displayName:"styles__SliderInfoContainer",componentId:"sc-1isvbdy-2"})(["position:relative;flex:1;display:flex;align-items:center;flex-direction:row;margin-bottom:28px;"]),d=i.c.span.withConfig({displayName:"styles__SliderInfo",componentId:"sc-1isvbdy-3"})(["display:flex;padding:4px;align-items:center;justify-content:center;font-size:14px;"]),f=i.c.div.withConfig({displayName:"styles__SliderContainer",componentId:"sc-1isvbdy-4"})(["position:relative;display:flex;flex:1;"]),p=Object(i.b)(["height:20px;width:20px;border-radius:50%;background:",";cursor:pointer;appearance:none;margin-top:-8px;border:1px solid ",";"],e=>{let{theme:t}=e;return t.buttonBackground},e=>{let{theme:t}=e;return t.buttonText}),h=(e,t,n)=>(e-n)/(t-n)*100,m=i.c.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} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} ${h(n,r,o)}%, ${s(t.buttonBackground,.4)} 100%)`}}}).withConfig({displayName:"styles__Slider",componentId:"sc-1isvbdy-5"})(["cursor:pointer;&[type='range']{appearance:none;width:100%;border-radius:25px;height:6px;&::-webkit-slider-thumb{","}&::-moz-range-thumb{","}&::-webkit-slider-runnable-track{width:100%;height:6px;cursor:pointer;border-radius:25px;}}"],p,p);function g(e){let{from:t,to:n,value:i,affix:s,affixValue:p,step:h=1,onChange:g,name:b,field:v,ariaLabel:y}=e;const[w,x]=Object(r.useState)(((e,t,n)=>t<e?e+n:t)(h,i,t));return o.a.createElement(c,null,o.a.createElement(u,null,s===a.n.PREFIX&&o.a.createElement(l,null,p),o.a.createElement(d,null,w),s===a.n.SUFFIX&&o.a.createElement(l,null,p)),o.a.createElement(f,null,o.a.createElement(m,{type:"range",name:b,step:h,min:t,max:n,value:w,onChange:e=>{var t;null!=e&&null!==(t=e.target)&&void 0!==t&&t.value&&(g&&g(e.target.value),null!=v&&v.onChange&&v.onChange(e),x(e.target.value))},"aria-label":y})))}g.defaultProps={value:1};t.a=g},function(e,t,n){"use strict";var r=n(17);t.a=function(){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[o,a]=n;return{...e,...Object(r.a)(o,t)?{[o]:a}:{}}},{})}},function(e,t,n){"use strict";const r=e=>{let{buttonId:t,chatMessageId:n}=e;return`button-click-${n}-${t}`};t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>!e.find(e=>r(t)===r(e))}},function(e,t,n){"use strict";t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce((e,n)=>{var r;return{...e,[t(n)]:[...null!==(r=e[t(n)])&&void 0!==r?r:[],n]}},{})}},function(e,t,n){"use strict";t.a=e=>t=>{let{id:n,chatbubble_temporary_id:r}=t;return!e.find(e=>{let{id:t}=e;return n===t||r===t})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));let r=null;async function o(){try{if(!r){const{default:e}=await Promise.resolve().then(n.t.bind(null,237,7));r=new Audio(e)}await r.play()}catch(e){console.error("Could not play notification sound:",e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(28),o=n(20),a=n(14);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.a)(e).getTime(),i=Object(r.a)(t);return new Date(n+i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(3),a=n(7);function i(){const{nudges:e}=Object(o.d)(a.d);return Object(r.useMemo)(()=>{var t,n,r,o,a;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!==(a=null==e?void 0:e.multiple_choice_nudges)&&void 0!==a?a:[]]},[e])}},function(e,t,n){"use strict";t.a=e=>e.replace(/_\w/g,e=>e[1].toUpperCase())},function(e,t,n){"use strict";var r=n(46),o=n(73);t.a=e=>{let{button_type:t,...n}=e;return{...n,button_type:Object(o.a)(t),category:Object(r.a)(t)}}},function(e,t,n){"use strict";var r=n(0);function o(e){return e.touches||e.originalEvent.touches}let a=null;t.a=e=>{let{setIndex:t,index:n,carousel:i}=e;return{handleTouchStart:Object(r.useCallback)(e=>{const t=o(e)[0];a=t.clientX},[]),handleTouchMove:Object(r.useCallback)(e=>{if(!a)return;const r=o(e)[0].clientX;t(a-r>5?n+1:n-1,i),a=null},[i,n,t]),handleTouchEnd:Object(r.useCallback)(()=>{a=null},[])}}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(36);var i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const o=Object(r.useRef)();Object(r.useEffect)(()=>{o.current=t},[t]),Object(r.useEffect)(()=>{if(!(n&&n.addEventListener))return()=>{};const t=async e=>{await o.current(e)};return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}},[e,n])},s=n(6);function c(e){let{width:t,height:n,color:r}=e;return o.a.createElement("svg",{width:n,height:t,viewBox:"0 0 24 24",fill:"none"},o.a.createElement("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"}),o.a.createElement("path",{d:"M12 10v2",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),o.a.createElement("path",{d:"M12.5 16a.5.5 0 11-1 0 .5.5 0 011 0z",stroke:r}))}c.defaultProps={width:24,height:24,color:"#333"};var l=c;const u=n(1).c.div.withConfig({displayName:"style__FormError",componentId:"sc-13lpm2f-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;font-size:12px;margin-top:4px;right:0;left:auto;color:",";max-height:",";opacity:",";transition:max-height 1s ease,opacity 240ms ease ",";"],s.a.errorColor,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});t.a=function(e){var t,n,r;let{name:c,control:d,inputRef:f,setError:p,clearErrors:h,trigger:m}=e;const{errors:g,isSubmitted:b}=Object(a.c)({name:c,control:d});i("input",e=>{var t;null!==(t=e.target)&&void 0!==t&&t.validationMessage&&!g[c]&&p?p(`browser_error_${c}`,{type:"browser_error",message:e.target.validationMessage},{shouldFocus:!0}):h&&h(`browser_error_${c}`),b&&m&&m(c)},f.current);const v=(null===(t=g[c])||void 0===t?void 0:t.message)||(null===(n=g[`browser_error_${c}`])||void 0===n?void 0:n.message)||(null===(r=f.current)||void 0===r?void 0:r.validationMessage);return o.a.createElement(u,{show:v&&b},o.a.createElement(l,{width:16,height:16,color:s.a.errorColor}),v)}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(3),i=(n(49),n(8)),s=n(10),c=n(21),l=n(34),u=n(1),d=n(6);const f=Object(u.b)(["border-radius:100px;background-color:",";"],d.a.grayColor),p=u.c.div.withConfig({displayName:"styles__ErrorContent",componentId:"sc-1lhoync-0"})(["height:100%;width:100%;display:grid;background-color:#fff;grid-template-rows:55px 1fr 70px;"]),h=u.c.div.withConfig({displayName:"styles__ErrorHeader",componentId:"sc-1lhoync-1"})(["padding:10px 20px;display:grid;align-items:center;grid-template-columns:30px 1fr 40px;box-shadow:0px 3px 4px -1px ",";"],d.a.shadowColor),m=u.c.div.withConfig({displayName:"styles__ErrorName",componentId:"sc-1lhoync-2"})(["height:20px;width:110px;margin-left:20px;",""],f),g=u.c.div.withConfig({displayName:"styles__ErrorContainer",componentId:"sc-1lhoync-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:210px;margin:auto;"]),b=u.c.span.withConfig({displayName:"styles__ErrorText",componentId:"sc-1lhoync-4"})(["font-size:14px;margin:16px 0 24px 0;",";"],e=>e.heading&&"font-size: 19px; font-weight: 400; \n margin: 0"),v=u.c.div.withConfig({displayName:"styles__ErrorCircle",componentId:"sc-1lhoync-5"})(["height:","px;min-width:","px;",""],e=>e.size,e=>e.size,f),y=u.c.div.withConfig({displayName:"styles__ErrorComposer",componentId:"sc-1lhoync-6"})(["display:flex;align-items:center;padding:15px 0;margin:0 20px;border-top:1px solid ",";"],d.a.grayColor),w=u.c.div.withConfig({displayName:"styles__ErrorInput",componentId:"sc-1lhoync-7"})(["height:40px;width:100%;margin-right:20px;",""],f);var x=function(){const e=Object(a.c)(),t=Object(r.useCallback)(()=>{e(Object(i.w)())},[e]);return o.a.createElement(p,null,o.a.createElement(h,null,o.a.createElement(v,{size:30}),o.a.createElement(m,null),o.a.createElement(l.b,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:t,"data-cy":"close-chat-button"},o.a.createElement(s.e,{width:25,height:25}))),o.a.createElement(g,null,o.a.createElement(b,{heading:!0},"Oh no..."),o.a.createElement(b,null,"We were unable to load the chat. Please refresh or try again later."),o.a.createElement(c.b,{onClick:t,color:!0},"Refresh chat")),o.a.createElement(y,null,o.a.createElement(w,null),o.a.createElement(v,{size:40})))};class E 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(Object(i.C)({message:a,error:e,extra:s,level:"error"}))}render(){const{hasError:e}=this.state,{children:t,displayError:n}=this.props;return e&&n?o.a.createElement(x,null):e?null:t}}E.defaultProps={displayError:!0};t.a=Object(a.b)()(E)},function(e,t,n){"use strict";var r=n(28),o=n(101),a=n(14);var i=n(240),s=n(20);t.a=e=>{let{messageSentTime:t,persistStateLifespan:n}=e;if(t){if(-1===n)return!0;if(0!==n){return function(e,t){Object(a.a)(2,arguments);var n=Object(s.a)(e),r=Object(s.a)(t);return n.getTime()>r.getTime()}(function(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(o.a)(e,1e3*n)}(Object(i.a)(t),n),new Date)}}return!1}},function(e,t,n){"use strict";n(4);var r=n(0),o=n.n(r),a=n(36),i=n(56);const s=[i.c.name,i.a.name,i.d.name,a.a.name,i.b.name];var c=n(1),l=n(6);const u=c.c.div.withConfig({displayName:"styles__InputWrapper",componentId:"sc-1cfm2l6-0"})(["display:flex;flex-direction:column;margin-top:16px;position:relative;"]),d=c.c.label.withConfig({displayName:"styles__Label",componentId:"sc-1cfm2l6-1"})(["font-size:",";margin:4px 0;font-weight:500;"],l.d.fontSize12),f=c.c.div.withConfig({displayName:"styles__HelpText",componentId:"sc-1cfm2l6-2"})(["font-weight:400;line-height:16px;margin-top:4px;font-size:",";color:",";"],l.d.fontSize12,l.h.textColorLight);function p(e){var t;let{className:n,children:r,label:a,htmlFor:i,helperText:c,required:l}=e;return(null==r||!r.length||r.length>1)&&console.error(`InputWrapper is expecting one child node. Received ${r.length}`),null!=s&&s.includes(null===(t=r[0].type)||void 0===t?void 0:t.name)||console.error(`InputWrapper child can only be one of the following: ${s.join(", ")}`),o.a.createElement(u,{className:n},a&&o.a.createElement(d,{htmlFor:i},a,l?o.a.createElement(o.a.Fragment,null,"*"):""),r,c&&o.a.createElement(f,null,c))}p.defaultProps={label:null,htmlFor:null,helperText:null,required:!1};t.a=p},function(e,t,n){"use strict";n.r(t);var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.default=o},function(e,t,n){"use strict";(function(t){var r=n(32),o=n(183),a=n(128),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(c=n(129)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(i)})),e.exports=l}).call(this,n(86))},function(e,t,n){var r=n(37),o=n(208),a=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=a},function(e,t,n){var r=n(63),o=n(138),a=n(64),i=n(140),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(a(e),t=i(t),a(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports={}},function(e,t,n){var r=n(29),o=n(212);e.exports=function(e){if(r(e))return e;throw TypeError(o(e)+" is not a function")}},function(e,t,n){var r=n(145),o=n(147),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},function(e,t){e.exports={}},function(e,t,n){var r,o=n(64),a=n(219),i=n(153),s=n(117),c=n(225),l=n(139),u=n(116),d=u("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"<\/script>"},h=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?h(r):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):h(r);for(var n=i.length;n--;)delete m.prototype[i[n]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=o(e),n=new f,f.prototype=null,n[d]=e):n=m(),void 0===t?n:a(n,t)}},function(e,t,n){var r=n(120),o=n(113).f,a=n(62),i=n(44),s=n(227),c=n(38)("toStringTag");e.exports=function(e,t,n,l){if(e){var u=n?e:e.prototype;i(u,c)||o(u,c,{configurable:!0,value:t}),l&&!r&&a(u,"toString",s)}}},function(e,t,n){var r={};r[n(38)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(5),i=n(73);o.a.shape({button_type:o.a.oneOf([...Object.values(a.b),...Object.values(a.b).map(i.a)]).isRequired,is_active:o.a.bool,label:o.a.string.isRequired,value:o.a.string,new_context:o.a.object,index:o.a.number,language_code:o.a.string})},function(e,t,n){"use strict";var r=n(4),o=n.n(r);t.a=o.a.arrayOf(o.a.shape({selected:o.a.bool.isRequired,_id:o.a.string.isRequired,score:o.a.number.isRequired,sample:o.a.string.isRequired}))},function(e,t,n){"use strict";(function(e,r){var o,a=n(156);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var i=Object(a.a)(o);t.a=i}).call(this,n(85),n(177)(e))},,function(e,t){e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(32);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(32),o=n(184),a=n(185),i=n(127),s=n(186),c=n(189),l=n(190),u=n(130);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var b=s(e.baseURL,e.url);function v(){if(h){var r="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,a={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,a),h=null}}if(h.open(e.method.toUpperCase(),i(b,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||l(b))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},function(e,t,n){"use strict";var r=n(128);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(a,l),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var u=o.concat(a).concat(i).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,l),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=n(87),o=n(205),a=n(81),i=n(137),s=n(214),c=i.set,l=i.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){c(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r,o,a,i=n(206),s=n(37),c=n(61),l=n(62),u=n(44),d=n(112),f=n(116),p=n(117),h=s.WeakMap;if(i||d.state){var m=d.state||(d.state=new h),g=m.get,b=m.has,v=m.set;r=function(e,t){if(b.call(m,e))throw new TypeError("Object already initialized");return t.facade=e,v.call(m,e,t),t},o=function(e){return g.call(m,e)||{}},a=function(e){return b.call(m,e)}}else{var y=f("state");p[y]=!0,r=function(e,t){if(u(e,y))throw new TypeError("Object already initialized");return t.facade=e,l(e,y,t),t},o=function(e){return u(e,y)?e[y]:{}},a=function(e){return u(e,y)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(63),o=n(50),a=n(139);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(37),o=n(61),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){var r=n(209),o=n(141);e.exports=function(e){var t=r(e,"string");return o(t)?t:String(t)}},function(e,t,n){var r=n(29),o=n(88),a=n(142);e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return r(t)&&Object(e)instanceof t}},function(e,t,n){var r=n(143);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(210),o=n(50);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(115);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},function(e,t,n){var r=n(89),o=n(112);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.18.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(136);e.exports=function(e){return Object(r(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){"use strict";var r=n(37),o=n(29),a=n(215).f,i=n(217),s=n(114),c=n(149),l=n(62),u=n(44),d=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,h,m,g,b,v,y=e.target,w=e.global,x=e.stat,E=e.proto,O=w?r:x?r[y]:(r[y]||{}).prototype,k=w?s:s[y]||l(s,y,{})[y],_=k.prototype;for(p in t)n=!i(w?p:y+(x?".":"#")+p,e.forced)&&O&&u(O,p),m=k[p],n&&(g=e.noTargetGet?(v=a(O,p))&&v.value:O[p]),h=n&&g?g:t[p],n&&typeof m==typeof h||(b=e.bind&&n?c(h,r):e.wrap&&n?d(h):E&&o(h)?c(Function.call,h):h,(e.sham||h&&h.sham||m&&m.sham)&&l(b,"sham",!0),l(k,p,b),E&&(u(s,f=y+"Prototype")||l(s,f,{}),l(s[f],p,h),e.real&&_&&!_[p]&&l(_,p,h)))}},function(e,t,n){var r=n(115);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(151).IteratorPrototype,o=n(118),a=n(90),i=n(119),s=n(81),c=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=o(r,{next:a(1,n)}),i(e,l,!1,!0),s[l]=c,e}},function(e,t,n){"use strict";var r,o,a,i=n(50),s=n(29),c=n(118),l=n(154),u=n(91),d=n(38),f=n(89),p=d("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(o=l(l(a)))!==Object.prototype&&(r=o):h=!0),null==r||i((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=c(r)),s(r[p])||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(44),o=n(29),a=n(146),i=n(116),s=n(226),c=i("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof Object?l:null}},function(e,t,n){var r=n(82),o=n(144),a=n(81),i=n(38)("iterator");e.exports=function(e){if(null!=e)return o(e,i)||o(e,"@@iterator")||a[r(e)]}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var r=n(92),o=n(96);t.a=t=>{var n,a;let{level:i="info",error:s,message:c,reduxState:l,extra:u}=t;c||null!=s&&s.message||(console.error("Attempted to log without message"),c="No error message provided");const d=Object(o.a)(l||{},r.b),f={version:e.env.VERSION,release:e.env.IS_PURE_BUILD?`${e.env.VERSION}-pure`:e.env.VERSION,userAgent:navigator.userAgent,state:l?JSON.stringify(d):void 0,...u},p={message:null!==(n=c)&&void 0!==n?n:null==s?void 0:s.message,name:null==s?void 0:s.name,stack:null==s?void 0:s.stack,code:null==s?void 0:s.code,signal:null==s?void 0:s.signal};return{message:null!==(a=c)&&void 0!==a?a:null==s?void 0:s.message,level:i,extra:f,error:p}}}).call(this,n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=0,s=1,c=2,l=3,u="closed",d="errored",f="joined",p="joining",h="leaving",m="phx_close",g="phx_error",b="phx_join",v="phx_reply",y="phx_leave",w="longpoll",x="websocket",E=function(){function e(t,n,r,o){a(this,e),this.channel=t,this.event=n,this.payload=r||{},this.receivedResp=null,this.timeout=o,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return o(e,[{key:"resend",value:function(e){this.timeout=e,this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref;this.recHooks.filter((function(e){return e.status===t})).forEach((function(e){return e.callback(n)}))}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer||(this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)})),this.timeoutTimer=setTimeout((function(){e.trigger("timeout",{})}),this.timeout))}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),O=t.Channel=function(){function e(t,n,r){var o=this;a(this,e),this.state=u,this.topic=t,this.params=n||{},this.socket=r,this.bindings=[],this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new E(this,b,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new C((function(){return o.rejoinUntilConnected()}),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(function(){o.state=f,o.rejoinTimer.reset(),o.pushBuffer.forEach((function(e){return e.send()})),o.pushBuffer=[]})),this.onClose((function(){o.rejoinTimer.reset(),o.socket.log("channel","close "+o.topic+" "+o.joinRef()),o.state=u,o.socket.remove(o)})),this.onError((function(e){o.isLeaving()||o.isClosed()||(o.socket.log("channel","error "+o.topic,e),o.state=d,o.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(function(){o.isJoining()&&(o.socket.log("channel","timeout "+o.topic,o.joinPush.timeout),o.state=d,o.rejoinTimer.scheduleTimeout())})),this.on(v,(function(e,t){o.trigger(o.replyEventName(t),e)}))}return o(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(m,e)}},{key:"onError",value:function(e){this.on(g,(function(t){return e(t)}))}},{key:"on",value:function(e,t){this.bindings.push({event:e,callback:t})}},{key:"off",value:function(e){this.bindings=this.bindings.filter((function(t){return t.event!==e}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var r=new E(this,e,t,n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=h;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(m,"leave",e.joinRef())},r=new E(this,y,{},t);return r.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),r.send(),this.canPush()||r.trigger("ok",{}),r}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e){return this.topic===e}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=p,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n){if(!(n&&[m,g,y,b].indexOf(e)>=0&&n!==this.joinRef())){var r=this.onMessage(e,t,n);if(t&&!r)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter((function(t){return t.event===e})).map((function(e){return e.callback(r,n)}))}}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===u}},{key:"isErrored",value:function(){return this.state===d}},{key:"isJoined",value:function(){return this.state===f}},{key:"isJoining",value:function(){return this.state===p}},{key:"isLeaving",value:function(){return this.state===h}}]),e}(),k=(t.Socket=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=r.timeout||1e4,this.transport=r.transport||window.WebSocket||k,this.heartbeatIntervalMs=r.heartbeatIntervalMs||3e4,this.reconnectAfterMs=r.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=r.logger||function(){},this.longpollerTimeout=r.longpollerTimeout||2e4,this.params=r.params||{},this.endPoint=t+"/"+x,this.reconnectTimer=new C((function(){n.disconnect((function(){return n.connect()}))}),this.reconnectAfterMs)}return o(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=_.appendParams(_.appendParams(this.endPoint,this.params),{vsn:"1.0.0"});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=e),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL(),this.transport.prototype),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach((function(e){return e()}))}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return t(e)}))}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return t(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){return e.trigger(g)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case i:return"connecting";case s:return"open";case c:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"channel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new O(e,t,this);return this.channels.push(n),n}},{key:"push",value:function(e){var t=this,n=e.topic,r=e.event,o=e.payload,a=e.ref,i=function(){return t.conn.send(JSON.stringify(e))};this.log("push",n+" "+r+" ("+a+")",o),this.isConnected()?i():this.sendBuffer.push(i)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){this.isConnected()&&this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.makeRef()})}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=JSON.parse(e.data),n=t.topic,r=t.event,o=t.payload,a=t.ref;this.log("receive",(o.status||"")+" "+n+" "+r+" "+(a&&"("+a+")"||""),o),this.channels.filter((function(e){return e.isMember(n)})).forEach((function(e){return e.trigger(r,o,a)})),this.stateChangeCallbacks.message.forEach((function(e){return e(t)}))}}]),e}(),t.LongPoll=function(){function e(t){a(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=i,this.poll()}return o(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+x),"$1/"+w)}},{key:"endpointURL",value:function(){return _.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=i}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==s&&this.readyState!==i||_.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),(function(t){if(t){var n=t.status,r=t.token,o=t.messages;e.token=r}else n=0;switch(n){case 200:o.forEach((function(t){return e.onmessage({data:JSON.stringify(t)})})),e.poll();break;case 204:e.poll();break;case 410:e.readyState=s,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}}))}},{key:"send",value:function(e){var t=this;_.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),(function(e){e&&200===e.status||(t.onerror(status),t.closeAndRetry())}))}},{key:"close",value:function(e,t){this.readyState=l,this.onclose()}}]),e}()),_=t.Ajax=function(){function e(){a(this,e)}return o(e,null,[{key:"request",value:function(e,t,n,r,o,a,i){if(window.XDomainRequest){var s=new XDomainRequest;this.xdomainRequest(s,e,t,r,o,a,i)}else{var c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(c,e,t,n,r,o,a,i)}}},{key:"xdomainRequest",value:function(e,t,n,r,o,a,i){var s=this;e.timeout=o,e.open(t,n),e.onload=function(){var t=s.parseJSON(e.responseText);i&&i(t)},a&&(e.ontimeout=a),e.onprogress=function(){},e.send(r)}},{key:"xhrRequest",value:function(e,t,n,r,o,a,i,s){var c=this;e.timeout=a,e.open(t,n,!0),e.setRequestHeader("Content-Type",r),e.onerror=function(){s&&s(null)},e.onreadystatechange=function(){if(e.readyState===c.states.complete&&s){var t=c.parseJSON(e.responseText);s(t)}},i&&(e.ontimeout=i),e.send(o)}},{key:"parseJSON",value:function(e){return e&&""!==e?JSON.parse(e):null}},{key:"serialize",value:function(e,t){var n=[];for(var o in e)if(e.hasOwnProperty(o)){var a=t?t+"["+o+"]":o,i=e[o];"object"===(void 0===i?"undefined":r(i))?n.push(this.serialize(i,a)):n.push(encodeURIComponent(a)+"="+encodeURIComponent(i))}return n.join("&")}},{key:"appendParams",value:function(e,t){if(0===Object.keys(t).length)return e;var n=e.match(/\?/)?"&":"?";return""+e+n+this.serialize(t)}}]),e}();_.states={complete:4};t.Presence={syncState:function(e,t,n,r){var o=this,a=this.clone(e),i={},s={};return this.map(a,(function(e,n){t[e]||(s[e]=n)})),this.map(t,(function(e,t){var n=a[e];if(n){var r=t.metas.map((function(e){return e.phx_ref})),c=n.metas.map((function(e){return e.phx_ref})),l=t.metas.filter((function(e){return c.indexOf(e.phx_ref)<0})),u=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));l.length>0&&(i[e]=t,i[e].metas=l),u.length>0&&(s[e]=o.clone(n),s[e].metas=u)}else i[e]=t})),this.syncDiff(a,{joins:i,leaves:s},n,r)},syncDiff:function(e,t,n,r){var o=t.joins,a=t.leaves,i=this.clone(e);return n||(n=function(){}),r||(r=function(){}),this.map(o,(function(e,t){var r,o=i[e];(i[e]=t,o)&&(r=i[e].metas).unshift.apply(r,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o.metas));n(e,o,t)})),this.map(a,(function(e,t){var n=i[e];if(n){var o=t.metas.map((function(e){return e.phx_ref}));n.metas=n.metas.filter((function(e){return o.indexOf(e.phx_ref)<0})),r(e,n,t),0===n.metas.length&&delete i[e]}})),i},list:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,n){return t(e,n)}))},map:function(e,t){return Object.getOwnPropertyNames(e).map((function(n){return t(n,e[n])}))},clone:function(e){return JSON.parse(JSON.stringify(e))}};var C=function(){function e(t,n){a(this,e),this.callback=t,this.timerCalc=n,this.timer=null,this.tries=0}return o(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()},function(e,t,n){(function(n){var r,o,a;o=[],void 0===(a="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,i){var s=a.URL||a.webkitURL,c=document.createElement("a");n=n||e.name||"download",c.download=n,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?o(c):r(c.href)?t(e,n,i):o(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){o(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,a),n);else if(r(e))t(e,n,a);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){o(i)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},l.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,d=u.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i})?r.apply(t,o):r)||(e.exports=a)}).call(this,n(85))},function(e,t){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 a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<i;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,a){var i=e+";",s=2*t+3*n+4*a;if(944===s){e=i.indexOf(":",9)+1;var c=i.substring(e,i.length-1).trim();return c=i.substring(0,e).trim()+c+";",1===S||2===S&&o(c,1)?"-webkit-"+c+c:c}if(0===S||2===S&&!o(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(_,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(c=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+c+i;case 1005:return f.test(i)?i.replace(d,":-webkit-")+i.replace(d,":-moz-")+i:i;case 1e3:switch(t=(c=i.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=i.replace(y,"tb");break;case 232:c=i.replace(y,"tb-rl");break;case 220:c=i.replace(y,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+c+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(c=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(c,"-webkit-"+c)+";"+i.replace(c,"-ms-"+c+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return c=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+c+"-ms-flex-"+c+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(E,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(E,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,a).replace(":fill-available",":stretch"):i.replace(c,"-webkit-"+c)+i.replace(c,"-moz-"+c.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+i}return i}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(O,"$1"),n,t)}function a(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function i(e,t,n,r,o,a,i,s,l,u){for(var d,f=0,p=t;f<N;++f)switch(d=A[f].call(c,e,p,n,r,o,a,i,s,l,u)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?S=1:(S=2,P=e):S=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<N){var c=i(-1,n,s,s,j,C,0,0,0,0);void 0!==c&&"string"==typeof c&&(n=c)}var d=function e(n,s,c,d,f){for(var p,h,m,y,x,E=0,O=0,k=0,_=0,A=0,P=0,L=m=p=0,R=0,D=0,B=0,F=0,z=c.length,U=z-1,H="",$="",V="",q="";R<z;){if(h=c.charCodeAt(R),R===U&&0!==O+_+k+E&&(0!==O&&(h=47===O?10:47),_=k=E=0,z++,U++),0===O+_+k+E){if(R===U&&(0<D&&(H=H.replace(u,"")),0<H.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(R)}h=59}switch(h){case 123:for(p=(H=H.trim()).charCodeAt(0),m=1,F=++R;R<z;){switch(h=c.charCodeAt(R)){case 123:m++;break;case 125:m--;break;case 47:switch(h=c.charCodeAt(R+1)){case 42:case 47:e:{for(L=R+1;L<U;++L)switch(c.charCodeAt(L)){case 47:if(42===h&&42===c.charCodeAt(L-1)&&R+2!==L){R=L+1;break e}break;case 10:if(47===h){R=L+1;break e}}R=L}}break;case 91:h++;case 40:h++;case 34:case 39:for(;R++<U&&c.charCodeAt(R)!==h;);}if(0===m)break;R++}switch(m=c.substring(F,R),0===p&&(p=(H=H.replace(l,"").trim()).charCodeAt(0)),p){case 64:switch(0<D&&(H=H.replace(u,"")),h=H.charCodeAt(1)){case 100:case 109:case 115:case 45:D=s;break;default:D=I}if(F=(m=e(s,D,m,h,f+1)).length,0<N&&(x=i(3,m,D=t(I,H,B),s,j,C,F,h,f,d),H=D.join(""),void 0!==x&&0===(F=(m=x.trim()).length)&&(h=0,m="")),0<F)switch(h){case 115:H=H.replace(w,a);case 100:case 109:case 45:m=H+"{"+m+"}";break;case 107:m=(H=H.replace(g,"$1 $2"))+"{"+m+"}",m=1===S||2===S&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=H+m,112===d&&($+=m,m="")}else m="";break;default:m=e(s,t(s,H,B),m,d,f+1)}V+=m,m=B=D=L=p=0,H="",h=c.charCodeAt(++R);break;case 125:case 59:if(1<(F=(H=(0<D?H.replace(u,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(F=(H=H.replace(" ",":")).length),0<N&&void 0!==(x=i(1,H,s,n,j,C,$.length,d,f,d))&&0===(F=(H=x.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),h=H.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){q+=H+c.charAt(R);break}default:58!==H.charCodeAt(F-1)&&($+=r(H,p,h,H.charCodeAt(2)))}B=D=L=p=0,H="",h=c.charCodeAt(++R)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==d&&0<H.length&&(D=1,H+="\0"),0<N*M&&i(0,H,s,n,j,C,$.length,d,f,d),C=1,j++;break;case 59:case 125:if(0===O+_+k+E){C++;break}default:switch(C++,y=c.charAt(R),h){case 9:case 32:if(0===_+E+O)switch(A){case 44:case 58:case 9:case 32:y="";break;default:32!==h&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===_+O+E&&(D=B=1,y="\f"+y);break;case 108:if(0===_+O+E+T&&0<L)switch(R-L){case 2:112===A&&58===c.charCodeAt(R-3)&&(T=A);case 8:111===P&&(T=P)}break;case 58:0===_+O+E&&(L=R);break;case 44:0===O+k+_+E&&(D=1,y+="\r");break;case 34:case 39:0===O&&(_=_===h?0:0===_?h:_);break;case 91:0===_+O+k&&E++;break;case 93:0===_+O+k&&E--;break;case 41:0===_+O+E&&k--;break;case 40:if(0===_+O+E){if(0===p)switch(2*A+3*P){case 533:break;default:p=1}k++}break;case 64:0===O+k+_+E+L+m&&(m=1);break;case 42:case 47:if(!(0<_+E+k))switch(O){case 0:switch(2*h+3*c.charCodeAt(R+1)){case 235:O=47;break;case 220:F=R,O=42}break;case 42:47===h&&42===A&&F+2!==R&&(33===c.charCodeAt(F+2)&&($+=c.substring(F,R+1)),y="",O=0)}}0===O&&(H+=y)}P=A,A=h,R++}if(0<(F=$.length)){if(D=s,0<N&&(void 0!==(x=i(2,$,D,n,j,C,F,d,f,d))&&0===($=x).length))return q+$+V;if($=D.join(",")+"{"+$+"}",0!=S*T){switch(2!==S||o($,2)||(T=0),T){case 111:$=$.replace(v,":-moz-$1")+$;break;case 112:$=$.replace(b,"::-webkit-input-$1")+$.replace(b,"::-moz-$1")+$.replace(b,":-ms-input-$1")+$}T=0}}return q+$+V}(I,s,n,0,0);return 0<N&&(void 0!==(c=i(-2,d,s,s,j,C,d.length,0,0,0))&&(d=c)),"",T=0,C=j=1,d}var l=/^\0+/g,u=/[\0\r\f]/g,d=/: */g,f=/zoo|gra/,p=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,E=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,_=/([^-])(image-set\()/,C=1,j=1,T=0,S=1,I=[],A=[],N=0,P=null,M=0;return c.use=function e(t){switch(t){case void 0:case null:N=A.length=0;break;default:if("function"==typeof t)A[N++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else M=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}},function(e,t,n){"use strict";t.a={animationIterationCount: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}},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/IBMPlexSans-Medium.ttf"},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/IBMPlexSans-Regular.ttf"},function(e,t){e.exports="http://localhost:8081/src/assets/fonts/KindlySans-Regular.otf"},function(e,t){e.exports="http://localhost:8081/src/assets/images/santaHat.png"},function(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:i.default,slicer:a.default,serialize:JSON.stringify,deserialize:JSON.parse},t),o=n.key,s=n.merge,c=n.slicer,l=n.serialize,u=n.deserialize;return function(t){return function(n,r,a){"function"==typeof r&&void 0===a&&(a=r,r=void 0);var i=void 0,d=void 0;try{i=u(localStorage.getItem(o)),d=s(r,i)}catch(e){console.warn("Failed to retrieve initialize state from localStorage:",e)}var f=t(n,d,a),p=c(e);return f.subscribe((function(){var e=f.getState(),t=p(e);try{localStorage.setItem(o,l(t))}catch(e){console.warn("Unable to persist state to localStorage:",e)}})),f}}};var a=o(n(196)),i=o(n(199));e.exports=t.default},function(e,t,n){(function(e,n){var r=/^\[object .+?Constructor\]$/,o=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var i="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,c=i||s||Function("return this")(),l=t&&!t.nodeType&&t,u=l&&"object"==typeof n&&n&&!n.nodeType&&n,d=u&&u.exports===l,f=d&&i.process,p=function(){try{var e=u&&u.require&&u.require("util").types;return e||f&&f.binding&&f.binding("util")}catch(e){}}(),h=p&&p.isTypedArray;function m(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)}var g,b,v,y=Array.prototype,w=Function.prototype,x=Object.prototype,E=c["__core-js_shared__"],O=w.toString,k=x.hasOwnProperty,_=(g=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",C=x.toString,j=O.call(Object),T=RegExp("^"+O.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=d?c.Buffer:void 0,I=c.Symbol,A=c.Uint8Array,N=S?S.allocUnsafe:void 0,P=(b=Object.getPrototypeOf,v=Object,function(e){return b(v(e))}),M=Object.create,L=x.propertyIsEnumerable,R=y.splice,D=I?I.toStringTag:void 0,B=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),F=S?S.isBuffer:void 0,z=Math.max,U=Date.now,H=le(c,"Map"),$=le(Object,"create"),V=function(){function e(){}return function(t){if(!xe(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function q(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 G(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 W(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=this.__data__=new G(e);this.size=t.size}function K(e,t){var n=ge(e),r=!n&&me(e),o=!n&&!r&&ve(e),a=!n&&!r&&!o&&Oe(e),i=n||r||o||a,s=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var l in e)!t&&!k.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ue(l,c))||s.push(l);return s}function X(e,t,n){(void 0!==n&&!he(e[t],n)||void 0===n&&!(t in e))&&Z(e,t,n)}function J(e,t,n){var r=e[t];k.call(e,t)&&he(r,n)&&(void 0!==n||t in e)||Z(e,t,n)}function Q(e,t){for(var n=e.length;n--;)if(he(e[n][0],t))return n;return-1}function Z(e,t,n){"__proto__"==t&&B?B(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}q.prototype.clear=function(){this.__data__=$?$(null):{},this.size=0},q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},q.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return k.call(t,e)?t[e]:void 0},q.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:k.call(t,e)},q.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$&&void 0===t?"__lodash_hash_undefined__":t,this},G.prototype.clear=function(){this.__data__=[],this.size=0},G.prototype.delete=function(e){var t=this.__data__,n=Q(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),--this.size,!0)},G.prototype.get=function(e){var t=this.__data__,n=Q(t,e);return n<0?void 0:t[n][1]},G.prototype.has=function(e){return Q(this.__data__,e)>-1},G.prototype.set=function(e,t){var n=this.__data__,r=Q(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},W.prototype.clear=function(){this.size=0,this.__data__={hash:new q,map:new(H||G),string:new q}},W.prototype.delete=function(e){var t=ce(this,e).delete(e);return this.size-=t?1:0,t},W.prototype.get=function(e){return ce(this,e).get(e)},W.prototype.has=function(e){return ce(this,e).has(e)},W.prototype.set=function(e,t){var n=ce(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Y.prototype.clear=function(){this.__data__=new G,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof G){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(r)}return n.set(e,t),this.size=n.size,this};var ee,te=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var s=a[ee?i:++r];if(!1===t(o[s],s,o))break}return e};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":D&&D in Object(e)?function(e){var t=k.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch(e){}var o=C.call(e);r&&(t?e[D]=n:delete e[D]);return o}(e):function(e){return C.call(e)}(e)}function re(e){return Ee(e)&&"[object Arguments]"==ne(e)}function oe(e){return!(!xe(e)||function(e){return!!_&&_ in e}(e))&&(ye(e)?T:r).test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ae(e){if(!xe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}function ie(e,t,n,r,o){e!==t&&te(t,(function(a,i){if(o||(o=new Y),xe(a))!function(e,t,n,r,o,a,i){var s=fe(e,n),c=fe(t,n),l=i.get(c);if(l)return void X(e,n,l);var u=a?a(s,c,n+"",e,t,i):void 0,d=void 0===u;if(d){var f=ge(c),p=!f&&ve(c),h=!f&&!p&&Oe(c);u=c,f||p||h?ge(s)?u=s:Ee(y=s)&&be(y)?u=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(s):p?(d=!1,u=function(e,t){if(t)return e.slice();var n=e.length,r=N?N(n):new e.constructor(n);return e.copy(r),r}(c,!0)):h?(d=!1,m=c,g=!0?(b=m.buffer,v=new b.constructor(b.byteLength),new A(v).set(new A(b)),v):m.buffer,u=new m.constructor(g,m.byteOffset,m.length)):u=[]:function(e){if(!Ee(e)||"[object Object]"!=ne(e))return!1;var t=P(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&O.call(n)==j}(c)||me(c)?(u=s,me(s)?u=function(e){return function(e,t,n,r){var o=!n;n||(n={});var a=-1,i=t.length;for(;++a<i;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?Z(n,s,c):J(n,s,c)}return n}(e,ke(e))}(s):xe(s)&&!ye(s)||(u=function(e){return"function"!=typeof e.constructor||de(e)?{}:V(P(e))}(c))):d=!1}var m,g,b,v;var y;d&&(i.set(c,u),o(u,c,r,a,i),i.delete(c));X(e,n,u)}(e,t,i,n,ie,r,o);else{var s=r?r(fe(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),X(e,i,s)}}),ke)}function se(e,t){return pe(function(e,t,n){return t=z(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=z(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),m(e,this,s)}}(e,t,je),e+"")}function ce(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 le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return oe(n)?n:void 0}function ue(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}function fe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pe=function(e){var t=0,n=0;return function(){var r=U(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(B?function(e,t){return B(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:je);function he(e,t){return e===t||e!=e&&t!=t}var me=re(function(){return arguments}())?re:function(e){return Ee(e)&&k.call(e,"callee")&&!L.call(e,"callee")},ge=Array.isArray;function be(e){return null!=e&&we(e.length)&&!ye(e)}var ve=F||function(){return!1};function ye(e){if(!xe(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function we(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Oe=h?function(e){return function(t){return e(t)}}(h):function(e){return Ee(e)&&we(e.length)&&!!a[ne(e)]};function ke(e){return be(e)?K(e,!0):ae(e)}var _e,Ce=(_e=function(e,t,n){ie(e,t,n)},se((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=_e.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!xe(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ue(t,n.length):"string"==r&&t in n)&&he(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var i=t[n];i&&_e(e,i,n,o)}return e})));function je(e){return e}n.exports=Ce}).call(this,n(85),n(200)(e))},function(e,t,n){var r=n(201);e.exports=r},function(e,t,n){
|
|
17
17
|
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
|
18
18
|
e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,a=Object.freeze,i=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,l=c.apply,u=c.construct;l||(l=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),i||(i=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var d,f=E(Array.prototype.forEach),p=E(Array.prototype.pop),h=E(Array.prototype.push),m=E(String.prototype.toLowerCase),g=E(String.prototype.match),b=E(String.prototype.replace),v=E(String.prototype.indexOf),y=E(String.prototype.trim),w=E(RegExp.prototype.test),x=(d=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(d,t)});function E(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return l(e,t,r)}}function O(e,r){t&&t(e,null);for(var o=r.length;o--;){var a=r[o];if("string"==typeof a){var i=m(a);i!==a&&(n(r)||(r[o]=i),a=i)}e[a]=!0}return e}function k(t){var n=s(null),r=void 0;for(r in t)l(e,t,[r])&&(n[r]=t[r]);return n}function _(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return E(n.get);if("function"==typeof n.value)return E(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var C=a(["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","section","select","shadow","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"]),j=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),S=a(["animate","color-profile","cursor","discard","fedropshadow","feimage","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"]),I=a(["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"]),A=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=a(["#text"]),P=a(["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","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=a(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","targetx","targety","transform","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"]),L=a(["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"]),R=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D=i(/\{\{[\s\S]*|[\s\S]*\}\}/gm),B=i(/<%[\s\S]*|[\s\S]*%>/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),U=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=i(/^(?:\w+script|data):/i),$=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var G=function(){return"undefined"==typeof window?null:window},W=function(e,t){if("object"!==(void 0===e?"undefined":V(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G(),n=function(t){return e(t)};if(n.version="2.2.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,c=t.Node,l=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,E=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,Y=t.Text,K=t.Comment,X=t.DOMParser,J=t.trustedTypes,Q=l.prototype,Z=_(Q,"cloneNode"),ee=_(Q,"nextSibling"),te=_(Q,"childNodes"),ne=_(Q,"parentNode");if("function"==typeof s){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=W(J,r),ae=oe&&Re?oe.createHTML(""):"",ie=o,se=ie.implementation,ce=ie.createNodeIterator,le=ie.createDocumentFragment,ue=r.importNode,de={};try{de=k(o).documentMode?o.documentMode:{}}catch(e){}var fe={};n.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==de;var pe=D,he=B,me=F,ge=z,be=H,ve=$,ye=U,we=null,xe=O({},[].concat(q(C),q(j),q(T),q(I),q(N))),Ee=null,Oe=O({},[].concat(q(P),q(M),q(L),q(R))),ke=null,_e=null,Ce=!0,je=!0,Te=!1,Se=!1,Ie=!1,Ae=!1,Ne=!1,Pe=!1,Me=!1,Le=!0,Re=!1,De=!0,Be=!0,Fe=!1,ze={},Ue=O({},["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"]),He=null,$e=O({},["audio","video","img","source","image","track"]),Ve=null,qe=O({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml",Ke=Ye,Xe=null,Je=o.createElement("form"),Qe=function(e){Xe&&Xe===e||(e&&"object"===(void 0===e?"undefined":V(e))||(e={}),e=k(e),we="ALLOWED_TAGS"in e?O({},e.ALLOWED_TAGS):xe,Ee="ALLOWED_ATTR"in e?O({},e.ALLOWED_ATTR):Oe,Ve="ADD_URI_SAFE_ATTR"in e?O(k(qe),e.ADD_URI_SAFE_ATTR):qe,He="ADD_DATA_URI_TAGS"in e?O(k($e),e.ADD_DATA_URI_TAGS):$e,ke="FORBID_TAGS"in e?O({},e.FORBID_TAGS):{},_e="FORBID_ATTR"in e?O({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,je=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.SAFE_FOR_TEMPLATES||!1,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Le=!1!==e.RETURN_DOM_IMPORT,Re=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Be=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||ye,Ke=e.NAMESPACE||Ke,Se&&(je=!1),Me&&(Pe=!0),ze&&(we=O({},[].concat(q(N))),Ee=[],!0===ze.html&&(O(we,C),O(Ee,P)),!0===ze.svg&&(O(we,j),O(Ee,M),O(Ee,R)),!0===ze.svgFilters&&(O(we,T),O(Ee,M),O(Ee,R)),!0===ze.mathMl&&(O(we,I),O(Ee,L),O(Ee,R))),e.ADD_TAGS&&(we===xe&&(we=k(we)),O(we,e.ADD_TAGS)),e.ADD_ATTR&&(Ee===Oe&&(Ee=k(Ee)),O(Ee,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&O(Ve,e.ADD_URI_SAFE_ATTR),Be&&(we["#text"]=!0),Ie&&O(we,["html","head","body"]),we.table&&(O(we,["tbody"]),delete ke.tbody),a&&a(e),Xe=e)},Ze=O({},["mi","mo","mn","ms","mtext"]),et=O({},["foreignobject","desc","title","annotation-xml"]),tt=O({},j);O(tt,T),O(tt,S);var nt=O({},I);O(nt,A);var rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});var n=m(e.tagName),r=m(t.tagName);if(e.namespaceURI===We)return t.namespaceURI===Ye?"svg"===n:t.namespaceURI===Ge?"svg"===n&&("annotation-xml"===r||Ze[r]):Boolean(tt[n]);if(e.namespaceURI===Ge)return t.namespaceURI===Ye?"math"===n:t.namespaceURI===We?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ye){if(t.namespaceURI===We&&!et[r])return!1;if(t.namespaceURI===Ge&&!Ze[r])return!1;var o=O({},["title","style","font","a","script"]);return!nt[n]&&(o[n]||!tt[n])}return!1},ot=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},at=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ee[e])if(Pe||Me)try{ot(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},it=function(e){var t=void 0,n=void 0;if(Ne)e="<remove></remove>"+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}var a=oe?oe.createHTML(e):e;if(Ke===Ye)try{t=(new X).parseFromString(a,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ke,"template",null)).documentElement.innerHTML=a);var i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ie?t.documentElement:i},st=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},ct=function(e){return!(e instanceof Y||e instanceof K||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof E&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===c?"undefined":V(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,r){fe[e]&&f(fe[e],(function(e){e.call(n,t,r,Xe)}))},dt=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),ct(e))return ot(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var r=m(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return ot(e),!0;if(!we[r]||ke[r]){if(Be&&!Ue[r]){var o=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i)o.insertBefore(Z(a[i],!0),ee(e))}return ot(e),!0}return e instanceof l&&!rt(e)?(ot(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,t=b(t,pe," "),t=b(t,he," "),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},ft=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in Je))return!1;if(je&&w(me,t));else if(Ce&&w(ge,t));else{if(!Ee[t]||_e[t])return!1;if(Ve[t]);else if(w(ye,b(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!He[e])if(Te&&!w(be,b(n,ve,"")));else if(n)return!1}return!0},pt=function(e){var t=void 0,r=void 0,o=void 0,a=void 0;ut("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};for(a=i.length;a--;){var c=t=i[a],l=c.name,u=c.namespaceURI;if(r=y(t.value),o=m(l),s.attrName=o,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(at(l,e),s.keepAttr))if(w(/\/>/i,r))at(l,e);else{Se&&(r=b(r,pe," "),r=b(r,he," "));var d=e.nodeName.toLowerCase();if(ft(d,o,r))try{u?e.setAttributeNS(u,l,r):e.setAttribute(l,r),p(n.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},ht=function e(t){var n=void 0,r=st(t);for(ut("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ut("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof i&&e(n.content),pt(n));ut("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var a=void 0,s=void 0,l=void 0,u=void 0,d=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!lt(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported){if("object"===V(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(lt(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ae||Qe(o),n.removed=[],"string"==typeof e&&(Fe=!1),Fe);else if(e instanceof c)1===(s=(a=it("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!Pe&&!Se&&!Ie&&-1===e.indexOf("<"))return oe&&Re?oe.createHTML(e):e;if(!(a=it(e)))return Pe?null:ae}a&&Ne&&ot(a.firstChild);for(var f=st(Fe?e:a);l=f.nextNode();)3===l.nodeType&&l===u||dt(l)||(l.content instanceof i&&ht(l.content),pt(l),u=l);if(u=null,Fe)return e;if(Pe){if(Me)for(d=le.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return Le&&(d=ue.call(r,d,!0)),d}var p=Ie?a.outerHTML:a.innerHTML;return Se&&(p=b(p,pe," "),p=b(p,he," ")),oe&&Re?oe.createHTML(p):p},n.setConfig=function(e){Qe(e),Ae=!0},n.clearConfig=function(){Xe=null,Ae=!1},n.isValidAttribute=function(e,t,n){Xe||Qe({});var r=m(e),o=m(t);return ft(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],h(fe[e],t))},n.removeHook=function(e){fe[e]&&p(fe[e])},n.removeHooks=function(e){fe[e]&&(fe[e]=[])},n.removeAllHooks=function(){fe={}},n}()}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var r=n(0),o=n(3),a=n(8),i=n(7),s=n(108);function c(){const t=Object(o.c)(),{botKey:n}=Object(o.d)(i.e),{messageSentTime:c}=Object(o.d)(i.n),{persistStateLifespan:l}=Object(o.d)(i.d),{chatMessages:u}=Object(o.d)(i.n);Object(r.useEffect)(()=>{if(e.env.IS_STORYBOOK)return;const r=Object(s.a)({messageSentTime:c,persistStateLifespan:l});0===l||r||0===u.length||t(Object(a.e)(n))},[n,t,l,c,u])}}).call(this,n(86))},function(e,t){e.exports="http://localhost:8081/src/assets/icons/emoji-happy.png"},function(e,t){e.exports="http://localhost:8081/src/assets/icons/emoji-neutral.png"},function(e,t){e.exports="http://localhost:8081/src/assets/icons/emoji-sad.png"},,function(e,t,n){"use strict";
|
|
19
19
|
/** @license React v16.13.1
|
|
@@ -23,4 +23,4 @@ e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setProtot
|
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the MIT license found in the
|
|
25
25
|
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case f:case i:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case u:case p:case b:case g:case l:return e;default:return t}}case a:return t}}}function O(e){return E(e)===f}t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=b,t.Memo=g,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||E(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===i},t.isLazy=function(e){return E(e)===b},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===a},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===w||e.$$typeof===x||e.$$typeof===v)},t.typeOf=E},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(32),o=n(126),a=n(179),i=n(132);function s(e){var t=new a(e),n=o(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var c=s(n(111));c.Axios=a,c.create=function(e){return s(i(c.defaults,e))},c.Cancel=n(133),c.CancelToken=n(193),c.isCancel=n(131),c.all=function(e){return Promise.all(e)},c.spread=n(194),c.isAxiosError=n(195),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";var r=n(32),o=n(127),a=n(180),i=n(181),s=n(132),c=n(191),l=c.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean,"1.0.0"),forcedJSONParsing:l.transitional(l.boolean,"1.0.0"),clarifyTimeoutError:l.transitional(l.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[i,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(32);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(32),o=n(182),a=n(131),i=n(111);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(32),o=n(111);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(130);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(32);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(187),o=n(188);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(32),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},function(e,t,n){"use strict";var r=n(32);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(192),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},i=r.version.split(".");function s(e,t){for(var n=t?t.split("."):i,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}o.transitional=function(e,t,n){var o=t&&s(t);function i(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(i(r," has been removed in "+t));return o&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,n){"use strict";var r=n(133);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(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,a.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(197)),a=r(n(198));e.exports=t.default},function(e,t,n){"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},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return"void";if(r(e))return e.length?"array":"void";return typeof e};var r=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},function(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};t.default=function(e,t){return t?r({},e,t):e},e.exports=t.default},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(202);n(235),e.exports=r},function(e,t,n){n(203);var r=n(114);e.exports=r.URLSearchParams},function(e,t,n){"use strict";n(134);var r=n(148),o=n(88),a=n(230),i=n(91),s=n(231),c=n(119),l=n(150),u=n(137),d=n(232),f=n(29),p=n(44),h=n(149),m=n(82),g=n(64),b=n(61),v=n(233),y=n(118),w=n(90),x=n(234),E=n(155),O=n(38),k=o("fetch"),_=o("Request"),C=_&&_.prototype,j=o("Headers"),T=O("iterator"),S=u.set,I=u.getterFor("URLSearchParams"),A=u.getterFor("URLSearchParamsIterator"),N=/\+/g,P=Array(4),M=function(e){return P[e-1]||(P[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},L=function(e){try{return decodeURIComponent(e)}catch(t){return e}},R=function(e){var t=e.replace(N," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(M(n--),L);return t}},D=/[!'()~]|%20/g,B={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},F=function(e){return B[e]},z=function(e){return encodeURIComponent(e).replace(D,F)},U=function(e,t){if(t)for(var n,r,o=t.split("&"),a=0;a<o.length;)(n=o[a++]).length&&(r=n.split("="),e.push({key:R(r.shift()),value:R(r.join("="))}))},H=function(e){this.entries.length=0,U(this.entries,e)},$=function(e,t){if(e<t)throw TypeError("Not enough arguments")},V=l((function(e,t){S(this,{type:"URLSearchParamsIterator",iterator:x(I(e).entries),kind:t})}),"Iterator",(function(){var e=A(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),q=function(){d(this,q,"URLSearchParams");var e,t,n,r,o,a,i,s,c,l=arguments.length>0?arguments[0]:void 0,u=this,f=[];if(S(u,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:H}),void 0!==l)if(b(l))if(e=E(l))for(n=(t=x(l,e)).next;!(r=n.call(t)).done;){if((i=(a=(o=x(g(r.value))).next).call(o)).done||(s=a.call(o)).done||!a.call(o).done)throw TypeError("Expected sequence with length 2");f.push({key:v(i.value),value:v(s.value)})}else for(c in l)p(l,c)&&f.push({key:c,value:v(l[c])});else U(f,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:v(l))},G=q.prototype;if(s(G,{append:function(e,t){$(arguments.length,2);var n=I(this);n.entries.push({key:v(e),value:v(t)}),n.updateURL()},delete:function(e){$(arguments.length,1);for(var t=I(this),n=t.entries,r=v(e),o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;t.updateURL()},get:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=[],o=0;o<t.length;o++)t[o].key===n&&r.push(t[o].value);return r},has:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){$(arguments.length,1);for(var n,r=I(this),o=r.entries,a=!1,i=v(e),s=v(t),c=0;c<o.length;c++)(n=o[c]).key===i&&(a?o.splice(c--,1):(a=!0,n.value=s));a||o.push({key:i,value:s}),r.updateURL()},sort:function(){var e,t,n,r=I(this),o=r.entries,a=o.slice();for(o.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=I(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),i(G,T,G.entries,{name:"entries"}),i(G,"toString",(function(){for(var e,t=I(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(z(e.key)+"="+z(e.value));return n.join("&")}),{enumerable:!0}),c(q,"URLSearchParams"),r({global:!0,forced:!a},{URLSearchParams:q}),!a&&f(j)){var W=function(e){if(b(e)){var t,n=e.body;if("URLSearchParams"===m(n))return(t=e.headers?new j(e.headers):new j).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),y(e,{body:w(0,String(n)),headers:w(0,t)})}return e};if(f(k)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return k(e,arguments.length>1?W(arguments[1]):{})}}),f(_)){var Y=function(e){return d(this,Y,"Request"),new _(e,arguments.length>1?W(arguments[1]):{})};C.constructor=Y,Y.prototype=C,r({global:!0,forced:!0},{Request:Y})}}e.exports={URLSearchParams:q,getState:I}},function(e,t,n){var r=n(50),o=n(135),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a.call(e,""):Object(e)}:Object},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(37),o=n(29),a=n(207),i=r.WeakMap;e.exports=o(i)&&/native code/.test(a(i))},function(e,t,n){var r=n(29),o=n(112),a=Function.toString;r(o.inspectSource)||(o.inspectSource=function(e){return a.call(e)}),e.exports=o.inspectSource},function(e,t,n){var r=n(37);e.exports=function(e,t){try{Object.defineProperty(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(61),o=n(141),a=n(144),i=n(213),s=n(38)("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var n,c=a(e,s);if(c){if(void 0===t&&(t="default"),n=c.call(e,t),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},function(e,t,n){var r,o,a=n(37),i=n(211),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(88);e.exports=r("navigator","userAgent")||""},function(e,t){e.exports=function(e){try{return String(e)}catch(e){return"Object"}}},function(e,t,n){var r=n(29),o=n(61);e.exports=function(e,t){var n,a;if("string"===t&&r(n=e.toString)&&!o(a=n.call(e)))return a;if(r(n=e.valueOf)&&!o(a=n.call(e)))return a;if("string"!==t&&r(n=e.toString)&&!o(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(148),o=n(89),a=n(218),i=n(29),s=n(150),c=n(154),l=n(228),u=n(119),d=n(62),f=n(91),p=n(38),h=n(81),m=n(151),g=a.PROPER,b=a.CONFIGURABLE,v=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};e.exports=function(e,t,n,a,p,m,E){s(n,t,a);var O,k,_,C=function(e){if(e===p&&A)return A;if(!y&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},j=t+" Iterator",T=!1,S=e.prototype,I=S[w]||S["@@iterator"]||p&&S[p],A=!y&&I||C(p),N="Array"==t&&S.entries||I;if(N&&(O=c(N.call(new e)))!==Object.prototype&&O.next&&(o||c(O)===v||(l?l(O,v):i(O[w])||f(O,w,x)),u(O,j,!0,!0),o&&(h[j]=x)),g&&"values"==p&&I&&"values"!==I.name&&(!o&&b?d(S,"name","values"):(T=!0,A=function(){return I.call(this)})),p)if(k={values:C("values"),keys:m?A:C("keys"),entries:C("entries")},E)for(_ in k)(y||T||!(_ in S))&&f(S,_,k[_]);else r({target:t,proto:!0,forced:y||T},k);return o&&!E||S[w]===A||f(S,w,A,{name:p}),h[t]=A,k}},function(e,t,n){var r=n(63),o=n(216),a=n(90),i=n(87),s=n(140),c=n(44),l=n(138),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=i(e),t=s(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(50),o=n(29),a=/#|\.prototype\./,i=function(e,t){var n=c[s(e)];return n==u||n!=l&&(o(t)?r(t):!!t)},s=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(63),o=n(44),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,s=o(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},function(e,t,n){var r=n(63),o=n(113),a=n(64),i=n(220);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=i(t),s=r.length,c=0;s>c;)o.f(e,n=r[c++],t[n]);return e}},function(e,t,n){var r=n(221),o=n(153);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(44),o=n(87),a=n(222).indexOf,i=n(117);e.exports=function(e,t){var n,s=o(e),c=0,l=[];for(n in s)!r(i,n)&&r(s,n)&&l.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var r=n(87),o=n(223),a=n(224),i=function(e){return function(t,n,i){var s,c=r(t),l=o(c.length),u=a(i,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){var r=n(152),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(152),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t,n){var r=n(88);e.exports=r("document","documentElement")},function(e,t,n){var r=n(50);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(120),o=n(82);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var r=n(64),o=n(229);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),o(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},function(e,t,n){var r=n(29);e.exports=function(e){if("object"==typeof e||r(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},function(e,t,n){var r=n(50),o=n(38),a=n(89),i=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(e,t,n){var r=n(91);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e}},function(e,t){e.exports=function(e,t,n){if(e instanceof t)return e;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},function(e,t,n){var r=n(82);e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},function(e,t,n){var r=n(115),o=n(64),a=n(155);e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(r(n))return o(n.call(e));throw TypeError(String(e)+" is not iterable")}},function(e,t,n){n(134);var r=n(236),o=n(37),a=n(82),i=n(62),s=n(81),c=n(38)("toStringTag");for(var l in r){var u=o[l],d=u&&u.prototype;d&&a(d)!==c&&i(d,c,l),s[l]=s.Array}},function(e,t){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}},function(e,t){e.exports="http://localhost:8081/src/assets/audio/newagent.mp3"},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"agent",(function(){return ft})),n.d(r,"alerts",(function(){return ht})),n.d(r,"announcement",(function(){return gt})),n.d(r,"auth",(function(){return vt})),n.d(r,"bot",(function(){return Je})),n.d(r,"chatbubble",(function(){return Ze})),n.d(r,"connection",(function(){return wt})),n.d(r,"inspector",(function(){return Et})),n.d(r,"environment",(function(){return tt})),n.d(r,"feedback",(function(){return kt})),n.d(r,"local",(function(){return jt})),n.d(r,"maintenanceAlert",(function(){return St})),n.d(r,"messages",(function(){return zt})),n.d(r,"privacy",(function(){return Ht})),n.d(r,"pushMessages",(function(){return qt})),n.d(r,"websocketFallback",(function(){return Yt})),n.d(r,"lightBox",(function(){return Xt})),n.d(r,"nudge",(function(){return Qt}));var o=n(4),a=n.n(o),i=n(0),s=n.n(i),c=n(65),l=(a.a.shape({context:a.a.shape({}),language:a.a.string,getAuthToken:a.a.func,bubbleHidden:a.a.bool,buttonHandlers:c.a,onLoad:a.a.func,environment:a.a.shape({PAT_HOST:a.a.string,PUSHER_KEY:a.a.string,STATUS_PAGE:a.a.string,KINDLY_CHAT_URL:a.a.string,SETTINGS_HOST:a.a.string,SAGE_WS_HOST:a.a.string,SAGE_HOST:a.a.string}),inPlatform:a.a.bool,admin:a.a.bool}),n(17));var u=function(e,t){return!!Object(l.a)(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}function v(e,t){var n=0;return function(){var r=(new Date).getTime();if(!(r-n<t))return n=r,e.apply(void 0,arguments)}}var y="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":d(window)),w=y?document:{},x=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?g(e):t}(this,m(t).call(this,e)),p(g(n),"state",{idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null,pageX:null,pageY:null}),p(g(n),"tId",null),p(g(n),"_handleEvent",(function(e){var t=n.state,r=t.remaining,o=t.pageX,a=t.pageY,i=t.idle,s=n.props,c=s.timeout,l=s.onAction,u=s.debounce,d=s.throttle,f=s.stopOnIdle;if(u>0?n.debouncedAction(e):d>0?n.throttledAction(e):l(e),!r){if("mousemove"===e.type){if(e.pageX===o&&e.pageY===a)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(n.getElapsedTime()<200)return}clearTimeout(n.tId),n.tId=null;var p=new Date-n.getLastActiveTime();(i&&!f||!i&&p>c)&&n.toggleIdleState(e),n.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),i&&f||(n.tId=setTimeout(n.toggleIdleState,c))}})),e.debounce>0&&e.throttle>0)throw new Error("onAction can either be throttled or debounced (not both)");return e.debounce>0&&(n.debouncedAction=b(e.onAction,e.debounce)),e.throttle>0&&(n.throttledAction=v(e.onAction,e.throttle)),e.startOnMount||(n.state.idle=!0),n.toggleIdleState=n._toggleIdleState.bind(g(n)),n.reset=n.reset.bind(g(n)),n.pause=n.pause.bind(g(n)),n.resume=n.resume.bind(g(n)),n.getRemainingTime=n.getRemainingTime.bind(g(n)),n.getElapsedTime=n.getElapsedTime.bind(g(n)),n.getLastActiveTime=n.getLastActiveTime.bind(g(n)),n.isIdle=n._isIdle.bind(g(n)),n}return h(t,e),function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(t,[{key:"componentDidMount",value:function(){this._bindEvents(),this.props.startOnMount&&this.reset()}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&(this.debouncedAction=b(this.props.onAction,this.props.debounce)),e.throttle!==this.props.throttle&&(this.throttledAction=v(this.props.onAction,this.props.throttle))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0)}},{key:"render",value:function(){return this.props.children||null}},{key:"_bindEvents",value:function(){var e=this;if(y){var t=this.state.eventsBound,n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;t||(o.forEach((function(t){r.addEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!0}))}}},{key:"_unbindEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(y){var n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;(this.state.eventsBound||t)&&(o.forEach((function(t){r.removeEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!1}))}}},{key:"_toggleIdleState",value:function(e){var t=this;this.setState((function(e){return{idle:!e.idle}}),(function(){var n=t.props,r=n.onActive,o=n.onIdle,a=n.stopOnIdle;t.state.idle?(a&&(clearTimeout(t.tId),t.tId=null,t._unbindEvents()),o(e)):a||(t._bindEvents(),r(e))}))}},{key:"reset",value:function(){clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var e=this.props.timeout;this.tId=setTimeout(this.toggleIdleState,e)}},{key:"pause",value:function(){null===this.state.remaining&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=this.state,t=e.remaining,n=e.idle;null!==t&&(this._bindEvents(),n||(this.setState({remaining:null,lastActive:+new Date}),this.tId=setTimeout(this.toggleIdleState,t)))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,n=e.lastActive,r=this.props.timeout;if(null!==t)return t<0?0:t;var o=r-(+new Date-n);return o<0?0:o}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"_isIdle",value:function(){return this.state.idle}}]),t}(i.Component);p(x,"propTypes",{timeout:a.a.number,events:a.a.arrayOf(a.a.string),onIdle:a.a.func,onActive:a.a.func,onAction:a.a.func,debounce:a.a.number,throttle:a.a.number,element:a.a.oneOfType([a.a.object,a.a.element]),startOnMount:a.a.bool,stopOnIdle:a.a.bool,passive:a.a.bool,capture:a.a.bool}),p(x,"defaultProps",{timeout:12e5,element:w,events:["mousemove","keydown","wheel","DOMMouseScroll","mouseWheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"],onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0});var E=x,O=n(3),k=n(1),_=n(70),C=n(107),j=n(18),T=n(10),S=n(15),I=(a.a.shape({name:a.a.string.isRequired,avatar:a.a.string.isRequired}),n(8)),A=n(7),N=n(31),P=n(40),M=n(27),L=n(25),R=n(100),D=n(11),B=n(23),F=n(12),z=n(6);const U=k.c.div.withConfig({displayName:"styles__PushMessageContainer",componentId:"sc-na2ous-0"})(["right:40px;bottom:50px;z-index:",";position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";",";@media ","{margin-left:20px;","}"],e=>e.zIndex,z.a.shadowColor,D.f,z.c.maxTablet,e=>{let{bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"}),H=k.c.div.withConfig({displayName:"styles__PushMessageInner",componentId:"sc-na2ous-1"})(["padding:15px 20px;width:max-content;max-width:360px;min-width:130px;padding-right:60px;@media ","{width:unset;max-width:100%;}"],z.c.maxPhone),$=k.c.div.withConfig({displayName:"styles__ContentContainer",componentId:"sc-na2ous-2"})(["display:flex;cursor:pointer;align-items:center;"]),V=k.c.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-na2ous-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),q=k.c.div.withConfig({displayName:"styles__ContentText",componentId:"sc-na2ous-4"})(["margin:0;color:",";font-size:",";font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:14px;}"],z.a.darkColor,z.d.fontSizeH5,B.a.default,z.c.maxTablet),G=Object(k.c)(F.a).withConfig({displayName:"styles__PushMessageDismiss",componentId:"sc-na2ous-5"})(["top:-8px;left:-8px;z-index:",";display:flex;padding:0;border-radius:100px;background:",";background-color:",";position:absolute;&:hover{opacity:0.8;}"],e=>e.zIndex,e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground}),W=Object(L.a)();function Y(e){let{agent:t}=e;const{currentLanguage:n}=Object(O.d)(A.e),{text:r}=Object(O.d)(A.d),{defaultLanguage:o}=Object(S.a)(),{agent_joined_text:a}=Object(M.a)(r,n,o);return Object(i.useEffect)(()=>{Object(R.a)()},[]),s.a.createElement($,null,s.a.createElement(V,{style:{backgroundImage:`url(${t.avatar})`}}),s.a.createElement(q,null,s.a.createElement("span",null,t.name||"An agent")," ",a))}function K(e){let{text:t}=e;return s.a.createElement($,null,s.a.createElement(q,{dangerouslySetInnerHTML:{__html:t}}))}var X=function(e){let{settings:t}=e;const{bubbleSize:n}=Object(O.d)(A.d),{agent:r,show:o,text:a,type:c}=Object(O.d)(A.q),l=Object(O.c)(),u=Object(N.a)(t,"zIndex",15),d=Object(k.e)(),f=Object(i.useMemo)(()=>Object(P.a)(d.bubbleButtonBackground||d.buttonBackground,"#fff","#000"),[d.bubbleButtonBackground,d.buttonBackground]);return null===a?null:s.a.createElement(U,{"data-story":"PushMessageContainer",bubbleSize:n,"aria-hidden":o?"false":"true","aria-label":"Chat bot push message",onClick:()=>l(Object(I.F)()),role:"complementary",zIndex:u},s.a.createElement(G,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),l(Object(I.v)())},type:"button"},s.a.createElement(T.e,{color:f,width:W?20:25,height:W?20:25})),s.a.createElement(H,null,"message"===c&&s.a.createElement(K,{text:a}),"takeover"===c&&s.a.createElement(Y,{agent:r})))},J=n(5),Q=(n(49),n(19));const Z=Object(k.b)(["#chatContainer.using-tab &{outline-color:rgb(77,144,254);outline-offset:-2px;outline-style:auto;outline-width:5px;}"]),ee=Object(k.b)(["z-index:15;transition:all 0.2s ease;",";"],e=>e.active&&"transform: rotate(45deg);"),te=Object(k.c)(T.c).withConfig({displayName:"styles__BubbleButton",componentId:"sc-1elsepj-0"})(["&&&{",";overflow:visible;path{stroke-width:2px;stroke:",";fill:",";transition:stroke 0.15s ease;}}"],ee,e=>{let{active:t,$bubbleOutline:n,theme:r,stroke:o}=e;return o||(!t&&n?r.bubbleButtonOutline:r.bubbleButtonBackground||r.buttonBackground)},e=>{let{theme:t,background:n}=e;return n||(t.bubbleButtonBackground||t.buttonBackground)}),ne=k.c.button.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1elsepj-1"})(["z-index:10;overflow:visible;display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer;height:50px;width:50px;padding:9px 8px;text-align:center;border-radius:50%;border:2px solid ",";box-shadow:"," ",";background:",";",";transition:all 0.25s ease;"," @media ","{","}:focus{",";}:hover{background:",";}:focus ","{",";}"," path{",";",";}"],e=>{let{bubbleOutline:t,theme:n,background:r}=e;return r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground||n.buttonBackground)},e=>e.active?"0px 1px 5px 1px":"1px 0px 7px 7px",z.a.shadowColorDark,e=>{let{theme:t,background:n}=e;return n||t.bubbleButtonBackground||t.buttonBackground},e=>{let{background:t}=e;return t?`border-color: ${t}`:void 0},Q.a,z.c.maxTablet,e=>{let{smallBubble:t}=e;return t&&"\n height: 30px;\n width: 30px;\n\n svg {\n width: 45px;\n }\n "},e=>{let{active:t}=e;return!t&&"outline: none;"},e=>{let{background:t,theme:n}=e;return t||n.bubbleButtonBackground||n.buttonBackground},te,e=>{let{active:t}=e;return!t&&Z},te,e=>{let{background:t}=e;return t?`stroke: ${t}`:""},e=>{let{background:t}=e;return t?`fill: ${t}`:""}),re=Object(k.b)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]),oe=k.c.div.withConfig({displayName:"styles__LogoContainer",componentId:"sc-1elsepj-2"})([""," top:calc(50% - 3px);opacity:1;width:calc(100% - 20px);height:calc(100% - 20px);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");transition:all 0.2s ease;",";"],re,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),ae=k.c.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1elsepj-3"})(["",""],re);var ie=n(166),se=n.n(ie);const ce=k.c.img.withConfig({displayName:"ChristmasBubbleButtonstyles__ChristmasBubbleButton",componentId:"sc-tjldpf-0"})(["z-index:15;position:absolute;top:-22px;left:2px;width:84px;opacity:1;transform:rotate(10deg);transition:all 0.2s ease;",";path{fill:",";}"],e=>e.active&&"\n transform: rotate(32deg);\n width: 51px;\n top: -20px;\n left: 9px;\n ",e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""});var le=function(e){let{active:t,bubbleOutline:n}=e;return s.a.createElement(ae,null,s.a.createElement(ce,{src:se.a,active:t?1:0,role:"presentation"}),s.a.createElement(te,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67}))};const ue=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarFront",componentId:"sc-1djbf9y-0"})(["z-index:15;position:absolute;top:-22px;left:32px;width:31px;height:38px;opacity:1;&:focus{outline:none;}transition:all 0.2s ease;",";"],e=>e.active&&"\n width: 18px;\n height: 23px;\n top: -6px;\n left: 29px;\n "),de=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarBack",componentId:"sc-1djbf9y-1"})(["position:absolute;top:-26px;left:24px;width:31px;height:38px;opacity:1;z-index:-1;transition:all 0.2s ease;",";"],e=>e.active&&"\n width: 12px;\n height: 15px;\n top: -8px;\n left: 31px;\n "),fe=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EyesNose",componentId:"sc-1djbf9y-2"})(["z-index:15;position:absolute;top:24px;left:-2px;width:29px;height:24px;opacity:1;transform:rotate(0deg);transition:all 0.2s ease;",";"],e=>e.active&&"\n opacity: 0;\n top: 3px;\n left: -8px;\n width: 19px;\n height: 14px;\n transform: rotate(45deg);\n ");var pe=function(e){let{active:t,bubbleOutline:n}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement(de,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},s.a.createElement(T.f,null)),s.a.createElement(ue,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},s.a.createElement(T.g,null)),s.a.createElement(ae,null,!t&&s.a.createElement(fe,{width:"29px",height:"24px",viewBox:"0 0 29 24",active:t?1:0},s.a.createElement(T.k,null)),s.a.createElement(te,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67,background:"#FFCA3A",stroke:"#FFCA3A"})))};const he=Object(k.c)(T.d).withConfig({displayName:"PrideBubbleButtonstyles__PrideBubbleButton",componentId:"sc-10jy5tk-0"})(["",";path{fill:",";}",":focus &{",";}"],ee,e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""},ne,e=>{let{active:t}=e;return!t&&Z});var me=function(e){let{active:t}=e;return s.a.createElement(ae,null,s.a.createElement(he,{active:t?1:0,width:t?35:65,height:t?37:67}))};var ge=function(e){let{active:t,season:n,bubbleOutline:r,children:o}=e;return n===J.k.PRIDE?s.a.createElement(me,{active:t}):n===J.k.EASTER?s.a.createElement(pe,{active:t,bubbleOutline:r}):n===J.k.CHRISTMAS?s.a.createElement(le,{active:t,bubbleOutline:r}):s.a.createElement(ae,null,s.a.createElement(te,{active:t?1:0,$bubbleOutline:r?1:0,width:t?33:65,height:t?35:67}),o)};var be=function(e){let{title:t,active:n,onClick:r}=e;const{seasonalAppearance:o,bubbleOutline:a,bubbleSize:i,bubbleAvatar:c}=Object(O.d)(A.d),l=(e=>{if(e===J.k.EASTER)return"#ffca3a"})(o);return s.a.createElement(ne,{"aria-label":t,"aria-controls":"ChatButtonContainer",title:t,type:"button",active:n,onClick:r,"data-cy":"chat-bubble-button","data-testid":"chat-button",bubbleOutline:a?1:0,seasonalAppearance:o?1:0,background:l,smallBubble:"SMALL"===i},s.a.createElement(ge,{active:n,season:o,bubbleOutline:a},c?s.a.createElement(oe,{bubbleAvatar:c,active:n,"data-cy":"chat-bubble-logo-container"}):void 0))},ve=n(41),ye=n(51);function we(){const e=Object(O.c)(),{currentLanguage:t,active:n,chatHasStarted:r}=Object(O.d)(A.e),{pushGreetingsEnabled:o,pushGreetings:a}=Object(O.d)(A.d),{defaultLanguage:s}=Object(S.a)();Object(i.useEffect)(()=>{if(!o||!a||n||!t||r)return;const i=window.location.href;a.forEach(n=>{if(Object(ye.a)(i,n.url)&&n.enabled[t]){const r=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"url"!==t&&"autopopup_time"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(ve.a)(a,t,n)}},{}))(n,t,s);return r.autopopupTime=n.autopopup_time,e(Object(I.cb)(r))}return!1})},[n,t,s,o,a,e,r])}const xe=function(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(i=>{setTimeout(()=>{t<=1?a(i):xe(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,a)},n)})})};var Ee=xe,Oe=n(77),ke=n(108),_e=n(9);var Ce=n(2),je=n(102);const Te=k.c.div.withConfig({displayName:"styles__ChatButtonContainer",componentId:"sc-18sln6s-0"})(["position:fixed;bottom:calc(",");right:calc(",");z-index:",";",";"],e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.bottom)&&void 0!==t?t:J.c.bottom} + 10px`},e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.right)&&void 0!==t?t:J.c.right} + 10px`},e=>e.zIndex,e=>e.inPlatform&&"display:flex; align-items: center"),Se=k.c.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-18sln6s-1"})(["height:15px;width:15px;z-index:50;right:0;top:-10px;position:absolute;border-radius:100px;background:",";background-color:",";",";"],z.a.errorColor,z.a.errorColor,D.g),Ie=Object(i.lazy)(()=>Ee(()=>Promise.resolve().then(n.bind(null,243)))),Ae=Object(i.lazy)(()=>Ee(()=>Promise.resolve().then(n.bind(null,244)))),Ne=Object(i.lazy)(()=>Ee(()=>Promise.resolve().then(n.bind(null,245)))),Pe=Object(i.lazy)(()=>Ee(()=>Promise.resolve().then(n.bind(null,247))));var Me=function(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:o,chatSettings:a}=e;const c=Object(O.e)(),l=Object(O.c)(),{active:u,inPlatform:d}=Object(O.d)(A.e),{PAT_HOST:f,PUSHER_KEY:p,VERSION:h}=Object(O.d)(A.g),{show:m}=Object(O.d)(A.q),{feedbackFormOpen:g}=Object(O.d)(A.h),{show:b,nudgeLayout:v}=Object(O.d)(A.o),{bubbleNotification:y,position:w,fullscreenMode:x}=Object(O.d)(A.d),{showBubbleNotification:E}=Object(O.d)(A.b),k=Object(L.a)(),_=u?"Close chat":"Start chat",C=Object(i.useCallback)(()=>l(u?Object(I.h)():Object(I.F)()),[u,l]),T=Object(N.a)(a,"zIndex",15);(u&&E||E&&!k)&&l(Object(I.t)()),u&&m&&l(Object(I.v)()),Object(i.useEffect)(()=>{const e=`${f}/chatbubble/${J.j}/auth/pusher?version=${h}`;Object(j.delayConfiguration)(c,p,{authEndpoint:e,cluster:"eu",encrypted:!0,disableStats:!0,pongTimeout:7500})},[f,p,h,c]),function(){const e=Object(O.c)(),[t,n]=Object(i.useState)("/"),[r,o]=Object(i.useState)(!1),{shownNudges:a}=Object(O.d)(A.e),s=Object(je.a)();Object(i.useEffect)(()=>{n(window.location.href),null!=a&&a.length&&!r&&Array.from(new Set(a).values()).map(e=>s.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>Object(ye.a)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e(Object(I.ob)({slug:t.slug,eventType:Ce.W})),e({type:Ce.x,slug:t.slug})})},[e,t,s,a,r])}(),(()=>{const e=Object(O.c)(),{languages:t}=Object(S.a)(A.d),{currentLanguage:n}=Object(O.d)(A.e);Object(i.useEffect)(()=>{if(n)return;const r=(()=>{var e,n,r;if(1===t.length)return t[0].code;const o=t.find(e=>{var t;let{code:n}=e;return n===(null===(t=document.documentElement.lang)||void 0===t?void 0:t.split("-")[0].toLowerCase())});if(o)return o.code;const a=t.find(e=>{var t;let{code:n}=e;return n===(null===(t=window.navigator.userLanguage||window.navigator.language)||void 0===t?void 0:t.split("-")[0])});if(a)return a.code;const i=null===(e=window.navigator.languages)||void 0===e||null===(n=e.find(e=>t.some(t=>{let{code:n}=t;return(null==e?void 0:e.split("-")[0])===n})))||void 0===n||null===(r=n.split("-"))||void 0===r?void 0:r[0];return i||""})();r&&e(Object(I.R)(r,{skipRestart:!0}))},[n,t,e])})(),we(),function(e){const t=Object(O.c)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=Object(O.d)(A.f),{takenOver:a}=Object(O.d)(A.a),{persistStateLifespan:s}=Object(O.d)(A.d),{botKey:c,active:l,disabledTransports:u,chatHasStarted:d,wasActiveOnLoad:f,inPlatform:p,userIsIdle:h,error:m}=Object(O.d)(A.e),{chatMessages:g,messageSentTime:b}=Object(O.d)(A.n),{labels:v}=Object(O.d)(A.l),[y,w]=Object(i.useState)(!1),[x,E]=Object(i.useState)(!1),k=localStorage.getItem(`kindly-chat-${c}`);Object(i.useEffect)(()=>(window.addEventListener("online",()=>t(Object(I.A)())),window.addEventListener("offline",()=>t(Object(I.B)())),()=>{window.removeEventListener("online",()=>t(Object(I.A)())),window.removeEventListener("offline",()=>t(Object(I.B)()))}),[t]),Object(i.useEffect)(()=>{const n=e.welcomePage.type!==J.s.NONE;!d&&f&&!n&&t(Object(I.eb)())}),Object(i.useEffect)(()=>{l&&d&&!r&&(w(!0),403!==m||n||t(Object(I.m)()))},[l,d,t,m,r,n]),Object(i.useEffect)(()=>{o&&t(Object(I.m)(o))},[o,t]),Object(i.useEffect)(()=>{r&&o&&t(Object(I.o)())},[o,t,r]),Object(i.useEffect)(()=>{const e=l&&d;if(r||y||h||o)return;const a=Object(ke.a)({messageSentTime:b,persistStateLifespan:s});e||n?e&&!n?(w(!0),t(Object(I.m)({shouldGreet:d}))):a&&(w(!0),Object(I.n)(n,u)):!e&&v.length>0&&(w(!0),t(Object(I.m)({shouldGreet:!1})))},[y,l,o,r,n,u,t,g.length,d,h,m,b,s,k,c,v]),Object(i.useEffect)(()=>{y&&r&&w(!1)},[y,r]),Object(i.useEffect)(()=>{if(r&&h&&!a){Object(_e.g)(n);try{Object(j.disconnect)()}catch{}}},[h,r,a,n]),Object(i.useEffect)(()=>(l&&!p&&e.chatbubble.realtime_analytics&&t(Object(Oe.a)(e.id)),Oe.b),[l,t,p,e]),Object(i.useEffect)(()=>{n&&l&&!x&&(t(Object(I.y)()),E(!0))},[l,t,x,n])}(a);const P=(!u||x)&&g,M=!u&&m&&!t&&!g;return s.a.createElement(s.a.Fragment,null,u&&s.a.createElement(Ie,{settings:a}),M&&s.a.createElement(X,{settings:a}),P&&s.a.createElement(Ne,null),!g&&b&&v&&s.a.createElement(Ae,{hidden:t,layout:v,onDismiss:n,onNewsletterSubmit:o,onProductClick:r}),s.a.createElement(Te,{inPlatform:d,position:w,zIndex:T,"data-story":"ChatButtonContainer",id:"ChatButtonContainer"},d&&s.a.createElement(Pe,{active:u}),!u&&y&&E&&s.a.createElement(Se,null),!t&&s.a.createElement(be,{title:_,active:u,onClick:C})))},Le=e=>{if(!e)return!0;return Date.now()-Number(e)>J.m},Re=n(72);var De=n(60),Be=n(167),Fe=n.n(Be);function ze(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var Ue=ze();Ue.withExtraArgument=ze;var He=Ue,$e=n(168),Ve=n.n($e),qe=(e,t)=>Ve()({},e,t);var Ge=(e,t,n)=>qe(e,((e,t)=>e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{}))(t,n));var We=e=>(t,n)=>{const r=qe(t,n);return o=r,e.reduce((e,t)=>{let[n,r]=t;return Ge(e,n,r)},o);var o},Ye=n(59),Ke=n(53);const Xe={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,languages:[],startOverText:"Start over",placeholder:"",typingIndicator:!1,typingDuration:"",isTyping:!1,isTypingTimeoutId:null,feedbackForm:null,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,welcomePage:null,welcomePageType:J.s.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0,heartbeatEnabled:!1};var Je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.sb:return localStorage.removeItem("kindly-chat-has-shown-feedback-form"),{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case Ce.i:{var n;const r=null===(n=null==t?void 0:t.isTyping)||void 0===n||n;return{...e,isTyping:r}}case Ce.I:return{...e,isTyping:t.isTyping,isTypingTimeoutId:t.isTypingTimeoutId,hasInteraction:!0,splitLabelTimestamp:Date.now()};case Ce.hb:return{...e,splitLabelTimestamp:Date.now(),splitTestLabel:t.splitTestLabel};case Ce.Cb:return{...e,splitLabelTimestamp:Date.now()};case Ce.m:return{...e,splitTestLabel:null,hasInteraction:null,splitLabelTimestamp:null};default:return e}};const Qe={botKey:null,inPlatform:!1,chatHasStarted:!1,active:!1,hideInputField:!1,previouslyPoppedUp:!1,currentlyPoppedUp:!1,optionsScreenOpen:!1,currentLanguage:null,startedAt:null,userIsIdle:!1,allGreetingsHideInput:!1,contactDetailsButton:null,uploadButtonWasClicked:null,hasRequestedGreeting:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},error:null};var Ze=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.Z:return{...e,error:t.error};case Ce.eb:return{...e,currentLanguage:t.code};case Ce.sb:return{...e,error:null,botKey:t.botKey||e.botKey,optionsScreenOpen:!1,hideInputField:!1,userIsIdle:!1};case Ce.Y:return{...e,chatHasStarted:t.chatHasStarted,userIsIdle:!t.chatHasStarted&&e.userIsIdle};case Ce.I:{const n=e.hideInputField&&"USER"===t.data.sender;return{...e,chatHasStarted:!0,hideInputField:!!n||t.data.chatbubble_hide_input_field}}case Ce.K:return{...e,active:!0,userIsIdle:!1};case Ce.n:return{...e,active:!1,optionsScreenOpen:!1};case Ce.Q:return{...e,previouslyPoppedUp:!0,currentlyPoppedUp:!0};case Ce.N:return{...e,optionsScreenOpen:!0};case Ce.q:return{...e,optionsScreenOpen:!1};case Ce.H:return{...e,chatId:t.chatId,allGreetingsHideInput:t.allGreetingsHideInput};case Ce.yb:return e;case Ce.bb:return{...e,hasRequestedGreeting:t.hasRequestedGreeting};case Ce.ib:return{...e,startedAt:t.startedAt};case Ce.jb:return{...e,userIsIdle:t.userIsIdle};case Ce.lb:return{...e,contactDetailsButton:t.button};case Ce.D:return{...e,contactDetailsButton:null};case Ce.t:return{...e,shownNudges:(e.shownNudges||[]).concat(t.slug)};case Ce.f:return{...e,attachments:{...e.attachments,buttonClicked:+new Date,exchangeId:t.button.value}};case Ce.X:return{...e,attachments:{...e.attachments,files:t.files}};case Ce.k:return{...e,attachments:{exchangeId:null,buttonClicked:null,files:[]}};case Ce.g:return{...e,attachments:{...e.attachments,buttonClicked:null}};case Ce.x:return{...e,shownNudges:(e.shownNudges||[]).filter(e=>e!==t.slug)};default:return e}};const et={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_WS_HOST:"wss://sage.kindly.ai",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"};var tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.O:return{...e,...t.env};default:return e}};const nt=(e,t)=>({...Xe,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,languages:e.languages,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?J.s.NONE:e.welcomePage.type,maintenanceAlert:e.maintenanceAlert,maintenanceAlertEnabled:!t&&e.maintenanceAlert.alert_enabled,pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,typingDuration:e.typing_duration,disabledTransports:e.disabled_transports,feedbackFormType:t?J.r.NONE:e.feedbackForm.type,feedbackForm:e.feedbackForm,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.bubbleAvatar||null,position:{...J.c,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||J.d,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,noFeedbackAfterHandover:e.no_feedback_after_handover,nudges:e.nudges||[],handoverMode:e.handover_mode,heartbeatEnabled:Boolean(e.chatbubble_heartbeat_enabled),heartbeatTTL:e.chatbubble_heartbeat_ttl_s,splitTestEnabled:e.split_test_enabled,conversionPageUrl:e.conversion_page_url});var rt=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en},ot=n(42);const at=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),it=Object.freeze({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"},WEBSOCKET_DOWN:{en:"There seems to be an issue with the connection, attempting to reconnect...",nb:"Det ser ut til å være et problem med tilkoblingen. Prøver å koble opp igjen..."}});var st=e=>t=>n=>{switch(n.type){case Ce.w:return((e,t,n,r)=>{const{announcement:o,bot:a,chatbubble:i}=t;if(o.show)return n(r);const s={text:rt(0,i,e),alertType:at.WARNING};return n({type:Ce.d,payload:s}),n(r)})(it.OFFLINE,e.getState(),t,n);case Ce.r:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:Ce.c}),o.connected||t(Object(ot.c)()),t(n)}default:return t(n)}};var ct=e=>t=>n=>{if(n.type!==Ce.I)return t(n);const{chatbubble:{active:r,currentLanguage:o}}=e.getState();if("greeting"===n.data.exchange_type||n.data.triggered_chat_start){const e=n.data.chat_language_code;o!==e&&t({type:Ce.eb,code:e})}if(("boolean"==typeof n.displayTypingIndicator?n.displayTypingIndicator:!n.data.from_bot)?Object(I.Q)()(t,e.getState):Object(I.rb)()(t,e.getState),!n.data.from_bot&&n.data.was_anonymized)return t({type:Ce.e,data:n.data});if(!n.data.from_bot)return t(n);return!r&&"AGENT"!==n.data.sender&&"SYSTEM"!==n.data.sender&&"greeting"!==n.data.exchange_type&&t({type:Ce.K}),t(n)},lt=e=>t=>n=>{switch(n.type){case Ce.I:{const{bot:{typingDuration:r,typingIndicator:o},agent:{takenOver:a},chatbubble:{chatHasStarted:i}}=e.getState(),{isContactDetails:s,sender:c,from_bot:l,created:u}=n.data;if(!o||a||!i||c===J.l.SYSTEM||s)return t({...n,displayTypingIndicator:!1});if(Object(I.Q)()(t,e.getState),!l)return t(n);const d=r-((new Date).getTime()-Object(Ye.a)(u).getTime());return setTimeout(()=>{t(n)},d>0?d:0)}default:return t(n)}};var ut=e=>t=>n=>{const{bot:{typingDuration:r,typingIndicator:o}}=e.getState(),a=o?Math.max(5e3,r):5e3;return n.type===Ce.H&&setTimeout(()=>t(Object(I.I)()),a),n.type===Ce.I&&n.data.from_bot?(t(Object(I.q)()),t(Object(I.c)()),t(n)):t(n)};const dt={names:[],avatars:[],isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedTakeover:!1,hasHadHandover:!1};var ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.ub:{const n=t.data.taken_over&&!e.takenOver,r=!t.data.taken_over&&e.takenOver;return n?{...e,requestedTakeover:!1,takenOver:!0,isTyping:!1,hasHadHandover:!0}:r?{...e,requestedTakeover:!1,takenOver:!1,isTyping:!1}:e}case Ce.I:return{...e,isTyping:!1};case Ce.a:return{...e,isTyping:!0};case Ce.b:return{...e,isTyping:!1};case Ce.Db:return{...e,userIsTyping:!0};case Ce.Eb:return{...e,userIsTyping:!1};case Ce.wb:return{...e,requestedTakeover:t.requestedTakeover,takeoverClosed:t.closed||!1};case Ce.vb:return{...e,requestedTakeover:!1};case Ce.T:return{...e,hasHadHandover:!1};default:return e}};const pt={showTabNotification:!1,showBubbleNotification:!1};var ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.I:if(!t.data.from_bot||"SYSTEM"===t.data.sender)return e;return"visible"===document.visibilityState?{showBubbleNotification:!0}:{showTabNotification:!0};case Ce.qb:return{showTabNotification:!0};case Ce.kb:return{showBubbleNotification:!0};case Ce.z:return{...pt};default:return e}};const mt={show:!1,text:null,url:null,type:null};var gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.d:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case Ce.c:return mt;default:return e}};const bt={isAuthenticated:!1,token:null,avatarUrl:null,fullName:null,isRefreshing:!1,getAuthToken:null};var vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.h:return{...e,isAuthenticated:!0,token:t.token,avatarUrl:t.avatarUrl,fullName:t.fullName};case Ce.E:return{...e,avatarUrl:t.avatarUrl,fullName:t.fullName};case Ce.zb:return{...e,...bt};case Ce.tb:return{...e,isRefreshing:!0};case Ce.C:return{...e,isRefreshing:!1};default:return e}};const yt={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0,heartbeatId:void 0};var wt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.J:return{...e,token:t.token};case Ce.sb:case Ce.V:return{...e,token:null};case Ce.r:return{...e,connected:!0};case Ce.w:return{...e,connected:!1};case Ce.R:return{...e,pusherConnected:!0};case Ce.S:return{...e,pusherConnected:!1};case Ce.s:return{...e,connectTriggerConfig:t.triggerConfig};case Ce.cb:return{...e,heartbeatId:t.heartbeatId};default:return e}};const xt={inspectorOpen:!1,currentMessageId:null};var Et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.db:return{...e,currentMessageId:t.chatMessageId};case Ce.xb:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};const Ot={token:null,feedbackFormOpen:!1};var kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ot,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.L:return{...e,feedbackFormOpen:!0,token:t.token};case Ce.o:return Ot;default:return e}},_t=n(78);const Ct={context:{},labels:[]};var jt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ct,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _t.a:return{...e,context:{...e.context,...t.context}};case _t.b:return{...e,labels:[...new Set([...e.labels,t.label])]};case Ce.sb:case Ce.V:return{...e,labels:[]};default:return e}};const Tt={show:!1,textContent:null,linkText:null,linkLocation:null,dismissed:!1};var St=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.nb:return{show:!0,textContent:t.textContent,linkText:t.linkText,linkLocation:t.linkLocation};case Ce.y:return{...Tt,dismissed:!0};default:return e}},It=n(97),At=n(103),Nt=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,[Object(At.a)(n)]:r}},{})},Pt=e=>Boolean(e.find(e=>{let{exchange_type:t}=e;return"greeting"===t})),Mt=n(99),Lt=n(96);const Rt={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null},Dt=e=>{let{id:t}=e;return t},Bt=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},Ft=(e,t,n)=>e.map(e=>t(e)?n(e):e);var zt=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case Ce.I:{const{chatMessages:e}=o,{data:t,force:n=!1}=a;return"greeting"===Object(N.a)(t,"exchange_type")&&Pt(e)?o:n||Object(Mt.a)(e)(t)?Ge(o,"chatMessages",[...e,t]):o}case Ce.sb:return Rt;case Ce.e:{const{chatbubble_temporary_id:e,id:t}=a.data,n=n=>{let{id:r}=n;return Object(l.a)(r,[e,t])},r=e=>({...e,message:a.data.message});return{...o,chatMessages:Ft(o.chatMessages,n,r)}}case Ce.gb:return{...o,messageSentTime:a.messageSentTime};case Ce.Bb:{var i;const{created:e,id:t,temporaryId:n}=a,{chatMessages:r}=o,s=null!==(i=null==a?void 0:a.status)&&void 0!==i?i:null,c=r.findIndex(e=>{let{id:t}=e;return t===n});if(c<0)return o;const l=r[c],u={...l,created:e||l.created,id:t||l.id,status:s},d=r.map((e,t)=>t!==c?e:u);return{...o,chatMessages:d}}case Ce.P:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,pattern_context_match:n});return{...o,chatMessages:Ft(o.chatMessages,r,i)}}case Ce.rb:{const{chatMessageId:e,chatMessageTempId:t,correctedMessage:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,corrected_message:n});return{...o,chatMessages:Ft(o.chatMessages,r,i)}}case Ce.j:var s;return a.force||Object(It.a)(o.buttonClicks)(a.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],a.buttonClick]}:o;case Ce.fb:return{...o,lastMessageSeen:Object(Lt.a)(a,["id","index"])};case Ce.G:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=a.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(Nt))||[]]};case Ce.Ab:{const e=Nt(a.attachment),t=Bt(e),n=t=>({...t,...e});return{...o,attachments:Ft(o.attachments,t,n)}}case Ce.F:{var c;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=a.data,r=e.map(Nt),i=(null!==(c=o.attachments)&&void 0!==c?c:[]).map(e=>{const t=r.find(Bt(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},a=e=>({...e,id:n,attachment_ids:r.map(Dt)});s=Ft(o.chatMessages,e,a)}return{...o,attachments:i,chatMessages:s}}case Ce.ab:return null!==(r=a.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[a.formData.formKey]:a.formData}}:o;default:return o}};const Ut={chatDeleted:!1};var Ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ut,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.v:return{...e,chatDeleted:!0};case Ce.Y:return{...e,chatDeleted:!t.chatHasStarted&&e.chatDeleted};case Ce.sb:return{...e,chatDeleted:!1};default:return e}},$t=n(71);const Vt={show:!1,text:null,agent:null,dismissed:!1,type:$t.a.MESSAGE,dismissedMessages:[]};var qt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.ub:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:$t.a.TAKEOVER}:e;case Ce.I:return Object(L.a)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:$t.a.MESSAGE};case Ce.pb:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case Ce.B:return{...e,show:!1,dismissed:!0};case Ce.U:return Vt;default:return e}},Gt=n(24);const Wt={takeoverPollIntervalId:null,takeoverRequestPollIntervalId:null,replyTimeoutId:null,replyTimeoutAttempts:0};var Yt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Gt.e:return{...e,takeoverPollIntervalId:t.takeoverPollIntervalId};case Gt.f:return{...e,takeoverRequestPollIntervalId:t.takeoverRequestPollIntervalId};case Gt.d:return{...e,replyTimeoutId:t.replyTimeoutId,replyTimeoutAttempts:t.replyTimeoutAttempts};case Gt.b:return{...e,takeoverPollIntervalId:null};case Gt.c:return{...e,takeoverRequestPollIntervalId:null};case Gt.a:return{...e,replyTimeoutId:null,replyTimeoutAttempts:0};default:return e}};const Kt={open:!1,imageUrl:""};var Xt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.M:return{...e,open:!0,imageUrl:t.imageUrl};case Ce.p:return{...e,open:!1,imageUrl:""};default:return e}};const Jt={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:J.i.TEMPLATE,hasInteraction:!1};var Qt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce.A:return{...e,show:!1,nudgeLayout:{},hasInteraction:!0};case Ce.ob:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:J.i.TEMPLATE,trackEvent:t.trackEvent,hasInteraction:!0};case Ce.mb:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:J.i.CUSTOM,trackEvent:t.trackEvent,hasInteraction:!0};case Ce.l:return{...e,hasInteraction:!1};default:return e}};const Zt=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,traceLimit:25})||De.d,en=Object(L.a)(),tn=function(){let{url:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e||"").startsWith("data:")?t:{...t,url:e}},nn=e=>{if(Object(N.a)(e,"bot.includeDisabledLanguages",!1))return e;const t=Object(N.a)(e,"chatbubble.currentLanguage"),n=Object(N.a)(e,"bot.languages",[]).find(e=>{let{code:n}=e;return n===t});return Object(N.a)(n,"active",!1)?e:qe(e,{chatbubble:{currentLanguage:null}})};var rn=e=>{let{botKey:t,settings:n,persist:o=!0,initialStateModifier:a}=e;const{language:i,inPlatform:s}=n,c=[ut,st,lt,ct,He];const l=`kindly-chat-${t}`,u=(e=>e?()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:Qe.currentlyPoppedUp,allGreetingsHideInput:Qe.allGreetingsHideInput,contactDetailsButton:Qe.contactDetailsButton,attachments:Qe.attachments,shownNudges:e.chatbubble.shownNudges},connection:{token:e.connection.token,connected:!0,pusherConnected:!1},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars,requestedTakeover:e.agent.requestedTakeover,takenOver:e.agent.takenOver},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(tn),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},local:{labels:e.local.labels}}):(localStorage.removeItem("kindly-chat-has-shown-feedback-form"),()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars}})))((e=>e.inPlatform||0!==e.chatbubble.persist_state_lifespan_seconds)(n)),d=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))}}(nn,(e=>t=>{var n,r,o;const a=(null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).sort((e,t)=>Object(Ye.a)(e.created).getTime()-Object(Ye.a)(t.created).getTime()).slice(1))||[],i=null!==(r=null==a||null===(o=a[0])||void 0===o?void 0:o.chat_language_code)&&void 0!==r?r:null;return qe(t,{chatbubble:{currentLanguage:i||e}})})(i),(e=>t=>{const n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!en)||Boolean(e.chatbubble.keep_open_mobile&&en));return qe(t,{chatbubble:{active:n,wasActiveOnLoad:n}})})(n),(e=>{let{inPlatform:t,botKey:n}=e;const r=[["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t});return We(r)})({inPlatform:s,botKey:t})),f=Zt(Object(De.a)(...c),o?Fe()(null,{key:l,slicer:u,merge:d}):e=>e);let p=(e=>{let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:a,environment:i,getAuthToken:s}}=e;return{bot:nt(n,o),chatbubble:{...Qe,botKey:t,inPlatform:o,admin:a,renderedBy:n.renderedBy||"REACT"},local:{context:r,labels:[]},environment:{...et,VERSION:Ke.a,...i},auth:{getAuthToken:s}}})({botKey:t,settings:n});return a&&(p=qe(p,a)),Object(De.e)(Object(De.c)(r),p,f)},on=()=>{const[e,t]=Object(i.useState)(!1),{conversionPageUrl:n}=Object(O.d)(A.d),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=Object(i.useState)(null);if(!n)return null;const a=setInterval(()=>{const t=document.querySelector(e);t&&(o(t),clearInterval(a))},500);return r})("#klarna-checkout-iframe",{enable:null==n?void 0:n.match(/klarna/gi)}),o=Object(i.useRef)(null),a=Object(i.useCallback)(e=>{var n;const r=e.getAttribute("src")||"",o=(e=>{try{return JSON.parse(e)}catch(e){return 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 Object(i.useEffect)(()=>{r&&!o.current&&(a(r),o.current=setInterval(()=>a(r),500))},[r,o,a]),Object(i.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e};var an=n(33);var sn=e=>{var t,n,r,o,a,i,s,c,l,u,d,f,p,h,m,g,b,v,y,w,x,E,O,k,_,C,j,T,S;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatLogElements:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chat_log_elements)&&void 0!==n?n:"#333333",background:null!==(o=null==e||null===(a=e.style)||void 0===a?void 0:a.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(i=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==i?i:"#0069ff",buttonBackground:null!==(c=null==e||null===(l=e.style)||void 0===l?void 0:l.color_button_background)&&void 0!==c?c:"#0069ff",bubbleButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_bubble_button_background)&&void 0!==u?u:"#0069ff",buttonText:null!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_button_text)&&void 0!==f?f:"#ffffff",headerBackground:null!==(h=null==e||null===(m=e.style)||void 0===m?void 0:m.color_header_background)&&void 0!==h?h:"#0069ff",headerText:null!==(g=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_text)&&void 0!==g?g:"#ffffff",inputBackground:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_input_background)&&void 0!==v?v:"#ffffff",inputText:null!==(w=null==e||null===(x=e.style)||void 0===x?void 0:x.color_input_text)&&void 0!==w?w:"#333333",userMessageBackground:null!==(E=null==e||null===(O=e.style)||void 0===O?void 0:O.color_user_message_background)&&void 0!==E?E:"#f5f5f5",userMessageText:null!==(k=null==e||null===(_=e.style)||void 0===_?void 0:_.color_user_message_text_color)&&void 0!==k?k:"#2c2c2c",botMessageBackground:null!==(C=null==e||null===(j=e.style)||void 0===j?void 0:j.color_bot_message_background)&&void 0!==C?C:"#f5f5f5",botMessageText:null!==(T=null==e||null===(S=e.style)||void 0===S?void 0:S.color_bot_message_text_color)&&void 0!==T?T:"#2c2c2c"}};function cn(e){let{settings:t}=e;const n=Object(O.c)(),{inPlatform:r}=Object(O.d)(A.e),{canShow:o}=function(){const{splitTestEnabled:e,splitTestLabel:t,splitLabelTimestamp:n}=Object(O.d)(A.d),r=Object(O.c)(),o=Object(i.useCallback)(()=>{r(Object(I.sb)())},[r]),a=Object(Re.a)(o,2500);return Object(i.useEffect)(()=>{function t(){a()}return e&&window.addEventListener("mousemove",t),()=>e?window.removeEventListener("mousemove",t):void 0},[e]),Object(i.useEffect)(()=>{n&&Le(n)&&r(Object(I.f)())},[n]),Object(i.useEffect)(()=>{let n=t||J.o.NO_SPLIT_LABEL;e&&!t&&(n=Math.random()>.5?J.o.SPLIT_A:J.o.SPLIT_B),t||r(Object(I.X)(n))},[e,t]),{canShow:e&&["A","X"].indexOf(t)>-1||!e,splitTestLabel:t}}();return(()=>{const e=Object(O.c)(),[t,n]=Object(i.useState)("/"),{conversionPageUrl:r,splitTestLabel:o,hasInteraction:a,splitTestEnabled:s}=Object(O.d)(A.d),c=on(),l=Object(i.useCallback)(()=>{if(!Le(localStorage.getItem("kindly-last-conversion-timestamp")))return;const t=s&&o,n=!a;localStorage.setItem("kindly-last-conversion-timestamp",Number(new Date)),e(Object(I.nb)(t,n)),e(Object(I.f)())},[e,o,a,s]);Object(i.useEffect)(()=>{c&&l()},[l,c]),Object(i.useEffect)(()=>{n(window.location.href),null!=r&&r.trim()&&Object(ye.a)(t,r)&&l()},[l,t,r])})(),Object(i.useEffect)(()=>{o&&t.chatbubble.autopopup&&!Object(L.a)()&&!r&&setTimeout(()=>n(Object(I.b)()),t.chatbubble.autopopup_time)},[n,r,t,o]),o?s.a.createElement(Me,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick}):null}let ln=!1;const un=Object(i.forwardRef)((e,t)=>{let{botKey:r,settings:o}=e;const a=rn({botKey:r,settings:o});return Object(i.useImperativeHandle)(t,()=>({openChat(){a.dispatch(Object(I.F)())},closeChat(){a.dispatch(Object(I.h)())},triggerDialogue(e,t){a.dispatch(Object(I.qb)(e,t))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;a.dispatch(Object(I.bb)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;a.dispatch(Object(I.Z)({content:t,slug:n,onRendered:r,trackEvent:o}))},closeNudge(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.dispatch(Object(I.u)(e,t,n))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(a.dispatch(Object(an.e)({slug:e,eventType:Ce.W})),a.dispatch({type:Ce.x,slug:e}),sessionStorage.setItem("kindly-nudge-completion",!0))},closeFeedback(){a.dispatch(Object(I.i)())},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.dispatch(Object(an.f)(e))},identifyUser(e){a.dispatch(Object(I.z)(e))},setNewContext(e){a.dispatch(Object(I.V)(e))},setNewLabel(e){a.dispatch(Object(I.W)(e))},cancelHandover(){a.dispatch(Object(I.d)())}})),Object(i.useEffect)(()=>{Object(_.b)(o)},[o]),Object(i.useEffect)(()=>{const{persistStateLifespan:e,heartbeatEnabled:t}=a.getState().bot;if(t)return;if(-1===e||e>0)return;let n=!1;const o=()=>{n||(n=!0,a.dispatch(Object(I.tb)(r)))};window.onbeforeunload=o,window.onunload=o},[r,o,a]),Object(i.useEffect)(()=>{!ln&&o.track_utm&&(ln=!0,Promise.resolve().then(n.bind(null,242)).then(e=>{let{default:t}=e;const n=t();n&&a.dispatch(Object(I.V)({...n}))}))},[o,a]),window.Cypress&&(window.store=a),s.a.createElement(O.a,{store:a},s.a.createElement(k.a,{theme:sn(o)},s.a.createElement(C.a,{errorPoint:"inside ChatContainer",displayError:!1},o.user_idle_timeout_seconds>0?s.a.createElement(E,{onIdle:()=>a.dispatch(Object(I.E)()),onActive:()=>a.dispatch(Object(I.D)(o.id)),timeout:1e3*o.user_idle_timeout_seconds},s.a.createElement(cn,{settings:o})):s.a.createElement(cn,{settings:o}))))});un.displayName="ChatContainer";var dn=un,fn=n(58),pn=n.n(fn),hn=n(52);var mn=(e,t)=>{const[n,r]=Object(i.useState)(t||{}),o=Object(i.useCallback)(async()=>{try{var n;const o=await async function(e,t){const n=Object(hn.b)();return Ee(()=>pn.a.get(`${e}/settings/${t}.json`,{params:{version:Ke.a,[hn.a]:n}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}((null===(n=t.environment)||void 0===n?void 0:n.SETTINGS_HOST)||"https://chat.kindlycdn.com",e),{welcome_page:a,feedback_form:i,maintenance_alert:s,notifications:c,settings:l,...u}=o.data,d={...u,...l,...c,feedbackForm:i,welcomePage:a,maintenanceAlert:s};r(e=>qe(qe(d,e),t))}catch(e){var o,a;const t=null!==(o=e.response)&&void 0!==o&&null!==(a=o.data)&&void 0!==a&&a.error?e.response.data.error:e;console.error("Kindly chat failed to initialize.",t)}},[e,t]);return Object(i.useEffect)(()=>{o()},[o]),n};var gn=function(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const a=mn(n,o);if(!a.id)return null;const i=[((null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081").match("^https?://(([^:/?#]*)(?::([0-9]+))?)")[2],"*.kindly.ai","demokind.ly","*.demokind.ly",...a.chatbubble.domains];return a.chatbubble.inPlatform||u(window.location.hostname,i)?s.a.createElement(dn,{ref:r,botKey:n,settings:a}):(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)};t.default=function(e){let{botKey:t,setKindlyChatRef:n,options:r}=e;return s.a.createElement(i.Suspense,{fallback:""},s.a.createElement(gn,{botKey:t,setKindlyChatRef:n,options:r}))}},function(e,t,n){"use strict";var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function c(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}t.a=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return c(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));Math.pow(10,8);var r=n(14),o=n(28);function a(e,t){var n;Object(r.a)(1,arguments);var a=Object(o.a)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i,s=u(e);if(s.date){var c=d(s.date,a);i=f(c.restDateString,c.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var l,p=i.getTime(),m=0;if(s.time&&(m=h(s.time),isNaN(m)))return new Date(NaN);if(!s.timezone){var b=new Date(p+m),v=new Date(0);return v.setFullYear(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()),v.setHours(b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds()),v}return l=g(s.timezone),isNaN(l)?new Date(NaN):new Date(p+m+l)}var i={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},s=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u(e){var t,n={},r=e.split(i.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],i.timeZoneDelimiter.test(n.date)&&(n.date=e.split(i.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=i.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}function d(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?o:100*a,restDateString:e.slice((r[1]||r[2]).length)}}function f(e,t){if(null===t)return new Date(NaN);var n=e.match(s);if(!n)return new Date(NaN);var r=!!n[4],o=p(n[1]),a=p(n[2])-1,i=p(n[3]),c=p(n[4]),l=p(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,c,l)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,a=7*(t-1)+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}(t,c,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(b[t]||(v(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(v(e)?366:365)}(t,o)?(u.setUTCFullYear(t,a,Math.max(o,i)),u):new Date(NaN)}function p(e){return e?parseInt(e):1}function h(e){var t=e.match(c);if(!t)return NaN;var n=m(t[1]),r=m(t[2]),o=m(t[3]);return function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,o)?36e5*n+6e4*r+1e3*o:NaN}function m(e){return e&&parseFloat(e.replace(",","."))||0}function g(e){if("Z"===e)return 0;var t=e.match(l);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,o)?n*(36e5*r+6e4*o):NaN}var b=[31,null,31,30,31,30,31,31,30,31,30,31];function v(e){return e%400==0||e%4==0&&e%100!=0}},,function(e,t,n){"use strict";n.r(t);var r=n(169),o=n.n(r),a=n(17);const i=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);t.default=()=>{const e=new o.a(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&Object(a.a)(n.toUpperCase().substring(4),i)?{...e,[n]:r}:e},null);if(t)window.sessionStorage.setItem("kindly-chat-utm",JSON.stringify(t));else{const e=window.sessionStorage.getItem("kindly-chat-utm");t=e?JSON.parse(e):null}return t}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),a=n(0),i=n.n(a),s=n(3),c=n(1),l=n(23),u=n(6);const d=Object(c.b)(["bottom:",";right:",";@media ","{right:0;}max-height:730px;"],e=>e.position.bottom,e=>e.position.right,u.c.maxPhone),f=Object(c.b)(["bottom:0px;right:0px;top:0px;width:100%;"]),p=c.c.div.withConfig({displayName:"KindlyChatstyles__ChatContainer",componentId:"sc-1y4lzsi-0"})(["position:fixed;font-size:16px;text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;z-index:",";font-family:",";"," *{box-sizing:border-box;",";}@media ","{display:flex;width:100%;max-height:unset;align-items:center;justify-content:center;",";}"],e=>e.zIndex+5,e=>{let{theme:t}=e;return t.customFont?t.customFont:l.a.default},e=>e.fullscreen?f:d,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},u.c.maxTablet,e=>{let{active:t}=e;return t&&"height: 100%;\n bottom: 0;\n right: 0;\n left: 0;\n top: 0"});var h=n(10),m=n(19);const g=c.c.button.withConfig({displayName:"styles__CloseIconButton",componentId:"sc-96uqai-0"})(["position:absolute;z-index:",";top:24px;right:24px;background:none;border:none;cursor:pointer;",""],e=>e.zIndex+10,m.a),b=c.c.div.withConfig({displayName:"styles__LightBox",componentId:"sc-96uqai-1"})(["position:fixed;background:rgba(0,0,0,0.5);top:0;right:0;bottom:0;left:0;z-index:",";display:flex;align-items:center;justify-content:center;"],e=>e.zIndex+9),v=c.c.img.withConfig({displayName:"styles__LightBoxImage",componentId:"sc-96uqai-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]);var y=n(5),w=n(7),x=n(11);const E=Object(c.d)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),O=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),E),k=Object(c.d)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),_=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),k),C=Object(c.b)(["",";right:unset;bottom:unset;transition:width 300ms ease 0ms,height 300ms ease 0ms;"],e=>e.chatHasStarted?"width: 100%;\n height: 100%;\n ":"width: 90%;\n height: 95%;\n border-radius: 6px;"),j=Object(c.b)(["max-height:",";height:",";width:",";"],e=>e.fullscreen?"100%":"645px",e=>e.fullscreen?"100%":"645px",e=>e.fullscreen?"100%":"360px"),T=Object(c.b)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>e.offsetHeight),S=Object(c.b)(["bottom:0px;right:0px;border-radius:0px;"]),I=Object(c.b)([""," "," ",""],e=>e.fullscreen?S:T,e=>e.active?j:Object(x.h)(),e=>!e.fullscreen&&!e.chatHasStarted&&(e=>e.active?O:_)(e)),A=Object(c.b)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;background-color:#ffffff;>:last-child{margin:auto 20px 20px;}"]),N=c.c.div.withConfig({displayName:"styles__ChatBoxContainer",componentId:"sc-1usve4j-0"})(["position:absolute;z-index:20;overflow:hidden;flex-direction:column;box-shadow:0px 8px 48px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.16),0px 4px 8px rgba(0,0,0,0.04);display:",";@media ","{",";","}@media ","{visibility:",";",";}"],e=>e.hide?"none":"flex",u.c.minTablet,I,e=>{let{inspectorContainer:t}=e;return t&&A},u.c.maxTablet,e=>e.active?"visible":"hidden",C);var P=n(13);const M=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1iatydl-0"})(["margin:20px;display:flex;flex-direction:column;"]),L=c.c.hr.withConfig({displayName:"styles__Separator",componentId:"sc-1iatydl-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),R=c.c.button.withConfig({displayName:"styles__Navigation",componentId:"sc-1iatydl-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;}"]),D=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-1iatydl-3"})(["display:flex;align-items:baseline;font-size:13px;",""],e=>{let{spaceBetween:t}=e;return t?"justify-content: space-between;":""}),B=c.c.div.withConfig({displayName:"styles__Slot",componentId:"sc-1iatydl-4"})(["padding:1px 3px;border-radius:3px;font-size:12px;margin-right:5px;background:rgba(255,74,156,0.25);"]),F=c.c.span.withConfig({displayName:"styles__Dot",componentId:"sc-1iatydl-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),z=c.c.span.withConfig({displayName:"styles__Corrected",componentId:"sc-1iatydl-6"})(["border-bottom:1px dotted red;"]),U=c.c.span.withConfig({displayName:"styles__Arrow",componentId:"sc-1iatydl-7"})(["margin:0 5px;color:gray;"]),H=c.c.div.withConfig({displayName:"styles__Label",componentId:"sc-1iatydl-8"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:12px;margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""}),$=c.c.a.withConfig({displayName:"styles__Link",componentId:"sc-1iatydl-9"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]),V=()=>{};var q=function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(M,null,i.a.createElement(P.c,null,"No messages yet!")),i.a.createElement(D,{spaceBetween:!0},i.a.createElement(R,{disabled:!0,onClick:V},"Show previous"),i.a.createElement(R,{disabled:!0,onClick:V},"Show next")))},G=(n(57),n(17));const{SAMPLE_MATCH:W,KEYWORD_EXACT_MATCH:Y,KEYWORD_MENTION:K,PATTERN_MATCH:X,ZODIAC:J}=y.f,Q=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," ");var Z=function(e){let{handler:t,score:n,exchangeType:r,sender:o,fromWebhook:a,label:s}=e;return"string"==typeof s?i.a.createElement(H,null,s):Object(G.a)(t,[W,J])&&n?i.a.createElement(H,{filled:!0,title:"Confidence score"},`${Math.round(100*n)} %`):Object(G.a)(t,Object.values(y.f))?i.a.createElement(H,null,(e=>{switch(e){case W:case J:return"sample";case X:return"pattern";case Y:case K:return"keyword";default:return Q(e)}})(t)):a?i.a.createElement(H,null,"webhook"):"string"==typeof r?i.a.createElement(H,null,Q(r)):Object(G.a)(o,Object.values(y.l))?i.a.createElement(H,null,Q(o)):null};n(49);const ee=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;if(!t||!n||!r)return null;return`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`};var te=function(e){let{children:t,url:n}=e;return n?i.a.createElement($,{target:"_blank",rel:"noopener noreferrer",href:n},t):t};var ne=function(e){let{botId:t,exchangeType:n,exchangeId:r,children:o}=e;const a=ee({botId:t,exchangeType:n,exchangeId:r});return i.a.createElement(te,{url:a},i.a.createElement(D,null,o))};const re=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`;var oe=function(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:a,message:s,exchangeType:c,exchangeId:l,botId:u,isFollowup:d,sender:f}=e;return i.a.createElement(M,null,i.a.createElement(P.c,null,"Message info"),t&&i.a.createElement(D,{spaceBetween:!0},a&&i.a.createElement(ne,{botId:u,exchangeType:c,exchangeId:l},i.a.createElement(F,null),i.a.createElement("span",null,re(a,40))),!a&&i.a.createElement("span",null,re(s,40)),i.a.createElement(D,null,i.a.createElement(Z,{handler:r,score:o,exchangeType:c,exchangeId:l,sender:f,fromWebhook:n}),d&&i.a.createElement(Z,{exchangeType:"followup"}))),!t&&i.a.createElement(D,{spaceBetween:!0},re(s,40),i.a.createElement(Z,{label:"user"})))};var ae=function(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return i.a.createElement(M,null,i.a.createElement(P.c,null,"Slot / Pattern context"),i.a.createElement(D,null,i.a.createElement(B,null,n),i.a.createElement("span",null,r)))};n(122);var ie=function(e){let{replyCandidates:t,botId:n}=e;const r=Object(a.useMemo)(()=>t.filter(e=>{let{selected:t,samle:n,title:r}=e;return!t&&(n||r)}),[t]);return 0===(null==r?void 0:r.length)?null:i.a.createElement(M,null,i.a.createElement(P.c,null,"Potential dialogues"),r.map(e=>{let{_id:t,score:r,sample:o,title:a,dialogue_id:s}=e;return i.a.createElement(te,{key:`reply-candidate-${t}`,url:ee({botId:n,exchangeType:"usersays",exchangeId:s})},i.a.createElement(D,null,i.a.createElement(Z,{handler:y.f.SAMPLE_MATCH,score:r}),i.a.createElement(F,null),i.a.createElement("span",null,o||a)))}))};var se=function(e){let{correctedMessage:t,message:n}=e;return i.a.createElement(M,null,i.a.createElement(P.c,null,"Spelling correction / Greeting removed"),i.a.createElement(D,null,i.a.createElement(z,null,n),i.a.createElement(U,null,"→"),i.a.createElement("span",null,t)))};var ce=function(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:a,from_bot:c,bot_id:l,from_webhook:u,reply_candidates:d,exchange_type:f,exchange_id:p,is_followup:h,corrected_message:m,pattern_context_match:g}}=e;const{admin:b}=Object(s.d)(w.e),v=Object.keys(g||{}).length>0,y=b&&m&&m!==t;return i.a.createElement(i.a.Fragment,null,i.a.createElement(oe,{handler:o,fromBot:c,fromWebhook:u,score:n,title:r,message:t,exchangeType:f,exchangeId:p,botId:l,isFollowup:h,sender:a}),i.a.createElement(L,null),v&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ae,{patternContextMatch:g}),i.a.createElement(L,null)),y&&i.a.createElement(i.a.Fragment,null,i.a.createElement(se,{correctedMessage:m,message:t}),i.a.createElement(L,null)),(null==d?void 0:d.length)>1&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ie,{replyCandidates:d,botId:l}),i.a.createElement(L,null)))};function le(e){const t=Object(a.useRef)();return Object(a.useEffect)(()=>{t.current=e},[e]),t.current}var ue=n(8);var de=function(){const{active:e,chatHasStarted:t}=Object(s.d)(w.e),{currentMessage:n,nextMessage:r,prevMessage:o,isFirstMessage:c,isLastMessage:l}=(()=>{var e,t;const n=Object(s.c)(),{chatMessages:r}=Object(s.d)(w.n),{currentMessageId:o}=Object(s.d)(w.j),i=o||(null===(e=r.slice(-1)[0])||void 0===e?void 0:e.id),c=r.findIndex(e=>{let{id:t}=e;return t===i}),l=Object(a.useCallback)(()=>{n(Object(ue.T)(r[c+1].id))},[r,c,n]),u=Object(a.useCallback)(()=>{n(Object(ue.T)(r[c-1].id))},[r,c,n]),d=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,f=le(d),p=0===c,h=c===d-1;return Object(a.useEffect)(()=>{d>f&&n(Object(ue.T)())},[n,d,f]),{currentMessage:r[c],nextMessage:l,prevMessage:u,isFirstMessage:p,isLastMessage:h}})();return i.a.createElement(N,{chatHasStarted:t,active:e,"aria-hidden":e?"false":"true","data-testid":"chat-box-inspector","data-cy":"chat-box-inspector",fullscreen:0,offsetHeight:"205px",inspectorContainer:!0},n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ce,{chatMessage:n}),i.a.createElement(D,{spaceBetween:!0},i.a.createElement(R,{disabled:c,onClick:o},"Show previous"),i.a.createElement(R,{disabled:l,onClick:r},"Show next"))),!n&&i.a.createElement(q,null))},fe=n(12);const pe=c.c.div.withConfig({displayName:"styles__AnnouncementContainer",componentId:"sc-xw79eu-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:",";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:15px;margin-right:7px;}"],u.a.shadowColor,u.a.warningColor,u.a.warningColor,u.d.fontSizeP,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"}),he=c.c.div.withConfig({displayName:"styles__AnnouncementText",componentId:"sc-xw79eu-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),me=Object(c.c)(fe.d).withConfig({displayName:"styles__AnnouncementLink",componentId:"sc-xw79eu-2"})(["color:#0063a2;"]);var ge=function(){const{text:e,url:t,show:n}=Object(s.d)(w.c);return n?i.a.createElement(pe,{show:n},i.a.createElement(he,null,i.a.createElement("span",null,"!"),e),t&&i.a.createElement(me,{target:"_blank"},"url")):null},be=n(20),ve=n(14);function ye(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e);return t.setHours(0,0,0,0),t}function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xe(e){return Object(ve.a)(1,arguments),e instanceof Date||"object"===we(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Ee(e){if(Object(ve.a)(1,arguments),!xe(e)&&"number"!=typeof e)return!1;var t=Object(be.a)(e);return!isNaN(Number(t))}var Oe=n(101),ke=n(28);function _e(e,t){Object(ve.a)(2,arguments);var n=Object(ke.a)(t);return Object(Oe.a)(e,-n)}function Ce(e){Object(ve.a)(1,arguments);var t=1,n=Object(be.a)(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function je(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Ce(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var i=Ce(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Te(e){Object(ve.a)(1,arguments);var t=je(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Ce(n);return r}var Se={};function Ie(){return Se}function Ae(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Ie(),d=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Object(be.a)(e),p=f.getUTCDay(),h=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-h),f.setUTCHours(0,0,0,0),f}function Ne(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Object(be.a)(e),d=u.getUTCFullYear(),f=Ie(),p=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(c=f.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=Ae(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var b=Ae(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=b.getTime()?d:d-1}function Pe(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Ie(),d=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1),f=Ne(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var h=Ae(p,t);return h}function Me(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var Le={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Me("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Me(n+1,2)},d:function(e,t){return Me(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Me(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Me(e.getUTCHours(),t.length)},m:function(e,t){return Me(e.getUTCMinutes(),t.length)},s:function(e,t){return Me(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Me(Math.floor(r*Math.pow(10,n-3)),t.length)}},Re="midnight",De="noon",Be="morning",Fe="afternoon",ze="evening",Ue="night";function He(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(0===a)return n+String(o);var i=t||"";return n+String(o)+i+Me(a,2)}function $e(e,t){return e%60==0?(e>0?"-":"+")+Me(Math.abs(e)/60,2):Ve(e,t)}function Ve(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Me(Math.floor(o/60),2)+n+Me(o%60,2)}var qe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Le.y(e,t)},Y:function(e,t,n,r){var o=Ne(e,r),a=o>0?o:1-o;return"YY"===t?Me(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Me(a,t.length)},R:function(e,t){return Me(je(e),t.length)},u:function(e,t){return Me(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Me(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Me(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Le.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Me(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){Object(ve.a)(1,arguments);var n=Object(be.a)(e),r=Ae(n,t).getTime()-Pe(n,t).getTime();return Math.round(r/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Me(o,t.length)},I:function(e,t,n){var r=function(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=Ce(t).getTime()-Te(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Me(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Le.d(e,t)},D:function(e,t,n){var r=function(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Me(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Me(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Me(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Me(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?De:0===o?Re:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?ze:o>=12?Fe:o>=4?Be:Ue,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Le.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Le.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Le.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Le.s(e,t)},S:function(e,t){return Le.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return $e(o);case"XXXX":case"XX":return Ve(o);case"XXXXX":case"XXX":default:return Ve(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return $e(o);case"xxxx":case"xx":return Ve(o);case"xxxxx":case"xxx":default:return Ve(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+He(o,":");case"OOOO":default:return"GMT"+Ve(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+He(o,":");case"zzzz":default:return"GMT"+Ve(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return Me(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return Me((r._originalDate||e).getTime(),t.length)}},Ge=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},We=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ye={p:We,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],a=r[2];if(!a)return Ge(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Ge(o,t)).replace("{{time}}",We(a,t))}};function Ke(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Xe=["D","DD"],Je=["YY","YYYY"];function Qe(e){return-1!==Xe.indexOf(e)}function Ze(e){return-1!==Je.indexOf(e)}function et(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var tt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},nt=function(e,t,n){var r,o=tt[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function rt(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var ot={date:rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:rt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},at={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function it(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var i=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function st(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var i,s=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?lt(c,(function(e){return e.test(s)})):ct(c,(function(e){return e.test(s)}));i=e.valueCallback?e.valueCallback(l):l,i=n.valueCallback?n.valueCallback(i):i;var u=t.slice(s.length);return{value:i,rest:u}}}function ct(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function lt(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var ut,dt={code:"en-US",formatDistance:nt,formatLong:ot,formatRelative:function(e,t,n,r){return at[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:it({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:it({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:it({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:it({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:it({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ut={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(ut.matchPattern);if(!n)return null;var r=n[0],o=e.match(ut.parsePattern);if(!o)return null;var a=ut.valueCallback?ut.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;var i=e.slice(r.length);return{value:a,rest:i}}),era:st({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:st({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:st({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:st({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:st({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},ft=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ht=/^'([^]*?)'?$/,mt=/''/g,gt=/[a-zA-Z]/;function bt(e,t,n){var r,o,a,i,s,c,l,u,d,f,p,h,m,g,b,v,y,w;Object(ve.a)(2,arguments);var x=String(t),E=Ie(),O=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:E.locale)&&void 0!==r?r:dt,k=Object(ke.a)(null!==(a=null!==(i=null!==(s=null!==(c=null==n?void 0:n.firstWeekContainsDate)&&void 0!==c?c:null==n||null===(l=n.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==i?i:null===(d=E.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==a?a:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=Object(ke.a)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(b=n.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:E.weekStartsOn)&&void 0!==h?h:null===(y=E.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var C=Object(be.a)(e);if(!Ee(C))throw new RangeError("Invalid time value");var j=Ke(C),T=_e(C,j),S={firstWeekContainsDate:k,weekStartsOn:_,locale:O,_originalDate:C},I=x.match(pt).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Ye[t])(e,O.formatLong):e})).join("").match(ft).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return vt(r);var a=qe[o];if(a)return null!=n&&n.useAdditionalWeekYearTokens||!Ze(r)||et(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!Qe(r)||et(r,t,String(e)),a(T,r,O.localize,S);if(o.match(gt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return I}function vt(e){var t=e.match(ht);return t?t[1].replace(mt,"'"):e}var yt=n(59);function wt(e){const t=Object(yt.a)(e);return function(e,t){Object(ve.a)(2,arguments);var n=ye(e),r=ye(t);return n.getTime()===r.getTime()}(t,new Date)?bt(t,"HH:mm"):bt(t,"dd LLL")}const xt=Object(c.d)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Et=Object(c.b)(["",";animation-name:",";"],Object(x.a)(300,150),xt),Ot=Object(c.b)(["flex-direction:row-reverse;"]),kt=Object(c.b)(["flex-direction:row;"]),_t=Object(c.b)(["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;}"]),Ct=c.c.div.withConfig({displayName:"styles__GroupContainer",componentId:"sc-1re4sol-0"})(["display:flex;flex:none;margin-bottom:10px;margin-top:10px;",";",";"],e=>e.fromBot?kt:Ot,e=>{let{inspected:t}=e;return t&&_t}),jt=c.c.span.withConfig({displayName:"styles__MessageHeader",componentId:"sc-1re4sol-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:flex-start;opacity:0;",";",";",";"],Et,e=>!e.fromBot&&"justify-content: flex-end; width: 100%;",e=>e.fromAgent&&"padding-left: 25px"),Tt=Object(c.c)(P.f).withConfig({displayName:"styles__MessageDate",componentId:"sc-1re4sol-2"})(["opacity:1;margin-bottom:0;color:",";",";"],e=>{let{theme:t}=e;return t.chatLogElements},e=>e.fromBot?"padding-left: 6px":"padding-right: 6px"),St=c.c.div.withConfig({displayName:"styles__MessageGroup",componentId:"sc-1re4sol-3"})(["display:block;width:100%;"]);var It=function(e){let{fromAgent:t,fromBot:n,created:r,children:o,inspected:a,setGroupRef:s}=e;return i.a.createElement(Ct,{fromBot:n,inspected:a,ref:s},i.a.createElement(St,null,i.a.createElement(jt,{fromAgent:t,fromBot:n},i.a.createElement(Tt,{fromBot:n},wt(r))),o))};var At=function(e){let{title:t,...n}=e;return i.a.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"24",viewBox:"0 0 20 24"}),i.a.createElement("title",null,t||"File attachment"),i.a.createElement("path",{d:"M19.429 13.272L13.503 19.2c-1.554 1.556-3.821 2.164-5.945 1.595s-3.784-2.227-4.354-4.351.037-4.391 1.591-5.946l6.448-6.444c1.427-1.358 3.668-1.358 5.094 0a3.6 3.6 0 0 1 0 5.094l-5.926 5.924a1.05 1.05 0 0 1-1.486 0c-.407-.412-.407-1.074 0-1.486L13.303 9.2a1.5 1.5 0 0 0-.651-2.551 1.5 1.5 0 0 0-1.469.431l-4.388 4.386c-1.583 1.585-1.583 4.153.002 5.736s4.153 1.583 5.736-.002l5.924-5.93A6.6 6.6 0 0 0 15.498.225a6.6 6.6 0 0 0-6.377 1.709l-6.44 6.442C-.893 11.95-.894 17.744 2.68 21.319s9.369 3.575 12.943.001l5.926-5.92a1.5 1.5 0 0 0-2.12-2.12v-.008z",fill:"#7b7b7b"}))};var Nt=function(e){return i.a.createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Unsuccessful image upload"),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero"},i.a.createElement("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"}))))};var Pt=function(e){return i.a.createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Loading image upload"),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero"},i.a.createElement("g",{transform:"translate(685 659)"},i.a.createElement("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"}),i.a.createElement("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"}),i.a.createElement("circle",{cx:"7.5",cy:"7.5",r:"1.5"})))))};var Mt=()=>{const[e,t]=Object(a.useState)(null),[n,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{if(!e)return;const t=[],n=e.getElementsByTagName("img")||[],o=[...n].map(e=>e.complete&&e.naturalWidth?null:new Promise(n=>{t.push(n),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return o.length>0&&Promise.all(o).then(()=>{r(!0)}),()=>{[...n].forEach((e,n)=>{e.removeEventListener("load",t[n]),e.removeEventListener("error",t[n])})}},[e]),[t,n]};const Lt=Object(c.d)(["from{background-position:0%;}to{background-position:-200%;}"]),Rt=c.c.div.withConfig({displayName:"styles__LoadingWrapper",componentId:"sc-10p36bl-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",Lt,e=>{let{opacity:t}=e;return t});var Dt=function(e){let{loading:t,children:n,opacity:r=.6}=e;const[o,s]=Object(a.useState)(!t);return Object(a.useEffect)(()=>{o||t||setTimeout(()=>s(!0),300)},[o,t]),o?null:i.a.createElement(Rt,{finished:!t,hideTransitionLength:.3,opacity:r},i.a.createElement("div",null),i.a.createElement("div",null),i.a.createElement("div",null,n))};const Bt=Object(c.d)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Ft=Object(c.b)(["",";animation-name:",";"],Object(x.a)(600),Bt),zt=Object(c.d)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),Ut=c.c.div.withConfig({displayName:"styles__TypingIndicatorContainer",componentId:"sc-1lynepx-0"})(["background:none;will-change:transform;width:auto;padding:0px;display:table;margin:8px 0px;position:relative;",""],Ft),Ht=c.c.div.withConfig({displayName:"styles__IndicatorContainer",componentId:"sc-1lynepx-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;padding:11px 9px;background:",";background-color:",";"],e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground),$t=c.c.span.withConfig({displayName:"styles__Indicator",componentId:"sc-1lynepx-2"})(["height:5px;width:5px;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=>"image"===e.loadingType?"#fff":e.theme.botMessageText,e=>"image"===e.loadingType?"#fff":e.theme.botMessageText,zt,zt,zt);var Vt=function(e){let{loadingType:t}=e;return i.a.createElement(Ut,{"data-cy":"typing-indicator"},i.a.createElement(Ht,{loadingType:t},i.a.createElement($t,{loadingType:t}),i.a.createElement($t,{loadingType:t}),i.a.createElement($t,{loadingType:t})))};function qt(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 Gt=()=>`\n /* If browser support backdrop-filter */\n ${qt("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`,Wt=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${qt("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,Yt=c.c.div.withConfig({displayName:"styles__PlaceholderContainer",componentId:"sc-12zmiuw-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:14px;"],e=>{let{hasCaption:t}=e;return t?"6px 6px 0 0":"6px"},e=>`height: ${e.imageHeight}px;`),Kt=c.c.div.withConfig({displayName:"styles__CarouselContainer",componentId:"sc-12zmiuw-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 "),Xt=c.c.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-12zmiuw-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:auto;margin-right:5px;margin-top:2px;margin-bottom:2px;",";",";",";"],e=>e.imageWidth,e=>{let{fromBot:t}=e;return t?"justify-content: flex-start":"justify-content: flex-end"},e=>{let{first:t,isCarousel:n}=e;return t||!n?"margin-left: 25px":""},e=>e.imageHasText&&`\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n border-radius: 6px;\n overflow: hidden;\n margin-bottom: 6px;\n color: ${u.h.textColor};\n `),Jt=Object(c.b)(["position:relative;display:",";min-height:100px;"," ",";border-radius:6px;"],e=>e.hidden?"none":"block",e=>e.carousel?`height: ${e.imageHeight}px;`:"height: auto;",e=>!e.imageHasText&&"\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n "),Qt=c.c.a.withConfig({displayName:"styles__ImageContainerLink",componentId:"sc-12zmiuw-3"})(["",""],Jt),Zt=c.c.div.withConfig({displayName:"styles__ImageContainerNoLink",componentId:"sc-12zmiuw-4"})(["",""],Jt),en=c.c.img.withConfig({displayName:"styles__Image",componentId:"sc-12zmiuw-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;border-radius:6px;display:block;z-index:-1;"," "," ",""],e=>e.imageHasText?"border-radius: 0;":"",e=>e.carousel&&`height: ${e.imageHeight}px; object-fit: cover; width: ${e.imageWidth}px;`,m.a),tn=c.c.div.withConfig({displayName:"styles__ImageCaptions",componentId:"sc-12zmiuw-6"})(["background:#fff;z-index:-1;> *:last-child{margin-bottom:8px;}"]),nn=c.c.h3.withConfig({displayName:"styles__ImageTitle",componentId:"sc-12zmiuw-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#232f41;"]),rn=c.c.div.withConfig({displayName:"styles__ImageDescription",componentId:"sc-12zmiuw-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:12px;line-height:16px;color:#6a778a;white-space:pre-line;"]),on=c.c.button.withConfig({displayName:"styles__CarouselButton",componentId:"sc-12zmiuw-9"})(["position:absolute;top:calc(50% - 18px);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;}"," "," ",";",""],m.a,e=>{let{next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{disabled:t}=e;return t&&"display: none"},Gt),an=Object(c.c)(h.a).withConfig({displayName:"styles__SvgArrowLeftIcon",componentId:"sc-12zmiuw-10"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Wt),sn=Object(c.c)(h.b).withConfig({displayName:"styles__SvgArrowRightIcon",componentId:"sc-12zmiuw-11"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Wt),cn=c.c.div.withConfig({displayName:"styles__ImageLinkButton",componentId:"sc-12zmiuw-12"})(["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;",""],u.e.wrapper,u.e.wrapper,Gt),ln=Object(c.c)(h.m).withConfig({displayName:"styles__SvgLinkIcon",componentId:"sc-12zmiuw-13"})(["bottom:",";left:",";",""],u.e.icon,u.e.icon,Wt),un=c.c.button.withConfig({displayName:"styles__LightBoxButton",componentId:"sc-12zmiuw-14"})(["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",u.e.wrapper,u.e.wrapper,m.a,Gt),dn=Object(c.c)(h.h).withConfig({displayName:"styles__SvgEnlargeIcon",componentId:"sc-12zmiuw-15"})(["top:",";right:",";",""],u.e.icon,u.e.icon,Wt);var fn=function(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return i.a.createElement(Yt,{title:"Loading image...",imageWidth:t,imageHeight:n,hasCaption:r},i.a.createElement(Vt,{loadingType:"image"}),i.a.createElement("div",null,"Loading image"))};var pn=function(e){let{image:t,first:n,isCarousel:r,fromBot:o,shouldAnimate:c,shouldAutoScroll:l,scrollToLatestMessage:u,scrollToBottom:d,inView:f,imageWidth:p,imageHeight:h,loading:m}=e;const[g,b]=Mt(),v=Object(s.c)();Object(a.useEffect)(()=>{b&&l&&(!o&&d?d():u())},[o,b,l,d,u]);const y=Object(a.useCallback)(e=>{v(Object(ue.G)(e))},[v]),w=Boolean(t.title||t.description),x=null!=t&&t.newTab?"_blank":"_self",E=t.description&&t.description.length>100?t.description.slice(0,100).concat("..."):t.description,O=t.linkUrl?Qt:Zt;return i.a.createElement(Xt,{imageHasText:w,first:n,ref:g,imageWidth:p,imageHeight:h,isCarousel:r,fromBot:o},i.a.createElement(Dt,{loading:m},"Uploading"),i.a.createElement(O,{imageWidth:p,imageHeight:h,hidden:!b,href:t.linkUrl,target:t.linkUrl?x:void 0,imageHasText:w},i.a.createElement(en,{src:t.imageUrl,alt:t.altText,tabIndex:""!==t.linkUrl?"0":"-1",carousel:r,fromBot:o,shouldAnimate:c,imageHasText:w,imageWidth:p,imageHeight:h}),t.linkUrl&&i.a.createElement(cn,null),t.linkUrl&&i.a.createElement(ln,{width:16,height:16})),!m&&i.a.createElement(un,{"aria-label":"Enlarge image",onClick:()=>y(t.imageUrl),inView:f}),!m&&i.a.createElement(dn,null),!b&&i.a.createElement(fn,{alt:t.altText,imageWidth:p,imageHeight:h,hasCaption:w}),i.a.createElement(tn,null,t.title&&i.a.createElement(nn,{imageWidth:p,imageHeight:h},t.title),E&&i.a.createElement(rn,{imageWidth:p,imageHeight:h},E)))},hn=(o.a.shape({id:o.a.string,temporaryId:o.a.string,url:o.a.string,type:o.a.string.isRequired,name:o.a.string.isRequired,file:o.a.object,sizeKb:o.a.number.isRequired,storagePath:o.a.string,status:o.a.oneOf(Object.values(y.a)),sender:o.a.oneOf(Object.values(y.l))}),function(){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])===y.e.IMAGE?y.e.IMAGE:(null==t?void 0:t[1])===y.e.PDF?y.e.PDF:t.slice(-1)[0]});const mn=e=>{let{fromUser:t,hasError:n,theme:r}=e;return n?u.a.grayColor:t?r.userMessageBackground:r.botMessageBackground},gn=c.c.div.withConfig({displayName:"styles__FileAttachment",componentId:"sc-ftn7kp-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:14px;background:",";background-color:",";transition:all 0.2s ease;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.2 ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},l.a.default,mn,mn,e=>{let{fromUser:t,theme:n}=e;return t?n.userMessageText:n.botMessageText},e=>{let{$loading:t}=e;return t?.5:1}),bn=c.c.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-ftn7kp-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),vn=c.c.div.withConfig({displayName:"styles__IconBackground",componentId:"sc-ftn7kp-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;}"],u.a.grayColor),yn=c.c.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-ftn7kp-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});var wn=function(e){let{avatar:t}=e;const n=Object(a.useMemo)(()=>t?{backgroundImage:`url(${t})`}:{},[t]);return t?i.a.createElement(bn,{style:n}):null};var xn=function(e){let{attachment:t,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,avatar:c,chatMessageStatus:l}=e;const u=t.sender===y.l.USER,d=hn(t)===y.e.IMAGE,f=l||Object(G.a)(t.status,[y.a.ERROR,y.a.INFECTED]),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{token:n}=Object(s.d)(w.f),{PAT_HOST:r}=Object(s.d)(w.g);return e.storagePath&&e.status===y.a.CLEAN?`${r}/chatbubble/${y.j}/attachment/${e.storagePath}?token=${n}`:t||e.sender!==y.l.USER?e.url:void 0}(t,d),h=!p;Object(a.useEffect)(()=>{n&&(u?o():r())},[u,n,o,r]);const m=Object(a.useMemo)(()=>{var e;return{imageUrl:p,altText:`Image ${t.name||`from ${null!==(e=null==t?void 0:t.sender)&&void 0!==e?e:"agent"}`}`}},[t,p]);return d?i.a.createElement(yn,{fromUser:u},i.a.createElement(wn,{avatar:c}),!f&&!h&&i.a.createElement(pn,{image:m,fromBot:!u,isCarousel:!1,shouldAnimate:!0,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,imageWidth:"250",inView:!0,first:!1,loading:t.status===y.a.PROCESSING}),!f&&h&&i.a.createElement(vn,{isImage:d},i.a.createElement(Pt,null),i.a.createElement(Dt,{loading:!0})),f&&i.a.createElement(vn,null,i.a.createElement(Nt,null))):i.a.createElement(yn,{fromUser:u},i.a.createElement(wn,{avatar:c}),i.a.createElement(gn,{fromUser:u,$loading:h,hasError:f},i.a.createElement(At,{height:10}),i.a.createElement(Dt,{loading:!f&&h,opacity:.35}),!f&&!h&&i.a.createElement("a",{src:p,alt:t.name,href:p,target:"_blank",rel:"noreferrer"},t.name),!f&&h&&i.a.createElement("span",null,"Uploading"),f&&i.a.createElement(Nt,null)))},En=n(74),On=n(47),kn=n(105);function _n(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i.a.createElement(On.a.div,{transition:{ease:"easeInOut",duration:.3},animate:{x:n.get()},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}function Cn(e){let{chatMessage:t,imageCarousel:n,shouldAutoScroll:r,scrollToLatestMessage:o,shouldAnimate:s}=e;const[c,l]=Object(a.useState)(0),u=Object(On.b)(0),d=y.h[t.image_carousel_size||1e3],[f,p]=Object(a.useState)(d);Object(a.useEffect)(()=>{let e=!0;if(n.length>0){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/d,r=t.height/n;e&&p(r.toString())}}return()=>{e=!1}},[n,p,d]);const h=Object(a.useMemo)(()=>d===y.h[800]?102:d===y.h[600]?96:30,[d]),m=e=>d===y.h[600]&&c===e-1||c===e,g=Object(a.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*d-h):-(e*d+5*e),l(e),u.set(n)},[d,h,u]),{handleTouchStart:b,handleTouchMove:v,handleTouchEnd:w}=Object(kn.a)({carousel:n,index:c,setIndex:g});return i.a.createElement(Kt,{active:n.length>1},i.a.createElement(_n,{carouselPosition:u,onTouchStart:b,onTouchMove:v,onTouchEnd:w},n.map((e,a)=>i.a.createElement(pn,{key:e.id||a,first:0===a,image:e,fromBot:t.from_bot,isCarousel:n.length>1,shouldAnimate:s,shouldAutoScroll:r,scrollToLatestMessage:o,scrollToBottom:!1,inView:m(a),imageWidth:d,imageHeight:f}))),i.a.createElement(on,{previous:!0,disabled:c<=0,"aria-label":"Go to previous image",onClick:()=>g(c-1,n)}),i.a.createElement(an,{disabled:c<=0,width:24,height:24}),i.a.createElement(on,{next:!0,disabled:c>=n.length-1,"aria-label":"Go to next image",onClick:()=>g(c+1,n)}),i.a.createElement(sn,{disabled:c>=n.length-1,width:12,height:22}))}Cn.defaultProps={};var jn=Cn;const Tn=c.c.button.withConfig({displayName:"styles__EditButton",componentId:"sc-mhy5c2-0"})(["display:block;background:none;background-color:none;border:none;text-decoration:underline;font-weight:600;font-size:",";color:",";cursor:pointer;padding:0;",""],u.d.fontSizeP,e=>e.theme.userMessageText,m.a);var Sn=function(e){let{button:t}=e;const n=Object(s.c)(),r=Object(a.useCallback)(()=>n(Object(ue.lb)(t)),[t,n]);return i.a.createElement(Tn,{onClick:r},t.contact_details.edit_text)},In=n(170),An=n.n(In);const Nn=["form","input"],Pn=["target"],Mn=["action"];var Ln=e=>An.a.sanitize(e,{ADD_ATTR:Pn,FORBID_ATTR:Mn,FORBID_TAGS:Nn,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}});var Rn=function(e){return i.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ln(e)}})};const Dn=Object(c.d)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Bn=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),Dn),Fn=c.c.div.withConfig({displayName:"styles__MessageBlock",componentId:"sc-zovgvh-0"})(["display:block;width:100%;"]),zn=(c.c.div.withConfig({displayName:"styles__MessageLines",componentId:"sc-zovgvh-1"})([""]),c.c.div.withConfig({displayName:"styles__MessageContent",componentId:"sc-zovgvh-2"})(["display:flex;flex-direction:column;",";",";"," ",""],Bn,e=>!e.fromBot&&"display: block;",e=>e.hasParentSiblings&&"margin-top: 8px;",e=>e.hasSiblings&&"margin-bottom: 8px;")),Un=c.c.div.withConfig({displayName:"styles__MessageLineContainer",componentId:"sc-zovgvh-3"})(["display:flex;flex-direction:column;",";",""],e=>{let{fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.hasSiblings&&"margin-bottom: 8px;"),Hn=Object(c.b)(["display:grid;grid-template-columns:auto auto;justify-content:flex-start;grid-gap:6px;position:relative;top:-30px;margin-bottom:-20px;margin-left:15px;"]),$n=c.c.div.withConfig({displayName:"styles__ButtonWrapper",componentId:"sc-zovgvh-4"})(["max-width:80%;display:flex;flex-direction:column;",";"," & > button,& > a{margin-bottom:6px;}"],Bn,e=>e.hasSuggestion&&Hn),Vn=Object(c.b)(["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=>e.theme.userMessageText,e=>e.theme.userMessageBackground,Fn,Fn,Fn,Fn),qn=Object(c.b)(["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=>e.theme.botMessageText,e=>e.theme.botMessageBackground),Gn=Object(c.b)(["margin-left:25px;white-space:pre-wrap;"]),Wn=Object(c.b)([":last-child{padding-bottom:34px;}"]),Yn=Object(c.b)(["position:relative;display:inline-block;max-width:80%;padding:10px 15px;margin:1px 0px;border:0;border-radius:16px;font-size:14px;line-height:18px;word-break:break-word;"," ",";",";",";"," p{margin:0;}"],e=>e.clickable&&"cursor: pointer;",e=>e.fromBot?qn:Vn,e=>e.fromAgent&&Gn,e=>e.hasSuggestion&&Wn,m.a),Kn=c.c.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-lv7lx6-0"})(["",""],Yn),Xn=c.c.a.withConfig({displayName:"styles__LinkMessageContainer",componentId:"sc-lv7lx6-1"})(["text-decoration:none;",""],Yn),Jn=c.c.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-lv7lx6-2"})(["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),Qn=[y.l.WEBHOOK,y.l.AGENT];function Zn(e){let{messageLine:t,children:n,chatMessage:r,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:c=!1,hasSuggestion:l=!1}=e;const{bot_id:u,exchange_id:d}=r,f=`/workspace/${u}/build/${("usersays"===r.exchange_type?"dialogue":r.exchange_type).replace("_","-")}/${d}`;return i.a.createElement(Xn,{fromBot:r.from_bot,hasSuggestion:l,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:c,clickable:!0,role:"link",tabIndex:"0",href:f},n||Rn(t))}var er=function(e){let{messageLine:t,chatMessage:n,lineIndex:r,numLines:o,editContactDetailsButton:a,children:c,shouldAnimate:l=!1,hasSuggestion:u=!1}=e;const{inPlatform:d}=Object(s.d)(w.e),{isTextDirectionRtl:f}=Object(s.d)(w.d),p=f?"rtl":void 0,h=d&&n.from_bot&&n.exchange_type&&!Object(G.a)(n.sender,Qn),m=n.sender===y.l.AGENT,g=r!==o-1||n.sender!==y.l.AGENT&&n.image_carousel&&!n.thon_image_above_text,b=n.from_bot;return h?i.a.createElement(Zn,{chatMessage:n,notLast:g,shouldAnimate:l,messageLine:t,hasSuggestion:u},c):i.a.createElement(Kn,{dir:p,fromAgent:m,fromBot:b,hasSuggestion:u,notLast:g,shouldAnimate:l},m&&!g&&i.a.createElement(Jn,{style:{backgroundImage:`url(${n.avatar})`}}),c||(b?Rn(t):t),!g&&a&&i.a.createElement(Sn,{button:a}))};const tr=c.c.div.withConfig({displayName:"styles__StatusMessage",componentId:"sc-gltcat-0"})(["display:flex;white-space:nowrap;font-size:12px;color:red;justify-content:flex-end;margin-bottom:2px;"]),nr=c.c.div.withConfig({displayName:"styles__StatusMessageButtonWrapper",componentId:"sc-gltcat-1"})(["display:flex;"]),rr=c.c.button.withConfig({displayName:"styles__StatusMessageButton",componentId:"sc-gltcat-2"})(["display:block;white-space:nowrap;font-size:12px;color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],u.a.darkColor,m.a);var or=function(e){let{chatMessage:t,attachments:n}=e;const r=Object(s.c)(),o=Boolean(t.message),c=(null==n?void 0:n.length)>0,l=Object(a.useCallback)(()=>{o&&r(Object(ue.J)(t.message,t.id))},[t,r,o]),u=Object(a.useCallback)(()=>{o?r(Object(ue.K)(t.message,t.id)):c&&r(Object(ue.fb)())},[t,r,c,o]);return t.status>=500?i.a.createElement(tr,null,c?"Upload failed":"Message not delivered"," ",i.a.createElement(nr,null,!c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(rr,{onClick:l},"Try again"),i.a.createElement(rr,{onClick:u},"Restart chat")))):429===t.status?i.a.createElement(tr,null,"Too many messages, please slow down."," ",i.a.createElement(nr,null,i.a.createElement(rr,{onClick:l},"Try again"))):i.a.createElement(tr,null,"An error occurred. ",i.a.createElement(rr,{onClick:u},"Restart chat"))},ar=n(15),ir=n(27),sr=n(40);const cr=c.c.div.withConfig({displayName:"styles__AgentContainer",componentId:"sc-3baawv-0"})(["width:100%;margin:20px 0;",";"],x.d),lr=c.c.div.withConfig({displayName:"styles__AvatarContainer",componentId:"sc-3baawv-1"})(["display:flex;justify-content:center;align-items:center;"]),ur=c.c.span.withConfig({displayName:"styles__AvatarBorder",componentId:"sc-3baawv-2"})(["height:1px;width:100%;background:",";background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),dr=c.c.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-3baawv-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin:0 15px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),fr=c.c.p.withConfig({displayName:"styles__AgentName",componentId:"sc-3baawv-4"})(["font-size:",";margin:0;margin-top:5px;text-align:center;color:",";span{font-weight:500;}"],u.d.fontSizeSmall,e=>Object(sr.a)(e.theme.background,u.a.grayColor,u.a.darkColor));var pr=function(e){let{chatMessage:t}=e;const n=t.system_dialogue_message_type===y.p.END,{currentLanguage:r}=Object(s.d)(w.e),{text:o}=Object(s.d)(w.d),{defaultLanguage:c}=Object(ar.a)(),{names:l,avatars:u}=Object(s.d)(w.a),{agent_joined_text:d,agent_left_text:f}=Object(a.useMemo)(()=>Object(ir.a)(o,r,c),[r,c,o]),p=t.avatar||u[u.length-1],h=t.name||l[l.length-1];return i.a.createElement(cr,null,i.a.createElement(lr,null,i.a.createElement(ur,null),i.a.createElement(dr,{style:{backgroundImage:`url(${p})`}}),i.a.createElement(ur,null)),i.a.createElement(fr,null,i.a.createElement("span",null,h||"An agent")," ",n?f:d))};n(65);var hr=function(e){let{preface:t,message:n,chatMessage:r,numLines:o,buttonHandlers:a,buttons:s=[]}=e;return i.a.createElement(i.a.Fragment,null,i.a.createElement(Un,{fromBot:!0},i.a.createElement(er,{chatMessage:r,lineIndex:0,numLines:o,hasSuggestion:!0},i.a.createElement("strong",null,t),i.a.createElement("br",null),n)),i.a.createElement($n,{hasSuggestion:!0},s.map((e,t)=>i.a.createElement(En.a,{key:`suggestion-button-${r.id}-${t}`,button:e,chatMessage:r,type:"button",handlers:a,hasSuggestion:!0}))))};const mr="\n background: black;\n border-radius: 15px;\n",gr=c.c.iframe.withConfig({displayName:"styles__IframeEmbed",componentId:"sc-10j1ec7-0"})(["",""],mr),br=c.c.video.withConfig({displayName:"styles__HTML5Video",componentId:"sc-10j1ec7-1"})(["",""],mr);var vr=function(e){let{source:t}=e;const n=t.split(".").pop();return i.a.createElement(br,{width:"240",controls:!0,"data-chromatic":"ignore"},i.a.createElement("source",{src:t,type:`video/${n}`}),"Your browser does not support HTML5 video.")};var yr=function(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?i.a.createElement(gr,{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 wr=e=>e.replace("?t=","?start=").replace("&t=","&start=");var xr=function(e){let{source:t}=e;const n=(e=>{const t=e.toLowerCase();let n=e;return Object(G.a)("youtube.com",t)?(n=e.replace("&","?"),n=wr(n),n.split("v=")[1]):Object(G.a)("youtu.be",t)?(n=wr(e),n.split("youtu.be/")[1]):n})(t);return i.a.createElement(gr,{width:"240",height:"auto",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})};var Er=function(e){let{source:t}=e;return Object(G.a)("youtube.com",t)||Object(G.a)("youtu.be",t)?i.a.createElement(xr,{source:t}):Object(G.a)("vimeo.com",t)?i.a.createElement(yr,{source:t}):i.a.createElement(vr,{source:t})},Or=n(98);function kr(e){let{width:t,height:n,color:r}=e;return i.a.createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},i.a.createElement("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"}),i.a.createElement("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}kr.defaultProps={width:24,height:24,color:"#333"};var _r=kr,Cr=n(21),jr=n(56),Tr=n(94);const Sr=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:a}}=o(),{PAT_HOST:i}=o().environment,{headers:s}=Object(ue.p)({token:a},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r(Object(ue.pb)({method:"post",url:`${i}/chatbubble/${y.j}/form/submit`,data:c,headers:s}))}};var Ir=n(109),Ar=n(80),Nr=n(22);var Pr=n(48);const Mr=c.c.div.withConfig({displayName:"styles__FormStateViewWrapper",componentId:"sc-6n3m85-0"})(["display:flex;flex-direction:column;"]),Lr=c.c.div.withConfig({displayName:"styles__FormStateMessage",componentId:"sc-6n3m85-1"})(["font-size:",";font-weight:500;margin-top:16px;"],u.d.fontSizeP),Rr=c.c.div.withConfig({displayName:"styles__FormStateDataWrapper",componentId:"sc-6n3m85-2"})(["display:flex;flex-direction:column;"]),Dr=c.c.div.withConfig({displayName:"styles__FormStateDataField",componentId:"sc-6n3m85-3"})(["display:flex;flex-direction:column;margin-top:16px;"]),Br=c.c.div.withConfig({displayName:"styles__FormStateDataTitle",componentId:"sc-6n3m85-4"})(["font-size:",";"],u.d.fontSizeP),Fr=c.c.div.withConfig({displayName:"styles__FormStateDataValue",componentId:"sc-6n3m85-5"})(["font-weight:500;margin-top:4px;font-size:",";"],u.d.fontSizeP);function zr(e){let{state:t,message:n,data:r}=e;return i.a.createElement(Mr,null,t!==Nr.b.SUBMITTED&&n&&i.a.createElement(Lr,null,n),t===Nr.b.SUBMITTED&&r.length>0&&i.a.createElement(Rr,null,r.map(e=>{return e.value?i.a.createElement(Dr,{key:e.name},i.a.createElement(Br,null,e.label),i.a.createElement(Fr,null,Array.isArray(e.value)?(t=e.value).length>0?t.map(e=>i.a.createElement("div",{key:e.name},e.label)):null:e.value)):null;var t})))}zr.defaultProps={data:null,message:null};var Ur=zr;const Hr=i.a.lazy(()=>Promise.resolve().then(n.bind(null,246)));var $r=function(e){var t,n,r,o,c,l,u,d,f,p;let{formData:h,onSubmit:m,onCancel:g}=e;const b=Object(s.c)(),v=Object(s.d)(w.i),{current:y}=Object(a.useRef)((x=h.id,E=h.submission_id,`${x}_submission_${E}`));var x,E;const{currentLanguage:O}=Object(s.d)(w.e);return Object(a.useEffect)(()=>{var e,t,n;null==h||!h.id||null!=v&&v[y]?(null==v||null===(e=v[y])||void 0===e?void 0:e.formSubmitState)!==Nr.b.UNANSWERED||null!=v&&null!==(t=v[y])&&void 0!==t&&t.formCompleteMessage||!h.texts.unanswered_text||b(Object(ue.S)({...v[y],formCompleteMessage:h.texts.unanswered_text})):b(Object(ue.S)({formId:h.id,formSubmissionId:h.submission_id,formSubmitState:Nr.b.ACTIVE,formCompleteMessage:"",formKey:y,formValue:(null==v||null===(n=v[y])||void 0===n?void 0:n.formValue)||h.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[b,h,O,v,y]),i.a.createElement(Ar.d,null,(null===(t=h.texts)||void 0===t?void 0:t.title)&&i.a.createElement(Ar.c,null,i.a.createElement(_r,{width:20,height:20})," ",null===(n=h.texts)||void 0===n?void 0:n.title),(null==v||null===(r=v[y])||void 0===r?void 0:r.formSubmitState)&&(null==v||null===(o=v[y])||void 0===o?void 0:o.formSubmitState)!==Nr.b.ACTIVE&&i.a.createElement(Ur,{state:v[y].formSubmitState,message:v[y].formCompleteMessage,data:(()=>{var e,t;if(null!=h&&h.fields&&(null==v||null===(e=v[y])||void 0===e?void 0:e.formSubmitState)===Nr.b.SUBMITTED&&null!=v&&null!==(t=v[y])&&void 0!==t&&t.formValue)return h.fields.reduce((e,t)=>{var n,r,o,a;return t.input_type===Nr.a.CHECKBOX&&t.list?[...e,{name:`checkbox_list_${t.slug}`,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:t.list.reduce((e,t)=>{var n,r;const o=null==v||null===(n=v[y])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[t.slug];var a;return"boolean"==typeof o&&o||"string"==typeof o&&o.trim()?[...e||[],{name:t.slug,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:o}]:e},null)}]:[...e,{name:t.slug,label:null===(n=t.texts)||void 0===n?void 0:n.label,value:null==v||null===(r=v[y])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug]}]},[]).sort(e=>e.order)})()}),(null==v||null===(c=v[y])||void 0===c?void 0:c.formSubmitState)===Nr.b.ACTIVE&&i.a.createElement(a.Suspense,{fallback:i.a.createElement(Cr.a,null)},i.a.createElement(Hr,{onCancel:async e=>{var t;return g&&g(e),await b(Sr(h.submission_id,null==v?void 0:v[y].formValue,Nr.b.CANCELED)),await b(Object(ue.qb)(h.cancel_dialogue_id,{languageCode:O})),b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.CANCELED,formCompleteMessage:null===(t=h.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:null==v||null===(l=v[y])||void 0===l?void 0:l.formValue,onSubmit:async e=>{m&&m(e);const t={};var n;return Object.entries(e).filter(e=>{let[t,n]=e;return!!n}).forEach(e=>{let[n,r]=e;t[n]=r}),null===await b(Sr(h.submission_id,t))?b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.ERRORED,formCompleteMessage:null===(n=h.texts)||void 0===n?void 0:n.error_text,formValue:e})):(await b(Object(ue.qb)(h.submit_dialogue_id,{languageCode:O})),b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.SUBMITTED,formValue:e})))},ariaLabel:null===(u=h.texts)||void 0===u?void 0:u.title,sendButtonTitle:null===(d=h.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=h.texts)||void 0===f?void 0:f.cancel_button_text},null===(p=h.fields)||void 0===p?void 0:p.map(e=>{var t,n;return i.a.createElement(Ir.a,{key:`form_field_${y}_${e.order}`,helperText:null===(t=e.texts)||void 0===t?void 0:t.help_text,required:e.required,label:null===(n=e.texts)||void 0===n?void 0:n.label},(e=>{var t,n,r,o;if(e)switch(e.input_type){case"checkbox":return i.a.createElement(Tr.a,{name:`checkbox_list_${e.slug}`,list:e.list,formId:h.id,validators:Object(Pr.a)(e,O),currentLanguage:O});case"range":return i.a.createElement(jr.d,{controller:!0,value:parseFloat(null==v||null===(t=v[y])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug])||e.step,name:e.slug,from:e.min,to:e.max,step:e.step,affix:e.affix,affixValue:null===(r=e.texts)||void 0===r?void 0:r.affix_value,validators:Object(Pr.a)(e,O),ariaLabel:null===(o=e.texts)||void 0===o?void 0:o.label});default:return i.a.createElement(jr.c,{placeholder:e.texts.placeholder_text,type:e.input_type,validators:Object(Pr.a)(e,O),name:e.slug})}return null})(e))}))))};const Vr=e=>e,qr=e=>{let{button_type:t}=e;return t===y.b.edit_contact_details?"editContactDetails":"regularButtons"};var Gr=function(e){var t,n,r,o;let{chatMessage:c,scrollToLatestMessage:l,scrollToBottom:u,shouldAutoScroll:d,buttonHandlers:f,messageCounter:p}=e;const h=Object(s.c)(),[m,g]=Object(a.useState)([]),{lastMessageSeen:b,attachments:v=[]}=Object(s.d)(w.n),x=c.sender?c.sender===y.l.USER:!c.from_bot;let E=[];c.message&&(E=c.from_bot?c.message.split(/\n\s*\n/).map(e=>e.trim()):[c.message]);const{regularButtons:O,editContactDetails:k}=Object(a.useMemo)(()=>Object(Or.a)(c.buttons,qr),[c.buttons]),_=Object(a.useMemo)(()=>{var e;return null==c||null===(e=c.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===y.b.CHECKBOX.toLowerCase()||e.button_type===y.b.SLIDER.toLowerCase())},[c]),C=(null==c?void 0:c.image_carousel)||(null==c?void 0:c.video_source),j=c.system_dialogue_message_type===y.p.REQUEST,T=null==c||null===(t=c.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===y.b.CHECKBOX.toLowerCase()),S=(e=>{let{root:t=null,threshold:n=1,onChange:r,skip:o=!1}=e;const[i,s]=Object(a.useState)(null),c=Object(a.useRef)(null);return Object(a.useEffect)(()=>{if(o)return;c.current&&c.current.disconnect(),c.current=new IntersectionObserver(r,{root:t,threshold:n});const{current:e}=c;return i&&e.observe(i),()=>e.disconnect()},[i,t,r,o,n]),s})({onChange:Object(a.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==b?void 0:b.index)>=p||h(Object(ue.U)(c.id,p))},[c.id,h,b,p]),threshold:.95,skip:x}),I=Object(a.useCallback)(e=>{const t=m.find(t=>t.id===e.id);g(t?m.filter(t=>t.id!==e.id):[...m,e])},[m]),A=Object(a.useMemo)(()=>{var e,t;return[...null!==(e=c.attachments)&&void 0!==e?e:[],...(null!==(t=c.attachment_ids)&&void 0!==t?t:[]).map(e=>{return v.find((t=e,function(){let{id:e,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e===t||n===t}));var t}).filter(Vr)]},[v,c.attachments,c.attachment_ids]),N=Boolean(c.message||(null==A?void 0:A.length)||(null===(n=c.buttons)||void 0===n?void 0:n.length)||(null===(r=c.image_carousel)||void 0===r?void 0:r.length));return c.system_dialogue_message_type===y.p.START||c.system_dialogue_message_type===y.p.END?i.a.createElement(zn,{ref:S,fromBot:!0},i.a.createElement(pr,{chatMessage:c})):i.a.createElement(Fn,{ref:S,"data-cy":"message-block"},i.a.createElement(zn,{fromBot:c.from_bot,hasSiblings:T,hasParentSiblings:j},c.image_carousel&&c.thon_image_above_text&&i.a.createElement("div",null,i.a.createElement(jn,{imageCarousel:c.image_carousel,chatMessage:c,thonAbove:!0,scrollToLatestMessage:l,shouldAutoScroll:d})),i.a.createElement(Un,{fromBot:c.from_bot,hasSiblings:C},E.map((e,t)=>i.a.createElement(er,{key:`chatMessage-${t}`,chatMessage:c,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==k?void 0:k[0]}))),c.image_carousel&&!c.thon_image_above_text&&i.a.createElement("div",null,i.a.createElement(jn,{imageCarousel:c.image_carousel,chatMessage:c,scrollToLatestMessage:l,shouldAutoScroll:d})),A.map(e=>i.a.createElement("div",{key:e.id},i.a.createElement(xn,{attachment:e,shouldAutoScroll:d,scrollToLatestMessage:l,scrollToBottom:u,avatar:c.avatar,chatMessageStatus:c.status,shouldAnimate:!0}))),c.video_source&&i.a.createElement(Er,{source:c.video_source}),(null===(o=c.form)||void 0===o?void 0:o.fields)&&i.a.createElement($r,{formData:c.form})),i.a.createElement($n,null,(null==O?void 0:O.length)>0&&O.map(e=>i.a.createElement(En.a,{key:e.id,button:e,chatMessage:c,type:"button",handlers:f,checked:m,setCheckboxValue:I,submitButtonsList:_}))),((null==c?void 0:c.suggestions)||[]).map(e=>{let{preface:t,message:n,buttons:r}=e;return i.a.createElement(hr,{key:c.id,chatMessage:c,numLines:E.length,preface:t,message:n,buttons:r})}),N&&c.status&&i.a.createElement(or,{chatMessage:c,attachments:A}))};var Wr=function(e){let{...t}=e;return i.a.createElement("svg",Object.assign({},t,{viewBox:"0 0 22 11",xmlns:"https://www.w3.org/2000/svg"}),i.a.createElement("path",{d:"M3 3l7.887 5L19 3",stroke:"#FFF",strokeWidth:"4",fill:"none",fillRule:"evenodd",strokeLinecap:"square"}))};var Yr=function(e){return i.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Bot Avatar"),i.a.createElement("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd"},i.a.createElement("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),i.a.createElement("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"}),i.a.createElement("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),i.a.createElement("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"})))},Kr=n(35);const Xr=Object(c.d)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Jr=Object(c.b)(["",";animation-name:",";"],Object(x.a)(600),Xr),Qr=Object(c.d)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Zr=Object(c.b)(["",";animation-name:",";"],Object(x.a)(300),Qr),eo=c.c.div.withConfig({displayName:"styles__NewMessageContainer",componentId:"sc-1n499zd-0"})(["position:absolute;z-index:3;bottom:90px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.show?"1":"0"),to=c.c.div.withConfig({displayName:"styles__NewMessageInner",componentId:"sc-1n499zd-1"})(["padding:8px;opacity:0;border-radius:100px;color:#2c2c2c;background:#fff;background-color:#fff;border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:pointer;display:flex;align-items:center;justify-content:",";min-width:35px;max-width:205px;width:","px;height:","px;",";",";svg{",";path{",";}}"],Object(Kr.a)(.08,"#fff"),e=>e.hasUnread?"flex-start":"center",e=>e.hasUnread?"unset":"35",e=>e.hasUnread?"42":"35",e=>!e.show&&Object(x.h)(800),e=>e.show?Jr:Zr,e=>e.hasUnread&&"min-width: 24px",e=>!e.hasUnread&&`stroke: ${e.theme.buttonBackground}`),no=c.c.div.withConfig({displayName:"styles__StyledAvatar",componentId:"sc-1n499zd-2"})(["border-radius:100px;min-width:24px;width:24px;height:24px;background-image:url(",");background-size:contain;background-repeat:no-repeat;background-position:center;"],e=>e.avatar),ro=c.c.span.withConfig({displayName:"styles__Message",componentId:"sc-1n499zd-3"})(["color:#2c2c2c;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:8px;"]);function oo(e){let{message:t}=e;const{avatar:n}=Object(s.d)(w.d),{takenOver:r,avatars:o}=Object(s.d)(w.a),a=r?o[o.length-1]:n,c=t.replace(/(<[^>]*>)| /g,"");return i.a.createElement(i.a.Fragment,null,a?i.a.createElement(no,{avatar:a}):i.a.createElement(Yr,{height:24,width:24}),i.a.createElement(ro,null,c))}var ao=function(e){let{chatMessages:t,hasUnreadMessage:n,shouldAutoScroll:r,scrollToBottom:o}=e;const[s,c]=Object(a.useState)(!1),[l,u]=Object(a.useState)(!1),d=(e=>{const t=(e||[]).length,n=e[t-1];return Object(a.useMemo)(()=>t>1&&n.from_bot?n:e[t-2],[e,n,t])||{}})(t);return Object(a.useEffect)(()=>{l&&r&&u(!1)},[l,r]),Object(a.useEffect)(()=>{const e=setTimeout(()=>{r||c(!0)},600);return r&&c(!1),()=>clearTimeout(e)},[r]),i.a.createElement(eo,{show:s},i.a.createElement(to,{hasUnread:n&&Boolean(d.message),show:s&&!l,onClick:()=>{u(!0),o()},"data-testid":"chat-new-message"},n&&Boolean(d.message)?i.a.createElement(oo,{message:d.message}):i.a.createElement(Wr,{width:12})))},io=n(58),so=n.n(io);const co=c.c.div.withConfig({displayName:"styles__QueueContainer",componentId:"sc-k9za8a-0"})(["left:0;right:0;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,u.a.shadowColor,x.c),lo=c.c.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-k9za8a-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);"]),uo=Object(c.c)(P.b).withConfig({displayName:"styles__QueueText",componentId:"sc-k9za8a-2"})(["margin:0;color:",";span{font-weight:600;}font-size:",";font-weight:normal;line-height:24px;"],e=>e.theme.headerText,u.d.fontSizeH5),fo=Object(c.c)(fe.d).withConfig({displayName:"styles__QueueLink",componentId:"sc-k9za8a-3"})(["color:",";"],e=>e.theme.headerText),po=Object(c.d)(["from{background-position:-180px;}to{background-position:180px;}"]),ho=Object(c.d)(["from{background-position:180px;}to{background-position:-180px;}"]),mo=c.c.div.withConfig({displayName:"styles__LoadingContainer",componentId:"sc-k9za8a-4"})(["position:relative;border:0;"]),go=c.c.span.withConfig({displayName:"styles__Loader",componentId:"sc-k9za8a-5"})(["opacity:1;height:3px;width:100%;top:3;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?ho:po});function bo(e){let{waitTime:t,takeoverQueueText:n}=e;return t?i.a.createElement(i.a.Fragment,null,"Estimated wait time: ",i.a.createElement("span",null,t," min")):n}var vo=function(){const[e,t]=Object(a.useState)(null),[n,r]=Object(a.useState)(!1),{SAGE_HOST:o}=Object(s.d)(w.g),{currentLanguage:c}=Object(s.d)(w.e),{id:l,text:u,showTakeoverQueue:d}=Object(s.d)(w.d),{defaultLanguage:f}=Object(ar.a)(),p=Object(s.c)(),{takeover_queue_text:h,takeover_queue_link:m,leave_queue_text:g,leave_queue_link:b}=Object(a.useMemo)(()=>Object(ir.a)(u,c,f),[c,f,u]);return Object(a.useEffect)(()=>{d&&so.a.get(`${o}/api/v1/stats/bot/${l}/public/current_wait_time?sources%5B%5D=web`).then(e=>{const{data:{data:{mean:n,n:r}}}=e;if(r<3)return void t(null);const o=Math.round((n/60).toFixed(2));o>1&&t(o)})},[o,l,d]),Object(a.useEffect)(()=>{const e=setTimeout(()=>{n&&p(Object(ue.d)())},3e3);return n||clearTimeout(e),()=>clearTimeout(e)},[n,p]),d?i.a.createElement(co,null,i.a.createElement(lo,{"aria-live":"polite","aria-atomic":"true","data-cy":"takeover-queue"},n?i.a.createElement(i.a.Fragment,null,i.a.createElement(uo,null,g),i.a.createElement(fo,{onClick:()=>r(!1),"data-cy":"takeover-queue-link"},b)):i.a.createElement(i.a.Fragment,null,i.a.createElement(uo,null,i.a.createElement(bo,{waitTime:e,takeoverQueueText:h})),i.a.createElement(fo,{onClick:()=>r(!0),"data-cy":"takeover-queue-link"},m))),i.a.createElement(mo,null,i.a.createElement(go,{hasCancelled:n}))):null};const yo=c.c.div.withConfig({displayName:"styles__BodyContainer",componentId:"sc-1vymaz1-0"})(["width:100%;min-width:100%;overflow-y:auto;padding:0 30px;height:100%;overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;",""],e=>e.theme.background,e=>e.theme.background,m.a),wo=c.c.div.withConfig({displayName:"styles__ChatBoxMessages",componentId:"sc-1vymaz1-1"})(["min-height:100%;display:flex;flex-direction:column;justify-content:flex-end;"]);let xo,Eo=!1;var Oo=function(e){let{setBodyRef:t,setBottomRef:n,setTopRef:r,scrollToBottom:o,scrollToLatestMessage:c,shouldAutoScroll:l,onUserScroll:u,buttonHandlers:d,hasUnreadMessage:f,setGroupRef:p}=e;const[h,m]=Object(a.useState)(!1),{requestedTakeover:g,takeoverClosed:b,takenOver:v,isTyping:x}=Object(s.d)(w.a),{isTyping:E}=Object(s.d)(w.d),{active:O,currentLanguage:k,botKey:_}=Object(s.d)(w.e),{currentMessageId:C,inspectorOpen:j}=Object(s.d)(w.j),T=Object(s.c)(),{chatMessages:S}=Object(s.d)(w.n)||[],I=(e=>{let t=null,n=null,r=!1;const o=[];return e.forEach(e=>{e.from_bot===t&&e.name===n&&e.from_webhook===r&&e.handler!==y.f.TRIGGER_DIALOGUE?o[o.length-1].push(e):o.push([e]),t=e.from_bot,n=e.name,r=e.from_webhook}),o})(S);Object(a.useEffect)(()=>{Eo!==v&&v?(xo=k,Eo=v):void 0===xo||xo===k||v||(T(Object(ue.fb)(_,!0)),xo=void 0,Eo=void 0)},[b,v,g,_,k,T]),Object(a.useEffect)(()=>{O&&S.length>0?m(!0):m(!1)},[O,S.length]);let A=0;return i.a.createElement(yo,{ref:t,onScroll:u,tabIndex:"0","data-testid":"chat-body-container"},g&&!b&&!v&&i.a.createElement(vo,null),i.a.createElement(wo,{role:"log","aria-live":"polite","data-cy":"chat-log"},I.map((e,t)=>{const n=j&&((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})})(C,S,I[t]);return i.a.createElement(i.a.Fragment,{key:`message-group-${t}`},i.a.createElement(It,{fromAgent:e[0].sender===y.l.AGENT,fromBot:e[0].from_bot,created:e[0].created,inspected:n,setGroupRef:p},e.map((n,a)=>{const s=t===I.length-1&&a===e.length-1;return A+=1,i.a.createElement(i.a.Fragment,{key:`${n.id}_${A}`},s&&i.a.createElement("span",{ref:r}),i.a.createElement(Gr,{chatMessage:n,scrollToBottom:o,scrollToLatestMessage:c,shouldAutoScroll:l,buttonHandlers:d,messageCounter:A}))})))}),(x||E)&&i.a.createElement(Vt,null),i.a.createElement("div",{ref:n})),h&&i.a.createElement(ao,{chatMessages:S,hasUnreadMessage:f,shouldAutoScroll:l,scrollToBottom:o}))};var ko=function(e){let{children:t,animate:n}=e;return i.a.createElement(On.a.div,{variants:{normal:{x:0},error:{x:[0,2,-2,0]}},animate:n},t)};const _o=c.c.div.withConfig({displayName:"styles__InputLimitContainer",componentId:"sc-18r5r1u-0"})(["height:20px;display:flex;opacity:0.8;align-items:center;margin-bottom:10px;justify-content:space-between;",""],e=>!e.enabled&&`margin-bottom: 15px; height: 10px; border-bottom: 1px solid ${u.a.grayColor}`),Co=c.c.div.withConfig({displayName:"styles__FillContainer",componentId:"sc-18r5r1u-1"})(["width:",";height:1px;transition:all ease 0.3s;span{height:100%;display:block;}span:first-child{width:100%;opacity:0.3;background:",";background-color:",";}span:last-child{margin-top:-1px;width:","%;background:",";background-color:",";}"],e=>e.active?"calc(100% - 50px)":"100%",e=>{let{theme:t}=e;return t.chatLogElements},e=>{let{theme:t}=e;return t.chatLogElements},e=>e.width>100?100:e.width,e=>{let{theme:t}=e;return t.chatLogElements},e=>{let{theme:t}=e;return t.chatLogElements}),jo=Object(c.c)(P.f).withConfig({displayName:"styles__CountContainer",componentId:"sc-18r5r1u-2"})(["margin:0;opacity:1;display:",";color:",";span{font-weight:500;}",";"],e=>e.active?"block":"none",e=>{let{theme:t}=e;return t.chatLogElements},x.e);var To=function(e){let{alwaysShow:t,inputMax:n,inputLength:r,shake:o}=e;const a=Math.floor(r/n*100),s=r>0,c=t||r>n;return i.a.createElement(_o,{enabled:c,active:s},c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Co,{active:s,width:a},i.a.createElement("span",null),i.a.createElement("span",null)),i.a.createElement(ko,{initial:!1,animate:o?"error":"normal"},i.a.createElement(jo,{active:s},i.a.createElement("span",null,r),"/",n))))},So=n(25);const Io=c.c.div.withConfig({displayName:"styles__UploadWrapper",componentId:"sc-1e637pi-0"})(["button{padding:0;}&:hover{opacity:0.8;}svg{margin-top:3px;path{fill:",";}}"],e=>{let{theme:t}=e;return t.buttonBackground}),Ao=["Bytes","kB","MB","GB"],No=e=>new Promise((t,n)=>{const r=e.size/1024;if(r>5120)return void n(new Error(`The file must be less than ${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(1024));return`${parseFloat((e/1024**n).toFixed(t))} ${Ao[n]}`}(5242880)}`));const o=new FileReader;o.readAsDataURL(e),o.onload=()=>t({url:o.result,file:e,sizeKb:r,name:e.name,type:e.type,status:y.a.PROCESSING,sender:y.l.USER}),o.onabort=()=>n(new Error(o.error))});var Po=function(e){let{accept:t="image/*,text/*,.pdf,.heic",multiple:n=!0}=e;const{handoverMode:r,isTextDirectionRtl:o}=Object(s.d)(w.d),{takenOver:c}=Object(s.d)(w.a),{attachments:l}=Object(s.d)(w.e),u=Object(s.c)(),d=Object(a.useRef)(),f=Object(So.a)(),p=c&&r===y.g.PLATFORM,h=Object(a.useCallback)(async e=>{let{target:t}=e;try{var n;if((null===(n=t.files)||void 0===n?void 0:n.length)>5)return void u(Object(ue.Y)("You can upload up to 5 files at a time",3500));const e=await Promise.all(Array.from(t.files).map(No));u(Object(ue.P)(e))}catch(e){u(Object(ue.Y)(e.message.replace(/^Error: ?/i,""),3500))}},[u]),m=Object(a.useCallback)(()=>{d.current&&(d.current.value="",d.current.click())},[d]);return Object(a.useEffect)(()=>{l.buttonClicked&&(u(Object(ue.a)()),m())},[l.buttonClicked,u,m]),i.a.createElement(Io,{isTextDirectionRtl:o,hasFiles:l.files.length>0},(p||f&&(null==l?void 0:l.exchangeId))&&i.a.createElement(fe.a,{onClick:e=>{e.preventDefault(),e.stopPropagation(),m()}},i.a.createElement(At,null)),i.a.createElement("input",{ref:d,hidden:!0,type:"file",accept:t,multiple:n,onChange:h,style:{display:"none"}}))};const Mo=c.c.div.withConfig({displayName:"styles__Container",componentId:"sc-76oby0-0"})(["display:flex;align-items:center;font-size:15px;> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:8px;}button{display:none;position:absolute;top:-9px;left:-8px;border:1px solid white;border-radius:50%;width:20px;height:20px;padding:0px;background:",";}"],u.a.darkColor),Lo=c.c.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-76oby0-1"})(["height:41px;&:not(:first-child){margin-left:4px;}&:hover{button{display:block;}}"]),Ro=c.c.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-76oby0-2"})(["height:41px;display:flex;img{border-radius:8px;max-height:100%;margin-left:4px;}"]),Do=c.c.div.withConfig({displayName:"styles__IconWrapper",componentId:"sc-76oby0-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],u.a.grayColor);c.c.div.withConfig({displayName:"styles__FileType",componentId:"sc-76oby0-4"})(["font-size:14px;height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],u.a.grayColor);var Bo=function(e){let{file:t}=e;return hn(t)===y.e.IMAGE?i.a.createElement(Ro,null,i.a.createElement("img",{src:t.url,alt:`Uploaded ${t.name}`})):i.a.createElement(Do,null,i.a.createElement(At,{height:24}))};var Fo=function(){const{attachments:{files:e}}=Object(s.d)(w.e),t=Object(s.c)(),n=Object(a.useCallback)(n=>t(Object(ue.P)(((e,t)=>{const n=e.slice();return n.splice(t,1),n})(e,n))),[t,e]);return i.a.createElement(Mo,null,e.map((e,t)=>i.a.createElement(Lo,{key:`uploaded-image-${e.name}-${t}`},i.a.createElement(Bo,{file:e}),i.a.createElement(fe.a,{onClick:e=>{e.preventDefault(),n(t)}},i.a.createElement(h.e,{width:18,height:18,color:"#FFF"})))),1===(null==e?void 0:e.length)&&i.a.createElement("span",null,e[0].name))},zo=n(16),Uo=n(45),Ho=a.useLayoutEffect,$o=function(e){var t=Object(a.useRef)(e);return Ho((function(){t.current=e})),t},Vo=function(e,t){"function"!=typeof e?e.current=t:e(t)},qo=function(e,t){var n=Object(a.useRef)();return Object(a.useCallback)((function(r){e.current=r,n.current&&Vo(n.current,null),n.current=t,t&&Vo(t,r)}),[t])},Go={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Wo=function(e){Object.keys(Go).forEach((function(t){e.style.setProperty(t,Go[t],"important")}))},Yo=null;var Ko=function(){},Xo=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Jo=!!document.documentElement.currentStyle,Qo=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,o=e.minRows,i=e.onChange,s=void 0===i?Ko:i,c=e.onHeightChange,l=void 0===c?Ko:c,u=Object(Uo.a)(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);var d,f=void 0!==u.value,p=Object(a.useRef)(null),h=qo(p,t),m=Object(a.useRef)(0),g=Object(a.useRef)(),b=function(){var e=p.current,t=n&&g.current?g.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,Xo.reduce((function(e,t){return e[t]=n[t],e}),{})),o=r.boxSizing;return""===o?null:(Jo&&"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){g.current=t;var a=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),Yo||((Yo=document.createElement("textarea")).setAttribute("tab-index","-1"),Yo.setAttribute("aria-hidden","true"),Wo(Yo)),null===Yo.parentNode&&document.body.appendChild(Yo);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;Yo.style[t]=i[t]})),Wo(Yo),Yo.value=t;var c=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(Yo,e);Yo.value="x";var l=Yo.scrollHeight-o,u=l*n;"border-box"===s&&(u=u+o+a),c=Math.max(u,c);var d=l*r;return"border-box"===s&&(d=d+o+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||"x",o,r),i=a[0],s=a[1];m.current!==i&&(m.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return Object(a.useLayoutEffect)(b),d=$o(b),Object(a.useLayoutEffect)((function(){var e=function(e){d.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(a.createElement)("textarea",Object(zo.a)({},u,{onChange:function(e){f||b(),s(e)},ref:h}))},Zo=Object(a.forwardRef)(Qo);const ea=c.c.div.withConfig({displayName:"styles__ComposerContainer",componentId:"sc-1v8m1u6-0"})(["padding:20px;padding-top:5px;background:none;background:",";background-color:",";",""],e=>e.theme.background,e=>e.theme.background,fe.e),ta=c.c.div.withConfig({displayName:"styles__FormInner",componentId:"sc-1v8m1u6-1"})(["display:flex;align-items:center;justify-content:space-between;gap:15px;"]),na=c.c.div.withConfig({displayName:"styles__DisabledText",componentId:"sc-1v8m1u6-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:",";line-height:24px;",""],u.a.darkColor,u.d.fontSizeH5,e=>e.hide?"transform: translateY(-45px);":""),ra=Object(c.c)(Zo).withConfig({displayName:"styles__ComposerInput",componentId:"sc-1v8m1u6-3"})([""," min-height:","px;"],fe.f,e=>{let{$minHeight:t}=e;return t}),oa=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1v8m1u6-4"})(["width:40px;height:40px;display:flex;justify-content:center;align-items:center;"]),aa=Object(c.b)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:100%;width:100%;padding:0;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:36px;max-height:36px;background-color:transparent;"," &:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{fill:",";}}"],m.a,e=>e.theme.buttonBackground),ia=c.c.button.withConfig({displayName:"styles__SubmitButton",componentId:"sc-1v8m1u6-5"})(["",";z-index:15;padding:8px;transition:opacity 0.1s ease-in;",";border-radius:100px;background:",";background-color:",";svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:#fff;}}",";"],aa,e=>!e.active&&"\n opacity: 0.3;\n pointer-events: none;\n ",e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),sa=Object(So.a)();let ca;function la(e){let{active:t,chatHasStarted:n,onManualFocus:r,currentlyPoppedUp:o,autoFocused:c,isScrolledDown:l}=e;const u=Object(a.useRef)(),[d,f]=Object(a.useState)(41),[p,m]=Object(a.useState)(!1),[g,b]=Object(a.useState)(!1),[v,y]=Object(a.useState)(""),[x,E]=Object(a.useState)(0);Object(a.useEffect)(()=>{(t||n)&&!sa&&!o&&u.current&&!c&&u.current.focus()},[t,n,c,u,o]);const{text:O,inputLimitEnabled:k,inputLimit:_,isTextDirectionRtl:C}=Object(s.d)(w.d),{defaultLanguage:j}=Object(ar.a)(),{hideInputField:T,currentLanguage:S,allGreetingsHideInput:I,attachments:{files:A}}=Object(s.d)(w.e),{takenOver:N,userIsTyping:P}=Object(s.d)(w.a),{connected:M}=Object(s.d)(w.f),{chatMessages:L}=Object(s.d)(w.n),{inspectorOpen:R}=Object(s.d)(w.j),D=Object(s.c)(),B=C?"rtl":void 0,F=T&&!N,z=!N&&k?_:1e3,U=!v&&0===A.length,H=!M||F||I&&0===L.length||v.length>z||U||!n,{placeholder:$,disabled_input_text:V}=Object(a.useMemo)(()=>Object(ir.a)(O,S,j),[S,j,O]),q=e=>{if(e.preventDefault(),e.stopPropagation(),P&&D(Object(ue.vb)()),H)return!1;if(!v.trim()&&0===A.length)return!1;if(A.length>0)D(Object(ue.L)());else{const e=(new Date).getTime();if(!(e-x>1e3))return!1;E(e),D(Object(ue.gb)(v.trim()))}return y(""),!0};return i.a.createElement(ea,{dir:B,inspectorOpen:R},i.a.createElement(To,{alwaysShow:!N&&k,inputMax:z,inputLength:v.length,shake:p}),i.a.createElement("form",{autoComplete:"off",action:"#",onSubmit:q},i.a.createElement(ta,null,i.a.createElement(fe.c,{targetHeight:d,active:U?0:1,hasFiles:(null==A?void 0:A.length)>0},0===A.length&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ra,{id:"chat-box-composer","data-cy":"chat-box-composer","aria-hidden":!n,"aria-label":$,name:"message",$hide:F?1:0,disabled:!n||F,$active:U?0:1,ref:u,placeholder:$,type:"text",onChange:e=>{const{value:t}=e.target;N?(e=>{const t=e.length>0;clearTimeout(ca),!P&&t?D(Object(ue.ub)()):P&&!t&&D(Object(ue.vb)()),ca=setTimeout(()=>{D(Object(ue.vb)())},5e3)})(t):t.length>z&&m(!0),y(t)},value:v,onFocus:()=>b(!0),onBlur:()=>b(!1),onMouseDown:()=>{g||l()||r()},onHeightChange:f,$minHeight:41,onKeyDown:e=>{m(!1),"Enter"!==e.key||e.shiftKey||q(e)}}),i.a.createElement(na,{hide:T?1:0},V)),i.a.createElement(Fo,null)),i.a.createElement(Po,null),i.a.createElement(oa,{isTextDirectionRtl:C},i.a.createElement(ia,{"data-cy":"composer-submit","aria-hidden":H?"true":"false",active:H?0:1,disabled:H,role:"button",onClick:q,title:"Send message",onMouseDown:e=>{e.preventDefault()}},i.a.createElement(h.p,{width:18,height:18}))))))}la.defaultProps={currentlyPoppedUp:!1};var ua=la;var da=n(34);var fa=function(e){let{cancelChat:t,setCancelChat:n}=e;const{name:r,avatar:o,fullscreenMode:c,feedbackFormType:l,isTextDirectionRtl:u}=Object(s.d)(w.d),{optionsScreenOpen:d,chatHasStarted:f}=Object(s.d)(w.e),p=Object(s.c)(),m=!(d||c&&l===y.r.NONE),g=document.documentElement,b=u?"rtl":void 0,v=Object(a.useCallback)(()=>{p(Object(ue.h)()),g.style.overflow="unset"},[p,g]),x=Object(a.useCallback)(()=>{p(Object(ue.H)())},[p]);!function(e){Object(a.useEffect)(()=>(window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)),[e])}(Object(a.useCallback)(e=>{const{tagName:t}=document.activeElement;"Escape"===e.code&&"BODY"===t&&v(),"Escape"===e.code&&"BODY"!==t&&document.activeElement.blur()},[v]));const E=Object(a.useCallback)(()=>{t?(p(Object(ue.w)(c)),n(!1),g.style.overflow="unset"):n(!0)},[t,p,c,n,g]);return f?i.a.createElement(da.c,{dir:b,"data-cy":"chat-box-header"},i.a.createElement(da.d,null,o?i.a.createElement(da.f,{avatar:o}):i.a.createElement(Yr,{height:30}),i.a.createElement(da.a,{isTextDirectionRtl:u,"aria-label":`Chat bot ${r||"Kindly"}`},r||"Kindly")),i.a.createElement(da.e,null,m&&i.a.createElement(i.a.Fragment,null,i.a.createElement(da.b,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:x,"data-cy":"chat-settings-button"},i.a.createElement(h.q,{width:24,height:24})),i.a.createElement(da.b,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:v,"data-cy":"minimize-chat-button"},i.a.createElement(h.n,{width:24,height:24})),i.a.createElement(da.b,{"aria-label":"End chat",title:"End chat",type:"button",onClick:E,"data-cy":"end-chat-button","data-testid":"end-chat-button",isTextDirectionRtl:u},i.a.createElement(h.e,{width:24,height:24}))))):null};const pa=c.c.div.withConfig({displayName:"styles__AboutChatContainer",componentId:"sc-pmmp3f-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;"],x.e),ha=c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-pmmp3f-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),ma=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-pmmp3f-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),ga=Object(c.c)(P.e).withConfig({displayName:"styles__AboutParagraph",componentId:"sc-pmmp3f-3"})(["font-size:16px;a{color:",";}"],u.a.primaryColor),ba=c.c.div.withConfig({displayName:"styles__LinkContainer",componentId:"sc-pmmp3f-4"})(["a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor);var va=function(e){let{setAboutChat:t}=e;const{text:n}=Object(s.d)(w.d),{currentLanguage:r}=Object(s.d)(w.e),{defaultLanguage:o}=Object(ar.a)(),c=Object(a.useCallback)(()=>t(!1),[t]),l=Object(a.useCallback)(e=>{"Enter"===e.key&&t(!1)},[t]),u=Object(a.useMemo)(()=>Object(ir.a)(n,r,o),[r,o,n]),{back_to_chat_button:d}=u;return i.a.createElement(pa,null,i.a.createElement(ha,null,i.a.createElement(ma,null,i.a.createElement(P.b,null,"About Kindly"),i.a.createElement(ga,null,"This chatbot is powered by Kindly.",i.a.createElement("br",null),"To learn more about Kindly, visit"," ",i.a.createElement("a",{href:"https://www.kindly.ai/nb/products",target:"_blank",rel:"noopener noreferrer"},"this website."))),i.a.createElement(ba,null,i.a.createElement(fe.d,{"aria-label":d,title:d,onClick:c,onKeyUp:l,tabIndex:"0",type:"button"},"‹ ",d))))};const ya=c.c.div.withConfig({displayName:"styles__PoweredContainer",componentId:"sc-16vfwd0-0"})(["z-index:2;display:flex;justify-content:center;"]),wa=c.c.span.withConfig({displayName:"styles__Blob",componentId:"sc-16vfwd0-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),xa=Object(c.c)(P.f).withConfig({displayName:"styles__PoweredParagraph",componentId:"sc-16vfwd0-2"})(["display:flex;opacity:1;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"]);var Ea=function(e){let{hide:t,setAboutChat:n}=e;const r=Object(a.useCallback)(()=>n(!0),[n]),o=Object(a.useCallback)(e=>{"Enter"===e.key&&n(!0)},[n]);return i.a.createElement(ya,{hide:t},i.a.createElement(xa,null,i.a.createElement("span",null,"Powered by")," ",i.a.createElement(wa,null),i.a.createElement(P.d,null,i.a.createElement(fe.d,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:r,onKeyUp:o,type:"button",tabIndex:0},"Kindly"))))},Oa=e=>{const[t,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{t&&!e&&n(!1)},[e,t]),{showAboutChat:t,setShowAboutChat:n}};const ka=c.c.div.withConfig({displayName:"styles__CancelChatContainer",componentId:"sc-1gy1mo2-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;"],x.e),_a=c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1gy1mo2-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Ca=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1gy1mo2-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),ja=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1gy1mo2-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor),Ta=c.c.div.withConfig({displayName:"styles__CancelChatFooter",componentId:"sc-1gy1mo2-4"})(["div{display:flex;position:unset;align-items:center;}"]);var Sa=function(e){let{setCancelChat:t}=e;const n=Object(s.c)(),{text:r}=Object(s.d)(w.d),{currentLanguage:o,active:c}=Object(s.d)(w.e),{setShowAboutChat:l}=Oa(c),{defaultLanguage:d}=Object(ar.a)(),f=document.documentElement,p=Object(a.useMemo)(()=>Object(ir.a)(r,o,d),[o,d,r]),h=Object(a.useCallback)(()=>{n(Object(ue.w)()),t(!1),f.style.overflow="unset"},[n,t,f]),m=Object(a.useCallback)(()=>t(!1),[t]),g=Object(a.useCallback)(e=>{"Enter"===e.key&&t(!1)},[t]),{back_to_chat_button:b,cancel_chat_button:v,cancel_chat_text:y}=p;return i.a.createElement(ka,null,i.a.createElement(_a,null,i.a.createElement(Ca,null,i.a.createElement(P.a,null,y)),i.a.createElement(ja,null,i.a.createElement(Cr.b,{style:u.b,"aria-label":v,title:v,onClick:h,type:"button",color:!0,text:v,cy:"cancel-chat-button"}),i.a.createElement(fe.d,{"aria-label":b,title:b,onClick:m,onKeyUp:g,type:"button",tabIndex:"0"},"‹ ",b)),i.a.createElement(Ta,null,i.a.createElement(Ea,{setAboutChat:l}))))};n(39);const Ia=Object(c.c)(fe.d).withConfig({displayName:"styles__FooterLink",componentId:"sc-1l968t6-0"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:",";:hover,:focus,:active,:visited{color:",";}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor),Aa=c.c.div.withConfig({displayName:"styles__OptionsContainer",componentId:"sc-1l968t6-1"})(["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;}"]),Na=(c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1l968t6-2"})(["height:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;"]),c.c.div.withConfig({displayName:"styles__GenericContainer",componentId:"sc-1l968t6-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],u.c.maxPhoneHeight)),Pa=c.c.div.withConfig({displayName:"styles__DeleteContainer",componentId:"sc-1l968t6-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],u.c.maxPhoneHeight),Ma=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1l968t6-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;}"]),La=(c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1l968t6-6"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;&:last-child{margin-top:10px;}svg{margin-right:15px;}}"]),c.c.span.withConfig({displayName:"styles__OptionsButtonText",componentId:"sc-1l968t6-7"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"])),Ra=c.c.div.withConfig({displayName:"styles__OptionsFooter",componentId:"sc-1l968t6-8"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]),Da=c.c.div.withConfig({displayName:"styles__DeletedText",componentId:"sc-16kypod-0"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;line-height:24px;"],u.a.darkColor,u.d.fontSizeH5);var Ba=function(e){let{textContent:t}=e;const{chat_deleted_header:n,chat_deleted_text:r}=t;return i.a.createElement(Ma,null,i.a.createElement(P.b,null,n),i.a.createElement(Da,null,r))};const Fa="GENERIC",za="LANGUAGE",Ua="DOWNLOAD",Ha="DELETE_CHAT_CONFIRM",$a="CHAT_DELETED",Va=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-c6vrbi-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);var qa=function(e){let{textContent:t,setOptionsView:n}=e;const r=Object(s.c)(),{back_to_chat_button:o,delete_text:c,delete_button:l}=t,d=document.documentElement,f=Object(a.useCallback)(()=>{n($a),r(Object(ue.r)()),d.style.overflow="unset"},[n,r,d]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ma,null,i.a.createElement(P.b,null,c)),i.a.createElement(Va,null,i.a.createElement(Cr.b,{style:u.b,"aria-label":l,title:l,onClick:f,type:"button",text:l,color:!0,cy:"confirm-delete-chat"}),i.a.createElement(Ia,{"aria-label":o,title:o,onClick:()=>n(Fa),type:"button"},"‹ ",o)))},Ga=n(26);const Wa=c.c.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-mbgnew-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Ya=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-mbgnew-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Ka=c.c.div.withConfig({displayName:"styles__Title",componentId:"sc-mbgnew-2"})(["color:",";font-size:",";margin:0 0 10px;line-height:24px;"],u.a.darkColor,u.d.fontSizeH5);var Xa=function(e){let{textContent:t,setOptionsView:n}=e;const r=Object(s.c)(),{back_to_chat_button:o,download_button:c,download_format_text:l}=t,u=Object(a.useCallback)(async()=>{r(await Object(ue.x)({},"html"))},[r]),d=Object(a.useCallback)(async()=>{r(Object(ue.x)({},"json"))},[r]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ma,null,i.a.createElement(Ka,null,l)),i.a.createElement(Wa,null,i.a.createElement(Ya,null,i.a.createElement(Ga.b,{"aria-label":`${c} (HTML)`,title:`${c} (HTML)`,onClick:u,type:"button","data-cy":"download-chat-html"},i.a.createElement(La,null,`${c} (HTML)`)),i.a.createElement(Ga.b,{"aria-label":`${c} (JSON)`,title:`${c} (JSON)`,onClick:d,type:"button","data-cy":"download-chat-json"},i.a.createElement(La,null,`${c} (JSON)`))),i.a.createElement(Ia,{"aria-label":o,title:o,onClick:()=>n(Fa),type:"button"},"‹ ",o)))};const Ja=c.c.div.withConfig({displayName:"styles__Header",componentId:"sc-crpo3y-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,u.c.maxPhoneHeight),Qa=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-crpo3y-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;}}"]);var Za=function(e){let{languages:t,textContent:n,setOptionsView:r}=e;const o=Object(s.c)(),{back_to_chat_button:c,change_language_button:l,download_button:u,delete_button:d,start_over_button:f}=n,p=Object(a.useCallback)(()=>{o(Object(ue.w)(!0))},[o]),m=Object(a.useCallback)(()=>{o(Object(ue.k)())},[o]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ja,{long:t.length>1}),i.a.createElement(Qa,null,t.length>1&&i.a.createElement(Ga.b,{"aria-label":l,title:l,onClick:()=>r(za),type:"button","data-cy":"change-language-option"},i.a.createElement(La,null,i.a.createElement(h.l,{width:18,height:14}),l)),i.a.createElement(Ga.b,{"aria-label":f,title:f,onClick:p,type:"button","data-cy":"restart-chat-option"},i.a.createElement(La,null,f)),i.a.createElement(Ga.b,{"aria-label":d,title:d,onClick:()=>r(Ha),type:"button","data-cy":"delete-chat-option"},i.a.createElement(La,null,d)),i.a.createElement(Ga.b,{"aria-label":u,title:u,onClick:()=>r(Ua),type:"button","data-cy":"download-chat-option"},i.a.createElement(La,null,u)),i.a.createElement(Ga.b,{"aria-label":c,title:c,onClick:m,type:"button","data-cy":"back-to-chat-option",$color:!0,autoFocus:!0},i.a.createElement(La,null,c))))};const ei=c.c.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-1hbxmch-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),ti=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1hbxmch-1"})(["max-width:100%;flex-direction:column;display:flex;margin:unset;min-width:190px;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]),ni=c.c.div.withConfig({displayName:"styles__ButtonFooter",componentId:"sc-1hbxmch-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),ri=Object(c.c)(P.b).withConfig({displayName:"styles__Title",componentId:"sc-1hbxmch-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);var oi=function(e){let{languages:t,currentLanguage:n,textContent:r,setOptionsView:o}=e;const[c,l]=Object(a.useState)(n);Object(a.useEffect)(()=>{l(n)},[n,l]);const d=Object(a.useCallback)(()=>o(Fa),[o]),f=Object(a.useCallback)(e=>{"Enter"===e.key&&o(Fa)},[o]),p=Object(s.c)(),{confirm_action_button:m,back_to_chat_button:g,change_language_button:b,change_language_text:v}=r;return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ma,null,i.a.createElement(ri,null,i.a.createElement(h.l,{width:35,height:39}),b),i.a.createElement(P.e,null,v)),i.a.createElement(ei,null,i.a.createElement(ti,null,t.map(e=>i.a.createElement(Cr.b,{key:e.code,"aria-label":e.name,title:e.name,onClick:()=>l(e.code),text:e.name,flat:e.code===c,selected:e.code===c,cy:`${e.code}-button`}))),i.a.createElement(ni,null,c!==n&&i.a.createElement(Cr.b,{style:u.b,"aria-label":m,title:m,onClick:()=>{p(Object(ue.R)(c))},type:"submit",text:m,color:!0}),i.a.createElement(Ia,{"aria-label":g,title:g,onClick:d,onKeyUp:f,tabIndex:"0",type:"button"},"‹ ",g))))};var ai=function(e){let{setAboutChat:t}=e;const{text:n}=Object(s.d)(w.d),{languages:r,defaultLanguage:o}=Object(ar.a)(),{currentLanguage:c}=Object(s.d)(w.e),{chatDeleted:l}=Object(s.d)(w.p),[u,d]=Object(a.useState)(l?$a:Fa),f=Object(a.useMemo)(()=>Object(ir.a)(n,c,o),[c,o,n]);return i.a.createElement(Aa,null,u===Fa||u===Ua||u===za?i.a.createElement(Na,null,u===Fa&&i.a.createElement(Za,{languages:r,textContent:f,setOptionsView:d}),u===Ua&&i.a.createElement(Xa,{languages:r,textContent:f,setOptionsView:d}),u===za&&i.a.createElement(oi,{languages:r,textContent:f,currentLanguage:c,setOptionsView:d})):i.a.createElement(Pa,null,u===$a&&i.a.createElement(Ba,{textContent:f}),u===Ha&&i.a.createElement(qa,{setOptionsView:d,textContent:f})),i.a.createElement(Ra,null,i.a.createElement(Ea,{setAboutChat:t})))},ii=n(84);const si=c.c.div.withConfig({displayName:"styles__SelectContainer",componentId:"sc-1lfni2n-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;}"]),ci=c.c.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1lfni2n-1"})(["position:absolute;top:10px;left:8px;svg{path{fill:#333;}}"]),li=c.c.select.withConfig({displayName:"styles__Select",componentId:"sc-1lfni2n-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:",";border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],u.d.fontSizeH5,e=>e.icon&&"padding-left: 30px;",m.a);function ui(e){let{children:t,onClick:n,onChange:r,value:o,name:a,icon:s,...c}=e;return i.a.createElement(si,null,s&&i.a.createElement(ci,null,i.a.createElement(h.l,{width:18,height:14})),i.a.createElement(li,Object.assign({onClick:n,onChange:r,value:o,name:a,icon:s},c),t))}ui.defaultProps={icon:!1,onClick:ii.a,onChange:ii.a};var di=ui,fi=n(41);const pi=c.c.div.withConfig({displayName:"styles__WelcomePageContainer",componentId:"sc-elyt0g-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),hi=Object(c.b)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.welcomePageImage),mi=c.c.div.withConfig({displayName:"styles__HeaderContent",componentId:"sc-elyt0g-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&&hi),gi=c.c.div.withConfig({displayName:"styles__IntroContent",componentId:"sc-elyt0g-2"})(["flex:1;padding:15px 30px 30px;border-top:5px solid ",";@media ","{padding:30px;}"],e=>e.theme.headerBackground,u.c.maxTablet),bi=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-elyt0g-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),vi=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-elyt0g-4"})(["padding:20px 0;"]),yi=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-elyt0g-5"})(["display:flex;align-items:center;justify-content:space-between;button:first-child{@media ","{min-width:unset;}}"],u.c.maxTablet),wi=(Object(c.c)(fe.a).withConfig({displayName:"styles__CloseButton",componentId:"sc-elyt0g-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),Object(c.c)(P.a).withConfig({displayName:"styles__TitleText",componentId:"sc-elyt0g-7"})(["color:",";font-weight:500;font-size:",";margin:0 0 15px;"],u.a.textColor,u.d.fontSizeH3)),xi=c.c.div.withConfig({displayName:"styles__IntroText",componentId:"sc-elyt0g-8"})(["color:",";max-height:180px;overflow:hidden;font-size:",";margin:30px 0 10px 0;line-height:24px;div{& >:first-child{margin-top:0;}& >:last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"],u.a.textColor,u.d.fontSizeH5);var Ei=function(){const[e,t]=Object(a.useState)(!1),{active:n,currentLanguage:r,optionsScreenOpen:o,feedbackFormType:c}=Object(s.d)(w.e),{welcomePage:l,welcomePageType:d,fullscreenMode:f,isTextDirectionRtl:p}=Object(s.d)(w.d),{languages:m,defaultLanguage:g}=Object(ar.a)(),{labels:b}=Object(s.d)(w.l),v=Object(s.c)(),x=Object(a.useRef)(),E=document.documentElement,O=!(o||f&&c===y.r.NONE),k=p?"rtl":void 0;Object(a.useEffect)(()=>{n&&x.current.focus()},[n]);const _=l?((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"image"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(fi.a)(a,t,n)}},{}))(l,r,g):{header:"",text:"",start_button:""},C=Object(a.useCallback)(()=>{t(!0),v(Object(ue.l)()),v(Object(ue.R)(r||m[0].code,{skipRestart:b.length>0}))},[v,r,m,b]),j=Object(a.useCallback)(()=>{v(Object(ue.h)()),E.style.overflow="unset"},[v,E]),T=Object(a.useCallback)(e=>{v(Object(ue.R)(e))},[v]);return i.a.createElement(pi,null,i.a.createElement(mi,{welcomePageImage:"PICTURE"===d&&l.image},O&&i.a.createElement(da.b,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:j,"data-cy":"close-chat-button"},i.a.createElement(h.e,{width:25,height:25}))),i.a.createElement(gi,null,i.a.createElement(bi,{dir:k},i.a.createElement("div",null,m.length>1&&i.a.createElement(di,{icon:!0,name:"language-select","data-cy":"language-select",value:r,onChange:e=>T(e.target.value),"aria-label":"Select a language"},m.map(e=>i.a.createElement("option",{key:e.code,label:e.name,value:e.code},e.name))),i.a.createElement(vi,null,i.a.createElement(wi,null,_.header),i.a.createElement(xi,null,Rn(_.text)))),i.a.createElement(yi,null,i.a.createElement(Cr.b,{style:u.b,cy:"start-chat-button",type:"button",title:_.start_button||"Start chat",onClick:C,loading:e,color:!0,ref:x},_.start_button||"Start chat")))))};const Oi=Object(c.d)(["0%{opacity:0;}100%{opacity:1;}"]),ki=Object(c.b)(["",";animation-name:",";"],Object(x.a)(100),Oi),_i=Object(c.d)(["0%{opacity:1;}100%{opacity:0;}"]),Ci=Object(c.b)(["",";animation-delay:50ms;animation-name:",";"],Object(x.a)(500),_i),ji=Object(c.b)(["",";"],e=>e.fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px"),Ti=c.c.div.withConfig({displayName:"styles__OverlayContainer",componentId:"sc-1xhdwt3-0"})(["width:100%;overflow:hidden;padding-bottom:5px;"," position:absolute;z-index:",";background:#fff;background-color:#fff;",";",";",";"],ji,u.f.overlayIndex,e=>!e.chatViewHidden&&"pointer-events: none",e=>!e.chatViewHidden&&Object(x.h)(300),e=>e.chatViewHidden?ki:Ci);var Si=function(e){let{showAboutChat:t,setShowAboutChat:n,showCancelConfirmation:r,setShowCancelConfirmation:o}=e;const{welcomePageType:a,hideHeader:c}=Object(s.d)(w.d),{chatHasStarted:l,optionsScreenOpen:u}=Object(s.d)(w.e),{chatDeleted:d}=Object(s.d)(w.p),f=!l&&a!==y.s.NONE,p=u||f||r||t||d;return i.a.createElement(Ti,{chatViewHidden:p,fullHeight:c||f},t&&!r&&i.a.createElement(va,{setAboutChat:n}),r&&i.a.createElement(Sa,{setCancelChat:o}),f&&i.a.createElement(Ei,null),(u||d)&&i.a.createElement(ai,{setAboutChat:n}))};const Ii=c.c.div.withConfig({displayName:"styles__Container",componentId:"sc-109olta-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,fe.e,Object(Kr.a)(.1,u.a.grayColor),Object(Kr.a)(.1,u.a.grayColor)),Ai=c.c.form.withConfig({displayName:"styles__Contents",componentId:"sc-109olta-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;"}),Ni=Object(c.c)(fe.a).withConfig({displayName:"styles__CloseButton",componentId:"sc-109olta-2"})(["min-height:25px;display:flex;align-items:center;font-size:",";padding:0;:hover{opacity:0.8;}"],u.d.fontSizeH4),Pi=c.c.div.withConfig({displayName:"styles__Header",componentId:"sc-109olta-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:",";align-items:center;"],e=>{let{theme:t}=e;return Object(sr.a)(t.background,"white","black")},u.d.fontSizeP),Mi=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-109olta-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Li=c.c.input.withConfig({displayName:"styles__Input",componentId:"sc-109olta-5"})(["",""],fe.f),Ri=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Di(e,t){const n=Object(s.c)(),{contactDetailsButton:r}=Object(s.d)(w.e),[o,l]=Object(a.useState)(""),[d,f]=Object(a.useState)(!1),p=Object(a.useRef)(),m=Object(c.e)(),g=r.contact_details.contact_type,{label:b,placeholder:v}=r.contact_details,y=Object(a.useMemo)(()=>Object(sr.a)(m.background,u.a.grayColor,u.a.darkColor),[m.background]),x=()=>{n(Object(ue.lb)())};return i.a.createElement(Ii,{ref:t},i.a.createElement("span",null),i.a.createElement(Ai,{hasSubmitted:d},i.a.createElement(Pi,null,g&&i.a.createElement(Ni,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:x,"data-cy":"minimize-chat-button",mobileOnly:!0},i.a.createElement(h.e,{width:25,height:12,stroke:y})),b),i.a.createElement(Mi,null,i.a.createElement(fe.c,null,i.a.createElement(Li,{onChange:e=>{l(e.target.value)},value:o,type:g===Ri.EMAIL?"email":"tel",ref:p,placeholder:v,required:!0})),i.a.createElement(ia,{onClick:e=>{var t,a;return f(!0),!(null==p||null===(t=p.current)||void 0===t||null===(a=t.validity)||void 0===a||!a.valid)&&(e.preventDefault(),n(Object(ue.M)(r,o)),x(),!1)},type:"submit",active:!0,title:`Send your ${g===Ri.EMAIL?"email address":"phone number"}`},i.a.createElement(h.p,{width:18,height:18})))))}var Bi=Object(a.forwardRef)(Di),Fi=n(107);const zi=Object(c.d)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Ui=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),zi),Hi=c.c.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-efv8qo-0"})(["z-index:25;margin:15px;display:flex;padding:10px 15px;padding-right:10px;justify-content:space-between;border-radius:6px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";position:absolute;left:0;right:0;top:0;transition:top 150ms ease;",";",";"],u.a.shadowColor,e=>!e.isOnTop&&"top: 55px",Ui),$i=c.c.div.withConfig({displayName:"styles__AlertContent",componentId:"sc-efv8qo-1"})(["padding-right:5px;"]),Vi=Object(c.c)(P.e).withConfig({displayName:"styles__ContentText",componentId:"sc-efv8qo-2"})(["margin:0;"]),qi=Object(c.c)(fe.d).withConfig({displayName:"styles__ContentLink",componentId:"sc-efv8qo-3"})(["font-size:14px;font-weight:500;margin-top:5px;display:block;color:",";"],u.a.primaryColor),Gi=Object(c.c)(fe.a).withConfig({displayName:"styles__AlertDismiss",componentId:"sc-efv8qo-4"})(["z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}svg path{stroke:",";}"],e=>e.theme.buttonBackground);var Wi=function(){const{welcomePageType:e}=Object(s.d)(w.d),{chatHasStarted:t,optionsScreenOpen:n}=Object(s.d)(w.e),{linkLocation:r,linkText:o,textContent:a}=Object(s.d)(w.m),c=Object(s.c)(),l=!t&&e!==y.s.NONE||n;return i.a.createElement(Hi,{isOnTop:l},i.a.createElement($i,null,i.a.createElement(Vi,null,a),r&&o&&i.a.createElement(qi,{href:r,target:"_blank",rel:"noopener noreferrer"},o)),i.a.createElement(Gi,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),c(Object(ue.s)())},type:"button"},i.a.createElement(h.e,{width:20,height:20,color:"#000"})))},Yi=n(79),Ki=n(70);const Xi=Object(So.a)();const Ji=Object(So.a)();var Qi=e=>{let{bodyBottomElement:t,bodyElement:n,newMessage:r,bodyTopElement:o,groupRef:i}=e;const{chatMessages:c}=Object(s.d)(w.n),{isTyping:l}=Object(s.d)(w.d),{isTyping:u}=Object(s.d)(w.a),[d,f]=Object(a.useState)(!1),[p,h]=Object(a.useState)(!0),m=Boolean(r)||l||u,g=m&&Boolean(r&&r.from_bot),b=Object(a.useCallback)(((e,t)=>()=>{var n,r;if(!e.current)return!0;const o=null!==(n=null==t||null===(r=t.current)||void 0===r?void 0:r.clientHeight)&&void 0!==n?n:0,{scrollTop:a,offsetHeight:i,scrollHeight:s}=e.current;return o>0||a+i>=s-1})(n,t),[t,n]),v=Object(a.useCallback)(((e,t)=>()=>{if(!e.current||!t.current)return!0;const{scrollTop:n,scrollHeight:r}=e.current,{offsetHeight:o}=t.current;return!(r-n-30>=o)})(n,i),[t,n]),x=Object(a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Ji?setTimeout(()=>{t.current.scrollIntoView()},300):t.current.scrollIntoView())})(n,t),[t,n]),E=Object(a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Ji?setTimeout(()=>{t.current.scrollIntoView()},300):t.current.scrollIntoView())})(n,o),[o,n]);Object(a.useEffect)(()=>{0===c.length&&h(!0)},[c]),Object(a.useEffect)(()=>{var e,t;const n=(null==r||null===(e=r.buttonType)||void 0===e?void 0:e.toUpperCase())===y.b.QUICK_REPLY,o=(null==r||null===(t=r.handler)||void 0===t?void 0:t.toUpperCase())===y.f.TRIGGER_DIALOGUE;(n||o)&&E()},[r,E]);const O=((e,t)=>{const n=Object(a.useRef)(),r=Object(a.useRef)(),o=Object(a.useCallback)(()=>{r&&r.current&&clearTimeout(r.current)},[]),i=Object(a.useCallback)((function(){o();for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n.current=i,r.current=setTimeout(()=>e(...n.current),t)}),[o,t,e]);return Object(a.useEffect)(()=>o,[o]),i})(Object(a.useCallback)(()=>{b()||v()?(h(!0),f(!1)):h(!1)},[b,v]),300);return Object(a.useEffect)(()=>{setTimeout(()=>{!b()&&p&&(r&&function(){let{from_bot:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!e}(r)?x():E())})},[n,b,m,r,x,E,p]),Object(a.useEffect)(()=>{!g||d||b()||f(!0)},[b,g,d]),{shouldAutoScroll:p,scrollToBottom:x,scrollToLatestMessage:E,onUserScroll:O,hasUnreadMessage:d,isScrolledDown:b}};function Zi(e){let{buttonHandlers:t,onMessage:n=null}=e;const r=Object(a.useRef)(null),o=Object(a.useRef)(null),c=Object(a.useRef)(null),l=Object(a.useRef)(null),{hideHeader:u,fullscreenMode:d,offsetHeight:f}=Object(s.d)(w.d),{show:p,textContent:h}=Object(s.d)(w.m),{active:m,chatHasStarted:g,currentlyPoppedUp:b,contactDetailsButton:v,renderedBy:y}=Object(s.d)(w.e),{chatMessages:x}=Object(s.d)(w.n),E=(e=>{const t=le(e),n=(e||[]).length;return Object(a.useMemo)(()=>n&&n!==(t||[]).length&&e[n-1],[e,n,t])})(x),{scrollToBottom:O,scrollToLatestMessage:k,shouldAutoScroll:_,onUserScroll:C,hasUnreadMessage:j,isScrolledDown:T}=Qi({bodyBottomElement:o,bodyTopElement:c,bodyElement:r,newMessage:E,groupRef:l}),S=le(m);Object(a.useEffect)(()=>{m&&!S&&j&&O()},[j,m,O,S]);const[I,A]=Object(a.useState)(!0);Object(a.useEffect)(()=>{I?A(!1):Object(Ki.c)(Object(Yi.a)(E||{}),x.map(Yi.a),n,y)},[I,n,E,x,y]);const P=(e=>{const[t,n]=Object(a.useState)(!1),r=le(e);return Object(a.useEffect)(()=>{!e&&r&&n(!0)},[e,r]),t})(m),{showAboutChat:M,setShowAboutChat:L}=Oa(m),{showCancelConfirmation:R,setShowCancelConfirmation:D}=(e=>{const[t,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{t&&!e&&n(!1)},[e,t]),{showCancelConfirmation:t,setShowCancelConfirmation:n}})(m),{autoFocus:B,autoFocused:F}=(e=>{let{currentlyPoppedUp:t}=e;const[n,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{n&&r(!1)},[n]),{autoFocus:Object(a.useCallback)(()=>{n||Xi||t||r(!0)},[n,t]),autoFocused:n}})({currentlyPoppedUp:b}),z=Object(a.useCallback)(()=>{O(),B()},[B,O]);return i.a.createElement(N,{chatHasStarted:g,active:m,"aria-hidden":m?"false":"true","data-testid":"chat-box","data-cy":"chat-box",offsetHeight:f,fullscreen:d?1:0,"data-story":"ChatBoxContainer"},i.a.createElement(Fi.a,{errorPoint:"inside ChatBoxContainer"},!u&&i.a.createElement(fa,{cancelChat:R,setCancelChat:D}),i.a.createElement(Si,{showAboutChat:M,setShowAboutChat:L,showCancelConfirmation:R,setShowCancelConfirmation:D}),i.a.createElement(ge,null),p&&h&&i.a.createElement(Wi,null),i.a.createElement(Oo,{setAboutChat:L,hasUnreadMessage:j,onShowLatest:z,shouldAnimate:P,setBottomRef:o,setGroupRef:l,setTopRef:c,setBodyRef:r,scrollToBottom:O,scrollToLatestMessage:k,shouldAutoScroll:_,onUserScroll:C,buttonHandlers:t}),v?i.a.createElement(Bi,null):i.a.createElement(ua,{active:m,chatHasStarted:g,onManualFocus:O,isScrolledDown:T,autoFocused:F,currentlyPoppedUp:b})))}Zi.displayName="KindlyChatBox";var es=Zi;function ts(){const e=Object(s.c)(),{currentLanguage:t,active:n}=Object(s.d)(w.e),{maintenanceAlertEnabled:r,maintenanceAlert:o}=Object(s.d)(w.d),{defaultLanguage:i}=Object(ar.a)();Object(a.useEffect)(()=>{if(!n||!r)return;const a=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"alert_enabled"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(fi.a)(a,t,n)}},{}))(o,t,i);e(Object(ue.ab)(a))},[n,t,e,o,r,i])}var ns=n(171);const rs=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),os=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let as=!1;function is(e){const t=document.title;let n;n||as||(as=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",(function e(){clearInterval(n),document.title=t,n=null,as=!1,window.removeEventListener("mousemove",e)})))}var ss=n(51);var cs=n(68),ls=n(31),us=n(83),ds=n(73);const fs=e=>({[e]:o.a.func});o.a.shape({...Object(us.a)(fs,Object.values(y.b)),...Object(us.a)(fs,Object.values(y.b).map(ds.a))});var ps=n(46),hs=n(100);t.default=function(e){let{settings:t}=e;const n=Object(s.c)(),r=Object(a.useRef)(null),{active:o}=Object(s.d)(w.e),{open:c,imageUrl:l}=Object(s.d)(w.k),{inspectorOpen:u}=Object(s.d)(w.j),{chatMessages:d}=Object(s.d)(w.n),{takenOver:f}=Object(s.d)(w.a),m=le(f),x=le(d),E=localStorage.getItem("kindly-chat-restart-message"),O=Object(ls.a)(t,"fullscreenMode",!1),k=Object(ls.a)(t,"zIndex",y.d),_={...y.c,...Object(ls.a)(t,"position",{})},C=document.documentElement;Object(a.useEffect)(()=>{Object(So.a)()&&(C.style.overflow=o?"hidden":"unset")},[o,C]),Object(a.useEffect)(()=>{if(0===(null==x?void 0:x.length)&&1===(null==d?void 0:d.length)&&E){const{message:e,exchangeId:t,newContext:r}=JSON.parse(E);localStorage.removeItem("kindly-chat-restart-message"),n(Object(cs.h)(e,t,r))}},[n,d,x,E]),Object(a.useEffect)(()=>{m!==f&&f&&Object(hs.a)()},[m,f]),function(){const{tabNotification:e,name:t}=Object(s.d)(w.d),{showTabNotification:n}=Object(s.d)(w.b),{currentLanguage:r}=Object(s.d)(w.e),{takenOver:o}=Object(s.d)(w.a),{agent:i}=Object(s.d)(w.q),c=le(o);Object(a.useEffect)(()=>{if(e&&n){var o;is((null!==(o=null==rs?void 0:rs[r])&&void 0!==o?o:rs.en)(t||"Kindly"))}},[r,e,n,t]),Object(a.useEffect)(()=>{const e=Boolean(null==i?void 0:i.name);if(c!==o&&o&&e){var t;is(null!==(t=null==os?void 0:os[r])&&void 0!==t?t:os.en)}},[o,i,c,r])}(),Object(ns.a)(),function(){var e;const t=Object(s.c)(),[n,r]=Object(a.useState)("/"),{currentLanguage:o,active:i}=Object(s.d)(w.e),{nudges:c}=Object(s.d)(w.d),{defaultLanguage:l}=Object(ar.a)(),u=null!==(e=null==c?void 0:c.textNudges)&&void 0!==e?e:[];Object(a.useEffect)(()=>{r(window.location.href),!i&&o&&(null==u?void 0:u.length)>0&&(null!=u?u:[]).forEach(e=>!(!Object(ss.a)(n,e.url_trigger)||!e.enabled[o])&&t(Object(ue.db)({nudge:e,languageCode:o})))},[i,o,l,t,n,c,u])}(),ts(),(()=>{const{takenOver:e,requestedTakeover:t}=Object(s.d)(w.a),n=le(e),r=le(t),o=Object(s.c)();Object(a.useEffect)(()=>{e&&!n?o(Object(ue.kb)()):!e&&n&&o(Object(ue.hb)()),t&&!r?o(Object(ue.jb)()):!t&&r&&o(Object(ue.ib)())},[o,r,n,t,e])})(),function(e){const t=Object(a.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=Object(a.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);Object(a.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(r);const j=Object(a.useCallback)(()=>{n(Object(ue.j)())},[n]),T=Object(a.useMemo)(()=>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,[Object(ps.a)(n)]:r}},{})}(t.buttonHandlers),[t.buttonHandlers]);return i.a.createElement(p,{id:"chatContainer",ref:r,className:"chat-container",role:"complementary",active:o,zIndex:k,fullscreen:O?1:0,position:_,"data-cy":"chat-box-container","data-story":"ChatContainer"},c&&i.a.createElement(b,{zIndex:k,onClick:j,autoFocus:!0},i.a.createElement(g,{zIndex:k,onClick:j,autoFocus:!0},i.a.createElement(h.e,{width:"30",height:"30"})),i.a.createElement(v,{src:l})),o&&i.a.createElement(es,{buttonHandlers:T,onMessage:t.onMessage}),u&&i.a.createElement(de,null))}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),a=n(0),i=n.n(a),s=n(3),c=n(1);const l=c.c.div.withConfig({displayName:"styles__NudgeBackdropContainer",componentId:"sc-1tcv57c-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 u=function(e){let{backdrop:t,onClick:n}=e;return i.a.createElement(l,{onClick:n,backdrop:t})},d=n(5),f=n(8),p=n(7),h=n(15),m=n(27),g=n(102),b=e=>{let{slug:t}=e;const[n,r]=Object(a.useState)({}),[o,i]=Object(a.useState)(!0),{defaultLanguage:c}=Object(h.a)(),l=Object(g.a)(),{currentLanguage:u}=Object(s.d)(p.e);return Object(a.useEffect)(()=>{let e={};const n=l.find(e=>e.slug===t);var o;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=Object(m.a)(t,u,c);e[t.slug]=n.value}):e=Object(m.a)(n,u,c),i(Boolean(null==n||null===(o=n.text_blocks)||void 0===o?void 0:o.length)),r(e))},[l,u,c,t]),{textContent:n,hasTextContent:o}};var v=function(){const{defaultLanguage:e}=Object(h.a)(),t=window.kindlyChat.APIRoot,n=Object(a.useRef)(t),{content:r,slug:o,onRendered:i}=Object(s.d)(p.o),{currentLanguage:c}=Object(s.d)(p.e),{textContent:l,hasTextContent:u}=b({slug:o});return Object(a.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof r?r(l):r;if(u&&0===Object.keys(l).length)return;const t=document.createElement("div");t.innerHTML=e,n.current.appendChild(t),t.setAttribute("id","kindly-custom-nudge"),"function"==typeof i&&i(t)},[r,c,e,o,l,i,u]),null},y=n(10);const w=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-7kvqgr-0"})(["margin:24px;display:flex;flex-direction:column;"]);var x=function(e){let{html:t,slug:n}=e;const{textContent:r}=b({slug:n});return i.a.createElement(w,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}}))},E=(n(121),o.a.shape({success:o.a.string,error:o.a.string,input:o.a.shape({label:o.a.string,type:o.a.string,placeholder:o.a.string.isRequired,required:o.a.bool}),button:o.a.shape({title:o.a.string,icon:o.a.string,type:o.a.string})}),o.a.shape({id:o.a.string.isRequired,title:o.a.string,description:o.a.string,image:o.a.string.isRequired,price:o.a.string}),n(2)),O=n(33),k=n(9);const _=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1ywydhs-0"})(["margin:24px;display:flex;flex-direction:column;"]),C=c.c.h2.withConfig({displayName:"styles__Title",componentId:"sc-1ywydhs-1"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"]),j=c.c.p.withConfig({displayName:"styles__Description",componentId:"sc-1ywydhs-2"})(["line-height:22px;margin:0px;"]),T=c.c.a.withConfig({displayName:"styles__Link",componentId:"sc-1ywydhs-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var S=n(19);const I=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1aq8spp-0"})(["margin:24px;display:flex;flex-direction:column;"]),A=c.c.div.withConfig({displayName:"styles__FormGroup",componentId:"sc-1aq8spp-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=c.c.div.withConfig({displayName:"styles__InputContainer",componentId:"sc-1aq8spp-2"})(["display:flex;flex-direction:column;"]),P=c.c.label.withConfig({displayName:"styles__Label",componentId:"sc-1aq8spp-3"})(["font-size:16px;line-height:19px;margin-left:8px;margin-bottom:8px;"]),M=c.c.input.withConfig({displayName:"styles__Input",componentId:"sc-1aq8spp-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:14px;background:",";background-color:",";&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],e=>e.theme.inputBackground,e=>e.theme.inputBackground,S.a),L=c.c.button.withConfig({displayName:"styles__Button",componentId:"sc-1aq8spp-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,S.a,e=>e.theme.buttonText);var R=function(e){let{buttonContent:t}=e;const{title:n}=t;return i.a.createElement(L,{role:"button",title:n,type:"submit"},i.a.createElement(y.p,{width:18,height:18}))};var D=function(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:a,placeholder:s,required:c}=r;return i.a.createElement(N,null,i.a.createElement(P,null,o),i.a.createElement(M,{"aria-label":s,"aria-labelledby":"newsletter-sign-up",name:o,placeholder:s,type:a||"text",value:t,onChange:e=>n(e.target.value),required:c}))};var B=function(e){let{form:t,onNewsletterSubmit:n,slug:r}=e;const o=Object(s.c)(),{dialogue:c,webhook:l}=Object(s.d)(p.o),{currentLanguage:u}=Object(s.d)(p.e),{defaultLanguage:d}=Object(h.a)(),[m,g]=Object(a.useState)(""),[b,v]=Object(a.useState)(!1),{success:y}=t;return i.a.createElement(I,null,b&&y?i.a.createElement(j,null,y):i.a.createElement("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),g(""),!m.trim())return!1;if(c&&o(Object(f.qb)(c,{openChat:!0,languageCode:u||d.code})),l){const t={event:e,email:m};o(Object(k.f)({method:"post",url:l,data:t}))}if("function"==typeof n)try{n(e,m)}catch(e){console.error(e)}return o(Object(f.ob)({slug:r,eventType:E.u})),v(!0)}},i.a.createElement(A,null,i.a.createElement(D,{value:m,setValue:g,inputContent:t.input}),i.a.createElement(R,{buttonContent:t.button}))))},F=n(21);const z=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=c.c.div.withConfig({displayName:"styles__SectionSeperator",componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var H=function(e){let{choices:t,slug:n}=e;const r=Object(s.c)(),{currentLanguage:o}=Object(s.d)(p.e),{defaultLanguage:a}=Object(h.a)(),{buttons:c}=t;return i.a.createElement(i.a.Fragment,null,i.a.createElement(U,null),i.a.createElement(z,null,c.map(e=>{let{text:t,triggerDialogue:s}=e;return i.a.createElement(F.b,{color:!0,key:`${t}-${s}`,text:t,onClick:()=>{return e=s,r(Object(f.qb)(e,{openChat:!0,languageCode:o||a.code})),void r(Object(O.e)({slug:n,eventType:E.u,label:e}));var e}})})))},$=n(47),V=n(105),q=n(6),G=n(23);const W=c.c.a.withConfig({displayName:"stylesProduct__ProductWrapper",componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),Y=c.c.div.withConfig({displayName:"stylesProduct__Product",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;}}"],S.a,q.c.maxPhone,q.a.shadowColor),K=c.c.img.withConfig({displayName:"stylesProduct__ProductImage",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.c.maxPhone),X=c.c.div.withConfig({displayName:"stylesProduct__Content",componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.c.maxPhone),J=Object(c.b)(["font-size:14px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),Q=c.c.a.withConfig({displayName:"stylesProduct__ActionLink",componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;cursor:hover;"],J),Z=c.c.button.withConfig({displayName:"stylesProduct__ActionButton",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,G.a.default),ee=c.c.h3.withConfig({displayName:"stylesProduct__ProductTitle",componentId:"sc-20xwq1-6"})([""," font-weight:500;"],J),te=c.c.p.withConfig({displayName:"stylesProduct__ProductDescription",componentId:"sc-20xwq1-7"})([""," font-weight:400;"],J),ne=c.c.div.withConfig({displayName:"stylesProduct__ProductPrice",componentId:"sc-20xwq1-8"})([""," font-weight:500;"],J);function re(e){let{to:t,text:n,onClick:r}=e;return t?i.a.createElement(Q,{onClick:r,href:t},n):i.a.createElement(Z,{onClick:r},n)}var oe=function(e){var t,n,r,o,a,s;let{product:c,onProductClick:l}=e;const u=null!==(t=null==c?void 0:c.image)&&void 0!==t&&t,d=null!==(n=null==c?void 0:c.title)&&void 0!==n&&n,f=null!==(r=null==c?void 0:c.productUrl)&&void 0!==r&&r,p=null!==(o=null==c?void 0:c.description)&&void 0!==o&&o,h=(null==c?void 0:c.price)||!1,m=null!==(a=null==c?void 0:c.linkText)&&void 0!==a&&a,g=null!==(s=null==c?void 0:c.linkUrl)&&void 0!==s&&s;return i.a.createElement(Y,null,i.a.createElement(W,{href:f},u&&i.a.createElement(K,{src:u,alt:d}),i.a.createElement(X,null,d&&i.a.createElement(ee,null,d),p&&i.a.createElement(te,null,p),h&&i.a.createElement(ne,null,h))),m&&i.a.createElement(re,{to:g,text:m,onClick:e=>{if("function"==typeof l)try{l(e,c)}catch(e){console.error(e)}}}))};const ae=c.c.div.withConfig({displayName:"stylesProducts__Container",componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.c.maxPhone),ie=c.c.div.withConfig({displayName:"stylesProducts__CarouselContainer",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 "),se=c.c.h2.withConfig({displayName:"stylesProducts__Title",componentId:"sc-vfg4fr-2"})(["font-size:16px;font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.c.maxPhone);function ce(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i.a.createElement($.a.div,{transition:{ease:"easeInOut",duration:.3},style:{x:n},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}var le=function(e){var t,n;let{section:r,onProductClick:o}=e;const{width:s}=(()=>{const[e,t]=Object(a.useState)({width:void 0,height:void 0});return Object(a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),c=parseInt(q.g.phone.replace("px",""),10),l=null!==(t=null==r?void 0:r.items)&&void 0!==t?t:[],u=null!==(n=null==r?void 0:r.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:r=!0}=e;const[o,i]=Object(a.useState)(0),s=Object($.b)(0);return Object(a.useEffect)(()=>{t>=n&&r&&s.set(0)},[t,n,s,r]),{setIndex:Object(a.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;i(e),s.set(o)},[t,n,s]),imageIndex:o,carouselPosition:s}})({windowWidth:s,phoneWidth:c}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=Object(V.a)({carousel:l,index:f,setIndex:d});return i.a.createElement(ae,null,u&&i.a.createElement(se,null,u),i.a.createElement(ie,{active:s<c},i.a.createElement(ce,{carouselPosition:p,onTouchStart:h,onTouchMove:m,onTouchEnd:g},l.map(e=>i.a.createElement(oe,{product:e,key:e.id,onProductClick:o})))))},ue=n(74);var de=function(e){let{buttons:t,slug:n}=e;const r=Object(s.c)(),o=t.length>0,c=Object(a.useCallback)(()=>{r(Object(O.e)({slug:n,eventType:E.u}))},[r,n]);return o?i.a.createElement(_,null,t.map((e,t)=>i.a.createElement(ue.a,{button:e,key:`${e.value}-${t}`,isNudge:!0,onClick:c}))):null};var fe=function(e){let{title:t,description:n,link:r,slug:o}=e;const c=Object(s.c)(),l=Object(a.useCallback)(e=>{e.preventDefault(),c(Object(O.e)({slug:o,eventType:E.u})),window.location.href=e.target.getAttribute("href")},[o]);return i.a.createElement(_,null,t&&i.a.createElement(C,null,t),n&&i.a.createElement(j,null,n),(null==r?void 0:r.location)&&(null==r?void 0:r.text)&&i.a.createElement(T,{href:r.location,onClick:l},r.text))};const pe=e=>e||{location:"",text:""};function he(e){var t,n,r,o,a,c,l,u;let{section:d,slug:f,onProductClick:p,onNewsletterSubmit:h}=e;const m=Object(s.c)(),g=null!==(t=null==d?void 0:d.title)&&void 0!==t&&t,b=null!==(n=null==d?void 0:d.description)&&void 0!==n&&n,v=null!==(r=null==d?void 0:d.buttons)&&void 0!==r&&r,y=null!==(o=null==d?void 0:d.products)&&void 0!==o&&o,w=null!==(a=null==d?void 0:d.choices)&&void 0!==a&&a,k=null!==(c=null==d?void 0:d.form)&&void 0!==c&&c,_=null!==(l=null==d?void 0:d.link)&&void 0!==l&&l,C=null!==(u=null==d?void 0:d.html)&&void 0!==u&&u;return i.a.createElement(i.a.Fragment,null,(g||b||_)&&i.a.createElement(fe,{title:g,description:b,link:pe(_),slug:f}),v&&i.a.createElement(de,{buttons:v,slug:f}),w&&i.a.createElement(H,{choices:w,slug:f}),y&&i.a.createElement(le,{section:y,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?m(Object(O.e)({slug:f,eventType:E.u,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof p)try{p(e,t)}catch(e){console.error(e)}}}),k&&i.a.createElement(B,{form:k,onNewsletterSubmit:h,slug:f}),C&&i.a.createElement(x,{html:C,slug:f}))}var me=e=>{var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:a}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>i.a.createElement(he,{key:`section-${t}`,section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:a}))},ge=n(43);var be=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:a,onProductClick:s,onNewsletterSubmit:c}=e;return i.a.createElement(ge.b,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-cy":"nudge-container","data-story":"NudgeContainer"},i.a.createElement(ge.a,null),i.a.createElement(ge.c,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-cy":"close-nudge-button"},i.a.createElement(y.e,{width:25,height:25})),i.a.createElement(ge.d,null,i.a.createElement(me,{layout:o,slug:r,onProductClick:s,onNewsletterSubmit:c})))};t.default=function(e){var t;let{hidden:n,layout:r,onDismiss:o,onProductClick:c,onNewsletterSubmit:l}=e;const{show:h,nudgeType:m,slug:g}=Object(s.d)(p.o),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,y=Object(s.c)(),w=Object(a.useCallback)(e=>{if(e.stopPropagation(),y(Object(f.u)()),"function"==typeof o)try{o(e)}catch(e){console.error(e)}},[o,y]);return i.a.createElement(i.a.Fragment,null,b&&i.a.createElement(u,{backdrop:b,onClick:w}),m===d.i.TEMPLATE&&i.a.createElement(be,{show:h,layout:r,slug:g,onDismiss:w,onProductClick:c,onNewsletterSubmit:l,bubbleHidden:n}),m===d.i.CUSTOM&&i.a.createElement(v,null))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(3),i=n(10),s=(n(4),n(21));function c(e){const[t,n]=Object(r.useState)(!1);return[t,Object(r.useCallback)(t=>{n(!0),e(t)},[e])]}n(39);var l=n(1),u=n(6),d=n(43);const f="cubic-bezier(0.18, 0.58, 0.37, 0.92)",p=Object(l.c)(d.c).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackDismiss",componentId:"sc-c01o0q-0"})([""]),h=Object(l.c)(d.a).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackBorderElement",componentId:"sc-c01o0q-1"})([""]),m=Object(l.c)(d.b).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackContainer",componentId:"sc-c01o0q-2"})(["z-index:20;",";@media ","{z-index:20;}"],e=>{let{modal:t}=e;return t&&"\n right: unset;\n bottom: unset;\n "},u.c.maxPhone),g=Object(l.c)(d.d).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackInner",componentId:"sc-c01o0q-3"})(["min-width:380px;padding:0 20px;@media ","{padding:0 12px;max-width:",";width:auto;min-width:auto;}"],u.c.maxPhone,u.g.phone),b=(l.c.div.withConfig({displayName:"NudgeFeedbackstyles__Section",componentId:"sc-c01o0q-4"})(["margin:24px;display:flex;flex-direction:column;"]),l.c.h2.withConfig({displayName:"NudgeFeedbackstyles__Title",componentId:"sc-c01o0q-5"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"])),v=l.c.p.withConfig({displayName:"NudgeFeedbackstyles__Description",componentId:"sc-c01o0q-6"})(["line-height:22px;"]),y=(l.c.a.withConfig({displayName:"NudgeFeedbackstyles__Link",componentId:"sc-c01o0q-7"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]),l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackContainer",componentId:"sc-c01o0q-8"})(["border-radius:14px;overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:24px 0;opacity:0;",";transition:opacity 0.15s linear 0.2s,transform "," 300ms;"],e=>e.hasEntered&&"opacity: 1",f)),w=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackFormContent",componentId:"sc-c01o0q-9"})(["text-align:center;width:100%;"," ",""],e=>e.ratingSent&&`transition: all ${f} 300ms;`,e=>e.finished&&"z-index: 11; position: relative; opacity: 0;"),x=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackThanksContainer",componentId:"sc-c01o0q-10"})(["opacity:0;margin-top:16px;text-align:center;transition:all "," 300ms;",""],f,e=>{let{finished:t}=e;return t&&"opacity: 1;"}),E=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackStepContainer",componentId:"sc-c01o0q-11"})(["width:100%;opacity:1;transition:all "," 300ms;",""],f,e=>{let{hasRated:t}=e;return t&&"display: none;"}),O=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackEmojiContainer",componentId:"sc-c01o0q-12"})(["height:fit-content;min-height:35px;cursor:pointer;margin:0 0 16px 0;transition:all ease 300ms;",";"],e=>e.hovering&&"\n .emoji.chosen {\n opacity: 1;\n }\n .emoji:not(.chosen) {\n opacity: 0.4;\n }\n "),k=l.c.span.withConfig({displayName:"NudgeFeedbackstyles__StyledEmoji",componentId:"sc-c01o0q-13"})(["display:inline-block;margin:0 10px;transition:opacity 0.1s linear;background:none;border:none;padding:0;cursor:pointer;"]),_=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1qibng2-0"})([""]),C=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1qibng2-1"})([""]),j=l.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1qibng2-2"})(["display:flex;justify-content:center;margin-top:30px;button{width:70px;min-width:auto;margin:0 15px;}"]);var T=function(e){let{submit:t,textContent:n}=e;const[r,a]=c(t),{binary_headline:i,binary_1:l,binary_0:u}=n;return o.a.createElement(C,{hasRated:r},o.a.createElement(_,null,i),o.a.createElement(j,null,o.a.createElement(s.b,{type:"submit",onClick:()=>a(2),color:!0,flat:!0,text:l}),o.a.createElement(s.b,{type:"submit",onClick:()=>a(1),color:!0,flat:!0,text:u})))},S=n(172),I=n.n(S),A=n(173),N=n.n(A),P=n(174),M=n.n(P);const L=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1krelmc-0"})([""]),R=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1krelmc-1"})([""]),D=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1krelmc-2"})([""]),B=Object(l.c)(O).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1krelmc-3"})([""]),F=Object(l.c)(k).withConfig({displayName:"styles__Emoji",componentId:"sc-1krelmc-4"})([""]),z=l.c.img.withConfig({displayName:"styles__EmojiImage",componentId:"sc-1krelmc-5"})(["height:35px;width:35px;"]),U={1:{src:M.a,description:"sad face"},2:{src:N.a,description:"neutral face"},3:{src:I.a,description:"happy face"}};function H(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{src:s,description:c}=U[t];return o.a.createElement(F,{className:`emoji ${i?"chosen":""}`,onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":c,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o.a.createElement(z,{src:s,alt:`${c} emoji`}))}var $=function(e){let{submit:t,textContent:n}=e;const[a,i]=Object(r.useState)(!1),[s,l]=Object(r.useState)(0),[u,d]=c(t),{emoji_guideline:f,emoji_headline:p}=n;return o.a.createElement(D,{hasRated:u},o.a.createElement(L,null,p),o.a.createElement(B,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[1,2,3].map(e=>o.a.createElement(H,{key:`chat-feedback-emoji-${e}`,number:e,selected:s,setTentativeRating:l,setRating:d}))),o.a.createElement(R,null,f))},V=n(8),q=n(26);const G=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-r8xh7-0"})([""]),W=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-r8xh7-1"})([""]),Y=l.c.a.withConfig({displayName:"styles__LinkButton",componentId:"sc-r8xh7-2"})([""," text-decoration:none;font-size:15px;width:fit-content;margin:0 auto;padding:11px 20px;font-weight:500;"],q.e);var K=function(e){let{textContent:t}=e;const{external_link_headline:n,external_link_text:i,external_link_url:s}=t,c=Object(a.c)(),l=Object(r.useCallback)(()=>c(Object(V.w)()),[c]);return o.a.createElement(W,{hasRated:!1},n&&i&&o.a.createElement(G,null,n),o.a.createElement(Y,{href:s,onClick:l,target:"_blank",rel:"noopener noreferrer",$color:!0},i||n))};var X=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#97cd72"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,131.5a8.33,8.33,0,0,0-3.8.33c-8,2.78-20.62,4.58-34.91,4.58s-27-1.81-34.94-4.59c-.81-.2-3.45-.79-4.35-.15-.51.36-.2.8.25,1.16,7.16,4.38,21.93,8.77,39,8.77s31.74-4.36,39-8.71C139.53,132.44,140,131.78,138.82,131.5Z",fill:"#231e20"}))};var J=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#f47d7f"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,141.47a8.33,8.33,0,0,1-3.8-.32c-8-2.78-20.62-4.58-34.91-4.58s-27,1.8-34.94,4.59c-.81.2-3.45.79-4.35.15-.51-.37-.2-.81.25-1.17,7.16-4.37,21.93-8.76,39-8.76s31.74,4.36,39,8.7C139.53,140.54,140,141.2,138.82,141.47Z",fill:"#231e20"}))};var Q=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#00a24a"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,119.86c-1.26-1-2.94.14-3.8,1.08-8,9.27-20.62,15.28-34.91,15.28s-27-6-34.94-15.31c-.62-.8-3.05-2.42-4.35-.51-.93,1.38-.26,2.56.25,3.89,7.16,14.6,21.93,29.25,39,29.25s31.74-14.55,39-29C140.23,121.81,140,120.78,138.82,119.86Z",fill:"#231e20"}))};var Z=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#ee2324"}),o.a.createElement("path",{d:"M138.78,153.13c-1.25,1-2.94-.13-3.8-1.08-7.95-9.27-20.62-15.28-34.9-15.28s-27,6-34.95,15.32c-.61.79-3,2.42-4.34.5-.94-1.38-.27-2.55.24-3.88C68.2,134.1,83,119.45,100.08,119.45S131.82,134,139,148.5C140.2,151.18,139.92,152.21,138.78,153.13Z",fill:"#231e20"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}))};const ee=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1wxcq1r-0"})([""]),te=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1wxcq1r-1"})([""]),ne=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1wxcq1r-2"})([""]),re=Object(l.c)(O).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1wxcq1r-3"})([""]),oe=Object(l.c)(k).withConfig({displayName:"styles__Emoji",componentId:"sc-1wxcq1r-4"})(["width:37px;margin:0 4px;"]),ae={1:{Component:Z,description:"very unhappy"},2:{Component:J,description:"unhappy"},3:{Component:X,description:"happy"},4:{Component:Q,description:"very happy"}};function ie(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{Component:s,description:c}=ae[t];return o.a.createElement(oe,{className:`emoji ${i?"chosen":""}`,onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":c,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o.a.createElement(s,{alt:`${c} emoji`}))}var se=function(e){let{submit:t,textContent:n}=e;const[a,i]=Object(r.useState)(!1),[s,l]=Object(r.useState)(0),[u,d]=c(t),{emoji_guideline:f,emoji_headline:p}=n;return o.a.createElement(ne,{hasRated:u},o.a.createElement(ee,null,p),o.a.createElement(re,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[4,3,2,1].map(e=>o.a.createElement(ie,{key:`chat-feedback-happy-or-not-${e}`,number:e,selected:s,setTentativeRating:l,setRating:d}))),o.a.createElement(te,null,f))},ce=n(19);Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1jtf9kh-0"})([""]);const le=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1jtf9kh-1"})([""]),ue=Object(l.c)(E).withConfig({displayName:"styles__FreeformContainer",componentId:"sc-1jtf9kh-2"})(["z-index:11;opacity:0;visibility:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;",";",""],e=>{let{hasEntered:t}=e;return t&&"\n opacity: 1;\nvisibility: visible;"},e=>{let{finished:t}=e;return t&&"display: none;"}),de=l.c.textarea.withConfig({displayName:"styles__FreeformTextarea",componentId:"sc-1jtf9kh-3"})(["resize:none;width:100%;min-height:100px;max-width:250px;padding:6px 10px;background:",";font-size:14px;margin-bottom:30px;line-height:22px;color:#2c2c2c;font-family:Open sans,Helvetica Neue,Helvetica,Arial,sans-serif !important;border:1px solid #dedede;border-radius:6px;z-index:10;@media ","{font-size:16px;}"," &:hover,&:focus{color:#2c2c2c;border:1px solid #dedede;}"],u.a.grayColor,u.c.maxTablet,ce.a);var fe=function(e){let{submit:t,textContent:n,finished:a}=e;const[i,c]=Object(r.useState)(!1),[l,u]=Object(r.useState)(""),{freeform_description:d,freeform_placeholder:f,send:p}=n;Object(r.useEffect)(()=>{c(!0)},[]);const h=Object(r.useCallback)(e=>{"Enter"===e.key&&t(l)},[l,t]),m=Object(r.useCallback)(e=>{u(e.target.value)},[]);return o.a.createElement(ue,{hasEntered:i,finished:a},o.a.createElement(le,null,d),o.a.createElement(de,{"data-cy":"feedback-freefrom-textarea",rows:4,value:l,onChange:m,placeholder:f}),o.a.createElement(s.b,{color:!0,flat:!0,text:p,type:"submit",onClick:()=>t(l),onKeyDown:h}))},pe=n(5),he=n(15),me=n(7),ge=n(41),be=(n(49),n(23));const ve=l.c.div.withConfig({displayName:"NudgeFeedbackWrapperstyles__Wrapper",componentId:"sc-1eqo0i0-0"})(["background:",";position:",";width:",";height:",";top:58px;left:0;z-index:",";display:flex;justify-content:center;align-items:center;font-family:",";"],e=>{let{modal:t,theme:n}=e;return t?n.background:"none"},e=>{let{modal:t}=e;return t?"fixed":"unset"},e=>{let{modal:t}=e;return t?"100%":0},e=>{let{modal:t}=e;return t?"100%":0},e=>{let{zIndex:t}=e;return`${t+10}`},be.a.default);var ye=function(e){let{children:t,modal:n,zIndex:r}=e;return o.a.createElement(ve,{modal:n,zIndex:r},t)};t.default=function(){const[e,t]=Object(r.useState)(!1),[n,s]=Object(r.useState)(!1),[c,l]=Object(r.useState)(!1),{show:u}=Object(a.d)(me.o),{currentLanguage:d}=Object(a.d)(me.e),{fullscreenMode:f,zIndex:v}=Object(a.d)(me.d),{feedbackForm:E,feedbackForm:{freeform_enabled:O},feedbackFormType:k}=Object(a.d)(me.d),_=Object(a.c)(),{defaultLanguage:C}=Object(he.a)(),j=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"freeform_enabled"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(ge.a)(a,t,n)}},{}))(E,d,C);Object(r.useEffect)(()=>{l(!0)},[]);const S=Object(r.useCallback)(()=>{_(Object(V.i)())},[_]),I=Object(r.useCallback)(()=>{t(!0),setTimeout(()=>_(Object(V.i)()),2e3)},[_]),A=Object(r.useCallback)(e=>{_(Object(V.N)(e)),O?s(!0):I()},[I,_,O]),N=Object(r.useCallback)(e=>{_(Object(V.O)(e)),I()},[I,_]);let P;switch(k){case pe.r.BINARY:P=T;break;case pe.r.EMOJIS:P=$;break;case pe.r.HAPPY_OR_NOT:P=se;break;case pe.r.EXTERNAL_LINK:P=K;break;default:console.error(`Feedback form type '${k}' not recognized`),P=function(){return null}}return o.a.createElement(ye,{modal:f,zIndex:v},o.a.createElement(m,{ariaHidden:u&&!f?"false":"true",modal:f,"data-cy":"feedback-nudge-container","data-story":"NudgeFeedbackContainer"},o.a.createElement(h,{modal:f}),o.a.createElement(p,{"aria-label":"Dismiss feedback",title:"Dismiss feedback",onClick:S,type:"button",modal:f},o.a.createElement(i.e,{width:25,height:25})),o.a.createElement(g,{modal:f},o.a.createElement(y,{hasEntered:c,finished:e},o.a.createElement(w,{finished:e,ratingSent:n},o.a.createElement(P,{textContent:j,submit:A}),n&&o.a.createElement(fe,{textContent:j,submit:N,finished:e})),e&&o.a.createElement(x,{finished:e},o.a.createElement(b,null,j.thanks))))))}},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n.n(r);var a=e=>Object(r.isValidElement)(e)&&Boolean(e.props.children);var i=e=>Object(r.isValidElement)(e)&&a(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||Object(r.isValidElement)(t),!1);const s=(e,t)=>r.Children.toArray(e).map((e,n,o)=>Object(r.isValidElement)(e)&&i(e)?t(Object(r.cloneElement)(e,{...e.props,children:s(e.props.children,t)})):t(e,n,o));var c=s,l=n(36),u=n(3);function d(e){let{width:t,height:n,color:r}=e;return o.a.createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o.a.createElement("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}d.defaultProps={width:24,height:24,color:"#333"};var f=d,p=n(21),h=n(7),m=n(109),g=n(80),b=n(48);const v=(e,t)=>o.a.cloneElement(e,t);function y(e){let{defaultValues:t,children:n,onSubmit:r,shouldUnregister:a,clearOnSubmit:i,className:s,sendButtonTitle:d,cancelButtonTitle:y,ariaLabel:w,onCancel:x}=e;const{register:E,handleSubmit:O,getValues:k,reset:_,control:C,setError:j,trigger:T,clearErrors:S,formState:{isSubmitting:I,isSubmitted:A}}=Object(l.b)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onBlur"}),{currentLanguage:N}=Object(u.d)(h.e);return o.a.createElement(g.a,{onSubmit:O(async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await r(e),i&&_()}catch(e){throw _(),e}}),"aria-label":w,isSubmitted:A,className:s,noValidate:!0},c(n,e=>e?(e=>{var t,n,r,a,i,s;if(null!=e&&null!==(t=e.props)&&void 0!==t&&t.name)return e.props.controller?o.a.createElement(l.a,Object.assign({key:e.key,control:C,render:t=>v(e,{...e.props,...t}),rules:Object(b.c)(e.props.validators,N)},e.props)):v(e,{register:E,setError:j,clearErrors:S,trigger:T,control:C});switch(null==e||null===(n=e.type)||void 0===n?void 0:n.name){case m.a.name:return v(e,{placeholder:null===(r=e.props)||void 0===r||null===(a=r.children)||void 0===a||null===(i=a[0].props)||void 0===i?void 0:i.placeholder_text,...!(null!==(s=e.props)&&void 0!==s&&s.htmlFor)&&{htmlFor:e.props.slug}});default:return e}})(e):null),o.a.createElement(g.b,null,o.a.createElement(p.b,{disabled:I,onClick:()=>{const e=k();x(e)},text:y}),o.a.createElement(p.b,{type:"submit",icon:o.a.createElement(f,{color:"#fff",width:16,height:16}),loading:I,text:d,color:!0})))}y.defaultProps={defaultValues:null,shouldUnregister:null,className:null,clearOnSubmit:!1,sendButtonTitle:"Submit",cancelButtonTitle:"Exit",ariaLabel:null,onCancel:null};t.default=y},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n.n(r),a=n(3),i=n(10),s=n(8),c=n(7),l=n(1),u=n(11),d=n(12),f=n(6);const p=Object(l.b)(["display:flex;overflow:hidden;z-index:-1;min-width:125px;height:45px;"]),h=l.c.div.withConfig({displayName:"styles__ToolsContainer",componentId:"sc-vkneg1-0"})(["z-index:0;width:15px;border-radius:7px;min-width:80px;margin-right:-25px;background:#fff;background-color:#fff;position:absolute;right:50px;box-shadow:0px 1px 5px 0px ",";transition:all 0.2s ease;",";",";"],f.a.shadowColorDark,e=>{let{hasInspector:t}=e;return t&&p},e=>{let{active:t}=e;return!t&&"min-width: 0"}),m=l.c.div.withConfig({displayName:"styles__LanguageContainer",componentId:"sc-vkneg1-1"})(["padding:2px;border-radius:7px;background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";right:110px;display:flex;position:absolute;min-width:max-content;justify-content:center;",";"],f.a.shadowColorDark,u.f),g=Object(l.c)(d.d).withConfig({displayName:"styles__LanguageText",componentId:"sc-vkneg1-2"})(["color:#757575;margin:0;cursor:pointer;font-size:12px;font-weight:500;text-decoration:none;:hover{text-decoration:underline;}"]),b=l.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-vkneg1-3"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),v=Object(l.c)(d.a).withConfig({displayName:"styles__ToolButton",componentId:"sc-vkneg1-4"})(["display:flex;position:relative;align-items:center;padding:13px;border-radius:7px;transition:all 0.15s ease;:hover{background:#",";background-color:#",";svg path{fill:#000;}:after{border-left-color:#000;}}"," ",""],f.a.grayColor,f.a.grayColor,e=>e.active&&`\n background: #${f.a.grayColor};\n background-color: #${f.a.grayColor};\n svg path {\n fill: #000;\n }\n `,e=>e.tail&&`\n :after {\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n right: 5px;\n bottom: 3px;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n border-left: 3px solid ${e.active?"#000":f.a.primaryColor};\n transform: rotate(45deg);\n }`);var y=n(72),w=n(68);t.default=function(e){let{active:t}=e;const[n,l]=Object(r.useState)(!1),{botKey:u,admin:d}=Object(a.d)(c.e),{languages:f}=Object(a.d)(c.d),{inspectorOpen:p}=Object(a.d)(c.j),x=Object(a.c)(),E=Object(r.useCallback)(()=>{x(Object(s.mb)())},[x]);return function(){var e,t;const n=Object(a.c)(),{admin:o}=Object(a.d)(c.e),{chatMessages:i}=Object(a.d)(c.n)||[],s=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,l=Object(y.a)(e=>{n(Object(w.h)(e))},1e3),u=Object(r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&s&&l(s)},[s,l]);Object(r.useEffect)(()=>{if(o)return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[u,o])}(),o.a.createElement(o.a.Fragment,null,n&&t&&o.a.createElement(m,null,f.map(e=>o.a.createElement(v,{key:e.code,title:`Restart ${e.name}`,onClick:()=>{return t=e.code,x(Object(s.R)(t)),void l(!1);var t}},o.a.createElement(g,null,e.code.toUpperCase())))),o.a.createElement(h,{active:t,hasInspector:d},d&&o.a.createElement(b,null,o.a.createElement(v,{onClick:E,title:p?"Close chat inspector":"Open chat inspector"},p?o.a.createElement(i.i,null):o.a.createElement(i.j,null))),o.a.createElement(b,null,o.a.createElement(v,{title:"Restart chat",onClick:()=>{f.length>1?l(!n):x(Object(s.fb)(u,!0))},active:n,tail:f.length>1},o.a.createElement(i.o,{width:15,height:15})))))}}])}));
|
|
26
|
+
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case f:case i:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case u:case p:case b:case g:case l:return e;default:return t}}case a:return t}}}function O(e){return E(e)===f}t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=b,t.Memo=g,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||E(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===i},t.isLazy=function(e){return E(e)===b},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===a},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===w||e.$$typeof===x||e.$$typeof===v)},t.typeOf=E},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(32),o=n(126),a=n(179),i=n(132);function s(e){var t=new a(e),n=o(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var c=s(n(111));c.Axios=a,c.create=function(e){return s(i(c.defaults,e))},c.Cancel=n(133),c.CancelToken=n(193),c.isCancel=n(131),c.all=function(e){return Promise.all(e)},c.spread=n(194),c.isAxiosError=n(195),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";var r=n(32),o=n(127),a=n(180),i=n(181),s=n(132),c=n(191),l=c.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean,"1.0.0"),forcedJSONParsing:l.transitional(l.boolean,"1.0.0"),clarifyTimeoutError:l.transitional(l.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[i,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(32);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(32),o=n(182),a=n(131),i=n(111);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(32),o=n(111);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(130);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(32);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(187),o=n(188);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(32),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},function(e,t,n){"use strict";var r=n(32);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(192),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},i=r.version.split(".");function s(e,t){for(var n=t?t.split("."):i,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}o.transitional=function(e,t,n){var o=t&&s(t);function i(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(i(r," has been removed in "+t));return o&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,n){"use strict";var r=n(133);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(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,a.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(197)),a=r(n(198));e.exports=t.default},function(e,t,n){"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},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return"void";if(r(e))return e.length?"array":"void";return typeof e};var r=Array.isArray||(Array.isArray=function(e){return""+e!==e&&"[object Array]"==={}.toString.call(e)});e.exports=t.default},function(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};t.default=function(e,t){return t?r({},e,t):e},e.exports=t.default},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(202);n(235),e.exports=r},function(e,t,n){n(203);var r=n(114);e.exports=r.URLSearchParams},function(e,t,n){"use strict";n(134);var r=n(148),o=n(88),a=n(230),i=n(91),s=n(231),c=n(119),l=n(150),u=n(137),d=n(232),f=n(29),p=n(44),h=n(149),m=n(82),g=n(64),b=n(61),v=n(233),y=n(118),w=n(90),x=n(234),E=n(155),O=n(38),k=o("fetch"),_=o("Request"),C=_&&_.prototype,j=o("Headers"),T=O("iterator"),S=u.set,I=u.getterFor("URLSearchParams"),A=u.getterFor("URLSearchParamsIterator"),N=/\+/g,P=Array(4),M=function(e){return P[e-1]||(P[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},L=function(e){try{return decodeURIComponent(e)}catch(t){return e}},R=function(e){var t=e.replace(N," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(M(n--),L);return t}},D=/[!'()~]|%20/g,B={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},F=function(e){return B[e]},z=function(e){return encodeURIComponent(e).replace(D,F)},U=function(e,t){if(t)for(var n,r,o=t.split("&"),a=0;a<o.length;)(n=o[a++]).length&&(r=n.split("="),e.push({key:R(r.shift()),value:R(r.join("="))}))},H=function(e){this.entries.length=0,U(this.entries,e)},$=function(e,t){if(e<t)throw TypeError("Not enough arguments")},V=l((function(e,t){S(this,{type:"URLSearchParamsIterator",iterator:x(I(e).entries),kind:t})}),"Iterator",(function(){var e=A(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),q=function(){d(this,q,"URLSearchParams");var e,t,n,r,o,a,i,s,c,l=arguments.length>0?arguments[0]:void 0,u=this,f=[];if(S(u,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:H}),void 0!==l)if(b(l))if(e=E(l))for(n=(t=x(l,e)).next;!(r=n.call(t)).done;){if((i=(a=(o=x(g(r.value))).next).call(o)).done||(s=a.call(o)).done||!a.call(o).done)throw TypeError("Expected sequence with length 2");f.push({key:v(i.value),value:v(s.value)})}else for(c in l)p(l,c)&&f.push({key:c,value:v(l[c])});else U(f,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:v(l))},G=q.prototype;if(s(G,{append:function(e,t){$(arguments.length,2);var n=I(this);n.entries.push({key:v(e),value:v(t)}),n.updateURL()},delete:function(e){$(arguments.length,1);for(var t=I(this),n=t.entries,r=v(e),o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;t.updateURL()},get:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=[],o=0;o<t.length;o++)t[o].key===n&&r.push(t[o].value);return r},has:function(e){$(arguments.length,1);for(var t=I(this).entries,n=v(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){$(arguments.length,1);for(var n,r=I(this),o=r.entries,a=!1,i=v(e),s=v(t),c=0;c<o.length;c++)(n=o[c]).key===i&&(a?o.splice(c--,1):(a=!0,n.value=s));a||o.push({key:i,value:s}),r.updateURL()},sort:function(){var e,t,n,r=I(this),o=r.entries,a=o.slice();for(o.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=I(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),i(G,T,G.entries,{name:"entries"}),i(G,"toString",(function(){for(var e,t=I(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(z(e.key)+"="+z(e.value));return n.join("&")}),{enumerable:!0}),c(q,"URLSearchParams"),r({global:!0,forced:!a},{URLSearchParams:q}),!a&&f(j)){var W=function(e){if(b(e)){var t,n=e.body;if("URLSearchParams"===m(n))return(t=e.headers?new j(e.headers):new j).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),y(e,{body:w(0,String(n)),headers:w(0,t)})}return e};if(f(k)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return k(e,arguments.length>1?W(arguments[1]):{})}}),f(_)){var Y=function(e){return d(this,Y,"Request"),new _(e,arguments.length>1?W(arguments[1]):{})};C.constructor=Y,Y.prototype=C,r({global:!0,forced:!0},{Request:Y})}}e.exports={URLSearchParams:q,getState:I}},function(e,t,n){var r=n(50),o=n(135),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?a.call(e,""):Object(e)}:Object},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(37),o=n(29),a=n(207),i=r.WeakMap;e.exports=o(i)&&/native code/.test(a(i))},function(e,t,n){var r=n(29),o=n(112),a=Function.toString;r(o.inspectSource)||(o.inspectSource=function(e){return a.call(e)}),e.exports=o.inspectSource},function(e,t,n){var r=n(37);e.exports=function(e,t){try{Object.defineProperty(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(61),o=n(141),a=n(144),i=n(213),s=n(38)("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var n,c=a(e,s);if(c){if(void 0===t&&(t="default"),n=c.call(e,t),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},function(e,t,n){var r,o,a=n(37),i=n(211),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(88);e.exports=r("navigator","userAgent")||""},function(e,t){e.exports=function(e){try{return String(e)}catch(e){return"Object"}}},function(e,t,n){var r=n(29),o=n(61);e.exports=function(e,t){var n,a;if("string"===t&&r(n=e.toString)&&!o(a=n.call(e)))return a;if(r(n=e.valueOf)&&!o(a=n.call(e)))return a;if("string"!==t&&r(n=e.toString)&&!o(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(148),o=n(89),a=n(218),i=n(29),s=n(150),c=n(154),l=n(228),u=n(119),d=n(62),f=n(91),p=n(38),h=n(81),m=n(151),g=a.PROPER,b=a.CONFIGURABLE,v=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};e.exports=function(e,t,n,a,p,m,E){s(n,t,a);var O,k,_,C=function(e){if(e===p&&A)return A;if(!y&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},j=t+" Iterator",T=!1,S=e.prototype,I=S[w]||S["@@iterator"]||p&&S[p],A=!y&&I||C(p),N="Array"==t&&S.entries||I;if(N&&(O=c(N.call(new e)))!==Object.prototype&&O.next&&(o||c(O)===v||(l?l(O,v):i(O[w])||f(O,w,x)),u(O,j,!0,!0),o&&(h[j]=x)),g&&"values"==p&&I&&"values"!==I.name&&(!o&&b?d(S,"name","values"):(T=!0,A=function(){return I.call(this)})),p)if(k={values:C("values"),keys:m?A:C("keys"),entries:C("entries")},E)for(_ in k)(y||T||!(_ in S))&&f(S,_,k[_]);else r({target:t,proto:!0,forced:y||T},k);return o&&!E||S[w]===A||f(S,w,A,{name:p}),h[t]=A,k}},function(e,t,n){var r=n(63),o=n(216),a=n(90),i=n(87),s=n(140),c=n(44),l=n(138),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=i(e),t=s(t),l)try{return u(e,t)}catch(e){}if(c(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(50),o=n(29),a=/#|\.prototype\./,i=function(e,t){var n=c[s(e)];return n==u||n!=l&&(o(t)?r(t):!!t)},s=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(63),o=n(44),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,s=o(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},function(e,t,n){var r=n(63),o=n(113),a=n(64),i=n(220);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=i(t),s=r.length,c=0;s>c;)o.f(e,n=r[c++],t[n]);return e}},function(e,t,n){var r=n(221),o=n(153);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(44),o=n(87),a=n(222).indexOf,i=n(117);e.exports=function(e,t){var n,s=o(e),c=0,l=[];for(n in s)!r(i,n)&&r(s,n)&&l.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var r=n(87),o=n(223),a=n(224),i=function(e){return function(t,n,i){var s,c=r(t),l=o(c.length),u=a(i,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){var r=n(152),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(152),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t,n){var r=n(88);e.exports=r("document","documentElement")},function(e,t,n){var r=n(50);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(120),o=n(82);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var r=n(64),o=n(229);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),o(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},function(e,t,n){var r=n(29);e.exports=function(e){if("object"==typeof e||r(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},function(e,t,n){var r=n(50),o=n(38),a=n(89),i=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(e,t,n){var r=n(91);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e}},function(e,t){e.exports=function(e,t,n){if(e instanceof t)return e;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},function(e,t,n){var r=n(82);e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},function(e,t,n){var r=n(115),o=n(64),a=n(155);e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(r(n))return o(n.call(e));throw TypeError(String(e)+" is not iterable")}},function(e,t,n){n(134);var r=n(236),o=n(37),a=n(82),i=n(62),s=n(81),c=n(38)("toStringTag");for(var l in r){var u=o[l],d=u&&u.prototype;d&&a(d)!==c&&i(d,c,l),s[l]=s.Array}},function(e,t){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}},function(e,t){e.exports="http://localhost:8081/src/assets/audio/newagent.mp3"},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"agent",(function(){return pt})),n.d(r,"alerts",(function(){return mt})),n.d(r,"announcement",(function(){return bt})),n.d(r,"auth",(function(){return yt})),n.d(r,"bot",(function(){return Qe})),n.d(r,"chatbubble",(function(){return et})),n.d(r,"connection",(function(){return xt})),n.d(r,"inspector",(function(){return Ot})),n.d(r,"environment",(function(){return nt})),n.d(r,"feedback",(function(){return _t})),n.d(r,"local",(function(){return Tt})),n.d(r,"maintenanceAlert",(function(){return It})),n.d(r,"messages",(function(){return Ut})),n.d(r,"privacy",(function(){return $t})),n.d(r,"pushMessages",(function(){return Gt})),n.d(r,"websocketFallback",(function(){return Kt})),n.d(r,"lightBox",(function(){return Jt})),n.d(r,"nudge",(function(){return Zt}));var o=n(4),a=n.n(o),i=n(0),s=n.n(i),c=n(65),l=(a.a.shape({context:a.a.shape({}),language:a.a.string,getAuthToken:a.a.func,bubbleHidden:a.a.bool,buttonHandlers:c.a,onLoad:a.a.func,environment:a.a.shape({PAT_HOST:a.a.string,PUSHER_KEY:a.a.string,STATUS_PAGE:a.a.string,KINDLY_CHAT_URL:a.a.string,SETTINGS_HOST:a.a.string,SAGE_WS_HOST:a.a.string,SAGE_HOST:a.a.string}),inPlatform:a.a.bool,admin:a.a.bool}),n(17));var u=function(e,t){return!!Object(l.a)(t,"*")||!!e&&t.some(t=>function(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".");return new RegExp(t,"i")}(t).test(e))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}function v(e,t){var n=0;return function(){var r=(new Date).getTime();if(!(r-n<t))return n=r,e.apply(void 0,arguments)}}var y="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":d(window)),w=y?document:{},x=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?g(e):t}(this,m(t).call(this,e)),p(g(n),"state",{idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null,pageX:null,pageY:null}),p(g(n),"tId",null),p(g(n),"_handleEvent",(function(e){var t=n.state,r=t.remaining,o=t.pageX,a=t.pageY,i=t.idle,s=n.props,c=s.timeout,l=s.onAction,u=s.debounce,d=s.throttle,f=s.stopOnIdle;if(u>0?n.debouncedAction(e):d>0?n.throttledAction(e):l(e),!r){if("mousemove"===e.type){if(e.pageX===o&&e.pageY===a)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(n.getElapsedTime()<200)return}clearTimeout(n.tId),n.tId=null;var p=new Date-n.getLastActiveTime();(i&&!f||!i&&p>c)&&n.toggleIdleState(e),n.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),i&&f||(n.tId=setTimeout(n.toggleIdleState,c))}})),e.debounce>0&&e.throttle>0)throw new Error("onAction can either be throttled or debounced (not both)");return e.debounce>0&&(n.debouncedAction=b(e.onAction,e.debounce)),e.throttle>0&&(n.throttledAction=v(e.onAction,e.throttle)),e.startOnMount||(n.state.idle=!0),n.toggleIdleState=n._toggleIdleState.bind(g(n)),n.reset=n.reset.bind(g(n)),n.pause=n.pause.bind(g(n)),n.resume=n.resume.bind(g(n)),n.getRemainingTime=n.getRemainingTime.bind(g(n)),n.getElapsedTime=n.getElapsedTime.bind(g(n)),n.getLastActiveTime=n.getLastActiveTime.bind(g(n)),n.isIdle=n._isIdle.bind(g(n)),n}return h(t,e),function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(t,[{key:"componentDidMount",value:function(){this._bindEvents(),this.props.startOnMount&&this.reset()}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&(this.debouncedAction=b(this.props.onAction,this.props.debounce)),e.throttle!==this.props.throttle&&(this.throttledAction=v(this.props.onAction,this.props.throttle))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0)}},{key:"render",value:function(){return this.props.children||null}},{key:"_bindEvents",value:function(){var e=this;if(y){var t=this.state.eventsBound,n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;t||(o.forEach((function(t){r.addEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!0}))}}},{key:"_unbindEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(y){var n=this.props,r=n.element,o=n.events,a=n.passive,i=n.capture;(this.state.eventsBound||t)&&(o.forEach((function(t){r.removeEventListener(t,e._handleEvent,{capture:i,passive:a})})),this.setState({eventsBound:!1}))}}},{key:"_toggleIdleState",value:function(e){var t=this;this.setState((function(e){return{idle:!e.idle}}),(function(){var n=t.props,r=n.onActive,o=n.onIdle,a=n.stopOnIdle;t.state.idle?(a&&(clearTimeout(t.tId),t.tId=null,t._unbindEvents()),o(e)):a||(t._bindEvents(),r(e))}))}},{key:"reset",value:function(){clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var e=this.props.timeout;this.tId=setTimeout(this.toggleIdleState,e)}},{key:"pause",value:function(){null===this.state.remaining&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=this.state,t=e.remaining,n=e.idle;null!==t&&(this._bindEvents(),n||(this.setState({remaining:null,lastActive:+new Date}),this.tId=setTimeout(this.toggleIdleState,t)))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,n=e.lastActive,r=this.props.timeout;if(null!==t)return t<0?0:t;var o=r-(+new Date-n);return o<0?0:o}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"_isIdle",value:function(){return this.state.idle}}]),t}(i.Component);p(x,"propTypes",{timeout:a.a.number,events:a.a.arrayOf(a.a.string),onIdle:a.a.func,onActive:a.a.func,onAction:a.a.func,debounce:a.a.number,throttle:a.a.number,element:a.a.oneOfType([a.a.object,a.a.element]),startOnMount:a.a.bool,stopOnIdle:a.a.bool,passive:a.a.bool,capture:a.a.bool}),p(x,"defaultProps",{timeout:12e5,element:w,events:["mousemove","keydown","wheel","DOMMouseScroll","mouseWheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"],onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,startOnMount:!0,stopOnIdle:!1,capture:!0,passive:!0});var E=x,O=n(3),k=n(1),_=n(70),C=n(107),j=n(18),T=n(10),S=n(15),I=(a.a.shape({name:a.a.string.isRequired,avatar:a.a.string.isRequired}),n(8)),A=n(7),N=n(31),P=n(40),M=n(27),L=n(25),R=n(100),D=n(11),B=n(23),F=n(12),z=n(6);const U=k.c.div.withConfig({displayName:"styles__PushMessageContainer",componentId:"sc-na2ous-0"})(["right:40px;bottom:50px;z-index:",";position:fixed;border-radius:14px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";",";@media ","{margin-left:20px;","}"],e=>e.zIndex,z.a.shadowColor,D.f,z.c.maxTablet,e=>{let{bubbleSize:t}=e;return"SMALL"===t?"\n right: 30px;\n bottom: 30px;\n ":"\n bottom: 55px;"}),H=k.c.div.withConfig({displayName:"styles__PushMessageInner",componentId:"sc-na2ous-1"})(["padding:15px 20px;width:max-content;max-width:360px;min-width:130px;padding-right:60px;@media ","{width:unset;max-width:100%;}"],z.c.maxPhone),$=k.c.div.withConfig({displayName:"styles__ContentContainer",componentId:"sc-na2ous-2"})(["display:flex;cursor:pointer;align-items:center;"]),V=k.c.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-na2ous-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),q=k.c.div.withConfig({displayName:"styles__ContentText",componentId:"sc-na2ous-4"})(["margin:0;color:",";font-size:",";font-weight:normal;line-height:24px;font-family:",";span{font-weight:500;}p{margin:0;}@media ","{font-size:14px;}"],z.a.darkColor,z.d.fontSizeH5,B.a.default,z.c.maxTablet),G=Object(k.c)(F.a).withConfig({displayName:"styles__PushMessageDismiss",componentId:"sc-na2ous-5"})(["top:-8px;left:-8px;z-index:",";display:flex;padding:0;border-radius:100px;background:",";background-color:",";position:absolute;&:hover{opacity:0.8;}"],e=>e.zIndex,e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground},e=>{let{theme:t}=e;return t.bubbleButtonBackground||t.buttonBackground}),W=Object(L.a)();function Y(e){let{agent:t}=e;const{currentLanguage:n}=Object(O.d)(A.e),{text:r}=Object(O.d)(A.d),{defaultLanguage:o}=Object(S.a)(),{agent_joined_text:a}=Object(M.a)(r,n,o);return Object(i.useEffect)(()=>{Object(R.a)()},[]),s.a.createElement($,null,s.a.createElement(V,{style:{backgroundImage:`url(${t.avatar})`}}),s.a.createElement(q,null,s.a.createElement("span",null,t.name||"An agent")," ",a))}function K(e){let{text:t}=e;return s.a.createElement($,null,s.a.createElement(q,{dangerouslySetInnerHTML:{__html:t}}))}var X=function(e){let{settings:t}=e;const{bubbleSize:n}=Object(O.d)(A.d),{agent:r,show:o,text:a,type:c}=Object(O.d)(A.q),l=Object(O.c)(),u=Object(N.a)(t,"zIndex",15),d=Object(k.e)(),f=Object(i.useMemo)(()=>Object(P.a)(d.bubbleButtonBackground||d.buttonBackground,"#fff","#000"),[d.bubbleButtonBackground,d.buttonBackground]);return null===a?null:s.a.createElement(U,{"data-story":"PushMessageContainer",bubbleSize:n,"aria-hidden":o?"false":"true","aria-label":"Chat bot push message",onClick:()=>l(Object(I.F)()),role:"complementary",zIndex:u},s.a.createElement(G,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),l(Object(I.v)())},type:"button"},s.a.createElement(T.e,{color:f,width:W?20:25,height:W?20:25})),s.a.createElement(H,null,"message"===c&&s.a.createElement(K,{text:a}),"takeover"===c&&s.a.createElement(Y,{agent:r})))},J=n(5),Q=(n(49),n(19));const Z=Object(k.b)(["#chatContainer.using-tab &{outline-color:rgb(77,144,254);outline-offset:-2px;outline-style:auto;outline-width:5px;}"]),ee=Object(k.b)(["z-index:15;transition:all 0.2s ease;",";"],e=>e.active&&"transform: rotate(45deg);"),te=Object(k.c)(T.c).withConfig({displayName:"styles__BubbleButton",componentId:"sc-1elsepj-0"})(["&&&{",";overflow:visible;path{stroke-width:2px;stroke:",";fill:",";transition:stroke 0.15s ease;}}"],ee,e=>{let{active:t,$bubbleOutline:n,theme:r,stroke:o}=e;return o||(!t&&n?r.bubbleButtonOutline:r.bubbleButtonBackground||r.buttonBackground)},e=>{let{theme:t,background:n}=e;return n||(t.bubbleButtonBackground||t.buttonBackground)}),ne=k.c.button.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1elsepj-1"})(["z-index:10;overflow:visible;display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer;height:50px;width:50px;padding:9px 8px;text-align:center;border-radius:50%;border:2px solid ",";box-shadow:"," ",";background:",";",";transition:all 0.25s ease;"," @media ","{","}:focus{",";}:hover{background:",";}:focus ","{",";}"," path{",";",";}"],e=>{let{bubbleOutline:t,theme:n,background:r}=e;return r||(t?n.bubbleButtonOutline:n.bubbleButtonBackground||n.buttonBackground)},e=>e.active?"0px 1px 5px 1px":"1px 0px 7px 7px",z.a.shadowColorDark,e=>{let{theme:t,background:n}=e;return n||t.bubbleButtonBackground||t.buttonBackground},e=>{let{background:t}=e;return t?`border-color: ${t}`:void 0},Q.a,z.c.maxTablet,e=>{let{smallBubble:t}=e;return t&&"\n height: 30px;\n width: 30px;\n\n svg {\n width: 45px;\n }\n "},e=>{let{active:t}=e;return!t&&"outline: none;"},e=>{let{background:t,theme:n}=e;return t||n.bubbleButtonBackground||n.buttonBackground},te,e=>{let{active:t}=e;return!t&&Z},te,e=>{let{background:t}=e;return t?`stroke: ${t}`:""},e=>{let{background:t}=e;return t?`fill: ${t}`:""}),re=Object(k.b)(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]),oe=k.c.div.withConfig({displayName:"styles__LogoContainer",componentId:"sc-1elsepj-2"})([""," top:calc(50% - 3px);opacity:1;width:calc(100% - 20px);height:calc(100% - 20px);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url(",");transition:all 0.2s ease;",";"],re,e=>e.bubbleAvatar,e=>e.active&&"opacity: 0;"),ae=k.c.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1elsepj-3"})(["",""],re);var ie=n(166),se=n.n(ie);const ce=k.c.img.withConfig({displayName:"ChristmasBubbleButtonstyles__ChristmasBubbleButton",componentId:"sc-tjldpf-0"})(["z-index:15;position:absolute;top:-22px;left:2px;width:84px;opacity:1;transform:rotate(10deg);transition:all 0.2s ease;",";path{fill:",";}"],e=>e.active&&"\n transform: rotate(32deg);\n width: 51px;\n top: -20px;\n left: 9px;\n ",e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""});var le=function(e){let{active:t,bubbleOutline:n}=e;return s.a.createElement(ae,null,s.a.createElement(ce,{src:se.a,active:t?1:0,role:"presentation"}),s.a.createElement(te,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67}))};const ue=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarFront",componentId:"sc-1djbf9y-0"})(["z-index:15;position:absolute;top:-22px;left:32px;width:31px;height:38px;opacity:1;&:focus{outline:none;}transition:all 0.2s ease;",";"],e=>e.active&&"\n width: 18px;\n height: 23px;\n top: -6px;\n left: 29px;\n "),de=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EarBack",componentId:"sc-1djbf9y-1"})(["position:absolute;top:-26px;left:24px;width:31px;height:38px;opacity:1;z-index:-1;transition:all 0.2s ease;",";"],e=>e.active&&"\n width: 12px;\n height: 15px;\n top: -8px;\n left: 31px;\n "),fe=k.c.svg.withConfig({displayName:"EasterBubbleButtonstyles__EyesNose",componentId:"sc-1djbf9y-2"})(["z-index:15;position:absolute;top:24px;left:-2px;width:29px;height:24px;opacity:1;transform:rotate(0deg);transition:all 0.2s ease;",";"],e=>e.active&&"\n opacity: 0;\n top: 3px;\n left: -8px;\n width: 19px;\n height: 14px;\n transform: rotate(45deg);\n ");var pe=function(e){let{active:t,bubbleOutline:n}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement(de,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},s.a.createElement(T.f,null)),s.a.createElement(ue,{width:"31px",height:"38px",viewBox:"0 0 31 38",active:t?1:0},s.a.createElement(T.g,null)),s.a.createElement(ae,null,!t&&s.a.createElement(fe,{width:"29px",height:"24px",viewBox:"0 0 29 24",active:t?1:0},s.a.createElement(T.k,null)),s.a.createElement(te,{active:t?1:0,bubbleOutline:n?1:0,width:t?33:65,height:t?35:67,background:"#FFCA3A",stroke:"#FFCA3A"})))};const he=Object(k.c)(T.d).withConfig({displayName:"PrideBubbleButtonstyles__PrideBubbleButton",componentId:"sc-10jy5tk-0"})(["",";path{fill:",";}",":focus &{",";}"],ee,e=>{let{theme:t,active:n}=e;return n?t.bubbleButtonBackground||t.buttonBackground:""},ne,e=>{let{active:t}=e;return!t&&Z});var me=function(e){let{active:t}=e;return s.a.createElement(ae,null,s.a.createElement(he,{active:t?1:0,width:t?35:65,height:t?37:67}))};var ge=function(e){let{active:t,season:n,bubbleOutline:r,children:o}=e;return n===J.k.PRIDE?s.a.createElement(me,{active:t}):n===J.k.EASTER?s.a.createElement(pe,{active:t,bubbleOutline:r}):n===J.k.CHRISTMAS?s.a.createElement(le,{active:t,bubbleOutline:r}):s.a.createElement(ae,null,s.a.createElement(te,{active:t?1:0,$bubbleOutline:r?1:0,width:t?33:65,height:t?35:67}),o)};var be=function(e){let{title:t,active:n,onClick:r}=e;const{seasonalAppearance:o,bubbleOutline:a,bubbleSize:i,bubbleAvatar:c}=Object(O.d)(A.d),l=(e=>{if(e===J.k.EASTER)return"#ffca3a"})(o);return s.a.createElement(ne,{"aria-label":t,"aria-controls":"ChatButtonContainer",title:t,type:"button",active:n,onClick:r,"data-cy":"chat-bubble-button","data-testid":"chat-button",bubbleOutline:a?1:0,seasonalAppearance:o?1:0,background:l,smallBubble:"SMALL"===i},s.a.createElement(ge,{active:n,season:o,bubbleOutline:a},c?s.a.createElement(oe,{bubbleAvatar:c,active:n,"data-cy":"chat-bubble-logo-container"}):void 0))};const ve=(e,t)=>{if(null!=t&&t.includes("-")){const n=t.substring(0,t.indexOf("-"));if(e.toLowerCase()===n)return n}};var ye=n(41),we=n(51);function xe(){const e=Object(O.c)(),{currentLanguage:t,active:n,chatHasStarted:r}=Object(O.d)(A.e),{pushGreetingsEnabled:o,pushGreetings:a}=Object(O.d)(A.d),{defaultLanguage:s}=Object(S.a)();Object(i.useEffect)(()=>{if(!o||!a||n||!t||r)return;const i=window.location.href;a.forEach(n=>{if(Object(we.a)(i,n.url)&&n.enabled[t]){const r=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"url"!==t&&"autopopup_time"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(ye.a)(a,t,n)}},{}))(n,t,s);return r.autopopupTime=n.autopopup_time,e(Object(I.cb)(r))}return!1})},[n,t,s,o,a,e,r])}const Ee=function(e){let{retries:t=6,interval:n=300,intervalBackoffMultiplier:r=2}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{e({retriesLeft:t,interval:n,intervalBackoffMultiplier:r}).then(o).catch(i=>{setTimeout(()=>{t<=1?a(i):Ee(e,{retries:t-1,interval:n*r,intervalBackoffMultiplier:r}).then(o,a)},n)})})};var Oe=Ee,ke=n(77),_e=n(108),Ce=n(9);var je=n(2),Te=n(102);const Se=k.c.div.withConfig({displayName:"styles__ChatButtonContainer",componentId:"sc-18sln6s-0"})(["position:fixed;bottom:calc(",");right:calc(",");z-index:",";",";"],e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.bottom)&&void 0!==t?t:J.c.bottom} + 10px`},e=>{var t,n;return`${null!==(t=null===(n=e.position)||void 0===n?void 0:n.right)&&void 0!==t?t:J.c.right} + 10px`},e=>e.zIndex,e=>e.inPlatform&&"display:flex; align-items: center"),Ie=k.c.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-18sln6s-1"})(["height:15px;width:15px;z-index:50;right:0;top:-10px;position:absolute;border-radius:100px;background:",";background-color:",";",";"],z.a.errorColor,z.a.errorColor,D.g),Ae=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,243)))),Ne=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,244)))),Pe=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,245)))),Me=Object(i.lazy)(()=>Oe(()=>Promise.resolve().then(n.bind(null,247))));var Le=function(e){let{hidden:t=!1,onNudgeDismiss:n,onNudgeProductClick:r,onNudgeFormSubmit:o,chatSettings:a}=e;const c=Object(O.e)(),l=Object(O.c)(),{active:u,inPlatform:d}=Object(O.d)(A.e),{PAT_HOST:f,PUSHER_KEY:p,VERSION:h}=Object(O.d)(A.g),{show:m}=Object(O.d)(A.q),{feedbackFormOpen:g}=Object(O.d)(A.h),{show:b,nudgeLayout:v}=Object(O.d)(A.o),{bubbleNotification:y,position:w,fullscreenMode:x}=Object(O.d)(A.d),{showBubbleNotification:E}=Object(O.d)(A.b),k=Object(L.a)(),_=u?"Close chat":"Start chat",C=Object(i.useCallback)(()=>l(u?Object(I.h)():Object(I.F)()),[u,l]),T=Object(N.a)(a,"zIndex",15);(u&&E||E&&!k)&&l(Object(I.t)()),u&&m&&l(Object(I.v)()),Object(i.useEffect)(()=>{const e=`${f}/chatbubble/${J.j}/auth/pusher?version=${h}`;Object(j.delayConfiguration)(c,p,{authEndpoint:e,cluster:"eu",encrypted:!0,disableStats:!0,pongTimeout:7500})},[f,p,h,c]),function(){const e=Object(O.c)(),[t,n]=Object(i.useState)("/"),[r,o]=Object(i.useState)(!1),{shownNudges:a}=Object(O.d)(A.e),s=Object(Te.a)();Object(i.useEffect)(()=>{n(window.location.href),null!=a&&a.length&&!r&&Array.from(new Set(a).values()).map(e=>s.find(t=>t.slug===e)).filter(e=>e).filter(e=>e.analytics_completion_page_path).filter(e=>Object(we.a)(t,e.analytics_completion_page_path)).forEach(t=>{o(!0),e(Object(I.ob)({slug:t.slug,eventType:je.W})),e({type:je.x,slug:t.slug})})},[e,t,s,a,r])}(),(()=>{const e=Object(O.c)(),{languages:t}=Object(S.a)(A.d),{currentLanguage:n}=Object(O.d)(A.e);Object(i.useEffect)(()=>{if(n)return;const r=(()=>{var e,n;if(1===t.length)return t[0].code;let r;const o=t.find(e=>{var t;let{code:n}=e;const o=null===(t=document.documentElement.lang)||void 0===t?void 0:t.toLowerCase(),a=n.toLowerCase();return r=ve(n,o),a===o});if(o)return o.code;const a=t.find(e=>{var t;let{code:n}=e;const o=null===(t=window.navigator.userLanguage||window.navigator.language)||void 0===t?void 0:t.toLowerCase(),a=n.toLowerCase();return r||(r=ve(n,o)),a===o});if(a)return a.code;const i=null===(e=window.navigator.languages)||void 0===e?void 0:e.find(e=>t.some(t=>{let{code:n}=t;const o=null==e?void 0:e.toLowerCase(),a=n.toLowerCase();return r||(r=ve(n,o)),o===a}));return i||(r||((null===(n=t[0])||void 0===n?void 0:n.code)||""))})();r&&e(Object(I.R)(r,{skipRestart:!0}))},[n,t,e])})(),xe(),function(e){const t=Object(O.c)(),{token:n,pusherConnected:r,connectTriggerConfig:o}=Object(O.d)(A.f),{takenOver:a}=Object(O.d)(A.a),{persistStateLifespan:s}=Object(O.d)(A.d),{botKey:c,active:l,disabledTransports:u,chatHasStarted:d,wasActiveOnLoad:f,inPlatform:p,userIsIdle:h,error:m}=Object(O.d)(A.e),{chatMessages:g,messageSentTime:b}=Object(O.d)(A.n),{labels:v}=Object(O.d)(A.l),[y,w]=Object(i.useState)(!1),[x,E]=Object(i.useState)(!1),k=localStorage.getItem(`kindly-chat-${c}`);Object(i.useEffect)(()=>(window.addEventListener("online",()=>t(Object(I.A)())),window.addEventListener("offline",()=>t(Object(I.B)())),()=>{window.removeEventListener("online",()=>t(Object(I.A)())),window.removeEventListener("offline",()=>t(Object(I.B)()))}),[t]),Object(i.useEffect)(()=>{const n=e.welcomePage.type!==J.s.NONE;!d&&f&&!n&&t(Object(I.eb)())}),Object(i.useEffect)(()=>{l&&d&&!r&&(w(!0),403!==m||n||t(Object(I.m)()))},[l,d,t,m,r,n]),Object(i.useEffect)(()=>{o&&t(Object(I.m)(o))},[o,t]),Object(i.useEffect)(()=>{r&&o&&t(Object(I.o)())},[o,t,r]),Object(i.useEffect)(()=>{const e=l&&d;if(r||y||h||o)return;const a=Object(_e.a)({messageSentTime:b,persistStateLifespan:s});e||n?e&&!n?(w(!0),t(Object(I.m)({shouldGreet:d}))):a&&(w(!0),Object(I.n)(n,u)):!e&&v.length>0&&(w(!0),t(Object(I.m)({shouldGreet:!1})))},[y,l,o,r,n,u,t,g.length,d,h,m,b,s,k,c,v]),Object(i.useEffect)(()=>{y&&r&&w(!1)},[y,r]),Object(i.useEffect)(()=>{if(r&&h&&!a){Object(Ce.g)(n);try{Object(j.disconnect)()}catch{}}},[h,r,a,n]),Object(i.useEffect)(()=>(l&&!p&&e.chatbubble.realtime_analytics&&t(Object(ke.a)(e.id)),ke.b),[l,t,p,e]),Object(i.useEffect)(()=>{n&&l&&!x&&(t(Object(I.y)()),E(!0))},[l,t,x,n])}(a);const P=(!u||x)&&g,M=!u&&m&&!t&&!g;return s.a.createElement(s.a.Fragment,null,u&&s.a.createElement(Ae,{settings:a}),M&&s.a.createElement(X,{settings:a}),P&&s.a.createElement(Pe,null),!g&&b&&v&&s.a.createElement(Ne,{hidden:t,layout:v,onDismiss:n,onNewsletterSubmit:o,onProductClick:r}),s.a.createElement(Se,{inPlatform:d,position:w,zIndex:T,"data-story":"ChatButtonContainer",id:"ChatButtonContainer"},d&&s.a.createElement(Me,{active:u}),!u&&y&&E&&s.a.createElement(Ie,null),!t&&s.a.createElement(be,{title:_,active:u,onClick:C})))},Re=e=>{if(!e)return!0;return Date.now()-Number(e)>J.m},De=n(72);var Be=n(60),Fe=n(167),ze=n.n(Fe);function Ue(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var He=Ue();He.withExtraArgument=Ue;var $e=He,Ve=n(168),qe=n.n(Ve),Ge=(e,t)=>qe()({},e,t);var We=(e,t,n)=>Ge(e,((e,t)=>e.split(".").reverse().reduce((e,n,r)=>0===r?{[n]:t}:{[n]:e},{}))(t,n));var Ye=e=>(t,n)=>{const r=Ge(t,n);return o=r,e.reduce((e,t)=>{let[n,r]=t;return We(e,n,r)},o);var o},Ke=n(59),Xe=n(53);const Je={id:null,name:"",avatar:"",botName:"",botAvatar:"",text:null,languages:[],startOverText:"Start over",placeholder:"",typingIndicator:!1,typingDuration:"",isTyping:!1,isTypingTimeoutId:null,feedbackForm:null,realtimeAnalytics:!1,inputLimitEnabled:!1,inputLimit:140,welcomePage:null,welcomePageType:J.s.COLOR,pushGreetingsEnabled:!1,pushGreetings:[],tabNotification:!0,bubbleNotification:!0,heartbeatEnabled:!1};var Qe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.sb:return localStorage.removeItem("kindly-chat-has-shown-feedback-form"),{...e,name:e.botName,avatar:e.botAvatar,splitLabelTimestamp:Date.now()};case je.i:{var n;const r=null===(n=null==t?void 0:t.isTyping)||void 0===n||n;return{...e,isTyping:r}}case je.I:return{...e,isTyping:t.isTyping,isTypingTimeoutId:t.isTypingTimeoutId,hasInteraction:!0,splitLabelTimestamp:Date.now()};case je.hb:return{...e,splitLabelTimestamp:Date.now(),splitTestLabel:t.splitTestLabel};case je.Cb:return{...e,splitLabelTimestamp:Date.now()};case je.m:return{...e,splitTestLabel:null,hasInteraction:null,splitLabelTimestamp:null};default:return e}};const Ze={botKey:null,inPlatform:!1,chatHasStarted:!1,active:!1,hideInputField:!1,previouslyPoppedUp:!1,currentlyPoppedUp:!1,optionsScreenOpen:!1,currentLanguage:null,startedAt:null,userIsIdle:!1,allGreetingsHideInput:!1,contactDetailsButton:null,uploadButtonWasClicked:null,hasRequestedGreeting:!1,attachments:{exchangeId:null,buttonClicked:null,files:[]},error:null};var et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.Z:return{...e,error:t.error};case je.eb:return{...e,currentLanguage:t.code};case je.sb:return{...e,error:null,botKey:t.botKey||e.botKey,optionsScreenOpen:!1,hideInputField:!1,userIsIdle:!1};case je.Y:return{...e,chatHasStarted:t.chatHasStarted,userIsIdle:!t.chatHasStarted&&e.userIsIdle};case je.I:{const n=e.hideInputField&&"USER"===t.data.sender;return{...e,chatHasStarted:!0,hideInputField:!!n||t.data.chatbubble_hide_input_field}}case je.K:return{...e,active:!0,userIsIdle:!1};case je.n:return{...e,active:!1,optionsScreenOpen:!1};case je.Q:return{...e,previouslyPoppedUp:!0,currentlyPoppedUp:!0};case je.N:return{...e,optionsScreenOpen:!0};case je.q:return{...e,optionsScreenOpen:!1};case je.H:return{...e,chatId:t.chatId,allGreetingsHideInput:t.allGreetingsHideInput};case je.yb:return e;case je.bb:return{...e,hasRequestedGreeting:t.hasRequestedGreeting};case je.ib:return{...e,startedAt:t.startedAt};case je.jb:return{...e,userIsIdle:t.userIsIdle};case je.lb:return{...e,contactDetailsButton:t.button};case je.D:return{...e,contactDetailsButton:null};case je.t:return{...e,shownNudges:(e.shownNudges||[]).concat(t.slug)};case je.f:return{...e,attachments:{...e.attachments,buttonClicked:+new Date,exchangeId:t.button.value}};case je.X:return{...e,attachments:{...e.attachments,files:t.files}};case je.k:return{...e,attachments:{exchangeId:null,buttonClicked:null,files:[]}};case je.g:return{...e,attachments:{...e.attachments,buttonClicked:null}};case je.x:return{...e,shownNudges:(e.shownNudges||[]).filter(e=>e!==t.slug)};default:return e}};const tt={PAT_HOST:"https://bot.kindly.ai",PUSHER_KEY:"0d15baa2a7308d71e79d",STATUS_PAGE:"https://status.kindly.ai",KINDLY_CHAT_URL:"http://localhost:8081",SAGE_WS_HOST:"wss://sage.kindly.ai",SAGE_HOST:"https://sage.kindly.ai",SETTINGS_HOST:"https://chat.kindlycdn.com",VERSION:"dev"};var nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.O:return{...e,...t.env};default:return e}};const rt=(e,t)=>({...Je,id:e.id,name:e.name,avatar:e.avatar,botName:e.name,botAvatar:e.avatar,languages:e.languages,includeDisabledLanguages:e.includeDisabledLanguages,startOverText:e.start_over_text,welcomePage:e.welcomePage,welcomePageType:t?J.s.NONE:e.welcomePage.type,maintenanceAlert:e.maintenanceAlert,maintenanceAlertEnabled:!t&&e.maintenanceAlert.alert_enabled,pushGreetingsEnabled:!t&&e.use_push_greetings,pushGreetings:e.push_greetings,tabNotification:e.tab_notification,bubbleNotification:e.bubble_notification,typingIndicator:e.typing_indicator,typingDuration:e.typing_duration,disabledTransports:e.disabled_transports,feedbackFormType:t?J.r.NONE:e.feedbackForm.type,feedbackForm:e.feedbackForm,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,position:{...J.c,...e.position},offsetHeight:e.offsetHeight||"205px",fullscreenMode:e.fullscreenMode||!1,zIndex:e.zIndex||J.d,persistStateLifespan:t?-1:e.chatbubble.persist_state_lifespan_seconds,showTakeoverQueue:e.show_takeover_queue,bubbleOutline:e.use_bubble_outline,seasonalAppearance:e.seasonal_appearance,noFeedbackAfterHandover:e.no_feedback_after_handover,nudges:e.nudges||[],handoverMode:e.handover_mode,heartbeatEnabled:Boolean(e.chatbubble_heartbeat_enabled),heartbeatTTL:e.chatbubble_heartbeat_ttl_s,splitTestEnabled:e.split_test_enabled,conversionPageUrl:e.conversion_page_url});var ot=(e,t,n)=>{const{currentLanguage:r}=t;return n[r]||n.en},at=n(42);const it=Object.freeze({WARNING:"WARNING",CRITICAL:"CRITICAL"}),st=Object.freeze({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"},WEBSOCKET_DOWN:{en:"There seems to be an issue with the connection, attempting to reconnect...",nb:"Det ser ut til å være et problem med tilkoblingen. Prøver å koble opp igjen..."}});var ct=e=>t=>n=>{switch(n.type){case je.w:return((e,t,n,r)=>{const{announcement:o,bot:a,chatbubble:i}=t;if(o.show)return n(r);const s={text:ot(0,i,e),alertType:it.WARNING};return n({type:je.d,payload:s}),n(r)})(st.OFFLINE,e.getState(),t,n);case je.r:{const{announcement:r,connection:o}=e.getState();return r.show&&t({type:je.c}),o.connected||t(Object(at.c)()),t(n)}default:return t(n)}};var lt=e=>t=>n=>{if(n.type!==je.I)return t(n);const{chatbubble:{active:r,currentLanguage:o}}=e.getState();if("greeting"===n.data.exchange_type||n.data.triggered_chat_start){const e=n.data.chat_language_code;o!==e&&t({type:je.eb,code:e})}if(("boolean"==typeof n.displayTypingIndicator?n.displayTypingIndicator:!n.data.from_bot)?Object(I.Q)()(t,e.getState):Object(I.rb)()(t,e.getState),!n.data.from_bot&&n.data.was_anonymized)return t({type:je.e,data:n.data});if(!n.data.from_bot)return t(n);return!r&&"AGENT"!==n.data.sender&&"SYSTEM"!==n.data.sender&&"greeting"!==n.data.exchange_type&&t({type:je.K}),t(n)},ut=e=>t=>n=>{switch(n.type){case je.I:{const{bot:{typingDuration:r,typingIndicator:o},agent:{takenOver:a},chatbubble:{chatHasStarted:i}}=e.getState(),{isContactDetails:s,sender:c,from_bot:l,created:u}=n.data;if(!o||a||!i||c===J.l.SYSTEM||s)return t({...n,displayTypingIndicator:!1});if(Object(I.Q)()(t,e.getState),!l)return t(n);const d=r-((new Date).getTime()-Object(Ke.a)(u).getTime());return setTimeout(()=>{t(n)},d>0?d:0)}default:return t(n)}};var dt=e=>t=>n=>{const{bot:{typingDuration:r,typingIndicator:o}}=e.getState(),a=o?Math.max(5e3,r):5e3;return n.type===je.H&&setTimeout(()=>t(Object(I.I)()),a),n.type===je.I&&n.data.from_bot?(t(Object(I.q)()),t(Object(I.c)()),t(n)):t(n)};const ft={names:[],avatars:[],isTyping:!1,userIsTyping:!1,takenOver:!1,takeoverClosed:!0,requestedTakeover:!1,hasHadHandover:!1};var pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.ub:{const n=t.data.taken_over&&!e.takenOver,r=!t.data.taken_over&&e.takenOver;return n?{...e,requestedTakeover:!1,takenOver:!0,isTyping:!1,hasHadHandover:!0}:r?{...e,requestedTakeover:!1,takenOver:!1,isTyping:!1}:e}case je.I:return{...e,isTyping:!1};case je.a:return{...e,isTyping:!0};case je.b:return{...e,isTyping:!1};case je.Db:return{...e,userIsTyping:!0};case je.Eb:return{...e,userIsTyping:!1};case je.wb:return{...e,requestedTakeover:t.requestedTakeover,takeoverClosed:t.closed||!1};case je.vb:return{...e,requestedTakeover:!1};case je.T:return{...e,hasHadHandover:!1};default:return e}};const ht={showTabNotification:!1,showBubbleNotification:!1};var mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.I:if(!t.data.from_bot||"SYSTEM"===t.data.sender)return e;return"visible"===document.visibilityState?{showBubbleNotification:!0}:{showTabNotification:!0};case je.qb:return{showTabNotification:!0};case je.kb:return{showBubbleNotification:!0};case je.z:return{...ht};default:return e}};const gt={show:!1,text:null,url:null,type:null};var bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.d:return{text:t.payload.text,type:t.payload.alertType,url:t.payload.url,show:!0};case je.c:return gt;default:return e}};const vt={isAuthenticated:!1,token:null,avatarUrl:null,fullName:null,isRefreshing:!1,getAuthToken:null};var yt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.h:return{...e,isAuthenticated:!0,token:t.token,avatarUrl:t.avatarUrl,fullName:t.fullName};case je.E:return{...e,avatarUrl:t.avatarUrl,fullName:t.fullName};case je.zb:return{...e,...vt};case je.tb:return{...e,isRefreshing:!0};case je.C:return{...e,isRefreshing:!1};default:return e}};const wt={token:null,connected:!0,pusherConnected:!1,connectTriggerConfig:void 0,heartbeatId:void 0};var xt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.J:return{...e,token:t.token};case je.sb:case je.V:return{...e,token:null};case je.r:return{...e,connected:!0};case je.w:return{...e,connected:!1};case je.R:return{...e,pusherConnected:!0};case je.S:return{...e,pusherConnected:!1};case je.s:return{...e,connectTriggerConfig:t.triggerConfig};case je.cb:return{...e,heartbeatId:t.heartbeatId};default:return e}};const Et={inspectorOpen:!1,currentMessageId:null};var Ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Et,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.db:return{...e,currentMessageId:t.chatMessageId};case je.xb:return{...e,inspectorOpen:!e.inspectorOpen};default:return e}};const kt={token:null,feedbackFormOpen:!1};var _t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.L:return{...e,feedbackFormOpen:!0,token:t.token};case je.o:return kt;default:return e}},Ct=n(78);const jt={context:{},labels:[]};var Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ct.a:return{...e,context:{...e.context,...t.context}};case Ct.b:return{...e,labels:[...new Set([...e.labels,t.label])]};case je.sb:case je.V:return{...e,labels:[]};default:return e}};const St={show:!1,textContent:null,linkText:null,linkLocation:null,dismissed:!1};var It=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:St,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.nb:return{show:!0,textContent:t.textContent,linkText:t.linkText,linkLocation:t.linkLocation};case je.y:return{...St,dismissed:!0};default:return e}},At=n(97),Nt=n(103),Pt=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,[Object(Nt.a)(n)]:r}},{})},Mt=e=>Boolean(e.find(e=>{let{exchange_type:t}=e;return"greeting"===t})),Lt=n(99),Rt=n(96);const Dt={chatMessages:[],buttonClicks:[],attachments:[],messageSentTime:null,lastMessageSeen:null},Bt=e=>{let{id:t}=e;return t},Ft=e=>{let{temporaryId:t,id:n}=e;return e=>{let{temporaryId:r,id:o}=e;return n===o||t===r}},zt=(e,t,n)=>e.map(e=>t(e)?n(e):e);var Ut=function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dt,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case je.I:{const{chatMessages:e}=o,{data:t,force:n=!1}=a;return"greeting"===Object(N.a)(t,"exchange_type")&&Mt(e)?o:n||Object(Lt.a)(e)(t)?We(o,"chatMessages",[...e,t]):o}case je.sb:return Dt;case je.e:{const{chatbubble_temporary_id:e,id:t}=a.data,n=n=>{let{id:r}=n;return Object(l.a)(r,[e,t])},r=e=>({...e,message:a.data.message});return{...o,chatMessages:zt(o.chatMessages,n,r)}}case je.gb:return{...o,messageSentTime:a.messageSentTime};case je.Bb:{var i;const{created:e,id:t,temporaryId:n}=a,{chatMessages:r}=o,s=null!==(i=null==a?void 0:a.status)&&void 0!==i?i:null,c=r.findIndex(e=>{let{id:t}=e;return t===n});if(c<0)return o;const l=r[c],u={...l,created:e||l.created,id:t||l.id,status:s},d=r.map((e,t)=>t!==c?e:u);return{...o,chatMessages:d}}case je.P:{const{chatMessageId:e,chatMessageTempId:t,patternContextMatch:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,pattern_context_match:n});return{...o,chatMessages:zt(o.chatMessages,r,i)}}case je.rb:{const{chatMessageId:e,chatMessageTempId:t,correctedMessage:n}=a.data,r=n=>{let{id:r}=n;return r===e||r===t},i=e=>({...e,corrected_message:n});return{...o,chatMessages:zt(o.chatMessages,r,i)}}case je.j:var s;return a.force||Object(At.a)(o.buttonClicks)(a.buttonClick)?{...o,buttonClicks:[...null!==(s=o.buttonClicks)&&void 0!==s?s:[],a.buttonClick]}:o;case je.fb:return{...o,lastMessageSeen:Object(Rt.a)(a,["id","index"])};case je.G:return{...o,attachments:[...null!==(e=o.attachments)&&void 0!==e?e:[],...(null===(t=a.data)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map(Pt))||[]]};case je.Ab:{const e=Pt(a.attachment),t=Ft(e),n=t=>({...t,...e});return{...o,attachments:zt(o.attachments,t,n)}}case je.F:{var c;const{attachments:e=[],temporaryChatMessageId:t,chatMessageId:n}=a.data,r=e.map(Pt),i=(null!==(c=o.attachments)&&void 0!==c?c:[]).map(e=>{const t=r.find(Ft(e));return t?{...e,...t}:e});let s=o.chatMessages;if(t&&n){const e=e=>{let{id:n}=e;return n===t},a=e=>({...e,id:n,attachment_ids:r.map(Bt)});s=zt(o.chatMessages,e,a)}return{...o,attachments:i,chatMessages:s}}case je.ab:return null!==(r=a.formData)&&void 0!==r&&r.formKey?{...o,forms:{...o.forms,[a.formData.formKey]:a.formData}}:o;default:return o}};const Ht={chatDeleted:!1};var $t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.v:return{...e,chatDeleted:!0};case je.Y:return{...e,chatDeleted:!t.chatHasStarted&&e.chatDeleted};case je.sb:return{...e,chatDeleted:!1};default:return e}},Vt=n(71);const qt={show:!1,text:null,agent:null,dismissed:!1,type:Vt.a.MESSAGE,dismissedMessages:[]};var Gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.ub:return t.data.taken_over&&!e.taken_over?{...e,show:!0,agent:{name:t.data.name,avatar:t.data.avatar},text:void 0,type:Vt.a.TAKEOVER}:e;case je.I:return Object(L.a)()||!t.data.from_bot||"SYSTEM"===t.data.sender||"greeting"===t.data.exchange_type?e:{...e,show:!0,text:t.data.message,type:Vt.a.MESSAGE};case je.pb:return{...e,show:!0,text:t.pushMessageText,dismissed:!1,type:t.pushMessageType,dismissedMessages:[...e.dismissedMessages,t.pushMessageTitle]};case je.B:return{...e,show:!1,dismissed:!0};case je.U:return qt;default:return e}},Wt=n(24);const Yt={takeoverPollIntervalId:null,takeoverRequestPollIntervalId:null,replyTimeoutId:null,replyTimeoutAttempts:0};var Kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Wt.e:return{...e,takeoverPollIntervalId:t.takeoverPollIntervalId};case Wt.f:return{...e,takeoverRequestPollIntervalId:t.takeoverRequestPollIntervalId};case Wt.d:return{...e,replyTimeoutId:t.replyTimeoutId,replyTimeoutAttempts:t.replyTimeoutAttempts};case Wt.b:return{...e,takeoverPollIntervalId:null};case Wt.c:return{...e,takeoverRequestPollIntervalId:null};case Wt.a:return{...e,replyTimeoutId:null,replyTimeoutAttempts:0};default:return e}};const Xt={open:!1,imageUrl:""};var Jt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.M:return{...e,open:!0,imageUrl:t.imageUrl};case je.p:return{...e,open:!1,imageUrl:""};default:return e}};const Qt={slug:null,show:!1,isCustom:!1,dialogue:null,webhook:null,content:null,onRendered:null,nudgeLayout:{},nudgeType:J.i.TEMPLATE,hasInteraction:!1};var Zt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case je.A:return{...e,show:!1,nudgeLayout:{},hasInteraction:!0};case je.ob:return{...e,show:!0,slug:t.slug,dialogue:t.dialogue,webhook:t.webhook,nudgeLayout:t.nudgeLayout,nudgeType:J.i.TEMPLATE,trackEvent:t.trackEvent,hasInteraction:!0};case je.mb:return{...e,show:!0,isCustom:!0,slug:t.slug,content:t.content,nudgeLayout:{},onRendered:t.onRendered,nudgeType:J.i.CUSTOM,trackEvent:t.trackEvent,hasInteraction:!0};case je.l:return{...e,hasInteraction:!1};default:return e}};const en=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,traceLimit:25})||Be.d,tn=Object(L.a)(),nn=function(){let{url:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e||"").startsWith("data:")?t:{...t,url:e}},rn=e=>{if(Object(N.a)(e,"bot.includeDisabledLanguages",!1))return e;const t=Object(N.a)(e,"chatbubble.currentLanguage"),n=Object(N.a)(e,"bot.languages",[]).find(e=>{let{code:n}=e;return n===t});return Object(N.a)(n,"active",!1)?e:Ge(e,{chatbubble:{currentLanguage:null}})};var on=e=>{let{botKey:t,settings:n,persist:o=!0,initialStateModifier:a}=e;const{language:i,inPlatform:s}=n,c=[dt,ct,ut,lt,$e];const l=`kindly-chat-${t}`,u=(e=>e?()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{...e.chatbubble,admin:void 0,currentlyPoppedUp:Ze.currentlyPoppedUp,allGreetingsHideInput:Ze.allGreetingsHideInput,contactDetailsButton:Ze.contactDetailsButton,attachments:Ze.attachments,shownNudges:e.chatbubble.shownNudges},connection:{token:e.connection.token,connected:!0,pusherConnected:!1},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars,requestedTakeover:e.agent.requestedTakeover,takenOver:e.agent.takenOver},messages:{forms:e.messages.forms,chatMessages:e.messages.chatMessages,buttonClicks:e.messages.buttonClicks,attachments:(e.messages.attachments||[]).map(nn),messageSentTime:e.messages.messageSentTime,lastMessageSeen:e.messages.lastMessageSeen},local:{labels:e.local.labels}}):(localStorage.removeItem("kindly-chat-has-shown-feedback-form"),()=>e=>({bot:{splitTestLabel:e.bot.splitTestLabel,splitLabelTimestamp:e.bot.splitLabelTimestamp,hasInteraction:e.bot.hasInteraction},nudge:{hasInteraction:e.nudge.hasInteraction},chatbubble:{active:!1,previouslyPoppedUp:e.chatbubble.previouslyPoppedUp,shownNudges:e.chatbubble.shownNudges},pushMessages:{dismissedMessages:e.pushMessages.dismissedMessages},agent:{names:e.agent.names,avatars:e.agent.avatars}})))((e=>e.inPlatform||0!==e.chatbubble.persist_state_lifespan_seconds)(n)),d=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))}}(rn,(e=>t=>{var n,r,o;const a=(null==t||null===(n=t.messages)||void 0===n?void 0:n.chatMessages.filter(e=>e.from_bot).sort((e,t)=>Object(Ke.a)(e.created).getTime()-Object(Ke.a)(t.created).getTime()).slice(1))||[],i=null!==(r=null==a||null===(o=a[0])||void 0===o?void 0:o.chat_language_code)&&void 0!==r?r:null;return Ge(t,{chatbubble:{currentLanguage:i||e}})})(i),(e=>t=>{const n=t.chatbubble.active&&(Boolean(e.chatbubble.keep_open&&!tn)||Boolean(e.chatbubble.keep_open_mobile&&tn));return Ge(t,{chatbubble:{active:n,wasActiveOnLoad:n}})})(n),(e=>{let{inPlatform:t,botKey:n}=e;const r=[["chatbubble.inPlatform",t],["chatbubble.botKey",n]].filter(e=>{let[,t]=e;return void 0!==t});return Ye(r)})({inPlatform:s,botKey:t})),f=en(Object(Be.a)(...c),o?ze()(null,{key:l,slicer:u,merge:d}):e=>e);let p=(e=>{let{botKey:t,settings:n,settings:{context:r,inPlatform:o,admin:a,environment:i,getAuthToken:s}}=e;return{bot:rt(n,o),chatbubble:{...Ze,botKey:t,inPlatform:o,admin:a,renderedBy:n.renderedBy||"REACT"},local:{context:r,labels:[]},environment:{...tt,VERSION:Xe.a,...i},auth:{getAuthToken:s}}})({botKey:t,settings:n});return a&&(p=Ge(p,a)),Object(Be.e)(Object(Be.c)(r),p,f)},an=()=>{const[e,t]=Object(i.useState)(!1),{conversionPageUrl:n}=Object(O.d)(A.d),r=((e,t)=>{let{enable:n=!0}=t;const[r,o]=Object(i.useState)(null);if(!n)return null;const a=setInterval(()=>{const t=document.querySelector(e);t&&(o(t),clearInterval(a))},500);return r})("#klarna-checkout-iframe",{enable:null==n?void 0:n.match(/klarna/gi)}),o=Object(i.useRef)(null),a=Object(i.useCallback)(e=>{var n;const r=e.getAttribute("src")||"",o=(e=>{try{return JSON.parse(e)}catch(e){return 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 Object(i.useEffect)(()=>{r&&!o.current&&(a(r),o.current=setInterval(()=>a(r),500))},[r,o,a]),Object(i.useEffect)(()=>{e&&clearInterval(o.current)},[e]),e};var sn=n(33);var cn=e=>{var t,n,r,o,a,i,s,c,l,u,d,f,p,h,m,g,b,v,y,w,x,E,O,k,_,C,j,T,S;return{customFont:null!==(t=null==e?void 0:e.customFont)&&void 0!==t?t:null,chatLogElements:null!==(n=null==e||null===(r=e.style)||void 0===r?void 0:r.color_chat_log_elements)&&void 0!==n?n:"#333333",background:null!==(o=null==e||null===(a=e.style)||void 0===a?void 0:a.color_background)&&void 0!==o?o:"#ffffff",bubbleButtonOutline:null!==(i=null==e||null===(s=e.style)||void 0===s?void 0:s.color_button_outline)&&void 0!==i?i:"#0069ff",buttonBackground:null!==(c=null==e||null===(l=e.style)||void 0===l?void 0:l.color_button_background)&&void 0!==c?c:"#0069ff",bubbleButtonBackground:null!==(u=null==e||null===(d=e.style)||void 0===d?void 0:d.color_bubble_button_background)&&void 0!==u?u:"#0069ff",buttonText:null!==(f=null==e||null===(p=e.style)||void 0===p?void 0:p.color_button_text)&&void 0!==f?f:"#ffffff",headerBackground:null!==(h=null==e||null===(m=e.style)||void 0===m?void 0:m.color_header_background)&&void 0!==h?h:"#0069ff",headerText:null!==(g=null==e||null===(b=e.style)||void 0===b?void 0:b.color_header_text)&&void 0!==g?g:"#ffffff",inputBackground:null!==(v=null==e||null===(y=e.style)||void 0===y?void 0:y.color_input_background)&&void 0!==v?v:"#ffffff",inputText:null!==(w=null==e||null===(x=e.style)||void 0===x?void 0:x.color_input_text)&&void 0!==w?w:"#333333",userMessageBackground:null!==(E=null==e||null===(O=e.style)||void 0===O?void 0:O.color_user_message_background)&&void 0!==E?E:"#f5f5f5",userMessageText:null!==(k=null==e||null===(_=e.style)||void 0===_?void 0:_.color_user_message_text_color)&&void 0!==k?k:"#2c2c2c",botMessageBackground:null!==(C=null==e||null===(j=e.style)||void 0===j?void 0:j.color_bot_message_background)&&void 0!==C?C:"#f5f5f5",botMessageText:null!==(T=null==e||null===(S=e.style)||void 0===S?void 0:S.color_bot_message_text_color)&&void 0!==T?T:"#2c2c2c"}};function ln(e){let{settings:t}=e;const n=Object(O.c)(),{inPlatform:r}=Object(O.d)(A.e),{canShow:o}=function(){const{splitTestEnabled:e,splitTestLabel:t,splitLabelTimestamp:n}=Object(O.d)(A.d),r=Object(O.c)(),o=Object(i.useCallback)(()=>{r(Object(I.sb)())},[r]),a=Object(De.a)(o,2500);return Object(i.useEffect)(()=>{function t(){a()}return e&&window.addEventListener("mousemove",t),()=>e?window.removeEventListener("mousemove",t):void 0},[e]),Object(i.useEffect)(()=>{n&&Re(n)&&r(Object(I.f)())},[n]),Object(i.useEffect)(()=>{let n=t||J.o.NO_SPLIT_LABEL;e&&!t&&(n=Math.random()>.5?J.o.SPLIT_A:J.o.SPLIT_B),t||r(Object(I.X)(n))},[e,t]),{canShow:e&&["A","X"].indexOf(t)>-1||!e,splitTestLabel:t}}();return(()=>{const e=Object(O.c)(),[t,n]=Object(i.useState)("/"),{conversionPageUrl:r,splitTestLabel:o,hasInteraction:a,splitTestEnabled:s}=Object(O.d)(A.d),c=an(),l=Object(i.useCallback)(()=>{if(!Re(localStorage.getItem("kindly-last-conversion-timestamp")))return;const t=s&&o,n=!a;localStorage.setItem("kindly-last-conversion-timestamp",Number(new Date)),e(Object(I.nb)(t,n)),e(Object(I.f)())},[e,o,a,s]);Object(i.useEffect)(()=>{c&&l()},[l,c]),Object(i.useEffect)(()=>{n(window.location.href),null!=r&&r.trim()&&Object(we.a)(t,r)&&l()},[l,t,r])})(),Object(i.useEffect)(()=>{o&&t.chatbubble.autopopup&&!Object(L.a)()&&!r&&setTimeout(()=>n(Object(I.b)()),t.chatbubble.autopopup_time)},[n,r,t,o]),o?s.a.createElement(Le,{chatSettings:t,hidden:t.bubbleHidden,onNudgeDismiss:t.onNudgeDismiss,onNudgeFormSubmit:t.onNudgeFormSubmit,onNudgeProductClick:t.onNudgeProductClick}):null}let un=!1;const dn=Object(i.forwardRef)((e,t)=>{let{botKey:r,settings:o}=e;const a=on({botKey:r,settings:o});return Object(i.useImperativeHandle)(t,()=>({openChat(){a.dispatch(Object(I.F)())},closeChat(){a.dispatch(Object(I.h)())},triggerDialogue(e,t){a.dispatch(Object(I.qb)(e,t))},showNudge(e){let{nudgeLayout:t,slug:n,trackEvent:r=!0}=e;a.dispatch(Object(I.bb)({nudgeLayout:t,slug:n,trackEvent:r}))},showCustomNudge(e){let{content:t,slug:n,onRendered:r,trackEvent:o=!0}=e;a.dispatch(Object(I.Z)({content:t,slug:n,onRendered:r,trackEvent:o}))},closeNudge(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.dispatch(Object(I.u)(e,t,n))},nudgeCompletion(e){sessionStorage.getItem("kindly-nudge-completion")||(a.dispatch(Object(sn.e)({slug:e,eventType:je.W})),a.dispatch({type:je.x,slug:e}),sessionStorage.setItem("kindly-nudge-completion",!0))},closeFeedback(){a.dispatch(Object(I.i)())},triggerCtaEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.dispatch(Object(sn.f)(e))},identifyUser(e){a.dispatch(Object(I.z)(e))},setNewContext(e){a.dispatch(Object(I.V)(e))},setNewLabel(e){a.dispatch(Object(I.W)(e))},cancelHandover(){a.dispatch(Object(I.d)())}})),Object(i.useEffect)(()=>{Object(_.b)(o)},[o]),Object(i.useEffect)(()=>{const{persistStateLifespan:e,heartbeatEnabled:t}=a.getState().bot;if(t)return;if(-1===e||e>0)return;let n=!1;const o=()=>{n||(n=!0,a.dispatch(Object(I.tb)(r)))};window.onbeforeunload=o,window.onunload=o},[r,o,a]),Object(i.useEffect)(()=>{!un&&o.track_utm&&(un=!0,Promise.resolve().then(n.bind(null,242)).then(e=>{let{default:t}=e;const n=t();n&&a.dispatch(Object(I.V)({...n}))}))},[o,a]),window.Cypress&&(window.store=a),s.a.createElement(O.a,{store:a},s.a.createElement(k.a,{theme:cn(o)},s.a.createElement(C.a,{errorPoint:"inside ChatContainer",displayError:!1},o.user_idle_timeout_seconds>0?s.a.createElement(E,{onIdle:()=>a.dispatch(Object(I.E)()),onActive:()=>a.dispatch(Object(I.D)(o.id)),timeout:1e3*o.user_idle_timeout_seconds},s.a.createElement(ln,{settings:o})):s.a.createElement(ln,{settings:o}))))});dn.displayName="ChatContainer";var fn=dn,pn=n(58),hn=n.n(pn),mn=n(52);var gn=(e,t)=>{const[n,r]=Object(i.useState)(t||{}),o=Object(i.useCallback)(async()=>{try{var n;const o=await async function(e,t){const n=Object(mn.b)();return Oe(()=>hn.a.get(`${e}/settings/${t}.json`,{params:{version:Xe.a,[mn.a]:n}}),{retries:3,interval:2e3,intervalBackoffMultiplier:1})}((null===(n=t.environment)||void 0===n?void 0:n.SETTINGS_HOST)||"https://chat.kindlycdn.com",e),{welcome_page:a,feedback_form:i,maintenance_alert:s,notifications:c,settings:l,...u}=o.data,d={...u,...l,...c,feedbackForm:i,welcomePage:a,maintenanceAlert:s};r(e=>Ge(Ge(d,e),t))}catch(e){var o,a;const t=null!==(o=e.response)&&void 0!==o&&null!==(a=o.data)&&void 0!==a&&a.error?e.response.data.error:e;console.error("Kindly chat failed to initialize.",t)}},[e,t]);return Object(i.useEffect)(()=>{o()},[o]),n};var bn=function(e){var t;let{botKey:n,setKindlyChatRef:r,options:o={}}=e;const a=gn(n,o);if(!a.id)return null;const i=[((null===(t=o.environment)||void 0===t?void 0:t.KINDLY_CHAT_URL)||"http://localhost:8081").match("^https?://(([^:/?#]*)(?::([0-9]+))?)")[2],"*.kindly.ai","demokind.ly","*.demokind.ly",...a.chatbubble.domains];return a.chatbubble.inPlatform||u(window.location.hostname,i)?s.a.createElement(fn,{ref:r,botKey:n,settings:a}):(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)};t.default=function(e){let{botKey:t,setKindlyChatRef:n,options:r}=e;return s.a.createElement(i.Suspense,{fallback:""},s.a.createElement(bn,{botKey:t,setKindlyChatRef:n,options:r}))}},function(e,t,n){"use strict";var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function c(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}t.a=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return c(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));Math.pow(10,8);var r=n(14),o=n(28);function a(e,t){var n;Object(r.a)(1,arguments);var a=Object(o.a)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i,s=u(e);if(s.date){var c=d(s.date,a);i=f(c.restDateString,c.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var l,p=i.getTime(),m=0;if(s.time&&(m=h(s.time),isNaN(m)))return new Date(NaN);if(!s.timezone){var b=new Date(p+m),v=new Date(0);return v.setFullYear(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()),v.setHours(b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds()),v}return l=g(s.timezone),isNaN(l)?new Date(NaN):new Date(p+m+l)}var i={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},s=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u(e){var t,n={},r=e.split(i.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],i.timeZoneDelimiter.test(n.date)&&(n.date=e.split(i.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=i.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}function d(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?o:100*a,restDateString:e.slice((r[1]||r[2]).length)}}function f(e,t){if(null===t)return new Date(NaN);var n=e.match(s);if(!n)return new Date(NaN);var r=!!n[4],o=p(n[1]),a=p(n[2])-1,i=p(n[3]),c=p(n[4]),l=p(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,c,l)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,a=7*(t-1)+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}(t,c,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(b[t]||(v(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(v(e)?366:365)}(t,o)?(u.setUTCFullYear(t,a,Math.max(o,i)),u):new Date(NaN)}function p(e){return e?parseInt(e):1}function h(e){var t=e.match(c);if(!t)return NaN;var n=m(t[1]),r=m(t[2]),o=m(t[3]);return function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,o)?36e5*n+6e4*r+1e3*o:NaN}function m(e){return e&&parseFloat(e.replace(",","."))||0}function g(e){if("Z"===e)return 0;var t=e.match(l);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,o)?n*(36e5*r+6e4*o):NaN}var b=[31,null,31,30,31,30,31,31,30,31,30,31];function v(e){return e%400==0||e%4==0&&e%100!=0}},,function(e,t,n){"use strict";n.r(t);var r=n(169),o=n.n(r),a=n(17);const i=Object.freeze(["CONTENT","SOURCE","MEDIUM","CAMPAIGN","TERM"]);t.default=()=>{const e=new o.a(window.location.search);let t=Array.from(e.entries()).reduce((e,t)=>{let[n,r]=t;return"UTM_"===n.toUpperCase().substring(0,4)&&Object(a.a)(n.toUpperCase().substring(4),i)?{...e,[n]:r}:e},null);if(t)window.sessionStorage.setItem("kindly-chat-utm",JSON.stringify(t));else{const e=window.sessionStorage.getItem("kindly-chat-utm");t=e?JSON.parse(e):null}return t}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),a=n(0),i=n.n(a),s=n(3),c=n(1),l=n(23),u=n(6);const d=Object(c.b)(["bottom:",";right:",";@media ","{right:0;}max-height:730px;"],e=>e.position.bottom,e=>e.position.right,u.c.maxPhone),f=Object(c.b)(["bottom:0px;right:0px;top:0px;width:100%;"]),p=c.c.div.withConfig({displayName:"KindlyChatstyles__ChatContainer",componentId:"sc-1y4lzsi-0"})(["position:fixed;font-size:16px;text-align:initial;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;z-index:",";font-family:",";"," *{box-sizing:border-box;",";}@media ","{display:flex;width:100%;max-height:unset;align-items:center;justify-content:center;",";}"],e=>e.zIndex+5,e=>{let{theme:t}=e;return t.customFont?t.customFont:l.a.default},e=>e.fullscreen?f:d,e=>{let{theme:t}=e;return t.customFont&&`font-family: ${t.customFont}`},u.c.maxTablet,e=>{let{active:t}=e;return t&&"height: 100%;\n bottom: 0;\n right: 0;\n left: 0;\n top: 0"});var h=n(10),m=n(19);const g=c.c.button.withConfig({displayName:"styles__CloseIconButton",componentId:"sc-96uqai-0"})(["position:absolute;z-index:",";top:24px;right:24px;background:none;border:none;cursor:pointer;",""],e=>e.zIndex+10,m.a),b=c.c.div.withConfig({displayName:"styles__LightBox",componentId:"sc-96uqai-1"})(["position:fixed;background:rgba(0,0,0,0.5);top:0;right:0;bottom:0;left:0;z-index:",";display:flex;align-items:center;justify-content:center;"],e=>e.zIndex+9),v=c.c.img.withConfig({displayName:"styles__LightBoxImage",componentId:"sc-96uqai-2"})(["width:auto;max-width:100%;max-height:100%;margin:auto;padding:24px;"]);var y=n(5),w=n(7),x=n(11);const E=Object(c.d)(["0%{visibility:visible;opacity:0;}1%{opacity:0;transform:translateY(20px);}100%{opacity:1;transform:translateY(0);}"]),O=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),E),k=Object(c.d)(["0%{opacity:1;transform:translateY(0px);}99%{opacity:0;transform:translateY(20px);}100%{opacity:0;visibility:hidden;}"]),_=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),k),C=Object(c.b)(["",";right:unset;bottom:unset;transition:width 300ms ease 0ms,height 300ms ease 0ms;"],e=>e.chatHasStarted?"width: 100%;\n height: 100%;\n ":"width: 90%;\n height: 95%;\n border-radius: 6px;"),j=Object(c.b)(["max-height:",";height:",";width:",";"],e=>e.fullscreen?"100%":"645px",e=>e.fullscreen?"100%":"645px",e=>e.fullscreen?"100%":"360px"),T=Object(c.b)(["bottom:85px;right:10px;border-radius:12px;@media (max-height:","){min-height:380px;height:calc(100vh - ",");}"],"950px",e=>e.offsetHeight),S=Object(c.b)(["bottom:0px;right:0px;border-radius:0px;"]),I=Object(c.b)([""," "," ",""],e=>e.fullscreen?S:T,e=>e.active?j:Object(x.h)(),e=>!e.fullscreen&&!e.chatHasStarted&&(e=>e.active?O:_)(e)),A=Object(c.b)(["right:369px;display:flex;flex-direction:column;justify-content:flex-start;z-index:19;border-radius:6px 0 0 6px;background:#ffffff;background-color:#ffffff;>:last-child{margin:auto 20px 20px;}"]),N=c.c.div.withConfig({displayName:"styles__ChatBoxContainer",componentId:"sc-1usve4j-0"})(["position:absolute;z-index:20;overflow:hidden;flex-direction:column;box-shadow:0px 8px 48px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.16),0px 4px 8px rgba(0,0,0,0.04);display:",";@media ","{",";","}@media ","{visibility:",";",";}"],e=>e.hide?"none":"flex",u.c.minTablet,I,e=>{let{inspectorContainer:t}=e;return t&&A},u.c.maxTablet,e=>e.active?"visible":"hidden",C);var P=n(13);const M=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1iatydl-0"})(["margin:20px;display:flex;flex-direction:column;"]),L=c.c.hr.withConfig({displayName:"styles__Separator",componentId:"sc-1iatydl-1"})(["border-top:1px solid rgb(243,243,244);width:100%;margin:0;"]),R=c.c.button.withConfig({displayName:"styles__Navigation",componentId:"sc-1iatydl-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;}"]),D=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-1iatydl-3"})(["display:flex;align-items:baseline;font-size:13px;",""],e=>{let{spaceBetween:t}=e;return t?"justify-content: space-between;":""}),B=c.c.div.withConfig({displayName:"styles__Slot",componentId:"sc-1iatydl-4"})(["padding:1px 3px;border-radius:3px;font-size:12px;margin-right:5px;background:rgba(255,74,156,0.25);"]),F=c.c.span.withConfig({displayName:"styles__Dot",componentId:"sc-1iatydl-5"})(["height:7px;width:7px;background:rgb(255,172,74);border-radius:50%;margin-right:5px;bottom:1px;position:relative;"]),z=c.c.span.withConfig({displayName:"styles__Corrected",componentId:"sc-1iatydl-6"})(["border-bottom:1px dotted red;"]),U=c.c.span.withConfig({displayName:"styles__Arrow",componentId:"sc-1iatydl-7"})(["margin:0 5px;color:gray;"]),H=c.c.div.withConfig({displayName:"styles__Label",componentId:"sc-1iatydl-8"})(["padding:1px 6px;border-radius:3px;border:1px solid lightgray;text-transform:uppercase;font-size:12px;margin:0 5px 3px 5px;white-space:nowrap;",""],e=>{let{filled:t}=e;return t?"background: rgb(0, 105, 255); color: white;":""}),$=c.c.a.withConfig({displayName:"styles__Link",componentId:"sc-1iatydl-9"})(["text-decoration:none;color:initial;cursor:pointer;&:hover{color:rgb(0,105,255);}"]),V=()=>{};var q=function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(M,null,i.a.createElement(P.c,null,"No messages yet!")),i.a.createElement(D,{spaceBetween:!0},i.a.createElement(R,{disabled:!0,onClick:V},"Show previous"),i.a.createElement(R,{disabled:!0,onClick:V},"Show next")))},G=(n(57),n(17));const{SAMPLE_MATCH:W,KEYWORD_EXACT_MATCH:Y,KEYWORD_MENTION:K,PATTERN_MATCH:X,ZODIAC:J}=y.f,Q=e=>(null!=e?e:"").toLowerCase().replace(/[-_]/g," ");var Z=function(e){let{handler:t,score:n,exchangeType:r,sender:o,fromWebhook:a,label:s}=e;return"string"==typeof s?i.a.createElement(H,null,s):Object(G.a)(t,[W,J])&&n?i.a.createElement(H,{filled:!0,title:"Confidence score"},`${Math.round(100*n)} %`):Object(G.a)(t,Object.values(y.f))?i.a.createElement(H,null,(e=>{switch(e){case W:case J:return"sample";case X:return"pattern";case Y:case K:return"keyword";default:return Q(e)}})(t)):a?i.a.createElement(H,null,"webhook"):"string"==typeof r?i.a.createElement(H,null,Q(r)):Object(G.a)(o,Object.values(y.l))?i.a.createElement(H,null,Q(o)):null};n(49);const ee=e=>{let{botId:t,exchangeType:n,exchangeId:r}=e;if(!t||!n||!r)return null;return`/bot/${t}/build/${("usersays"===n?"dialogue":n).replace("_","-")}/${r}`};var te=function(e){let{children:t,url:n}=e;return n?i.a.createElement($,{target:"_blank",rel:"noopener noreferrer",href:n},t):t};var ne=function(e){let{botId:t,exchangeType:n,exchangeId:r,children:o}=e;const a=ee({botId:t,exchangeType:n,exchangeId:r});return i.a.createElement(te,{url:a},i.a.createElement(D,null,o))};const re=(e,t)=>`${(e||"").slice(0,t)}${(null==e?void 0:e.length)>t?"...":""}`;var oe=function(e){let{fromBot:t,fromWebhook:n,handler:r,score:o,title:a,message:s,exchangeType:c,exchangeId:l,botId:u,isFollowup:d,sender:f}=e;return i.a.createElement(M,null,i.a.createElement(P.c,null,"Message info"),t&&i.a.createElement(D,{spaceBetween:!0},a&&i.a.createElement(ne,{botId:u,exchangeType:c,exchangeId:l},i.a.createElement(F,null),i.a.createElement("span",null,re(a,40))),!a&&i.a.createElement("span",null,re(s,40)),i.a.createElement(D,null,i.a.createElement(Z,{handler:r,score:o,exchangeType:c,exchangeId:l,sender:f,fromWebhook:n}),d&&i.a.createElement(Z,{exchangeType:"followup"}))),!t&&i.a.createElement(D,{spaceBetween:!0},re(s,40),i.a.createElement(Z,{label:"user"})))};var ae=function(e){let{patternContextMatch:t}=e;const[n,r]=Object.entries(t)[0];return i.a.createElement(M,null,i.a.createElement(P.c,null,"Slot / Pattern context"),i.a.createElement(D,null,i.a.createElement(B,null,n),i.a.createElement("span",null,r)))};n(122);var ie=function(e){let{replyCandidates:t,botId:n}=e;const r=Object(a.useMemo)(()=>t.filter(e=>{let{selected:t,samle:n,title:r}=e;return!t&&(n||r)}),[t]);return 0===(null==r?void 0:r.length)?null:i.a.createElement(M,null,i.a.createElement(P.c,null,"Potential dialogues"),r.map(e=>{let{_id:t,score:r,sample:o,title:a,dialogue_id:s}=e;return i.a.createElement(te,{key:`reply-candidate-${t}`,url:ee({botId:n,exchangeType:"usersays",exchangeId:s})},i.a.createElement(D,null,i.a.createElement(Z,{handler:y.f.SAMPLE_MATCH,score:r}),i.a.createElement(F,null),i.a.createElement("span",null,o||a)))}))};var se=function(e){let{correctedMessage:t,message:n}=e;return i.a.createElement(M,null,i.a.createElement(P.c,null,"Spelling correction / Greeting removed"),i.a.createElement(D,null,i.a.createElement(z,null,n),i.a.createElement(U,null,"→"),i.a.createElement("span",null,t)))};var ce=function(e){let{chatMessage:{message:t,score:n,title:r,handler:o,sender:a,from_bot:c,bot_id:l,from_webhook:u,reply_candidates:d,exchange_type:f,exchange_id:p,is_followup:h,corrected_message:m,pattern_context_match:g}}=e;const{admin:b}=Object(s.d)(w.e),v=Object.keys(g||{}).length>0,y=b&&m&&m!==t;return i.a.createElement(i.a.Fragment,null,i.a.createElement(oe,{handler:o,fromBot:c,fromWebhook:u,score:n,title:r,message:t,exchangeType:f,exchangeId:p,botId:l,isFollowup:h,sender:a}),i.a.createElement(L,null),v&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ae,{patternContextMatch:g}),i.a.createElement(L,null)),y&&i.a.createElement(i.a.Fragment,null,i.a.createElement(se,{correctedMessage:m,message:t}),i.a.createElement(L,null)),(null==d?void 0:d.length)>1&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ie,{replyCandidates:d,botId:l}),i.a.createElement(L,null)))};function le(e){const t=Object(a.useRef)();return Object(a.useEffect)(()=>{t.current=e},[e]),t.current}var ue=n(8);var de=function(){const{active:e,chatHasStarted:t}=Object(s.d)(w.e),{currentMessage:n,nextMessage:r,prevMessage:o,isFirstMessage:c,isLastMessage:l}=(()=>{var e,t;const n=Object(s.c)(),{chatMessages:r}=Object(s.d)(w.n),{currentMessageId:o}=Object(s.d)(w.j),i=o||(null===(e=r.slice(-1)[0])||void 0===e?void 0:e.id),c=r.findIndex(e=>{let{id:t}=e;return t===i}),l=Object(a.useCallback)(()=>{n(Object(ue.T)(r[c+1].id))},[r,c,n]),u=Object(a.useCallback)(()=>{n(Object(ue.T)(r[c-1].id))},[r,c,n]),d=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,f=le(d),p=0===c,h=c===d-1;return Object(a.useEffect)(()=>{d>f&&n(Object(ue.T)())},[n,d,f]),{currentMessage:r[c],nextMessage:l,prevMessage:u,isFirstMessage:p,isLastMessage:h}})();return i.a.createElement(N,{chatHasStarted:t,active:e,"aria-hidden":e?"false":"true","data-testid":"chat-box-inspector","data-cy":"chat-box-inspector",fullscreen:0,offsetHeight:"205px",inspectorContainer:!0},n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ce,{chatMessage:n}),i.a.createElement(D,{spaceBetween:!0},i.a.createElement(R,{disabled:c,onClick:o},"Show previous"),i.a.createElement(R,{disabled:l,onClick:r},"Show next"))),!n&&i.a.createElement(q,null))},fe=n(12);const pe=c.c.div.withConfig({displayName:"styles__AnnouncementContainer",componentId:"sc-xw79eu-0"})(["border-radius:0;box-shadow:1px 2px 5px 2px ",";line-height:23px;background:",";background-color:",";font-size:",";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:15px;margin-right:7px;}"],u.a.shadowColor,u.a.warningColor,u.a.warningColor,u.d.fontSizeP,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"}),he=c.c.div.withConfig({displayName:"styles__AnnouncementText",componentId:"sc-xw79eu-1"})(["margin:5px 0;display:flex;color:#2c2c2c;font-size:inherit;font-weight:inherit;line-height:24px;"]),me=Object(c.c)(fe.d).withConfig({displayName:"styles__AnnouncementLink",componentId:"sc-xw79eu-2"})(["color:#0063a2;"]);var ge=function(){const{text:e,url:t,show:n}=Object(s.d)(w.c);return n?i.a.createElement(pe,{show:n},i.a.createElement(he,null,i.a.createElement("span",null,"!"),e),t&&i.a.createElement(me,{target:"_blank"},"url")):null},be=n(20),ve=n(14);function ye(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e);return t.setHours(0,0,0,0),t}function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xe(e){return Object(ve.a)(1,arguments),e instanceof Date||"object"===we(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Ee(e){if(Object(ve.a)(1,arguments),!xe(e)&&"number"!=typeof e)return!1;var t=Object(be.a)(e);return!isNaN(Number(t))}var Oe=n(101),ke=n(28);function _e(e,t){Object(ve.a)(2,arguments);var n=Object(ke.a)(t);return Object(Oe.a)(e,-n)}function Ce(e){Object(ve.a)(1,arguments);var t=1,n=Object(be.a)(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function je(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Ce(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var i=Ce(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Te(e){Object(ve.a)(1,arguments);var t=je(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Ce(n);return r}var Se={};function Ie(){return Se}function Ae(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Ie(),d=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Object(be.a)(e),p=f.getUTCDay(),h=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-h),f.setUTCHours(0,0,0,0),f}function Ne(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Object(be.a)(e),d=u.getUTCFullYear(),f=Ie(),p=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(c=f.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=Ae(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var b=Ae(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=b.getTime()?d:d-1}function Pe(e,t){var n,r,o,a,i,s,c,l;Object(ve.a)(1,arguments);var u=Ie(),d=Object(ke.a)(null!==(n=null!==(r=null!==(o=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1),f=Ne(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var h=Ae(p,t);return h}function Me(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var Le={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Me("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Me(n+1,2)},d:function(e,t){return Me(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Me(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Me(e.getUTCHours(),t.length)},m:function(e,t){return Me(e.getUTCMinutes(),t.length)},s:function(e,t){return Me(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Me(Math.floor(r*Math.pow(10,n-3)),t.length)}},Re="midnight",De="noon",Be="morning",Fe="afternoon",ze="evening",Ue="night";function He(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(0===a)return n+String(o);var i=t||"";return n+String(o)+i+Me(a,2)}function $e(e,t){return e%60==0?(e>0?"-":"+")+Me(Math.abs(e)/60,2):Ve(e,t)}function Ve(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Me(Math.floor(o/60),2)+n+Me(o%60,2)}var qe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Le.y(e,t)},Y:function(e,t,n,r){var o=Ne(e,r),a=o>0?o:1-o;return"YY"===t?Me(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Me(a,t.length)},R:function(e,t){return Me(je(e),t.length)},u:function(e,t){return Me(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Me(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Me(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Le.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Me(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){Object(ve.a)(1,arguments);var n=Object(be.a)(e),r=Ae(n,t).getTime()-Pe(n,t).getTime();return Math.round(r/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Me(o,t.length)},I:function(e,t,n){var r=function(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=Ce(t).getTime()-Te(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Me(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Le.d(e,t)},D:function(e,t,n){var r=function(e){Object(ve.a)(1,arguments);var t=Object(be.a)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Me(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Me(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Me(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Me(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?De:0===o?Re:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?ze:o>=12?Fe:o>=4?Be:Ue,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Le.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Le.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Le.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Le.s(e,t)},S:function(e,t){return Le.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return $e(o);case"XXXX":case"XX":return Ve(o);case"XXXXX":case"XXX":default:return Ve(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return $e(o);case"xxxx":case"xx":return Ve(o);case"xxxxx":case"xxx":default:return Ve(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+He(o,":");case"OOOO":default:return"GMT"+Ve(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+He(o,":");case"zzzz":default:return"GMT"+Ve(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return Me(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return Me((r._originalDate||e).getTime(),t.length)}},Ge=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},We=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ye={p:We,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],a=r[2];if(!a)return Ge(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Ge(o,t)).replace("{{time}}",We(a,t))}};function Ke(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Xe=["D","DD"],Je=["YY","YYYY"];function Qe(e){return-1!==Xe.indexOf(e)}function Ze(e){return-1!==Je.indexOf(e)}function et(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var tt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},nt=function(e,t,n){var r,o=tt[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function rt(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var ot={date:rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:rt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},at={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function it(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var i=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function st(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var i,s=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?lt(c,(function(e){return e.test(s)})):ct(c,(function(e){return e.test(s)}));i=e.valueCallback?e.valueCallback(l):l,i=n.valueCallback?n.valueCallback(i):i;var u=t.slice(s.length);return{value:i,rest:u}}}function ct(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function lt(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var ut,dt={code:"en-US",formatDistance:nt,formatLong:ot,formatRelative:function(e,t,n,r){return at[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:it({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:it({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:it({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:it({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:it({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ut={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(ut.matchPattern);if(!n)return null;var r=n[0],o=e.match(ut.parsePattern);if(!o)return null;var a=ut.valueCallback?ut.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;var i=e.slice(r.length);return{value:a,rest:i}}),era:st({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:st({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:st({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:st({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:st({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},ft=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ht=/^'([^]*?)'?$/,mt=/''/g,gt=/[a-zA-Z]/;function bt(e,t,n){var r,o,a,i,s,c,l,u,d,f,p,h,m,g,b,v,y,w;Object(ve.a)(2,arguments);var x=String(t),E=Ie(),O=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:E.locale)&&void 0!==r?r:dt,k=Object(ke.a)(null!==(a=null!==(i=null!==(s=null!==(c=null==n?void 0:n.firstWeekContainsDate)&&void 0!==c?c:null==n||null===(l=n.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==i?i:null===(d=E.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==a?a:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=Object(ke.a)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(b=n.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:E.weekStartsOn)&&void 0!==h?h:null===(y=E.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var C=Object(be.a)(e);if(!Ee(C))throw new RangeError("Invalid time value");var j=Ke(C),T=_e(C,j),S={firstWeekContainsDate:k,weekStartsOn:_,locale:O,_originalDate:C},I=x.match(pt).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Ye[t])(e,O.formatLong):e})).join("").match(ft).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return vt(r);var a=qe[o];if(a)return null!=n&&n.useAdditionalWeekYearTokens||!Ze(r)||et(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!Qe(r)||et(r,t,String(e)),a(T,r,O.localize,S);if(o.match(gt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return I}function vt(e){var t=e.match(ht);return t?t[1].replace(mt,"'"):e}var yt=n(59);function wt(e){const t=Object(yt.a)(e);return function(e,t){Object(ve.a)(2,arguments);var n=ye(e),r=ye(t);return n.getTime()===r.getTime()}(t,new Date)?bt(t,"HH:mm"):bt(t,"dd LLL")}const xt=Object(c.d)(["0%{opacity:0;transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Et=Object(c.b)(["",";animation-name:",";"],Object(x.a)(300,150),xt),Ot=Object(c.b)(["flex-direction:row-reverse;"]),kt=Object(c.b)(["flex-direction:row;"]),_t=Object(c.b)(["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;}"]),Ct=c.c.div.withConfig({displayName:"styles__GroupContainer",componentId:"sc-1re4sol-0"})(["display:flex;flex:none;margin-bottom:10px;margin-top:10px;",";",";"],e=>e.fromBot?kt:Ot,e=>{let{inspected:t}=e;return t&&_t}),jt=c.c.span.withConfig({displayName:"styles__MessageHeader",componentId:"sc-1re4sol-1"})(["display:flex;align-items:baseline;flex-wrap:nowrap;justify-content:flex-start;opacity:0;",";",";",";"],Et,e=>!e.fromBot&&"justify-content: flex-end; width: 100%;",e=>e.fromAgent&&"padding-left: 25px"),Tt=Object(c.c)(P.f).withConfig({displayName:"styles__MessageDate",componentId:"sc-1re4sol-2"})(["opacity:1;margin-bottom:0;color:",";",";"],e=>{let{theme:t}=e;return t.chatLogElements},e=>e.fromBot?"padding-left: 6px":"padding-right: 6px"),St=c.c.div.withConfig({displayName:"styles__MessageGroup",componentId:"sc-1re4sol-3"})(["display:block;width:100%;"]);var It=function(e){let{fromAgent:t,fromBot:n,created:r,children:o,inspected:a,setGroupRef:s}=e;return i.a.createElement(Ct,{fromBot:n,inspected:a,ref:s},i.a.createElement(St,null,i.a.createElement(jt,{fromAgent:t,fromBot:n},i.a.createElement(Tt,{fromBot:n},wt(r))),o))};var At=function(e){let{title:t,...n}=e;return i.a.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"24",viewBox:"0 0 20 24"}),i.a.createElement("title",null,t||"File attachment"),i.a.createElement("path",{d:"M19.429 13.272L13.503 19.2c-1.554 1.556-3.821 2.164-5.945 1.595s-3.784-2.227-4.354-4.351.037-4.391 1.591-5.946l6.448-6.444c1.427-1.358 3.668-1.358 5.094 0a3.6 3.6 0 0 1 0 5.094l-5.926 5.924a1.05 1.05 0 0 1-1.486 0c-.407-.412-.407-1.074 0-1.486L13.303 9.2a1.5 1.5 0 0 0-.651-2.551 1.5 1.5 0 0 0-1.469.431l-4.388 4.386c-1.583 1.585-1.583 4.153.002 5.736s4.153 1.583 5.736-.002l5.924-5.93A6.6 6.6 0 0 0 15.498.225a6.6 6.6 0 0 0-6.377 1.709l-6.44 6.442C-.893 11.95-.894 17.744 2.68 21.319s9.369 3.575 12.943.001l5.926-5.92a1.5 1.5 0 0 0-2.12-2.12v-.008z",fill:"#7b7b7b"}))};var Nt=function(e){return i.a.createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Unsuccessful image upload"),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("g",{transform:"translate(-1128 -635)",fill:"#7B7B7B",fillRule:"nonzero"},i.a.createElement("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"}))))};var Pt=function(e){return i.a.createElement("svg",Object.assign({},e,{version:"1.1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Loading image upload"),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("g",{transform:"translate(-685 -659)",fill:"#7B7B7B",fillRule:"nonzero"},i.a.createElement("g",{transform:"translate(685 659)"},i.a.createElement("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"}),i.a.createElement("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"}),i.a.createElement("circle",{cx:"7.5",cy:"7.5",r:"1.5"})))))};var Mt=()=>{const[e,t]=Object(a.useState)(null),[n,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{if(!e)return;const t=[],n=e.getElementsByTagName("img")||[],o=[...n].map(e=>e.complete&&e.naturalWidth?null:new Promise(n=>{t.push(n),e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0})}));return o.length>0&&Promise.all(o).then(()=>{r(!0)}),()=>{[...n].forEach((e,n)=>{e.removeEventListener("load",t[n]),e.removeEventListener("error",t[n])})}},[e]),[t,n]};const Lt=Object(c.d)(["from{background-position:0%;}to{background-position:-200%;}"]),Rt=c.c.div.withConfig({displayName:"styles__LoadingWrapper",componentId:"sc-10p36bl-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",Lt,e=>{let{opacity:t}=e;return t});var Dt=function(e){let{loading:t,children:n,opacity:r=.6}=e;const[o,s]=Object(a.useState)(!t);return Object(a.useEffect)(()=>{o||t||setTimeout(()=>s(!0),300)},[o,t]),o?null:i.a.createElement(Rt,{finished:!t,hideTransitionLength:.3,opacity:r},i.a.createElement("div",null),i.a.createElement("div",null),i.a.createElement("div",null,n))};const Bt=Object(c.d)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Ft=Object(c.b)(["",";animation-name:",";"],Object(x.a)(600),Bt),zt=Object(c.d)(["10%{transform:translateY(-5px);}50%{opacity:0.5;transform:translateY(0);}"]),Ut=c.c.div.withConfig({displayName:"styles__TypingIndicatorContainer",componentId:"sc-1lynepx-0"})(["background:none;will-change:transform;width:auto;padding:0px;display:table;margin:8px 0px;position:relative;",""],Ft),Ht=c.c.div.withConfig({displayName:"styles__IndicatorContainer",componentId:"sc-1lynepx-1"})(["border-radius:15px;position:relative;display:inline-flex;flex-direction:row;border:0;padding:11px 9px;background:",";background-color:",";"],e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground,e=>"image"===e.loadingType?"transparent":e.theme.botMessageBackground),$t=c.c.span.withConfig({displayName:"styles__Indicator",componentId:"sc-1lynepx-2"})(["height:5px;width:5px;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=>"image"===e.loadingType?"#fff":e.theme.botMessageText,e=>"image"===e.loadingType?"#fff":e.theme.botMessageText,zt,zt,zt);var Vt=function(e){let{loadingType:t}=e;return i.a.createElement(Ut,{"data-cy":"typing-indicator"},i.a.createElement(Ht,{loadingType:t},i.a.createElement($t,{loadingType:t}),i.a.createElement($t,{loadingType:t}),i.a.createElement($t,{loadingType:t})))};function qt(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 Gt=()=>`\n /* If browser support backdrop-filter */\n ${qt("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`,Wt=()=>`\n position: absolute;\n pointer-events: none;\n \n path {\n stroke: #000;\n }\n\n ${qt("chrome")&&"\n path {\n mix-blend-mode: difference;\n stroke: white;\n }\n "}\n\n `,Yt=c.c.div.withConfig({displayName:"styles__PlaceholderContainer",componentId:"sc-12zmiuw-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:14px;"],e=>{let{hasCaption:t}=e;return t?"6px 6px 0 0":"6px"},e=>`height: ${e.imageHeight}px;`),Kt=c.c.div.withConfig({displayName:"styles__CarouselContainer",componentId:"sc-12zmiuw-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 "),Xt=c.c.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-12zmiuw-2"})(["position:relative;display:flex;flex-direction:column;width:","px;height:auto;margin-right:5px;margin-top:2px;margin-bottom:2px;",";",";",";"],e=>e.imageWidth,e=>{let{fromBot:t}=e;return t?"justify-content: flex-start":"justify-content: flex-end"},e=>{let{first:t,isCarousel:n}=e;return t||!n?"margin-left: 25px":""},e=>e.imageHasText&&`\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n border-radius: 6px;\n overflow: hidden;\n margin-bottom: 6px;\n color: ${u.h.textColor};\n `),Jt=Object(c.b)(["position:relative;display:",";min-height:100px;"," ",";border-radius:6px;"],e=>e.hidden?"none":"block",e=>e.carousel?`height: ${e.imageHeight}px;`:"height: auto;",e=>!e.imageHasText&&"\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06), inset 0px 0px 1px rgba(0, 0, 0, 0.32);\n "),Qt=c.c.a.withConfig({displayName:"styles__ImageContainerLink",componentId:"sc-12zmiuw-3"})(["",""],Jt),Zt=c.c.div.withConfig({displayName:"styles__ImageContainerNoLink",componentId:"sc-12zmiuw-4"})(["",""],Jt),en=c.c.img.withConfig({displayName:"styles__Image",componentId:"sc-12zmiuw-5"})(["max-width:100%;position:relative;width:auto;max-height:350px;min-height:100px;transition:border-width 0.15s ease;border-radius:6px;display:block;z-index:-1;"," "," ",""],e=>e.imageHasText?"border-radius: 0;":"",e=>e.carousel&&`height: ${e.imageHeight}px; object-fit: cover; width: ${e.imageWidth}px;`,m.a),tn=c.c.div.withConfig({displayName:"styles__ImageCaptions",componentId:"sc-12zmiuw-6"})(["background:#fff;z-index:-1;> *:last-child{margin-bottom:8px;}"]),nn=c.c.h3.withConfig({displayName:"styles__ImageTitle",componentId:"sc-12zmiuw-7"})(["font-weight:500;margin:6px 8px 0px 8px;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#232f41;"]),rn=c.c.div.withConfig({displayName:"styles__ImageDescription",componentId:"sc-12zmiuw-8"})(["margin:0;margin:2px 8px 8px 8px;font-size:12px;line-height:16px;color:#6a778a;white-space:pre-line;"]),on=c.c.button.withConfig({displayName:"styles__CarouselButton",componentId:"sc-12zmiuw-9"})(["position:absolute;top:calc(50% - 18px);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;}"," "," ",";",""],m.a,e=>{let{next:t}=e;return t?"right: 10px;":"left: 10px;"},e=>{let{disabled:t}=e;return t&&"display: none"},Gt),an=Object(c.c)(h.a).withConfig({displayName:"styles__SvgArrowLeftIcon",componentId:"sc-12zmiuw-10"})(["top:calc(50% - 13px);left:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Wt),sn=Object(c.c)(h.b).withConfig({displayName:"styles__SvgArrowRightIcon",componentId:"sc-12zmiuw-11"})(["top:calc(50% - 13px);right:15px;",";",""],e=>{let{disabled:t}=e;return t&&"display: none"},Wt),cn=c.c.div.withConfig({displayName:"styles__ImageLinkButton",componentId:"sc-12zmiuw-12"})(["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;",""],u.e.wrapper,u.e.wrapper,Gt),ln=Object(c.c)(h.m).withConfig({displayName:"styles__SvgLinkIcon",componentId:"sc-12zmiuw-13"})(["bottom:",";left:",";",""],u.e.icon,u.e.icon,Wt),un=c.c.button.withConfig({displayName:"styles__LightBoxButton",componentId:"sc-12zmiuw-14"})(["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",u.e.wrapper,u.e.wrapper,m.a,Gt),dn=Object(c.c)(h.h).withConfig({displayName:"styles__SvgEnlargeIcon",componentId:"sc-12zmiuw-15"})(["top:",";right:",";",""],u.e.icon,u.e.icon,Wt);var fn=function(e){let{imageWidth:t,imageHeight:n,hasCaption:r}=e;return i.a.createElement(Yt,{title:"Loading image...",imageWidth:t,imageHeight:n,hasCaption:r},i.a.createElement(Vt,{loadingType:"image"}),i.a.createElement("div",null,"Loading image"))};var pn=function(e){let{image:t,first:n,isCarousel:r,fromBot:o,shouldAnimate:c,shouldAutoScroll:l,scrollToLatestMessage:u,scrollToBottom:d,inView:f,imageWidth:p,imageHeight:h,loading:m}=e;const[g,b]=Mt(),v=Object(s.c)();Object(a.useEffect)(()=>{b&&l&&(!o&&d?d():u())},[o,b,l,d,u]);const y=Object(a.useCallback)(e=>{v(Object(ue.G)(e))},[v]),w=Boolean(t.title||t.description),x=null!=t&&t.newTab?"_blank":"_self",E=t.description&&t.description.length>100?t.description.slice(0,100).concat("..."):t.description,O=t.linkUrl?Qt:Zt;return i.a.createElement(Xt,{imageHasText:w,first:n,ref:g,imageWidth:p,imageHeight:h,isCarousel:r,fromBot:o},i.a.createElement(Dt,{loading:m},"Uploading"),i.a.createElement(O,{imageWidth:p,imageHeight:h,hidden:!b,href:t.linkUrl,target:t.linkUrl?x:void 0,imageHasText:w},i.a.createElement(en,{src:t.imageUrl,alt:t.altText,tabIndex:""!==t.linkUrl?"0":"-1",carousel:r,fromBot:o,shouldAnimate:c,imageHasText:w,imageWidth:p,imageHeight:h}),t.linkUrl&&i.a.createElement(cn,null),t.linkUrl&&i.a.createElement(ln,{width:16,height:16})),!m&&i.a.createElement(un,{"aria-label":"Enlarge image",onClick:()=>y(t.imageUrl),inView:f}),!m&&i.a.createElement(dn,null),!b&&i.a.createElement(fn,{alt:t.altText,imageWidth:p,imageHeight:h,hasCaption:w}),i.a.createElement(tn,null,t.title&&i.a.createElement(nn,{imageWidth:p,imageHeight:h},t.title),E&&i.a.createElement(rn,{imageWidth:p,imageHeight:h},E)))},hn=(o.a.shape({id:o.a.string,temporaryId:o.a.string,url:o.a.string,type:o.a.string.isRequired,name:o.a.string.isRequired,file:o.a.object,sizeKb:o.a.number.isRequired,storagePath:o.a.string,status:o.a.oneOf(Object.values(y.a)),sender:o.a.oneOf(Object.values(y.l))}),function(){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])===y.e.IMAGE?y.e.IMAGE:(null==t?void 0:t[1])===y.e.PDF?y.e.PDF:t.slice(-1)[0]});const mn=e=>{let{fromUser:t,hasError:n,theme:r}=e;return n?u.a.grayColor:t?r.userMessageBackground:r.botMessageBackground},gn=c.c.div.withConfig({displayName:"styles__FileAttachment",componentId:"sc-ftn7kp-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:14px;background:",";background-color:",";transition:all 0.2s ease;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.2 ease-out;}}& > svg:not(:first-child){width:20px;}"],e=>{let{hasError:t}=e;return t?"7px 12px 4px":"8px 12px"},l.a.default,mn,mn,e=>{let{fromUser:t,theme:n}=e;return t?n.userMessageText:n.botMessageText},e=>{let{$loading:t}=e;return t?.5:1}),bn=c.c.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-ftn7kp-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),vn=c.c.div.withConfig({displayName:"styles__IconBackground",componentId:"sc-ftn7kp-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;}"],u.a.grayColor),yn=c.c.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-ftn7kp-3"})(["display:flex;justify-content:",";"],e=>{let{fromUser:t}=e;return t?"flex-end":"flex-start"});var wn=function(e){let{avatar:t}=e;const n=Object(a.useMemo)(()=>t?{backgroundImage:`url(${t})`}:{},[t]);return t?i.a.createElement(bn,{style:n}):null};var xn=function(e){let{attachment:t,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,avatar:c,chatMessageStatus:l}=e;const u=t.sender===y.l.USER,d=hn(t)===y.e.IMAGE,f=l||Object(G.a)(t.status,[y.a.ERROR,y.a.INFECTED]),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{token:n}=Object(s.d)(w.f),{PAT_HOST:r}=Object(s.d)(w.g);return e.storagePath&&e.status===y.a.CLEAN?`${r}/chatbubble/${y.j}/attachment/${e.storagePath}?token=${n}`:t||e.sender!==y.l.USER?e.url:void 0}(t,d),h=!p;Object(a.useEffect)(()=>{n&&(u?o():r())},[u,n,o,r]);const m=Object(a.useMemo)(()=>{var e;return{imageUrl:p,altText:`Image ${t.name||`from ${null!==(e=null==t?void 0:t.sender)&&void 0!==e?e:"agent"}`}`}},[t,p]);return d?i.a.createElement(yn,{fromUser:u},i.a.createElement(wn,{avatar:c}),!f&&!h&&i.a.createElement(pn,{image:m,fromBot:!u,isCarousel:!1,shouldAnimate:!0,shouldAutoScroll:n,scrollToLatestMessage:r,scrollToBottom:o,imageWidth:"250",inView:!0,first:!1,loading:t.status===y.a.PROCESSING}),!f&&h&&i.a.createElement(vn,{isImage:d},i.a.createElement(Pt,null),i.a.createElement(Dt,{loading:!0})),f&&i.a.createElement(vn,null,i.a.createElement(Nt,null))):i.a.createElement(yn,{fromUser:u},i.a.createElement(wn,{avatar:c}),i.a.createElement(gn,{fromUser:u,$loading:h,hasError:f},i.a.createElement(At,{height:10}),i.a.createElement(Dt,{loading:!f&&h,opacity:.35}),!f&&!h&&i.a.createElement("a",{src:p,alt:t.name,href:p,target:"_blank",rel:"noreferrer"},t.name),!f&&h&&i.a.createElement("span",null,"Uploading"),f&&i.a.createElement(Nt,null)))},En=n(74),On=n(47),kn=n(105);function _n(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i.a.createElement(On.a.div,{transition:{ease:"easeInOut",duration:.3},animate:{x:n.get()},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}function Cn(e){let{chatMessage:t,imageCarousel:n,shouldAutoScroll:r,scrollToLatestMessage:o,shouldAnimate:s}=e;const[c,l]=Object(a.useState)(0),u=Object(On.b)(0),d=y.h[t.image_carousel_size||1e3],[f,p]=Object(a.useState)(d);Object(a.useEffect)(()=>{let e=!0;if(n.length>0){const t=new Image;t.src=n[0].imageUrl,t.onload=()=>{const n=t.width/d,r=t.height/n;e&&p(r.toString())}}return()=>{e=!1}},[n,p,d]);const h=Object(a.useMemo)(()=>d===y.h[800]?102:d===y.h[600]?96:30,[d]),m=e=>d===y.h[600]&&c===e-1||c===e,g=Object(a.useCallback)((e,t)=>{if(e<0||e>=t.length)return;let n=0;n=e>=t.length-1?-(e*d-h):-(e*d+5*e),l(e),u.set(n)},[d,h,u]),{handleTouchStart:b,handleTouchMove:v,handleTouchEnd:w}=Object(kn.a)({carousel:n,index:c,setIndex:g});return i.a.createElement(Kt,{active:n.length>1},i.a.createElement(_n,{carouselPosition:u,onTouchStart:b,onTouchMove:v,onTouchEnd:w},n.map((e,a)=>i.a.createElement(pn,{key:e.id||a,first:0===a,image:e,fromBot:t.from_bot,isCarousel:n.length>1,shouldAnimate:s,shouldAutoScroll:r,scrollToLatestMessage:o,scrollToBottom:!1,inView:m(a),imageWidth:d,imageHeight:f}))),i.a.createElement(on,{previous:!0,disabled:c<=0,"aria-label":"Go to previous image",onClick:()=>g(c-1,n)}),i.a.createElement(an,{disabled:c<=0,width:24,height:24}),i.a.createElement(on,{next:!0,disabled:c>=n.length-1,"aria-label":"Go to next image",onClick:()=>g(c+1,n)}),i.a.createElement(sn,{disabled:c>=n.length-1,width:12,height:22}))}Cn.defaultProps={};var jn=Cn;const Tn=c.c.button.withConfig({displayName:"styles__EditButton",componentId:"sc-mhy5c2-0"})(["display:block;background:none;background-color:none;border:none;text-decoration:underline;font-weight:600;font-size:",";color:",";cursor:pointer;padding:0;",""],u.d.fontSizeP,e=>e.theme.userMessageText,m.a);var Sn=function(e){let{button:t}=e;const n=Object(s.c)(),r=Object(a.useCallback)(()=>n(Object(ue.lb)(t)),[t,n]);return i.a.createElement(Tn,{onClick:r},t.contact_details.edit_text)},In=n(170),An=n.n(In);const Nn=["form","input"],Pn=["target"],Mn=["action"];var Ln=e=>An.a.sanitize(e,{ADD_ATTR:Pn,FORBID_ATTR:Mn,FORBID_TAGS:Nn,USE_PROFILES:{svg:!1,svgFilters:!1,mathMl:!1,html:!0}});var Rn=function(e){return i.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ln(e)}})};const Dn=Object(c.d)(["0%{opacity:0;transform:translateY(6px);}60%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Bn=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),Dn),Fn=c.c.div.withConfig({displayName:"styles__MessageBlock",componentId:"sc-zovgvh-0"})(["display:block;width:100%;"]),zn=(c.c.div.withConfig({displayName:"styles__MessageLines",componentId:"sc-zovgvh-1"})([""]),c.c.div.withConfig({displayName:"styles__MessageContent",componentId:"sc-zovgvh-2"})(["display:flex;flex-direction:column;",";",";"," ",""],Bn,e=>!e.fromBot&&"display: block;",e=>e.hasParentSiblings&&"margin-top: 8px;",e=>e.hasSiblings&&"margin-bottom: 8px;")),Un=c.c.div.withConfig({displayName:"styles__MessageLineContainer",componentId:"sc-zovgvh-3"})(["display:flex;flex-direction:column;",";",""],e=>{let{fromBot:t}=e;return t?"align-items: flex-start":"align-items: flex-end"},e=>e.hasSiblings&&"margin-bottom: 8px;"),Hn=Object(c.b)(["display:grid;grid-template-columns:auto auto;justify-content:flex-start;grid-gap:6px;position:relative;top:-30px;margin-bottom:-20px;margin-left:15px;"]),$n=c.c.div.withConfig({displayName:"styles__ButtonWrapper",componentId:"sc-zovgvh-4"})(["max-width:80%;display:flex;flex-direction:column;",";"," & > button,& > a{margin-bottom:6px;}"],Bn,e=>e.hasSuggestion&&Hn),Vn=Object(c.b)(["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=>e.theme.userMessageText,e=>e.theme.userMessageBackground,Fn,Fn,Fn,Fn),qn=Object(c.b)(["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=>e.theme.botMessageText,e=>e.theme.botMessageBackground),Gn=Object(c.b)(["margin-left:25px;white-space:pre-wrap;"]),Wn=Object(c.b)([":last-child{padding-bottom:34px;}"]),Yn=Object(c.b)(["position:relative;display:inline-block;max-width:80%;padding:10px 15px;margin:1px 0px;border:0;border-radius:16px;font-size:14px;line-height:18px;word-break:break-word;"," ",";",";",";"," p{margin:0;}"],e=>e.clickable&&"cursor: pointer;",e=>e.fromBot?qn:Vn,e=>e.fromAgent&&Gn,e=>e.hasSuggestion&&Wn,m.a),Kn=c.c.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-lv7lx6-0"})(["",""],Yn),Xn=c.c.a.withConfig({displayName:"styles__LinkMessageContainer",componentId:"sc-lv7lx6-1"})(["text-decoration:none;",""],Yn),Jn=c.c.div.withConfig({displayName:"styles__MessageAgent",componentId:"sc-lv7lx6-2"})(["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),Qn=[y.l.WEBHOOK,y.l.AGENT];function Zn(e){let{messageLine:t,children:n,chatMessage:r,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:c=!1,hasSuggestion:l=!1}=e;const{bot_id:u,exchange_id:d}=r,f=`/workspace/${u}/build/${("usersays"===r.exchange_type?"dialogue":r.exchange_type).replace("_","-")}/${d}`;return i.a.createElement(Xn,{fromBot:r.from_bot,hasSuggestion:l,fadeInLeft:o,fadeInRight:a,notLast:s,shouldAnimate:c,clickable:!0,role:"link",tabIndex:"0",href:f},n||Rn(t))}var er=function(e){let{messageLine:t,chatMessage:n,lineIndex:r,numLines:o,editContactDetailsButton:a,children:c,shouldAnimate:l=!1,hasSuggestion:u=!1}=e;const{inPlatform:d}=Object(s.d)(w.e),{isTextDirectionRtl:f}=Object(s.d)(w.d),p=f?"rtl":void 0,h=d&&n.from_bot&&n.exchange_type&&!Object(G.a)(n.sender,Qn),m=n.sender===y.l.AGENT,g=r!==o-1||n.sender!==y.l.AGENT&&n.image_carousel&&!n.thon_image_above_text,b=n.from_bot;return h?i.a.createElement(Zn,{chatMessage:n,notLast:g,shouldAnimate:l,messageLine:t,hasSuggestion:u},c):i.a.createElement(Kn,{dir:p,fromAgent:m,fromBot:b,hasSuggestion:u,notLast:g,shouldAnimate:l},m&&!g&&i.a.createElement(Jn,{style:{backgroundImage:`url(${n.avatar})`}}),c||(b?Rn(t):t),!g&&a&&i.a.createElement(Sn,{button:a}))};const tr=c.c.div.withConfig({displayName:"styles__StatusMessage",componentId:"sc-gltcat-0"})(["display:flex;white-space:nowrap;font-size:12px;color:red;justify-content:flex-end;margin-bottom:2px;"]),nr=c.c.div.withConfig({displayName:"styles__StatusMessageButtonWrapper",componentId:"sc-gltcat-1"})(["display:flex;"]),rr=c.c.button.withConfig({displayName:"styles__StatusMessageButton",componentId:"sc-gltcat-2"})(["display:block;white-space:nowrap;font-size:12px;color:",";text-decoration:underline;background:none;border:none;padding:0;margin-bottom:2px;margin-left:4px;cursor:pointer;",""],u.a.darkColor,m.a);var or=function(e){let{chatMessage:t,attachments:n}=e;const r=Object(s.c)(),o=Boolean(t.message),c=(null==n?void 0:n.length)>0,l=Object(a.useCallback)(()=>{o&&r(Object(ue.J)(t.message,t.id))},[t,r,o]),u=Object(a.useCallback)(()=>{o?r(Object(ue.K)(t.message,t.id)):c&&r(Object(ue.fb)())},[t,r,c,o]);return t.status>=500?i.a.createElement(tr,null,c?"Upload failed":"Message not delivered"," ",i.a.createElement(nr,null,!c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(rr,{onClick:l},"Try again"),i.a.createElement(rr,{onClick:u},"Restart chat")))):429===t.status?i.a.createElement(tr,null,"Too many messages, please slow down."," ",i.a.createElement(nr,null,i.a.createElement(rr,{onClick:l},"Try again"))):i.a.createElement(tr,null,"An error occurred. ",i.a.createElement(rr,{onClick:u},"Restart chat"))},ar=n(15),ir=n(27),sr=n(40);const cr=c.c.div.withConfig({displayName:"styles__AgentContainer",componentId:"sc-3baawv-0"})(["width:100%;margin:20px 0;",";"],x.d),lr=c.c.div.withConfig({displayName:"styles__AvatarContainer",componentId:"sc-3baawv-1"})(["display:flex;justify-content:center;align-items:center;"]),ur=c.c.span.withConfig({displayName:"styles__AvatarBorder",componentId:"sc-3baawv-2"})(["height:1px;width:100%;background:",";background-color:",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),dr=c.c.div.withConfig({displayName:"styles__AgentAvatar",componentId:"sc-3baawv-3"})(["width:29px;height:29px;min-width:29px;border-radius:100px;margin:0 15px;background:",";background-color:",";background-position:center center;background-repeat:no-repeat;background-size:cover;"],e=>e.theme.headerBackground,e=>e.theme.headerBackground),fr=c.c.p.withConfig({displayName:"styles__AgentName",componentId:"sc-3baawv-4"})(["font-size:",";margin:0;margin-top:5px;text-align:center;color:",";span{font-weight:500;}"],u.d.fontSizeSmall,e=>Object(sr.a)(e.theme.background,u.a.grayColor,u.a.darkColor));var pr=function(e){let{chatMessage:t}=e;const n=t.system_dialogue_message_type===y.p.END,{currentLanguage:r}=Object(s.d)(w.e),{text:o}=Object(s.d)(w.d),{defaultLanguage:c}=Object(ar.a)(),{names:l,avatars:u}=Object(s.d)(w.a),{agent_joined_text:d,agent_left_text:f}=Object(a.useMemo)(()=>Object(ir.a)(o,r,c),[r,c,o]),p=t.avatar||u[u.length-1],h=t.name||l[l.length-1];return i.a.createElement(cr,null,i.a.createElement(lr,null,i.a.createElement(ur,null),i.a.createElement(dr,{style:{backgroundImage:`url(${p})`}}),i.a.createElement(ur,null)),i.a.createElement(fr,null,i.a.createElement("span",null,h||"An agent")," ",n?f:d))};n(65);var hr=function(e){let{preface:t,message:n,chatMessage:r,numLines:o,buttonHandlers:a,buttons:s=[]}=e;return i.a.createElement(i.a.Fragment,null,i.a.createElement(Un,{fromBot:!0},i.a.createElement(er,{chatMessage:r,lineIndex:0,numLines:o,hasSuggestion:!0},i.a.createElement("strong",null,t),i.a.createElement("br",null),n)),i.a.createElement($n,{hasSuggestion:!0},s.map((e,t)=>i.a.createElement(En.a,{key:`suggestion-button-${r.id}-${t}`,button:e,chatMessage:r,type:"button",handlers:a,hasSuggestion:!0}))))};const mr="\n background: black;\n border-radius: 15px;\n",gr=c.c.iframe.withConfig({displayName:"styles__IframeEmbed",componentId:"sc-10j1ec7-0"})(["",""],mr),br=c.c.video.withConfig({displayName:"styles__HTML5Video",componentId:"sc-10j1ec7-1"})(["",""],mr);var vr=function(e){let{source:t}=e;const n=t.split(".").pop();return i.a.createElement(br,{width:"240",controls:!0,"data-chromatic":"ignore"},i.a.createElement("source",{src:t,type:`video/${n}`}),"Your browser does not support HTML5 video.")};var yr=function(e){let{source:t}=e;const n=t.match(/^(?:https?:\/\/)?(www\.)?vimeo.com\/(\d+)($|\/)/);return n?i.a.createElement(gr,{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 wr=e=>e.replace("?t=","?start=").replace("&t=","&start=");var xr=function(e){let{source:t}=e;const n=(e=>{const t=e.toLowerCase();let n=e;return Object(G.a)("youtube.com",t)?(n=e.replace("&","?"),n=wr(n),n.split("v=")[1]):Object(G.a)("youtu.be",t)?(n=wr(e),n.split("youtu.be/")[1]):n})(t);return i.a.createElement(gr,{width:"240",height:"auto",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-chromatic":"ignore",title:"YouTube video player"})};var Er=function(e){let{source:t}=e;return Object(G.a)("youtube.com",t)||Object(G.a)("youtu.be",t)?i.a.createElement(xr,{source:t}):Object(G.a)("vimeo.com",t)?i.a.createElement(yr,{source:t}):i.a.createElement(vr,{source:t})},Or=n(98);function kr(e){let{width:t,height:n,color:r}=e;return i.a.createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},i.a.createElement("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"}),i.a.createElement("path",{d:"M9.75 6h8.5M9.75 12h8.5M9.75 18h8.5",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}kr.defaultProps={width:24,height:24,color:"#333"};var _r=kr,Cr=n(21),jr=n(56),Tr=n(94);const Sr=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:a}}=o(),{PAT_HOST:i}=o().environment,{headers:s}=Object(ue.p)({token:a},{withCurrentUrl:!0}),c={submission_id:e,context:t,state:n};return r(Object(ue.pb)({method:"post",url:`${i}/chatbubble/${y.j}/form/submit`,data:c,headers:s}))}};var Ir=n(109),Ar=n(80),Nr=n(22);var Pr=n(48);const Mr=c.c.div.withConfig({displayName:"styles__FormStateViewWrapper",componentId:"sc-6n3m85-0"})(["display:flex;flex-direction:column;"]),Lr=c.c.div.withConfig({displayName:"styles__FormStateMessage",componentId:"sc-6n3m85-1"})(["font-size:",";font-weight:500;margin-top:16px;"],u.d.fontSizeP),Rr=c.c.div.withConfig({displayName:"styles__FormStateDataWrapper",componentId:"sc-6n3m85-2"})(["display:flex;flex-direction:column;"]),Dr=c.c.div.withConfig({displayName:"styles__FormStateDataField",componentId:"sc-6n3m85-3"})(["display:flex;flex-direction:column;margin-top:16px;"]),Br=c.c.div.withConfig({displayName:"styles__FormStateDataTitle",componentId:"sc-6n3m85-4"})(["font-size:",";"],u.d.fontSizeP),Fr=c.c.div.withConfig({displayName:"styles__FormStateDataValue",componentId:"sc-6n3m85-5"})(["font-weight:500;margin-top:4px;font-size:",";"],u.d.fontSizeP);function zr(e){let{state:t,message:n,data:r}=e;return i.a.createElement(Mr,null,t!==Nr.b.SUBMITTED&&n&&i.a.createElement(Lr,null,n),t===Nr.b.SUBMITTED&&r.length>0&&i.a.createElement(Rr,null,r.map(e=>{return e.value?i.a.createElement(Dr,{key:e.name},i.a.createElement(Br,null,e.label),i.a.createElement(Fr,null,Array.isArray(e.value)?(t=e.value).length>0?t.map(e=>i.a.createElement("div",{key:e.name},e.label)):null:e.value)):null;var t})))}zr.defaultProps={data:null,message:null};var Ur=zr;const Hr=i.a.lazy(()=>Promise.resolve().then(n.bind(null,246)));var $r=function(e){var t,n,r,o,c,l,u,d,f,p;let{formData:h,onSubmit:m,onCancel:g}=e;const b=Object(s.c)(),v=Object(s.d)(w.i),{current:y}=Object(a.useRef)((x=h.id,E=h.submission_id,`${x}_submission_${E}`));var x,E;const{currentLanguage:O}=Object(s.d)(w.e);return Object(a.useEffect)(()=>{var e,t,n;null==h||!h.id||null!=v&&v[y]?(null==v||null===(e=v[y])||void 0===e?void 0:e.formSubmitState)!==Nr.b.UNANSWERED||null!=v&&null!==(t=v[y])&&void 0!==t&&t.formCompleteMessage||!h.texts.unanswered_text||b(Object(ue.S)({...v[y],formCompleteMessage:h.texts.unanswered_text})):b(Object(ue.S)({formId:h.id,formSubmissionId:h.submission_id,formSubmitState:Nr.b.ACTIVE,formCompleteMessage:"",formKey:y,formValue:(null==v||null===(n=v[y])||void 0===n?void 0:n.formValue)||h.fields.reduce((e,t)=>({...e,[`${t.slug}`]:""}),{})}))},[b,h,O,v,y]),i.a.createElement(Ar.d,null,(null===(t=h.texts)||void 0===t?void 0:t.title)&&i.a.createElement(Ar.c,null,i.a.createElement(_r,{width:20,height:20})," ",null===(n=h.texts)||void 0===n?void 0:n.title),(null==v||null===(r=v[y])||void 0===r?void 0:r.formSubmitState)&&(null==v||null===(o=v[y])||void 0===o?void 0:o.formSubmitState)!==Nr.b.ACTIVE&&i.a.createElement(Ur,{state:v[y].formSubmitState,message:v[y].formCompleteMessage,data:(()=>{var e,t;if(null!=h&&h.fields&&(null==v||null===(e=v[y])||void 0===e?void 0:e.formSubmitState)===Nr.b.SUBMITTED&&null!=v&&null!==(t=v[y])&&void 0!==t&&t.formValue)return h.fields.reduce((e,t)=>{var n,r,o,a;return t.input_type===Nr.a.CHECKBOX&&t.list?[...e,{name:`checkbox_list_${t.slug}`,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:t.list.reduce((e,t)=>{var n,r;const o=null==v||null===(n=v[y])||void 0===n||null===(r=n.formValue)||void 0===r?void 0:r[t.slug];var a;return"boolean"==typeof o&&o||"string"==typeof o&&o.trim()?[...e||[],{name:t.slug,label:null===(a=t.texts)||void 0===a?void 0:a.label,value:o}]:e},null)}]:[...e,{name:t.slug,label:null===(n=t.texts)||void 0===n?void 0:n.label,value:null==v||null===(r=v[y])||void 0===r||null===(o=r.formValue)||void 0===o?void 0:o[t.slug]}]},[]).sort(e=>e.order)})()}),(null==v||null===(c=v[y])||void 0===c?void 0:c.formSubmitState)===Nr.b.ACTIVE&&i.a.createElement(a.Suspense,{fallback:i.a.createElement(Cr.a,null)},i.a.createElement(Hr,{onCancel:async e=>{var t;return g&&g(e),await b(Sr(h.submission_id,null==v?void 0:v[y].formValue,Nr.b.CANCELED)),await b(Object(ue.qb)(h.cancel_dialogue_id,{languageCode:O})),b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.CANCELED,formCompleteMessage:null===(t=h.texts)||void 0===t?void 0:t.cancel_text,formValue:e}))},defaultValues:null==v||null===(l=v[y])||void 0===l?void 0:l.formValue,onSubmit:async e=>{m&&m(e);const t={};var n;return Object.entries(e).filter(e=>{let[t,n]=e;return!!n}).forEach(e=>{let[n,r]=e;t[n]=r}),null===await b(Sr(h.submission_id,t))?b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.ERRORED,formCompleteMessage:null===(n=h.texts)||void 0===n?void 0:n.error_text,formValue:e})):(await b(Object(ue.qb)(h.submit_dialogue_id,{languageCode:O})),b(Object(ue.S)({formKey:y,formId:h.id,formSubmitState:Nr.b.SUBMITTED,formValue:e})))},ariaLabel:null===(u=h.texts)||void 0===u?void 0:u.title,sendButtonTitle:null===(d=h.texts)||void 0===d?void 0:d.submit_button_text,cancelButtonTitle:null===(f=h.texts)||void 0===f?void 0:f.cancel_button_text},null===(p=h.fields)||void 0===p?void 0:p.map(e=>{var t,n;return i.a.createElement(Ir.a,{key:`form_field_${y}_${e.order}`,helperText:null===(t=e.texts)||void 0===t?void 0:t.help_text,required:e.required,label:null===(n=e.texts)||void 0===n?void 0:n.label},(e=>{var t,n,r,o;if(e)switch(e.input_type){case"checkbox":return i.a.createElement(Tr.a,{name:`checkbox_list_${e.slug}`,list:e.list,formId:h.id,validators:Object(Pr.a)(e,O),currentLanguage:O});case"range":return i.a.createElement(jr.d,{controller:!0,value:parseFloat(null==v||null===(t=v[y])||void 0===t||null===(n=t.formValue)||void 0===n?void 0:n[e.slug])||e.step,name:e.slug,from:e.min,to:e.max,step:e.step,affix:e.affix,affixValue:null===(r=e.texts)||void 0===r?void 0:r.affix_value,validators:Object(Pr.a)(e,O),ariaLabel:null===(o=e.texts)||void 0===o?void 0:o.label});default:return i.a.createElement(jr.c,{placeholder:e.texts.placeholder_text,type:e.input_type,validators:Object(Pr.a)(e,O),name:e.slug})}return null})(e))}))))};const Vr=e=>e,qr=e=>{let{button_type:t}=e;return t===y.b.edit_contact_details?"editContactDetails":"regularButtons"};var Gr=function(e){var t,n,r,o;let{chatMessage:c,scrollToLatestMessage:l,scrollToBottom:u,shouldAutoScroll:d,buttonHandlers:f,messageCounter:p}=e;const h=Object(s.c)(),[m,g]=Object(a.useState)([]),{lastMessageSeen:b,attachments:v=[]}=Object(s.d)(w.n),x=c.sender?c.sender===y.l.USER:!c.from_bot;let E=[];c.message&&(E=c.from_bot?c.message.split(/\n\s*\n/).map(e=>e.trim()):[c.message]);const{regularButtons:O,editContactDetails:k}=Object(a.useMemo)(()=>Object(Or.a)(c.buttons,qr),[c.buttons]),_=Object(a.useMemo)(()=>{var e;return null==c||null===(e=c.buttons)||void 0===e?void 0:e.filter(e=>e.button_type===y.b.CHECKBOX.toLowerCase()||e.button_type===y.b.SLIDER.toLowerCase())},[c]),C=(null==c?void 0:c.image_carousel)||(null==c?void 0:c.video_source),j=c.system_dialogue_message_type===y.p.REQUEST,T=null==c||null===(t=c.buttons)||void 0===t?void 0:t.filter(e=>e.button_type===y.b.CHECKBOX.toLowerCase()),S=(e=>{let{root:t=null,threshold:n=1,onChange:r,skip:o=!1}=e;const[i,s]=Object(a.useState)(null),c=Object(a.useRef)(null);return Object(a.useEffect)(()=>{if(o)return;c.current&&c.current.disconnect(),c.current=new IntersectionObserver(r,{root:t,threshold:n});const{current:e}=c;return i&&e.observe(i),()=>e.disconnect()},[i,t,r,o,n]),s})({onChange:Object(a.useCallback)(e=>{let[{isIntersecting:t}]=e;!t||(null==b?void 0:b.index)>=p||h(Object(ue.U)(c.id,p))},[c.id,h,b,p]),threshold:.95,skip:x}),I=Object(a.useCallback)(e=>{const t=m.find(t=>t.id===e.id);g(t?m.filter(t=>t.id!==e.id):[...m,e])},[m]),A=Object(a.useMemo)(()=>{var e,t;return[...null!==(e=c.attachments)&&void 0!==e?e:[],...(null!==(t=c.attachment_ids)&&void 0!==t?t:[]).map(e=>{return v.find((t=e,function(){let{id:e,temporaryId:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e===t||n===t}));var t}).filter(Vr)]},[v,c.attachments,c.attachment_ids]),N=Boolean(c.message||(null==A?void 0:A.length)||(null===(n=c.buttons)||void 0===n?void 0:n.length)||(null===(r=c.image_carousel)||void 0===r?void 0:r.length));return c.system_dialogue_message_type===y.p.START||c.system_dialogue_message_type===y.p.END?i.a.createElement(zn,{ref:S,fromBot:!0},i.a.createElement(pr,{chatMessage:c})):i.a.createElement(Fn,{ref:S,"data-cy":"message-block"},i.a.createElement(zn,{fromBot:c.from_bot,hasSiblings:T,hasParentSiblings:j},c.image_carousel&&c.thon_image_above_text&&i.a.createElement("div",null,i.a.createElement(jn,{imageCarousel:c.image_carousel,chatMessage:c,thonAbove:!0,scrollToLatestMessage:l,shouldAutoScroll:d})),i.a.createElement(Un,{fromBot:c.from_bot,hasSiblings:C},E.map((e,t)=>i.a.createElement(er,{key:`chatMessage-${t}`,chatMessage:c,messageLine:e,lineIndex:t,numLines:E.length,editContactDetailsButton:null==k?void 0:k[0]}))),c.image_carousel&&!c.thon_image_above_text&&i.a.createElement("div",null,i.a.createElement(jn,{imageCarousel:c.image_carousel,chatMessage:c,scrollToLatestMessage:l,shouldAutoScroll:d})),A.map(e=>i.a.createElement("div",{key:e.id},i.a.createElement(xn,{attachment:e,shouldAutoScroll:d,scrollToLatestMessage:l,scrollToBottom:u,avatar:c.avatar,chatMessageStatus:c.status,shouldAnimate:!0}))),c.video_source&&i.a.createElement(Er,{source:c.video_source}),(null===(o=c.form)||void 0===o?void 0:o.fields)&&i.a.createElement($r,{formData:c.form})),i.a.createElement($n,null,(null==O?void 0:O.length)>0&&O.map(e=>i.a.createElement(En.a,{key:e.id,button:e,chatMessage:c,type:"button",handlers:f,checked:m,setCheckboxValue:I,submitButtonsList:_}))),((null==c?void 0:c.suggestions)||[]).map(e=>{let{preface:t,message:n,buttons:r}=e;return i.a.createElement(hr,{key:c.id,chatMessage:c,numLines:E.length,preface:t,message:n,buttons:r})}),N&&c.status&&i.a.createElement(or,{chatMessage:c,attachments:A}))};var Wr=function(e){let{...t}=e;return i.a.createElement("svg",Object.assign({},t,{viewBox:"0 0 22 11",xmlns:"https://www.w3.org/2000/svg"}),i.a.createElement("path",{d:"M3 3l7.887 5L19 3",stroke:"#FFF",strokeWidth:"4",fill:"none",fillRule:"evenodd",strokeLinecap:"square"}))};var Yr=function(e){return i.a.createElement("svg",Object.assign({},e,{viewBox:"0 0 82 82",xmlns:"http://www.w3.org/2000/svg"}),i.a.createElement("title",null,"Bot Avatar"),i.a.createElement("g",{transform:"translate(1 1)",fill:"none",fillRule:"evenodd"},i.a.createElement("circle",{stroke:"#F3F3F4",strokeWidth:"2",fill:"#FFF",cx:"40",cy:"40",r:"40"}),i.a.createElement("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"}),i.a.createElement("path",{d:"M29.42 60.83a17.42 17.42 0 0022.38 0",stroke:"#DA3CFF",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),i.a.createElement("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"})))},Kr=n(35);const Xr=Object(c.d)(["0%{opacity:0;transform:translateY(8px);}50%{opacity:0;transform:translateY(8px);}80%{transform:translateY(-2px);}100%{opacity:1;transform:translateY(0);}"]),Jr=Object(c.b)(["",";animation-name:",";"],Object(x.a)(600),Xr),Qr=Object(c.d)(["0%{opacity:1;transform:translateY(0px);}50%{opacity:1;transform:translateY(-6px);}80%{transform:translateY(2px);}100%{opacity:0;transform:translateY(2px);}"]),Zr=Object(c.b)(["",";animation-name:",";"],Object(x.a)(300),Qr),eo=c.c.div.withConfig({displayName:"styles__NewMessageContainer",componentId:"sc-1n499zd-0"})(["position:absolute;z-index:3;bottom:90px;left:50%;transform:translateX(-50%);transition:opacity 300ms ease 300ms;opacity:",";"],e=>e.show?"1":"0"),to=c.c.div.withConfig({displayName:"styles__NewMessageInner",componentId:"sc-1n499zd-1"})(["padding:8px;opacity:0;border-radius:100px;color:#2c2c2c;background:#fff;background-color:#fff;border:1px solid ",";box-shadow:0 2px 4px 0 rgba(0,0,0,0.08);cursor:pointer;display:flex;align-items:center;justify-content:",";min-width:35px;max-width:205px;width:","px;height:","px;",";",";svg{",";path{",";}}"],Object(Kr.a)(.08,"#fff"),e=>e.hasUnread?"flex-start":"center",e=>e.hasUnread?"unset":"35",e=>e.hasUnread?"42":"35",e=>!e.show&&Object(x.h)(800),e=>e.show?Jr:Zr,e=>e.hasUnread&&"min-width: 24px",e=>!e.hasUnread&&`stroke: ${e.theme.buttonBackground}`),no=c.c.div.withConfig({displayName:"styles__StyledAvatar",componentId:"sc-1n499zd-2"})(["border-radius:100px;min-width:24px;width:24px;height:24px;background-image:url(",");background-size:contain;background-repeat:no-repeat;background-position:center;"],e=>e.avatar),ro=c.c.span.withConfig({displayName:"styles__Message",componentId:"sc-1n499zd-3"})(["color:#2c2c2c;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:8px;"]);function oo(e){let{message:t}=e;const{avatar:n}=Object(s.d)(w.d),{takenOver:r,avatars:o}=Object(s.d)(w.a),a=r?o[o.length-1]:n,c=t.replace(/(<[^>]*>)| /g,"");return i.a.createElement(i.a.Fragment,null,a?i.a.createElement(no,{avatar:a}):i.a.createElement(Yr,{height:24,width:24}),i.a.createElement(ro,null,c))}var ao=function(e){let{chatMessages:t,hasUnreadMessage:n,shouldAutoScroll:r,scrollToBottom:o}=e;const[s,c]=Object(a.useState)(!1),[l,u]=Object(a.useState)(!1),d=(e=>{const t=(e||[]).length,n=e[t-1];return Object(a.useMemo)(()=>t>1&&n.from_bot?n:e[t-2],[e,n,t])||{}})(t);return Object(a.useEffect)(()=>{l&&r&&u(!1)},[l,r]),Object(a.useEffect)(()=>{const e=setTimeout(()=>{r||c(!0)},600);return r&&c(!1),()=>clearTimeout(e)},[r]),i.a.createElement(eo,{show:s},i.a.createElement(to,{hasUnread:n&&Boolean(d.message),show:s&&!l,onClick:()=>{u(!0),o()},"data-testid":"chat-new-message"},n&&Boolean(d.message)?i.a.createElement(oo,{message:d.message}):i.a.createElement(Wr,{width:12})))},io=n(58),so=n.n(io);const co=c.c.div.withConfig({displayName:"styles__QueueContainer",componentId:"sc-k9za8a-0"})(["left:0;right:0;z-index:15;position:absolute;background:",";background-color:",";box-shadow:0px 3px 4px -1px ",";",";"],e=>e.theme.headerBackground,e=>e.theme.headerBackground,u.a.shadowColor,x.c),lo=c.c.div.withConfig({displayName:"styles__MessageContainer",componentId:"sc-k9za8a-1"})(["display:flex;padding:5px 18px;justify-content:space-between;align-items:center;border-top:1px solid rgba(0,0,0,0.1);"]),uo=Object(c.c)(P.b).withConfig({displayName:"styles__QueueText",componentId:"sc-k9za8a-2"})(["margin:0;color:",";span{font-weight:600;}font-size:",";font-weight:normal;line-height:24px;"],e=>e.theme.headerText,u.d.fontSizeH5),fo=Object(c.c)(fe.d).withConfig({displayName:"styles__QueueLink",componentId:"sc-k9za8a-3"})(["color:",";"],e=>e.theme.headerText),po=Object(c.d)(["from{background-position:-180px;}to{background-position:180px;}"]),ho=Object(c.d)(["from{background-position:180px;}to{background-position:-180px;}"]),mo=c.c.div.withConfig({displayName:"styles__LoadingContainer",componentId:"sc-k9za8a-4"})(["position:relative;border:0;"]),go=c.c.span.withConfig({displayName:"styles__Loader",componentId:"sc-k9za8a-5"})(["opacity:1;height:3px;width:100%;top:3;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?ho:po});function bo(e){let{waitTime:t,takeoverQueueText:n}=e;return t?i.a.createElement(i.a.Fragment,null,"Estimated wait time: ",i.a.createElement("span",null,t," min")):n}var vo=function(){const[e,t]=Object(a.useState)(null),[n,r]=Object(a.useState)(!1),{SAGE_HOST:o}=Object(s.d)(w.g),{currentLanguage:c}=Object(s.d)(w.e),{id:l,text:u,showTakeoverQueue:d}=Object(s.d)(w.d),{defaultLanguage:f}=Object(ar.a)(),p=Object(s.c)(),{takeover_queue_text:h,takeover_queue_link:m,leave_queue_text:g,leave_queue_link:b}=Object(a.useMemo)(()=>Object(ir.a)(u,c,f),[c,f,u]);return Object(a.useEffect)(()=>{d&&so.a.get(`${o}/api/v1/stats/bot/${l}/public/current_wait_time?sources%5B%5D=web`).then(e=>{const{data:{data:{mean:n,n:r}}}=e;if(r<3)return void t(null);const o=Math.round((n/60).toFixed(2));o>1&&t(o)})},[o,l,d]),Object(a.useEffect)(()=>{const e=setTimeout(()=>{n&&p(Object(ue.d)())},3e3);return n||clearTimeout(e),()=>clearTimeout(e)},[n,p]),d?i.a.createElement(co,null,i.a.createElement(lo,{"aria-live":"polite","aria-atomic":"true","data-cy":"takeover-queue"},n?i.a.createElement(i.a.Fragment,null,i.a.createElement(uo,null,g),i.a.createElement(fo,{onClick:()=>r(!1),"data-cy":"takeover-queue-link"},b)):i.a.createElement(i.a.Fragment,null,i.a.createElement(uo,null,i.a.createElement(bo,{waitTime:e,takeoverQueueText:h})),i.a.createElement(fo,{onClick:()=>r(!0),"data-cy":"takeover-queue-link"},m))),i.a.createElement(mo,null,i.a.createElement(go,{hasCancelled:n}))):null};const yo=c.c.div.withConfig({displayName:"styles__BodyContainer",componentId:"sc-1vymaz1-0"})(["width:100%;min-width:100%;overflow-y:auto;padding:0 30px;height:100%;overflow-x:hidden;background:",";background-color:",";overscroll-behavior:contain;",""],e=>e.theme.background,e=>e.theme.background,m.a),wo=c.c.div.withConfig({displayName:"styles__ChatBoxMessages",componentId:"sc-1vymaz1-1"})(["min-height:100%;display:flex;flex-direction:column;justify-content:flex-end;"]);let xo,Eo=!1;var Oo=function(e){let{setBodyRef:t,setBottomRef:n,setTopRef:r,scrollToBottom:o,scrollToLatestMessage:c,shouldAutoScroll:l,onUserScroll:u,buttonHandlers:d,hasUnreadMessage:f,setGroupRef:p}=e;const[h,m]=Object(a.useState)(!1),{requestedTakeover:g,takeoverClosed:b,takenOver:v,isTyping:x}=Object(s.d)(w.a),{isTyping:E}=Object(s.d)(w.d),{active:O,currentLanguage:k,botKey:_}=Object(s.d)(w.e),{currentMessageId:C,inspectorOpen:j}=Object(s.d)(w.j),T=Object(s.c)(),{chatMessages:S}=Object(s.d)(w.n)||[],I=(e=>{let t=null,n=null,r=!1;const o=[];return e.forEach(e=>{e.from_bot===t&&e.name===n&&e.from_webhook===r&&e.handler!==y.f.TRIGGER_DIALOGUE?o[o.length-1].push(e):o.push([e]),t=e.from_bot,n=e.name,r=e.from_webhook}),o})(S);Object(a.useEffect)(()=>{Eo!==v&&v?(xo=k,Eo=v):void 0===xo||xo===k||v||(T(Object(ue.fb)(_,!0)),xo=void 0,Eo=void 0)},[b,v,g,_,k,T]),Object(a.useEffect)(()=>{O&&S.length>0?m(!0):m(!1)},[O,S.length]);let A=0;return i.a.createElement(yo,{ref:t,onScroll:u,tabIndex:"0","data-testid":"chat-body-container"},g&&!b&&!v&&i.a.createElement(vo,null),i.a.createElement(wo,{role:"log","aria-live":"polite","data-cy":"chat-log"},I.map((e,t)=>{const n=j&&((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})})(C,S,I[t]);return i.a.createElement(i.a.Fragment,{key:`message-group-${t}`},i.a.createElement(It,{fromAgent:e[0].sender===y.l.AGENT,fromBot:e[0].from_bot,created:e[0].created,inspected:n,setGroupRef:p},e.map((n,a)=>{const s=t===I.length-1&&a===e.length-1;return A+=1,i.a.createElement(i.a.Fragment,{key:`${n.id}_${A}`},s&&i.a.createElement("span",{ref:r}),i.a.createElement(Gr,{chatMessage:n,scrollToBottom:o,scrollToLatestMessage:c,shouldAutoScroll:l,buttonHandlers:d,messageCounter:A}))})))}),(x||E)&&i.a.createElement(Vt,null),i.a.createElement("div",{ref:n})),h&&i.a.createElement(ao,{chatMessages:S,hasUnreadMessage:f,shouldAutoScroll:l,scrollToBottom:o}))};var ko=function(e){let{children:t,animate:n}=e;return i.a.createElement(On.a.div,{variants:{normal:{x:0},error:{x:[0,2,-2,0]}},animate:n},t)};const _o=c.c.div.withConfig({displayName:"styles__InputLimitContainer",componentId:"sc-18r5r1u-0"})(["height:20px;display:flex;opacity:0.8;align-items:center;margin-bottom:10px;justify-content:space-between;",""],e=>!e.enabled&&`margin-bottom: 15px; height: 10px; border-bottom: 1px solid ${u.a.grayColor}`),Co=c.c.div.withConfig({displayName:"styles__FillContainer",componentId:"sc-18r5r1u-1"})(["width:",";height:1px;transition:all ease 0.3s;span{height:100%;display:block;}span:first-child{width:100%;opacity:0.3;background:",";background-color:",";}span:last-child{margin-top:-1px;width:","%;background:",";background-color:",";}"],e=>e.active?"calc(100% - 50px)":"100%",e=>{let{theme:t}=e;return t.chatLogElements},e=>{let{theme:t}=e;return t.chatLogElements},e=>e.width>100?100:e.width,e=>{let{theme:t}=e;return t.chatLogElements},e=>{let{theme:t}=e;return t.chatLogElements}),jo=Object(c.c)(P.f).withConfig({displayName:"styles__CountContainer",componentId:"sc-18r5r1u-2"})(["margin:0;opacity:1;display:",";color:",";span{font-weight:500;}",";"],e=>e.active?"block":"none",e=>{let{theme:t}=e;return t.chatLogElements},x.e);var To=function(e){let{alwaysShow:t,inputMax:n,inputLength:r,shake:o}=e;const a=Math.floor(r/n*100),s=r>0,c=t||r>n;return i.a.createElement(_o,{enabled:c,active:s},c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Co,{active:s,width:a},i.a.createElement("span",null),i.a.createElement("span",null)),i.a.createElement(ko,{initial:!1,animate:o?"error":"normal"},i.a.createElement(jo,{active:s},i.a.createElement("span",null,r),"/",n))))},So=n(25);const Io=c.c.div.withConfig({displayName:"styles__UploadWrapper",componentId:"sc-1e637pi-0"})(["button{padding:0;}&:hover{opacity:0.8;}svg{margin-top:3px;path{fill:",";}}"],e=>{let{theme:t}=e;return t.buttonBackground}),Ao=["Bytes","kB","MB","GB"],No=e=>new Promise((t,n)=>{const r=e.size/1024;if(r>5120)return void n(new Error(`The file must be less than ${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(1024));return`${parseFloat((e/1024**n).toFixed(t))} ${Ao[n]}`}(5242880)}`));const o=new FileReader;o.readAsDataURL(e),o.onload=()=>t({url:o.result,file:e,sizeKb:r,name:e.name,type:e.type,status:y.a.PROCESSING,sender:y.l.USER}),o.onabort=()=>n(new Error(o.error))});var Po=function(e){let{accept:t="image/*,text/*,.pdf,.heic",multiple:n=!0}=e;const{handoverMode:r,isTextDirectionRtl:o}=Object(s.d)(w.d),{takenOver:c}=Object(s.d)(w.a),{attachments:l}=Object(s.d)(w.e),u=Object(s.c)(),d=Object(a.useRef)(),f=Object(So.a)(),p=c&&r===y.g.PLATFORM,h=Object(a.useCallback)(async e=>{let{target:t}=e;try{var n;if((null===(n=t.files)||void 0===n?void 0:n.length)>5)return void u(Object(ue.Y)("You can upload up to 5 files at a time",3500));const e=await Promise.all(Array.from(t.files).map(No));u(Object(ue.P)(e))}catch(e){u(Object(ue.Y)(e.message.replace(/^Error: ?/i,""),3500))}},[u]),m=Object(a.useCallback)(()=>{d.current&&(d.current.value="",d.current.click())},[d]);return Object(a.useEffect)(()=>{l.buttonClicked&&(u(Object(ue.a)()),m())},[l.buttonClicked,u,m]),i.a.createElement(Io,{isTextDirectionRtl:o,hasFiles:l.files.length>0},(p||f&&(null==l?void 0:l.exchangeId))&&i.a.createElement(fe.a,{onClick:e=>{e.preventDefault(),e.stopPropagation(),m()}},i.a.createElement(At,null)),i.a.createElement("input",{ref:d,hidden:!0,type:"file",accept:t,multiple:n,onChange:h,style:{display:"none"}}))};const Mo=c.c.div.withConfig({displayName:"styles__Container",componentId:"sc-76oby0-0"})(["display:flex;align-items:center;font-size:15px;> div{position:relative;overflow:visible;}span{border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:8px;}button{display:none;position:absolute;top:-9px;left:-8px;border:1px solid white;border-radius:50%;width:20px;height:20px;padding:0px;background:",";}"],u.a.darkColor),Lo=c.c.div.withConfig({displayName:"styles__AttachmentWrapper",componentId:"sc-76oby0-1"})(["height:41px;&:not(:first-child){margin-left:4px;}&:hover{button{display:block;}}"]),Ro=c.c.div.withConfig({displayName:"styles__ImageWrapper",componentId:"sc-76oby0-2"})(["height:41px;display:flex;img{border-radius:8px;max-height:100%;margin-left:4px;}"]),Do=c.c.div.withConfig({displayName:"styles__IconWrapper",componentId:"sc-76oby0-3"})(["height:100%;padding:8px;border-radius:8px;background:",";"],u.a.grayColor);c.c.div.withConfig({displayName:"styles__FileType",componentId:"sc-76oby0-4"})(["font-size:14px;height:41px;padding:0 4px;background:",";border-radius:8px;display:flex;align-items:center;margin-left:4px;"],u.a.grayColor);var Bo=function(e){let{file:t}=e;return hn(t)===y.e.IMAGE?i.a.createElement(Ro,null,i.a.createElement("img",{src:t.url,alt:`Uploaded ${t.name}`})):i.a.createElement(Do,null,i.a.createElement(At,{height:24}))};var Fo=function(){const{attachments:{files:e}}=Object(s.d)(w.e),t=Object(s.c)(),n=Object(a.useCallback)(n=>t(Object(ue.P)(((e,t)=>{const n=e.slice();return n.splice(t,1),n})(e,n))),[t,e]);return i.a.createElement(Mo,null,e.map((e,t)=>i.a.createElement(Lo,{key:`uploaded-image-${e.name}-${t}`},i.a.createElement(Bo,{file:e}),i.a.createElement(fe.a,{onClick:e=>{e.preventDefault(),n(t)}},i.a.createElement(h.e,{width:18,height:18,color:"#FFF"})))),1===(null==e?void 0:e.length)&&i.a.createElement("span",null,e[0].name))},zo=n(16),Uo=n(45),Ho=a.useLayoutEffect,$o=function(e){var t=Object(a.useRef)(e);return Ho((function(){t.current=e})),t},Vo=function(e,t){"function"!=typeof e?e.current=t:e(t)},qo=function(e,t){var n=Object(a.useRef)();return Object(a.useCallback)((function(r){e.current=r,n.current&&Vo(n.current,null),n.current=t,t&&Vo(t,r)}),[t])},Go={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Wo=function(e){Object.keys(Go).forEach((function(t){e.style.setProperty(t,Go[t],"important")}))},Yo=null;var Ko=function(){},Xo=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Jo=!!document.documentElement.currentStyle,Qo=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,o=e.minRows,i=e.onChange,s=void 0===i?Ko:i,c=e.onHeightChange,l=void 0===c?Ko:c,u=Object(Uo.a)(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);var d,f=void 0!==u.value,p=Object(a.useRef)(null),h=qo(p,t),m=Object(a.useRef)(0),g=Object(a.useRef)(),b=function(){var e=p.current,t=n&&g.current?g.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,Xo.reduce((function(e,t){return e[t]=n[t],e}),{})),o=r.boxSizing;return""===o?null:(Jo&&"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){g.current=t;var a=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),Yo||((Yo=document.createElement("textarea")).setAttribute("tab-index","-1"),Yo.setAttribute("aria-hidden","true"),Wo(Yo)),null===Yo.parentNode&&document.body.appendChild(Yo);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;Yo.style[t]=i[t]})),Wo(Yo),Yo.value=t;var c=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(Yo,e);Yo.value="x";var l=Yo.scrollHeight-o,u=l*n;"border-box"===s&&(u=u+o+a),c=Math.max(u,c);var d=l*r;return"border-box"===s&&(d=d+o+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||"x",o,r),i=a[0],s=a[1];m.current!==i&&(m.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return Object(a.useLayoutEffect)(b),d=$o(b),Object(a.useLayoutEffect)((function(){var e=function(e){d.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(a.createElement)("textarea",Object(zo.a)({},u,{onChange:function(e){f||b(),s(e)},ref:h}))},Zo=Object(a.forwardRef)(Qo);const ea=c.c.div.withConfig({displayName:"styles__ComposerContainer",componentId:"sc-1v8m1u6-0"})(["padding:20px;padding-top:5px;background:none;background:",";background-color:",";",""],e=>e.theme.background,e=>e.theme.background,fe.e),ta=c.c.div.withConfig({displayName:"styles__FormInner",componentId:"sc-1v8m1u6-1"})(["display:flex;align-items:center;justify-content:space-between;gap:15px;"]),na=c.c.div.withConfig({displayName:"styles__DisabledText",componentId:"sc-1v8m1u6-2"})(["margin:8px 0 10px 10px;transition:all 0.3s ease;color:",";font-size:",";line-height:24px;",""],u.a.darkColor,u.d.fontSizeH5,e=>e.hide?"transform: translateY(-45px);":""),ra=Object(c.c)(Zo).withConfig({displayName:"styles__ComposerInput",componentId:"sc-1v8m1u6-3"})([""," min-height:","px;"],fe.f,e=>{let{$minHeight:t}=e;return t}),oa=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1v8m1u6-4"})(["width:40px;height:40px;display:flex;justify-content:center;align-items:center;"]),aa=Object(c.b)(["color:#fff;z-index:10;cursor:pointer;box-shadow:none;height:100%;width:100%;padding:0;text-transform:none;display:flex;align-items:center;justify-content:center;border:none;max-width:36px;max-height:36px;background-color:transparent;"," &:hover{opacity:0.8;}svg{transition:all 0.2s ease;path{fill:",";}}"],m.a,e=>e.theme.buttonBackground),ia=c.c.button.withConfig({displayName:"styles__SubmitButton",componentId:"sc-1v8m1u6-5"})(["",";z-index:15;padding:8px;transition:opacity 0.1s ease-in;",";border-radius:100px;background:",";background-color:",";svg{margin-top:2px;margin-right:2px;transition:all 0.2s ease;path{fill:#fff;}}",";"],aa,e=>!e.active&&"\n opacity: 0.3;\n pointer-events: none;\n ",e=>e.theme.buttonBackground,e=>e.theme.buttonBackground,e=>{let{disabled:t}=e;return t&&"\n cursor: default;\n opacity: 0.3;\n &:hover {\n opacity: 0.3;\n }\n "}),sa=Object(So.a)();let ca;function la(e){let{active:t,chatHasStarted:n,onManualFocus:r,currentlyPoppedUp:o,autoFocused:c,isScrolledDown:l}=e;const u=Object(a.useRef)(),[d,f]=Object(a.useState)(41),[p,m]=Object(a.useState)(!1),[g,b]=Object(a.useState)(!1),[v,y]=Object(a.useState)(""),[x,E]=Object(a.useState)(0);Object(a.useEffect)(()=>{(t||n)&&!sa&&!o&&u.current&&!c&&u.current.focus()},[t,n,c,u,o]);const{text:O,inputLimitEnabled:k,inputLimit:_,isTextDirectionRtl:C}=Object(s.d)(w.d),{defaultLanguage:j}=Object(ar.a)(),{hideInputField:T,currentLanguage:S,allGreetingsHideInput:I,attachments:{files:A}}=Object(s.d)(w.e),{takenOver:N,userIsTyping:P}=Object(s.d)(w.a),{connected:M}=Object(s.d)(w.f),{chatMessages:L}=Object(s.d)(w.n),{inspectorOpen:R}=Object(s.d)(w.j),D=Object(s.c)(),B=C?"rtl":void 0,F=T&&!N,z=!N&&k?_:1e3,U=!v&&0===A.length,H=!M||F||I&&0===L.length||v.length>z||U||!n,{placeholder:$,disabled_input_text:V}=Object(a.useMemo)(()=>Object(ir.a)(O,S,j),[S,j,O]),q=e=>{if(e.preventDefault(),e.stopPropagation(),P&&D(Object(ue.vb)()),H)return!1;if(!v.trim()&&0===A.length)return!1;if(A.length>0)D(Object(ue.L)());else{const e=(new Date).getTime();if(!(e-x>1e3))return!1;E(e),D(Object(ue.gb)(v.trim()))}return y(""),!0};return i.a.createElement(ea,{dir:B,inspectorOpen:R},i.a.createElement(To,{alwaysShow:!N&&k,inputMax:z,inputLength:v.length,shake:p}),i.a.createElement("form",{autoComplete:"off",action:"#",onSubmit:q},i.a.createElement(ta,null,i.a.createElement(fe.c,{targetHeight:d,active:U?0:1,hasFiles:(null==A?void 0:A.length)>0},0===A.length&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ra,{id:"chat-box-composer","data-cy":"chat-box-composer","aria-hidden":!n,"aria-label":$,name:"message",$hide:F?1:0,disabled:!n||F,$active:U?0:1,ref:u,placeholder:$,type:"text",onChange:e=>{const{value:t}=e.target;N?(e=>{const t=e.length>0;clearTimeout(ca),!P&&t?D(Object(ue.ub)()):P&&!t&&D(Object(ue.vb)()),ca=setTimeout(()=>{D(Object(ue.vb)())},5e3)})(t):t.length>z&&m(!0),y(t)},value:v,onFocus:()=>b(!0),onBlur:()=>b(!1),onMouseDown:()=>{g||l()||r()},onHeightChange:f,$minHeight:41,onKeyDown:e=>{m(!1),"Enter"!==e.key||e.shiftKey||q(e)}}),i.a.createElement(na,{hide:T?1:0},V)),i.a.createElement(Fo,null)),i.a.createElement(Po,null),i.a.createElement(oa,{isTextDirectionRtl:C},i.a.createElement(ia,{"data-cy":"composer-submit","aria-hidden":H?"true":"false",active:H?0:1,disabled:H,role:"button",onClick:q,title:"Send message",onMouseDown:e=>{e.preventDefault()}},i.a.createElement(h.p,{width:18,height:18}))))))}la.defaultProps={currentlyPoppedUp:!1};var ua=la;var da=n(34);var fa=function(e){let{cancelChat:t,setCancelChat:n}=e;const{name:r,avatar:o,fullscreenMode:c,feedbackFormType:l,isTextDirectionRtl:u}=Object(s.d)(w.d),{optionsScreenOpen:d,chatHasStarted:f}=Object(s.d)(w.e),p=Object(s.c)(),m=!(d||c&&l===y.r.NONE),g=document.documentElement,b=u?"rtl":void 0,v=Object(a.useCallback)(()=>{p(Object(ue.h)()),g.style.overflow="unset"},[p,g]),x=Object(a.useCallback)(()=>{p(Object(ue.H)())},[p]);!function(e){Object(a.useEffect)(()=>(window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)),[e])}(Object(a.useCallback)(e=>{const{tagName:t}=document.activeElement;"Escape"===e.code&&"BODY"===t&&v(),"Escape"===e.code&&"BODY"!==t&&document.activeElement.blur()},[v]));const E=Object(a.useCallback)(()=>{t?(p(Object(ue.w)(c)),n(!1),g.style.overflow="unset"):n(!0)},[t,p,c,n,g]);return f?i.a.createElement(da.c,{dir:b,"data-cy":"chat-box-header"},i.a.createElement(da.d,null,o?i.a.createElement(da.f,{avatar:o}):i.a.createElement(Yr,{height:30}),i.a.createElement(da.a,{isTextDirectionRtl:u,"aria-label":`Chat bot ${r||"Kindly"}`},r||"Kindly")),i.a.createElement(da.e,null,m&&i.a.createElement(i.a.Fragment,null,i.a.createElement(da.b,{"aria-label":"Open settings",title:"Open settings",type:"button",onClick:x,"data-cy":"chat-settings-button"},i.a.createElement(h.q,{width:24,height:24})),i.a.createElement(da.b,{"aria-label":"Minimize chat",title:"Minimize chat",type:"button",onClick:v,"data-cy":"minimize-chat-button"},i.a.createElement(h.n,{width:24,height:24})),i.a.createElement(da.b,{"aria-label":"End chat",title:"End chat",type:"button",onClick:E,"data-cy":"end-chat-button","data-testid":"end-chat-button",isTextDirectionRtl:u},i.a.createElement(h.e,{width:24,height:24}))))):null};const pa=c.c.div.withConfig({displayName:"styles__AboutChatContainer",componentId:"sc-pmmp3f-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;"],x.e),ha=c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-pmmp3f-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),ma=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-pmmp3f-2"})(["width:100%;height:100%;display:flex;padding:0 30px;flex-direction:column;justify-content:center;align-items:center;"]),ga=Object(c.c)(P.e).withConfig({displayName:"styles__AboutParagraph",componentId:"sc-pmmp3f-3"})(["font-size:16px;a{color:",";}"],u.a.primaryColor),ba=c.c.div.withConfig({displayName:"styles__LinkContainer",componentId:"sc-pmmp3f-4"})(["a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor);var va=function(e){let{setAboutChat:t}=e;const{text:n}=Object(s.d)(w.d),{currentLanguage:r}=Object(s.d)(w.e),{defaultLanguage:o}=Object(ar.a)(),c=Object(a.useCallback)(()=>t(!1),[t]),l=Object(a.useCallback)(e=>{"Enter"===e.key&&t(!1)},[t]),u=Object(a.useMemo)(()=>Object(ir.a)(n,r,o),[r,o,n]),{back_to_chat_button:d}=u;return i.a.createElement(pa,null,i.a.createElement(ha,null,i.a.createElement(ma,null,i.a.createElement(P.b,null,"About Kindly"),i.a.createElement(ga,null,"This chatbot is powered by Kindly.",i.a.createElement("br",null),"To learn more about Kindly, visit"," ",i.a.createElement("a",{href:"https://www.kindly.ai/nb/products",target:"_blank",rel:"noopener noreferrer"},"this website."))),i.a.createElement(ba,null,i.a.createElement(fe.d,{"aria-label":d,title:d,onClick:c,onKeyUp:l,tabIndex:"0",type:"button"},"‹ ",d))))};const ya=c.c.div.withConfig({displayName:"styles__PoweredContainer",componentId:"sc-16vfwd0-0"})(["z-index:2;display:flex;justify-content:center;"]),wa=c.c.span.withConfig({displayName:"styles__Blob",componentId:"sc-16vfwd0-1"})(["width:8px;height:8px;opacity:1;border-radius:100%;margin:0 4px 0 8px;background:#1cd300;background-color:#1cd300;"]),xa=Object(c.c)(P.f).withConfig({displayName:"styles__PoweredParagraph",componentId:"sc-16vfwd0-2"})(["display:flex;opacity:1;margin-bottom:0;align-items:baseline;span:first-child{opacity:0.6;}a{cursor:pointer;}"]);var Ea=function(e){let{hide:t,setAboutChat:n}=e;const r=Object(a.useCallback)(()=>n(!0),[n]),o=Object(a.useCallback)(e=>{"Enter"===e.key&&n(!0)},[n]);return i.a.createElement(ya,{hide:t},i.a.createElement(xa,null,i.a.createElement("span",null,"Powered by")," ",i.a.createElement(wa,null),i.a.createElement(P.d,null,i.a.createElement(fe.d,{"aria-label":"Visit Kindly",title:"Visit Kindly",onClick:r,onKeyUp:o,type:"button",tabIndex:0},"Kindly"))))},Oa=e=>{const[t,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{t&&!e&&n(!1)},[e,t]),{showAboutChat:t,setShowAboutChat:n}};const ka=c.c.div.withConfig({displayName:"styles__CancelChatContainer",componentId:"sc-1gy1mo2-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;"],x.e),_a=c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1gy1mo2-1"})(["height:100%;display:flex;text-align:center;flex-direction:column;justify-content:space-between;align-items:center;"]),Ca=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1gy1mo2-2"})(["width:100%;height:100%;display:flex;padding:0 30px;justify-content:center;align-items:center;"]),ja=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1gy1mo2-3"})(["button{margin:auto;}a{color:",";text-align:center;font-size:",";display:block;margin:60px 0 30px 0;:hover,:focus,:active,:visited{color:",";}}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor),Ta=c.c.div.withConfig({displayName:"styles__CancelChatFooter",componentId:"sc-1gy1mo2-4"})(["div{display:flex;position:unset;align-items:center;}"]);var Sa=function(e){let{setCancelChat:t}=e;const n=Object(s.c)(),{text:r}=Object(s.d)(w.d),{currentLanguage:o,active:c}=Object(s.d)(w.e),{setShowAboutChat:l}=Oa(c),{defaultLanguage:d}=Object(ar.a)(),f=document.documentElement,p=Object(a.useMemo)(()=>Object(ir.a)(r,o,d),[o,d,r]),h=Object(a.useCallback)(()=>{n(Object(ue.w)()),t(!1),f.style.overflow="unset"},[n,t,f]),m=Object(a.useCallback)(()=>t(!1),[t]),g=Object(a.useCallback)(e=>{"Enter"===e.key&&t(!1)},[t]),{back_to_chat_button:b,cancel_chat_button:v,cancel_chat_text:y}=p;return i.a.createElement(ka,null,i.a.createElement(_a,null,i.a.createElement(Ca,null,i.a.createElement(P.a,null,y)),i.a.createElement(ja,null,i.a.createElement(Cr.b,{style:u.b,"aria-label":v,title:v,onClick:h,type:"button",color:!0,text:v,cy:"cancel-chat-button"}),i.a.createElement(fe.d,{"aria-label":b,title:b,onClick:m,onKeyUp:g,type:"button",tabIndex:"0"},"‹ ",b)),i.a.createElement(Ta,null,i.a.createElement(Ea,{setAboutChat:l}))))};n(39);const Ia=Object(c.c)(fe.d).withConfig({displayName:"styles__FooterLink",componentId:"sc-1l968t6-0"})(["display:block;color:",";text-align:center;margin:30px 0;font-size:",";:hover,:focus,:active,:visited{color:",";}"],u.a.darkColor,u.d.fontSizeP,u.a.darkColor),Aa=c.c.div.withConfig({displayName:"styles__OptionsContainer",componentId:"sc-1l968t6-1"})(["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;}"]),Na=(c.c.div.withConfig({displayName:"styles__ContainerInner",componentId:"sc-1l968t6-2"})(["height:100%;text-align:center;display:grid;grid-template-rows:1fr 40px;"]),c.c.div.withConfig({displayName:"styles__GenericContainer",componentId:"sc-1l968t6-3"})(["display:grid;grid-gap:15px;grid-template-rows:auto 1fr;overflow-y:auto;@media ","{grid-gap:0;grid-template-rows:1fr;}"],u.c.maxPhoneHeight)),Pa=c.c.div.withConfig({displayName:"styles__DeleteContainer",componentId:"sc-1l968t6-4"})(["display:grid;grid-template-rows:1fr auto;@media ","{grid-template-rows:1fr;}"],u.c.maxPhoneHeight),Ma=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-1l968t6-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;}"]),La=(c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1l968t6-6"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;&:last-child{margin-top:10px;}svg{margin-right:15px;}}"]),c.c.span.withConfig({displayName:"styles__OptionsButtonText",componentId:"sc-1l968t6-7"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"])),Ra=c.c.div.withConfig({displayName:"styles__OptionsFooter",componentId:"sc-1l968t6-8"})(["div{position:unset;display:flex;flex-direction:column;align-items:center;}"]),Da=c.c.div.withConfig({displayName:"styles__DeletedText",componentId:"sc-16kypod-0"})(["color:",";font-size:",";font-weight:normal;margin:0 0 10px;line-height:24px;"],u.a.darkColor,u.d.fontSizeH5);var Ba=function(e){let{textContent:t}=e;const{chat_deleted_header:n,chat_deleted_text:r}=t;return i.a.createElement(Ma,null,i.a.createElement(P.b,null,n),i.a.createElement(Da,null,r))};const Fa="GENERIC",za="LANGUAGE",Ua="DOWNLOAD",Ha="DELETE_CHAT_CONFIRM",$a="CHAT_DELETED",Va=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-c6vrbi-0"})(["max-width:100%;flex-direction:column;display:flex;align-items:center;margin:unset;button{margin-bottom:10px;&:last-child{margin-top:0;}}"]);var qa=function(e){let{textContent:t,setOptionsView:n}=e;const r=Object(s.c)(),{back_to_chat_button:o,delete_text:c,delete_button:l}=t,d=document.documentElement,f=Object(a.useCallback)(()=>{n($a),r(Object(ue.r)()),d.style.overflow="unset"},[n,r,d]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ma,null,i.a.createElement(P.b,null,c)),i.a.createElement(Va,null,i.a.createElement(Cr.b,{style:u.b,"aria-label":l,title:l,onClick:f,type:"button",text:l,color:!0,cy:"confirm-delete-chat"}),i.a.createElement(Ia,{"aria-label":o,title:o,onClick:()=>n(Fa),type:"button"},"‹ ",o)))},Ga=n(26);const Wa=c.c.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-mbgnew-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 15px;"]),Ya=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-mbgnew-1"})(["max-width:100%;margin:auto;display:flex;flex-direction:column;min-width:190px;button{margin-bottom:10px;}"]),Ka=c.c.div.withConfig({displayName:"styles__Title",componentId:"sc-mbgnew-2"})(["color:",";font-size:",";margin:0 0 10px;line-height:24px;"],u.a.darkColor,u.d.fontSizeH5);var Xa=function(e){let{textContent:t,setOptionsView:n}=e;const r=Object(s.c)(),{back_to_chat_button:o,download_button:c,download_format_text:l}=t,u=Object(a.useCallback)(async()=>{r(await Object(ue.x)({},"html"))},[r]),d=Object(a.useCallback)(async()=>{r(Object(ue.x)({},"json"))},[r]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ma,null,i.a.createElement(Ka,null,l)),i.a.createElement(Wa,null,i.a.createElement(Ya,null,i.a.createElement(Ga.b,{"aria-label":`${c} (HTML)`,title:`${c} (HTML)`,onClick:u,type:"button","data-cy":"download-chat-html"},i.a.createElement(La,null,`${c} (HTML)`)),i.a.createElement(Ga.b,{"aria-label":`${c} (JSON)`,title:`${c} (JSON)`,onClick:d,type:"button","data-cy":"download-chat-json"},i.a.createElement(La,null,`${c} (JSON)`))),i.a.createElement(Ia,{"aria-label":o,title:o,onClick:()=>n(Fa),type:"button"},"‹ ",o)))};const Ja=c.c.div.withConfig({displayName:"styles__Header",componentId:"sc-crpo3y-0"})(["width:100%;height:",";background:",";background-color:",";@media ","{display:none;}"],e=>e.long?"180px":"210px",e=>e.theme.headerBackground,e=>e.theme.headerBackground,u.c.maxPhoneHeight),Qa=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-crpo3y-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;}}"]);var Za=function(e){let{languages:t,textContent:n,setOptionsView:r}=e;const o=Object(s.c)(),{back_to_chat_button:c,change_language_button:l,download_button:u,delete_button:d,start_over_button:f}=n,p=Object(a.useCallback)(()=>{o(Object(ue.w)(!0))},[o]),m=Object(a.useCallback)(()=>{o(Object(ue.k)())},[o]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ja,{long:t.length>1}),i.a.createElement(Qa,null,t.length>1&&i.a.createElement(Ga.b,{"aria-label":l,title:l,onClick:()=>r(za),type:"button","data-cy":"change-language-option"},i.a.createElement(La,null,i.a.createElement(h.l,{width:18,height:14}),l)),i.a.createElement(Ga.b,{"aria-label":f,title:f,onClick:p,type:"button","data-cy":"restart-chat-option"},i.a.createElement(La,null,f)),i.a.createElement(Ga.b,{"aria-label":d,title:d,onClick:()=>r(Ha),type:"button","data-cy":"delete-chat-option"},i.a.createElement(La,null,d)),i.a.createElement(Ga.b,{"aria-label":u,title:u,onClick:()=>r(Ua),type:"button","data-cy":"download-chat-option"},i.a.createElement(La,null,u)),i.a.createElement(Ga.b,{"aria-label":c,title:c,onClick:m,type:"button","data-cy":"back-to-chat-option",$color:!0,autoFocus:!0},i.a.createElement(La,null,c))))};const ei=c.c.div.withConfig({displayName:"styles__SelectionContainer",componentId:"sc-1hbxmch-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0 30px;"]),ti=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1hbxmch-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;}}"]),ni=c.c.div.withConfig({displayName:"styles__ButtonFooter",componentId:"sc-1hbxmch-2"})(["margin-bottom:15px;button{display:block;margin:0 auto 30px;}"]),ri=Object(c.c)(P.b).withConfig({displayName:"styles__Title",componentId:"sc-1hbxmch-3"})(["margin-top:30px;width:100%;svg{margin-right:16px;display:inline-block;vertical-align:middle;}"]);var oi=function(e){let{languages:t,currentLanguage:n,textContent:r,setOptionsView:o}=e;const[c,l]=Object(a.useState)(n);Object(a.useEffect)(()=>{l(n)},[n,l]);const d=Object(a.useCallback)(()=>o(Fa),[o]),f=Object(a.useCallback)(e=>{"Enter"===e.key&&o(Fa)},[o]),p=Object(s.c)(),{confirm_action_button:m,back_to_chat_button:g,change_language_button:b,change_language_text:v}=r;return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ma,null,i.a.createElement(ri,null,i.a.createElement(h.l,{width:35,height:39}),b),i.a.createElement(P.e,null,v)),i.a.createElement(ei,null,i.a.createElement(ti,null,t.map(e=>i.a.createElement(Cr.b,{key:e.code,"aria-label":e.name,title:e.name,onClick:()=>l(e.code),text:e.name,flat:e.code===c,selected:e.code===c,cy:`${e.code}-button`}))),i.a.createElement(ni,null,c!==n&&i.a.createElement(Cr.b,{style:u.b,"aria-label":m,title:m,onClick:()=>{p(Object(ue.R)(c))},type:"submit",text:m,color:!0}),i.a.createElement(Ia,{"aria-label":g,title:g,onClick:d,onKeyUp:f,tabIndex:"0",type:"button"},"‹ ",g))))};var ai=function(e){let{setAboutChat:t}=e;const{text:n}=Object(s.d)(w.d),{languages:r,defaultLanguage:o}=Object(ar.a)(),{currentLanguage:c}=Object(s.d)(w.e),{chatDeleted:l}=Object(s.d)(w.p),[u,d]=Object(a.useState)(l?$a:Fa),f=Object(a.useMemo)(()=>Object(ir.a)(n,c,o),[c,o,n]);return i.a.createElement(Aa,null,u===Fa||u===Ua||u===za?i.a.createElement(Na,null,u===Fa&&i.a.createElement(Za,{languages:r,textContent:f,setOptionsView:d}),u===Ua&&i.a.createElement(Xa,{languages:r,textContent:f,setOptionsView:d}),u===za&&i.a.createElement(oi,{languages:r,textContent:f,currentLanguage:c,setOptionsView:d})):i.a.createElement(Pa,null,u===$a&&i.a.createElement(Ba,{textContent:f}),u===Ha&&i.a.createElement(qa,{setOptionsView:d,textContent:f})),i.a.createElement(Ra,null,i.a.createElement(Ea,{setAboutChat:t})))},ii=n(84);const si=c.c.div.withConfig({displayName:"styles__SelectContainer",componentId:"sc-1lfni2n-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;}"]),ci=c.c.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1lfni2n-1"})(["position:absolute;top:10px;left:8px;svg{path{fill:#333;}}"]),li=c.c.select.withConfig({displayName:"styles__Select",componentId:"sc-1lfni2n-2"})(["cursor:pointer;appearance:none;border-radius:5px;font-size:",";border:1px solid #dedede;padding:8px 30px 8px 11px;position:relative;color:#2c2c2c;background:transparent;background-color:transparent;"," ",""],u.d.fontSizeH5,e=>e.icon&&"padding-left: 30px;",m.a);function ui(e){let{children:t,onClick:n,onChange:r,value:o,name:a,icon:s,...c}=e;return i.a.createElement(si,null,s&&i.a.createElement(ci,null,i.a.createElement(h.l,{width:18,height:14})),i.a.createElement(li,Object.assign({onClick:n,onChange:r,value:o,name:a,icon:s},c),t))}ui.defaultProps={icon:!1,onClick:ii.a,onChange:ii.a};var di=ui,fi=n(41);const pi=c.c.div.withConfig({displayName:"styles__WelcomePageContainer",componentId:"sc-elyt0g-0"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;background:#fff;background-color:#fff;"]),hi=Object(c.b)(["background-size:cover;background-position:center;background-image:url(",");"],e=>e.welcomePageImage),mi=c.c.div.withConfig({displayName:"styles__HeaderContent",componentId:"sc-elyt0g-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&&hi),gi=c.c.div.withConfig({displayName:"styles__IntroContent",componentId:"sc-elyt0g-2"})(["flex:1;padding:15px 30px 30px;border-top:5px solid ",";@media ","{padding:30px;}"],e=>e.theme.headerBackground,u.c.maxTablet),bi=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-elyt0g-3"})(["height:100%;display:flex;flex-direction:column;justify-content:space-between;"]),vi=c.c.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-elyt0g-4"})(["padding:20px 0;"]),yi=c.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-elyt0g-5"})(["display:flex;align-items:center;justify-content:space-between;button:first-child{@media ","{min-width:unset;}}"],u.c.maxTablet),wi=(Object(c.c)(fe.a).withConfig({displayName:"styles__CloseButton",componentId:"sc-elyt0g-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),Object(c.c)(P.a).withConfig({displayName:"styles__TitleText",componentId:"sc-elyt0g-7"})(["color:",";font-weight:500;font-size:",";margin:0 0 15px;"],u.a.textColor,u.d.fontSizeH3)),xi=c.c.div.withConfig({displayName:"styles__IntroText",componentId:"sc-elyt0g-8"})(["color:",";max-height:180px;overflow:hidden;font-size:",";margin:30px 0 10px 0;line-height:24px;div{& >:first-child{margin-top:0;}& >:last-child{margin-bottom:0;}a{color:#0000c6;}a:visited{color:#5b096e;}}strong{font-weight:500;}"],u.a.textColor,u.d.fontSizeH5);var Ei=function(){const[e,t]=Object(a.useState)(!1),{active:n,currentLanguage:r,optionsScreenOpen:o,feedbackFormType:c}=Object(s.d)(w.e),{welcomePage:l,welcomePageType:d,fullscreenMode:f,isTextDirectionRtl:p}=Object(s.d)(w.d),{languages:m,defaultLanguage:g}=Object(ar.a)(),{labels:b}=Object(s.d)(w.l),v=Object(s.c)(),x=Object(a.useRef)(),E=document.documentElement,O=!(o||f&&c===y.r.NONE),k=p?"rtl":void 0;Object(a.useEffect)(()=>{n&&x.current.focus()},[n]);const _=l?((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"image"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(fi.a)(a,t,n)}},{}))(l,r,g):{header:"",text:"",start_button:""},C=Object(a.useCallback)(()=>{t(!0),v(Object(ue.l)()),v(Object(ue.R)(r||m[0].code,{skipRestart:b.length>0}))},[v,r,m,b]),j=Object(a.useCallback)(()=>{v(Object(ue.h)()),E.style.overflow="unset"},[v,E]),T=Object(a.useCallback)(e=>{v(Object(ue.R)(e))},[v]);return i.a.createElement(pi,null,i.a.createElement(mi,{welcomePageImage:"PICTURE"===d&&l.image},O&&i.a.createElement(da.b,{"aria-label":"Close chat",title:"Close chat",type:"button",onClick:j,"data-cy":"close-chat-button"},i.a.createElement(h.e,{width:25,height:25}))),i.a.createElement(gi,null,i.a.createElement(bi,{dir:k},i.a.createElement("div",null,m.length>1&&i.a.createElement(di,{icon:!0,name:"language-select","data-cy":"language-select",value:r,onChange:e=>T(e.target.value),"aria-label":"Select a language"},m.map(e=>i.a.createElement("option",{key:e.code,label:e.name,value:e.code},e.name))),i.a.createElement(vi,null,i.a.createElement(wi,null,_.header),i.a.createElement(xi,null,Rn(_.text)))),i.a.createElement(yi,null,i.a.createElement(Cr.b,{style:u.b,cy:"start-chat-button",type:"button",title:_.start_button||"Start chat",onClick:C,loading:e,color:!0,ref:x},_.start_button||"Start chat")))))};const Oi=Object(c.d)(["0%{opacity:0;}100%{opacity:1;}"]),ki=Object(c.b)(["",";animation-name:",";"],Object(x.a)(100),Oi),_i=Object(c.d)(["0%{opacity:1;}100%{opacity:0;}"]),Ci=Object(c.b)(["",";animation-delay:50ms;animation-name:",";"],Object(x.a)(500),_i),ji=Object(c.b)(["",";"],e=>e.fullHeight?"top: 0; height: 100%;":"top: 55px; height: calc(100% - 55px); border-bottom-right-radius: 6px; border-bottom-left-radius: 6px"),Ti=c.c.div.withConfig({displayName:"styles__OverlayContainer",componentId:"sc-1xhdwt3-0"})(["width:100%;overflow:hidden;padding-bottom:5px;"," position:absolute;z-index:",";background:#fff;background-color:#fff;",";",";",";"],ji,u.f.overlayIndex,e=>!e.chatViewHidden&&"pointer-events: none",e=>!e.chatViewHidden&&Object(x.h)(300),e=>e.chatViewHidden?ki:Ci);var Si=function(e){let{showAboutChat:t,setShowAboutChat:n,showCancelConfirmation:r,setShowCancelConfirmation:o}=e;const{welcomePageType:a,hideHeader:c}=Object(s.d)(w.d),{chatHasStarted:l,optionsScreenOpen:u}=Object(s.d)(w.e),{chatDeleted:d}=Object(s.d)(w.p),f=!l&&a!==y.s.NONE,p=u||f||r||t||d;return i.a.createElement(Ti,{chatViewHidden:p,fullHeight:c||f},t&&!r&&i.a.createElement(va,{setAboutChat:n}),r&&i.a.createElement(Sa,{setCancelChat:o}),f&&i.a.createElement(Ei,null),(u||d)&&i.a.createElement(ai,{setAboutChat:n}))};const Ii=c.c.div.withConfig({displayName:"styles__Container",componentId:"sc-109olta-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,fe.e,Object(Kr.a)(.1,u.a.grayColor),Object(Kr.a)(.1,u.a.grayColor)),Ai=c.c.form.withConfig({displayName:"styles__Contents",componentId:"sc-109olta-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;"}),Ni=Object(c.c)(fe.a).withConfig({displayName:"styles__CloseButton",componentId:"sc-109olta-2"})(["min-height:25px;display:flex;align-items:center;font-size:",";padding:0;:hover{opacity:0.8;}"],u.d.fontSizeH4),Pi=c.c.div.withConfig({displayName:"styles__Header",componentId:"sc-109olta-3"})(["display:flex;margin:4px 0 5px;color:",";font-size:",";align-items:center;"],e=>{let{theme:t}=e;return Object(sr.a)(t.background,"white","black")},u.d.fontSizeP),Mi=c.c.div.withConfig({displayName:"styles__FlexContainer",componentId:"sc-109olta-4"})(["display:flex;justify-content:space-between;align-items:center;button:first-child{margin-right:8px;}div + button{margin-left:12px;}"]),Li=c.c.input.withConfig({displayName:"styles__Input",componentId:"sc-109olta-5"})(["",""],fe.f),Ri=Object.freeze({EMAIL:"email",PHONE:"phone_number"});function Di(e,t){const n=Object(s.c)(),{contactDetailsButton:r}=Object(s.d)(w.e),[o,l]=Object(a.useState)(""),[d,f]=Object(a.useState)(!1),p=Object(a.useRef)(),m=Object(c.e)(),g=r.contact_details.contact_type,{label:b,placeholder:v}=r.contact_details,y=Object(a.useMemo)(()=>Object(sr.a)(m.background,u.a.grayColor,u.a.darkColor),[m.background]),x=()=>{n(Object(ue.lb)())};return i.a.createElement(Ii,{ref:t},i.a.createElement("span",null),i.a.createElement(Ai,{hasSubmitted:d},i.a.createElement(Pi,null,g&&i.a.createElement(Ni,{"aria-label":"Cancel entering details",title:"Cancel entering details",type:"button",onClick:x,"data-cy":"minimize-chat-button",mobileOnly:!0},i.a.createElement(h.e,{width:25,height:12,stroke:y})),b),i.a.createElement(Mi,null,i.a.createElement(fe.c,null,i.a.createElement(Li,{onChange:e=>{l(e.target.value)},value:o,type:g===Ri.EMAIL?"email":"tel",ref:p,placeholder:v,required:!0})),i.a.createElement(ia,{onClick:e=>{var t,a;return f(!0),!(null==p||null===(t=p.current)||void 0===t||null===(a=t.validity)||void 0===a||!a.valid)&&(e.preventDefault(),n(Object(ue.M)(r,o)),x(),!1)},type:"submit",active:!0,title:`Send your ${g===Ri.EMAIL?"email address":"phone number"}`},i.a.createElement(h.p,{width:18,height:18})))))}var Bi=Object(a.forwardRef)(Di),Fi=n(107);const zi=Object(c.d)(["0%{opacity:0;transform:translateY(-6px);}60%{transform:translateY(2px);}100%{opacity:1;transform:translateY(0);}"]),Ui=Object(c.b)(["",";animation-name:",";"],Object(x.a)(),zi),Hi=c.c.div.withConfig({displayName:"styles__AlertContainer",componentId:"sc-efv8qo-0"})(["z-index:25;margin:15px;display:flex;padding:10px 15px;padding-right:10px;justify-content:space-between;border-radius:6px;background:#fff;background-color:#fff;box-shadow:0 3px 15px 1px ",";position:absolute;left:0;right:0;top:0;transition:top 150ms ease;",";",";"],u.a.shadowColor,e=>!e.isOnTop&&"top: 55px",Ui),$i=c.c.div.withConfig({displayName:"styles__AlertContent",componentId:"sc-efv8qo-1"})(["padding-right:5px;"]),Vi=Object(c.c)(P.e).withConfig({displayName:"styles__ContentText",componentId:"sc-efv8qo-2"})(["margin:0;"]),qi=Object(c.c)(fe.d).withConfig({displayName:"styles__ContentLink",componentId:"sc-efv8qo-3"})(["font-size:14px;font-weight:500;margin-top:5px;display:block;color:",";"],u.a.primaryColor),Gi=Object(c.c)(fe.a).withConfig({displayName:"styles__AlertDismiss",componentId:"sc-efv8qo-4"})(["z-index:15;display:flex;padding:0;height:fit-content;align-content:flex-start;flex-direction:column;&:hover{opacity:0.8;}svg path{stroke:",";}"],e=>e.theme.buttonBackground);var Wi=function(){const{welcomePageType:e}=Object(s.d)(w.d),{chatHasStarted:t,optionsScreenOpen:n}=Object(s.d)(w.e),{linkLocation:r,linkText:o,textContent:a}=Object(s.d)(w.m),c=Object(s.c)(),l=!t&&e!==y.s.NONE||n;return i.a.createElement(Hi,{isOnTop:l},i.a.createElement($i,null,i.a.createElement(Vi,null,a),r&&o&&i.a.createElement(qi,{href:r,target:"_blank",rel:"noopener noreferrer"},o)),i.a.createElement(Gi,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:e=>{e.stopPropagation(),c(Object(ue.s)())},type:"button"},i.a.createElement(h.e,{width:20,height:20,color:"#000"})))},Yi=n(79),Ki=n(70);const Xi=Object(So.a)();const Ji=Object(So.a)();var Qi=e=>{let{bodyBottomElement:t,bodyElement:n,newMessage:r,bodyTopElement:o,groupRef:i}=e;const{chatMessages:c}=Object(s.d)(w.n),{isTyping:l}=Object(s.d)(w.d),{isTyping:u}=Object(s.d)(w.a),[d,f]=Object(a.useState)(!1),[p,h]=Object(a.useState)(!0),m=Boolean(r)||l||u,g=m&&Boolean(r&&r.from_bot),b=Object(a.useCallback)(((e,t)=>()=>{var n,r;if(!e.current)return!0;const o=null!==(n=null==t||null===(r=t.current)||void 0===r?void 0:r.clientHeight)&&void 0!==n?n:0,{scrollTop:a,offsetHeight:i,scrollHeight:s}=e.current;return o>0||a+i>=s-1})(n,t),[t,n]),v=Object(a.useCallback)(((e,t)=>()=>{if(!e.current||!t.current)return!0;const{scrollTop:n,scrollHeight:r}=e.current,{offsetHeight:o}=t.current;return!(r-n-30>=o)})(n,i),[t,n]),x=Object(a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Ji?setTimeout(()=>{t.current.scrollIntoView()},300):t.current.scrollIntoView())})(n,t),[t,n]),E=Object(a.useCallback)(((e,t)=>()=>{t.current&&0!==e.current.scrollHeight&&(Ji?setTimeout(()=>{t.current.scrollIntoView()},300):t.current.scrollIntoView())})(n,o),[o,n]);Object(a.useEffect)(()=>{0===c.length&&h(!0)},[c]),Object(a.useEffect)(()=>{var e,t;const n=(null==r||null===(e=r.buttonType)||void 0===e?void 0:e.toUpperCase())===y.b.QUICK_REPLY,o=(null==r||null===(t=r.handler)||void 0===t?void 0:t.toUpperCase())===y.f.TRIGGER_DIALOGUE;(n||o)&&E()},[r,E]);const O=((e,t)=>{const n=Object(a.useRef)(),r=Object(a.useRef)(),o=Object(a.useCallback)(()=>{r&&r.current&&clearTimeout(r.current)},[]),i=Object(a.useCallback)((function(){o();for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];n.current=i,r.current=setTimeout(()=>e(...n.current),t)}),[o,t,e]);return Object(a.useEffect)(()=>o,[o]),i})(Object(a.useCallback)(()=>{b()||v()?(h(!0),f(!1)):h(!1)},[b,v]),300);return Object(a.useEffect)(()=>{setTimeout(()=>{!b()&&p&&(r&&function(){let{from_bot:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!e}(r)?x():E())})},[n,b,m,r,x,E,p]),Object(a.useEffect)(()=>{!g||d||b()||f(!0)},[b,g,d]),{shouldAutoScroll:p,scrollToBottom:x,scrollToLatestMessage:E,onUserScroll:O,hasUnreadMessage:d,isScrolledDown:b}};function Zi(e){let{buttonHandlers:t,onMessage:n=null}=e;const r=Object(a.useRef)(null),o=Object(a.useRef)(null),c=Object(a.useRef)(null),l=Object(a.useRef)(null),{hideHeader:u,fullscreenMode:d,offsetHeight:f}=Object(s.d)(w.d),{show:p,textContent:h}=Object(s.d)(w.m),{active:m,chatHasStarted:g,currentlyPoppedUp:b,contactDetailsButton:v,renderedBy:y}=Object(s.d)(w.e),{chatMessages:x}=Object(s.d)(w.n),E=(e=>{const t=le(e),n=(e||[]).length;return Object(a.useMemo)(()=>n&&n!==(t||[]).length&&e[n-1],[e,n,t])})(x),{scrollToBottom:O,scrollToLatestMessage:k,shouldAutoScroll:_,onUserScroll:C,hasUnreadMessage:j,isScrolledDown:T}=Qi({bodyBottomElement:o,bodyTopElement:c,bodyElement:r,newMessage:E,groupRef:l}),S=le(m);Object(a.useEffect)(()=>{m&&!S&&j&&O()},[j,m,O,S]);const[I,A]=Object(a.useState)(!0);Object(a.useEffect)(()=>{I?A(!1):Object(Ki.c)(Object(Yi.a)(E||{}),x.map(Yi.a),n,y)},[I,n,E,x,y]);const P=(e=>{const[t,n]=Object(a.useState)(!1),r=le(e);return Object(a.useEffect)(()=>{!e&&r&&n(!0)},[e,r]),t})(m),{showAboutChat:M,setShowAboutChat:L}=Oa(m),{showCancelConfirmation:R,setShowCancelConfirmation:D}=(e=>{const[t,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{t&&!e&&n(!1)},[e,t]),{showCancelConfirmation:t,setShowCancelConfirmation:n}})(m),{autoFocus:B,autoFocused:F}=(e=>{let{currentlyPoppedUp:t}=e;const[n,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{n&&r(!1)},[n]),{autoFocus:Object(a.useCallback)(()=>{n||Xi||t||r(!0)},[n,t]),autoFocused:n}})({currentlyPoppedUp:b}),z=Object(a.useCallback)(()=>{O(),B()},[B,O]);return i.a.createElement(N,{chatHasStarted:g,active:m,"aria-hidden":m?"false":"true","data-testid":"chat-box","data-cy":"chat-box",offsetHeight:f,fullscreen:d?1:0,"data-story":"ChatBoxContainer"},i.a.createElement(Fi.a,{errorPoint:"inside ChatBoxContainer"},!u&&i.a.createElement(fa,{cancelChat:R,setCancelChat:D}),i.a.createElement(Si,{showAboutChat:M,setShowAboutChat:L,showCancelConfirmation:R,setShowCancelConfirmation:D}),i.a.createElement(ge,null),p&&h&&i.a.createElement(Wi,null),i.a.createElement(Oo,{setAboutChat:L,hasUnreadMessage:j,onShowLatest:z,shouldAnimate:P,setBottomRef:o,setGroupRef:l,setTopRef:c,setBodyRef:r,scrollToBottom:O,scrollToLatestMessage:k,shouldAutoScroll:_,onUserScroll:C,buttonHandlers:t}),v?i.a.createElement(Bi,null):i.a.createElement(ua,{active:m,chatHasStarted:g,onManualFocus:O,isScrolledDown:T,autoFocused:F,currentlyPoppedUp:b})))}Zi.displayName="KindlyChatBox";var es=Zi;function ts(){const e=Object(s.c)(),{currentLanguage:t,active:n}=Object(s.d)(w.e),{maintenanceAlertEnabled:r,maintenanceAlert:o}=Object(s.d)(w.d),{defaultLanguage:i}=Object(ar.a)();Object(a.useEffect)(()=>{if(!n||!r)return;const a=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"alert_enabled"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(fi.a)(a,t,n)}},{}))(o,t,i);e(Object(ue.ab)(a))},[n,t,e,o,r,i])}var ns=n(171);const rs=Object.freeze({en:e=>`New message from ${e}`,nb:e=>`Ny melding fra ${e}`,sv:e=>`Nytt meddelande från ${e}`}),os=Object.freeze({en:"An agent joined the conversation",nb:"En agent ble med i samtalen",sv:"En agent gick med i samtalet"});let as=!1;function is(e){const t=document.title;let n;n||as||(as=!0,n=setInterval(()=>{document.title=document.title===e?t:e},1e3),window.addEventListener("mousemove",(function e(){clearInterval(n),document.title=t,n=null,as=!1,window.removeEventListener("mousemove",e)})))}var ss=n(51);var cs=n(68),ls=n(31),us=n(83),ds=n(73);const fs=e=>({[e]:o.a.func});o.a.shape({...Object(us.a)(fs,Object.values(y.b)),...Object(us.a)(fs,Object.values(y.b).map(ds.a))});var ps=n(46),hs=n(100);t.default=function(e){let{settings:t}=e;const n=Object(s.c)(),r=Object(a.useRef)(null),{active:o}=Object(s.d)(w.e),{open:c,imageUrl:l}=Object(s.d)(w.k),{inspectorOpen:u}=Object(s.d)(w.j),{chatMessages:d}=Object(s.d)(w.n),{takenOver:f}=Object(s.d)(w.a),m=le(f),x=le(d),E=localStorage.getItem("kindly-chat-restart-message"),O=Object(ls.a)(t,"fullscreenMode",!1),k=Object(ls.a)(t,"zIndex",y.d),_={...y.c,...Object(ls.a)(t,"position",{})},C=document.documentElement;Object(a.useEffect)(()=>{Object(So.a)()&&(C.style.overflow=o?"hidden":"unset")},[o,C]),Object(a.useEffect)(()=>{if(0===(null==x?void 0:x.length)&&1===(null==d?void 0:d.length)&&E){const{message:e,exchangeId:t,newContext:r}=JSON.parse(E);localStorage.removeItem("kindly-chat-restart-message"),n(Object(cs.h)(e,t,r))}},[n,d,x,E]),Object(a.useEffect)(()=>{m!==f&&f&&Object(hs.a)()},[m,f]),function(){const{tabNotification:e,name:t}=Object(s.d)(w.d),{showTabNotification:n}=Object(s.d)(w.b),{currentLanguage:r}=Object(s.d)(w.e),{takenOver:o}=Object(s.d)(w.a),{agent:i}=Object(s.d)(w.q),c=le(o);Object(a.useEffect)(()=>{if(e&&n){var o;is((null!==(o=null==rs?void 0:rs[r])&&void 0!==o?o:rs.en)(t||"Kindly"))}},[r,e,n,t]),Object(a.useEffect)(()=>{const e=Boolean(null==i?void 0:i.name);if(c!==o&&o&&e){var t;is(null!==(t=null==os?void 0:os[r])&&void 0!==t?t:os.en)}},[o,i,c,r])}(),Object(ns.a)(),function(){var e;const t=Object(s.c)(),[n,r]=Object(a.useState)("/"),{currentLanguage:o,active:i}=Object(s.d)(w.e),{nudges:c}=Object(s.d)(w.d),{defaultLanguage:l}=Object(ar.a)(),u=null!==(e=null==c?void 0:c.textNudges)&&void 0!==e?e:[];Object(a.useEffect)(()=>{r(window.location.href),!i&&o&&(null==u?void 0:u.length)>0&&(null!=u?u:[]).forEach(e=>!(!Object(ss.a)(n,e.url_trigger)||!e.enabled[o])&&t(Object(ue.db)({nudge:e,languageCode:o})))},[i,o,l,t,n,c,u])}(),ts(),(()=>{const{takenOver:e,requestedTakeover:t}=Object(s.d)(w.a),n=le(e),r=le(t),o=Object(s.c)();Object(a.useEffect)(()=>{e&&!n?o(Object(ue.kb)()):!e&&n&&o(Object(ue.hb)()),t&&!r?o(Object(ue.jb)()):!t&&r&&o(Object(ue.ib)())},[o,r,n,t,e])})(),function(e){const t=Object(a.useCallback)(t=>{e&&"Tab"===t.key&&e.current.classList.add("using-tab")},[e]),n=Object(a.useCallback)(()=>{e&&e.current.classList.remove("using-tab")},[e]);Object(a.useEffect)(()=>(document.body.addEventListener("keyup",t),document.body.addEventListener("mousedown",n),()=>{document.body.removeEventListener("keyup",t),document.body.removeEventListener("mousedown",n)}),[t,n])}(r);const j=Object(a.useCallback)(()=>{n(Object(ue.j)())},[n]),T=Object(a.useMemo)(()=>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,[Object(ps.a)(n)]:r}},{})}(t.buttonHandlers),[t.buttonHandlers]);return i.a.createElement(p,{id:"chatContainer",ref:r,className:"chat-container",role:"complementary",active:o,zIndex:k,fullscreen:O?1:0,position:_,"data-cy":"chat-box-container","data-story":"ChatContainer"},c&&i.a.createElement(b,{zIndex:k,onClick:j,autoFocus:!0},i.a.createElement(g,{zIndex:k,onClick:j,autoFocus:!0},i.a.createElement(h.e,{width:"30",height:"30"})),i.a.createElement(v,{src:l})),o&&i.a.createElement(es,{buttonHandlers:T,onMessage:t.onMessage}),u&&i.a.createElement(de,null))}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),a=n(0),i=n.n(a),s=n(3),c=n(1);const l=c.c.div.withConfig({displayName:"styles__NudgeBackdropContainer",componentId:"sc-1tcv57c-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 u=function(e){let{backdrop:t,onClick:n}=e;return i.a.createElement(l,{onClick:n,backdrop:t})},d=n(5),f=n(8),p=n(7),h=n(15),m=n(27),g=n(102),b=e=>{let{slug:t}=e;const[n,r]=Object(a.useState)({}),[o,i]=Object(a.useState)(!0),{defaultLanguage:c}=Object(h.a)(),l=Object(g.a)(),{currentLanguage:u}=Object(s.d)(p.e);return Object(a.useEffect)(()=>{let e={};const n=l.find(e=>e.slug===t);var o;n&&t&&(null!=n&&n.text_blocks?n.text_blocks.map(t=>{const n=Object(m.a)(t,u,c);e[t.slug]=n.value}):e=Object(m.a)(n,u,c),i(Boolean(null==n||null===(o=n.text_blocks)||void 0===o?void 0:o.length)),r(e))},[l,u,c,t]),{textContent:n,hasTextContent:o}};var v=function(){const{defaultLanguage:e}=Object(h.a)(),t=window.kindlyChat.APIRoot,n=Object(a.useRef)(t),{content:r,slug:o,onRendered:i}=Object(s.d)(p.o),{currentLanguage:c}=Object(s.d)(p.e),{textContent:l,hasTextContent:u}=b({slug:o});return Object(a.useEffect)(()=>{if(document.getElementById("kindly-custom-nudge"))return;const e="function"==typeof r?r(l):r;if(u&&0===Object.keys(l).length)return;const t=document.createElement("div");t.innerHTML=e,n.current.appendChild(t),t.setAttribute("id","kindly-custom-nudge"),"function"==typeof i&&i(t)},[r,c,e,o,l,i,u]),null},y=n(10);const w=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-7kvqgr-0"})(["margin:24px;display:flex;flex-direction:column;"]);var x=function(e){let{html:t,slug:n}=e;const{textContent:r}=b({slug:n});return i.a.createElement(w,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:"function"==typeof t?t(r):t}}))},E=(n(121),o.a.shape({success:o.a.string,error:o.a.string,input:o.a.shape({label:o.a.string,type:o.a.string,placeholder:o.a.string.isRequired,required:o.a.bool}),button:o.a.shape({title:o.a.string,icon:o.a.string,type:o.a.string})}),o.a.shape({id:o.a.string.isRequired,title:o.a.string,description:o.a.string,image:o.a.string.isRequired,price:o.a.string}),n(2)),O=n(33),k=n(9);const _=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1ywydhs-0"})(["margin:24px;display:flex;flex-direction:column;"]),C=c.c.h2.withConfig({displayName:"styles__Title",componentId:"sc-1ywydhs-1"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"]),j=c.c.p.withConfig({displayName:"styles__Description",componentId:"sc-1ywydhs-2"})(["line-height:22px;margin:0px;"]),T=c.c.a.withConfig({displayName:"styles__Link",componentId:"sc-1ywydhs-3"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]);var S=n(19);const I=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1aq8spp-0"})(["margin:24px;display:flex;flex-direction:column;"]),A=c.c.div.withConfig({displayName:"styles__FormGroup",componentId:"sc-1aq8spp-1"})(["display:grid;grid-template-columns:1fr 44px;align-items:end;grid-gap:16px;"]),N=c.c.div.withConfig({displayName:"styles__InputContainer",componentId:"sc-1aq8spp-2"})(["display:flex;flex-direction:column;"]),P=c.c.label.withConfig({displayName:"styles__Label",componentId:"sc-1aq8spp-3"})(["font-size:16px;line-height:19px;margin-left:8px;margin-bottom:8px;"]),M=c.c.input.withConfig({displayName:"styles__Input",componentId:"sc-1aq8spp-4"})(["border:none;padding:14px 16px;border-radius:22px;font-size:14px;background:",";background-color:",";&:focus{color:#2c2c2c;box-shadow:none;border:none;","}"],e=>e.theme.inputBackground,e=>e.theme.inputBackground,S.a),L=c.c.button.withConfig({displayName:"styles__Button",componentId:"sc-1aq8spp-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,S.a,e=>e.theme.buttonText);var R=function(e){let{buttonContent:t}=e;const{title:n}=t;return i.a.createElement(L,{role:"button",title:n,type:"submit"},i.a.createElement(y.p,{width:18,height:18}))};var D=function(e){let{value:t,setValue:n,inputContent:r}=e;const{label:o,type:a,placeholder:s,required:c}=r;return i.a.createElement(N,null,i.a.createElement(P,null,o),i.a.createElement(M,{"aria-label":s,"aria-labelledby":"newsletter-sign-up",name:o,placeholder:s,type:a||"text",value:t,onChange:e=>n(e.target.value),required:c}))};var B=function(e){let{form:t,onNewsletterSubmit:n,slug:r}=e;const o=Object(s.c)(),{dialogue:c,webhook:l}=Object(s.d)(p.o),{currentLanguage:u}=Object(s.d)(p.e),{defaultLanguage:d}=Object(h.a)(),[m,g]=Object(a.useState)(""),[b,v]=Object(a.useState)(!1),{success:y}=t;return i.a.createElement(I,null,b&&y?i.a.createElement(j,null,y):i.a.createElement("form",{autoComplete:"off",action:"#",onSubmit:e=>{if(e.preventDefault(),g(""),!m.trim())return!1;if(c&&o(Object(f.qb)(c,{openChat:!0,languageCode:u||d.code})),l){const t={event:e,email:m};o(Object(k.f)({method:"post",url:l,data:t}))}if("function"==typeof n)try{n(e,m)}catch(e){console.error(e)}return o(Object(f.ob)({slug:r,eventType:E.u})),v(!0)}},i.a.createElement(A,null,i.a.createElement(D,{value:m,setValue:g,inputContent:t.input}),i.a.createElement(R,{buttonContent:t.button}))))},F=n(21);const z=c.c.div.withConfig({displayName:"styles__Section",componentId:"sc-1cs3brm-0"})(["margin:24px;display:inline-flex;flex-wrap:wrap;gap:8px;"]),U=c.c.div.withConfig({displayName:"styles__SectionSeperator",componentId:"sc-1cs3brm-1"})(["height:1px;width:100%;background:rgba(0,0,0,0.1);"]);var H=function(e){let{choices:t,slug:n}=e;const r=Object(s.c)(),{currentLanguage:o}=Object(s.d)(p.e),{defaultLanguage:a}=Object(h.a)(),{buttons:c}=t;return i.a.createElement(i.a.Fragment,null,i.a.createElement(U,null),i.a.createElement(z,null,c.map(e=>{let{text:t,triggerDialogue:s}=e;return i.a.createElement(F.b,{color:!0,key:`${t}-${s}`,text:t,onClick:()=>{return e=s,r(Object(f.qb)(e,{openChat:!0,languageCode:o||a.code})),void r(Object(O.e)({slug:n,eventType:E.u,label:e}));var e}})})))},$=n(47),V=n(105),q=n(6),G=n(23);const W=c.c.a.withConfig({displayName:"stylesProduct__ProductWrapper",componentId:"sc-20xwq1-0"})(["text-decoration:none;color:initial;cursor:pointer;width:100%;"]),Y=c.c.div.withConfig({displayName:"stylesProduct__Product",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;}}"],S.a,q.c.maxPhone,q.a.shadowColor),K=c.c.img.withConfig({displayName:"stylesProduct__ProductImage",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.c.maxPhone),X=c.c.div.withConfig({displayName:"stylesProduct__Content",componentId:"sc-20xwq1-3"})(["max-width:100%;@media ","{padding:8px 16px;}"],q.c.maxPhone),J=Object(c.b)(["font-size:14px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"]),Q=c.c.a.withConfig({displayName:"stylesProduct__ActionLink",componentId:"sc-20xwq1-4"})([""," color:#333;display:block;margin-top:8px;text-decoration:underline;cursor:hover;"],J),Z=c.c.button.withConfig({displayName:"stylesProduct__ActionButton",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,G.a.default),ee=c.c.h3.withConfig({displayName:"stylesProduct__ProductTitle",componentId:"sc-20xwq1-6"})([""," font-weight:500;"],J),te=c.c.p.withConfig({displayName:"stylesProduct__ProductDescription",componentId:"sc-20xwq1-7"})([""," font-weight:400;"],J),ne=c.c.div.withConfig({displayName:"stylesProduct__ProductPrice",componentId:"sc-20xwq1-8"})([""," font-weight:500;"],J);function re(e){let{to:t,text:n,onClick:r}=e;return t?i.a.createElement(Q,{onClick:r,href:t},n):i.a.createElement(Z,{onClick:r},n)}var oe=function(e){var t,n,r,o,a,s;let{product:c,onProductClick:l}=e;const u=null!==(t=null==c?void 0:c.image)&&void 0!==t&&t,d=null!==(n=null==c?void 0:c.title)&&void 0!==n&&n,f=null!==(r=null==c?void 0:c.productUrl)&&void 0!==r&&r,p=null!==(o=null==c?void 0:c.description)&&void 0!==o&&o,h=(null==c?void 0:c.price)||!1,m=null!==(a=null==c?void 0:c.linkText)&&void 0!==a&&a,g=null!==(s=null==c?void 0:c.linkUrl)&&void 0!==s&&s;return i.a.createElement(Y,null,i.a.createElement(W,{href:f},u&&i.a.createElement(K,{src:u,alt:d}),i.a.createElement(X,null,d&&i.a.createElement(ee,null,d),p&&i.a.createElement(te,null,p),h&&i.a.createElement(ne,null,h))),m&&i.a.createElement(re,{to:g,text:m,onClick:e=>{if("function"==typeof l)try{l(e,c)}catch(e){console.error(e)}}}))};const ae=c.c.div.withConfig({displayName:"stylesProducts__Container",componentId:"sc-vfg4fr-0"})(["margin:24px;@media ","{margin:24px 0;}"],q.c.maxPhone),ie=c.c.div.withConfig({displayName:"stylesProducts__CarouselContainer",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 "),se=c.c.h2.withConfig({displayName:"stylesProducts__Title",componentId:"sc-vfg4fr-2"})(["font-size:16px;font-weight:500;line-height:26px;margin:16px 0px;@media ","{margin:16px 24px;}"],q.c.maxPhone);function ce(e){let{children:t,carouselPosition:n,onTouchStart:r,onTouchMove:o,onTouchEnd:a}=e;return i.a.createElement($.a.div,{transition:{ease:"easeInOut",duration:.3},style:{x:n},onTouchStart:r,onTouchMove:o,onTouchEnd:a},t)}var le=function(e){var t,n;let{section:r,onProductClick:o}=e;const{width:s}=(()=>{const[e,t]=Object(a.useState)({width:void 0,height:void 0});return Object(a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),c=parseInt(q.g.phone.replace("px",""),10),l=null!==(t=null==r?void 0:r.items)&&void 0!==t?t:[],u=null!==(n=null==r?void 0:r.title)&&void 0!==n&&n,{setIndex:d,imageIndex:f,carouselPosition:p}=(e=>{let{windowWidth:t,phoneWidth:n,ignoreDesktop:r=!0}=e;const[o,i]=Object(a.useState)(0),s=Object($.b)(0);return Object(a.useEffect)(()=>{t>=n&&r&&s.set(0)},[t,n,s,r]),{setIndex:Object(a.useCallback)((e,r)=>{if(t>=n)return;if(e<0||e>=r.length)return;const o=-217*e;i(e),s.set(o)},[t,n,s]),imageIndex:o,carouselPosition:s}})({windowWidth:s,phoneWidth:c}),{handleTouchStart:h,handleTouchMove:m,handleTouchEnd:g}=Object(V.a)({carousel:l,index:f,setIndex:d});return i.a.createElement(ae,null,u&&i.a.createElement(se,null,u),i.a.createElement(ie,{active:s<c},i.a.createElement(ce,{carouselPosition:p,onTouchStart:h,onTouchMove:m,onTouchEnd:g},l.map(e=>i.a.createElement(oe,{product:e,key:e.id,onProductClick:o})))))},ue=n(74);var de=function(e){let{buttons:t,slug:n}=e;const r=Object(s.c)(),o=t.length>0,c=Object(a.useCallback)(()=>{r(Object(O.e)({slug:n,eventType:E.u}))},[r,n]);return o?i.a.createElement(_,null,t.map((e,t)=>i.a.createElement(ue.a,{button:e,key:`${e.value}-${t}`,isNudge:!0,onClick:c}))):null};var fe=function(e){let{title:t,description:n,link:r,slug:o}=e;const c=Object(s.c)(),l=Object(a.useCallback)(e=>{e.preventDefault(),c(Object(O.e)({slug:o,eventType:E.u})),window.location.href=e.target.getAttribute("href")},[o]);return i.a.createElement(_,null,t&&i.a.createElement(C,null,t),n&&i.a.createElement(j,null,n),(null==r?void 0:r.location)&&(null==r?void 0:r.text)&&i.a.createElement(T,{href:r.location,onClick:l},r.text))};const pe=e=>e||{location:"",text:""};function he(e){var t,n,r,o,a,c,l,u;let{section:d,slug:f,onProductClick:p,onNewsletterSubmit:h}=e;const m=Object(s.c)(),g=null!==(t=null==d?void 0:d.title)&&void 0!==t&&t,b=null!==(n=null==d?void 0:d.description)&&void 0!==n&&n,v=null!==(r=null==d?void 0:d.buttons)&&void 0!==r&&r,y=null!==(o=null==d?void 0:d.products)&&void 0!==o&&o,w=null!==(a=null==d?void 0:d.choices)&&void 0!==a&&a,k=null!==(c=null==d?void 0:d.form)&&void 0!==c&&c,_=null!==(l=null==d?void 0:d.link)&&void 0!==l&&l,C=null!==(u=null==d?void 0:d.html)&&void 0!==u&&u;return i.a.createElement(i.a.Fragment,null,(g||b||_)&&i.a.createElement(fe,{title:g,description:b,link:pe(_),slug:f}),v&&i.a.createElement(de,{buttons:v,slug:f}),w&&i.a.createElement(H,{choices:w,slug:f}),y&&i.a.createElement(le,{section:y,onProductClick:(e,t)=>{if(null!=t&&t.productUrl?m(Object(O.e)({slug:f,eventType:E.u,label:t.productUrl})):console.warn("Could not track cta click with label:",t.productUrl),"function"==typeof p)try{p(e,t)}catch(e){console.error(e)}}}),k&&i.a.createElement(B,{form:k,onNewsletterSubmit:h,slug:f}),C&&i.a.createElement(x,{html:C,slug:f}))}var me=e=>{var t;let{layout:n,slug:r,onProductClick:o,onNewsletterSubmit:a}=e;return(null!==(t=null==n?void 0:n.sections)&&void 0!==t?t:[]).map((e,t)=>i.a.createElement(he,{key:`section-${t}`,section:e,slug:null!=r?r:null,onProductClick:o,onNewsletterSubmit:a}))},ge=n(43);var be=function(e){let{bubbleHidden:t,show:n,slug:r,layout:o,onDismiss:a,onProductClick:s,onNewsletterSubmit:c}=e;return i.a.createElement(ge.b,{bubbleHidden:t,"aria-hidden":n?"false":"true","data-cy":"nudge-container","data-story":"NudgeContainer"},i.a.createElement(ge.a,null),i.a.createElement(ge.c,{"aria-label":"Dismiss pushMessage",title:"Dismiss pushMessage",onClick:a,type:"button","data-cy":"close-nudge-button"},i.a.createElement(y.e,{width:25,height:25})),i.a.createElement(ge.d,null,i.a.createElement(me,{layout:o,slug:r,onProductClick:s,onNewsletterSubmit:c})))};t.default=function(e){var t;let{hidden:n,layout:r,onDismiss:o,onProductClick:c,onNewsletterSubmit:l}=e;const{show:h,nudgeType:m,slug:g}=Object(s.d)(p.o),b=null!==(t=null==r?void 0:r.backdrop)&&void 0!==t&&t,y=Object(s.c)(),w=Object(a.useCallback)(e=>{if(e.stopPropagation(),y(Object(f.u)()),"function"==typeof o)try{o(e)}catch(e){console.error(e)}},[o,y]);return i.a.createElement(i.a.Fragment,null,b&&i.a.createElement(u,{backdrop:b,onClick:w}),m===d.i.TEMPLATE&&i.a.createElement(be,{show:h,layout:r,slug:g,onDismiss:w,onProductClick:c,onNewsletterSubmit:l,bubbleHidden:n}),m===d.i.CUSTOM&&i.a.createElement(v,null))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(3),i=n(10),s=(n(4),n(21));function c(e){const[t,n]=Object(r.useState)(!1);return[t,Object(r.useCallback)(t=>{n(!0),e(t)},[e])]}n(39);var l=n(1),u=n(6),d=n(43);const f="cubic-bezier(0.18, 0.58, 0.37, 0.92)",p=Object(l.c)(d.c).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackDismiss",componentId:"sc-c01o0q-0"})([""]),h=Object(l.c)(d.a).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackBorderElement",componentId:"sc-c01o0q-1"})([""]),m=Object(l.c)(d.b).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackContainer",componentId:"sc-c01o0q-2"})(["z-index:20;",";@media ","{z-index:20;}"],e=>{let{modal:t}=e;return t&&"\n right: unset;\n bottom: unset;\n "},u.c.maxPhone),g=Object(l.c)(d.d).withConfig({displayName:"NudgeFeedbackstyles__NudgeFeedbackInner",componentId:"sc-c01o0q-3"})(["min-width:380px;padding:0 20px;@media ","{padding:0 12px;max-width:",";width:auto;min-width:auto;}"],u.c.maxPhone,u.g.phone),b=(l.c.div.withConfig({displayName:"NudgeFeedbackstyles__Section",componentId:"sc-c01o0q-4"})(["margin:24px;display:flex;flex-direction:column;"]),l.c.h2.withConfig({displayName:"NudgeFeedbackstyles__Title",componentId:"sc-c01o0q-5"})(["font-size:16px;font-weight:500;line-height:26px;margin:0 0 16px 0;"])),v=l.c.p.withConfig({displayName:"NudgeFeedbackstyles__Description",componentId:"sc-c01o0q-6"})(["line-height:22px;"]),y=(l.c.a.withConfig({displayName:"NudgeFeedbackstyles__Link",componentId:"sc-c01o0q-7"})(["line-height:22px;margin:0 0 16px 0;color:#0069ff;"]),l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackContainer",componentId:"sc-c01o0q-8"})(["border-radius:14px;overflow:hidden;position:relative;background:#fff;background-color:#fff;height:100%;width:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:24px 0;opacity:0;",";transition:opacity 0.15s linear 0.2s,transform "," 300ms;"],e=>e.hasEntered&&"opacity: 1",f)),w=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackFormContent",componentId:"sc-c01o0q-9"})(["text-align:center;width:100%;"," ",""],e=>e.ratingSent&&`transition: all ${f} 300ms;`,e=>e.finished&&"z-index: 11; position: relative; opacity: 0;"),x=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackThanksContainer",componentId:"sc-c01o0q-10"})(["opacity:0;margin-top:16px;text-align:center;transition:all "," 300ms;",""],f,e=>{let{finished:t}=e;return t&&"opacity: 1;"}),E=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackStepContainer",componentId:"sc-c01o0q-11"})(["width:100%;opacity:1;transition:all "," 300ms;",""],f,e=>{let{hasRated:t}=e;return t&&"display: none;"}),O=l.c.div.withConfig({displayName:"NudgeFeedbackstyles__FeedbackEmojiContainer",componentId:"sc-c01o0q-12"})(["height:fit-content;min-height:35px;cursor:pointer;margin:0 0 16px 0;transition:all ease 300ms;",";"],e=>e.hovering&&"\n .emoji.chosen {\n opacity: 1;\n }\n .emoji:not(.chosen) {\n opacity: 0.4;\n }\n "),k=l.c.span.withConfig({displayName:"NudgeFeedbackstyles__StyledEmoji",componentId:"sc-c01o0q-13"})(["display:inline-block;margin:0 10px;transition:opacity 0.1s linear;background:none;border:none;padding:0;cursor:pointer;"]),_=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1qibng2-0"})([""]),C=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1qibng2-1"})([""]),j=l.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-1qibng2-2"})(["display:flex;justify-content:center;margin-top:30px;button{width:70px;min-width:auto;margin:0 15px;}"]);var T=function(e){let{submit:t,textContent:n}=e;const[r,a]=c(t),{binary_headline:i,binary_1:l,binary_0:u}=n;return o.a.createElement(C,{hasRated:r},o.a.createElement(_,null,i),o.a.createElement(j,null,o.a.createElement(s.b,{type:"submit",onClick:()=>a(2),color:!0,flat:!0,text:l}),o.a.createElement(s.b,{type:"submit",onClick:()=>a(1),color:!0,flat:!0,text:u})))},S=n(172),I=n.n(S),A=n(173),N=n.n(A),P=n(174),M=n.n(P);const L=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1krelmc-0"})([""]),R=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1krelmc-1"})([""]),D=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1krelmc-2"})([""]),B=Object(l.c)(O).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1krelmc-3"})([""]),F=Object(l.c)(k).withConfig({displayName:"styles__Emoji",componentId:"sc-1krelmc-4"})([""]),z=l.c.img.withConfig({displayName:"styles__EmojiImage",componentId:"sc-1krelmc-5"})(["height:35px;width:35px;"]),U={1:{src:M.a,description:"sad face"},2:{src:N.a,description:"neutral face"},3:{src:I.a,description:"happy face"}};function H(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{src:s,description:c}=U[t];return o.a.createElement(F,{className:`emoji ${i?"chosen":""}`,onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":c,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o.a.createElement(z,{src:s,alt:`${c} emoji`}))}var $=function(e){let{submit:t,textContent:n}=e;const[a,i]=Object(r.useState)(!1),[s,l]=Object(r.useState)(0),[u,d]=c(t),{emoji_guideline:f,emoji_headline:p}=n;return o.a.createElement(D,{hasRated:u},o.a.createElement(L,null,p),o.a.createElement(B,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[1,2,3].map(e=>o.a.createElement(H,{key:`chat-feedback-emoji-${e}`,number:e,selected:s,setTentativeRating:l,setRating:d}))),o.a.createElement(R,null,f))},V=n(8),q=n(26);const G=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-r8xh7-0"})([""]),W=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-r8xh7-1"})([""]),Y=l.c.a.withConfig({displayName:"styles__LinkButton",componentId:"sc-r8xh7-2"})([""," text-decoration:none;font-size:15px;width:fit-content;margin:0 auto;padding:11px 20px;font-weight:500;"],q.e);var K=function(e){let{textContent:t}=e;const{external_link_headline:n,external_link_text:i,external_link_url:s}=t,c=Object(a.c)(),l=Object(r.useCallback)(()=>c(Object(V.w)()),[c]);return o.a.createElement(W,{hasRated:!1},n&&i&&o.a.createElement(G,null,n),o.a.createElement(Y,{href:s,onClick:l,target:"_blank",rel:"noopener noreferrer",$color:!0},i||n))};var X=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#97cd72"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,131.5a8.33,8.33,0,0,0-3.8.33c-8,2.78-20.62,4.58-34.91,4.58s-27-1.81-34.94-4.59c-.81-.2-3.45-.79-4.35-.15-.51.36-.2.8.25,1.16,7.16,4.38,21.93,8.77,39,8.77s31.74-4.36,39-8.71C139.53,132.44,140,131.78,138.82,131.5Z",fill:"#231e20"}))};var J=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#f47d7f"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,141.47a8.33,8.33,0,0,1-3.8-.32c-8-2.78-20.62-4.58-34.91-4.58s-27,1.8-34.94,4.59c-.81.2-3.45.79-4.35.15-.51-.37-.2-.81.25-1.17,7.16-4.37,21.93-8.76,39-8.76s31.74,4.36,39,8.7C139.53,140.54,140,141.2,138.82,141.47Z",fill:"#231e20"}))};var Q=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#00a24a"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("path",{d:"M138.82,119.86c-1.26-1-2.94.14-3.8,1.08-8,9.27-20.62,15.28-34.91,15.28s-27-6-34.94-15.31c-.62-.8-3.05-2.42-4.35-.51-.93,1.38-.26,2.56.25,3.89,7.16,14.6,21.93,29.25,39,29.25s31.74-14.55,39-29C140.23,121.81,140,120.78,138.82,119.86Z",fill:"#231e20"}))};var Z=function(){return o.a.createElement("svg",{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 200 200"},o.a.createElement("circle",{cx:"100",cy:"100",r:"100",fill:"#ee2324"}),o.a.createElement("path",{d:"M138.78,153.13c-1.25,1-2.94-.13-3.8-1.08-7.95-9.27-20.62-15.28-34.9-15.28s-27,6-34.95,15.32c-.61.79-3,2.42-4.34.5-.94-1.38-.27-2.55.24-3.88C68.2,134.1,83,119.45,100.08,119.45S131.82,134,139,148.5C140.2,151.18,139.92,152.21,138.78,153.13Z",fill:"#231e20"}),o.a.createElement("circle",{cx:"73.1",cy:"70.11",r:"12.64",fill:"#231e20"}),o.a.createElement("circle",{cx:"125.97",cy:"70.11",r:"12.64",fill:"#231e20"}))};const ee=Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1wxcq1r-0"})([""]),te=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1wxcq1r-1"})([""]),ne=Object(l.c)(E).withConfig({displayName:"styles__StepContainer",componentId:"sc-1wxcq1r-2"})([""]),re=Object(l.c)(O).withConfig({displayName:"styles__EmojiContainer",componentId:"sc-1wxcq1r-3"})([""]),oe=Object(l.c)(k).withConfig({displayName:"styles__Emoji",componentId:"sc-1wxcq1r-4"})(["width:37px;margin:0 4px;"]),ae={1:{Component:Z,description:"very unhappy"},2:{Component:J,description:"unhappy"},3:{Component:X,description:"happy"},4:{Component:Q,description:"very happy"}};function ie(e){let{number:t,selected:n,setTentativeRating:r,setRating:a}=e;const i=n===t,{Component:s,description:c}=ae[t];return o.a.createElement(oe,{className:`emoji ${i?"chosen":""}`,onFocus:()=>r(t),onBlur:()=>r(0),onMouseEnter:()=>r(t),onMouseLeave:()=>r(0),role:"radio",tabIndex:"0","aria-checked":n?"true":"false","aria-label":c,onKeyPress:e=>{"Enter"===e.key&&(a(t),e.preventDefault(),e.stopPropagation())},onClick:()=>a(t)},o.a.createElement(s,{alt:`${c} emoji`}))}var se=function(e){let{submit:t,textContent:n}=e;const[a,i]=Object(r.useState)(!1),[s,l]=Object(r.useState)(0),[u,d]=c(t),{emoji_guideline:f,emoji_headline:p}=n;return o.a.createElement(ne,{hasRated:u},o.a.createElement(ee,null,p),o.a.createElement(re,{hovering:a,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},[4,3,2,1].map(e=>o.a.createElement(ie,{key:`chat-feedback-happy-or-not-${e}`,number:e,selected:s,setTentativeRating:l,setRating:d}))),o.a.createElement(te,null,f))},ce=n(19);Object(l.c)(b).withConfig({displayName:"styles__Title",componentId:"sc-1jtf9kh-0"})([""]);const le=Object(l.c)(v).withConfig({displayName:"styles__Description",componentId:"sc-1jtf9kh-1"})([""]),ue=Object(l.c)(E).withConfig({displayName:"styles__FreeformContainer",componentId:"sc-1jtf9kh-2"})(["z-index:11;opacity:0;visibility:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;",";",""],e=>{let{hasEntered:t}=e;return t&&"\n opacity: 1;\nvisibility: visible;"},e=>{let{finished:t}=e;return t&&"display: none;"}),de=l.c.textarea.withConfig({displayName:"styles__FreeformTextarea",componentId:"sc-1jtf9kh-3"})(["resize:none;width:100%;min-height:100px;max-width:250px;padding:6px 10px;background:",";font-size:14px;margin-bottom:30px;line-height:22px;color:#2c2c2c;font-family:Open sans,Helvetica Neue,Helvetica,Arial,sans-serif !important;border:1px solid #dedede;border-radius:6px;z-index:10;@media ","{font-size:16px;}"," &:hover,&:focus{color:#2c2c2c;border:1px solid #dedede;}"],u.a.grayColor,u.c.maxTablet,ce.a);var fe=function(e){let{submit:t,textContent:n,finished:a}=e;const[i,c]=Object(r.useState)(!1),[l,u]=Object(r.useState)(""),{freeform_description:d,freeform_placeholder:f,send:p}=n;Object(r.useEffect)(()=>{c(!0)},[]);const h=Object(r.useCallback)(e=>{"Enter"===e.key&&t(l)},[l,t]),m=Object(r.useCallback)(e=>{u(e.target.value)},[]);return o.a.createElement(ue,{hasEntered:i,finished:a},o.a.createElement(le,null,d),o.a.createElement(de,{"data-cy":"feedback-freefrom-textarea",rows:4,value:l,onChange:m,placeholder:f}),o.a.createElement(s.b,{color:!0,flat:!0,text:p,type:"submit",onClick:()=>t(l),onKeyDown:h}))},pe=n(5),he=n(15),me=n(7),ge=n(41),be=(n(49),n(23));const ve=l.c.div.withConfig({displayName:"NudgeFeedbackWrapperstyles__Wrapper",componentId:"sc-1eqo0i0-0"})(["background:",";position:",";width:",";height:",";top:58px;left:0;z-index:",";display:flex;justify-content:center;align-items:center;font-family:",";"],e=>{let{modal:t,theme:n}=e;return t?n.background:"none"},e=>{let{modal:t}=e;return t?"fixed":"unset"},e=>{let{modal:t}=e;return t?"100%":0},e=>{let{modal:t}=e;return t?"100%":0},e=>{let{zIndex:t}=e;return`${t+10}`},be.a.default);var ye=function(e){let{children:t,modal:n,zIndex:r}=e;return o.a.createElement(ve,{modal:n,zIndex:r},t)};t.default=function(){const[e,t]=Object(r.useState)(!1),[n,s]=Object(r.useState)(!1),[c,l]=Object(r.useState)(!1),{show:u}=Object(a.d)(me.o),{currentLanguage:d}=Object(a.d)(me.e),{fullscreenMode:f,zIndex:v}=Object(a.d)(me.d),{feedbackForm:E,feedbackForm:{freeform_enabled:O},feedbackFormType:k}=Object(a.d)(me.d),_=Object(a.c)(),{defaultLanguage:C}=Object(he.a)(),j=((e,t,n)=>Object.entries(e).filter(e=>{let[t]=e;return"freeform_enabled"!==t}).reduce((e,r)=>{let[o,a]=r;return{...e,[o]:Object(ge.a)(a,t,n)}},{}))(E,d,C);Object(r.useEffect)(()=>{l(!0)},[]);const S=Object(r.useCallback)(()=>{_(Object(V.i)())},[_]),I=Object(r.useCallback)(()=>{t(!0),setTimeout(()=>_(Object(V.i)()),2e3)},[_]),A=Object(r.useCallback)(e=>{_(Object(V.N)(e)),O?s(!0):I()},[I,_,O]),N=Object(r.useCallback)(e=>{_(Object(V.O)(e)),I()},[I,_]);let P;switch(k){case pe.r.BINARY:P=T;break;case pe.r.EMOJIS:P=$;break;case pe.r.HAPPY_OR_NOT:P=se;break;case pe.r.EXTERNAL_LINK:P=K;break;default:console.error(`Feedback form type '${k}' not recognized`),P=function(){return null}}return o.a.createElement(ye,{modal:f,zIndex:v},o.a.createElement(m,{ariaHidden:u&&!f?"false":"true",modal:f,"data-cy":"feedback-nudge-container","data-story":"NudgeFeedbackContainer"},o.a.createElement(h,{modal:f}),o.a.createElement(p,{"aria-label":"Dismiss feedback",title:"Dismiss feedback",onClick:S,type:"button",modal:f},o.a.createElement(i.e,{width:25,height:25})),o.a.createElement(g,{modal:f},o.a.createElement(y,{hasEntered:c,finished:e},o.a.createElement(w,{finished:e,ratingSent:n},o.a.createElement(P,{textContent:j,submit:A}),n&&o.a.createElement(fe,{textContent:j,submit:N,finished:e})),e&&o.a.createElement(x,{finished:e},o.a.createElement(b,null,j.thanks))))))}},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n.n(r);var a=e=>Object(r.isValidElement)(e)&&Boolean(e.props.children);var i=e=>Object(r.isValidElement)(e)&&a(e)&&r.Children.toArray(e.props.children).reduce((e,t)=>e||Object(r.isValidElement)(t),!1);const s=(e,t)=>r.Children.toArray(e).map((e,n,o)=>Object(r.isValidElement)(e)&&i(e)?t(Object(r.cloneElement)(e,{...e.props,children:s(e.props.children,t)})):t(e,n,o));var c=s,l=n(36),u=n(3);function d(e){let{width:t,height:n,color:r}=e;return o.a.createElement("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none"},o.a.createElement("path",{d:"m10.75 8.75 3.5 3.25-3.5 3.25",stroke:r,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}d.defaultProps={width:24,height:24,color:"#333"};var f=d,p=n(21),h=n(7),m=n(109),g=n(80),b=n(48);const v=(e,t)=>o.a.cloneElement(e,t);function y(e){let{defaultValues:t,children:n,onSubmit:r,shouldUnregister:a,clearOnSubmit:i,className:s,sendButtonTitle:d,cancelButtonTitle:y,ariaLabel:w,onCancel:x}=e;const{register:E,handleSubmit:O,getValues:k,reset:_,control:C,setError:j,trigger:T,clearErrors:S,formState:{isSubmitting:I,isSubmitted:A}}=Object(l.b)({...t&&{defaultValues:t},...a&&{shouldUnregister:!0},mode:"onSubmit",reValidateMode:"onBlur"}),{currentLanguage:N}=Object(u.d)(h.e);return o.a.createElement(g.a,{onSubmit:O(async e=>{if(void 0!==Object.values(e).find(e=>!!e))try{await r(e),i&&_()}catch(e){throw _(),e}}),"aria-label":w,isSubmitted:A,className:s,noValidate:!0},c(n,e=>e?(e=>{var t,n,r,a,i,s;if(null!=e&&null!==(t=e.props)&&void 0!==t&&t.name)return e.props.controller?o.a.createElement(l.a,Object.assign({key:e.key,control:C,render:t=>v(e,{...e.props,...t}),rules:Object(b.c)(e.props.validators,N)},e.props)):v(e,{register:E,setError:j,clearErrors:S,trigger:T,control:C});switch(null==e||null===(n=e.type)||void 0===n?void 0:n.name){case m.a.name:return v(e,{placeholder:null===(r=e.props)||void 0===r||null===(a=r.children)||void 0===a||null===(i=a[0].props)||void 0===i?void 0:i.placeholder_text,...!(null!==(s=e.props)&&void 0!==s&&s.htmlFor)&&{htmlFor:e.props.slug}});default:return e}})(e):null),o.a.createElement(g.b,null,o.a.createElement(p.b,{disabled:I,onClick:()=>{const e=k();x(e)},text:y}),o.a.createElement(p.b,{type:"submit",icon:o.a.createElement(f,{color:"#fff",width:16,height:16}),loading:I,text:d,color:!0})))}y.defaultProps={defaultValues:null,shouldUnregister:null,className:null,clearOnSubmit:!1,sendButtonTitle:"Submit",cancelButtonTitle:"Exit",ariaLabel:null,onCancel:null};t.default=y},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n.n(r),a=n(3),i=n(10),s=n(8),c=n(7),l=n(1),u=n(11),d=n(12),f=n(6);const p=Object(l.b)(["display:flex;overflow:hidden;z-index:-1;min-width:125px;height:45px;"]),h=l.c.div.withConfig({displayName:"styles__ToolsContainer",componentId:"sc-vkneg1-0"})(["z-index:0;width:15px;border-radius:7px;min-width:80px;margin-right:-25px;background:#fff;background-color:#fff;position:absolute;right:50px;box-shadow:0px 1px 5px 0px ",";transition:all 0.2s ease;",";",";"],f.a.shadowColorDark,e=>{let{hasInspector:t}=e;return t&&p},e=>{let{active:t}=e;return!t&&"min-width: 0"}),m=l.c.div.withConfig({displayName:"styles__LanguageContainer",componentId:"sc-vkneg1-1"})(["padding:2px;border-radius:7px;background:#fff;background-color:#fff;box-shadow:0px 1px 5px 0px ",";right:110px;display:flex;position:absolute;min-width:max-content;justify-content:center;",";"],f.a.shadowColorDark,u.f),g=Object(l.c)(d.d).withConfig({displayName:"styles__LanguageText",componentId:"sc-vkneg1-2"})(["color:#757575;margin:0;cursor:pointer;font-size:12px;font-weight:500;text-decoration:none;:hover{text-decoration:underline;}"]),b=l.c.div.withConfig({displayName:"styles__ButtonContainer",componentId:"sc-vkneg1-3"})(["display:flex;padding:2px;align-items:center;justify-content:space-between;"]),v=Object(l.c)(d.a).withConfig({displayName:"styles__ToolButton",componentId:"sc-vkneg1-4"})(["display:flex;position:relative;align-items:center;padding:13px;border-radius:7px;transition:all 0.15s ease;:hover{background:#",";background-color:#",";svg path{fill:#000;}:after{border-left-color:#000;}}"," ",""],f.a.grayColor,f.a.grayColor,e=>e.active&&`\n background: #${f.a.grayColor};\n background-color: #${f.a.grayColor};\n svg path {\n fill: #000;\n }\n `,e=>e.tail&&`\n :after {\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n right: 5px;\n bottom: 3px;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n border-left: 3px solid ${e.active?"#000":f.a.primaryColor};\n transform: rotate(45deg);\n }`);var y=n(72),w=n(68);t.default=function(e){let{active:t}=e;const[n,l]=Object(r.useState)(!1),{botKey:u,admin:d}=Object(a.d)(c.e),{languages:f}=Object(a.d)(c.d),{inspectorOpen:p}=Object(a.d)(c.j),x=Object(a.c)(),E=Object(r.useCallback)(()=>{x(Object(s.mb)())},[x]);return function(){var e,t;const n=Object(a.c)(),{admin:o}=Object(a.d)(c.e),{chatMessages:i}=Object(a.d)(c.n)||[],s=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,l=Object(y.a)(e=>{n(Object(w.h)(e))},1e3),u=Object(r.useCallback)(e=>{e.altKey&&"KeyR"===e.code&&s&&l(s)},[s,l]);Object(r.useEffect)(()=>{if(o)return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[u,o])}(),o.a.createElement(o.a.Fragment,null,n&&t&&o.a.createElement(m,null,f.map(e=>o.a.createElement(v,{key:e.code,title:`Restart ${e.name}`,onClick:()=>{return t=e.code,x(Object(s.R)(t)),void l(!1);var t}},o.a.createElement(g,null,e.code.toUpperCase())))),o.a.createElement(h,{active:t,hasInspector:d},d&&o.a.createElement(b,null,o.a.createElement(v,{onClick:E,title:p?"Close chat inspector":"Open chat inspector"},p?o.a.createElement(i.i,null):o.a.createElement(i.j,null))),o.a.createElement(b,null,o.a.createElement(v,{title:"Restart chat",onClick:()=>{f.length>1?l(!n):x(Object(s.fb)(u,!0))},active:n,tail:f.length>1},o.a.createElement(i.o,{width:15,height:15})))))}}])}));
|