whatmore-react-assets 1.0.1757 → 1.0.1759

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[374],{1941:function(n,e,t){t.d(e,{A:function(){return u}});var i=t(5830),r=t(9950);function o(n){if(!n)return{};var e={};return Array.from(n.attributes).forEach(n=>{var t;e[n.name]=(t=n.value,isNaN(+t)?t:+t)}),e}function a(...n){try{var e;const t=document.getElementById("whatmorePreviewMode");if(!t)return null;const i=null===n||void 0===n?void 0:n[0];if(!i)return!0;let r={};return r=i.includes("function")?{}:o(t),null!==(e=r)&&void 0!==e&&e[i]?r[i]:null}catch(t){return null}}var s=function({disablePreview:n=!1}={}){var e,t,i=n?window.innerHeight:null!==(e=a("height-wh"))&&void 0!==e?e:window.innerHeight,o=n?window.innerWidth:null!==(t=a("width-wh"))&&void 0!==t?t:window.innerWidth,[s,d]=[i,o];const[c,l]=(0,r.useState)([s>d?"portrait":"landscape",s,d]);return(0,r.useLayoutEffect)(()=>{function e(){var e,t,i=n?window.innerHeight:null!==(e=a("height-wh"))&&void 0!==e?e:window.innerHeight,r=n?window.innerWidth:null!==(t=a("width-wh"))&&void 0!==t?t:window.innerWidth,[o,s]=[i,r];l(o>s?["portrait",o,s]:["landscape",o,s])}return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),screen.orientation&&screen.orientation.addEventListener("change",e),e(),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),screen.orientation&&screen.orientation.removeEventListener("change",e)}},[]),c},d=t(1348);const c=(0,i.Xd)("whatmoreShopId");function l(){if("90518552861"==c||"STRI4V3OYCH"==c||"56517427254"==c||"19506115"==c||"STR4YVJTT37"===c||"71079985468"===c){var n,e,t;let i=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="carousel"])');i||(i=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="collection"])'));let r=i;for(;r&&r!==document&&(r=r.parentElement,!r||r.classList.contains("whatmore-base")););return[window.innerHeight,(null!==(n=null===(e=r)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)&&void 0!==n?n:window.innerWidth)+(0,d.$du)(c)]}return"51273072796"==c?[document.documentElement.clientHeight,document.documentElement.clientWidth]:[window.innerHeight,window.innerWidth]}var h=function(){var[n,e]=l();const[t,i]=(0,r.useState)([n>e?"portrait":"landscape",n,e]);return(0,r.useLayoutEffect)(()=>{function n(){var[n,e]=l();i(n>e?["portrait",n,e]:["landscape",n,e])}return window.addEventListener("resize",n),window.addEventListener("orientationchange",n),screen.orientation&&screen.orientation.addEventListener("change",n),n(),()=>{window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n),screen.orientation&&screen.orientation.removeEventListener("change",n)}},[]),t};var u=function(n){var e;const t=(0,i.Xd)("isWhatmorePreviewMode"),r=h(),o=s({disablePreview:null!==(e=null===n||void 0===n?void 0:n.disablePreview)&&void 0!==e&&e});return t?o:r}},5100:function(n,e,t){t.r(e);var i=t(9950),r=t(1941),o=t(5830),a=t(4414);const s=i.memo(()=>{if(!(0,o.Xd)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[n]=(0,r.A)();return(0,a.jsxs)("div",{className:`shimmer-container ${n}`,children:["portrait"===n?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map((n,e)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===e?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},e)),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})});e.default=s}}]);