vendor: 5,504 bytes, line 1
1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__||=[]).push([[3743],{93743(t,e,n){n.d(e,{B:()=>U,C:()=>Lt,E:()=>qe,F:()=>_t,G:()=>B,K:()=>Vt,L:()=>li,M:()=>Mt,T:()=>pt,U:()=>Nt,_:()=>ut,h:()=>dt,k:()=>m,l:()=>oi,o:()=>ae,p:()=>ht,q:()=>gt,x:()=>xt,y:()=>ue});var i,o,r,s,a,l,c,d,h={},u=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function g(t,e){for(var n in e)t[n]=e[n];return t}function f(t){var e=t.parentNode;e&&e.removeChild(t)}function y(t,e,n){var o,r,s,a={};for(s in e)"key"==s?o=e[s]:"ref"==s?r=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return v(t,a,o,r,null)}function v(t,e,n,i,s){var a={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:s??++r};return null==s&&null!=o.vnode&&o.vnode(a),a}function m(t){return t.children}function w(t,e){this.props=t,this.context=e}function b(t,e){if(null==e)return t.__?b(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof t.type?b(t):null}function C(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return C(t)}}function S(t){(!t.__d&&(t.__d=!0)&&s.push(t)&&!E.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||l)(E)}function E(){var t,e,n,i,o,r,a,l,d;for(s.sort(c);t=s.shift();)t.__d&&(e=s.length,i=void 0,o=void 0,r=void 0,l=(a=(n=t).__v).__e,(d=n.__P)&&(i=[],o=[],(r=g({},a)).__v=a.__v+1,N(d,a,r,n.__n,void 0!==d.ownerSVGElement,null!=a.__h?[l]:null,i,l??b(a),a.__h,o),D(i,a,o),a.__e!=l&&C(a)),s.length>e&&s.sort(c));E.__r=0}function k(t,e,n,i,o,r,s,a,l,c,d){var _,g,f,y,w,C,S,E,k,I=0,P=i&&i.__k||u,j=P.length,O=j,A=e.length;for(n.__k=[],_=0;_<A;_++)null!=(y=n.__k[_]=null==(y=e[_])||"boolean"==typeof y||"function"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?v(null,y,null,null,y):p(y)?v(m,{children:y},null,null,null):y.__b>0?v(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)?(y.__=n,y.__b=n.__b+1,-1===(E=L(y,P,S=_+I,O))?f=h:(f=P[E]||h,P[E]=void 0,O--),N(t,y,f,o,r,s,a,l,c,d),w=y.__e,(g=y.ref)&&f.ref!=g&&(f.ref&&M(f.ref,null,y),d.push(g,y.__c||w,y)),null!=w&&(null==C&&(C=w),(k=f===h||null===f.__v)?-1==E&&I--:E!==S&&(E===S+1?I++:E>S?O>A-S?I+=E-S:I--:I=E<S&&E==S-1?E-S:0),S=_+I,"function"!=typeof y.type||E===S&&f.__k!==y.__k?"function"==typeof y.type||E===S&&!k?void 0!==y.__d?(l=y.__d,y.__d=void 0):l=w.nextSibling:l=T(t,w,l):l=x(y,l,t),"function"==typeof n.type&&(n.__d=l))):(f=P[_])&&null==f.key&&f.__e&&(f.__e==l&&(f.__=i,l=b(f)),R(f,f,!1),P[_]=null);for(n.__e=C,_=j;_--;)null!=P[_]&&("function"==typeof n.type&&null!=P[_].__e&&P[_].__e==n.__d&&(n.__d=P[_].__e.nextSibling),R(P[_],P[_]))}function x(t,e,n){for(var i,o=t.__k,r=0;o&&r<o.length;r++)(i=o[r])&&(i.__=t,e="function"==typeof i.type?x(i,e,n):T(n,i.__e,e));return e}function I(t,e){return e=e||[],null==t||"boolean"==typeof t||(p(t)?t.some(function(t){I(t,e)}):e.push(t)),e}function T(t,e,n){return null==n||n.parentNode!==t?t.insertBefore(e,null):e==n&&null!=e.parentNode||t.insertBefore(e,n),e.nextSibling}function L(t,e,n,i){var o=t.key,r=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&o==l.key&&r===l.type)return n;if(i>(null!=l?1:0))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&o==l.key&&r===l.type)return s;s--}if(a<e.length){if((l=e[a])&&o==l.key&&r===l.type)return a;a++}}return-1}function P(t,e,n){"-"===e[0]?t.setProperty(e,n??""):t[e]=null==n?"":"number"!=typeof n||_.test(e)?n:n+"px"}function j(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||P(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||P(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=Date.now(),t.addEventListener(e,r?A:O,r)):t.removeEventListener(e,r?A:O,r);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=n??"";break t}catch{}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function O(t){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(o.event?o.event(t):t)}function A(t){return this.l[t.type+!0](o.event?o.event(t):t)}function N(t,e,n,r,s,a,l,c,d,u){var _,y,v,C,S,E,x,I,T,L,P,O,A,N,D,M=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(d=n.__h,c=e.__e=n.__e,e.__h=null,a=[c]),(_=o.__b)&&_(e);t:if("function"==typeof M)try{if(I=e.props,T=(_=M.contextType)&&r[_.__c],L=_?T?T.props.value:_.__:r,n.__c?x=(y=e.__c=n.__c).__=y.__E:("prototype"in M&&M.prototype.render?e.__c=y=new M(I,L):(e.__c=y=new w(I,L),y.constructor=M,y.render=W),T&&T.sub(y),y.props=I,y.state||(y.state={}),y.context=L,y.__n=r,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=M.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=g({},y.__s)),g(y.__s,M.getDerivedStateFromProps(I,y.__s))),C=y.props,S=y.state,y.__v=e,v)null==M.getDerivedStateFromProps&&null!=y.componentWillMount&&y.c
vendor: 4,857 bytes, line 1
1omponentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==M.getDerivedStateFromProps&&I!==C&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(I,L),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(I,y.__s,L)||e.__v===n.__v)){for(e.__v!==n.__v&&(y.props=I,y.state=y.__s,y.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(t){t&&(t.__=e)}),P=0;P<y._sb.length;P++)y.__h.push(y._sb[P]);y._sb=[],y.__h.length&&l.push(y);break t}null!=y.componentWillUpdate&&y.componentWillUpdate(I,y.__s,L),null!=y.componentDidUpdate&&y.__h.push(function(){y.componentDidUpdate(C,S,E)})}if(y.context=L,y.props=I,y.__P=t,y.__e=!1,O=o.__r,A=0,"prototype"in M&&M.prototype.render){for(y.state=y.__s,y.__d=!1,O&&O(e),_=y.render(y.props,y.state,y.context),N=0;N<y._sb.length;N++)y.__h.push(y._sb[N]);y._sb=[]}else do{y.__d=!1,O&&O(e),_=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++A<25);y.state=y.__s,null!=y.getChildContext&&(r=g(g({},r),y.getChildContext())),v||null==y.getSnapshotBeforeUpdate||(E=y.getSnapshotBeforeUpdate(C,S)),k(t,p(D=null!=_&&_.type===m&&null==_.key?_.props.children:_)?D:[D],e,n,r,s,a,l,c,d,u),y.base=e.__e,e.__h=null,y.__h.length&&l.push(y),x&&(y.__E=y.__=null)}catch(t){e.__v=null,(d||null!=a)&&(e.__e=c,e.__h=!!d,a[a.indexOf(c)]=null),o.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(t,e,n,o,r,s,a,l,c){var d,u,_,g=n.props,y=e.props,v=e.type,m=0;if("svg"===v&&(r=!0),null!=s)for(;m<s.length;m++)if((d=s[m])&&"setAttribute"in d==!!v&&(v?d.localName===v:3===d.nodeType)){t=d,s[m]=null;break}if(null==t){if(null===v)return document.createTextNode(y);t=r?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),s=null,l=!1}if(null===v)g===y||l&&t.data===y||(t.data=y);else{if(s=s&&i.call(t.childNodes),u=(g=n.props||h).dangerouslySetInnerHTML,_=y.dangerouslySetInnerHTML,!l){if(null!=s)for(g={},m=0;m<t.attributes.length;m++)g[t.attributes[m].name]=t.attributes[m].value;(_||u)&&(_&&(u&&_.__html==u.__html||_.__html===t.innerHTML)||(t.innerHTML=_&&_.__html||""))}if(function(t,e,n,i,o){var r;for(r in n)"children"===r||"key"===r||r in e||j(t,r,null,n[r],i);for(r in e)o&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===e[r]||j(t,r,e[r],n[r],i)}(t,y,g,r,l),_)e.__k=[];else if(k(t,p(m=e.props.children)?m:[m],e,n,o,r&&"foreignObject"!==v,s,a,s?s[0]:n.__k&&b(n,0),l,c),null!=s)for(m=s.length;m--;)null!=s[m]&&f(s[m]);l||("value"in y&&void 0!==(m=y.value)&&(m!==t.value||"progress"===v&&!m||"option"===v&&m!==g.value)&&j(t,"value",m,g.value,!1),"checked"in y&&void 0!==(m=y.checked)&&m!==t.checked&&j(t,"checked",m,g.checked,!1))}return t}(n.__e,e,n,r,s,a,l,d,u);(_=o.diffed)&&_(e)}function D(t,e,n){for(var i=0;i<n.length;i++)M(n[i],n[++i],n[++i]);o.__c&&o.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){o.__e(t,e.__v)}})}function M(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function R(t,e,n){var i,r;if(o.unmount&&o.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||M(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){o.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&R(i[r],e,n||"function"!=typeof t.type);n||null==t.__e||f(t.__e),t.__=t.__e=t.__d=void 0}function W(t,e,n){return this.constructor(t,n)}function U(t,e,n){var r,s,a;o.__&&o.__(t,e),r=e.__k,s=[],a=[],N(e,t=e.__k=y(m,null,[t]),r||h,h,void 0!==e.ownerSVGElement,r?null:e.firstChild?i.call(e.childNodes):null,s,r?r.__e:e.firstChild,!1,a),D(s,t,a)}function B(t,e){var n={__c:e="__cC"+d++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(function(t){t.__e=!0,S(t)})},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}i=u.slice,o={__e:function(t,e,n,i){for(var o,r,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),s=o.__d),s)return o.__E=o}catch(e){t=e}throw t}},r=0,w.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof t&&(t=t(g({},n),this.props)),t&&g(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),S(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},w.prototype.render=m,s=[],l="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,c=function(t,e){return t.__v.__b-e.__v.__b},E.__r=0,d=0;const V=t=>"string"==typeof t?1:t.weight,$=t=>"string"==typeof t?t:t.name,F=(t,e)=>{const n=t.id||t._id;return"google"!==e?n||"":t.offerId?t.offerId:n?(t=>{var e;try{return(null==(e=t.match(/([^:]+)$/))?void 0:e[0])||t}catch{return t}})(n):""};var J=(t=>(t.WEB="web",t.PRODUCT_PAGE="product-page",t.QR_CODE="qr-code",t.MOBILE="mobile",t.LINK="link",t.EMAIL="email",t.BLOG="blog",t))(J||{}),H=(t=>(t.LIST="list",t.LIST_BUBBLE="list-bubble",t.LIST_CARD="list-card",t.LIST_SQUARE="list-square",t.IFRAME="iframe",t.IFRAME_IMMERSIVE="iframe-immersive",t.SOLO="solo",t.SOLO_STICKY="solo-sticky",t.QR_CODE="qrcode",t.BLOG="blog",t.SDK="sdk",t.STANDALONE="standalone",t.LINK="link",t.SPOTLIGHT="spotlight",t))(H||{});const z=(t,e)=>{const n=t=>{const n=((t,e)=>(t=>t&&"object"==typeof t&&("mobile"in t||"desktop"in t))(t)?t[e]:t)(t,e);return"object"==typeof n&&null!==n?z(n,e):n};return Array.isArray(t)?t.map(n):Object.fromEntries(Object.entries(t).map(([t,e])=>[t,n(e)]))};H.LIST_BUBBLE,H.LIST_CARD,H.LIST_SQUARE,H.SPOTLIGHT,H.LIST_BUBBLE,H.LIST_CARD,H.LIST_SQUARE,H.SPOTLIGHT,H.LIST_BUBBLE,H.LIST_SQUARE,H.LIST_BUBBLE,H.LIST_CARD,H.LIST_SQUARE,H.IFRAME_IMMERSIVE,H.SOLO_STICKY,H.SDK,H.SPOTLIGHT;const q=t=>t.replace("videos.join-stories.com","images.join-stories.com").replace("optimized/mp4/short-sd","video-thumbnail").replace("optimized/mp4/short","video-thumbnail").replace("trimmed/","video-thumbnail-").replace(/.mp4$/,".jpg"),Y="language",G="websiteUrl",K=(t,e)=>Math.min(1,Math.max((t-e.timing.start)/(e.timing.end-e.timing.start),0));var Z,Q,X,tt,et=0,nt=[],it=[],ot=o.__b,rt=o.__r,st=o.diffed,at=o.__c,lt=o.unmount;function ct(t,e){o.__h&&o.__h(Q,t,et||e),et=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:it}),n.__[t]}function dt(t){return et=1,function(t,e){var n=ct(Z++,2);if(n.t=t,!n.__c&&(n.__=[Ct(void 0,e),function(t){var e=n.__N?n.__N[0]:n.__[0],i=n.t(e,t);e!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=Q,!Q.u)){var i=function(t,e,i){if(!n.__c.__H)return!0;var r=n.__c.__H.__.filter(function(t){return t.__c});if(r.every(function(t){return!t.__N}))return!o||o.call(this,t,e,i);var s=!1;return r.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}}),!(!s&&n.__c.props===t)&&(!o||o.call(this,t,e,i))};Q.u=!0;var o=Q.shouldComponentUpdate,r=Q.componentWillUpdate;Q.componentWillUpdate=function(t,e,n){if(this.__e){var s=o;o=void 0,i(t,e,n),o=s}r&&r.call(this,t,e,n)},Q.shouldComponentUpdate=i}return n.__N||n.__}(Ct,t)}function ht(t,e){var n=ct(Z++,3);!o.__s&&bt(n.__H,e)&&(n.__=t,n.i=e,Q.__H.__h.push(n))}function ut(t){return et=5,_t(function(){return{current:t}},[])}function _t(t,e){var n=ct(Z++,7);return bt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function pt(t,e){return et=8,_t(function(){return t},e)}function gt(t){var e=Q.context[t.__c],n=ct(Z++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(Q)),e.props.value):t.__}function ft(){for(var t;t=nt.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(mt),t.__H.__h.forEach(wt),t.__H.__h=[]}catch(e){t.__H.__h=[],o.__e(e,t.__v)}}o.__b=function(t){Q=null,ot&&ot(t)},o.__r=function(t){rt&&rt(t),Z=0;var e=(Q=t.__c).__H;e&&(X===Q?(e.__h=[],Q.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=it,t.__N=t.i=void 0})):(e.__h.forEach(mt),e.__h.forEach(wt),e.__h=[],Z=0)),X=Q},o.diffed=function(t){st&&st(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==nt.push(e)&&tt===o.requestAnimationFrame||((tt=o.requestAnimationFrame)||vt)(ft)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==it&&(t.__=t.__V),t.i=void 0,t.__V=it})),X=Q=null},o.__c=function(t,e){e.some(function(t){try{t.__h.forEach(mt),t.__h=t.__h.filter(function(t){return!t.__||wt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],o.__e(n,t.__v)}}),at&&at(t,e)},o.unmount=function(t){lt&<(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{mt(t)}catch(t){e=t}}),n.__H=void 0,e&&o.__e(e,n.__v))};var yt="function"==typeof requestAnimationFrame;function vt(t){var e,n=function(){clearTimeout(i),yt&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);yt&&(e=requestAnimationFrame(n))}function mt(t){var e=Q,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Q=e}function wt(t){var e=Q;t.__c=t.__(),Q=e}function bt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function Ct(t,e){return"function"==typeof e?e(t):e}function St(t,e){for(var n in e)t[n]=e[n];return t}function Et(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function kt(t){this.props=t}function xt(t,e){function n(t){var n=this.props.ref,i=n==t.ref;return!i&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!i:Et(this.props,t)}function i(e){return this.shouldComponentUpdate=n,y(t,e)}return i.displayName="Memo("+(t.displayName||t.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(kt.prototype=new w).isPureReactComponent=!0,kt.prototype.shouldComponentUpdate=function(t,e){return Et(this.props,t)||Et(this.state,e)};var It=o.__b;o.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),It&&It(t)};var Tt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Lt(t){function e(e){var n=St({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=Tt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Pt=o.__e;o.__e=function(t,e,n,i){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Pt(t,e,n,i)};var jt=o.unmount;function Ot(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=St({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return Ot(t,e,n)}
vendor: 1,200 bytes, line 1
1)),t}function At(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return At(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function Nt(){this.__u=0,this.t=null,this.__b=null}function Dt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Mt(t){var e,n,i;function o(o){if(e||(e=t()).then(function(t){n=t.default||t},function(t){i=t}),i)throw i;if(!n)throw e;return y(n,o)}return o.displayName="Lazy",o.__f=!0,o}function Rt(){this.u=null,this.o=null}o.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),jt&&jt(t)},(Nt.prototype=new w).__c=function(t,e){var n=e.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var o=Dt(i.__v),r=!1,s=function(){r||(r=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var t=i.state.__a;i.__v.__k[0]=At(t,t.__c.__P,t.__c.__O)}var e;for(i.setState({__a:i.__b=null});e=i.t.pop();)e.forceUpdate()}},l=!0===e.__h;i.__u++||l||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(s,s)},Nt.prototype.componentWillUnmount=function(){this.t=[]},Nt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;
vendor: 2,238 bytes, line 1
1this.__v.__k[0]=Ot(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&y(m,null,t.fallback);return o&&(o.__h=null),[y(m,null,e.__a?null:t.children),o]};var Wt=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Ut(t){return this.getChildContext=function(){return t.context},t.children}function Bt(t){var e=this,n=t.i;e.componentWillUnmount=function(){U(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),U(y(Ut,{context:e.context},t.__v),e.l)}function Vt(t,e){var n=y(Bt,{__v:t,i:e});return n.containerInfo=e,n}(Rt.prototype=new w).__a=function(t){var e=this,n=Dt(e.__v),i=e.o.get(t);return i[0]++,function(o){var r=function(){e.props.revealOrder?(i.push(o),Wt(e,t,i)):o()};n?n(r):r()}},Rt.prototype.render=function(t){this.u=null,this.o=new Map;var e=I(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Rt.prototype.componentDidUpdate=Rt.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Wt(t,n,e)})};var $t=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ft=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Jt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ht=/[A-Z0-9]/g,zt=typeof document<"u",qt=function(t){return(typeof Symbol<"u"&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(w.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]}
1,set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Yt=o.event;function Gt(){}function Kt(){return this.cancelBubble}function Zt(){return this.defaultPrevented}o.event=function(t){return Yt&&(t=Yt(t)),t.persist=Gt,t.isPropagationStopped=Kt,t.isDefaultPrevented=Zt,t.nativeEvent=t};var Qt={enumerable:!1,configurable:!0,get:function(){return this.class}},Xt=o.vnode;o.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={};for(var o in e){var r=e[o];if(!("value"===o&&"defaultValue"in e&&null==r||zt&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===r?r="":"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||qt(e.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":Jt.test(o)?o=s:-1===n.indexOf("-")&&Ft.test(o)?o=o.replace(Ht,"-$&").toLowerCase():null===r&&(r=void 0):s=o="oninput","oninput"===s&&i[o=s]&&(o="oninputCapture"),i[o]=r}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=I(e.children).forEach(function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)})),"select"==n&&null!=i.defaultValue&&(i.value=I(e.children).forEach(function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value})),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Qt)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=$t,Xt&&Xt(t)};var te=o.__r;o.__r=function(t){te&&te(t),t.__c};var ee=o.diffed;o.diffed=function(t){ee&&ee(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};const ne=(t,e)=>{let n;return function(...i){clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}},ie="Montserrat_600",oe="https://fonts.gstatic.com/s/montserrat/v18/JTURjIg1_i6t8kCHKm45_bZF7g7J_950vCo.ttf",re=()=>{const t=(new Date).getTime();return`${Math.random().toString(36).substring(2,6)}-${t}-${Math.random().toString(36).substring(2,6)}`};var se=0;function ae(t,e,n,i,r,s){var a,l,c={};for(l in e)"ref"==l?a=e[l]:c[l]=e[l];var d={type:t,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--se,__source:r,__self:s};if("function"==typeof t&&(a=t.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return o.vnode&&o.vnode(d),d}const le=({children:t,css:e})=>ae(m,{children:[ae("style",{children:e}),t]}),ce=({direction:t,onScroll:e,className:n=""})=>ae(le,{css:".join-carousel-button{width:3.6em;height:3.6em;z-index:1;cursor:pointer;pointer-events:all;padding:.4em;border-radius:50%;background:#ffffff4d;backdrop-filter:blur(6.5px);box-shadow:0 2px 9px #00000040;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);border:none}.join-carousel-button.left{left:.5em;transform:translateY(-50%) rotate(180deg)}.join-carousel-button.right{right:.5em}.visible.join-widget-list:not(.no-animation)~.join-carousel-button{animation:fade-in .5s}",children:ae("button",{className:`join-carousel-button ${t} ${n}`,onClick:e,children:ae("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ae("path",{d:"M9.82861 5.23413L16.5366 11.9428L9.82798 18.6508",stroke:"#141414",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),de=t=>t?(new DOMParser).parseFromString(t,"text/html").documentElement.textContent??"":"",he=(t,e,n,i,o=!1)=>{"..."!==t.innerHTML&&((t,e,n)=>{const i=t.getBoundingClientRect().height;return Math.round((i-n)/e)})(t,e,n)>i&&(t.innerHTML=((t,e)=>[...de(t)].slice(0,-e).join(""))(t.innerHTML,o?4:1),t.innerHTML+="...",he(t,e,n,i,!0))};function ue(t,e,n,i){ht(()=>{const i=t.current;if(!i)return;const o=()=>{((t,e,n)=>{t.querySelectorAll(e).forEach(t=>{const{trueFontSize:e,fontMargins:i}=(t=>{const e=t.parentNode??t,n=document.createElement("div"),i=t.cloneNode(!0);n.style.visibility="hidden",n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="10000vw",n.style.whiteSpace="nowrap",n.appendChild(i),e.appendChild(n);const o=n.getBoundingClientRect().height,r=i.getBoundingClientRect().height;return i.remove(),n.remove(),{trueFontSize:o,fontMargins:r-o}})(t),o=t.getAttribute("data-original-text");o&&(t.innerHTML=o),he(t,e,i,n)})})(i,n,e)};o(),document.fonts.ready.then(o);const r=setTimeout(()=>{o()},200);return()=>{clearTimeout(r)}},i)}class _e{baseUrl;maxBatchSize;idleFlushMs;maxPayloadBytes;queue=[];idleTimer=null;destroyed=!1;unloading=!1;textEncoder=typeof TextEncoder<"u"?new TextEncoder:null;constructor(t,e){this.baseUrl=t,this.maxBatchSize=e?.maxBatchSize??10,this.idleFlushMs=e?.idleFlushMs??1e4,this.maxPayloadBytes=6e4,this.flush=this.flush.bind(this),this.onVisibilityChange=this.onVisibilityChange.bind(this),this.flushOnUnload=this.flushOnUnload.bind(this),typeof window<"u"&&(window.addEventListener("pagehide",this.flushOnUnload,{capture:!0}),window.addEventListener("beforeunload",this.flushOnUnload,{capture:!0}),window.addEventListener("freeze",this.flushOnUnload,{capture:!0}),typeof document<"u"&&document.addEventListener("visibilitychange",this.onVisibilityChange))}
1enqueue(t,e=!1){if(!this.destroyed){if(this.queue.push(t),this.unloading||e||this.queue.length>=this.maxBatchSize)return void this.flush();this.scheduleFlushIfNeeded()}}flush(){if(this.destroyed)return;if(this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.unloading){if(0===this.queue.length)return;const t=this.queue;return this.queue=[],void(1===t.length?this.safeSend(this.baseUrl,t[0]):this.sendInChunks(t))}if(0===this.queue.length)return;const t=this.queue;this.queue=[],1===t.length?this.safeSend(this.baseUrl,t[0]):this.sendInChunks(t)}destroy(){this.flush(),!this.destroyed&&(this.destroyed=!0,this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),typeof window<"u"&&(window.removeEventListener("pagehide",this.flushOnUnload),window.removeEventListener("beforeunload",this.flushOnUnload),window.removeEventListener("freeze",this.flushOnUnload),typeof document<"u"&&document.removeEventListener("visibilitychange",this.onVisibilityChange)))}onVisibilityChange(){typeof document<"u"&&"hidden"===document.visibilityState&&this.flushOnUnload()}scheduleFlushIfNeeded(){this.idleFlushMs<=0||this.idleTimer||(this.idleTimer=setTimeout(this.flush,this.idleFlushMs))}safeSend(t,e){try{return this.send(t,e)}catch(t){return console.warn("Failed to send analytics event.",t),!1}}send(t,e){try{const n=JSON.stringify(e);if(typeof navigator<"u"&&"function"==typeof navigator.sendBeacon)try{return navigator.sendBeacon(t,n)}catch{}return fetch(t,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:n,mode:"no-cors",keepalive:!0}).catch(()=>{}),!0}catch{return!1}}flushOnUnload(){if(this.destroyed||(this.unloading=!0,this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),0===this.queue.length))return;const t=this.queue;this.queue=[],1===t.length?this.safeSend(this.baseUrl,t[0]):this.sendInChunks(t)}sendInChunks(t){let e=0;for(;e<t.length;){let n=[];for(;e+n.length<t.length;){const i=[...n,t[e+n.length]],o={events:i};if(this.jsonByteLen(o)>this.maxPayloadBytes)break;n=i}if(0===n.length){const n=t[e];if(!this.safeSend(this.baseUrl,n))return t.slice(e);e+=1;continue}if(!this.safeSend(this.baseUrl,{events:n}))return t.slice(e);e+=n.length}return[]}jsonByteLen(t){try{const e=JSON.stringify(t);return this.textEncoder?.encode(e).length??e.length}catch{return 0}}}const pe=()=>(window.joinStories||(window.joinStories={}),window.joinStories.ept||(window.joinStories.ept=re()),window.joinStories.ept),ge=()=>{const t=window.joinStories?.ept;return t||pe()},fe="JOIN_STORY_READ",ye=t=>{const e=window.localStorage.getItem(t);try{return e?JSON.parse(e):void 0}catch{return}},ve=()=>[...window.jDataLayer||[]].reverse().find(t=>"segmentation-key"===t.type)?.data,me=t=>we(t.getTime()),we=t=>t/1e3,be=t=>Math.round(1e3*t),Ce=t=>{const e=V(t.cohort),n=t.cohorts.reduce((t,e)=>t+V(e),0);return Math.round(e/n*1e4)/1e4},Se=()=>{const t=window.joinStories?.consentManager?.getUserConsentState();return{event_user_id:t?.uid||null,event_user_consent:t?.consent.analytics||null,event_user_consent_tcf:null}},Ee=()=>{const t=`${window.location.protocol}//${window.location.hostname}${window.location.pathname}`;return{event_integration_environment:"web",event_integration_location_name:t,event_integration_web_base_url:t,event_integration_web_url:window.location.href,event_integration_web_protocol:window.location.protocol,event_integration_web_domain:window.location.hostname,event_integration_web_path:window.location.pathname,event_integration_web_parameters:window.location.search,event_integration_web_anchor:window.location.hash,event_integration_web_referrer:document.referrer,event_integration_web_browser_language:window.navigator.language,event_integration_web_browser_viewport_width:window.innerWidth,event_integration_web_browser_viewport_height:window.innerHeight,event_integration_page_type:"/"===window.location.pathname||window.location.pathname.includes("home")?"home":"other"}};let ke=null;(typeof window<"u"&&window.navigator.getBattery?window.navigator.getBattery():Promise.resolve(null)).then(t=>{ke=t});const xe=t=>t?{event_ab_campaign_id:t._id,event_ab_campaign_name:t.name,event_ab_campaign_comparison_type:t.comparisonType,event_ab_campaign_cohort:$(t.cohort),event_ab_campaign_cohort_weight:Ce(t),event_ab_campaign_base_cohort:t.baseCohort,event_ab_campaign_date_start:t.startDate?me(new Date(t.startDate)):null,event_ab_campaign_date_end:t.endDate?me(new Date(t.endDate)):null,event_ab_campaign_internal:!!t.internal,event_ab_campaign_internal_from:t.internalFrom}:{},Ie=(t,e,n,i,o)=>({event_owner:e,event_type:t,event_category:n,event_version:"2",...i,...xe(o),...Ee(),event_date_creation:we(Date.now()),event_date_timezone:(new Date).getTimezoneOffset(),event_segmentation_key:ve()??document.documentElement.lang??"",...Se(),event_page_tag:ge(),event_device_user_agent:window.navigator.userAgent,event_device_screen_width:window.screen.width,event_device_screen_height:window.screen.height,event_device_screen_color:window.screen.colorDepth,event_device_screen_ratio:window.screen.width/window.screen.height,event_device_pixel_ratio:window.devicePixelRatio,event_device_network_type:window.navigator.connection?.effectiveType&&window.navigator.connection?.type?[window.navigator.connection.effectiveType,window.navigator.connection.type].join("-"):window.navigator.connection?.effectiveType?window.navigator.connection.effectiveType:window.navigator.connection?.type?window.navigator.connection.type:"unknown",event_device_orientation:window.screen.orientation?.type?.split("-")[0]||"unknown",event_device_battery_level:"number"==typeof ke?.level?ke.level:null}),Te=(t,e)=>{const n=t.interactions.find(t=>
1t.id===e);if(!n)throw new Error(`Interaction with id ${e} not found`);return{story_chapter_index:t.chapters.findIndex(t=>t.timing.start<=n.timing.start&&t.timing.end>=n.timing.end),interaction_type:n.type,interaction_sub_type:null,interaction_variant:null}},Le=(t,e,n,i)=>{const o=t.interactions.find(t=>t.id===e);if(!o||!(t=>"shopping"===t.type)(o))throw new Error(`Interaction with id ${e} not found`);const r=o.data.products.find(t=>t.id===n);if(!r)throw new Error(`Product with id ${n} not found`);const s=r.variants?.find(t=>t._id===i)??r,a=s.salePrice??s.price;return{interaction_type:o.type,interaction_sub_type:null,interaction_variant:null,product_base_price:parseFloat(s.price.value),product_price:parseFloat(a.value),product_final_price:parseFloat(a.value),currency:a.currency}},Pe="story-view",je=[Pe],Oe=[Pe,"story-chapter-view","story-first-chapter-view","story-last-chapter-view"],Ae=(t,e)=>{const n=t.stories.findIndex(t=>t._id===e._id);return{story_id:e._id,story_title:e.title,story_last_published_date:e.lastPublishDate?we(e.lastPublishDate):null,story_label:e.containerLabel,story_sub_label:null,story_version:e.version,story_has_interactions:e.interactions.length>0,story_has_sound:e.hasSound??!1,story_chapter_count:e.chapters.length,story_is_active:!0,story_interaction_count:e.interactions.length,story_index_in_widget:n,story_duration:be(e.chapters[e.chapters.length-1].timing.end),story_has_subtitles:e.hasSubtitles??!1}},Ne=t=>{switch(t){case"solo-sticky":return"solo-sticky";case"standalone":case"link":return"none";default:return"list"}},De=(t,e,n,i)=>({widget_id:t._id,widget_type:t.type,widget_alias:t.alias,widget_shape:t.shape,widget_layout:Ne(t.type),widget_version:t.version,widget_player_type:t.playerType||"horizontal",widget_story_count:t.stories.length,widget_variant:null,widget_integration_type:i,widget_audience_slots_matched:e,widget_product_id:n}),Me=(t,e,n,i,o)=>({...Ie(t,e,"widget",i,o),...n}),Re=(t,e)=>"base64"===e?.encoding?btoa(JSON.stringify(t)):encodeURIComponent(JSON.stringify(t)),We=(t,e)=>"base64"===e?.encoding?Fe(t):decodeURIComponent(t),Ue=(t,e)=>{const n=document.cookie.split(";");try{for(let i of n)if(i=i.trim(),i.startsWith(`${t}=`)){const n=i.substring(`${t}=`.length),o=We(n,{encoding:"base64"});return e?.raw?o:JSON.parse(o)}}catch(e){console.warn("JOIN: Error while getting cookie : ",t,e)}return null},Be=(t,e,n)=>{const i=new Date;i.setTime(i.getTime()+31536e6);const o=i.toUTCString(),r=`${t}=${Re(e,{encoding:"base64"})}; expires=${o}; Secure; SameSite=Lax; path=/`;return document.cookie=r,-1!==document.cookie.indexOf(`${t}=`)?r:null},Ve=t=>{const e=new Date;e.setTime(e.getTime()+1e3);const n=e.toUTCString();document.cookie=`${t}=; expires=${n}; path=/`};function $e(t){try{return decodeURIComponent(t)}catch{return t}}function Fe(t){try{return atob(t)}catch{return $e(t)}}const Je="_join_stories_tc",He="__join_stories_tc_storage";class ze{productId=null;audienceSlotMatch;customUserInfo;enabled=!0;clickCount=0;displayedTimestamp=null;documentIsScrolled=!1;isScrolled=!1;platform;widgetConfig;callback;feedVisible=!1;integrationType;abCampaign;batcher;activeStoryId=null;storyViewingTime=null;storyChapterViewingTime=null;currentChapterIndex=0;previousChapterIndex=null;pausedAt=null;isMuted=!0;storyExitReason=null;storyPlatform;interactionViewingTime=null;interactionEngagingTime=null;interactionHasBeenBlocking=!1;storyEngageCount=0;owner;alias;videoControllerMap={};constructor(t){this.widgetConfig=t.widgetConfig,this.platform=t.platform,this.owner=this.widgetConfig.owner,this.alias=this.widgetConfig.alias,this.storyPlatform=this.platform,this.callback=t.callback,this.integrationType=t.integrationType??"web",this.productId=t.productId??null,this.abCampaign=t.abCampaign,this.customUserInfo=t.customUserInfo,this.audienceSlotMatch=t.audienceSlotMatch||[],this.enabled=t.enabled??!0,pe();const e=this.getPlatformWidgetConfig().analyticsUrl;e&&(this.batcher=(t=>{if(window.joinStories)return window.joinStories.analyticsBatcher||(window.joinStories.analyticsBatcher={}),window.joinStories.analyticsBatcher[t]||(window.joinStories.analyticsBatcher[t]=new _e(t)),window.joinStories.analyticsBatcher[t]})(e)),this.sendWidgetInitializedEvent(),this.bindAllMethods(),document.addEventListener("scroll",this.setDocumentScrolled,{once:!0,passive:!0})}setCustomUserInfo(t){this.customUserInfo=t}
1setDisplayTimestamp(t){this.displayedTimestamp=t}setEnabled(t){this.enabled=t}setWidgetConfig(t){this.widgetConfig=t}setPlatform(t){this.platform=t}setStoryPlatform(t){this.storyPlatform=t}setVideoController(t,e){this.videoControllerMap[t]=e}setAudienceSlotMatch(t){this.audienceSlotMatch=t}setProductId(t){this.productId=t}setABCampaign(t){this.abCampaign=t}setActiveStory(t){this.storyViewingTime=Date.now(),this.activeStoryId=t}setFeedVisible(t){this.feedVisible=t}setMuted(t){this.isMuted=t}setOpenedChapter(t,e){this.storyChapterViewingTime=Date.now(),this.currentChapterIndex=e||this.videoControllerMap[t]?.currentChapterIndex}setDocumentScrolled(){this.documentIsScrolled=!0}setInteractionBlocked(){this.interactionHasBeenBlocking=!0}setExitReason(t){this.storyExitReason=t}sendWidgetEvent(t,e){const n={...De(this.getPlatformWidgetConfig(),this.audienceSlotMatch,this.productId,this.integrationType),...e},i=Me(t,this.owner,n,this.customUserInfo,this.abCampaign);this.sendEvent(i)}sendWidgetCloseEvent(t){this.sendWidgetEvent("widget-close",{widget_close_reason:t,widget_click_count:this.clickCount})}sendWidgetInitializedEvent(){const t={widget_alias:this.alias,widget_integration_type:this.integrationType},e=Me("widget-initialized",this.owner,t,this.customUserInfo,this.abCampaign);this.sendEvent(e)}sendWidgetDisplayedEvent(t){const e=this.getPlatformWidgetConfig();"solo-sticky"===e.type&&e.keepClosed&&(t=>{if(!t.keepClosed)return!1;const e=ye((t=>`JOIN_STICKY_CLOSED_${t}`)(t.alias));return!!e&&!!e.lastPublishDate&&!!t.lastPublishDate&&e.lastPublishDate>=t.lastPublishDate&&t.stories[0]&&e.stories.includes((t=>`${t._id}-${t.lastPublishDate}`)(t.stories[0]))})(e)||(this.displayedTimestamp=Date.now(),this.sendWidgetEvent("widget-displayed",{widget_integration_relative_position:t/window.innerHeight,widget_integration_position:t}))}sendWidgetVisibilityEvent(t,e){if(![.5,.75,1].includes(t))return;if(null===this.displayedTimestamp)return void console.error("Displayed timestamp is not set");const n="widget-view-"+100*t;this.sendWidgetEvent(n,{widget_duration_displayed:Date.now()-this.displayedTimestamp,widget_integration_relative_position:e/window.innerHeight,widget_integration_position:e,widget_page_scroll_occurred:this.documentIsScrolled})}sendWidgetClickEvent(t){this.clickCount+=1;const e={...Ae(this.getPlatformWidgetConfig(),t),widget_click_count:this.clickCount,story_chapter_index:this.currentChapterIndex};this.sendWidgetEvent("widget-click",e)}sendWidgetScrolledEvent(t){this.isScrolled||(this.isScrolled=!0,this.sendWidgetEvent("widget-scrolled",{widget_scroll_type:t}))}sendWidgetPlayerCloseEvent(t,e){if(!this.feedVisible)return;const n={...Ae(this.getPlatformWidgetConfig(),this.getStory(t)),story_chapter_index:this.currentChapterIndex,story_muted:this.isMuted,...this.getStoryCompletionProperties(t),...this.getChapterCompletionProperties(t),widget_player_close_reason:e,story_displayed_format:this.storyPlatform,widget_click_count:this.clickCount};this.sendWidgetEvent("widget-player-close",n),this.setFeedVisible(!1)}sendStoryEvent(t,e,n){const i=De(this.getPlatformWidgetConfig(),this.audienceSlotMatch,this.productId,this.integrationType),o=Ae(this.getPlatformWidgetConfig(),this.getStory(t)),r=((t,e)=>t.chapters[e]?{story_chapter_index:e,story_chapter_is_active:!0,story_chapter_duration:be(t.chapters[e].timing.end-t.chapters[e].timing.start)}:{story_chapter_index:e,story_chapter_is_active:!1,story_chapter_duration:0})(this.getStory(t),this.currentChapterIndex),s=(d=e,je.includes(d)?{}:this.getStoryCompletionProperties(t)),a=(t=>!Oe.includes(t))(e)?this.getChapterCompletionProperties(t):{},l={...i,...o,...r,...n,...s,...a,story_previous_chapter_index:this.previousChapterIndex,story_muted:this.isMuted,story_displayed_format:this.storyPlatform,widget_click_count:this.clickCount},c=((t,e,n,i,o)=>({...Ie(t,e,"story",i,o),...n}))(e,this.owner,l,this.customUserInfo,this.abCampaign);var d;this.sendEvent(c)}sendStoryViewEvent(t){this.storyEngageCount=0,this.sendStoryEvent(t,"story-view",{})}sendStoryChapterDisplayedEvent(t){0===this.currentChapterIndex&&this.sendStoryEvent(t,"story-first-chapter-view",{}),this.currentChapterIndex>=this.getStory(t).chapters.length-1&&this.sendStoryEvent(t,"story-last-chapter-view",{}),this.sendStoryEvent(t,"story-chapter-view",{})}sendStorySwipeEvent(t,e){switch(e){case"swipe-next":this.sendStoryEvent(t,"story-swipe-next",{}),this.sendStoryChapterExitEvent(t,"swipe-next"),this.sendStoryExitEvent(t,"swipe-next"),this.isLastStory(t)&&this.sendWidgetPlayerCloseEvent(t,"swipe-next");break;case"swipe-previous":this.isFirstStory(t)||(this.sendStoryEvent(t,"story-swipe-previous",{}),this.sendStoryChapterExitEvent(t,"swipe-previous"),this.sendStoryExitEvent(t,"swipe-previous"));break;case"swipe-down":this.sendStoryChapterExitEvent(t,"swipe-down"),this.sendStoryExitEvent(t,"swipe-down"),this.sendWidgetPlayerCloseEvent(t,"swipe-down")}}
1sendStoryPauseMobileEvent(t,e){this.sendStoryEvent(t,"story-pause",{}),this.sendStoryEvent(t,"story-unpause",{story_pause_duration:Date.now()-e})}sendStoryExitEvent(t,e){this.feedVisible&&(this.sendStoryEvent(t,"story-exit",{story_exit_reason:e}),this.previousChapterIndex=null)}sendStoryCompletedEvent(t){this.sendStoryEvent(t,"story-completed",{}),this.sendStoryChapterExitEvent(t,"auto-advance"),this.sendStoryExitEvent(t,"auto-advance"),this.isLastStory(t)&&this.sendWidgetPlayerCloseEvent(t,"auto-advance")}sendStoryTabChangeEvent(t,e){if(e)this.setActiveStory(t),this.sendStoryViewEvent(t),this.setOpenedChapter(t),this.sendStoryChapterDisplayedEvent(t);else{const e=this.storyExitReason||"tab-change";this.sendStoryExitEvent(t,e),this.sendStoryChapterExitEvent(t,e),this.storyExitReason=null}}sendStoryPauseEvent(t){this.sendStoryEvent(t,"story-pause",{}),this.pausedAt=Date.now()}sendStoryUnpauseEvent(t){this.sendStoryEvent(t,"story-unpause",{story_pause_duration:this.pausedAt?Date.now()-this.pausedAt:null})}sendStoryChangeChapterEvent(t,e){if("previous"===e&&this.isFirstStory(t)&&0===this.currentChapterIndex)return;const n=this.getStory(t);this.sendStoryEvent(t,`story-tap-${e}`,{}),this.sendStoryChapterExitEvent(t,"next"===e?"tap-next":"tap-previous"),this.currentChapterIndex===n.chapters.length-1&&"next"===e&&this.sendStoryExitEvent(t,"tap-next"),0===this.currentChapterIndex&&"previous"===e&&this.sendStoryExitEvent(t,"tap-previous"),this.isLastStory(t)&&this.isLastChapter(t,this.currentChapterIndex)&&"next"===e&&this.sendWidgetPlayerCloseEvent(t,"tap-next")}sendStoryChapterExitEvent(t,e){this.feedVisible&&(this.sendStoryEvent(t,"story-chapter-exit",{story_chapter_exit_reason:e}),("tap-previous"===e&&0!==this.currentChapterIndex||("tap-next"===e||"auto-advance"===e)&&!this.isLastChapter(t,this.currentChapterIndex))&&(this.previousChapterIndex=this.currentChapterIndex))}sendStoryCloseEvent(t){this.sendStoryChapterExitEvent(t,"close-button"),this.sendStoryExitEvent(t,"close-button"),this.sendWidgetPlayerCloseEvent(t,"close-button")}sendStoryCloseShortcutEvent(t){this.sendStoryChapterExitEvent(t,"close-shortcut"),this.sendStoryExitEvent(t,"close-shortcut"),this.sendWidgetPlayerCloseEvent(t,"close-shortcut")}sendBackgroundExitEvent(){this.activeStoryId&&(this.sendStoryChapterExitEvent(this.activeStoryId,"background"),this.sendStoryExitEvent(this.activeStoryId,"background"),this.sendWidgetPlayerCloseEvent(this.activeStoryId,"background"))}sendHistoryBackExitEvent(){this.activeStoryId&&(this.sendStoryChapterExitEvent(this.activeStoryId,"history-back"),this.sendStoryExitEvent(this.activeStoryId,"history-back"),this.sendWidgetPlayerCloseEvent(this.activeStoryId,"history-back"))}sendInteractionEvent(t,e,n){const i=De(this.getPlatformWidgetConfig(),this.audienceSlotMatch,this.productId,this.integrationType),o=this.getStory(t),r=Ae(this.getPlatformWidgetConfig(),o),s={interaction_has_been_blocking:this.interactionHasBeenBlocking},a={...i,...r,...n,...s,...Te(o,n.interaction_id),story_chapter_index:this.currentChapterIndex,story_muted:this.isMuted,story_displayed_format:this.storyPlatform,widget_click_count:this.clickCount},l=((t,e,n,i,o)=>({...Ie(t,e,"interaction",i,o),...n}))(e,this.owner,a,this.customUserInfo,this.abCampaign);this.sendEvent(l)}sendInteractionViewEvent(t,e,{isAlreadyCompleted:n,interactionEngageUrl:i,interactionEngageLabel:o}){this.interactionViewingTime=Date.now(),this.interactionHasBeenBlocking=!1,this.interactionEngagingTime=null,this.sendInteractionEvent(t,"interaction-view",{interaction_id:e,interaction_is_already_completed:n,interaction_engage_url:i||null,interaction_engage_label:o||null})}sendInteractionEngageEvent(t,e,{isFirstEngage:n,isCompletionEngage:i,engageType:o,isAlreadyCompleted:r,interactionEngageValue1:s,interactionEngageValue2:a,interactionEngageUrl:l,interactionEngageLabel:c}){n&&(this.interactionEngagingTime=Date.now()),this.storyEngageCount+=1,this.sendInteractionEvent(t,"interaction-engage",{interaction_id:e,interaction_engage_type:o,interaction_is_completion_engage:i,interaction_is_first_engage:n,interaction_is_story_first_engage:this.storyEngageCount<=1,interaction_is_already_completed:r,interaction_engage_value_1:s||null,interaction_engage_value_2:a||null,interaction_engage_url:l||null,interaction_engage_label:c||null})}sendInteractionCompleteEvent(t,e,{isFirstEngage:n,engageType:i,isAlreadyCompleted:o,interactionEngageValue1:r,interactionEngageValue2:s,interactionEngageUrl:a,interactionEngageLabel:l}){const c=this.interactionEngagingTime?Date.now()-this.interactionEngagingTime:null;this.sendInteractionEvent(t,"interaction-completed",{interaction_id:e,interaction_is_already_completed:o,interaction_engage_type:i||null,interaction_engaging_time:c||null,interaction_is_first_engage:n,interaction_is_story_first_engage:this.storyEngageCount<=1,interaction_engage_value_1:r||null,interaction_engage_value_2:s||null,interaction_engage_url:a||null,interaction_engage_label:l||null}),"redirect"===i&&(this.storyExitReason="interaction-redirect")}sendInteractionExitEvent(t,e,{exitState:n,interactionEngageUrl:i,interactionEngageLabel:o}){const r=Date.now()-(this.interactionViewingTime||0),s=this.interactionEngagingTime?Date.now()-this.interactionEngagingTime:null;this.sendInteractionEvent(t,"interaction-exit",{interaction_id:e,interaction_viewing_time:r,interaction_exit_state:n,interaction_engaging_time:s,interaction_is_already_completed:"already-completed"===n,interaction_engage_url:i||null,interaction_engage_label:o||null})}sendProductEvent(t,e,n){const i=n.interaction_id,o=n.product_id,r=n?.product_variant||null,s=De(this.getPlatformWidgetConfig(),this.audienceSlotMatch,this.productId,this.integrationType),a=this.getStory(t),l={...s,...Ae(this.getPlatformWidgetConfig(),a),...Le(a,i,o,r),...n,story_chapter_index:this.currentChapterIndex,story_muted:this.isMuted,story_displayed_format:this.storyPlatform,widget_click_count:this.clickCount},c=((t,e,n,i,o)=>({...Ie(t,e,"product",i,o),...n}))(e,this.owner,l,this.customUserInfo,this.abCampaign);this.sendEvent(c)}sendProductLoadedEvent(t,e,n){this.sendProductEvent(t,"product-loaded",{interaction_id:e,product_id:n})}sendProductViewEvent(t,e,n){this.sendProductEvent(t,"product-view",{interaction_id:e,product_id:n})}sendProductDetailsViewEvent(t,e,n){this.sendProductEvent(t,"product-details-view",{interaction_id:e,product_id:n})}sendProductEngageEvent(t,e,n,{productVariant:i,isFirstEngage:o,isCompletionEngage:r,productQuantity:s,engageType:a,productEngageValue_1:l,productEngageValue_2:c,productEngageUrl:d,productEngageLabel:h}){this.sendProductEvent(t,"product-engage",{interaction_id:e,product_id:n,product_variant:i||null,product_quantity:s,product_engage_type:a,product_is_completion_engage:r,product_is_first_engage:o,product_engage_value_1:l||null,product_engage_value_2:c||null,product_engage_url:d||null,product_engage_label:h||null})}sendProductErrorEvent(t,e,n,i,{errorMessage:o,errorCode:r}){this.sendProductEvent(t,"product-error",{interaction_id:e,product_id:n,product_variant:i,product_error_message:o,product_error_code:r})}getPlatformWidgetConfig(){return z(this.widgetConfig,this.platform)}getStory(t){const e=this.widgetConfig.storiesData[t];if(!e)throw new Error(`Story with id ${t} not found`);return z(e,this.storyPlatform)}isFirstStory(t){return this.widgetConfig.stories[0]._id===t}isLastStory(t){return this.widgetConfig.stories[this.widgetConfig.stories.length-1]._id===t}isLastChapter(t,e){return e===this.getStory(t).chapters.length-1}getStoryCompletionProperties(t){return{story_completion:this.videoControllerMap[t]?.completionRatio??null,story_viewing_time:this.storyViewingTime?Date.now()-this.storyViewingTime:null}}getChapterCompletionProperties(t){const e=this.videoControllerMap[t],n=e?.chapters[e.currentChapterIndex],i=e?.currentTime;return{story_chapter_completion:K(i,n),story_chapter_viewing_time:this.storyChapterVie
1wingTime?Date.now()-this.storyChapterViewingTime:null}}sendEvent(t){if(!this.enabled)return;const e=this.cleanAnalyticsData(t);this.sendAnalyticsToServer(e),this.sendAnalyticToDataLayer(e),this.sendAnalyticsToCallback(e),((t,e)=>{try{const n=window.Shopify,i=window.localStorage?.getItem(He);if((()=>{const t=Ue(Je,{encoding:"base64"});t&&!t.transaction&&Ve(Je)})(),!n)return void(i&&window.localStorage.removeItem(He));const o=Date.now(),r=i?JSON.parse(We(i,{encoding:"base64"})):void 0;if(r?.lastCheck&&o-r?.lastCheck<6e4)return;const s=Ie("",e,"external",void 0,void 0),{event_type:a,event_date_creation:l,event_user_id:c,event_user_consent:d,event_user_consent_tcf:h,...u}=s;window.localStorage?.setItem(He,Re({analyticsUrlV2:t,data:u,lastCheck:o},{encoding:"base64"}))}catch(t){console.warn("JOIN: Error while setting technical payload",t)}})(this.getPlatformWidgetConfig().analyticsUrl,this.owner)}sendAnalyticsToServer(t){const e=this.getPlatformWidgetConfig().analyticsUrl;if(e){if(this.batcher)return void this.batcher.enqueue(t);navigator.sendBeacon(e,JSON.stringify(t))}}sendAnalyticToDataLayer(t){}sendAnalyticsToCallback(t){window.JoinStories?.emit("JOIN_ANALYTICS",t),this.callback?.(t)}removeNullAndUndefinedValues(t){return"object"!=typeof t||null===t?t:(e=t,Object.fromEntries(Object.entries(e).filter(([t,e])=>!(t=>null==t)(e))));var e}roundNumericValues(t){if("object"!=typeof t||null===t)return t;const e=t=>Math.round(1e6*t)/1e6;return Object.fromEntries(Object.entries(t).map(([t,n])=>"number"!=typeof n||Number.isNaN(n)?[t,n]:[t,e(n)]))}cleanAnalyticsData(t){const e=this.removeNullAndUndefinedValues(t);return this.roundNumericValues(e)}bindAllMethods(){this.setCustomUserInfo=this.setCustomUserInfo.bind(this),this.setDisplayTimestamp=this.setDisplayTimestamp.bind(this),this.setEnabled=this.setEnabled.bind(this),this.setPlatform=this.setPlatform.bind(this),this.setStoryPlatform=this.setStoryPlatform.bind(this),this.setVideoController=this.setVideoController.bind(this),this.setAudienceSlotMatch=this.setAudienceSlotMatch.bind(this),this.setProductId=this.setProductId.bind(this),this.setActiveStory=this.setActiveStory.bind(this),this.setFeedVisible=this.setFeedVisible.bind(this),this.setMuted=this.setMuted.bind(this),this.setOpenedChapter=this.setOpenedChapter.bind(this),this.setDocumentScrolled=this.setDocumentScrolled.bind(this),this.setInteractionBlocked=this.setInteractionBlocked.bind(this),this.sendWidgetEvent=this.sendWidgetEvent.bind(this),this.sendWidgetInitializedEvent=this.sendWidgetInitializedEvent.bind(this),this.sendWidgetDisplayedEvent=this.sendWidgetDisplayedEvent.bind(this),this.sendWidgetVisibilityEvent=this.sendWidgetVisibilityEvent.bind(this),this.sendWidgetClickEvent=this.sendWidgetClickEvent.bind(this),this.sendWidgetScrolledEvent=this.sendWidgetScrolledEvent.bind(this),this.sendWidgetPlayerCloseEvent=this.sendWidgetPlayerCloseEvent.bind(this),this.sendStoryEvent=this.sendStoryEvent.bind(this),this.sendStoryViewEvent=this.sendStoryViewEvent.bind(this),this.sendStoryChapterDisplayedEvent=this.sendStoryChapterDisplayedEvent.bind(this),this.sendStorySwipeEvent=this.sendStorySwipeEvent.bind(this),this.sendStoryPauseMobileEvent=this.sendStoryPauseMobileEvent.bind(this),this.sendStoryExitEvent=this.sendStoryExitEvent.bind(this),this.sendStoryPauseEvent=this.sendStoryPauseEvent.bind(this),this.sendStoryUnpauseEvent=this.sendStoryUnpauseEvent.bind(this),this.sendStoryChangeChapterEvent=this.sendStoryChangeChapterEvent.bind(this),this.sendStoryChapterExitEvent=this.sendStoryChapterExitEvent.bind(this),this.sendBackgroundExitEvent=this.sendBackgroundExitEvent.bind(this),this.sendInteractionEvent=this.sendInteractionEvent.bind(this),this.sendInteractionViewEvent=this.sendInteractionViewEvent.bind(this),this.sendInteractionEngageEvent=this.sendInteractionEngageEvent.bind(this),this.sendInteractionCompleteEvent=this.sendInteractionCompleteEvent.bind(this),this.sendInteractionExitEvent=this.sendInteractionExitEvent.bind(this),this.sendProductEvent=this.sendProductEvent.bind(this),this.sendProductLoadedEvent=this.sendProductLoadedEvent.bind(this),this.sendProductViewEvent=this.sendProductViewEvent.bind(this),this.sendProductDetailsViewEvent=this.sendProductDetailsViewEvent.bind(this),this.sendProductEngageEvent=this.sendProductEngageEvent.bind(this),this.sendProductErrorEvent=this.sendProductErrorEvent.bind(this),this.getPlatformWidgetConfig=this.getPlatformWidgetConfig.bind(this),this.get
1Story=this.getStory.bind(this),this.sendEvent=this.sendEvent.bind(this)}}class qe{listeners={};noWarnings=new Set;constructor(t=[]){t.forEach(t=>{this.noWarnings.add(t)})}subscribe(t,e){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e),()=>{this.unsubscribe(t,e)}}unsubscribe(t,e){this.listeners[t]&&(this.listeners[t]=this.listeners[t].filter(t=>t!==e))}async emit(t,...e){if(this.listeners[t]&&0!==this.listeners[t].length){performance.mark(`feed-events-controller-${t} - start`);for await(const n of this.listeners[t])await n(...e);performance.mark(`feed-events-controller-${t} - end`),performance.measure(`feed-events-controller-${t}`,`feed-events-controller-${t} - start`,`feed-events-controller-${t} - end`)}else this.noWarnings.has(t)||console.warn(`JOIN: No listeners for event: ${t}`)}}class Ye extends qe{static instance;constructor(){if(Ye.instance)return Ye.instance;super(["JOIN_ANALYTICS","JOIN_STORIES_READY","JOIN_ANALYTICS_READY"]),this.subscribe=this.subscribe.bind(this),this.unsubscribe=this.unsubscribe.bind(this),this.emit=this.emit.bind(this),this.emit("JOIN_STORIES_READY").catch(t=>{console.error("Error emitting JOIN_STORIES_READY",t)}),Ye.instance=this}emit=async(t,...e)=>{await super.emit(t,...e);const n=new CustomEvent(t,{detail:e[0]});document.dispatchEvent(n)};closePlayer(t){return this.emit("JOIN_STORIES_CLOSE_PLAYER",t)}addToCart(t){return this.emit("JOIN_STORIES_ADD_TO_CART",t)}resolveAddToCart(t,e){return this.emit("JOIN_STORIES_ADD_TO_CART_RESOLVED",t,e)}sendProductAddToCart(t){return this.emit("JOIN_STORIES_PRODUCT_ADD_TO_CART",t)}sendProductRemoveFromCart(t){return this.emit("JOIN_STORIES_PRODUCT_REMOVE_FROM_CART",t)}sendProductAddToFavorite(t){return this.emit("JOIN_STORIES_PRODUCT_ADD_TO_FAVORITE",t)}sendCartValidated(t){return this.emit("JOIN_STORIES_CART_VALIDATED",t)}sendConversion(t){return this.emit("JOIN_STORIES_CONVERSION",t)}sendPageViewEvent(){return this.emit("JOIN_STORIES_PAGE_VIEW")}sendPageExitEvent(){return this.emit("JOIN_STORIES_PAGE_EXIT")}renderAd(t){return this.emit("JOIN_STORIES_RENDER_AD",t)}setCustomAdsTargeting(t,e){((t,e)=>{window.joinStories||(window.joinStories={}),window.joinStories.adsTargeting||(window.joinStories.adsTargeting={global:{},byWidget:{}}),e?window.joinStories.adsTargeting.byWidget[e]={...window.joinStories.adsTargeting.byWidget[e],...t}:window.joinStories.adsTargeting.global={...window.joinStories.adsTargeting.global,...t}})(t,e)}}const Ge=()=>{if(window.JoinStories)return window.JoinStories;const t=new Ye;return window.JoinStories=t,t};var Ke=(t=>(t.optin="optin",t.optout="optout",t.unknown="unknown",t.blockedByClient="blocked-by-client",t))(Ke||{});const Ze="_join_stories";class Qe{static instance;uid=null;consent=Ke.unknown;lastCheck=null;config=null;hasDisabledCookies=!1;abCampaign=void 0;constructor(){if(Qe.instance)return Qe.instance;const t=this.getJOINCookie();this.config=window.joinStories?.consentConfig||t?.config;try{JSON.stringify(this.config)!==JSON.stringify(t?.config)&&this.updateJOINCookieConf(this.config)}catch{}var e;t&&(this.uid=t.uid,this.consent=t.consent?.analytics??Ke.unknown,this.abCampaign=t.abCampaign&&(e=t.abCampaign)&&"object"==typeof e&&"_id"in e?t.abCampaign:void 0),Qe.instance=this}getUserConsentState(){let t=this.uid,e=this.consent;if(!this.lastCheck||Date.now()-this.lastCheck>1e4){e=this.getCurrentConsent();const n=this.getJOINCookie();t=this.isJOINCookieValid(n,e)?n?.uid||null:this.createJOINCookieConsent(e),this.uid!==t&&this.setOptInUserId(t),this.consent!==e&&this.setConsent(e),this.lastCheck=Date.now()}return{uid:t,consent:{analytics:e}}}setUserConsent(t){const e=t?Ke.optin:Ke.optout;e!==this.consent&&(this.setConsent(e),this.createJOINCookieConsent(e),this.lastCheck=null)}setConsentConfig(t){const e=this.getJOINCookie();this.config=t;try{JSON.stringify(this.config)!==JSON.stringify(e?.config)&&this.updateJOINCookieConf(this.config)}catch{}}hasCampaign(t){const e=this.getJOINCookie();return!(!e?.abCampaign||t!==e?.abCampaign?._id&&!(e?.abCampaign)[t])}getABCampaignCohort(t){const e=this.getJOINCookie();return(e?.abCampaign?._id===t?e?.abCampaign?.cohort:void 0)??(e?.abCampaign)[t]?.cohort}setABCampaign(t){this.abCampaign=t,this.getUserConsentState().consent.analytics===Ke.optin&&this.updateJOINCookieAbCampaign(t)}getABCampaign(){return this.abCampaign}clearABCampaign(){this.abCampaign=void 0,this.getUserConsentState().consent.analytics===Ke.optin&&this.updateJOINCookieAbCampaign(void 0)}setOptInUserId(t){this.uid=t}setConsent(t){this.consent=t}getCurrentCMPCookieConsent(){try{if("cookie"===this.config?.method&&this.config?.cookieName&&this.config?.cookieValue&&this.config.operator){const t=Ue(this.config.cookieName,{raw:!0});if(t&&"null"!==t&&"undefined"!==t&&""!==t.trim()&&t)return function(t,e,n){const i=function(t){return function(t){return/^[0-9A-Fa-f]+$/.test(t)&&t.length%2==0}(t)?function(t){try{return t.match(/.{1,2}/g)?.map(t=>
1String.fromCharCode(parseInt(t,16))).join("")||t}catch{return t}}(t):function(t){return/^[A-Za-z0-9+/]+[=]{0,2}$/.test(t)}(t)?Fe(t):$e(t)}(e);switch(n){case"includes":return i.includes(t);case"equals":return i===t;case"regular_expression":try{return new RegExp(t).test(i)}catch(t){return console.error("Invalid regular expression:",t),!1}default:return console.error("Unsupported operator:",n),!1}}(this.config.cookieValue,t,this.config.operator)?Ke.optin:Ke.optout}}catch(t){console.warn("JOIN: Error while checking CMP consent",t)}return Ke.unknown}getCurrentConsent(){return this.hasDisabledCookies?Ke.blockedByClient:"default"===this.config?.method?Ke.optin:"cookie"===this.config?.method?this.getCurrentCMPCookieConsent():"function"===this.config?.method?this.consent:Ke.unknown}createJOINCookieConsent(t){let e=null;const n=Date.now();if(t===Ke.optin){e=this.getJOINCookie()?.uid??re();const t={uid:e,timestamp:n,consent:{analytics:Ke.optin},config:this.config,abCampaign:this.abCampaign};Be(Ze,t)||(e=null,this.hasDisabledCookies=!0,this.consent=Ke.blockedByClient)}else this.getJOINCookie()&&Ve(Ze);return e}isJOINCookieValid(t,e){if(!t||!t.consent)return!1;const n=t.consent.analytics===e;return e===Ke.optin?"string"==typeof t.uid&&""!==t.uid.trim()&&n:!t.uid&&n}getJOINCookie(){try{return Ue(Ze,{encoding:"base64"})}catch{return null}}updateJOINCookieConf(t){const e=this.getJOINCookie();Be(Ze,{...e,config:t})}updateJOINCookieAbCampaign(t){const e=this.getJOINCookie();Be(Ze,{...e,abCampaign:t})}}const Xe=(t,e,n)=>{window.joinStories?.components?.[t]?.[e]||(window.joinStories||(window.joinStories={}),window.joinStories.components||(window.joinStories.components={}),window.joinStories.components[t]||(window.joinStories.components[t]={}),window.joinStories.components[t]={...window.joinStories.components[t],[e]:n})},tn=(t,e)=>n=>!!t.enableRead&&e.some(({id:t,publishedDate:e})=>t===n._id&&Number(e)>=Number(n.lastPublishDate)),en=B([]);function nn(t){const e=gt(en);return tn(t,e)}const on=new Set;let rn=!1;const sn=t=>{on.has(t)||on.add(t),rn||(rn=!0,requestAnimationFrame(t=>{rn=!1,on.forEach(e=>{e(t),on.delete(e)})}))},an={defaultMobileHeight:325,defaultDesktopHeight:400,defaultMobileSpacing:6,defaultDesktopSpacing:8,defaultMobileBorderRadius:8,defaultDesktopBorderRadius:8},ln={defaultMobileHeight:120,defaultDesktopHeight:150,defaultMobileSpacing:7,defaultDesktopSpacing:8,defaultMobileBorderRadius:8,defaultDesktopBorderRadius:8},cn={defaultMobileHeight:75,defaultDesktopHeight:90,defaultMobileSpacing:8,defaultDesktopSpacing:10},dn="Open Sans_600",hn=t=>{switch(t){case"card":return{defaultFontFamily:ie,defaultFontSize:30,defaultColor:"#ffffff",defaultMaxLines:3};case"sticky-bubble":return{defaultFontFamily:dn,defaultFontSize:15,defaultColor:"#FFFFFF",defaultMaxLines:3};case"sticky-card":return{defaultFontFamily:dn,defaultFontSize:17,defaultColor:"#FFFFFF",defaultMaxLines:4};default:return{defaultFontFamily:ie,defaultFontSize:12,defaultColor:"#111111",defaultMaxLines:2}}},un=t=>{switch(t){case"card":return{...an,ratio:9/16,playIconRatio:.22};case"square":return{...ln,ratio:1,playIconRatio:.5};default:return{...cn,ratio:1,playIconRatio:.5}}},_n=(t,e)=>{const{defaultMobileHeight:n,defaultDesktopHeight:i}=un(t.shape);return"desktop"===e?t.height||t.desktopHeight||i:t.height||t.mobileHeight||n},pn=(t,e)=>{const{ratio:n}=un(t.shape);return _n(t,e)*n},gn=(t,e)=>{const{defaultMobileSpacing:n,defaultDesktopSpacing:i}=un(t.shape);return"desktop"===e?t.spacing||t.desktopSpacing||i:t.spacing||t.mobileSpacing||n},fn=t=>{if(!t)return;const e=getComputedStyle(t),n=parseFloat(e.getPropertyValue("--join-widget-bubble-desktop-spacing"));return isNaN(n)?void 0:n},yn=new Set,vn=t=>{yn.forEach(e=>e(t))},mn=t=>(yn.add(t),1===yn.size&&document.addEventListener("scroll",vn,{passive:!0}),()=>wn(t)),wn=t=>{yn.delete(t),0===yn.size&&document.removeEventListener("scroll",vn)},bn=(t,e=1.3)=>{const[n,i]=dt(!1),o=pt(()=>{if(!t.current)return;const n=t.current.getBoundingClientRect().top;i(!!n&&n<window.innerHeight*e)},[e,t]);return ht(()=>{if(t.current)return o(),mn(o)},[o,t]),ht(()=>{n&&wn(o)},[o,n]),n},Cn="Story Cover",Sn="Story Video",En=t=>t?`${Cn} - ${t}`:Cn,kn=async t=>{const e=t.querySelector("video");if(!e||e.classList.contains("playing"))return;const n=e.getAttribute("data-video-src");if(!n)return;e.classList.add("loading");const i=await(async t=>
1{const e=(window.joinStories||(window.joinStories={}),window.joinStories.coverBlobs||(window.joinStories.coverBlobs=new Map),window.joinStories.coverBlobs),n=e.get(t);if(n)return n;const i=await(await fetch(t)).blob(),o=URL.createObjectURL(i);return e.set(t,o),o})(n);e.classList.contains("loading")&&(e.src=i,await e.play(),e.classList.add("playing"),e.classList.remove("loading"))},xn=t=>{const e=t.querySelector("video");e?.classList.remove("loading"),e?.src&&(e.pause(),e.currentTime=0,e.classList.remove("playing"),e.getAttribute("data-thumbnail-error")||(e.removeAttribute("src"),e.load()))},In=((t=4,e=5)=>{const n=[];for(let i=0;i<t;i++)for(let o=0;o<e;o++)n.push({x:.1+o/(e-1)*.8,y:.15+i/(t-1)*.7});return n})();class Tn{constructor(t,e,n={threshold:[0]}){this.node=t,this.callback=e,this.options=n,this.unsubscribe=this.unsubscribe.bind(this),this.handleVisibilityChange=this.handleVisibilityChange.bind(this),this.seenThresholds=n.threshold.map(t=>[t,!1]),this.destroyScrollListener=mn(this.handleVisibilityChange),this.intervalId=window.setInterval(this.handleVisibilityChange,1500),this.handleVisibilityChange()}lastSeenRatio=-1;seenThresholds=[];intervalId=null;destroyScrollListener;unsubscribe(){this.destroyScrollListener(),this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null)}handleVisibilityChange(){const t=window.innerWidth||document.documentElement.clientWidth,e=this.node.clientWidth>0&&this.node.clientWidth<t,n=(t=>this.options.threshold.reduce((e,n)=>t>=n?n:e,0))(((t,e,n)=>{const i=t.getBoundingClientRect(),o=t.getRootNode()||document;return((t,e,n)=>{const i=t.top,o=Math.max(0,t.left),r=t.height,s=Math.min(n,t.right-o);return e.map(t=>({x:o+t.x*s,y:i+t.y*r}))})(i,n,e).reduce((e,n)=>e+(t.contains(((t,e,n)=>n.elementFromPoint(t,e))(n.x,n.y,o))?1:0),0)})(this.node,e?this.node.clientWidth:t,In)/In.length);n>this.lastSeenRatio&&(this.lastSeenRatio=n,this.seenThresholds=this.seenThresholds.map(([t,e])=>!e&&t<=n?(this.callback(t),[t,!0]):[t,e])),this.lastSeenRatio>=this.options.threshold[this.options.threshold.length-1]&&this.unsubscribe()}}const Ln=Lt(({widgetConfig:t,platform:e,onClick:n,forceVisible:i,containerRef:o,feedPlayer:r,analyticsController:s,analyticsControllerV2:a,LayoutComponent:l,ShapeComponent:c,setContainer:d},h)=>{const u=nn(t);return ae(l,{ref:h,containerRef:o,setContainer:d,feedPlayer:r,analyticsController:s,analyticsControllerV2:a,forceVisible:i,widgetConfig:t,platform:e,renderItem:(i,o,r)=>ae(c,{platform:e,read:u(i),story:i,visible:r,widgetConfig:t,index:o,onClick:n},i._id)})}),Pn=new Map,jn=t=>t.map(t=>t._id).join(","),On=[.1,.5,.75,1],An=t=>{const{offsetWidth:e,scrollLeft:n,scrollWidth:i}=t;return{canScrollLeft:n>5,canScrollRight:i-(n+e)>5}},Nn=(t,{canScrollLeft:e,canScrollRight:n})=>{e?t.classList.add("canScrollLeft"):t.classList.remove("canScrollLeft"),n?t.classList.add("canScrollRight"):t.classList.remove("canScrollRight")};const Dn=Lt(({widgetConfig:t,analyticsController:e,analyticsControllerV2:n,platform:i,renderItem:o,noAnimation:r=!1,forceVisible:s=!1,feedPlayer:a},l)=>{const[c,d]=dt(s),h=nn(t),{ref:u,canScrollLeft:_,canScrollRight:p,isTooBigLeft:g,isTooBigRight:f,handleScroll:y}=(t=>{const{visible:e,widgetConfig:n,platform:i,onScroll:o}=t,r=ut(null),[s,a]=dt(!1),[l,c]=dt(!1),[d,h]=dt(!1),[u,_]=dt(!1),p=pt(t=>{const e=r.current;if(!e)return;const s=fn(e)??gn(n,i);a(e.scrollLeft>50),c(e.scrollLeft+e.clientWidth+50+s<e.scrollWidth),h(e.scrollLeft>0),_(e.scrollLeft+e.clientWidth+s<e.scrollWidth),t&&o?.("natural")},[i,n]);return ht(()=>{const t=r.current;if(t)return t.addEventListener("scroll",p),p(),()=>{t.removeEventListener("scroll",p)}},[p]),ht(()=>{e&&p()},[e,p]),{ref:r,canScrollLeft:s,canScrollRight:l,isTooBigLeft:d,isTooBigRight:u,handleScroll:t=>()=>{const e=fn(r.current)??gn(n,i),s=pn(n,i)+2*e,a="left"===t?-s:s;r.current?.scrollBy({left:a,behavior:"smooth"}),o?.("button")}}})({visible:c,widgetConfig:t,platform:i,onScroll:t=>{n?.sendWidgetScrolledEvent(t)}});(function(t){ht(()=>{const e=t.current?.querySelector(".join-widget-list");if(!e)return;const n=(t=>e=>{const{canScrollLeft:n,canScrollRight:i}=An(t);t&&!e.deltaX&&e.deltaY&&(e.deltaY>0&&i||e.deltaY<0&&n)&&(t.scrollLeft+=e.deltaY,e.preventDefault()),Nn(t,{canScrollLeft:n,canScrollRight:i})})(e),i=()=>Nn(e,An(e));return e.addEventListener("wheel",n,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("scroll",i,{passive:!0}),i(),()=>{e?.removeEventListener("wheel",n),e?.removeEventListener("touchmove",i),e?.removeEventListener("scroll",i)}},[])})(u),((t,e,n,i,o)=>{const r=ut(!1);ht(()=>{const s=t.current;if(!s||!e||0===i.stories.length)return;const a=()=>{const t="mobile"===n,e=s.getBoundingClientRect(),i=s.querySelectorAll(".video-cover-container"),o=t?3:1;let r=0;
1i.forEach(t=>{const n=t.getBoundingClientRect();n.left+.8*n.width<e.right&&n.right-.8*n.width>e.left&&r<o?(r++,kn(t).catch(()=>{})):xn(t)})},l=ne(a,100),c=t=>{const e=t.target.closest(".video-cover-container")?.getAttribute("data-cover-id");e&&(t=>{s.querySelectorAll(".video-cover-container").forEach(e=>{const n=e.getAttribute("data-cover-id");n&&(t===n?kn(e).catch(()=>{}):xn(e))})})(e)},d=()=>{a()},h=s.querySelectorAll(".video-cover-container"),u=()=>{a(),s.addEventListener("scroll",l,{passive:!0}),h?.forEach(t=>{t.addEventListener("mouseenter",c),t.addEventListener("mouseleave",d)})},_=()=>{s.removeEventListener("scroll",l),h.forEach(t=>{t.removeEventListener("mouseenter",c),t.removeEventListener("mouseleave",d)})},p=o?.subscribe("open",()=>{r.current=!0,h.forEach(t=>{xn(t)}),_()}),g=o?.subscribe("close",()=>{r.current=!1,u()});return u(),()=>{_(),p?.(),g?.()}},[t,e,n,i,o])})(u,c,i,t,a),function(t,e,n){const i=_t(()=>jn(t.stories),[t.stories]);ht(()=>{if(!e.current)return;const t=new Tn(e.current,n,{threshold:On});return()=>{t.unsubscribe()}},[e,i])}(t,u,t=>{.1===t&&d(!0),e?.sendWidgetVisibleBeacon(t);const i=u.current?(t=>{const{top:e}=t.getBoundingClientRect();return Math.round(e+window.scrollY)})(u.current):0;n?.sendWidgetVisibilityEvent(t,i)}),function(t,e){ue(t,e.labelsLineCount||hn(e.shape).defaultMaxLines,".join-widget-label-content",[t,e])}(u,t);const v=bn(u),m=t.reorderedReadStories?[...t.stories].sort((t,e)=>h(t)&&!h(e)?1:h(e)&&!h(t)?-1:0):t.stories,w=function(t,e){const{defaultFontFamily:n,defaultFontSize:i,defaultColor:o,defaultMaxLines:r}=hn(t.shape),{shape:s,alignment:a="center",showLabels:l=!0,labelsStyle:c,borderColors:d=[],labelsLineCount:h=r,showBorder:u=!1}=t,{fontFamily:_,fontSize:p=i,color:g=o,fontStyle:f="normal",textDecoration:y="none",paddingBottom:v="0"}=c??{},m=c?.websiteFont?"inherit":_??n,{ratio:w}=un(s),b="desktop"===e,C=_n(t,e),S=gn(t,e),E=(t=>t.borderRadius??8)(t),k=E&&E>0?E+6:0,x=u?15:2,I={"--labels-lines-count":h,"--labels-font-family":m,"--labels-font-size":`${p}px`,"--labels-font-style":f,"--labels-text-decoration":y,"--labels-line-height":"1em","--labels-color":g,"--labels-padding-bottom":`${v}em`},T={"--labels-font-size":`${p+2}px`,"--widget-height":`var(--join-widget-${s}-desktop-height, ${C}px)`,"--widget-width":1!==w?`calc(var(--widget-height) * ${w})`:"var(--widget-height)","--widget-spacing":`var(--join-widget-${s}-desktop-spacing, ${S}px)`};return{"--animated-border-color":"bubble"===s?d[0]:"","--nth-to-fade":"bubble"===s?3:5,"--align-margin":"center"===a?"auto":"-10px","--widget-height":`var(--join-widget-${s}-mobile-height, ${C}px)`,"--widget-width":1!==w?`calc(var(--widget-height) * ${w})`:"var(--widget-height)","--widget-spacing":`var(--join-widget-${s}-mobile-spacing, ${S}px)`,"--story-icon-ratio":1,"--border-radius":`${E}px`,"--background-border-radius":`${k}px`,"--title-margin-top":`${x}px`,...l?I:{},...b?T:{}}}(t,i),{apparitionAnimation:b,elementAnimation:C}=t,S=[c?"visible":"",f?"can-scroll-right":"",g?"can-scroll-left":"",r?"no-animation":"",b,C].filter(Boolean).join(" "),E=t.showLabels??!0;return ae(le,{css:"@keyframes fade-in{0%{opacity:0}to{opacity:1}}.join-list{position:relative;z-index:1;max-width:100%}.join-widget-list{scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:row;justify-content:safe var(--alignment);align-items:center;min-height:calc(var(--widget-height) + 16px * 2);margin:-15px var(--align-margin);padding:15px 10px;list-style:none;white-space:normal;overflow:hidden;overflow-x:auto;-webkit-overflow-scrolling:touch;width:fit-content;max-width:100%;box-sizing:border-box;pointer-events:all}.join-widget-list::-webkit-scrollbar{display:none}.join-widget-list li{display:flex;list-style-type:none}.join-widget-list-fade-in{position:absolute;inset:0;z-index:2;width:101%;pointer-events:none;background:linear-gradient(90deg,transparent 86.84%,rgba(255,255,255,1) 95.1%)}.can-scroll-left{-webkit-mask-image:linear-gradient(to right,transparent 0%,black calc(var(--widget-width) / var(--nth-to-fade)));mask-image:linear-gradient(to right,transparent 0%,black calc(var(--widget-width) / var(--nth-to-fade)));-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.can-scroll-right{-webkit-mask-image:linear-gradient(to right,black calc(100% - var(--widget-width) / var(--nth-to-fade)),transparent 100%);mask-image:linear-gradient(to right,black calc(100% - var(--widget-width) / var(--nth-to-fade)),transparent 100%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.can-scroll-left.can-scroll-right{-webkit-mask-image:linear-gradient(to right,transparent 0%,black calc(var(--widget-width) / var(--nth-to-fade)),black calc(100% - var(--widget-width) / var(--nth-to-fade)),transparent 100%);mask-image:linear-gradient(to right,transparent 0%,black calc(var(--widget-width) / var(--nth-to-fade)),black calc(100% - var(--widget-width) / var(--nth-to-fade)),transparent 100%)}.join-widget-element{border:inherit;background:unset;padding:unset;box-sizing:content-box;position:relative;width:var(--widget-width);min-width:var(--widget-width);max-width:var(--widget-width);padding:0 var(--widget-spacing);-webkit-tap-highlight-color:transparent}:not(.visible).join-widget-list:not(.no-animation) .join-widget-element,:not(.visible).join-widget-list:not(.no-animation)~.join-carousel-button{opacity:0}
1.visible.join-widget-list:not(.no-animation) .join-widget-element,.visible.join-widget-list:not(.no-animation)~.join-carousel-button{animation:fade-in .5s}[data-join-story-url]{cursor:pointer;transition:transform .1s linear}.join-list-title{display:none}.desktop .join-list-title{display:block;margin:12px 0}.play-button{position:absolute;top:calc(50% - 1px);left:50%;transform:translate(-50%,-50%);pointer-events:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.25));color:#fff}.play-button-minimalist{left:calc(50% + 2px)}.video-cover:not(.playing):not([data-thumbnail-error=true]){opacity:0}.video-cover.playing{opacity:1}",children:ae("div",{ref:l,className:`join-list ${i}`,style:w,children:[ae("style",{children:[b?window.joinStories?.animations?.[b]:"",C?window.joinStories?.animations?.[C]:""].join("\n")}),"desktop"===i&&_&&ae(ce,{direction:"left",onScroll:y("left"),className:E?"with-label":"without-label"}),ae("ul",{ref:u,className:`join-widget-list ${S}`,children:(v||c)&&m.map((t,e)=>o(t,e,c))}),"desktop"===i&&p&&ae(ce,{direction:"right",onScroll:y("right"),className:E?"with-label":"without-label"})]})})}),Mn=({x:t,y:e,width:n,height:i})=>ae("svg",{className:"play-button play-button-fill",x:t,y:e,width:n,height:i,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ae("g",{id:"Player",children:[ae("circle",{id:"Ellipse 27",cx:"9.99994",cy:"10.3417",r:"8.16068",stroke:"currentColor",strokeWidth:"1.2"}),ae("path",{id:"Polygon 1",d:"M12.9341 9.93216C13.2176 10.1313 13.2176 10.5514 12.9341 10.7505L9.02836 13.4938C8.69704 13.7265 8.24097 13.4895 8.24097 13.0847L8.24097 7.59796C8.24097 7.19308 8.69704 6.95609 9.02836 7.18881L12.9341 9.93216Z",fill:"currentColor"})]})}),Rn=({x:t,y:e,width:n,height:i})=>ae("svg",{x:t,y:e,width:n,height:i,className:"play-button play-button-minimalist",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ae("g",{id:"Player",children:ae("g",{id:"Polygon 1",filter:"url(#filter0_d_10733_7468)",children:ae("path",{d:"M14.4591 9.93999C14.7285 10.1399 14.7285 10.543 14.4591 10.7429L8.02024 15.5226C7.69032 15.7675 7.22222 15.532 7.22222 15.1211L7.22222 5.56182C7.22222 5.15094 7.69032 4.91544 8.02024 5.16034L14.4591 9.93999Z",fill:"currentColor"})})}),ae("defs",{children:ae("filter",{id:"filter0_d_10733_7468",x:"4.22266",y:"4.06055",width:"13.4385",height:"16.5615",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[ae("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),ae("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),ae("feOffset",{dy:"2"}),ae("feGaussianBlur",{stdDeviation:"1.5"}),ae("feComposite",{in2:"hardAlpha",operator:"out"}),ae("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),ae("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_10733_7468"}),ae("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_10733_7468",result:"shape"})]})})]}),Wn=({x:t,y:e,width:n,height:i})=>ae("svg",{className:"play-button play-button-outline",x:t,y:e,width:n,height:i,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ae("g",{id:"Player",children:[ae("circle",{id:"Ellipse 27",cx:"9.99994",cy:"10.3417",r:"8.16068",stroke:"currentColor",strokeWidth:"1.2"}),ae("path",{id:"Polygon 1",d:"M13.0253 10.0147C13.252 10.174 13.252 10.5101 13.0253 10.6694L8.96299 13.5227C8.69793 13.7088 8.33307 13.5192 8.33307 13.1953L8.33307 7.48873C8.33307 7.16483 8.69793 6.97524 8.96299 7.16141L13.0253 10.0147Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}),Un=({playIcon:t,...e})=>{const n=(t=>{switch(t){case"outline":return Wn;case"fill":return Mn;default:return Rn}})(t);return ae(n,{...e})},Bn=({cover:t,alt:e="Story Cover"})=>ae("picture",{children:ae("img",{loading:"lazy",className:"cover",src:t.mediaUrl,alt:e,onContextMenu:t=>t.preventDefault()})}),Vn=({cover:t,ref:e,ariaLabel:n})=>ae("div",{className:"cover video-cover-container",children:ae("video",{ref:e,"aria-label":n,style:{...t.cropCss}
1,className:"video-cover",muted:!0,playsInline:!0,loop:!0,autoPlay:!0,src:t.mediaUrl,content:t.contentType})}),$n=({id:t,cover:e,autoPlay:n,alt:i=Cn,ariaLabel:o=Sn})=>{const r=ut(null),[s,a]=dt((t=>t.mediaUrl.startsWith("blob:"))(e));if(ht(()=>{const t=r.current;s&&t&&t.load()},[s]),ht(()=>{const t=r.current;t&&t.classList.remove("playing")},[e.mediaUrl]),n)return ae(Vn,{cover:e,ref:r,ariaLabel:o});const l=q(e.mediaUrl);return ae("div",{"data-cover-id":t,className:"cover video-cover-container",children:[!s&&ae("img",{src:l,onError:()=>{a(!0)},alt:i,className:"video-cover-thumbnail",loading:"lazy",style:{...e.cropCss},onContextMenu:t=>t.preventDefault()}),ae("video",{ref:r,"aria-label":o,style:{...e.cropCss},className:"video-cover",muted:!0,playsInline:!0,loop:!0,"data-video-src":e.mediaUrl,content:e.contentType,...s?{src:e.mediaUrl,"data-thumbnail-error":!0,preload:"metadata"}:{},onContextMenu:t=>t.preventDefault()})]})},Fn=xt(({story:t,autoPlay:e})=>{const n=t.currentCover,i=n.contentType.includes("mp4"),o=En(t.containerLabel),r=(t=>t?`${Sn} for ${t}`:Sn)(t.containerLabel);return i?ae($n,{id:t._id,cover:n,autoPlay:e,alt:o,ariaLabel:r}):ae(Bn,{cover:n,alt:o})}),Jn=t=>t?(new DOMParser).parseFromString(t,"text/html").documentElement.textContent??"":"",Hn=({story:t})=>ae("div",{className:"join-widget-element-label",children:ae("span",{className:"join-widget-label-content","data-original-text":Jn(t.containerLabel),children:Jn(t.containerLabel)})}),zn="Play Story",qn=({id:t,startPoint:e,endPoint:n})=>{const i=(({x:t,y:e})=>0===t&&0===e?{x:0,y:0}:Math.abs(t)>Math.abs(e)?{x:t/Math.abs(t),y:e/Math.abs(t)}:{x:t/Math.abs(e),y:e/Math.abs(e)})({x:n.x-e.x,y:n.y-e.y}),o={x:Math.max(0,-i.x),y:Math.max(0,-i.y)},r={x:Math.max(0,i.x),y:Math.max(0,i.y)};return ae("linearGradient",{id:t,x1:o.x.toFixed(2),y1:o.y.toFixed(2),x2:r.x.toFixed(2),y2:r.y.toFixed(2),children:[ae("stop",{offset:"0%","stop-color":e.color}),ae("stop",{offset:"100%","stop-color":n.color})]})},Yn=(t,e,n,i={})=>{const{deltaX:o=n,deltaY:r=n}=i;return`M ${(o+t.x).toFixed(2)} ${(r+t.y).toFixed(2)} A ${n} ${n} 0 0 1 ${(o+e.x).toFixed(2)} ${(r+e.y).toFixed(2)}`},Gn=({section:t,borderColors:e,index:n,radius:i})=>{const o=`t${(1e4*Math.random()).toString()}`,{startPoint:r,endPoint:s}=t,a=e[n],l=e[(n+1)%e.length],c=`linearColors${n}_${o}`;return ae(m,{children:[ae(qn,{id:c,startPoint:{...r,color:a},endPoint:{...s,color:l}}),ae("path",{className:"section",d:Yn(r,s,i),fill:"none",stroke:`url(#${c})`,strokeLinecap:"round"})]})},Kn=({story:t,read:e,widgetConfig:n,index:i,onClick:o,platform:r})=>{const s=ut(null),a=t.videoUrl,{playIcon:l,borderColors:c,innerColor:d,showPlayButton:h,showLabels:u}=_t(()=>({playIcon:n.playIcon,borderColors:n.borderColors||[],showPlayButton:n.showPlayButton??!0,innerColor:n.innerColor||"rgba(0, 0, 0, 0)",showLabels:n.showLabels??!0}),[n]),_=(t=>new Array(t).fill(null).map((e,n)=>{const i=n/(t-1),o=-2*Math.PI*i-Math.PI/2;return{x:50*Math.sin(o),y:50*Math.cos(o)}}))(c.length+1),p=function(t){const e=[];let n=t[0];for(let i=1;i<t.length;i++){const o=t[i];e.push({startPoint:n,endPoint:o}),n=o}return e}(_),g=((t,e)=>{const{playIconRatio:n}=un(t.shape);return n*pn(t,e)})(n,r),f=(t=>t?`${zn} for ${t}`:zn)(t.containerLabel);return function(t,e,n){const i="desktop"===n;ht(()=>{const n=t.current;let o=!1;const r=()=>{n?.classList.add("clicked"),o=!1,n?.addEventListener("touchmove",s,{once:!0,passive:!0})},s=()=>{n?.classList.remove("clicked"),o=!0};if(i)return n?.addEventListener("click",e),()=>{n?.removeEventListener("click",e)};const a=()=>{n?.addEventListener("mouseup",e),n?.removeEventListener("touchmove",s),o||e()};return n?.addEventListener("touchstart",r,{passive:!0}),n?.addEventListener("mouseup",a,{passive:!0}),()=>{n?.removeEventListener("touchstart",r),n?.removeEventListener("mouseup",a),n?.removeEventListener("mouseup",e),n?.removeEventListener("touchmove",s)}},[i,e])}(s,async()=>{const e=setTimeout(()=>{s.current?.classList.add("loading")},250);await o(t,s.current),clearTimeout(e),s.current?.classList.remove("loading")},r),ae("li",{className:[e?"read":"","join-bubble-shape"].join(" "),"data-story-id":t._id,children:ae(le,{css:"@-webkit-keyframes sectionLoading{0%{stroke-width:4;stroke-dasharray:10% 0}5%{stroke-width:2;stroke-dasharray:5% 5%}49%{stroke-width:1;stroke-dasharray:0 10%}50%{stroke-width:2;stroke-dasharray:5% 5%}65%{stroke-width:4;stroke-dasharray:10% 0}to{stroke-width:4;stroke-dasharray:10% 0}}.section{stroke-width:3;stroke-dasharray:10% 0;transition:stroke-width .1s .4s linear,stroke-dasharray .4s linear;-webkit-transition:stroke-width .1s .4s linear,stroke-dasharray .4s linear}.section:nth-of-type(8){--n: 0}.section:nth-of-type(9){--n: 1}.section:nth-of-type(10){--n: 2}.section:nth-of-type(11){--n: 3}.section:nth-of-type(12){--n: 4}.section:nth-of-type(13){--n: 5}.section:nth-of-type(14){--n: 6}.section:nth-of-type(15){--n: 7}.section:nth-of-type(16){--n: 8}.section:nth-of-type(17){--n: 9}.section:nth-of-type(18){--n: 10}.section:nth-of-type(19){--n: 11}.section:nth-of-type(20){--n: 12}.section:nth-of-type(21){--n: 13}.section:nth-of-type(22){--n: 14}.section:nth-of-type(23){--n: 15.1}.section:nth-of-type(24){--n: 16.3}.section:nth-of-type(25){--n: 17.4}.section:nth-of-type(26){--n: 18.6}.section:nth-of-type(27){--n: 19.7}.section:nth-of-type(28){--n: 20.9}.section:nth-of-type(29){--n: 22}.section:nth-of-type(1){--n: 25}.section:nth-of-type(2){--n: 28}.section:nth-of-type(3){--n: 31}
1.section:nth-of-type(4){--n: 34}.section:nth-of-type(5){--n: 37}.section:nth-of-type(6){--n: 40}.section:nth-of-type(7){--n: 44}.loading{transform:scale(.92)}.loading .section{stroke-width:1;stroke-dasharray:3% 7%;animation:sectionLoading 1.5s linear calc((var(--n, 1)) * 1.5s / 80) infinite both}@-webkit-keyframes sectionsRotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loading .sections-canvas{transform-origin:center;animation:sectionsRotation 60s linear}.read .section{stroke-width:1;-webkit-filter:url(#grayscale);filter:url(#grayscale)}.read .innerColor{opacity:0}.shadowCircle{stroke-opacity:0;transition:stroke-opacity 0s .5s}.loading .shadowCircle{stroke-opacity:0;transition:stroke-opacity 0s 0s}.join-bubble{position:relative;overflow:visible;margin-top:2px}.join-bubble-shape{flex-direction:column;align-items:center;position:relative}.join-widget-element>div{transform:translateZ(0);transition:transform .2s ease-in-out}.join-widget-element.clicked>div{transform:translateZ(0) scale(.92)}.cover{position:absolute;top:7px;left:5px;height:calc(var(--widget-height) - 10px);width:calc(var(--widget-width) - 10px);border-radius:50%;overflow:hidden;margin:0!important;object-fit:cover;object-position:center;touch-action:pan-x pan-y;-webkit-touch-callout:none;transform:translateZ(0)}.video-cover,.video-cover-thumbnail{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center;touch-action:pan-x pan-y;-webkit-touch-callout:none}.join-widget-element-label{text-align:center;font-family:var(--labels-font-family);font-size:var(--labels-font-size);font-style:var(--labels-font-style);letter-spacing:0;text-decoration:var(--labels-text-decoration);margin:5px auto 0;background-color:transparent;color:var(--labels-color);width:fit-content;width:-moz-fit-content;max-width:calc(var(--widget-width) + var(--widget-spacing) - 4px);padding:0 0 var(--labels-padding-bottom);-webkit-user-select:none;user-select:none;height:calc(var(--labels-lines-count, 2) * var(--labels-line-height) + 4px);line-height:var(--labels-line-height);word-break:break-word}.join-carousel-button.with-label{top:calc(var(--widget-height) / 2 + 15px)!important}.join-carousel-button.without-label{top:50%!important}:not(.visible).join-widget-list:not(.no-animation) .join-widget-element-label{opacity:0}.visible.join-widget-list:not(.no-animation) .join-widget-element-label{animation:fade-in .5s}",children:[ae("button",{ref:s,type:"button",className:"join-widget-element",style:{"--bubble-index":i},"data-join-story-url":a,"aria-label":f,"aria-haspopup":"dialog",children:ae("div",{children:[ae("div",{className:"join-animation",children:ae("div",{})}),ae("svg",{className:"join-bubble",width:"100%",height:"100%",viewBox:"0 0 100 100",children:[ae("filter",{id:"grayscale",children:ae("feColorMatrix",{type:"matrix",values:"0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 0 1 0"})}),ae("filter",{id:"dropshadow",height:"130%",children:[ae("feGaussianBlur",{in:"SourceAlpha",stdDeviation:"3"}),ae("feOffset",{dx:"0",dy:"1",result:"offsetblur"}),ae("feComponentTransfer",{children:ae("feFuncA",{type:"linear",slope:".5"})}),ae("feMerge",{children:[ae("feMergeNode",{}),ae("feMergeNode",{in:"SourceGraphic"})]})]}),ae("circle",{className:"shadowCircle",style:{filter:"url(#dropshadow)"},strokeWidth:"3",stroke:"#000",strokeOpacity:".5",fill:"none",cx:50,cy:50,r:50}),d&&ae("circle",{className:"innerColor",fill:d,cx:50,cy:50,r:50}),ae("g",{className:"sections-canvas",children:p.map((t,e)=>ae(Gn,{section:t,index:e,borderColors:c,radius:50},e))})]}),ae(Fn,{story:t}),h&&ae(Un,{playIcon:l,x:25,y:25,width:g,height:g})]})}),u&&ae(Hn,{story:t})]})})},Zn="jDataLayer",Qn=()=>{const t=(window[Zn]||[]).reduce((t,e)=>"audience"===e.type&&e.data?{...t,...e.data}:t,{}),e=(navigator?.language||navigator?.userLanguage)?.split("-")?.[0]||"en",n=window?.location?.origin+window?.location?.pathname;return{[Y]:e,[G]:n,...t}},Xn=(t,e)=>{window.joinStories?.widgets?.[t]&&(window.joinStories.widgets[t].loaded=e)},ti=(t,e)=>{if(e.includes(t?.analyticsCallbackVersion??"v1"))return t?.analyticsCallback},ei=(t,e)=>{typeof window>"u"||(window.joinStories={...window.joinStories,animations:{...window.joinStories?.animations,[t]:e}})};ei("expend-from-left","@keyframes bubbleAppear{0%{transform:translate(calc(-1 * var(--bubble-index) * var(--widget-width)))}to{transform:translate(0)}}.join-widget-element{z-index:calc(100 - var(--bubble-index))!important}.visible.join-widget-list:not(.no-animation) .join-widget-element{animation:bubbleAppear .6s .3s cubic-bezier(.3,1.1,.6,1) both,fade-in .5s .4s cubic-bezier(0,0,0,1) both!important}.visible.join-widget-list:not(.no-animation) .join-widget-label-content{animation:fade-in 1.5s .8s cubic-bezier(0,0,0,1) both!important}.visible.join-widget-list:not(.no-animation) li:nth-child(1) .join-widget-element,.visible.join-widget-list:not(.no-animation)~.join-carousel-button{animation:fade-in .3s .3s ease-out both}"),ei("pulsating-waves",'@keyframes animationBefore{0%{box-shadow:0 0 0 0 var(--animated-border-color);opacity:.8}50%{box-shadow:0 0 0 20px var(--animated-border-color);opacity:0}
1}@keyframes animationAfter{0%{box-shadow:0 0 0 0 var(--animated-border-color);opacity:.8}85%{box-shadow:0 0 0 20px var(--animated-border-color);opacity:0}}@keyframes pulseAnimation{0%{transform:scale(1)}10%{transform:scale(.95)}20%{transform:scale(1)}}.visible li:nth-child(1) .join-widget-element{animation:fade-in .5s,pulseAnimation 3s 1.3s infinite linear both!important}.visible.expend-from-left li:nth-child(1) .join-widget-element{animation:fade-in .3s .3s ease-in-out both,pulseAnimation 3s 1.3s infinite linear both!important}.visible.join-widget-list.no-animation li:nth-child(1) .join-widget-element{animation:pulseAnimation 3s 1.3s infinite linear both!important}li:nth-child(1) .join-animation:before,li:nth-child(1) .join-animation:after{content:"";width:var(--widget-width);height:var(--widget-height);top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;border-radius:50%;opacity:0;z-index:-2}.visible li:nth-child(1) .join-animation:before{border-width:2px;animation:3s 2s infinite linear animationBefore}.visible li:nth-child(1) .join-animation:after{border-width:0;animation:3s 2s infinite linear animationAfter}.join-animation{position:absolute;width:100%;height:var(--widget-height);top:0;left:0;margin-top:2px}.join-animation div{position:absolute;width:var(--widget-width);height:var(--widget-height);top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;z-index:-1}');const ni=[.5,.75];class ii{config;enabled;_lastVisibleRatio;callback;constructor(t,e,n){this.enabled=t,this.config=e,this.callback=n,this._lastVisibleRatio=0}init(){this.sendWidgetBeacon("widgetMounted"),this.sendWidgetBeacon("storiesFetched"),this._lastVisibleRatio=0}sendWidgetVisibleBeacon(t){this._lastVisibleRatio>=t||!ni.includes(t)||(this._lastVisibleRatio=t,this.sendWidgetBeacon("componentVisible"+100*t))}sendWidgetBeacon(t,e={}){const n={event_version:"1",...this.getWidgetConf(),...e,eventType:t},i={event_version:n.event_version,eventOwner:n.eventOwner,cpWidgetAlias:n.cpWidgetAlias,cpWidgetVersion:n.cpWidgetVersion,date:n.date,eventCategory:n.eventCategory,...n.cpGoToUrl?{storyClicked:n.cpGoToUrl}:{},eventType:t};this.sendAnalyticsToServer("widgets/",n),this.sendAnalyticToDataLayer(i),this.sendAnalyticsToCallback(n)}sendStoryBeacon(t,e,n){const i={event_version:"1",...this.getStoryConf(e),...n,eventType:t},o={event_version:i.event_version,storyPageCount:i.storyPageCount,eventOwner:i.eventOwner,storyId:i.storyId,date:i.date,eventCategory:i.eventCategory,cpIndex:i.cpIndex,cpTitle:i.cpTitle,eventType:t};this.sendAnalyticsToServer("stories/",i),this.sendAnalyticToDataLayer(o),this.sendAnalyticsToCallback(i)}sendAnalyticsToCallback(t){this.enabled&&(this.callback?.(t),window.JoinStories?.emit("JOIN_ANALYTICS",t))}sendAnalyticsToServer(t,e){}sendAnalyticToDataLayer(t){if(this.enabled&&this.config.dataLayerName)try{const e=this.getDataLayer()||[];e.push({...t,provider:"join-stories"}),this.getDataLayer()||this.setDataLayer(e)}catch{}}getDataLayer(){if(this.config.dataLayerName)return window[this.config.dataLayerName]}setDataLayer(t){this.config.dataLayerName&&(window[this.config.dataLayerName]=t)}getStoryConf(t){return{storyPageCount:t.pageCount,storyPageEngagementCount:t.engagementCount,eventOwner:t.owner??this.config.owner,storyId:t._id,storySlug:"web-story-slug",storyWorkspace:"ws_default",date:Date.now(),eventCategory:"story",cpTitle:"web-story-title",eventUrl:window.location.href,cpDocumentReferrer:(e=this.config,e.type?`web-${e.type}`:null),cpScreenResolution:`${window.screen.width}x${window.screen.height}`,cpScreenColor:window.screen.colorDepth,cpBrowserLanguage:navigator.language||navigator.userLanguage,cpUserAgent:navigator.userAgent.toLowerCase(),hit:this.enabled};var e}getWidgetConf(){return{eventOwner:this.config.owner,cpWidgetAlias:this.config.alias,cpWidgetType:this.config.type,cpWidgetVersion:this.config.version,eventWidgetWorkspaces:["ws_default"],date:Date.now(),eventCategory:"widget",cpTitle:document.title,eventUrl:window.location.href,cpBaseUrl:window.location.href.split(/\?|#/)[0],cpScreenResolution:`${window.screen.width}x${window.screen.height}`,cpScreenColor:window.screen.colorDepth,cpBrowserLanguage:(navigator.language||navigator.userLanguage).toLowerCase(),cpUserAgent:navigator.userAgent.toLowerCase(),hit:this.enabled}}}function oi(t,e){if(!t||!e)return;const n=new FontFace(t.replace(/'/g,""),`url(${e})`,{display:"block"});document.fonts.add(n)}const ri=({layout:t,widgetConfig:e,feedPlayerPath:n,feedPlayerEnabled:i=!0,enableAnalytics:o,platform:r,onStoryClick:s,forceVisible:a,analyticsCallback:l,anal
1yticsControllerV2:c})=>{const{platformWidgetConfig:d,platform:h}=((t,e)=>{const n=(t=>{const e=(t=>"string"==typeof t?t:Object.entries(t).map(([t,e])=>{const n=(t=>t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).toLowerCase())(t);let i=e;return"boolean"==typeof i?i?n:`not ${n}`:("number"==typeof i&&/[height|width]$/.test(n)&&(i=`${i}px`),`(${n}: ${i})`)}).join(" and "))(t),n=_t(()=>window.matchMedia(e),[e]),[i,o]=dt(n.matches);return ht(()=>{let t=!0;const e=()=>{t&&o(n.matches)};return n.addListener(e),()=>{t=!1,n.removeListener(e)}},[n,e]),i})({minAspectRatio:"3/4"}),i=(e?"desktop"===e:n)?"desktop":"mobile";return{platformWidgetConfig:_t(()=>z(t,i),[t,i]),platform:i}})(e,r),{disabled:u}=d,_=ut(null);ht(()=>{h&&c?.setPlatform(h)},[h]);const p=_t(()=>((t,e="bubble")=>{const n=window.joinStories?.components?.layout?.[t];if(!n)return;const i=window.joinStories?.components?.shape?.[e];return i?Lt((t,e)=>ae(Ln,{ref:e,...t,LayoutComponent:n,ShapeComponent:i})):void 0})(t,d.shape),[t,d.shape]),[g,f]=dt(),y=ut(new ii(o,d,l)),v=ut(!1),[m,w]=dt([]),b=ut(null),C=ut(!1);(t=>{ht(()=>{t.labelsStyle?.websiteFont||(t.labelsStyle?.fontFamily&&t.labelsStyle.fontUrl?oi(t.labelsStyle.fontFamily,t.labelsStyle.fontUrl):oi(ie,oe))},[t.labelsStyle])})(d);const S=bn(_,1.1),E=_t(()=>jn(e.stories),[e.stories]),k=pt(t=>{if(u||!i)return;const o=()=>{const n=((...t)=>{if(!window.JoinFeedPlayer)return;if(Pn.has(t[0].alias)){const e=Pn.get(t[0].alias);return e?.setWidgetConfig(t[0]),e}const e=new window.JoinFeedPlayer(...t);return Pn.set(t[0].alias,e),e})(e,y.current,c??null,{container:b.current});n?(f(n),t?.(n)):console.warn("JOIN: JoinFeedPlayer not found")};window.JoinFeedPlayer?o():n&&((t,e)=>{const n=document.querySelector('script[id="join-feed-script"]');if(n)return void n.addEventListener("load",e,{once:!0});const i=document.createElement("script");i.id="join-feed-script",i.setAttribute("type","module"),i.setAttribute("src",t),i.async=!0,i.addEventListener("load",e,{once:!0}),document.body.appendChild(i)})(n,o)},[c,u,i,n,e]);return ht(()=>{u||(y.current.init(),v.current=!1)},[u,E]),ht(()=>{y.current.config=d},[d]),ht(()=>{S&&k()},[k,S]),ht(()=>()=>{g&&(t=>{const e=Pn.get(t);e&&(e.destroy(),Pn.delete(t))})(g.alias)},[g]),ht(()=>(d.enableRead&&w(ye(fe)??[]),g?.subscribe("close",()=>{d.enableRead&&w(ye(fe)??[])})),[d,g]),u?null:p?ae(en.Provider,{value:m,children:ae(p,{ref:_,feedPlayer:g,analyticsController:y.current,analyticsControllerV2:c,containerRef:b,forceVisible:a??e.forceVisible,widgetConfig:d,platform:h,onClick:async(e,n)=>{if(C.current)return;if(C.current=!0,(t=>{v.current?y.current.sendWidgetBeacon("additionalClickOnWidget",{cpGoToUrl:t._id}):(y.current.sendWidgetBeacon("firstClickOnWidget",{cpGoToUrl:t._id}),v.current=!0),c?.sendWidgetClickEvent(t)})(e),s)return await s(e,n),void(C.current=!1);const i=async i=>{i.switchToStory(e._id,n),i.ready||await new Promise(e=>{let n=!1;const o=()=>{n||(n=!0,i.unsubscribe("onContentReady",o),e(null))};i.subscribe("onContentReady",o);const r=((t,e)=>"bubble"===e&&"list"===t?4e3:500)(t,d.shape);setTimeout(o,r)});const o="solo-sticky"===t&&"desktop"===h;await i.open(n,o),C.current=!1};g?await i(g):await new Promise(t=>{k(e=>{i(e).then(t)})})},setContainer:t=>{g?.setContainer(t)}})}):(console.warn(`JOIN: Trigger for ${e.alias} not found (layout: ${t}, shape: ${d.shape})`),null)},si=Mt(()=>n.e(8207).then(n.bind(n,88207)).then(t=>t.L)),ai=({widgetConfig:t,analyticsControllerV2:e,enableAnalytics:n,options:i})=>{const[o,r]=dt(!1);return ae(m,t?{children:[ae(Nt,{fallback:null,children:ae(si,{onLoad:()=>r(!0)})}),ae(ri,{layout:"solo-sticky"===t.type?"solo-sticky":"spotlight"===t.type?"spotlight":"list",enableAnalytics:n,widgetConfig:t,feedPlayerEnabled:o,analyticsCallback:ti(i,["v1","all"]),analyticsControllerV2:e})]}:{})};function li(t,e,n,i){const o="string"==typeof t?document.getElementById(t):t;if(!o)return console.warn(`JOIN: Element with id ${t} not found`),()=>{};let r;const s=i?.enableAnalytics??!0;Xe("layout","list",Dn),Xe("shape","bubble",Kn),i?.segmentationKey&&(t=>{if(null==t)return;window.jDataLayer=window.jDataLayer||[];const e=ve();typeof e<"u"?e!==t&&console.warn(`JOINStories Warning: Segmentation key is already set to ${e} and cannot be changed to ${t}.`):window.jDataLayer.push({type:"segmentation-key",data:t})})(i.segmentationKey);const a=o.shadowRoot?o.shadowRoot:o.attachShadow({mode:"open"}),l=async()=>{try{const t=!!(typeof window<"u"&&window.Shopify)&&(window.Shopify?.designMode??!1),l=s&&!t,c=Date.now();Xn(n,!1);const d=(({audiences:t})=>Object.keys(t??{}).reduce((e,n)=>{const i=`wcp_${n}`,o=t?.[n];
1if(null!=o){if("object"==typeof o){const t=o.reduce((t,e,n)=>`${t}${0===n?"":","}${e}`,"");return{...e,[i]:t}}return{...e,[i]:o.toString()}}return e},{}))({audiences:Qn()}),h=await(async t=>{const e=await fetch((({owner:t,widgetAlias:e,audiences:n,productId:i})=>{const o=document.documentElement.lang.split("-")[0],r=new URL(`https://api.stories.studio/v3/teams/${t}/containers/${e}`);return r.searchParams.append("isPublished","true"),r.searchParams.append("payloadType","module"),o&&r.searchParams.append("language",o),Object.entries(n).forEach(([t,e])=>{r.searchParams.append(t,e)}),i&&r.searchParams.append("productId",i),r})(t),{method:"GET"});if(!e.ok)throw 404===e.status?new Error(`JOIN: widget ${t.widgetAlias} not found`):new Error(`JOIN: error while fetching widget ${t.widgetAlias} config: ${e.statusText}`);return(t=>{const e=Object.fromEntries(t.stories.map(t=>[t._id,t]));return{...t,publisherApiUrl:t.publisherApiUrl||"https://api.stories.studio/v3/",storiesData:e}})(await e.json())})({owner:e,widgetAlias:n,audiences:d,productId:i?.productId});i?.productId&&h.environment!==J.PRODUCT_PAGE&&console.warn("JOIN Stories - You passed a product id, but the widget is not a product page widget. Product id will be ignored."),r?(r.setWidgetConfig(h),r.setAudienceSlotMatch(h.slotsMatched)):r=new ze({widgetConfig:h,audienceSlotMatch:h.slotsMatched,platform:window.matchMedia("(min-aspect-ratio: 3/4)").matches?"desktop":"mobile",enabled:l,callback:ti(i,["v2","all"]),integrationType:"npm"}),r.sendWidgetEvent("widget-data-loaded",{widget_data_loading_time:Date.now()-c}),r.sendWidgetDisplayedEvent(o.offsetTop),U(ae(ai,{options:i,widgetConfig:h,analyticsControllerV2:r,enableAnalytics:l}),a),Xn(n,!0)}catch(t){if(!i?.onError)throw t;i.onError(t)}},c=()=>{U(null,a),Xn(n,!1)};return((t,{load:e,unload:n})=>{if(window.joinStories||(window.joinStories={widgets:{},animations:{}}),window.joinStories.widgets||(window.joinStories.widgets={}),window.joinStories.widgets[t]){const i=window.joinStories.widgets[t];window.joinStories.widgets[t]={loaded:!1,load:()=>{i.load(),e()},unload:()=>{i.unload(),n()}}}else window.joinStories.widgets[t]={loaded:!1,load:e,unload:n}})(n,{load:l,unload:c}),function(t,e){window[t]=window[t]||[];const n=window[t].push;window[t].push=function(...i){const o=n.apply(window[t],i);return e?.(),o}}(Zn,l),Ge(),function(){if(typeof window>"u")return;window.joinStories||(window.joinStories={});const t=new Qe;window.joinStories.consentManager=t}(),l(),c}n.d(e,["A",0,t=>t.reduce((t,e)=>t+e,0),"D",0,oe,"H",0,re,"I",0,le,"J",0,F,"S",0,ce,"a",0,ie,"b",0,Jn,"c",0,()=>new Promise(t=>{sn(e=>{t(e)})}),"d",0,ne,"e",0,sn,"f",0,(t,e)=>{const n=(t=>"touches"in t&&t.touches.length>0?t.touches[0].clientX:"changedTouches"in t&&t.changedTouches.length>0?t.changedTouches[0].clientX:t.clientX)(t),i=(t=>"touches"in t&&t.touches.length>0?t.touches[0].clientY:"changedTouches"in t&&t.changedTouches.length>0?t.changedTouches[0].clientY:t.clientY)(t),{left:o,top:r,width:s,height:a}=e.getBoundingClientRect();return{left:(n-o)/s,right:(o+s-n)/s,top:(i-r)/a,bottom:(r+a-i)/a}},"g",0,En,"i",0,t=>{if(!window.joinStories?.adsTargeting)return{};const e={...window.joinStories.adsTargeting.global,...t?window.joinStories.adsTargeting.byWidget[t]:{}};return Object.keys(e).reduce((t,n)=>e[n]&&"string"==typeof e[n]?{...t,[n]:e[n]}:t,{})},"j",0,Ge,"m",0,K,"n",0,(t,e)=>{const n=ye(fe)??[];if(!t.enableRead||tn(t,n)(e))return;const i=[{id:e._id,publishedDate:e.lastPublishDate},...n].slice(0,99);((t,e)=>{window.localStorage.setItem(t,JSON.stringify(e))})(fe,i)},"s",0,t=>{if(!t)return{};const{top:e,left:n,width:i,height:o}=t.getBoundingClientRect(),{innerWidth:r,innerHeight:s}=window;return{originX:(n+i/2)/r*100,originY:(e+o/2)/s*100}},"t",0,t=>{switch(t.service){case"google":return F(t,"google");case"shopify":return t.id;default:return}},"u",0,z,"v",0,q,"w",0,de,"z",0,t=>Math.floor(Math.random()*t)])}}]); 2//# sourceMappingURL=sourcemaps/3743-e2e777969cdd7c31.bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.