whatmore-react-assets 1.0.1772 → 1.0.1774
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[714],{22:function(e,t,r){r.d(t,{$S:function(){return s},_:function(){return o},b4:function(){return i},dl:function(){return n},nN:function(){return d},tn:function(){return l},vF:function(){return a}});const o="device_type",n="device_mode",i="mobile",a="tablet",s="desktop",l="portrait",d="landscape"},851:function(e,t,r){r.d(t,{A:function(){return g}});var o=r(1005),n=r(9950),i=r(9879),a=r(22),s=r(5830),l=r(932);var d=function(e){const[t,r,o,n,i]=(0,l.A)(),[d]=(0,s.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[p]=(0,s.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),c=i[a.dl]===a.nN?p/100:d/100*1.2;return[t*c,r*c,i]},p=r(1628),c=r.n(p),h=r(6702),x=(r(9733),r(4365),r(1348)),u=r(4414);var m=({size:e,color:t="rgba(255, 255, 255, 0.9)"})=>(0,u.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:{cursor:"pointer",transition:"all 0.3s ease",filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.5))"},className:"premium-close-icon",children:[(0,u.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"rgba(0, 0, 0, 0.6)",stroke:"rgba(255, 255, 255, 0.3)",strokeWidth:"1.5",style:{transition:"all 0.3s ease"}}),(0,u.jsx)("path",{d:"M15 9l-6 6M9 9l6 6",stroke:t,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"all 0.3s ease"}})]});var f=({size:e,color:t="rgba(255, 255, 255, 0.95)"})=>(0,u.jsxs)("svg",{width:.7*e,height:.7*e,viewBox:"0 0 80 80",fill:"none",style:{filter:"drop-shadow(0 8px 24px rgba(0,0,0,0.5))",transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer"},className:"premium-play-icon",children:[(0,u.jsx)("circle",{cx:"40",cy:"40",r:"28",fill:"url(#playGradient)",stroke:"rgba(255, 255, 255, 0.2)",strokeWidth:"1.5",style:{backdropFilter:"blur(20px)"}}),(0,u.jsx)("path",{d:"M32 26 L32 54 L56 40 Z",fill:t,stroke:"none",style:{filter:"drop-shadow(0 2px 8px rgba(0,0,0,0.3))"}}),(0,u.jsxs)("defs",{children:[(0,u.jsxs)("radialGradient",{id:"playGradient",cx:"0.3",cy:"0.3",r:"0.8",children:[(0,u.jsx)("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.25)"}),(0,u.jsx)("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0.08)"}),(0,u.jsx)("stop",{offset:"100%",stopColor:"rgba(255, 255, 255, 0.02)"})]}),(0,u.jsxs)("radialGradient",{id:"playGradientHover",cx:"0.3",cy:"0.3",r:"0.8",children:[(0,u.jsx)("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.4)"}),(0,u.jsx)("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0.15)"}),(0,u.jsx)("stop",{offset:"100%",stopColor:"rgba(255, 255, 255, 0.05)"})]})]}),(0,u.jsx)("style",{jsx:!0,children:"\n .premium-play-icon:hover { transform: scale(1.1); filter: drop-shadow(0 12px 32px rgba(0,0,0,0.6)); }\n .premium-play-icon:hover circle { fill: url(#playGradientHover); stroke: rgba(255, 255, 255, 0.4); transform: scale(1.05); }\n .premium-play-icon:hover path { fill: white; transform: translateX(1px); }\n .premium-play-icon:active { transform: scale(0.95); }\n "})]});var g=function(e){var t;const r=n.useRef(null);var[l,p,g]=d();(0,s.Xd)("whatmoreUITheme");const[v]=(0,s.QN)("whatmorePrimaryFont"),[w]=(0,s.QN)("whatmoreEmbedAppVideoTitle"),[b]=(0,s.QN)("whatmoreEmbedAppPositionPortrait"),[y]=(0,s.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[j]=(0,s.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[k]=(0,s.QN)("whatmoreEmbedAppPositionLandscape"),[S]=(0,s.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[L]=(0,s.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),E=(0,s.Xd)("whatmoreShopId"),C=(0,s.Xd)("isWhatmorePreviewMode");var N=b,z=y,A=j;g[a.dl]===a.nN&&(N=k,z=S,A=L);const[P,R]=(0,n.useState)(["initial",window.pageYOffset]),[M,F]=(0,n.useState)(!1),I=null!==(t=e.isSpotlight)&&void 0!==t&&t,Q=g[a.dl]===a.nN?.8*(0,x.O86)(E):1.2*(0,x.O86)(E),T=I?Q:1.2;l*=T,p*=T;const B=I?(0,x.LrK)(E):N,_=I?(0,x._2D)(E):(0,x.GSq)(E),[D,W]=(0,n.useState)(!I&&(0,x.n8Q)(E)),V=!I&&(0,x.YE3)(E);function X(e,t){R(e),e[1]<=100?F(!1):t!=M&&(F(t),W(!1))}(0,n.useEffect)(()=>{let e=window.pageYOffset,t=!1;const r=()=>{const r=window.pageYOffset;Math.abs(r-e)<100||(X([r>e?"scrolled-down":"scrolled-up",r],!0),e=r>0?r:0),t=!1},o=()=>{t||(window.requestAnimationFrame(r),t=!0)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[P]),(0,o.j)({ref:r,handler:()=>{X(["scrolled-up",P[1]],!0)}});const Y=e.event,H=e.inVideoClick,O=e.closeClick,G=.25*p,U=.5*p,q=.6*p,$="20px",Z=(0,x.GvQ)(E);var K=!1,J=0,ee=0;function te(e){K=e}return(0,u.jsx)("div",{className:"wht-popup",children:D&&!_?(0,u.jsx)(u.Fragment,{}):M&&_?(0,u.jsx)("div",{style:"left"===B?{left:"16px",bottom:I?(0,x.pUQ)(E)+"px":A+"px",position:"fixed",zIndex:Z}:{right:"16px",bottom:I?(0,x.pUQ)(E)+"px":A+"px",position:"fixed",zIndex:Z},children:(0,u.jsxs)("div",{onClick:()=>{X(["initial",P[1]],!1)},style:{width:q+"px",height:q*(16/9)+"px",borderRadius:$,overflow:"hidden",backgroundColor:"transparent",boxShadow:"0 12px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2)",backdropFilter:"blur(15px)",cursor:"pointer",transition:"all 0.3s ease",transformStyle:"preserve-3d"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,u.jsx)("div",{style:{overflow:"hidden",borderRadius:$,background:"linear-gradient(145deg, rgba(0,0,0,0.1), rgba(0,0,0,0.2))"},children:(0,u.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:16/9},children:(0,u.jsx)(i.A,{url:Y.thumbnail_image,isPlaying:!1,event:Y})})}),(0,u.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,u.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,u.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content",padding:"2px",position:"absolute",top:"0",right:"0",zIndex:10},children:(0,u.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",onClick:e=>{e.stopPropagation(),O()},children:(0,u.jsx)(m,{size:.8*G})})}),(0,u.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,u.jsx)(h.A,{sx:{color:"white",fontSize:2*G+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,u.jsx)(c(),{nodeRef:r,cancel:".activate-button,.close-btn",bounds:C?"parent":"html",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",onStart:(e,t)=>{var r,o;r=t.x,o=t.y,J=r,ee=o},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{K&&(Math.abs(t.x-J)>5||Math.abs(t.y-ee)>5)?te(!1):(V&&O(e),H(Y))},children:(0,u.jsx)("div",{ref:r,style:"left"===B?{left:I?(0,x.D2A)(E)+"px":z+"px",bottom:I?(0,x.pUQ)(E)+"px":A+"px",position:"fixed",zIndex:Z}:{right:I?(0,x.D2A)(E)+"px":z+"px",bottom:I?(0,x.pUQ)(E)+"px":A+"px",position:"fixed",zIndex:Z},children:(0,u.jsxs)("div",{style:{boxSizing:"border-box",width:e.isSpotlight&&"60122562760"==E?l+"px":p+"px",height:e.isSpotlight&&"60122562760"==E?p+"px":l+"px",borderRadius:$,overflow:"hidden",backgroundColor:"transparent",boxShadow:"0 20px 40px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2)",backdropFilter:"blur(20px)",transition:"all 0.3s ease"},className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,u.jsx)("div",{style:{overflow:"hidden",position:"relative",borderRadius:$,background:"linear-gradient(145deg, rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,u.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==E?16/9:9/16},children:(0,u.jsx)(i.A,{url:Y.thumbnail_image,isMuted:!0,isPlaying:!0,event:Y})})}),(0,u.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,u.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%",position:"relative"},children:[(0,u.jsx)("div",{style:{position:"absolute",top:"2px",right:"2px",zIndex:10},children:(0,u.jsx)("div",{className:"close-btn",onClick:O,children:(0,u.jsx)(m,{size:G})})}),(0,u.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto",marginTop:"auto",marginBottom:"auto"},children:(0,u.jsx)(f,{size:U})}),(0,u.jsx)("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",borderBottomLeftRadius:$,borderBottomRightRadius:$,background:w?"linear-gradient(to bottom, transparent, rgba(0,0,0,0.8))":"transparent"},children:(0,u.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:v,fontWeight:"600",fontSize:.35*G+"px",margin:0,padding:0,lineHeight:"125%",letterSpacing:"0.3px",textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:w})})]})})]})})})})}},932:function(e,t,r){var o=r(5830),n=r(1941),i=r(22),a=r(1348);t.A=function(e){const[t,r,s]=(0,n.A)(),[l]=(0,o.QN)("whatmoreLandscapePadding"),[d]=(0,o.QN)("whatmoreShopId"),[p]=(0,o.QN)("whatmoreVideoTileSize"),[c]=(0,o.QN)("whatmoreVideoTileSizePortrait"),h=s>r,x="portrait"==t?c:p,u=!("portrait"!=t||!(s>=481)),m=x/100*1.3*.5,f=x/100;var g=Math.min(s,r),[v,w,b,y]=[.6*g*(16/9),.6*g,1.4,0];function j(e){return Math.round(10*e)/10}var k={DEVICE_TYPE:i.b4,DEVICE_MODE:i.tn};if(h){const e=w*m,t=v*m;[v,w,b,y]=[t,e,(s-2*l-2*(0,a.$du)(d))/(1.1*e),l],k[i._]=i.$S,k[i.dl]=i.nN}else if(u){var S=.8*w,L=.8*v;"portrait"==t?(S*=f,L*=f,[v,w,b,y]=[L,S,j(s/(1.2*S)),0],k[i._]=i.vF,k[i.dl]=i.tn):([v,w,b,y]=[L,S,(s-2*l)/(1.1*S),l],k[i._]=i.vF,k[i.dl]=i.nN)}else{S=w,L=v;"portrait"==t?(S=S*f*.9,L=L*f*.9,[v,w,b,y]=[L,S,j(s/(1.15*S)),0],k[i._]=i.b4,k[i.dl]=i.tn):(S=.7*w,L=.7*v,[v,w,b,y]=[L,S,(s-2*l)/(1.1*S),l],k[i._]=i.b4,k[i.dl]=i.nN)}return[v,w,b,y,k]}},2410:function(e,t,r){var o=r(9950),n=r(1348),i=r(5830),a=(r(6125),r(4365),r(6614),r(9879)),s=(r(7509),r(932)),l=r(5551),d=r(4414);t.A=function(e){var t;const[r,p]=(0,s.A)(),[c]=(0,i.QN)("whatmoreSecondaryColor"),[h]=(0,i.QN)("whatmoreShopId"),x=(0,i.Xd)("whatmoreVideoTileSize"),u=(0,i.Xd)("whatmoreVideoTileSizePortrait"),m="portrait"===e.mode?u:x,f=(0,i.QN)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:g}=(0,o.useContext)(l.B),[v,w]=(0,o.useState)(!1),b=(0,n.ivI)(h),y=g.landingLocationType,j="22907887"===h?"portrait"===e.mode?.9:.83:1,k=e.event,S=e.onClick,L=e.removeBorders,E=j*r*m*.01,C=p*m*.01,N=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:(0,n._hU)(h)?"auto":C+"px",marginLeft:L?"2px":"5px",marginRight:L?"2px":(0,n.FZM)(h)+"px",marginTop:L?"2px":"5px",marginBottom:L?"2px":"5px",cursor:"pointer"},onClick:()=>{w(!0),S(k)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:N,overflow:"hidden",boxShadow:L?"":"0px 1px 1px 0px "+c+"50, 0px -1px 1px 0px "+b+"50, 1px 0px 1px 0px "+c+"50, -1px 0px 1px 0px "+b+"80, 1px -1px 1px 0px "+c+"80, -1px 1px 1px 0px "+b+"DA, 1px 1px 1px 0px "+c+"DA, -1px -1px 1px 0px "+b+"DA"},children:(0,d.jsxs)("div",{className:"whatmore-collection-event-tile",style:{flexShrink:0,objectFit:"cover",height:E+"px",width:"40273707171"==h?"auto":C+"px",borderRadius:N,backgroundColor:"gray",overflow:"hidden",transition:"transform 0.2s ease",transformOrigin:"bottom center"},onMouseEnter:e=>e.currentTarget.style.transform="scale(1.05)",onMouseLeave:e=>e.currentTarget.style.transform="scale(1)",children:[(0,d.jsx)(a.A,{height:"100%",width:"100%",url:k.thumbnail_image,isPlaying:!0,event:k}),function(){const t=Array.isArray(null===k||void 0===k?void 0:k.products)?k.products.filter(e=>"active"===e.product_status):[];return"22907887"===h&&t.length>0&&(0,d.jsxs)("div",{className:"whatmore-products-overlay",style:{position:"absolute",bottom:"portrait"===e.mode?"12px":"20px",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.3)",backdropFilter:"blur(4px)",borderRadius:"25px",padding:"portrait"===e.mode?"4px 8px":"5px 10px",display:"flex",alignItems:"center",gap:"portrait"===e.mode?"6px":"8px",transition:"transform 0.2s ease"},children:[t.slice(0,2).map((t,r)=>(0,d.jsx)("div",{style:{width:"portrait"===e.mode?"32px":"48px",height:"portrait"===e.mode?"32px":"48px",borderRadius:"50%",border:"2px solid white",overflow:"hidden",flexShrink:0,backgroundColor:"#f0f0f0"},children:(0,d.jsx)("img",{src:t.thumbnail_image,alt:t.title,style:{width:"100%",height:"100%",objectFit:"cover"}})},r)),t.length>2&&(0,d.jsx)("div",{style:{width:"portrait"===e.mode?"32px":"48px",height:"portrait"===e.mode?"32px":"48px",borderRadius:"50%",border:"2px solid white",backgroundColor:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,d.jsxs)("span",{style:{color:"white",fontSize:"portrait"===e.mode?"11px":"12px",fontWeight:"600"},children:["+",t.length-2]})})]})}()]})}),y.startsWith("product")&&(0,d.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"8px 4px 0 4px"},children:(0,d.jsx)("p",{ref:t=>{var r;t&&(t.style.setProperty("font-family",f,"important"),t.style.setProperty("font-size",(null!==(r=e.fontSize)&&void 0!==r?r:10)+"px","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},children:null===k||void 0===k?void 0:k.title})})]})}},3997:function(){},4365:function(){},4669:function(){},6042:function(){},6125:function(){},6614:function(){},7229:function(){},7509:function(e,t,r){r.d(t,{h:function(){return o}});const o=(0,r(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8385:function(e,t,r){r.d(t,{c:function(){return s}});var o=r(6649),n=r(9950),i=(r(4365),r(4414));function a(e){const[t,r,n]=(0,o.A)({triggerOnce:e.retainAlreadyRenderedElements});return(0,i.jsx)("div",{ref:t,children:r?e.renderElement({eventData:null===e||void 0===e?void 0:e.data}):(0,i.jsx)("div",{style:{backgroundColor:e.showBgPlaceholder?"gray":"transparent",minWidth:e.defaultWidth,minHeight:e.defaultHeight}})})}function s(e){var t,r;const o=(0,n.useRef)(null),s=(0,n.useRef)(null),[l,d]=(0,n.useState)(!1),[p,c]=(0,n.useState)(!1),[h,x]=(0,n.useState)({top:"50%",left:"5px",right:"5px"}),u="90518552861"===e.shopId,m=()=>{const e=o.current,t=s.current;if(!e||!t)return;const r=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;d(r>10);c(!(r+i>=n-10)&&n>i);t.getBoundingClientRect(),e.getBoundingClientRect();x({top:"50%",left:"5px",right:"5px"})};return(0,n.useEffect)(()=>{const e=o.current;let t,r,n,i=!1,a=0,s=null;function l(e){s&&(cancelAnimationFrame(s),s=null),e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(i=!0,t=e.touches[0].clientX,r=t,n=Date.now(),a=0):(i=!0,t=e.clientX,r=t,n=Date.now(),a=0)}function d(o){if(!i)return;const s=o.touches?o.touches[0].clientX:o.clientX,l=Date.now(),d=l-n;e.style.pointerEvents="none";const p=(o.touches?1.2:2)*(t-s);e.scrollLeft+=p,d>0&&(a=(r-s)/d),t=s,r=s,n=l}function p(t){e.style.pointerEvents="auto",i=!1;const r=30*a;Math.abs(r)>1&&function(t){let r=t;const o=.95,n=.5;function a(){Math.abs(r)>n&&!i?(e.scrollLeft+=r,r*=o,s=requestAnimationFrame(a)):s=null}s=requestAnimationFrame(a)}(r)}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",l,{passive:!1}),e.addEventListener("touchmove",d,{passive:!1}),e.addEventListener("touchend",p,{passive:!1})),e.addEventListener("mousedown",l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",p),u&&(e.addEventListener("scroll",m),setTimeout(()=>{m()},100),window.addEventListener("resize",m))),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",l),e.removeEventListener("touchmove",d),e.removeEventListener("touchend",p)),e.removeEventListener("mousedown",l),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",p),u&&(e.removeEventListener("scroll",m),window.removeEventListener("resize",m)))}},[u]),(0,i.jsxs)("div",{ref:s,style:{position:"relative",width:"100%",height:"fit-content"},className:"whatmore-carousel-navigation-wrapper",children:[u&&l&&(0,i.jsx)("button",{onClick:()=>{const e=o.current;e&&e.scrollBy({left:-300,behavior:"smooth"})},className:"whatmore-carousel-nav-arrow whatmore-carousel-nav-arrow-left",style:{position:"absolute",left:h.left,top:h.top,transform:"translateY(-50%)",zIndex:1e3,width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 1px 4px rgba(0,0,0,0.15)",transition:"all 0.2s ease",padding:0},onMouseEnter:e=>{e.currentTarget.style.transform="translateY(-50%) scale(1.1)",e.currentTarget.style.boxShadow="0 2px 6px rgba(0,0,0,0.2)"},onMouseLeave:e=>{e.currentTarget.style.transform="translateY(-50%) scale(1)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0,0,0,0.15)"},"aria-label":"Scroll left",children:(0,i.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:"whatmore-carousel-nav-icon",children:(0,i.jsx)("path",{d:"M15 18L9 12L15 6",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),u&&p&&(0,i.jsx)("button",{onClick:()=>{const e=o.current;e&&e.scrollBy({left:300,behavior:"smooth"})},className:"whatmore-carousel-nav-arrow whatmore-carousel-nav-arrow-right",style:{position:"absolute",right:h.right,top:h.top,transform:"translateY(-50%)",zIndex:1e3,width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 1px 4px rgba(0,0,0,0.15)",transition:"all 0.2s ease",padding:0},onMouseEnter:e=>{e.currentTarget.style.transform="translateY(-50%) scale(1.1)",e.currentTarget.style.boxShadow="0 2px 6px rgba(0,0,0,0.2)"},onMouseLeave:e=>{e.currentTarget.style.transform="translateY(-50%) scale(1)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0,0,0,0.15)"},"aria-label":"Scroll right",children:(0,i.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:"whatmore-carousel-nav-icon",children:(0,i.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,i.jsx)("div",{ref:o,style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3,overflowX:"auto",scrollBehavior:"auto",scrollbarWidth:"none",msOverflowStyle:"none",touchAction:"pan-y"},className:"whatmore-carousel-horizontal-flex",children:null===e||void 0===e||null===(r=e.dataList)||void 0===r?void 0:r.map((t,r)=>(0,i.jsx)(a,{showBgPlaceholder:e.showBgPlaceholder,renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+r))})]})}},9130:function(){},9733:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[199],{1019:function(e,t,n){n.d(t,{B:function(){return a}});var i=n(1348),o=n(964);function a(e){return`${(0,i.jpW)(e)?o.$$:o.MT}/v2/brand/${e}/product-events/recommendation/cdn`}},1351:function(e,t,n){n.d(t,{PG:function(){return s},kz:function(){return c},UM:function(){return u},yP:function(){return p},DG:function(){return d}});var i=n(1348),o=n(3330),a=n(6157);function l(e,t,n={},i){var o;const l=s[e];if(!l)return;const r=l.isActionEnabled(),c=null===i||void 0===i||null===(o=i.meta_actions)||void 0===o?void 0:o[l.customAction];(r||c)&&"function"==typeof fbq&&(async()=>{const i={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===a.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",l.action,i),c&&setTimeout(()=>{null===c||void 0===c||c.forEach(e=>{fbq("trackCustom",e,i)})},500)})()}var r=n(7145);const s={[a.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[a.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[a.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[a.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[a.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[a.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function d({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:t.video_duration>0?Math.ceil(t.watch_time/t.video_duration*100):"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}){var c,d,u;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}),e in s)&&(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(c=null===a||void 0===a||null===(d=a[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===a||void 0===a||null===(u=a[0])||void 0===u?void 0:u.title})}function p({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a}){(0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a})}},3350:function(e,t,n){n.r(t),n.d(t,{default:function(){return R}});var i=n(9950),o=n(964),a=n(140),l=n(5830),r=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(5551),p=n(2039),m=n(4833),v=n(2979),h=n(6157),g=n(8945),_=n(9821),S=n(4414);const y=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(340),n.e(387),n.e(987),n.e(9),n.e(160),n.e(665)]).then(n.bind(n,5213))),w=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(607),n.e(387),n.e(620),n.e(116)]).then(n.bind(n,7144))),I=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(714),n.e(423)]).then(n.bind(n,517))),E=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(714),n.e(412)]).then(n.bind(n,7646))),T=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(714),n.e(221)]).then(n.bind(n,5451))),x=i.lazy(()=>Promise.all([n.e(283),n.e(59),n.e(387),n.e(491)]).then(n.bind(n,4295))),f=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(387),n.e(987),n.e(9),n.e(688),n.e(496),n.e(620),n.e(474)]).then(n.bind(n,6945))),O=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(184),n.e(387),n.e(987),n.e(9),n.e(688),n.e(485)]).then(n.bind(n,4431))),C=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(387),n.e(987),n.e(676)]).then(n.bind(n,3369))),j=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(387),n.e(987),n.e(9),n.e(688),n.e(496),n.e(891)]).then(n.bind(n,7178))),D=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(387),n.e(987),n.e(9),n.e(688),n.e(496),n.e(306)]).then(n.bind(n,9406))),b=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(946),n.e(387),n.e(987),n.e(9),n.e(497)]).then(n.bind(n,3795))),L=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(946),n.e(387),n.e(9),n.e(151)]).then(n.bind(n,9112))),A=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(340),n.e(387),n.e(987),n.e(9),n.e(688),n.e(160),n.e(933)]).then(n.bind(n,6989))),P=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(744),n.e(387),n.e(987),n.e(9),n.e(688),n.e(806)]).then(n.bind(n,3278))),q=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(1)]).then(n.bind(n,4596))),W=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(387),n.e(987),n.e(9),n.e(688),n.e(906)]).then(n.bind(n,4688))),$=i.lazy(()=>n.e(374).then(n.bind(n,5100)));var k=function(e){var t,k;const[G]=(0,l.QN)("isInDesignMode"),[N]=(0,l.QN)("isDemoBrand"),[V]=(0,l.QN)("whatmoreTopBottomPadding"),[B]=(0,l.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:M}=(0,i.useContext)(u.B),[F]=(0,l.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:z}=(0,i.useContext)(u.B),R=(0,l.Xd)("isLandingSharedLink"),H=(0,l.Xd)("whatmoreShareTemplateId"),K=(0,l.Xd)("whatmoreShareStoryId"),U=(0,l.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:J,whatmoreUserInfo:Q}=(0,i.useContext)(u.B),X=R&&z===(0,m.Mm)(H),[Y,Z]=(0,i.useState)(X),[ee,te]=(0,i.useState)(-1),[ne,ie]=(0,i.useState)(null);let oe=e.events;const ae=e.allEvents;var le=null;M&&!le&&(le=function(e){var t=e.reduce((e,t,n)=>{var i,o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,storyset_dynamic_thumbnail:null!==(i=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==i&&i,events:[t]},e},{}),n=Object.values(t);return n.sort((e,t)=>e.start_event_index-t.start_event_index),n}(oe));const re=J.landingLocationType,se=J.templateType;function ce(e,t=!1,i=null){(0,c.MN)()&&(0,_._)()&&!t&&(0,d.bo)(),G||N||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=le[e].events[0],r=(0,m.Wd)(re)+(0,m.gf)(se)+(null!==l&&void 0!==l&&l.isRelatedEvent?"R":"E")+"_"+(null===l||void 0===l?void 0:l.event_id);(0,a.lB)(l),i(F,o.TB,o.OL),(0,s.Ch)(l.event_id,l.products,"homepage","stories",r,null===l||void 0===l?void 0:l.location,null===Q||void 0===Q?void 0:Q.userType)})();var l=0;null!=i&&le[e].events.map((e,t)=>{e.event_id==i&&(l=t)}),te(l),ie(e)}async function de(e,t=!1){(0,c.MN)()&&(0,_._)()&&!t&&await(0,d.bo)(),te(e.index),((0,p.ij)(e)||(0,p.Il)(e))&&(G||N||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=(0,m.Wd)(re)+(0,m.gf)(se)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),i(F,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",l)})())}function ue(e){return(0,S.jsx)(S.Fragment,{})}return(0,i.useEffect)(()=>{if(X)if((0,g.H)("whatmore-video-player",()=>{Z(!1)}),null!=K&&M){const e=le.find(e=>K==e.id);if(e)return void ce(le.indexOf(e),!0,U)}else if(null!=U){const e=oe.find(e=>U==e.event_id);if(e)return void de(e,!0)}},[]),(0,S.jsxs)(S.Fragment,{children:[Y&&(0,S.jsx)($,{}),-1==ee||-2==ee?(0,S.jsx)(ue,{}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.EVENT_VIEW,event:oe[ee],productList:null===(t=oe[ee])||void 0===t?void 0:t.products,cta:null===(k=oe[ee])||void 0===k?void 0:k.cta,triggerFlag:!G&&!N,children:(0,S.jsx)(W,{events:ae,index:ee,onBack:async function(){te(-1),Z(!1)},slideDirection:M||"horizontal"===(0,r.br0)(F)?"horizontal":"vertical",eventsStories:le,initialStoryIndex:ne,template:z})})}),(0,S.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(M?B:V)+"px",marginBottom:(M?B:V)+"px"},children:"template-b"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(y,{events:oe,onClick:de,heading:e.heading})})}):"template-a-1"===z||"template-collections-a-1"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(w,{events:oe,onClick:de,heading:e.heading})}):"template-feed-a"===z||"template-collections-feed-a"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(A,{events:oe,onClick:de,heading:e.heading})}):"template-collections-a"===z||"template-c"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(I,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-b"===z||"template-d"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(E,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-c"===z||"template-e"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(T,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-d"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(y,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-e"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(f,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-stories"===z||"template-stories"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(q,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-f"===z||"template-collections-f"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(O,{events:oe,onClick:de,heading:e.heading})})}):"template-g"===z||"template-collections-g"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(C,{events:oe,onClick:de,heading:e.heading})})}):"template-h"===z||"template-collections-h"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(j,{events:oe,onClick:de,heading:e.heading})})}):"template-i"===z||"template-collections-i"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(D,{index:ee,events:oe,onClick:de,heading:e.heading})})}):"template-j"===z||"template-collections-j"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(b,{events:oe,onClick:de,heading:e.heading})})}):"template-ai"===z||"template-collections-ai"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(L,{events:oe,onClick:de,heading:e.heading})})}):"template-banner-a"===z?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.BANNER_WIDGET_VIEW,event:oe[0],triggerFlag:!G&&!N,children:(0,S.jsx)(P,{events:oe})})}):M?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.STORIES_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(x,{eventsStories:le,onClick:ce,template:z})})}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,S.jsx)(f,{events:oe,onClick:de,heading:e.heading})})})})]})},G=n(7802),N=n(6641),V=n(1351),B=n(5873),M=n(1019);function F(e){return e.split(/[?#]/)[0]}function z(e){return e.split(/[?#]/)[0]}var R=function(e){const[t,a]=(0,i.useState)(),[p,v]=(0,i.useState)(),[g,y]=(0,i.useState)(),{whatmoreIsStoriesTemplate:w}=(0,i.useContext)(u.B),{whatmoreIsCollectionsTemplate:I}=(0,i.useContext)(u.B),{whatmoreIsBannerTemplate:E}=(0,i.useContext)(u.B),[T]=(0,l.QN)("whatmoreShopId"),{whatmoreCollectionId:x}=(0,i.useContext)(u.B),f=(0,l.Xd)("whatmoreLandingLocationType"),O=(0,l.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:C}=(0,i.useContext)(u.B),{whatmoreUserInfo:j,whatmoreIsPreviewMode:D}=(0,i.useContext)(u.B),b=(0,l.Xd)("whatmoreCollectionUrl"),[L]=(0,l.QN)("isInDesignMode"),[A]=(0,l.QN)("isDemoBrand"),P="19506115"==T?"343270603":(0,r.mJ$)(T)?(0,r.jLA)(T)?b:F(window.location.href):x||F(window.location.href),[q,W]=(0,l.QN)("productRatings"),[$,R]=(0,i.useState)(!1);var H=(0,r.SOt)(T)?o.aD+"/v2/events/":o.$$+"/v2/events/",K=(0,r.SOt)(T)?o.aD+"/v3/events/":o.$$+"/v3/events/",U=(0,r.SOt)(T)?o.aD+"/v4/events/":o.$$+"/v4/events/",J=(0,r.SOt)(T)?o.aD+"/v5/events/":o.$$+"/v5/events/",Q=((0,r.SOt)(T)?o.aD:o.$$,(0,r.SOt)(T)?o.aD+"/get_eventset/":o.$$+"/get_eventset/"),X=(0,r.SOt)(T)?o.aD+"/v2/collection":o.$$+"/v2/collection",Y=(0,r.SOt)(T)?o.aD+"/v3/collection":o.$$+"/v3/collection",Z=(0,r.SOt)(T)?o.aD+"/v4/collection":o.$$+"/v4/collection",ee=((0,r.jpW)(T)?o.$$:o.MT)+"/v2/brand/"+T+"/product-events",te=e.shopId,ne="live,upcoming",ie="true";return(0,i.useEffect)(()=>{null!=t&&0!=t.length&&!g&&(0,c.MN)()&&!(0,l.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,_._)()&&(0,d.Pc)(d.F5)},[t]),(0,i.useEffect)(()=>{var e,t,i,o;if((0,s.wm)(),f.startsWith("product")){var c=(0,l.Xd)("whatmoreProductId");if(c=(0,r.BcY)(T)?function(e){return"STRQMPNF7QK"==e?encodeURIComponent(window.location.href):"STR6HARJ3QY"==e||"STRI4V3OYCH"==e||"STRGZ9TGDEQ"==e||"STRJ2T2QPKI"==e?z(window.location.href).split("/").pop():z(window.location.href)}(T):c,"28575536"===T&&I)o=`${X.toString()}?store_id=${te.toString()}&client_collection_id=${F(window.location.href)}`;else if((0,r.vvU)(T))o=H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(T)){o=`${o=(0,M.B)(T)}?client_product_id=${c}&limit=10&recommended=${!(0,r.buK)(T)}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else o=ee.toString()+"?client_product_id="+c.toString()+"&status="+ne.toString()+"&event_type=video"}else if(I||"invalid-url"!==b)o=(0,r.JwJ)(T)?`${Y.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:"78232846646"==T?`${Z.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:`${X.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&1==(0,r.FKG)(T).length?(0,r.FKG)(T)[0]:P}`;else if(E){const e=m.Jh,t=(0,m.t6)(f);o=Q.toString()+te.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+T}else{var d,u,p,h;if(("72201044272"==T||"2665447536"==T&&D)&&!w)o=K.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+"&latitude="+(null!==(d=null===(u=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===u?void 0:u.latitude)&&void 0!==d?d:"")+"&longitude="+(null!==(p=null===(h=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===h?void 0:h.longitude)&&void 0!==p?p:"")+"&user_type="+(null!==j&&void 0!==j&&j.userType?"olduser":"newuser");else o=(0,r.JwJ)(T)&&!w?U.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString():"78232846646"!=T||w?H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":""):J.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()}const g=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(i=t.storyEvents)||void 0===i?void 0:i.events;w&&f.startsWith("index")&&"object"==typeof g&&(null===g||void 0===g?void 0:g.length)>0?(a(g),v(g),R(!0)):fetch(o).then(e=>e.json()).then(e=>{var t;if(E){const t=m.Jh;return(0,G.Po)(e,t)}return(0,r.JwJ)(T)&&(null===e||void 0===e||null===(t=e.questions)||void 0===t?void 0:t.length)>0&&(null==localStorage.getItem("_whatmore_qview_index")&&localStorage.setItem("_whatmore_qview_index",0),(0,s.d3)(null===e||void 0===e?void 0:e.questions)),(0,G.Np)(e,I||"invalid-url"!==b)}).then(e=>{var t,n;O&&console.debug("initial received events size : "+e.length);let i=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];i=(0,r.xku)(T)?(0,G.d8)(i):(0,G.Zf)(i),v(i);const o=null!==(t=null===e||void 0===e||null===(n=e.events)||void 0===n?void 0:n.length)&&void 0!==t?t:0;return i.slice(0,o)}).then(e=>{if((A||L)&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const e=async()=>{const{eventsData:e,storiesData:t,bannerData:i}=await n.e(365).then(n.bind(n,6018));a(w?t:E?i:e)};e()}else a(e);R(!0)}).catch(e=>{y(e.message),R(!0)})},[]),(0,i.useEffect)(()=>{"index"===f?t&&t.length>0&&(0,V.yP)({userInteractionType:h.O.HOMEPAGE_VISITED,widgetSourceDetails:C}):"collection"===f?(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,V.yP)({userInteractionType:h.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:C}):"product"===f&&(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,V.yP)({userInteractionType:h.O.PDP_VISITED,widgetSourceDetails:C})},[t]),$&&(null==t||0==t.length||g)&&B.Sn.forEach(e=>{var t,n,i,o;const a=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),l=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-feed-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]')||e.querySelector('.whatmore-template-type[data-wh="template-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-h"]')||e.querySelector('.whatmore-template-type[data-wh="template-j"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-stories"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]')||e.querySelector('.whatmore-template-type[data="template-g"]')||e.querySelector('.whatmore-template-type[data="template-h"]')||e.querySelector('.whatmore-template-type[data="template-j"]'),r=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-h"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]')||e.querySelector('.whatmore-template-type[data="template-collections-f"]')||e.querySelector('.whatmore-template-type[data="template-collections-g"]')||e.querySelector('.whatmore-template-type[data="template-collections-h"]')||e.querySelector('.whatmore-template-type[data="template-collections-j"]'),s=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(w){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!I){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||r||l||a)&&(l&&c||a&&c||s&&c||r&&c)&&(c.style.minHeight="0px")}),null==t||0==t.length||g?(0,S.jsx)("div",{}):(O&&(0,N.xv)(t),O&&console.debug("final transformed events data : "+JSON.stringify(t)),O&&console.debug("valid events size : "+t.length),(0,S.jsx)(k,{heading:e.heading,events:t,allEvents:p}))}},8945:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver(function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout(()=>{t(),i.disconnect()},8e3))});i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return i}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[199],{1019:function(e,t,n){n.d(t,{B:function(){return a}});var i=n(1348),o=n(964);function a(e){return`${(0,i.jpW)(e)?o.$$:o.MT}/v2/brand/${e}/product-events/recommendation/cdn`}},1351:function(e,t,n){n.d(t,{PG:function(){return s},kz:function(){return c},UM:function(){return u},yP:function(){return p},DG:function(){return d}});var i=n(1348),o=n(3330),a=n(6157);function l(e,t,n={},i){var o;const l=s[e];if(!l)return;const r=l.isActionEnabled(),c=null===i||void 0===i||null===(o=i.meta_actions)||void 0===o?void 0:o[l.customAction];(r||c)&&"function"==typeof fbq&&(async()=>{const i={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===a.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",l.action,i),c&&setTimeout(()=>{null===c||void 0===c||c.forEach(e=>{fbq("trackCustom",e,i)})},500)})()}var r=n(7145);const s={[a.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[a.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[a.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[a.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[a.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[a.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function d({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:t.video_duration>0?Math.ceil(t.watch_time/t.video_duration*100):"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}){var c,d,u;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}),e in s)&&(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(c=null===a||void 0===a||null===(d=a[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===a||void 0===a||null===(u=a[0])||void 0===u?void 0:u.title})}function p({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a}){(0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a})}},3350:function(e,t,n){n.r(t),n.d(t,{default:function(){return R}});var i=n(9950),o=n(964),a=n(140),l=n(5830),r=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(5551),p=n(2039),m=n(4833),h=n(2979),v=n(6157),g=n(8945),_=n(9821),y=n(4414);const S=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(340),n.e(387),n.e(987),n.e(9),n.e(160),n.e(665)]).then(n.bind(n,5213))),w=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(607),n.e(387),n.e(620),n.e(116)]).then(n.bind(n,7144))),I=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(714),n.e(423)]).then(n.bind(n,517))),E=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(714),n.e(412)]).then(n.bind(n,7646))),T=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(714),n.e(221)]).then(n.bind(n,5451))),x=i.lazy(()=>Promise.all([n.e(283),n.e(59),n.e(387),n.e(491)]).then(n.bind(n,4295))),f=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(387),n.e(987),n.e(9),n.e(688),n.e(496),n.e(620),n.e(474)]).then(n.bind(n,6945))),O=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(184),n.e(387),n.e(987),n.e(9),n.e(688),n.e(485)]).then(n.bind(n,4431))),C=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(387),n.e(987),n.e(676)]).then(n.bind(n,3369))),j=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(387),n.e(987),n.e(9),n.e(688),n.e(496),n.e(891)]).then(n.bind(n,7178))),D=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(387),n.e(987),n.e(9),n.e(688),n.e(496),n.e(306)]).then(n.bind(n,9406))),b=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(946),n.e(387),n.e(987),n.e(9),n.e(497)]).then(n.bind(n,3795))),L=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(946),n.e(387),n.e(9),n.e(151)]).then(n.bind(n,9112))),A=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(340),n.e(387),n.e(987),n.e(9),n.e(688),n.e(160),n.e(933)]).then(n.bind(n,6989))),P=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(744),n.e(387),n.e(987),n.e(9),n.e(688),n.e(806)]).then(n.bind(n,3278))),q=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(387),n.e(987),n.e(1)]).then(n.bind(n,4596))),W=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(387),n.e(987),n.e(9),n.e(688),n.e(906)]).then(n.bind(n,4688))),$=i.lazy(()=>n.e(374).then(n.bind(n,5100)));var k=function(e){var t,k;const[G]=(0,l.QN)("isInDesignMode"),[N]=(0,l.QN)("isDemoBrand"),[V]=(0,l.QN)("whatmoreTopBottomPadding"),[B]=(0,l.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:M}=(0,i.useContext)(u.B),[F]=(0,l.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:z}=(0,i.useContext)(u.B),R=(0,l.Xd)("isLandingSharedLink"),H=(0,l.Xd)("whatmoreShareTemplateId"),K=(0,l.Xd)("whatmoreShareStoryId"),U=(0,l.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:J,whatmoreUserInfo:Q}=(0,i.useContext)(u.B),X=R&&z===(0,m.Mm)(H),[Y,Z]=(0,i.useState)(X),[ee,te]=(0,i.useState)(-1),[ne,ie]=(0,i.useState)(null);let oe=e.events;const ae=e.allEvents;var le=null;M&&!le&&(le=function(e){var t=e.reduce((e,t,n)=>{var i,o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,storyset_dynamic_thumbnail:null!==(i=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==i&&i,events:[t]},e},{}),n=Object.values(t);return n.sort((e,t)=>e.start_event_index-t.start_event_index),n}(oe));const re=J.landingLocationType,se=J.templateType;function ce(e,t=!1,i=null){(0,c.MN)()&&(0,_._)()&&!t&&(0,d.bo)(),G||N||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=le[e].events[0],r=(0,m.Wd)(re)+(0,m.gf)(se)+(null!==l&&void 0!==l&&l.isRelatedEvent?"R":"E")+"_"+(null===l||void 0===l?void 0:l.event_id);(0,a.lB)(l),i(F,o.TB,o.OL),(0,s.Ch)(l.event_id,l.products,"homepage","stories",r,null===l||void 0===l?void 0:l.location,null===Q||void 0===Q?void 0:Q.userType)})();var l=0;null!=i&&le[e].events.map((e,t)=>{e.event_id==i&&(l=t)}),te(l),ie(e)}async function de(e,t=!1){(0,c.MN)()&&(0,_._)()&&!t&&await(0,d.bo)(),te(e.index),((0,p.ij)(e)||(0,p.Il)(e))&&(G||N||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=(0,m.Wd)(re)+(0,m.gf)(se)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),i(F,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",l)})())}function ue(e){return(0,y.jsx)(y.Fragment,{})}return(0,i.useEffect)(()=>{if(X)if((0,g.H)("whatmore-video-player",()=>{Z(!1)}),null!=K&&M){const e=le.find(e=>K==e.id);if(e)return void ce(le.indexOf(e),!0,U)}else if(null!=U){const e=oe.find(e=>U==e.event_id);if(e)return void de(e,!0)}},[]),(0,y.jsxs)(y.Fragment,{children:[Y&&(0,y.jsx)($,{}),-1==ee||-2==ee?(0,y.jsx)(ue,{}):(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.EVENT_VIEW,event:oe[ee],productList:null===(t=oe[ee])||void 0===t?void 0:t.products,cta:null===(k=oe[ee])||void 0===k?void 0:k.cta,triggerFlag:!G&&!N,children:(0,y.jsx)(W,{events:ae,index:ee,onBack:async function(){te(-1),Z(!1)},slideDirection:M||"horizontal"===(0,r.br0)(F)?"horizontal":"vertical",eventsStories:le,initialStoryIndex:ne,template:z})})}),(0,y.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(M?B:V)+"px",marginBottom:(M?B:V)+"px"},children:"template-b"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(S,{events:oe,onClick:de,heading:e.heading})})}):"template-a-1"===z||"template-collections-a-1"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(w,{events:oe,onClick:de,heading:e.heading})}):"template-feed-a"===z||"template-collections-feed-a"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(A,{events:oe,onClick:de,heading:e.heading})}):"template-collections-a"===z||"template-c"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(I,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-b"===z||"template-d"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(E,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-c"===z||"template-e"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(T,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-d"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(S,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-e"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(f,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-collections-stories"===z||"template-stories"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(q,{events:oe,index:ee,setScreen:te,onClick:de,heading:e.heading})})}):"template-f"===z||"template-collections-f"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(O,{events:oe,onClick:de,heading:e.heading})})}):"template-g"===z||"template-collections-g"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(C,{events:oe,onClick:de,heading:e.heading})})}):"template-h"===z||"template-collections-h"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(j,{events:oe,onClick:de,heading:e.heading})})}):"template-i"===z||"template-collections-i"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(D,{index:ee,events:oe,onClick:de,heading:e.heading})})}):"template-j"===z||"template-collections-j"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(b,{events:oe,onClick:de,heading:e.heading})})}):"template-ai"===z||"template-collections-ai"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(L,{events:oe,onClick:de,heading:e.heading})})}):"template-banner-a"===z?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.BANNER_WIDGET_VIEW,event:oe[0],triggerFlag:!G&&!N,children:(0,y.jsx)(P,{events:oe})})}):M?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.STORIES_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(x,{eventsStories:le,onClick:ce,template:z})})}):(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(h.S,{userInteractionType:v.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(f,{events:oe,onClick:de,heading:e.heading})})})})]})},G=n(7802),N=n(6641),V=n(1351),B=n(5873),M=n(1019);function F(e){return e.split(/[?#]/)[0]}function z(e){return e.split(/[?#]/)[0]}var R=function(e){const[t,a]=(0,i.useState)(),[p,h]=(0,i.useState)(),[g,S]=(0,i.useState)(),{whatmoreIsStoriesTemplate:w}=(0,i.useContext)(u.B),{whatmoreIsCollectionsTemplate:I}=(0,i.useContext)(u.B),{whatmoreIsBannerTemplate:E}=(0,i.useContext)(u.B),[T]=(0,l.QN)("whatmoreShopId"),{whatmoreCollectionId:x}=(0,i.useContext)(u.B),f=(0,l.Xd)("whatmoreLandingLocationType"),O=(0,l.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:C}=(0,i.useContext)(u.B),{whatmoreUserInfo:j,whatmoreIsPreviewMode:D}=(0,i.useContext)(u.B),b=(0,l.Xd)("whatmoreCollectionUrl"),[L]=(0,l.QN)("isInDesignMode"),[A]=(0,l.QN)("isDemoBrand"),P="19506115"==T?"343270603":(0,r.mJ$)(T)?(0,r.jLA)(T)?b:F(window.location.href):x||F(window.location.href),[q,W]=(0,l.QN)("productRatings"),[$,R]=(0,i.useState)(!1);var H=(0,r.SOt)(T)?o.aD+"/v2/events/":o.$$+"/v2/events/",K=(0,r.SOt)(T)?o.aD+"/v3/events/":o.$$+"/v3/events/",U=(0,r.SOt)(T)?o.aD+"/v4/events/":o.$$+"/v4/events/",J=(0,r.SOt)(T)?o.aD+"/v5/events/":o.$$+"/v5/events/",Q=((0,r.SOt)(T)?o.aD:o.$$,(0,r.SOt)(T)?o.aD+"/get_eventset/":o.$$+"/get_eventset/"),X=(0,r.SOt)(T)?o.aD+"/v2/collection":o.$$+"/v2/collection",Y=(0,r.SOt)(T)?o.aD+"/v3/collection":o.$$+"/v3/collection",Z=(0,r.SOt)(T)?o.aD+"/v4/collection":o.$$+"/v4/collection",ee=((0,r.jpW)(T)?o.$$:o.MT)+"/v2/brand/"+T+"/product-events",te=e.shopId,ne="live,upcoming",ie="true";return(0,i.useEffect)(()=>{null!=t&&0!=t.length&&!g&&(0,c.MN)()&&!(0,l.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,_._)()&&(0,d.Pc)(d.F5)},[t]),(0,i.useEffect)(()=>{var e,t,i,o;if((0,s.wm)(),f.startsWith("product")){var c=(0,l.Xd)("whatmoreProductId");if(c=(0,r.BcY)(T)?function(e){return"STRQMPNF7QK"==e?encodeURIComponent(window.location.href):"STR6HARJ3QY"==e||"STRI4V3OYCH"==e||"STRGZ9TGDEQ"==e||"STRJ2T2QPKI"==e?z(window.location.href).split("/").pop():z(window.location.href)}(T):c,"28575536"===T&&I)o=`${X.toString()}?store_id=${te.toString()}&client_collection_id=${F(window.location.href)}`;else if((0,r.vvU)(T))o=H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(T)){o=`${o=(0,M.B)(T)}?client_product_id=${c}&limit=10&recommended=${!(0,r.buK)(T)}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else o=ee.toString()+"?client_product_id="+c.toString()+"&status="+ne.toString()+"&event_type=video"}else if(I||"invalid-url"!==b)o=(0,r.JwJ)(T)?`${Y.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:"78232846646"==T?`${Z.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:`${X.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&1==(0,r.FKG)(T).length?(0,r.FKG)(T)[0]:P}`;else if(E){const e=m.Jh,t=(0,m.t6)(f);o=Q.toString()+te.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+T}else{var d,u,p,v;if(("72201044272"==T||"2665447536"==T&&D)&&!w)o=K.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+"&latitude="+(null!==(d=null===(u=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===u?void 0:u.latitude)&&void 0!==d?d:"")+"&longitude="+(null!==(p=null===(v=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===v?void 0:v.longitude)&&void 0!==p?p:"")+"&user_type="+(null!==j&&void 0!==j&&j.userType?"olduser":"newuser");else o=(0,r.JwJ)(T)&&!w?U.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString():"78232846646"!=T||w?H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":""):J.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()}const g=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(i=t.storyEvents)||void 0===i?void 0:i.events;w&&f.startsWith("index")&&"object"==typeof g&&(null===g||void 0===g?void 0:g.length)>0?(a(g),h(g),R(!0)):fetch(o).then(e=>e.json()).then(e=>{var t;if(E){const t=m.Jh;return(0,G.Po)(e,t)}return(0,r.JwJ)(T)&&(null===e||void 0===e||null===(t=e.questions)||void 0===t?void 0:t.length)>0&&(null==localStorage.getItem("_whatmore_qview_index")&&localStorage.setItem("_whatmore_qview_index",0),(0,s.d3)(null===e||void 0===e?void 0:e.questions)),(0,G.Np)(e,I||"invalid-url"!==b)}).then(e=>{var t,n;O&&console.debug("initial received events size : "+e.length);let i=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];i=(0,r.xku)(T)?(0,G.d8)(i):(0,G.Zf)(i),h(i);const o=null!==(t=null===e||void 0===e||null===(n=e.events)||void 0===n?void 0:n.length)&&void 0!==t?t:0;return i.slice(0,o)}).then(e=>{if((A||L)&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const e=async()=>{const{eventsData:e,storiesData:t,bannerData:i}=await n.e(365).then(n.bind(n,6018));a(w?t:E?i:e)};e()}else a(e);R(!0)}).catch(e=>{S(e.message),R(!0)})},[]),(0,i.useEffect)(()=>{"index"===f?t&&t.length>0&&(0,V.yP)({userInteractionType:v.O.HOMEPAGE_VISITED,widgetSourceDetails:C}):"collection"===f?(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,V.yP)({userInteractionType:v.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:C}):"product"===f&&(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,V.yP)({userInteractionType:v.O.PDP_VISITED,widgetSourceDetails:C})},[t]),$&&(null==t||0==t.length||g)&&B.Sn.forEach(e=>{var t,n,i,o;const a=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),l=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-feed-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]')||e.querySelector('.whatmore-template-type[data-wh="template-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-h"]')||e.querySelector('.whatmore-template-type[data-wh="template-j"]')||e.querySelector('.whatmore-template-type[data-wh="template-ai"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-stories"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]')||e.querySelector('.whatmore-template-type[data="template-g"]')||e.querySelector('.whatmore-template-type[data="template-h"]')||e.querySelector('.whatmore-template-type[data="template-j"]')||e.querySelector('.whatmore-template-type[data="template-ai"]'),r=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-h"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]')||e.querySelector('.whatmore-template-type[data="template-collections-f"]')||e.querySelector('.whatmore-template-type[data="template-collections-g"]')||e.querySelector('.whatmore-template-type[data="template-collections-h"]')||e.querySelector('.whatmore-template-type[data="template-collections-j"]'),s=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(w){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!I){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||r||l||a)&&(l&&c||a&&c||s&&c||r&&c)&&(c.style.minHeight="0px")}),null==t||0==t.length||g?(0,y.jsx)("div",{}):(O&&(0,N.xv)(t),O&&console.debug("final transformed events data : "+JSON.stringify(t)),O&&console.debug("valid events size : "+t.length),(0,y.jsx)(k,{heading:e.heading,events:t,allEvents:p}))}},8945:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver(function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout(()=>{t(),i.disconnect()},8e3))});i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return i}})}}]);
|