whatmore-react-assets 1.0.1430 → 1.0.1431
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[590],{7220:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return y}});var o=n(5830),i=n(9950),r=n(1348),l=n(1745);const a=function(t){new PerformanceObserver((e=>{for(const n of e.getEntries()){[`${window.location.origin}/cart/add.js`,`${window.location.origin}/cart/add`].includes(n.name)&&(console.debug("Whatmore :: Fetch request detected to",n.name),(0,r.dnh)(whatmoreShopId)&&setTimeout((()=>{(0,l.sw)(t)}),1e3))}})).observe({entryTypes:["resource"]})};var c=n(7740),s=n(4737),u=n(4833);var d,f=n(5491),h=n.n(f),g=n(964),m=n(4414);const p=i.lazy((()=>Promise.all([n.e(286),n.e(461),n.e(760)]).then(n.bind(n,1746)))),v=i.lazy((()=>Promise.all([n.e(572),n.e(526),n.e(879),n.e(286),n.e(296),n.e(461),n.e(774)]).then(n.bind(n,3389)))),w=i.lazy((()=>Promise.all([n.e(572),n.e(526),n.e(879),n.e(286),n.e(296),n.e(461),n.e(717)]).then(n.bind(n,8154)))),S=null!==(d="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==d&&d;let _=h()((t=>{fetch(g.$$+"/customization/frontend/"+t).then((t=>t.json())).then((e=>{(0,r.Tzr)(e,t),(0,o.t2)("brandCustomizationsLoaded",!0)})).catch((t=>{console.error("Whatmore : Error while fetching brandCustomizations : "+t)}))}),100,{leading:!0,trailing:!1});var y=function(){var t;const[e]=(0,o.QN)("whatmoreLandingLocationType"),[d]=(0,o.QN)("whatmoreShopId"),f=(0,o.Xd)("isInDesignMode"),[h,g]=(0,o.QN)("brandCustomizationsLoaded"),[y]=(0,o.QN)("whatmoreEmbedAppUseVariant"),{whatmoreEventsBrowsingTemplate:b}=(0,i.useContext)(s.B),[j]=null===(t=performance)||void 0===t?void 0:t.getEntriesByType("navigation");if((0,i.useEffect)((()=>{if(!h){const t=3e5;(0,r.tVc)(t)&&"reload"!=(null===j||void 0===j?void 0:j.type)?g(!0):_(d)}null==localStorage.getItem("_user_wh_lc")&&"72201044272"==d&&n.e(259).then(n.bind(n,3446)).then((t=>{let{getLocationDetails:e}=t;return e()})).then((t=>(localStorage.setItem("_user_wh_lc",JSON.stringify(t)),{}))).catch((t=>{localStorage.setItem("_user_wh_lc",JSON.stringify({latitude:"",longitude:""})),console.error(`Error: ${t}`)}))}),[]),(0,i.useEffect)((()=>{a("true"===y),(0,r.WmJ)(d)&&function(t){let e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e)}((0,r.WmJ)(d))}),[h]),!h)return(0,m.jsx)(m.Fragment,{});if((0,c.U)()){if((0,u.Ig)(b))return(0,m.jsx)(m.Fragment,{});if("index"===e||"collection"===e||e.startsWith("collection")||e.startsWith("page")){if(!(0,u.io)(b))return S&&console.debug("Whatmore : Shopify, rendering index/collection page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})});if(function(){var t,e,n,i,l,a,c,s,u,h,g,m;const p=(0,o.Xd)("whatmoreCollectionId");return f||(null===(t=window)||void 0===t||null===(e=t.Shopify)||void 0===e||null===(n=e.theme)||void 0===n?void 0:n.role)&&"main"!==(null===(i=window)||void 0===i||null===(l=i.Shopify)||void 0===l||null===(a=l.theme)||void 0===a?void 0:a.role)||(0,r.hbj)(d)&&(null===(c=window)||void 0===c||null===(s=c.Shopify)||void 0===s||null===(u=s.theme)||void 0===u?void 0:u.role)&&"main"===(null===(h=window)||void 0===h||null===(g=h.Shopify)||void 0===g||null===(m=g.theme)||void 0===m?void 0:m.role)&&((0,r.R2w)(d)||p&&(0,r.Idi)(d).includes(p))}())return S&&console.debug("Whatmore : Shopify, rendering index/collection page spotlight : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(w,{})})})}var x,I,T,O,N,$,W,E,P,k,J,F;return e.startsWith("product")?(0,u.io)(b)?(null!==(x=window)&&void 0!==x&&null!==(I=x.Shopify)&&void 0!==I&&null!==(T=I.theme)&&void 0!==T&&T.role&&"main"===(null===(O=window)||void 0===O||null===(N=O.Shopify)||void 0===N||null===($=N.theme)||void 0===$?void 0:$.role)||window.location.href.includes("localhost:"))&&(0,r.fDZ)(d)?(S&&console.debug("Whatmore : Shopify, rendering PDP-page popup : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(v,{})})})):(null!==(W=window)&&void 0!==W&&null!==(E=W.Shopify)&&void 0!==E&&null!==(P=E.theme)&&void 0!==P&&P.role&&"main"!==(null===(k=window)||void 0===k||null===(J=k.Shopify)||void 0===J||null===(F=J.theme)||void 0===F?void 0:F.role)||f)&&(0,r.C1J)(d)?(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(v,{})})}):(S&&console.debug("Whatmore : Shopify, PDP-page popup disabled."),(0,m.jsx)(m.Fragment,{})):(S&&console.debug("Whatmore : Shopify, rendering PDP-page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})})):((0,r.dnh)(d)&&(0,r.bQo)(d)&&"cart"===e&&(S&&console.debug("Whatmore : initiating whatmore attribution from cart page."),(0,l.sw)("true"===y)),(0,m.jsx)(m.Fragment,{}))}return"index"===e||"collection"===e?(0,u.io)(b)?(S&&console.debug("Whatmore : External, rendering index/collection page popup : "+b),(0,m.jsx)(m.Fragment,{})):(S&&console.debug("Whatmore : External, rendering index/collection page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})})):e.startsWith("product")||"embed"===e?(0,u.Ig)(b)||(0,u.io)(b)?(0,r.fDZ)(d)?(S&&console.debug("Whatmore : External, rendering PDP-page popup : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(v,{})})})):(S&&console.debug("Whatmore : External, PDP-page popup disabled."),(0,m.jsx)(m.Fragment,{})):(S&&console.debug("Whatmore : External, rendering PDP-page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})})):(0,m.jsx)(m.Fragment,{})}},7740:function(t,e,n){"use strict";function o(){return!(void 0==window.Shopify&&!window.location.href.includes("shopify")&&!window.location.href.includes("localhost:"))}n.d(e,{U:function(){return o}})},6641:function(t,e,n){"use strict";n.d(e,{Fk:function(){return s},gv:function(){return c},xv:function(){return a}});var o=n(5830);const i="Whatmore : ",r=(0,o.Xd)("whatmoreShopId");function l(t){console.debug(i+t)}function a(t){var e;null!==(e="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==e&&e&&(l("total events received : "+(t&&t.length)),l("events data : "+JSON.stringify(t)))}function c(t){var e;null!==(e="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==e&&e&&l(t)}const s=t=>{"STR60LW4WMA"!=r&&console.log(`%c ${t}`,"background: #D53F8C; color: white; font-size: 19px; padding: 5px; font-weight: semibold;","\n\nFind us here -> https://www.whatmore.ai")}},1745:function(t,e,n){"use strict";n.d(e,{RX:function(){return d},sw:function(){return u},iL:function(){return h},oV:function(){return f},Lt:function(){return c},js:function(){return s},tN:function(){return g},_N:function(){return m}});var o=n(1348);const i="_whatmore-tracking-id";var r=n(2089),l=n(4533),a=n(5830);function c(){const t="https://"+window.location.hostname+"/cart.json";return fetch(t,{method:"GET"})}async function s(){const t="https://"+window.location.hostname+"/cart.json";return await fetch(t,{method:"GET"})}async function u(t){var e;let n=(0,r.Ak)(),o=null,c=null,u={},d=null,f=null,h=null,g={},m=(0,l.CK)(),p=null===(e=localStorage)||void 0===e?void 0:e.wht_is_impression,v=m.length>0;m.forEach((t=>{g.hasOwnProperty(null===t||void 0===t?void 0:t.product_id)||(g[null===t||void 0===t?void 0:t.product_id]={widgetInfo:null===t||void 0===t?void 0:t.widget_info,location:null===t||void 0===t?void 0:t.location,userType:null===t||void 0===t?void 0:t.user_type})})),await s().then((t=>t.json())).then((e=>{n=e.token;let r=[];if(r=!0===t?e.items.map((t=>{const e=g[null===t||void 0===t?void 0:t.variant_id];return{...t,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.userType,widget_info:null===e||void 0===e?void 0:e.widgetInfo}})):e.items.map((t=>{const e=g[null===t||void 0===t?void 0:t.product_id];return{...t,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.userType,widget_info:null===e||void 0===e?void 0:e.widgetInfo}})),0==r.length)return console.debug("Whatmore :: no cart items available for view products"),null;r.map((e=>{if(o=e.key,c=e.quantity,u=e.properties,d=e.widget_info,f=e.location,h=e.userType,null===u||!(i in u)){const n=async function(t,e,n,o){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"default",c=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,d=arguments.length>8?arguments[8]:void 0;const f=(0,a.Xd)("whatmoreShopId"),h=s?(0,l.wm)()+("72201044272"==f?`#${o}#${r}#${c?"olduser":"newuser"}`:`#${o}`):d?"_wt_vs":u?"_wt_vi":"";if(""==h||"_wt_vs"==h||"_wt_vi"==h)return;let g={id:t,quantity:e,properties:{...h?{[i]:h}:{},...n}};const m=await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}).then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while updating cart attribute.",t)}));return m}(o,c,u,d,f,h,g.hasOwnProperty(JSON.stringify(!0===t?e.variant_id:e.product_id)),p,v);return n}}))})).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",t)}))}async function d(t,e,n,r){let a,c,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"default",u=arguments.length>5?arguments[5]:void 0,d=arguments.length>6?arguments[6]:void 0;if((0,o.dnh)(n)){const o=(0,l.wm)()+("72201044272"==n?`#${r}#${s}#${u?"olduser":"newuser"}:direct`:`#${r}:direct`);if(a={items:[{id:t,quantity:e,properties:{[i]:o}}]},"77105758517"==n){c=new URLSearchParams,c.append("product-id",null===d||void 0===d?void 0:d.client_product_id),c.append("id",t),c.append("quantity",e);return await fetch("https://"+window.location.hostname+"/cart/add.js",{method:"POST",body:c})}}else a={items:[{id:t,quantity:e}]};return await fetch("https://"+window.location.hostname+"/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}function f(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"default",l=arguments.length>5?arguments[5]:void 0;const a="https://"+window.location.hostname;var c;const s="72201044272"==n?`came-from-whatmore-live_${i}_${r}_${l?"olduser":"newuser"}`:`came-from-whatmore-live_${i}`;(0,o.BLb)(n)?(c=`${a}/cart/${t}:${e}?`+(0,o.VCz)(n)+"&"+(0,o.Spk)(n)+"&"+(0,o.KMo)(n),(0,o.dnh)(n)&&(c=`${c}&ref=`+s)):(c=`${a}/cart/${t}:${e}`,(0,o.dnh)(n)&&(c=`${c}?ref=`+s)),window.location.href=c}function h(t){const e="https://"+window.location.hostname+"/cart";(0,o.BLb)(t)?window.location.href=e+"?"+(0,o.VCz)(t)+"&"+(0,o.Spk)(t)+"&"+(0,o.yD5)(t):window.location.href=e}async function g(t){let e;if("27303477337"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")){var n,o;const i="https://"+window.location.hostname,r=window.location.pathname.split("/");e=i+"/"+(null!==r&&void 0!==r&&null!==(n=r[1])&&void 0!==n&&n.startsWith("en-")?(null===r||void 0===r?void 0:r[1])+"/":"")+(null===t||void 0===t||null===(o=t.product_link)||void 0===o?void 0:o.split(".co")[1])+".js"}else e=(null===t||void 0===t?void 0:t.product_link)+".js";const i=await fetch(e,{method:"GET"});if(!i.ok)throw new Error(`Error! status: ${i.status}`);return await i.json()}async function m(t){const e=t.product_link+".json",n=await fetch(e,{method:"GET"});if(!n.ok)throw new Error(`Error! status: ${n.status}`);return await n.json()}},4533:function(t,e,n){"use strict";n.d(e,{CK:function(){return j},Ch:function(){return b},Fu:function(){return y},Hm:function(){return x},d3:function(){return I},wm:function(){return S},zv:function(){return _}});var o=n(2089),i=n(5830),r=n(4820);const l="_whatmore_user_id",a="_whatmore_session_id",c="_whatmore_viewed_products",s="_whatmore_add_to_cart_products",u="_whatmore_session_time",d="_whatmore_store_id",f="_whatmore_qview_index",h="_whatmore_brand_questions",g=(0,i.Xd)("whatmoreShopId"),m=18e5,p=2592e5,v=6e5,w="_whatmore_bulk_events";function S(){return localStorage.getItem(d)!=g&&localStorage.setItem(d,g),null==localStorage.getItem(l)&&function(){new Date;const t=(0,o.Ak)();localStorage.setItem(l,t)}(),localStorage.getItem(l)}function _(){const t=new Date,e=JSON.parse(localStorage.getItem(w))||[],n=localStorage.getItem(u);return(null==localStorage.getItem(a)||null==n||t.getTime()>n)&&(localStorage.removeItem(a),localStorage.removeItem(u),function(){const t=(0,o.Ak)(),e=(new Date).getTime()+m;localStorage.setItem(a,t),localStorage.setItem(u,e)}(),e&&e.length>0&&((0,r.u)(e),localStorage.removeItem(w))),localStorage.getItem(a)}function y(t,e,n,o,i){const r=(new Date).getTime(),l={event_id:t.event_id,product_id:e.client_product_id,product_title:e.title,price:e.price,timestamp:r,widget_info:n,location:o,user_type:i?"olduser":"newuser",variants:[]};if(null===localStorage.getItem(s))localStorage.setItem(s,JSON.stringify([l]));else{let t=JSON.parse(localStorage.getItem(s)).filter((t=>t.timestamp+p>r));localStorage.setItem(s,JSON.stringify([...t,l]))}}function b(t,e,n,o,i){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"default",l=arguments.length>6?arguments[6]:void 0;const a=[],s=(new Date).getTime();if(e.map((e=>{const c={event_id:t,product_id:e.client_product_id,product_title:e.title,price:e.price,timestamp:s,variants:[],page:n,widget_type:o,widget_info:i,location:r,user_type:l?"olduser":"newuser"};a.push(c)})),null===localStorage.getItem(c))console.debug("viewed Products",JSON.stringify(a)),localStorage.setItem(c,JSON.stringify(a));else{let e=JSON.parse(localStorage.getItem(c)),n=!1;e.map((e=>{let o=Object.assign({},e);return e.event_id===t&&(e.timestamp=s,n=!0),o})),n?localStorage.setItem(c,JSON.stringify(e)):localStorage.setItem(c,JSON.stringify([...e,...a]))}}function j(){const t=(new Date).getTime();let e=JSON.parse(localStorage.getItem(c));if(!e)return[];let n=e.filter((e=>e.timestamp+p>t));return localStorage.setItem(c,JSON.stringify(n)),n}function x(){if(null!=localStorage.getItem(f)){const t=parseInt(localStorage.getItem(f))+1;localStorage.setItem(f,t)}}function I(t){const e=(new Date).getTime();if(null==localStorage.getItem(h)){const n={questionList:null===t||void 0===t?void 0:t.filter((t=>1==(null===t||void 0===t?void 0:t.is_active))),timestamp:e};localStorage.setItem(h,JSON.stringify(n))}else{const n=JSON.parse(localStorage.getItem(h));if((null===n||void 0===n?void 0:n.timestamp)+v>e){const n={questionList:null===t||void 0===t?void 0:t.filter((t=>1==(null===t||void 0===t?void 0:t.is_active))),timestamp:e};localStorage.setItem(h,JSON.stringify(n))}}}},4820:function(t,e,n){"use strict";n.d(e,{u:function(){return r}});var o=n(964),i=n(6641);const r=function(t){let e={};const n=t.length<10;e.metric_event_list=t,(async()=>{!function(t,e){const n="ingesting analytis-event";(0,i.gv)(n);const r=t;fetch(o.qW+"/event_metrics/bulk",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r),keepalive:e}).then((t=>t.json())).then((t=>{})).catch((t=>{console.error("error "+n,t)}))}(e,n)})()}},4635:function(t,e,n){var o=n(4759).Symbol;t.exports=o},2022:function(t,e,n){var o=n(4635),i=n(1581),r=n(5336),l=o?o.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":l&&l in Object(t)?i(t):r(t)}},6914:function(t,e,n){var o=n(8798),i=/^\s+/;t.exports=function(t){return t?t.slice(0,o(t)+1).replace(i,""):t}},6658:function(t,e,n){var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=o},1581:function(t,e,n){var o=n(4635),i=Object.prototype,r=i.hasOwnProperty,l=i.toString,a=o?o.toStringTag:void 0;t.exports=function(t){var e=r.call(t,a),n=t[a];try{t[a]=void 0;var o=!0}catch(c){}var i=l.call(t);return o&&(e?t[a]=n:delete t[a]),i}},5336:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4759:function(t,e,n){var o=n(6658),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();t.exports=r},8798:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},5491:function(t,e,n){var o=n(4567),i=n(4378),r=n(2588),l=Math.max,a=Math.min;t.exports=function(t,e,n){var c,s,u,d,f,h,g=0,m=!1,p=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function w(e){var n=c,o=s;return c=s=void 0,g=e,d=t.apply(o,n)}function S(t){var n=t-h;return void 0===h||n>=e||n<0||p&&t-g>=u}function _(){var t=i();if(S(t))return y(t);f=setTimeout(_,function(t){var n=e-(t-h);return p?a(n,u-(t-g)):n}(t))}function y(t){return f=void 0,v&&c?w(t):(c=s=void 0,d)}function b(){var t=i(),n=S(t);if(c=arguments,s=this,h=t,n){if(void 0===f)return function(t){return g=t,f=setTimeout(_,e),m?w(t):d}(h);if(p)return clearTimeout(f),f=setTimeout(_,e),w(h)}return void 0===f&&(f=setTimeout(_,e)),d}return e=r(e)||0,o(n)&&(m=!!n.leading,u=(p="maxWait"in n)?l(r(n.maxWait)||0,e):u,v="trailing"in n?!!n.trailing:v),b.cancel=function(){void 0!==f&&clearTimeout(f),g=0,c=h=s=f=void 0},b.flush=function(){return void 0===f?d:y(i())},b}},4567:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},9248:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},184:function(t,e,n){var o=n(2022),i=n(9248);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==o(t)}},4378:function(t,e,n){var o=n(4759);t.exports=function(){return o.Date.now()}},2588:function(t,e,n){var o=n(6914),i=n(4567),r=n(184),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=o(t);var n=a.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):l.test(t)?NaN:+t}},2089:function(t,e,n){"use strict";n.d(e,{Ak:function(){return o}});let o=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"")}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[760],{1746:function(e,t,n){n.r(t),n.d(t,{default:function(){return $}});var a=n(5830),i=n(9950),o=n(964),r=n(140),l=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(3330),_=n(852),p=n(4737),m=n(2039),h=n(4833),v=n(2979),g=n(6157),f=n(5100),y=n(8945),w=n(9821),b=n(4414);const S=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(946),n.e(296),n.e(987),n.e(669),n.e(665)]).then(n.bind(n,7206)))),I=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(437),n.e(296),n.e(620),n.e(116)]).then(n.bind(n,7144)))),k=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(879),n.e(296),n.e(987),n.e(920),n.e(423)]).then(n.bind(n,517)))),x=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(879),n.e(296),n.e(987),n.e(920),n.e(412)]).then(n.bind(n,7646)))),E=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(879),n.e(296),n.e(987),n.e(221)]).then(n.bind(n,5451)))),O=i.lazy((()=>Promise.all([n.e(572),n.e(491)]).then(n.bind(n,3319)))),j=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(946),n.e(437),n.e(181),n.e(987),n.e(669),n.e(650),n.e(956)]).then(n.bind(n,8650)))),T=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(946),n.e(296),n.e(987),n.e(669),n.e(620),n.e(474)]).then(n.bind(n,6945)))),C=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(296),n.e(669),n.e(485)]).then(n.bind(n,9418)))),D=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(946),n.e(296),n.e(987),n.e(676)]).then(n.bind(n,3369)))),L=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(946),n.e(296),n.e(987),n.e(669),n.e(891)]).then(n.bind(n,7178)))),A=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(437),n.e(296),n.e(669),n.e(620),n.e(933)]).then(n.bind(n,6989)))),N=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(946),n.e(437),n.e(181),n.e(987),n.e(669),n.e(650),n.e(806)]).then(n.bind(n,3278)))),q=i.lazy((()=>Promise.all([n.e(572),n.e(304),n.e(526),n.e(879),n.e(296),n.e(987),n.e(1)]).then(n.bind(n,4596))));var P=function(e){const[t]=(0,a.QN)("isInDesignMode"),[n]=(0,a.QN)("isDemoBrand"),[P]=(0,a.QN)("whatmoreTopBottomPadding"),[R]=(0,a.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:W}=(0,i.useContext)(p.B),[B]=(0,a.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:M}=(0,i.useContext)(p.B),K=(0,a.Xd)("isLandingSharedLink"),H=(0,a.Xd)("whatmoreShareTemplateId"),F=(0,a.Xd)("whatmoreShareStoryId"),G=(0,a.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:z,whatmoreUserInfo:$}=(0,i.useContext)(p.B),V=K&&M===(0,h.Mm)(H),[J,U]=(0,i.useState)(V),[Q,X]=(0,i.useState)(-1),[Y,Z]=(0,i.useState)(null);let ee=e.events,te=null===e||void 0===e?void 0:e.allEvents,ne=[],ae=[];if("template-banner-a"!==M){let e=0;for(let t=0;t<(null===ee||void 0===ee?void 0:ee.length);t++){var ie,oe;((0,m.ij)(ee[t])||(0,m.Il)(ee[t]))&&(null===(ie=null===(oe=ee[t])||void 0===oe?void 0:oe.in_stock)||void 0===ie||ie||(0,l.xku)(B))&&(ne.push({...null===ee||void 0===ee?void 0:ee[t],index:e}),e++)}for(let t=0;t<(null===te||void 0===te?void 0:te.length);t++){var re,le;!(0,m.ij)(null===te||void 0===te?void 0:te[t])&&!(0,m.Il)(null===te||void 0===te?void 0:te[t])||null!==(re=null===te||void 0===te||null===(le=te[t])||void 0===le?void 0:le.in_stock)&&void 0!==re&&!re||(ae.push({...null===te||void 0===te?void 0:te[t],index:e}),e++)}}let se=[...ne,...ae];var ce=null;W&&!ce&&(ce=function(e){var t=e.reduce(((e,t,n)=>{var a,i=t.storyset_id;return i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={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!==(a=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==a&&a,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(ne));const de=z.landingLocationType,ue=z.templateType;function _e(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,c.MN)()&&(0,w._)()&&!a&&(0,d.bo)(),t||n||(async()=>{const t=ce[e].events[0],n=(0,h.Wd)(de)+(0,h.gf)(ue)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);(0,r.lB)(t),(0,u.Si)(B,o.TB,o.OL),(0,s.Ch)(t.event_id,t.products,"homepage","stories",n,null===t||void 0===t?void 0:t.location,null===$||void 0===$?void 0:$.userType)})();var l=0;null!=i&&ce[e].events.map(((e,t)=>{e.event_id==i&&(l=t)})),X(l),Z(e)}async function pe(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,c.MN)()&&(0,w._)()&&!a&&await(0,d.bo)(),X(e.index),((0,m.ij)(e)||(0,m.Il)(e))&&(t||n||(async()=>{const t=(0,h.Wd)(de)+(0,h.gf)(ue)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,r.lB)(e),(0,u.Si)(B,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",t)})())}function me(e){return(0,b.jsx)(b.Fragment,{})}return(0,i.useEffect)((()=>{if(V)if((0,y.H)("whatmore-video-player",(()=>{U(!1)})),null!=F&&W){const e=ce.find((e=>F==e.id));if(e)return void _e(ce.indexOf(e),!0,G)}else if(null!=G){const e=ne.find((e=>G==e.event_id));if(e)return void pe(e,!0)}}),[]),(0,b.jsxs)(b.Fragment,{children:[J&&(0,b.jsx)(f.A,{}),(0,b.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(W?R:P)+"px",marginBottom:(W?R:P)+"px"},children:"template-b"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(S,{events:ne,onClick:pe,heading:e.heading})})}):"template-a-1"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(I,{events:ne,onClick:pe,heading:e.heading})}):"template-feed-a"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(A,{events:ne,onClick:pe,heading:e.heading})}):"template-collections-a"===M||"template-c"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(k,{events:ne,index:Q,setScreen:X,onClick:pe,heading:e.heading})})}):"template-collections-b"===M||"template-d"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(x,{events:ne,index:Q,setScreen:X,onClick:pe,heading:e.heading})})}):"template-collections-c"===M||"template-e"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(E,{events:ne,index:Q,setScreen:X,onClick:pe,heading:e.heading})})}):"template-collections-d"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(S,{events:ne,index:Q,setScreen:X,onClick:pe,heading:e.heading})})}):"template-collections-e"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(T,{events:ne,index:Q,setScreen:X,onClick:pe,heading:e.heading})})}):"template-collections-stories"===M||"template-stories"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(q,{events:ne,index:Q,setScreen:X,onClick:pe,heading:e.heading})})}):"template-f"===M||"template-collections-f"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(C,{events:ne,onClick:pe,heading:e.heading})})}):"template-g"===M||"template-collections-g"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(D,{events:ne,onClick:pe,heading:e.heading})})}):"template-h"===M||"template-collections-h"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(L,{events:ne,onClick:pe,heading:e.heading})})}):"template-banner-a"===M?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.BANNER_WIDGET_VIEW,event:ee[0],triggerFlag:!t&&!n,children:(0,b.jsx)(N,{events:ee})})}):W?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(O,{eventsStories:ce,onClick:_e,template:M})})}):(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,b.jsx)(T,{events:ne,onClick:pe,heading:e.heading})})})}),-1==Q||-2==Q?(0,b.jsx)(me,{}):(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(v.S,{userInteractionType:g.O.EVENT_VIEW,event:ee[Q],productList:ee[Q].products,cta:ee[Q].cta,triggerFlag:!t&&!n,children:(0,b.jsx)(j,{events:se,index:Q,onBack:function(e){(0,l.ei)(B)&&(0,a.Xd)("whatmoreAddedToCart")&&(0,_.H)(B,(()=>{}),100,window.location.hostname,e),X(-1),U(!1)},slideDirection:W||"horizontal"===(0,l.br0)(B)?"horizontal":"vertical",eventsStories:ce,initialStoryIndex:Y,template:M})})})]})};const R=function(e,t,n){const i=(0,a.Xd)("whatmoreShopId");var o=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),r=Object.keys(o);if("60960964855"==i&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var l={};fera.getRatings(r,(e=>{new Promise(((t,n)=>{e.forEach((e=>{l[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(l)})).then((e=>n(e)))}))}if("23114481744"==i){const e="1e6MQXxzYR19mpw9Km6Dcm86";l={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+r.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{l[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),l))).then((e=>n(e))).catch((e=>console.error(e)))}};var W=n(7802),B=n(6641),M=n(1351),K=n(4820),H=n(5873);const F=[{event_id:2333,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:204,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/sadabahaar-chanderi-suit-set",client_product_id:"6780183806018",price:"2800.00",currency:"INR",title:"Sadabahaar Chanderi Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/products/5_72f81f91-e027-4497-9dfe-20480b862c54.jpg?v=1684509430",compare_price:"6999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:1,event_state:"ready",poster_image:null,total_views:37,total_like:1,total_share:0,total_whatsapp:0},{event_id:2335,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:2108,brand:"whatmore-dev",product_link:"https://www.ordinaree.com/products/grease-black-designer-blackless-long-dress-for-women-online",client_product_id:"7210211311652",price:"5040.00",currency:"INR",title:"Grease Backless Long Dress",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0106/4897/7444/products/DSC_0377_45ee56eb-1240-4a17-9332-841809f132cf.jpg?v=1673001396",compare_price:"5600.00",product_metadata:null,product_status:"active"},{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:4,event_state:"ready",poster_image:null,total_views:31,total_like:0,total_share:0,total_whatsapp:0},{event_id:2336,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:632,brand:"whatmore-dev",product_link:"https://www.meerasplussizestore.com/products/basil-brick-ajrakh-handblock-printed-kurta",client_product_id:"6864880173194",price:"876.00",currency:"INR",title:"Basil & Brick Ajrakh Handblock Printed Kurta",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0363/0075/0986/products/Dark-Green-Maroon-Pati-Ajrakh-Kurti-SCL_6948.jpg?v=1653729466",compare_price:"2190.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:5,event_state:"ready",poster_image:null,total_views:21,total_like:0,total_share:0,total_whatsapp:0},{event_id:2338,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1728,brand:"whatmore-dev",product_link:"https://suta.in/products/ratri-kamal",client_product_id:"6916488003649",price:"4200.00",currency:"INR",title:"Ratri kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/ratri-kamal-293774.jpg?v=1668084259",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1732,brand:"whatmore-dev",product_link:"https://suta.in/products/kedar-ki-dor-blouse",client_product_id:"6625859502145",price:"4200.00",currency:"INR",title:"Kedar Ki Dor",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/files/DSC01009.jpg?v=1712326816",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1736,brand:"whatmore-dev",product_link:"https://suta.in/products/swarna-kamal",client_product_id:"6916483317825",price:"4200.00",currency:"INR",title:"Swarna Kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/swarna-kamal-472043.jpg?v=1668093054",compare_price:null,product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_496a26de-50cd-4823-8731-a97e0757efcf.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_496a26de-50cd-4823-8731-a97e0757efcf.mp4?v=1677477938",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:6,event_state:"ready",poster_image:null,total_views:28,total_like:0,total_share:0,total_whatsapp:0},{event_id:3255,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:3636,brand:"whatmore-dev",product_link:"https://buysohi.com/products/sohear8383",client_product_id:"7679599771864",price:"543.00",currency:"INR",title:"Gold Plated Pearl Stud",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0626/0218/2872/products/SS22_SOHEAR8383_1.jpg?v=1651755514",compare_price:"1699.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-01-24",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b0045891-f042-47d4-a87a-187c96a1857e.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b0045891-f042-47d4-a87a-187c96a1857e.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:7,event_state:"ready",poster_image:null,total_views:36,total_like:1,total_share:3,total_whatsapp:0},{event_id:3877,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-03",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_CoH_liSAYOj.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_CoH_liSAYOj_b1999a62-134d-4301-9808-5d09e64a8979.mp4?v=1677477812",presenter_email:null,presenter_phone:null,room_id:null,event_type:"video",is_active:!0,rank:20,event_state:"ready",poster_image:null,total_views:16,total_like:0,total_share:0,total_whatsapp:0},{event_id:4188,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:4459,brand:"whatmore-dev",product_link:"https://theethnic.co/products/black-ruching-jacket-kurta-set",client_product_id:"8011323769076",price:"7499.00",currency:"INR",title:"Black Ruching Jacket Kurta Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0650/7937/8164/products/1_5102cd2e-a419-4682-abf1-d9619e6e96d7.jpg?v=1674275880",compare_price:"9999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-07",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_c398aa0e-f0ac-4aba-91f5-4b1bcc5b1d51.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_7acda7d8-9762-47c7-9ee2-35e14db4c3fb.mp4?v=1677477803",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:23,event_state:"ready",poster_image:null,total_views:8,total_like:0,total_share:1,total_whatsapp:0},{event_id:28701,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:364,cta_link:"https://lovechild.in/collections/fragrances",client_cta_id:"https://lovechild.in/collections/fragrances",cta_title:"Explore",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-10",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",discount_coupon_image:"",event_hls_url:"https://d1zl4k1t5o4s75.cloudfront.net/whatmoredev/1080p_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:57,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:28767,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-11",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973716",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973708",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:58,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:48,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:24,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/evil-eye-adjustable-ring-gold",client_product_id:"6923301748874",price:"1250.00",currency:"INR",title:"Evil Eye adjustable ring - Gold",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/WhatsAppImage2020-09-21at11.38.01AM_1_700x_c51dd690-b6d8-4059-b3e0-13a2edf3feea.jpg?v=1656673474",compare_price:"1300",product_metadata:null,product_status:"active"},{product_id:23,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/rose-water-200ml",client_product_id:"6923319771274",price:"250.00",currency:"INR",title:"ROSE WATER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/RoseWaterFront-01_250x_2x_c4cd34f3-625d-463a-bf36-3b159322b7ed.png?v=1656673764",compare_price:null,product_metadata:null,product_status:"active"},{product_id:21,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923307647114",price:"1300.00",currency:"INR",title:"HONEY & LEMON FACE CLEANSER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/C5D_9156-01_250x_2x_2f91ab64-e5a4-42f1-baf3-5f3ecffb2b50_1.png?v=1656673584",compare_price:"1340",product_metadata:null,product_status:"active"},{product_id:22,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923317051530",price:"350.00",currency:"INR",title:"HONEY AND ROSE BODY CREAM 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/2_250x_2x_47ffd4b3-4100-4afb-b4c8-a09867e40ddb.png?v=1656673726",compare_price:null,product_metadata:null,product_status:"active"}],cta:[{cta_id:73,cta_link:"https://honeyandspice.in/collections/central-indian",client_cta_id:"https://honeyandspice.in/collections/central-indian",cta_title:"Shop Now",thumbnail_image:"",cta_type:""}],title:"BTS of HoneyAndSpice",description:"",brand:"whatmore-dev",scheduled_date:"2023-08-10",status:"upcoming",start_time:"19:00",end_time:"20:00",actual_start_time:null,actual_end_time:null,presenter_name:"Honey and Spice",thumbnail_image:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-01942fec-68a5-4417-aa28-a0bff121a3ec.mp4",discount_coupon_image:"",event_hls_url:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-2f0d18e6-a519-4e70-b8b3-529b90a04c28.mp4",presenter_email:null,presenter_phone:"+919888988889",room_id:null,event_type:"video",is_active:!0,rank:59,event_state:"ready",poster_image:null,total_views:13,total_like:0,total_share:0,total_whatsapp:0},{event_id:33888,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937498",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937490",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:60,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_2b78b138-b18f-45e3-b8dc-6ce59075872f.webp?v=1708937505",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33890,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937809",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937801",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:61,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.webp?v=1708937816",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33947,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947355",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947347",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:62,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_81844dee-68c7-425e-96bf-d3ac63c664e7.webp?v=1708947362",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41975,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:482,cta_link:"https://tests.com",client_cta_id:"https://tests.com",cta_title:"",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:69,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_51411814-cff2-491f-aca3-303e84307049.webp?v=1714033531",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41976,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:481,cta_link:"https://test1231.com",client_cta_id:"https://test1231.com",cta_title:" ",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:70,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_c2a47941-cafb-4765-ac6c-d6414679c6bd.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41977,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033513",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:71,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_a0f26d1d-462b-4548-848c-806702cf9c95.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0}];var G=function(e){const[t,n]=(0,i.useState)(),[r,u]=(0,i.useState)([]),[_,m]=(0,i.useState)(),{whatmoreIsStoriesTemplate:v}=(0,i.useContext)(p.B),{whatmoreIsCollectionsTemplate:f}=(0,i.useContext)(p.B),{whatmoreIsBannerTemplate:y}=(0,i.useContext)(p.B),[S]=(0,a.QN)("whatmoreShopId"),[I]=(0,a.QN)("whatmoreCollectionId"),k=(0,a.Xd)("whatmoreLandingLocationType"),x=(0,a.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:E}=(0,i.useContext)(p.B),{whatmoreUserInfo:O,whatmoreIsPreviewMode:j}=(0,i.useContext)(p.B),T=(0,a.Xd)("whatmoreCollectionUrl"),[C]=(0,a.QN)("isInDesignMode"),[D]=(0,a.QN)("isDemoBrand"),L=(0,l.mJ$)(S)?(0,l.jLA)(S)?T:window.location.href.split(/[?#]/)[0]:I,[A,N]=(0,a.QN)("productRatings"),[q,G]=(0,i.useState)(!1);var z=(0,l.SOt)(S)?o.aD+"/v2/events/":o.$$+"/v2/events/",$=(0,l.SOt)(S)?o.aD+"/v3/events/":o.$$+"/v3/events/",V=(0,l.SOt)(S)?o.aD+"/v4/events/":o.$$+"/v4/events/",J=(0,l.SOt)(S)?o.aD+"/v5/events/":o.$$+"/v5/events/",U=(0,l.SOt)(S)?o.aD+"/v6/events/":o.$$+"/v6/events/",Q=(0,l.SOt)(S)?o.aD+"/get_eventset/":o.$$+"/get_eventset/",X=(0,l.SOt)(S)?o.aD+"/v2/collection":o.$$+"/v2/collection",Y=(0,l.SOt)(S)?o.aD+"/v3/collection":o.$$+"/v3/collection",Z=(0,l.SOt)(S)?o.aD+"/v4/collection":o.$$+"/v4/collection",ee=(0,l.SOt)(S)?o.aD+"/v2/brand/"+S+"/product-events":o.$$+"/v2/brand/"+S+"/product-events",te=e.shopId,ne="live,upcoming",ae="true";return(0,i.useEffect)((()=>{(0,s.wm)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,K.u)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{null!=t&&0!=t.length&&!_&&(0,c.MN)()&&!(0,a.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,w._)()&&(0,d.Pc)(d.F5)}),[t]),(0,i.useEffect)((()=>{var e;if(k.startsWith("product"))if((0,l.vvU)(S))e=z.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ae.toString()+(v?"&template_type=stories":"");else{var t=(0,a.Xd)("whatmoreProductId");t=(0,l.BcY)(S)?function(e,t){return"STRQMPNF7QK"==t?encodeURIComponent(e):e.split(/[?#]/)[0]}(window.location.href,S):t,e=ee.toString()+"?client_product_id="+t.toString()+"&status="+ne.toString()+"&event_type=video"}else if(f||"invalid-url"!==T)e=(0,l.JwJ)(S)?`${Y.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==k&&(0,l.FKG)(S).length>0?(0,l.FKG)(S)[0]:L}`:"78232846646"==S?`${Z.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==k&&(0,l.FKG)(S).length>0?(0,l.FKG)(S)[0]:L}`:`${X.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==k&&(0,l.FKG)(S).length>0?(0,l.FKG)(S)[0]:L}`;else if(y){const t=h.Jh,n=(0,h.t6)(k);e=Q.toString()+te.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+S}else{var i,o,r,c;if(("72201044272"==S||"2665447536"==S&&j)&&!v)e=$.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ae.toString()+"&latitude="+(null!==(i=null===(o=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===o?void 0:o.latitude)&&void 0!==i?i:"")+"&longitude="+(null!==(r=null===(c=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===c?void 0:c.longitude)&&void 0!==r?r:"")+"&user_type="+(null!==O&&void 0!==O&&O.userType?"olduser":"newuser");else if((0,l.JwJ)(S)&&!v)e=V.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ae.toString();else if("78232846646"==S&&j){var d,_,p,g;e=U.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ae.toString()+"&latitude="+(null!==(d=null===(_=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===_?void 0:_.latitude)&&void 0!==d?d:"")+"&longitude="+(null!==(p=null===(g=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===g?void 0:g.longitude)&&void 0!==p?p:"")+"&user_type="+(null!==O&&void 0!==O&&O.userType?"olduser":"newuser")}else e="78232846646"==S?J.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ae.toString():z.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ae.toString()+(v?"&template_type=stories":"")}fetch(e).then((e=>e.json())).then((e=>{var t;if(y){const t=h.Jh;return(0,W.Po)(e,t)}return(0,l.JwJ)(S)&&(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)),(null===e||void 0===e?void 0:e.all_events)&&u(null===e||void 0===e?void 0:e.all_events),(0,W.Np)(e,f||"invalid-url"!==T)})).then((e=>(x&&console.debug("initial received events size : "+e.length),v||f||y?e:(0,W.zJ)(e,te)))).then((e=>(null!=e&&0!=e.length&&(0,l.WiD)(S)&&function(e,t,n){const i=setInterval((()=>{null===(0,a.Xd)("productRatings")&&R(e,t,n)}),1e3);setTimeout((()=>{clearInterval(i)}),1e4)}(S,e,(e=>{N(e)})),e))).then((e=>{n((D||C)&&null==e?F:e),G(!0)})).catch((e=>{m(e.message),G(!0)}))}),[]),(0,i.useEffect)((()=>{"index"===k?t&&t.length>0&&(0,M.yP)({userInteractionType:g.O.HOMEPAGE_VISITED,widgetSourceDetails:E}):"collection"===k&&(t&&t.length>0||(0,l.BZ$)(S))&&(0,M.yP)({userInteractionType:g.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:E})}),[t]),q&&(null==t||0==t.length||_)&&H.Sn.forEach((e=>{var t,n,a,i;const o=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"]'),r=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-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"]'))&&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"]'),l=null!==(a=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!==a?a: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"]'),s=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(v){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!f){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||l||r||o)&&(r&&c||o&&c||s&&c||l&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||_?(0,b.jsx)("div",{}):(x&&(0,B.xv)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,b.jsx)(P,{heading:e.heading,events:t,allEvents:r}))},z=n(6649);var $=function(e){const[t]=(0,a.QN)("whatmoreShopId"),[n]=(0,a.QN)("whatmoreHeading"),[o,r]=(0,i.useState)(["initial",window.pageYOffset]),[s,c]=(0,i.useState)(!1),d="2665447536"==t?30:10,_=(0,a.Xd)("isLandingSharedLink");(0,i.useEffect)((()=>{if((0,u.hr)(t),!(0,l.FlM)(t))return;const e=d;let n=window.pageYOffset,a=!1;const i=()=>{const t=window.pageYOffset;var i,o;Math.abs(t-n)<e?a=!1:(o=!0,r(i=[t>n?"scrolled-down":"scrolled-up",t]),i[1]>d&&c(o),n=t>0?t:0,a=!1)},o=()=>{a||(window.requestAnimationFrame(i),a=!0)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)}),[]);const[p,m,h]=(0,z.A)({triggerOnce:!0});return(0,b.jsx)("div",{ref:p,style:{display:"block",height:"100%"},children:s||m||_||!(0,l.FlM)(t)||(0,l.wQ2)(t)?(0,b.jsx)(G,{heading:n,shopId:t}):(0,b.jsx)("div",{})})}},5100:function(e,t,n){var a=n(9950),i=n(7300),o=n(5830),r=n(4414);const l=a.memo((()=>{if(!(0,o.Xd)("isLandingSharedLink"))return(0,r.jsx)(r.Fragment,{});const[e]=(0,i.A)();return(0,r.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,r.jsx)("div",{className:"shimmer-item portrait-full",children:(0,r.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,r.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,r.jsx)("div",{className:"shimmer-effect"})},t))),(0,r.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 "})]})}));t.A=l},7802:function(e,t,n){n.d(t,{Hl:function(){return i},Np:function(){return r},Po:function(){return l},Z_:function(){return a},zJ:function(){return o}});const a=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},i=function(e,t){return!(void 0==e.products||0==e.products.length)},o=function(e,t){if(null!=e)return e},r=function(e){if(null!=e)return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.events[0].events:e.events};const l=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const a=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return a?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(a):[]}},8945:function(e,t,n){function a(e,t){let n=0;let a=new MutationObserver((function(){document.querySelector("."+e)?(t(),a.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),a.disconnect()}),8e3))}));a.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return a}})},1351:function(e,t,n){n.d(t,{Qj:function(){return s},kz:function(){return c},UM:function(){return u},yP:function(){return _},DG:function(){return d}});var a=n(1348),i=n(5830),o=n(6157);function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,i.Xd)("whatmoreShopId");(e!=o.O.EVENT_VIEW||(0,a.NFF)(r))&&(e!=o.O.VIDEO_PLAYBACK||(0,a.Eel)(r))&&(e!=o.O.SHOPNOW_ATC_CLICKED&&e!=o.O.PRODUCT_TILE_ATC_CLICKED||(0,a.T9r)(r))&&(e!=o.O.VIDEO_LIKED||(0,a.Mz3)(r))&&(e!=o.O.VIDEO_SHARE_CTA_CLICKED||(0,a.OLZ)(r))&&(e!=o.O.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=o.O.SHOPNOW_CLICKED||(0,a.nEf)(r))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",s[e],{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===o.O.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var l=n(7145);const s={[o.O.EVENT_VIEW]:"whatmore_video_click_event",[o.O.VIDEO_LIKED]:"whatmore_video_like_event",[o.O.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[o.O.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[o.O.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[o.O.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[o.O.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[o.O.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function c(e){var t;let{userInteractionType:n,userInteractionMetadata:a,widgetSourceDetails:i,event:o,productList:c,ctaList:d}=e;(0,l.B)({userInteractionType:n,userInteractionMetadata:a,widgetSourceDetails:i,event:o,productList:c,ctaList:d}),n in s&&r(n,null!==(t=null===c||void 0===c?void 0:c[1])&&void 0!==t?t:null===c||void 0===c?void 0:c[0])}function d(e){var t;let{userInteractionType:n,userInteractionMetadata:a,widgetSourceDetails:i,event:o,productList:c,ctaList:d}=e;(0,l.B)({userInteractionType:n,userInteractionMetadata:a,widgetSourceDetails:i,event:o,productList:c,ctaList:d}),n in s&&r(n,null!==(t=null===c||void 0===c?void 0:c[1])&&void 0!==t?t:null===c||void 0===c?void 0:c[0],a)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:r}=e;(0,l.B)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:r})}function _(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:r}=e;(0,l.B)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:r})}}}]);
|