whatmore-react-assets 1.0.1816 → 1.0.1821
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 +1 -1
- package/static/css/banner-template-a.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-a.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-ai.5886a824.chunk.css +1 -0
- package/static/css/carousel-template-f.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-feed.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-g.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-h.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-i.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-j.475a42b7.chunk.css +1 -0
- package/static/css/carousel-template-view-more.475a42b7.chunk.css +1 -0
- package/static/css/collections-template-a.83e3340f.chunk.css +1 -0
- package/static/css/collections-template-b.83e3340f.chunk.css +1 -0
- package/static/css/collections-template-c.83e3340f.chunk.css +1 -0
- package/static/css/collections-template-stories.83e3340f.chunk.css +1 -0
- package/static/css/event-click-product.68e25b66.chunk.css +1 -0
- package/static/css/stories-template-a.8292e9da.chunk.css +1 -0
- package/static/css/whatmore-root.09bcc075.chunk.css +2 -0
- package/static/js/257.731cff2e.chunk.js +1 -0
- package/static/js/286.70655d59.chunk.js +1 -0
- package/static/js/33.46a8c962.chunk.js +1 -0
- package/static/js/512.c411674d.chunk.js +1 -0
- package/static/js/526.706d86bb.chunk.js +2 -0
- package/static/js/620.8b81307a.chunk.js +1 -0
- package/static/js/820.3abb966c.chunk.js +1 -0
- package/static/js/832.8a126a68.chunk.js +1 -0
- package/static/js/981.93048a23.chunk.js +281 -0
- package/static/js/banner-template-a.32ec8591.chunk.js +1 -0
- package/static/js/carousel-template-a.f15148d1.chunk.js +1 -0
- package/static/js/carousel-template-ai.2232a497.chunk.js +1 -0
- package/static/js/carousel-template-b.52683dec.chunk.js +1 -0
- package/static/js/carousel-template-f.4ca967f4.chunk.js +1 -0
- package/static/js/carousel-template-feed.6e0611d8.chunk.js +15 -0
- package/static/js/carousel-template-g.2f11a57c.chunk.js +1 -0
- package/static/js/carousel-template-h.95284d4b.chunk.js +1 -0
- package/static/js/carousel-template-i.ef4eaa14.chunk.js +1 -0
- package/static/js/carousel-template-j.6e45a3e9.chunk.js +1 -0
- package/static/js/carousel-template-view-more.faaa02f7.chunk.js +15 -0
- package/static/js/collections-template-a.1f191615.chunk.js +1 -0
- package/static/js/collections-template-b.27d9d0b6.chunk.js +1 -0
- package/static/js/collections-template-c.5bcd3559.chunk.js +1 -0
- package/static/js/collections-template-stories.3684ecbf.chunk.js +1 -0
- package/static/js/embed-tracking-component.64b05bcf.chunk.js +1 -0
- package/static/js/event-click-product.ffdab8eb.chunk.js +127 -0
- package/static/js/event-click-spotlight.50e0f126.chunk.js +1 -0
- package/static/js/homepage-carousel-view.9dd55d57.chunk.js +1 -0
- package/static/js/location-details.bd3f495b.chunk.js +1 -0
- package/static/js/product-page-view.9c0ab6ef.chunk.js +1 -0
- package/static/js/share-shimmer-loader.fe4b39e4.chunk.js +1 -0
- package/static/js/spotlight-view.a4edee17.chunk.js +1 -0
- package/static/js/stories-template-a.7a417d48.chunk.js +1 -0
- package/static/js/whatmore-root.cc24f244.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/css/3987.5e4fe0bc.chunk.css +0 -1
- package/static/css/6496.5be4f6b9.chunk.css +0 -2
- package/static/css/atc-with-form.d506a6d0.chunk.css +0 -1
- package/static/css/banner-template-a.0de12ee0.chunk.css +0 -2
- package/static/css/carousel-template-ai.4f625b46.chunk.css +0 -1
- package/static/css/carousel-template-b.958c07ee.chunk.css +0 -2
- package/static/css/carousel-template-f.015efd91.chunk.css +0 -2
- package/static/css/carousel-template-feed.00fa46a7.chunk.css +0 -2
- package/static/css/carousel-template-g.0ed6363a.chunk.css +0 -2
- package/static/css/carousel-template-j.0ed6363a.chunk.css +0 -2
- package/static/css/carousel-template-view-more.aaf7bb12.chunk.css +0 -2
- package/static/css/collections-template-a.2292dfbf.chunk.css +0 -2
- package/static/css/collections-template-b.2292dfbf.chunk.css +0 -2
- package/static/css/collections-template-c.2292dfbf.chunk.css +0 -2
- package/static/css/collections-template-stories.2292dfbf.chunk.css +0 -2
- package/static/css/event-click-product.d506a6d0.chunk.css +0 -1
- package/static/css/event-click-spotlight.d506a6d0.chunk.css +0 -1
- package/static/css/event-click.a9e480c7.chunk.css +0 -2
- package/static/css/stories-template-a.097af4b8.chunk.css +0 -2
- package/static/js/2257.ff34d36c.chunk.js +0 -1
- package/static/js/2275.afa6c9f5.chunk.js +0 -127
- package/static/js/2607.5a1db4f5.chunk.js +0 -1
- package/static/js/3059.e019b18d.chunk.js +0 -2
- package/static/js/3262.9b098965.chunk.js +0 -1
- package/static/js/3714.ba9df5ea.chunk.js +0 -1
- package/static/js/4160.78581331.chunk.js +0 -1
- package/static/js/4241.93d1d2ed.chunk.js +0 -2
- package/static/js/4816.841cc97e.chunk.js +0 -1
- package/static/js/5620.e2de87a2.chunk.js +0 -1
- package/static/js/6340.c917ac9d.chunk.js +0 -2
- package/static/js/6496.932b3233.chunk.js +0 -1
- package/static/js/7184.66f26374.chunk.js +0 -2
- package/static/js/7387.9d636cdc.chunk.js +0 -1
- package/static/js/744.123da996.chunk.js +0 -2
- package/static/js/7534.47395526.chunk.js +0 -2
- package/static/js/8283.a69e6aaf.chunk.js +0 -2
- package/static/js/8286.60a08819.chunk.js +0 -1
- package/static/js/8304.f74a37d8.chunk.js +0 -280
- package/static/js/9009.2f0d1cbd.chunk.js +0 -1
- package/static/js/9946.a04656ca.chunk.js +0 -1
- package/static/js/atc-with-form.973f6aab.chunk.js +0 -1
- package/static/js/banner-template-a.b9a7ac6f.chunk.js +0 -1
- package/static/js/carousel-template-a.232be0ea.chunk.js +0 -1
- package/static/js/carousel-template-ai.e1de023a.chunk.js +0 -2
- package/static/js/carousel-template-b.7d831ae3.chunk.js +0 -1
- package/static/js/carousel-template-f.253f8dad.chunk.js +0 -1
- package/static/js/carousel-template-feed.8c9f52e5.chunk.js +0 -15
- package/static/js/carousel-template-g.487fc15d.chunk.js +0 -1
- package/static/js/carousel-template-h.a7c0b14d.chunk.js +0 -1
- package/static/js/carousel-template-i.f5a41a90.chunk.js +0 -1
- package/static/js/carousel-template-j.76720098.chunk.js +0 -2
- package/static/js/carousel-template-view-more.3952a12e.chunk.js +0 -55
- package/static/js/collections-template-a.3eaa1d4d.chunk.js +0 -1
- package/static/js/collections-template-b.cf0d7c7e.chunk.js +0 -1
- package/static/js/collections-template-c.e1d70538.chunk.js +0 -1
- package/static/js/collections-template-stories.69b95138.chunk.js +0 -1
- package/static/js/embed-tracking-component.70b392f7.chunk.js +0 -1
- package/static/js/event-click-product.20572489.chunk.js +0 -2
- package/static/js/event-click-spotlight.dac9b550.chunk.js +0 -2
- package/static/js/event-click.e5dec782.chunk.js +0 -2
- package/static/js/homepage-carousel-view.cee63e44.chunk.js +0 -1
- package/static/js/location-details.27aa0e1a.chunk.js +0 -1
- package/static/js/mock-events.bcdae891.chunk.js +0 -1
- package/static/js/product-page-view.fe290e46.chunk.js +0 -1
- package/static/js/share-shimmer-loader.703ffde2.chunk.js +0 -1
- package/static/js/spotlight-view.e2c8575d.chunk.js +0 -1
- package/static/js/stories-template-a.1ee2e09a.chunk.js +0 -1
- package/static/js/whatmore-root.1dcbe527.chunk.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[3262,8717],{22:function(t,e,o){o.d(e,{$S:function(){return s},_:function(){return n},b4:function(){return i},dl:function(){return r},nN:function(){return c},tn:function(){return d},vF:function(){return a}});const n="device_type",r="device_mode",i="mobile",a="tablet",s="desktop",d="portrait",c="landscape"},69:function(t,e,o){o.d(e,{Ij:function(){return i},bi:function(){return a}});let n,r=!1;function i(){return n?n.play().then(()=>{r=!0,console.debug("iOS autoplay restrictions bypassed."),n.pause()}).catch(t=>{console.error("Failed to bless videos:",t.message)}):Promise.reject(new Error("Blessing video not initialized."))}function a(){n||(n=document.createElement("video"),n.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",n.muted=!0,n.playsInline=!0,n.style.display="none",document.body.appendChild(n));const t=()=>{r||i()};document.addEventListener("click",t,{once:!0}),document.addEventListener("touchstart",t,{once:!0})}},851:function(t,e,o){o.d(e,{A:function(){return g}});var n=o(1005),r=o(9950),i=o(9879),a=o(22),s=o(5830),d=o(932);var c=function(t){const[e,o,n,r,i]=(0,d.A)(),[c]=(0,s.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[l]=(0,s.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=i[a.dl]===a.nN?l/100:c/100*1.2;return[e*u,o*u,i]},l=o(1628),u=o.n(l),p=o(6702),h=(o(9733),o(4365),o(1348)),m=o(4414);var f=({size:t,color:e="rgba(255, 255, 255, 0.9)"})=>(0,m.jsxs)("svg",{width:t,height:t,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,m.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,m.jsx)("path",{d:"M15 9l-6 6M9 9l6 6",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"all 0.3s ease"}})]});var v=({size:t,color:e="rgba(255, 255, 255, 0.95)"})=>(0,m.jsxs)("svg",{width:.7*t,height:.7*t,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,m.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,m.jsx)("path",{d:"M32 26 L32 54 L56 40 Z",fill:e,stroke:"none",style:{filter:"drop-shadow(0 2px 8px rgba(0,0,0,0.3))"}}),(0,m.jsxs)("defs",{children:[(0,m.jsxs)("radialGradient",{id:"playGradient",cx:"0.3",cy:"0.3",r:"0.8",children:[(0,m.jsx)("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.25)"}),(0,m.jsx)("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0.08)"}),(0,m.jsx)("stop",{offset:"100%",stopColor:"rgba(255, 255, 255, 0.02)"})]}),(0,m.jsxs)("radialGradient",{id:"playGradientHover",cx:"0.3",cy:"0.3",r:"0.8",children:[(0,m.jsx)("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.4)"}),(0,m.jsx)("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0.15)"}),(0,m.jsx)("stop",{offset:"100%",stopColor:"rgba(255, 255, 255, 0.05)"})]})]}),(0,m.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(t){var e;const o=r.useRef(null);var[d,l,g]=c();(0,s.Xd)("whatmoreUITheme");const[y]=(0,s.QN)("whatmorePrimaryFont"),[w]=(0,s.QN)("whatmoreEmbedAppVideoTitle"),[x]=(0,s.QN)("whatmoreEmbedAppPositionPortrait"),[b]=(0,s.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[S]=(0,s.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[j]=(0,s.QN)("whatmoreEmbedAppPositionLandscape"),[T]=(0,s.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[E]=(0,s.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),C=(0,s.Xd)("whatmoreShopId"),A=(0,s.Xd)("isWhatmorePreviewMode");var k=x,_=b,N=S;g[a.dl]===a.nN&&(k=j,_=T,N=E);const[P,q]=(0,r.useState)(["initial",window.pageYOffset]),[I,L]=(0,r.useState)(!1),O=null!==(e=t.isSpotlight)&&void 0!==e&&e,z=g[a.dl]===a.nN?.8*(0,h.O86)(C):1.2*(0,h.O86)(C),F=O?z:1.2;d*=F,l*=F;const R=O?(0,h.LrK)(C):k,M=O?(0,h._2D)(C):(0,h.GSq)(C),[Q,D]=(0,r.useState)(!O&&(0,h.n8Q)(C)),V=!O&&(0,h.YE3)(C);function G(t,e){q(t),t[1]<=100?L(!1):e!=I&&(L(e),D(!1))}(0,r.useEffect)(()=>{let t=window.pageYOffset,e=!1;const o=()=>{const o=window.pageYOffset;Math.abs(o-t)<100||(G([o>t?"scrolled-down":"scrolled-up",o],!0),t=o>0?o:0),e=!1},n=()=>{e||(window.requestAnimationFrame(o),e=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)},[P]),(0,n.j)({ref:o,handler:()=>{G(["scrolled-up",P[1]],!0)}});const B=t.event,X=t.inVideoClick,W=t.closeClick,$=.25*l,J=.5*l,U=.6*l,H="20px",Y=(0,h.GvQ)(C);var K=!1,Z=0,tt=0;function et(t){K=t}return(0,m.jsx)("div",{className:"wht-popup",children:Q&&!M?(0,m.jsx)(m.Fragment,{}):I&&M?(0,m.jsx)("div",{style:"left"===R?{left:"16px",bottom:O?(0,h.pUQ)(C)+"px":N+"px",position:"fixed",zIndex:Y}:{right:"16px",bottom:O?(0,h.pUQ)(C)+"px":N+"px",position:"fixed",zIndex:Y},children:(0,m.jsxs)("div",{onClick:()=>{G(["initial",P[1]],!1)},style:{width:U+"px",height:U*(16/9)+"px",borderRadius:H,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"===R?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,m.jsx)("div",{style:{overflow:"hidden",borderRadius:H,background:"linear-gradient(145deg, rgba(0,0,0,0.1), rgba(0,0,0,0.2))"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:16/9},children:(0,m.jsx)(i.A,{url:B.thumbnail_image,isPlaying:!1,event:B})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,m.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,m.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",onClick:t=>{t.stopPropagation(),W()},children:(0,m.jsx)(f,{size:.8*$})})}),(0,m.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,m.jsx)(p.A,{sx:{color:"white",fontSize:2*$+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,m.jsx)(u(),{nodeRef:o,cancel:".activate-button,.close-btn",bounds:A?"parent":"html",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",onStart:(t,e)=>{var o,n;o=e.x,n=e.y,Z=o,tt=n},onDrag:(t,e)=>{et(!0)},onStop:(t,e)=>{K&&(Math.abs(e.x-Z)>5||Math.abs(e.y-tt)>5)?et(!1):(V&&W(t),X(B))},children:(0,m.jsx)("div",{ref:o,style:"left"===R?{left:O?(0,h.D2A)(C)+"px":_+"px",bottom:O?(0,h.pUQ)(C)+"px":N+"px",position:"fixed",zIndex:Y}:{right:O?(0,h.D2A)(C)+"px":_+"px",bottom:O?(0,h.pUQ)(C)+"px":N+"px",position:"fixed",zIndex:Y},children:(0,m.jsxs)("div",{style:{boxSizing:"border-box",width:t.isSpotlight&&"60122562760"==C?d+"px":l+"px",height:t.isSpotlight&&"60122562760"==C?l+"px":d+"px",borderRadius:H,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"===R?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,m.jsx)("div",{style:{overflow:"hidden",position:"relative",borderRadius:H,background:"linear-gradient(145deg, rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:t.isSpotlight&&"60122562760"==C?16/9:9/16},children:(0,m.jsx)(i.A,{url:B.thumbnail_image,isMuted:!0,isPlaying:!0,event:B})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%",position:"relative"},children:[(0,m.jsx)("div",{style:{position:"absolute",top:"2px",right:"2px",zIndex:10},children:(0,m.jsx)("div",{className:"close-btn",onClick:W,children:(0,m.jsx)(f,{size:$})})}),(0,m.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto",marginTop:"auto",marginBottom:"auto"},children:(0,m.jsx)(v,{size:J})}),(0,m.jsx)("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",borderBottomLeftRadius:H,borderBottomRightRadius:H,background:w?"linear-gradient(to bottom, transparent, rgba(0,0,0,0.8))":"transparent"},children:(0,m.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:y,fontWeight:"600",fontSize:.35*$+"px",margin:0,padding:0,lineHeight:"125%",letterSpacing:"0.3px",textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:w})})]})})]})})})})}},932:function(t,e,o){var n=o(5830),r=o(1941),i=o(22),a=o(1348);e.A=function(t){const[e,o,s]=(0,r.A)(),[d]=(0,n.QN)("whatmoreLandscapePadding"),[c]=(0,n.QN)("whatmoreShopId"),[l]=(0,n.QN)("whatmoreVideoTileSize"),[u]=(0,n.QN)("whatmoreVideoTileSizePortrait"),p=s>o,h="portrait"==e?u:l,m=!("portrait"!=e||!(s>=481)),f=h/100*1.3*.5,v=h/100;var g=Math.min(s,o),[y,w,x,b]=[.6*g*(16/9),.6*g,1.4,0];function S(t){return Math.round(10*t)/10}var j={DEVICE_TYPE:i.b4,DEVICE_MODE:i.tn};if(p){const t=w*f,e=y*f;[y,w,x,b]=[e,t,(s-2*d-2*(0,a.$du)(c))/(1.1*t),d],j[i._]=i.$S,j[i.dl]=i.nN}else if(m){var T=.8*w,E=.8*y;"portrait"==e?(T*=v,E*=v,[y,w,x,b]=[E,T,S(s/(1.2*T)),0],j[i._]=i.vF,j[i.dl]=i.tn):([y,w,x,b]=[E,T,(s-2*d)/(1.1*T),d],j[i._]=i.vF,j[i.dl]=i.nN)}else{T=w,E=y;"portrait"==e?(T=T*v*.9,E=E*v*.9,[y,w,x,b]=[E,T,S(s/(1.15*T)),0],j[i._]=i.b4,j[i.dl]=i.tn):(T=.7*w,E=.7*y,[y,w,x,b]=[E,T,(s-2*d)/(1.1*T),d],j[i._]=i.b4,j[i.dl]=i.nN)}return[y,w,x,b,j]}},3262:function(t,e,o){o.d(e,{initiateCartSliderEvent:function(){return i}});var n=o(5830),r=o(1745);const i=async function(t,e,o,i,a="",s="",d="",c="",l="",u=""){(0,n.Xd)("whatmoreLandingLocationType");if("STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("60595503283"===t){async function x(t,e=1){try{const o=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,quantity:e})});o.ok?setTimeout(()=>{(0,r.CP)(t),window.location.href="/cart"},500):console.error("Failed to add item to cart:",o.status)}catch(o){console.error("Error adding to cart:",o)}}return x(a,1),void setTimeout(e,o)}if("60183445561"===t){async function b(t,e=1,o="/cart"){const n=new URLSearchParams;n.append("id",t),n.append("quantity",e.toString()),n.append("return_to",o);const i=await fetch("https://tapee.in/cart/add",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString(),credentials:"include"}),a=await i.text();return i.ok&&setTimeout(()=>{(0,r.CP)(t),window.location.href="https://tapee.in/cart"},500),a}return b(a).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("22907887"===t){async function S(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e.toString());const n=document.querySelector("cart-notification, cart-drawer");if(n){const t=n.getSectionsToRender();o.append("sections",t.map(t=>t.id).join(","))}o.append("sections_url",window.location.pathname);const r=await fetch("/cart/add.js",{method:"POST",body:o});if(!r.ok){const t=await r.text();throw new Error(`Failed to add to cart: ${t}`)}const i=await r.json();return n&&n.renderContents&&n.renderContents(i),document.body.classList.remove("overflow-hidden"),document.querySelectorAll(".atc-container.active, .atc-variant-container.active, .pdp-atc-container.active").forEach(t=>t.classList.remove("active")),window.dispatchEvent(new CustomEvent("cart:added",{detail:{variantId:t,quantity:e,data:i}})),i}return S(a).then(t=>{setTimeout(()=>{v(a)},500)}).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("28575536"===t||"64287408360"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.handleFloCartBtn&&window.handleFloCartBtn(),setTimeout(()=>{v(a)},500)}).catch(t=>console.error("[Whatmore] Ripped Up Nutrition ATC error:",t)),void setTimeout(e,o);if("58692075703"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{v(a)},500)}).catch(t=>console.error("[Whatmore] Lakshita ATC error:",t)),void setTimeout(e,o);if("22907887"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>t.json()).then(t=>{setTimeout(()=>{v(a)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("56444977250"===t){const j=document.querySelector('button[data-pf-type="ProductATC2"]');return j?(s&&j.setAttribute("data-product-id",s),j.click(),setTimeout(()=>{(0,r.js)().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(a));if(e){const t=e.key,o=e.quantity,n=e.properties;(0,r.CP)(t,o,n,d,c,l,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===u||void 0===u||null===(p=u.split("?"))||void 0===p?void 0:p[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&s&&e.setAttribute("data-product-id",s)}),void setTimeout(e,o));var p}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>t.json()).then(t=>fetch("/cart.js")).then(t=>t.json()).then(t=>{$(".paira-cart-item-count").text(t.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+t.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{v(a)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("76767920441"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{v(a)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const T=a,E=1,C=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(C){let A=C.querySelector('input[name="id"]');A||(A=document.createElement("input"),A.type="hidden",A.name="id",C.appendChild(A)),A.disabled=!1,A.value=T;const k=C.querySelector('input[name="quantity"]');k&&(k.value=E);const _=C.querySelector('button[data-add-to-cart], button[type="submit"]');return _?(_.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),_.click(),_.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{v(T)},500),void setTimeout(e,o)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:T,quantity:E}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{v(T)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const N=document.querySelector('form[action="/cart/add"]');if(!N)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const P=N.querySelector('input[name="id"]');if(!P)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);P.value=a;const q=N.querySelector('button[type="submit"]');if(!q)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);q.click(),setTimeout(()=>{v(a)},500),setTimeout(e,o)}catch(w){console.error("[ATC 64683278550] error:",w),setTimeout(e,o)}return}const h=e=>{if("61126934766"==t){let t=e.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(t)return t}let o=Array.from(e.querySelectorAll("product-form")).find(t=>t.querySelector('form > input[name="id"]')&&t.querySelector('form button[type="submit"]'));return o||(o=Array.from(e.querySelectorAll('form[action*="/cart/add"]')).find(t=>t.querySelector('button[type="submit"]'))),o},m=(e,o,n)=>{const r=e.cloneNode(!0);if(r){r.hasAttribute("data-product-variant-id")&&r.setAttribute("data-product-variant-id",o),r.hasAttribute("data-product-id")&&r.setAttribute("data-product-id",n);let e=r.querySelector('input[name="id"]');if(e)e.setAttribute("value",o),e.hasAttribute("disabled")&&e.removeAttribute("disabled");else{const t=r.querySelector('select[name="id"]');if(t){const e=t.querySelector('option[selected="selected"]');e&&e.setAttribute("value",o)}}const i=r.querySelector('input[name="product-id"]');i&&i.setAttribute("value",n);const a=document.createElement("div");return a.className="whatmore-atc",a.appendChild(r),document.body.appendChild(a),console.log(a,"formElement"),"92319318403"===t&&((t,e,o)=>{var n;const r=null!==(n=t.matches)&&void 0!==n&&n.call(t,"form")?t:t.querySelector("form");if(!r)return;let i=r.querySelector('input[name="id"]');i||(i=document.createElement("input"),i.type="hidden",i.name="id",r.prepend(i)),i.value=String(e),i.removeAttribute("disabled");const a=r.querySelector('select[name="id"]');a&&([...a.options].some(t=>t.value===String(e))?(a.value=String(e),[...a.options].forEach(t=>t.selected=t.value===String(e)),a.dispatchEvent(new Event("change",{bubbles:!0}))):a.removeAttribute("name"));const s=r.querySelector('input[name="product-id"]');s&&(s.value=String(o))})(a,o,n),a}},f=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},v=t=>{(0,r.js)().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t),n=o.key,i=o.quantity,a=o.properties;(0,r.CP)(n,i,a,d,c,l,!0,!0,!0)})},g=h(document);if(g||(null===g||void 0===g?void 0:g.length)>0){const I=m(g,a,s);f(I),setTimeout(()=>{v(a)},500),I.remove()}else{var y;fetch(null===u||void 0===u||null===(y=u.split("?"))||void 0===y?void 0:y[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=h(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=m(o,a,s);f(t),setTimeout(()=>{v(a)},500),t.remove()}})}setTimeout(e,o)}},4365:function(){},6649:function(t,e,o){var n=o(9950);e.A=({triggerOnce:t=!1,root:e=null,rootMargin:o="0px",threshold:r=0}={})=>{const[i,a]=(0,n.useState)(!1),[s,d]=(0,n.useState)(null),c=(0,n.useRef)(null);return(0,n.useEffect)(()=>{const n=new IntersectionObserver((e,o)=>{e.forEach(e=>{d(e),e.isIntersecting?(a(!0),t&&o.disconnect()):t||a(!1)})},{root:e,rootMargin:o,threshold:r});return c.current&&n.observe(c.current),()=>{n.disconnect()}},[t,e,o,r]),[c,i,s]}},8154:function(t,e,o){o.r(e);var n=o(9950),r=o(1348),i=o(964),a=o(5830),s=o(140),d=o(4533),c=o(851),l=o(1085),u=o(6613),p=o(3330),h=(o(3262),o(572)),m=o(6641),f=o(8603),v=o(2039),g=o(4833),y=o(7802),w=o(2979),x=o(6157),b=o(5551),S=o(69),j=o(9821),T=o(6018),E=o(4414);const C=(0,f.A)({key:"whatmore-css-wsv"}),A=n.lazy(()=>Promise.all([o.e(8304),o.e(9946),o.e(2607),o.e(4241),o.e(3987),o.e(9009),o.e(2275),o.e(5657)]).then(o.bind(o,2275)));e.default=function(t){const[e,o]=(0,n.useState)(),[f,k]=(0,n.useState)(),[_]=(0,a.QN)("isInDesignMode"),[N]=(0,a.QN)("isDemoBrand"),[P,q]=(0,n.useState)(-2),[I]=(0,a.QN)("whatmoreShopId"),L=(0,a.Xd)("isLandingSharedLink"),O=(0,a.Xd)("whatmoreShareTemplateId"),z=((0,a.Xd)("whatmoreShareStoryId"),(0,a.Xd)("whatmoreShareEventId")),F=(0,a.Xd)("whatmoreLandingLocationType"),R=(0,a.Xd)("whatmoreLoggingActive"),M=(0,a.Xd)("isWhatmorePreviewMode"),{whatmoreWidgetSourceDetails:Q}=(0,n.useContext)(b.B);var D=(0,r.SOt)(I)?i.aD+"/get_eventset/":i.$$+"/get_eventset/",V=(0,r.SOt)(I)?i.aD+"/get_eventset_v1/":i.$$+"/get_eventset_v1/";(0,n.useEffect)(()=>{(0,d.wm)()},[]),(0,n.useEffect)(()=>{(0,p.initializeGA)(I)},[]),(0,n.useEffect)(()=>{null==e||0==e.length||f||!(0,u.MN)()||(0,a.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,j._)()?(0,l.Pc)(l.F5):(0,S.bi)())},[e]),(0,n.useEffect)(()=>{q(-1);const t=g.JA,e=(0,g.t6)(F),n="78232846646"===I.toString()?V.toString()+I.toString()+"?eventset_type="+t+"&event_type=video&source="+e+"&source_id="+I:D.toString()+I.toString()+"?eventset_type="+t+"&source="+e+"&source_id="+I;fetch(n).then(t=>t.json()).then(e=>(0,y.Po)(e,t)).then(t=>{if(M&&(null==t||t&&0==(null===t||void 0===t?void 0:t.length)))return o(T.n),T.n;let e=[...null===t||void 0===t?void 0:t.events,...null===t||void 0===t?void 0:t.all_events];return(0,r.xku)(I)||(e=(0,y.zJ)(e)),o(e),e}).catch(t=>{k(t.message)})},[]),(0,n.useEffect)(()=>{q(-2)},[e]),(0,n.useEffect)(()=>{null==e||0==e.length||f||L&&"template-embed"==(0,g.Mm)(O)&&null!=z&&e.forEach((t,e)=>{z==t.event_id&&X(t,!0,e)})},[e]);const G=Q.landingLocationType,B=Q.templateType,X=(t,e=!1,o=0)=>{if((0,u.MN)()&&!e&&((0,j._)()?(0,l.bo)():(0,S.Ij)()),(0,v.ij)(t)||(0,v.Il)(t))return _||N||(async()=>{const e=(0,g.Wd)(G)+(0,g.gf)(B)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);(0,s.lB)(t),(0,p.sendVideoViewEventToGA)(I,i.DK,i.K1),(0,d.Ch)(t.event_id,t.products,"spotlight","video_popup",e)})(),void q(o)};function W(){return(0,E.jsx)(E.Fragment,{})}return null==e||0==e.length||f?(0,E.jsx)("div",{}):(R&&(0,m.xv)(e),(0,r.ALN)(I)&&P<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,E.jsx)(E.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,E.jsx)(h.C,{value:C,children:-1===P||0===e.length?(0,E.jsx)(W,{}):-2===P&&e.length>0?(0,E.jsx)("div",{children:(0,E.jsx)(w.S,{userInteractionType:x.O.SPOTLIGHT_WIDGET_VIEW,event:e[0],productList:e[0].products,cta:e[0].cta,triggerFlag:!_&&!N,children:(0,E.jsx)(c.A,{event:e[0],inVideoClick:X,closeClick:t=>{t.stopPropagation(),q(-1)},isSpotlight:!0})})}):(0,E.jsx)("div",{children:(0,E.jsx)(n.Suspense,{children:(0,E.jsx)(w.S,{userInteractionType:x.O.EVENT_VIEW,event:e[0],productList:e[0].products,cta:e[0].cta,triggerFlag:!_&&!N,children:(0,E.jsx)(A,{events:e,index:P,onBack:function(){q(-2)},template:"template-embed"})})})})})))}},9733:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[1491],{4295:function(e,t,r){r.r(t),r.d(t,{default:function(){return v}});var o=r(9950),n=r(1941),i=r(5830),l=(r(6125),r(4365),r(6614),r(1348)),s=r(3788),a=r(7973),c=r(9879),d=r(4414);var u=function(e){var t,r;const n=(0,i.Xd)("whatmorePrimaryFont"),u=(0,i.Xd)("whatmoreSecondaryColor"),p=(0,i.Xd)("whatmoreShopId"),[h,f]=(0,o.useState)(!1),x=e.mode,m=e.storyId,g=(0,s.s)(e.imageUrl),v=e.title,w=e.onClick,y=e.template,b=(0,l.ivI)(p),j="template-stories-a"===y?"50%":"30%",S=e.tileSize,C=.12*S*(0,l.cYm)(p),k=null!==(t=(0,l.Pjz)(p))&&void 0!==t?t:n;let z=null!==(r=(0,l.qAx)(p))&&void 0!==r?r:[u,b,u,b,u];Array.isArray(z)||(z=Array(5).fill(z));const E=(0,o.useRef)(0),F=(0,o.useRef)(null),A=(0,o.useRef)(null);return(0,o.useEffect)(()=>{A.current&&A.current.play();const e=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="stories"])');e&&function t(r=0){const o=e.querySelector("#storiesLoader");o?o.style.display="none":r<10&&setTimeout(()=>t(r+1),100)}()},[]),(0,o.useEffect)(()=>{const e=F.current,t=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(e.isIntersecting){const r=e.target;r.src=r.dataset.src,t.unobserve(r)}})},{rootMargin:"0px 100px 0px 0px",threshold:0});return e&&t.observe(e),()=>{e&&t.unobserve(e)}},[g]),(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:S*(0,l.rMH)(p)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{f(!0),w(m)},className:[h?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{display:"flex",boxSizing:"border-box",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:j,boxShadow:"0px 2px 1px 0px "+z[0]+"50, 0px -2px 1px 0px "+z[1]+"50, 2px 0px 1px 0px "+z[2]+"50, -2px 0px 1px 0px "+z[3]+"80, 2px -2px 1px 0px "+z[4]+"80, -2px 2px 1px 0px "+z[0]+"DA, 2px 2px 1px 0px "+z[1]+"DA, -2px -2px 1px 0px "+z[2]+"DA"},children:(0,d.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:S+"px",width:S+"px",borderRadius:j,border:"3px solid white",backgroundColor:"#343434"===u?"#d3d3d3":u,overflow:"hidden"},children:"video"==(0,a.B)(g)?(0,d.jsx)(c.A,{height:"100%",width:"100%",url:g,isPlaying:!0,event:{event_type:"video"},borderRadius:j}):(0,d.jsx)("img",{ref:F,className:"whatmore-story-thumbnail","data-src":g.startsWith("https://cdn.shopify.com")?g.split("?")[0]+"?width=400&height=400":g,loading:"lazy",style:{objectFit:"cover",width:"100%",height:"100%",backgroundColor:"white"},alt:"story",onError:function(){if(E.current<3){let t=(0,s.s)(e.imageUrl);F.current.src="",F.current.src=t,E.current=E.current+1}else console.log("Failed to load image after several attempts"),F.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,d.jsx)("p",{className:"wht-story-title "+("landscape"===x?"wst-landscape":"wst-portrait"),style:{textAlign:"center",color:(0,l.o9q)(p),fontFamily:k,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto",fontSize:C+"px"},children:null===v||void 0===v?void 0:v.substring(0,24)})})]})},p=r(5873),h=r(572),f=r(3059),x=(0,f.A)((0,d.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),m=(0,f.A)((0,d.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const g=(0,r(8603).A)({key:"whatmore-stories-css"});var v=function(e){const[t,r,s]=(0,n.A)(),[a]=(0,i.QN)("whatmoreStoryTileSize"),[c]=(0,i.QN)("whatmoreStoryTileSizeDesktop"),[f]=(0,i.QN)("whatmoreShopId"),[v,w]=(0,o.useState)("portrait"===t?"flex-start":"center"),[y,b]=(0,o.useState)(!1),[j,S]=(0,o.useState)(!1),C=(0,o.useRef)(null),k=(0,o.useRef)(null);var z=e.eventsStories;const E=e.onClick,F=e.template,A="landscape"===t&&(0,l.lDJ)(f);function I(){if(!A||!C.current)return;const{scrollLeft:e,scrollWidth:t,clientWidth:r}=C.current;b(e>0),S(e<t-r-1)}(0,o.useEffect)(()=>{p.Sn.forEach(e=>{var t;if(!(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"]')))return;e&&(e.style.minHeight="0px")})},[]);const R=e=>{if(C.current){const t="left"===e?4*-M:4*M;C.current.scrollBy({left:t,behavior:"smooth"})}};(0,o.useEffect)(()=>{!function(){if(C.current){const e=C.current.scrollWidth,t=C.current.offsetWidth;w(e>t?"flex-start":"center")}}()},[v,s]),(0,o.useEffect)(()=>{if(!A)return;const e=()=>{I()},t=()=>{I()},r=C.current;return r?(r.addEventListener("scroll",e),window.addEventListener("resize",t),I(),()=>{r.removeEventListener("scroll",e),window.removeEventListener("resize",t)}):void 0},[A]);const[_,L]=(0,o.useState)([]);(0,o.useEffect)(()=>{L(z.map(e=>e.storyset_dynamic_thumbnail?Math.floor(Math.random()*(e.events.length-1)):0))},[]);const M="landscape"===t?r*(c/340):s*(a/200);return(0,d.jsx)(h.C,{value:g,children:"landscape"==t&&!(0,l.AFg)(f)||"portrait"==t&&!(0,l.rC6)(f)?(0,d.jsx)(d.Fragment,{}):(0,d.jsxs)("div",{ref:k,style:{position:"relative",width:"100%",height:"fit-content"},className:"whatmore-story-container",children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:v,height:"fit-content",width:"100%",overflowX:"auto",scrollbarWidth:"none",msOverflowStyle:"none"},className:"whatmore-story-horizontal-flex",ref:C,children:z.map((e,r)=>{var o,n,i,l,s;const a=e.storyset_dynamic_thumbnail?null!==(o=null===(n=e.events[_[r]])||void 0===n?void 0:n.poster_image)&&void 0!==o?o:e.thumbnail_image:null!==(i=e.thumbnail_image)&&void 0!==i?i:null===e||void 0===e||null===(l=e.events)||void 0===l||null===(s=l[0])||void 0===s?void 0:s.thumbnail_image;return(0,d.jsx)(u,{storyId:e.id,tileSize:M,onClick:e=>{E(r)},template:F,imageUrl:a,fallbackUrl:e.thumbnail_image,title:e.title,mode:t},"whatmore-story-"+e.id)})}),A&&(0,d.jsxs)(d.Fragment,{children:[y&&(0,d.jsx)("button",{onClick:()=>R("left"),style:{width:"48px",height:"48px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",position:"absolute",top:"40%",left:"16px",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease-in-out",backdropFilter:"blur(4px)",color:"white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)"},onMouseEnter:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.8)"},onMouseLeave:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.7)"},children:(0,d.jsx)(x,{style:{fontSize:"32px",display:"flex",alignItems:"center",justifyContent:"center"}})}),j&&(0,d.jsx)("button",{onClick:()=>R("right"),style:{width:"48px",height:"48px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",position:"absolute",top:"40%",right:"16px",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease-in-out",backdropFilter:"blur(4px)",color:"white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)"},onMouseEnter:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.8)"},onMouseLeave:e=>{e.target.style.backgroundColor="rgba(0, 0, 0, 0.7)"},children:(0,d.jsx)(m,{style:{fontSize:"32px",display:"flex",alignItems:"center",justifyContent:"center"}})})]})]})})}},4365:function(){},6125:function(){},6614:function(){},7973:function(e,t,r){r.d(t,{B:function(){return l},b:function(){return i}});var o=r(1348),n=r(5830);function i(e,t=""){const r=(0,n.Xd)("whatmoreShopId");return"shopify"!=(0,o.NCy)(r)?"STRNV8MHJTF"==r?e+"?format=webp":e:e+t}function l(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const r=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],o=/\.(jpeg|jpg|gif|png|svg|webp)$/i,n=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==o&&void 0!==o&&o.test(r)?"image":null!==n&&void 0!==n&&n.test(r)?"video":void 0}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[7199],{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),_=n(8945),g=n(9821),y=n(4414);const S=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(6340),n.e(7387),n.e(3987),n.e(9009),n.e(4160),n.e(2665)]).then(n.bind(n,5213))),w=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(2607),n.e(7387),n.e(5620),n.e(7116)]).then(n.bind(n,7144))),I=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(2257),n.e(7387),n.e(3987),n.e(3714),n.e(2423)]).then(n.bind(n,517))),E=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(2257),n.e(7387),n.e(3987),n.e(3714),n.e(2412)]).then(n.bind(n,7646))),T=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(2257),n.e(7387),n.e(3987),n.e(3714),n.e(5221)]).then(n.bind(n,5451))),x=i.lazy(()=>Promise.all([n.e(8283),n.e(3059),n.e(7387),n.e(1491)]).then(n.bind(n,4295))),f=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(7534),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(6496),n.e(5620),n.e(5474)]).then(n.bind(n,6945))),O=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(7184),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(5485)]).then(n.bind(n,4431))),C=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(7387),n.e(3987),n.e(2676)]).then(n.bind(n,3369))),j=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(7534),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(6496),n.e(7891)]).then(n.bind(n,7178))),D=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(7534),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(6496),n.e(7306)]).then(n.bind(n,9406))),b=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(9946),n.e(7387),n.e(3987),n.e(9009),n.e(4497)]).then(n.bind(n,3795))),L=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(9946),n.e(7387),n.e(9009),n.e(6151)]).then(n.bind(n,9112))),A=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(6340),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(4160),n.e(7933)]).then(n.bind(n,6989))),P=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(744),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(1806)]).then(n.bind(n,3278))),q=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(2257),n.e(7387),n.e(3987),n.e(2001)]).then(n.bind(n,4596))),W=i.lazy(()=>Promise.all([n.e(8283),n.e(8304),n.e(3059),n.e(9946),n.e(2607),n.e(4241),n.e(7387),n.e(3987),n.e(9009),n.e(2275),n.e(7906)]).then(n.bind(n,2275))),$=i.lazy(()=>n.e(9374).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,g._)()&&!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,g._)()&&!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,_.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)(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,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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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)(v.S,{userInteractionType:h.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,v]=(0,i.useState)(),[_,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&&!_&&(0,c.MN)()&&!(0,l.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,g._)()&&(0,d.Pc)(d.F5)},[t]),(0,i.useEffect)(()=>{var e,t,i;(0,s.wm)();const o=localStorage.getItem("w_user_type");var c;if(f.startsWith("product")){var d=(0,l.Xd)("whatmoreProductId");if(d=(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):d,"28575536"===T&&I)c=`${X.toString()}?store_id=${te.toString()}&client_collection_id=${F(window.location.href)}`;else if((0,r.vvU)(T))c=H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(T)){c=`${c=(0,M.B)(T)}?client_product_id=${d}&limit=10&recommended=${!(0,r.buK)(T)}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else c=ee.toString()+"?client_product_id="+d.toString()+"&status="+ne.toString()+"&event_type=video"}else if(I||"invalid-url"!==b)(0,r.JwJ)(T)?(c=`${Y.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`,c+="&user_type="+o):c="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);c=Q.toString()+te.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+T}else{var u,p,h,_;if(("72201044272"==T||"2665447536"==T&&D)&&!w)c=K.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+"&latitude="+(null!==(u=null===(p=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===p?void 0:p.latitude)&&void 0!==u?u:"")+"&longitude="+(null!==(h=null===(_=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===_?void 0:_.longitude)&&void 0!==h?h:"")+"&user_type="+(null!==j&&void 0!==j&&j.userType?"olduser":"newuser");else c=(0,r.JwJ)(T)&&!w?U.toString()+te.toString()+"?status="+ne.toString()+"&user_type="+o+"&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(c).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(9365).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: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||_)&&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||_?(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}})}}]);
|