whatmore-react-assets 1.0.634 → 1.0.635

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.634",
3
+ "version": "1.0.635",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 303.f64c5de8.chunk.js.LICENSE.txt */
2
+ (self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[303],{9219:function(t,o,i){"use strict";i.d(o,{p_:function(){return l},Rb:function(){return _},jx:function(){return p}});var n=i(6730),r=i(6040),e=i.n(r),c=i(9854);function a(t,o){var i,n;return"STRI2XC0BMX"==o||"STRDG36BBP5"==o?null!==(n=(0,c.QxN)(o)[t])&&void 0!==n?n:t+" ":null!==(i=(0,c.QxN)(o)[t])&&void 0!==i?i:e()(t)}function u(){return null!=window.Shopify||"undefined"!=typeof window.Shopify}function d(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function s(t){if(t%1>=.1){return t.toString().split(".")[0].length>=4?parseInt(t):t.toFixed(2)}return parseInt(t)}function p(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"INR";if(!t||void 0==typeof t)return"";if(!u()){if("70993772860"==i||"72534294803"==i)return"$"+o+d(s(t));"STRY2V4XO5L"!=i&&"STRTFEDEDAP"!=i||(o="");const r="STRY2V4XO5L"==i||"STRTFEDEDAP"==i?t.toFixed(2):s(t);return a(null!==n&&void 0!==n?n:"INR",i)+o+d(r)}const r=window.Shopify.currency?window.Shopify.currency.active:"INR",e=parseFloat(window.Shopify.currency?window.Shopify.currency.rate:"1.0");return a(r,i)+o+d(s(t*e))}async function l(t,o,i){for(let a=0;a<t.products.length;a++){var r,e,c;const u=await(0,n.vX)(t.products[a],o,i);t.products[a].price=null!==(r=u.price)&&void 0!==r?r:t.products[a].price,t.products[a].compare_price=null!==(e=u.compare_at_price)&&void 0!==e?e:t.products[a].compare_price,t.products[a].currency=null!==(c=u.currency_code)&&void 0!==c?c:t.products[a].currency,"STRTFEDEDAP"==i&&(t.products[a].discount=u.discount)}return t}async function _(t,o,i){var r,e,c;const a=await(0,n.vX)(t,o,i);return t.price=null!==(r=a.price)&&void 0!==r?r:t.price,t.compare_price=null!==(e=a.compare_at_price)&&void 0!==e?e:t.compare_price,t.currency=null!==(c=a.currency_code)&&void 0!==c?c:t.currency,t}},5945:function(t,o,i){"use strict";i.d(o,{s:function(){return r}});var n=i(7753);function r(t){const o=(0,n.MO)("whatmoreShopId");return"undefined"==typeof t||"undefined"==t||null==t?"":"6873415750"==o?t:t.replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))}},6730:function(t,o,i){"use strict";i.d(o,{jg:function(){return zt},TE:function(){return Lt},rY:function(){return Ft},OM:function(){return Xt},vX:function(){return xt},Y4:function(){return At},ln:function(){return It}});var n=i(9854);function r(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var n in i)t[n]=i[n]}return t}var e=function t(o,i){function n(t,n,e){if("undefined"!==typeof document){"number"===typeof(e=r({},i,e)).expires&&(e.expires=new Date(Date.now()+864e5*e.expires)),e.expires&&(e.expires=e.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var a in e)e[a]&&(c+="; "+a,!0!==e[a]&&(c+="="+e[a].split(";")[0]));return document.cookie=t+"="+o.write(n,t)+c}}return Object.create({set:n,get:function(t){if("undefined"!==typeof document&&(!arguments.length||t)){for(var i=document.cookie?document.cookie.split("; "):[],n={},r=0;r<i.length;r++){var e=i[r].split("="),c=e.slice(1).join("=");try{var a=decodeURIComponent(e[0]);if(n[a]=o.read(c,a),t===a)break}catch(u){}}return t?n[t]:n}},remove:function(t,o){n(t,"",r({},o,{expires:-1}))},withAttributes:function(o){return t(this.converter,r({},this.attributes,o))},withConverter:function(o){return t(r({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(o)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),c=e;const a={STRDG36BBP5:"https://flash.andaazfashion.com",STRI2XC0BMX:"https://www.andaazfashion.com"};function u(t){var o,i;return null===t||void 0===t||null===(o=t.product_link)||void 0===o||null===(i=o.split(".com/"))||void 0===i?void 0:i[1]}function d(t){const o=c.get("andaaz_currency_code");return o||null}function s(t){return a[t]}async function p(t,o){const i=s(o);return function(t){const o=t.data.product_data;var i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,available:"in_stock"==o.stock_status,option1:null,option2:null,option3:null}];const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:"",variants:i,options:n}}(await fetch("".concat(i,"/whatmore/index/index/?url=").concat(u(t)).concat(null==d()?"&currency_code=GBP":"&currency_code="+d()),{method:"GET",headers:{redirect:"follow",mode:"no-cors"}}).then((t=>t.json())).catch((t=>console.error(t))))}const l={STRCGMYX28X:"https://"+window.location.hostname,STRBG6F06XL:"https://"+window.location.hostname,STR1QF8R1DW:"https://"+window.location.hostname},_={S:0,M:1,L:2,XL:3,XXL:4};async function m(t){const o=localStorage.getItem("_whatmore_kt"),i=localStorage.getItem("_whatmore_kt_start_time");if(o&&i&&(new Date).getTime()<=parseInt(i)+6e5)return o;const n=await async function(t){const o="https://api.whatmore.live/product/access/ans?store_id=".concat(t);return await fetch(o).then((t=>t.json()))}(t);return localStorage.setItem("_whatmore_kt",n.token),localStorage.setItem("_whatmore_kt_start_time",(new Date).getTime()),n.token}const h="apiKey";function v(t){return t.product_metadata.sku_id}function f(t){return l[t]}async function w(t,o){const i=f(o);return function(t){var o,i,n;const r=null===(o=t.products)||void 0===o?void 0:o[0];"options"in r&&0!=r.options.length||(r.options=[{product_option_id:"invalid",product_option_value:[{product_option_value_id:"invalid",option_value_id:"46",name:"invalid",image:"",quantity:"1",subtract:"1",price:"0.0000",price_prefix:"+",special_price:"0.0000",special_price_prefix:"+",weight:"0.00000000",weight_prefix:"+",sku:"8903568188345"}],option_id:"1",name:"invalid",type:"radio",value:"",required:"1"}]);var e=r.variants.map((t=>{var o,i;return{id:r.product_id+"::"+(null===t||void 0===t?void 0:t.product_option_id)+"::"+(null===t||void 0===t?void 0:t.product_option_value_id),product_id:r.product_id,title:null===t||void 0===t?void 0:t.title,price:null===t||void 0===t||null===(o=t.itemPrice)||void 0===o?void 0:o.netSellerPayable,compare_at_price:null===t||void 0===t||null===(i=t.itemPrice)||void 0===i?void 0:i.mrp,available:t.status&&t.live,option1:""==t.size?null:t.size,option2:null,option3:null,options:[null===t||void 0===t?void 0:t.size]}}));(e=e.filter((t=>1==t.available))).sort(((t,o)=>_[t.option1]-_[o.option1]));const c=e.map((t=>t.option1));return{id:r.product_id,title:null===(i=r.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.title,body_html:r.short_description,variants:e,options:c}}(await fetch(i+"/kartify/products?skus=".concat(v(t)),{headers:{[h]:await m(o)}}).then((t=>t.json())).catch((t=>console.error(t))))}async function y(t,o,i){f(i);const n=t.split("::"),r=n[0],e="null"==n[1]?null:n[1],c="null"==n[2]?null:n[2];return whatmoreatc(r,o,e,c),await new Promise((t=>setTimeout(t,1500))),"whatmoreatc_success"in localStorage&&"true"==localStorage.getItem("whatmoreatc_success")?{ok:!0,status:200,json:function(){return{}}}:{ok:!1,status:500,json:function(){return{}}}}const S={STRR72TX6AT:"https://www.cbazaar.com"};function T(t){return t.product_metadata.sku_id}function b(t){return S[t]}async function R(t,o){function i(t){const o=t.data.product_data[0];var i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:100*o.price,compare_at_price:100*o.mrp,currency_code:o.currency_code,available:!o.outOfStock,option1:null,option2:null,option3:null,options:[]}];const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:"",variants:i,options:n}}const n=b(o);return i(await fetch(n+"/productsv3api/getproductdetails/"+T(t),{method:"GET",headers:{redirect:"follow",mode:"no-cors"}}).then((t=>t.json())).catch((t=>console.error(t))))}const g={STRRPY8YRZE:"https://idaho-o.com"},k=(window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),"Y2tfZTI1OWVmNWVlNzg5MzIzYzIzOWU3ZDE0NjQwNmUwZmZkZGY4NDQ5Yzpjc19iYzdkZjI0MGEwYTgzNDhlZjNhMTI4ZTA3MDRkMmMwNmU5ZGM4NTM5");function j(t){return t.product_metadata.sku_id}function D(t){return g[t]}async function P(t,o){const i=D(o);return function(t){const o=t;var i=Object.entries(o.attributes[0].options).map(((t,i)=>{var n;return{id:(null!==(n=o.variations[i])&&void 0!==n?n:o.variations[0])+":"+o.id+":"+t[1],product_id:o.id,title:"",price:100*o.price,compare_at_price:100*o.price,available:"instock"===o.stock_status,option1:t[1],option2:null,option3:null,options:[t[1]]}}));const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,options:n}}(await fetch(i+"/wp-json/wc/v3/products/"+j(t),{method:"GET",headers:{Authorization:"Basic "+k}}).then((t=>t.json())).catch((t=>console.error(t))))}async function N(t,o,i){const n=t.split(":"),r=n[0],e=n[1],c=n[2],a=D(i)+"/wp-admin/admin-ajax.php",u={Authorization:"Basic "+k},d=new FormData;d.append("action","woocommerce_ajax_add_to_cart"),d.append("product_id",e),d.append("product_sku",""),d.append("quantity",o),d.append("variation_id",r),d.append("variation[attribute_pa_size]",c?c.toLowerCase():"");return await fetch(a,{method:"POST",headers:u,body:d}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const G={STRVHD8LG12:"https://prod.indina.in"};function B(t){var o,i;return null===t||void 0===t||null===(o=t.product_link)||void 0===o||null===(i=o.split("/products/"))||void 0===i?void 0:i[1]}function C(t){return G[t]}async function O(t,o){const i=C(o);return function(t){var o,i,n,r;const e=t;var c=[{id:e.id,product_id:e.id,title:e.name,price:null===(o=e.product_attributes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.final_price,compare_at_price:null===(n=e.product_attributes)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.price,currency_code:"INR",available:!0,option1:null,option2:null,option3:null}];const a=(c=c.filter((t=>1==t.available))).map((t=>t.option1));return{id:e.id,title:e.name,body_html:"",variants:c,options:a}}(await fetch("".concat(i,"/api/products/").concat(B(t)),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t))))}const U={STRGXL92H5M:"https://webapi.jaipurrugs.com"};async function E(t){const o=localStorage.getItem("_whatmore_jrugs_kt"),i=localStorage.getItem("_whatmore_jrugs_end_time");if(o&&i&&(new Date).getTime()<=parseInt(i))return o;const n=await async function(t){return await fetch("https://webapi.jaipurrugs.com/api/oauth/access_token",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:"test@pixxeldigital.com",Password:"test@123",client_id:"DD92F35C-FA0F-48A8-AF09-13197463D6CF",client_secret:"373C883D-350F-4823-BEDD-F85241777825",grant_type:"password"})}).then((t=>t.json()))}();return localStorage.setItem("_whatmore_jrugs_kt",n.token),localStorage.setItem("_whatmore_jrugs_end_time",(new Date).getTime()+6e5),n.token}function M(t){return U[t]}async function A(t,o){const i=M(o);return function(t){const o=null===t||void 0===t?void 0:t[0],i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,available:"in_stock"==o.stock_status,compare_at_price:o.mrp,option1:null,option2:null,option3:null}];return{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,currency_code:o.currency_code,options:[]}}(await fetch(i+"/api/WebsiteMaster/test/Whatmore-product-detail",{method:"POST",body:JSON.stringify({product_id:t.product_id}),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(await E())}}).then((t=>t.json())).catch((t=>console.error(t))))}var I;const z={STRMM0QP0CU:"https://"+window.location.hostname},F=null!==(I=c.get("form_key"))&&void 0!==I?I:"undefined",L=(window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),window.location.hostname.substring(10,4),"ds243corrt3qkd1rhoeyfes3ztefxjae");function X(t){return t.product_metadata.sku_id}function x(t){return z[t]}async function V(t,o){var i=await async function(t){const o=x(t);return(await fetch(o+"/rest/V1/products/attributes/ready_to_wear_sizes",{method:"GET",headers:{Authorization:"Bearer "+L}}).then((t=>t.json())).catch((t=>console.error(t)))).options.reduce(((t,o,i)=>(o.value&&o.label&&(t[o.value]=o.label),t)),{})}(o),n=[];return t.split(",").forEach((t=>{t in i&&n.push(t+":"+i[t])})),n}async function $(t){var o=[];return t.options.forEach((t=>{t.values.forEach((i=>{"Ready to wear"==i.title&&o.push(t.option_id+":"+i.option_type_id)}))})),o.length>0?o[0]:void 0}async function Y(t,o){async function i(t){const i=t,n=i.extension_attributes.is_ready_to_ware,r=i.custom_attributes.reduce(((t,o,i)=>(t[o.attribute_code]=o.value,t)),{});async function e(){var t;return{id:i.id,title:i.name,body_html:r.description,variants:[{id:"single_option::"+i.id,product_id:i.id,title:"",price:100*(null!==(t=r.special_price)&&void 0!==t?t:i.price),compare_at_price:100*i.price,available:!0,option1:i.extension_attributes.stock_item.item_id,option2:null,option3:null,options:[i.extension_attributes.stock_item.item_id]}],images:[{id:i.id,product_id:i.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:["single_option::"+i.id]}],options:[{id:i.product_id,product_id:i.product_id,name:"Size",position:1,values:[i.extension_attributes.stock_item.item_id]}]}}if(0==n)return await e();if(!("ready_to_wear_sizes"in r))return await e();const c=await V(r.ready_to_wear_sizes,o),a=await $(t);return a?await async function(t,o){const n=t.map(((t,n)=>{var e;const c=i.extension_attributes.stock_item.item_id,a=t.split(":")[0],u=t.split(":")[1];return{id:"multi_option::"+i.id+":"+c+":"+u+":"+a+":"+o,product_id:i.id,title:"",price:100*(null!==(e=r.special_price)&&void 0!==e?e:i.price),compare_at_price:100*i.price,available:!0,option1:u,option2:null,option3:null,options:null}})),e=t.map(((t,o)=>{t.split(":")[0];return t.split(":")[1]}));return{id:i.id,title:i.name,body_html:r.description,variants:n,images:[{id:i.id,product_id:i.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:["single_option::"+i.id]}],options:[{id:i.product_id,product_id:i.product_id,name:"Size",position:1,values:e}]}}(c,a):await e()}const n=x(o),r=await fetch(n+"/rest/default/V1/products/"+X(t),{method:"GET",headers:{Authorization:"Bearer "+L,"User-Agent":"PostmanRuntime/7.32.3"}}).then((t=>t.json())).catch((t=>console.error(t)));return await i(r)}async function K(t,o,i){var n,r;if(t.startsWith("single_option::")){const n=t.split("::")[1],r=x(i)+"/ajaxcart",e={Authorization:"Bearer "+L},c=new FormData;c.append("product",n),c.append("item",n),c.append("qty",o),c.append("form_key",F);return await fetch(r,{method:"POST",headers:e,body:c}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const e=t.split("::")[1].split(":"),c=e[0],a=(e[1],e[2]),u=(e[3],null!==(n=e[4])&&void 0!==n?n:void 0),d=null!==(r=e[5])&&void 0!==r?r:void 0,s=x(i)+"/ajaxcart",p={Authorization:"Bearer "+L},l=new FormData;l.append("product",c),l.append("item",c),l.append("qty",o),l.append("options["+u+"]",d),l.append("options[size_"+u+"]",a),l.append("form_key",F);return await fetch(s,{method:"POST",headers:p,body:l}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const J={STRK70X2OVV:"http://dev-panash.panashindia.com",STR3PNIYEZ6:"https://www.panashindia.com"};function Z(t){return t.product_metadata.sku_id}function H(t){return J[t]}async function W(t,o){function i(t){const o=t.data.product_data;var i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:100*o.price,compare_at_price:100*o.mrp,currency_code:o.currency_code,available:!0,option1:null,option2:null,option3:null,options:[]}];const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:"",variants:i,options:n}}const n=H(o);return i(await fetch(n+"/productsv3api/Productdetails/index/sku/"+Z(t),{method:"GET",headers:{redirect:"follow",mode:"no-cors"}}).then((t=>t.json())).catch((t=>console.error(t))))}const q={STRVIY73X3V:"https://staging.samyakk.com",STRBXUH5UGQ:"https://www.samyakk.com"};function Q(t){var o,i;return null===t||void 0===t||null===(o=t.product_link)||void 0===o||null===(i=o.split(".com/"))||void 0===i?void 0:i[1]}function tt(t){return q[t]}async function ot(t,o){const i=tt(o);return function(t){var o;const i=t;var n=[{id:i.id,product_id:i.id,title:i.name,price:i.price,currency_code:null!==(o=i.currency_code)&&void 0!==o?o:"INR",available:i.stock_status,option1:null,option2:null,option3:null}];return n=n.filter((t=>1==t.available)),{id:i.id,title:i.name,body_html:"",variants:n,options:[]}}(await fetch(i+"/rest/V2/get/product/"+Q(t),{method:"GET",headers:{redirect:"follow",mode:"no-cors"}}).then((t=>t.json())).catch((t=>console.error(t))))}const it={STRY2V4XO5L:"https://usqa.utsav.bz",STRTFEDEDAP:"https://www.utsavfashion.com"};function nt(t){var o,i;return null===t||void 0===t||null===(o=t.product_link)||void 0===o||null===(i=o.split("/product/"))||void 0===i?void 0:i[1]}function rt(t){return it[t]}function et(t){var o;return null!==(o=c.get("currency_code"))&&void 0!==o?o:"USD"}async function ct(t,o){const i=rt(o);return function(t){var o;const i=t.data.product_data;var n=[{id:i.product_id,product_id:i.product_id,title:i.product_title,price:i.price,available:"in_stock"==i.Stock_status,compare_at_price:i.mrp,currency_code:null!==(o=i.currency_code)&&void 0!==o?o:"INR",option1:null,option2:null,option3:null}];return n=n.filter((t=>1==t.available)),{id:i.product_id,title:i.product_title,body_html:"",options:[],variants:n,discount:i.discount_percentage}}(await fetch(i+"/rest/default/V1/utsav/product/detail?url=".concat(nt(t)),{method:"GET",headers:{redirect:"follow",mode:"no-cors"}}).then((t=>t.json())).then((t=>JSON.parse(t))).catch((t=>console.error(t))))}const at={STRNV8MHJTF:"https://cart-pim.wforwoman.com/api/v1/whatmore",STR6HU283UZ:"https://cart-pim.wforwoman.com/api/v1/whatmore",STR9T3LLEJB:"https://cart-pim.wforwoman.com/api/v1/whatmore",STRWJMIOJNX:"https://cart-pim.wforwoman.com/api/v1/whatmore",STR1D5ONOZX:"https://cart-pim.wforwoman.com/api/v1/whatmore",STRUDQ36YAC:"https://cart-pim.wforwoman.com/api/v1/whatmore"},ut={STRNV8MHJTF:1,STR6HU283UZ:1,STR9T3LLEJB:5,STRWJMIOJNX:2,STR1D5ONOZX:4,STRUDQ36YAC:3},dt=window.location.hostname.substring(10,4)+"_cart",st=window.location.hostname.substring(10,4)+"_carts",pt=window.location.hostname.substring(10,4)+"_curr";function lt(t){return t.product_link.match(/\/([^\/]+)\/?$/)[1].replace(".html","")}function _t(t){return ut[t]}function mt(t){return at[t]}function ht(t){var o;return null!==(o=c.get(pt))&&void 0!==o?o:"INR"}async function vt(t,o){const i=mt(o);return function(t){const o=t.data.product_data[0];var i=Object.entries(o.variation).map((t=>{const o=t[1],i=o.configrable_atribute_value;return{id:o.id_product,product_id:o.id_product,title:"",price:100*o.selling_price,compare_at_price:100*o.price,available:"in-stock"==o.stock_status,option1:i,option2:null,option3:null,options:[i]}}));const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,options:n}}(await fetch(i+"/get-product?url_key="+lt(t)+"&store="+_t(o)+"&currency="+ht(),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t))))}async function ft(t,o,i){const n=mt(i),r=c.get(dt),e=c.get(st);var a={varient_id:t,qty:o,store:_t(i)};r&&e&&(a={varient_id:t,qty:o,store:_t(i),cart_id:r,cart_session:e});return await fetch(n+"/add-product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((t=>t.json())).then((t=>(r||(c.set(dt,t.data.cart_id,{expires:365}),c.set(st,t.data.cart_session,{expires:365})),{ok:!0,status:200,json:function(){return{}}})))}const wt={STRJ5VPPT3U:"https://"+window.location.hostname,STR45JIP5JW:"https://"+window.location.hostname};function yt(t){return t.product_link.match(/\/([^\/]+)\/?$/)[1].replace(".html","")}function St(t){return wt[t]}async function Tt(t,o){const i=St(o);return function(t){const o=t;null==o.variations&&(o.variations="no-variations");var i=Object.entries(o.variations.split(",")).map((t=>{const i=t[1];return{id:o.product_id+"::"+i,product_id:o.product_id,title:"",price:100*o.price,compare_at_price:100*o.mrp,available:!0,option1:i,option2:null,option3:null,options:[i]}}));const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,options:n}}((await fetch(i+"/catalog/whatsmoreproducts?slug="+yt(t),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t)))).product_detail)}async function bt(t,o,i){const n=St(i),r=t.split("::"),e=r[0],c=r.length>1?r[1]:"";return await fetch(n+"/cart/addtocart?productid="+e+("no-variations"!==c&&t?"&variation_value="+c:"")+"&qty="+o,{method:"GET"}).then((t=>t.json())).then((t=>({ok:!0,status:200,json:function(){return{}}})))}const Rt="https://www.ninecolours.com";function gt(t){const o=t.product_link.split("-");return o[o.length-1]}function kt(t){return"STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t}function jt(t){return"STRRPY8YRZE"==t}function Dt(t){return"STR5KA9X0OZ"==t||"STRR72TX6AT"==t}function Pt(t){return"STRMM0QP0CU"==t}function Nt(t){return"STRJ5VPPT3U"==t||"STR45JIP5JW"==t}function Gt(t){return"STRCGMYX28X"==t||"STRBG6F06XL"==t||"STR1QF8R1DW"==t}function Bt(t){return"STRK70X2OVV"==t||"STR3PNIYEZ6"==t}function Ct(t){return"STRVIY73X3V"==t||"STRBXUH5UGQ"==t}function Ot(t){return"STRGXL92H5M"==t}function Ut(t){return"STRY2V4XO5L"==t||"STRTFEDEDAP"==t}function Et(t){return"STRDG36BBP5"==t||"STRI2XC0BMX"==t}function Mt(t){return"STRVHD8LG12"==t}async function At(t,o){if(kt(o))return async function(t,o){const i=mt(o);return function(t){const o=t.data.product_data[0];var i=Object.entries(o.variation).map((t=>{const o=t[1],i=o.configrable_atribute_value;return{id:o.id_product,product_id:o.id_product,title:"",price:o.selling_price,compare_at_price:o.price,available:"in-stock"==o.stock_status,option1:i,option2:null,option3:null}}));const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:n}]}}}(await fetch(i+"/get-product?url_key="+lt(t)+"&store="+_t(o)+"&currency="+ht(),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(jt(o))return async function(t,o){const i=D(o);return function(t){const o=t;var i=Object.entries(o.attributes[0].options).map(((t,i)=>{var n;return{id:(null!==(n=o.variations[i])&&void 0!==n?n:o.variations[0])+":"+o.id+":"+t[1],product_id:o.id,title:"",price:o.price,compare_at_price:o.price,available:"instock"===o.stock_status,option1:t[1],option2:null,option3:null}}));const n=i.map((t=>t.option1));return{product:{id:o.id,title:o.name,body_html:o.short_description,variants:i,images:[{id:o.images[0].id,product_id:o.id,position:1,src:o.images[0].src,variant_ids:[o.variations[0]]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:n}]}}}(await fetch(i+"/wp-json/wc/v3/products/"+j(t),{method:"GET",headers:{Authorization:"Basic "+k}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Dt(o))return async function(t,o){function i(t){const o=t.data.product_data[0];var i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,available:!o.outOfStock,option1:null,option2:null,option3:null}];const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:"",variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:n}]}}}const n=b(o);return i(await fetch(n+"/productsv3api/getproductdetails/"+T(t),{method:"GET",headers:{redirect:"follow"}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Bt(o))return async function(t,o){function i(t){const o=t.data.product_data;var i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,available:!0,option1:null,option2:null,option3:null}];const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:"",variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:n}]}}}const n=H(o);return i(await fetch(n+"/productsv3api/Productdetails/index/sku/"+Z(t),{method:"GET",headers:{redirect:"follow"}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Pt(o))return async function(t,o){async function i(t){const i=t,n=i.extension_attributes.is_ready_to_ware,r=i.custom_attributes.reduce(((t,o,i)=>(t[o.attribute_code]=o.value,t)),{});async function e(){var t;return{product:{id:i.id,title:i.name,body_html:r.description,variants:[{id:"single_option::"+i.id,product_id:i.id,title:"",price:null!==(t=r.special_price)&&void 0!==t?t:i.price,compare_at_price:i.price,available:!0,option1:i.extension_attributes.stock_item.item_id,option2:null,option3:null}],images:[{id:i.id,product_id:i.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:[i.id]}],options:[{id:i.product_id,product_id:i.product_id,name:"Size",position:1,values:[i.extension_attributes.stock_item.item_id]}]}}}if(0==n)return await e();if(!("ready_to_wear_sizes"in r))return await e();const c=await V(r.ready_to_wear_sizes,o),a=await $(t);return a?await async function(t,o){const n=t.map(((t,n)=>{var e;const c=i.extension_attributes.stock_item.item_id,a=t.split(":")[0],u=t.split(":")[1];return{id:"multi_option::"+i.id+":"+c+":"+u+":"+a+":"+o,product_id:i.id,title:"",price:null!==(e=r.special_price)&&void 0!==e?e:i.price,compare_at_price:i.price,available:!0,option1:u,option2:null,option3:null,options:null}})),e=t.map(((t,o)=>(t.split(":")[0],t.split(":")[1])));return{product:{id:i.id,title:i.name,body_html:r.description,variants:n,images:[{id:i.id,product_id:i.id,position:1,src:"https://ik.imagekit.io/wb2spwtue/kreeva/tr:h-433,w-315,q-80,cm-pad_resize/media/catalog/product"+r.thumbnail,variant_ids:[i.id]}],options:[{id:i.product_id,product_id:i.product_id,name:"Size",position:1,values:e}]}}}(c,a):await e()}const n=x(o),r=await fetch(n+"/rest/default/V1/products/"+X(t),{method:"GET",headers:{Authorization:"Bearer "+L}}).then((t=>t.json())).catch((t=>console.error(t)));return await i(r)}(t,o);if(Nt(o))return async function(t,o){const i=St(o);return function(t){const o=t;null==o.variations&&(o.variations="no-variations");var i=Object.entries(o.variations.split(",")).map((t=>{const i=t[1];return{id:o.product_id+"::"+i,product_id:o.product_id,title:"",price:o.price,compare_at_price:o.mrp,available:!0,option1:i,option2:null,option3:null}}));const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:n}]}}}((await fetch(i+"/catalog/whatsmoreproducts?slug="+yt(t),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t)))).product_detail)}(t,o);if(Gt(o))return async function(t,o){const i=f(o);return function(t){var o,i,n,r,e;const c=null===(o=t.products)||void 0===o?void 0:o[0];"options"in c&&0!=c.options.length||(c.options=[{product_option_id:"invalid",product_option_value:[{product_option_value_id:"invalid",option_value_id:"46",name:"invalid",image:"",quantity:"1",subtract:"1",price:"0.0000",price_prefix:"+",special_price:"0.0000",special_price_prefix:"+",weight:"0.00000000",weight_prefix:"+",sku:"8903568188345"}],option_id:"1",name:"invalid",type:"radio",value:"",required:"1"}]);var a=c.variants.map((t=>{var o,i;return{id:c.product_id+"::"+(null===t||void 0===t?void 0:t.product_option_id)+"::"+(null===t||void 0===t?void 0:t.product_option_value_id),product_id:c.product_id,title:null===t||void 0===t?void 0:t.title,price:null===(o=t.itemPrice)||void 0===o?void 0:o.netSellerPayable,compare_at_price:null===(i=t.itemPrice)||void 0===i?void 0:i.mrp,available:t.status&&t.live,option1:""==t.size?null:t.size,option2:null,option3:null}}));(a=a.filter((t=>1==t.available))).sort(((t,o)=>_[t.option1]-_[o.option1]));const u=a.map((t=>t.option1));return{product:{id:c.product_id,title:null===(i=c.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.title,body_html:c.short_description,variants:a,images:[{id:c.product_id,product_id:c.product_id,position:1,src:null===(r=c.variants)||void 0===r||null===(e=r[0])||void 0===e?void 0:e.imageUrl,variant_ids:[c.product_id]}],options:[{id:c.product_id,product_id:c.product_id,name:"Size",position:1,values:u}]}}}(await fetch(i+"/kartify/products?skus=".concat(v(t)),{headers:{[h]:await m(o)}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Ct(o))return async function(t,o){const i=tt(o);return function(t){var o;const i=t;var n=[{id:i.id,product_id:i.id,title:i.name,price:i.price,currency_code:null!==(o=i.currency_code)&&void 0!==o?o:"INR",available:i.stock_status,option1:null,option2:null,option3:null}];return n=n.filter((t=>1==t.available)),{product:{id:i.id,title:i.name,body_html:"",variants:n,images:[],options:[]}}}(await fetch(i+"/rest/V2/get/product/"+Q(t),{method:"GET",headers:{redirect:"follow"}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Ot(o))return async function(t,o){const i=M(o);return function(t){const o=null===t||void 0===t?void 0:t[0],i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,available:"in_stock"==o.stock_status,compare_at_price:o.mrp,option1:null,option2:null,option3:null}];return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[]}],options:[]}}}(await fetch(i+"/api/WebsiteMaster/test/Whatmore-product-detail",{method:"POST",body:JSON.stringify({product_id:t.product_id}),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(await E())}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Ut(o))return async function(t,o){const i=rt(o);return function(t){var o;const i=t.data.product_data;var n=[{id:i.product_id,product_id:i.product_id,title:i.product_title,price:i.price,available:"in_stock"==i.Stock_status,compare_at_price:i.mrp,currency_code:null!==(o=i.currency_code)&&void 0!==o?o:"INR",option1:null,option2:null,option3:null}];return n=n.filter((t=>1==t.available)),{product:{id:i.product_id,title:i.product_title,body_html:"",variants:n,images:[{id:i.product_id,product_id:i.product_id,position:1,src:i.thumbnail_image,variant_ids:[i.product_id]}],options:[]}}}(await fetch(i+"/rest/default/V1/utsav/product/detail?url=".concat(nt(t)),{method:"GET",headers:{redirect:"follow"}}).then((t=>t.json())).then((t=>JSON.parse(t))).catch((t=>console.error(t))))}(t,o);if(Et(o))return async function(t,o){const i=s(o);return function(t){const o=t.data.product_data;var i=[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,available:"in_stock"==o.stock_status,option1:null,option2:null,option3:null}];const n=(i=i.filter((t=>1==t.available))).map((t=>t.option1));return{product:{id:o.product_id,title:o.product_title,body_html:"",variants:i,images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image,variant_ids:[o.product_id]}],options:[{id:o.product_id,product_id:o.product_id,name:"Size",position:1,values:n}]}}}(await fetch("".concat(i,"/whatmore/index/index/?url=").concat(u(t)).concat(null==d()?"&currency_code=GBP":"&currency_code="+d()),{method:"GET",headers:{redirect:"follow"}}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if(Mt(o))return async function(t,o){const i=C(o);return function(t){var o,i,n,r;const e=t;var c=[{id:e.id,product_id:e.id,title:e.name,price:null===(o=e.product_attributes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.final_price,compare_at_price:null===(n=e.product_attributes)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.price,currency_code:"INR",available:!0,option1:null,option2:null,option3:null}];return(c=c.filter((t=>1==t.available))).map((t=>t.option1)),{product:{id:e.id,title:e.name,body_html:"",variants:c}}}(await fetch("".concat(i,"/api/products/").concat(B(t)),{method:"GET"}).then((t=>t.json())).catch((t=>console.error(t))))}(t,o);if("STRGA3S8N41"==o){function i(t){const o=t.data.product_data[0];return{product:{id:o.product_id,title:o.product_title,body_html:o.description,variants:[{id:o.product_id,product_id:o.product_id,title:o.product_title,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,option1:"variant-1",option2:null,option3:null}],images:[{id:o.product_id,product_id:o.product_id,position:1,src:o.thumbnail_image[0],variant_ids:[o.product_id]}]}}}const n=Rt;return i(await fetch(n+"/whatmore-productfetch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_code:gt(t)})}).then((t=>t.json())).catch((t=>console.error(t))))}return{}}async function It(t,o){if(kt(o))return vt(t,o);if(jt(o))return P(t,o);if(Dt(o))return R(t,o);if(Bt(o))return W(t,o);if(Pt(o))return Y(t,o);if(Nt(o))return Tt(t,o);if(Gt(o))return w(t,o);if(Ct(o))return ot(t,o);if(Ot(o))return A(t,o);if(Ut(o))return ct(t,o);if(Et(o))return p(t,o);if(Mt(o))return O(t,o);if("STRGA3S8N41"==o){function i(t){const o=t.data.product_data[0];return{id:o.product_id,title:o.product_title,body_html:o.description,variants:[{id:o.product_id,title:"variant-1",option1:"variant-1",option2:null,option3:null,available:!0,price:o.price,compare_at_price:o.mrp,currency_code:o.currency_code,options:["variant-1"]}],options:[{name:"variant",position:1,values:["variant-1"]}]}}const n=Rt;return i(await fetch(n+"/whatmore-productfetch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_code:gt(t)})}).then((t=>t.json())).catch((t=>console.error(t))))}return{}}async function zt(t,o,i){if(kt(i))return await ft(t,o,i);if(jt(i))return await N(t,o,i);if(Pt(i))return K(t,o,i);if(Nt(i))return bt(t,o,i);if(Gt(i))return y(t,o,i);if("STRGA3S8N41"==i){const i=Rt;return await fetch(i+"/whatmore-addtocart ",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_id:t,qty:o})})}return{}}async function Ft(t,o,i){if(kt(i))return async function(t,o,i){await ft(t,o,i);const r="https://"+window.location.hostname;var e;e=(0,n.lj5)(i)?"".concat(r,"/checkout")+"?"+(0,n.awP)(i)+"&"+(0,n.n9s)(i)+"&"+(0,n.Uch)(i):"".concat(r,"/checkout"),window.location.href=e}(t,o,i);if(jt(i))return async function(t,o,i){await N(t,o,i);const r="https://"+window.location.hostname;var e;e=(0,n.lj5)(i)?"".concat(r,"/cart")+"?"+(0,n.awP)(i)+"&"+(0,n.n9s)(i)+"&"+(0,n.Uch)(i):"".concat(r,"/cart"),window.location.href=e}(t,o,i);if(Pt(i))return async function(t,o,i){await K(t,o,i);const r="https://"+window.location.hostname;var e;e=(0,n.lj5)(i)?"".concat(r,"/checkout/cart")+"?"+(0,n.awP)(i)+"&"+(0,n.n9s)(i)+"&"+(0,n.Uch)(i):"".concat(r,"/checkout/cart"),window.location.href=e}(t,o,i);if(Nt(i))return async function(t,o,i){await bt(t,o,i);const r="https://"+window.location.hostname;var e;e=(0,n.lj5)(i)?"".concat(r,"/checkout")+"?"+(0,n.awP)(i)+"&"+(0,n.n9s)(i)+"&"+(0,n.Uch)(i):"".concat(r,"/checkout"),window.location.href=e}(t,o,i);if(Gt(i))return async function(t,o,i){await y(t,o,i);const r="https://"+window.location.hostname;var e;e=(0,n.lj5)(i)?"".concat(r,"/checkout")+"?"+(0,n.awP)(i)+"&"+(0,n.n9s)(i)+"&"+(0,n.Uch)(i):"".concat(r,"/checkout"),window.location.href=e}(t,o,i);if("STRGA3S8N41"==i){await zt(t,o,i);const e="https://"+window.location.hostname;var r;r=(0,n.lj5)(i)?"".concat(e,"/cart")+"?"+(0,n.awP)(i)+"&"+(0,n.n9s)(i)+"&"+(0,n.Uch)(i):"".concat(e,"/cart"),window.location.href=r}return{}}async function Lt(t){if(kt(t))return async function(t){const o="https://"+window.location.hostname;var i;i=(0,n.lj5)(t)?"".concat(o,"/cart")+"?"+(0,n.awP)(t)+"&"+(0,n.n9s)(t)+"&"+(0,n.Uch)(t):"".concat(o,"/cart"),window.location.href=i}(t);if(jt(t))return async function(t){const o="https://"+window.location.hostname;var i;i=(0,n.lj5)(t)?"".concat(o,"/cart")+"?"+(0,n.awP)(t)+"&"+(0,n.n9s)(t)+"&"+(0,n.Uch)(t):"".concat(o,"/cart"),window.location.href=i}(t);if(Pt(t))return async function(t){const o="https://"+window.location.hostname;var i;i=(0,n.lj5)(t)?"".concat(o,"/checkout/cart")+"?"+(0,n.awP)(t)+"&"+(0,n.n9s)(t)+"&"+(0,n.Uch)(t):"".concat(o,"/checkout/cart"),window.location.href=i}(t);if(Nt(t))return async function(t){const o="https://"+window.location.hostname;var i;i=(0,n.lj5)(t)?"".concat(o,"/cart")+"?"+(0,n.awP)(t)+"&"+(0,n.n9s)(t)+"&"+(0,n.Uch)(t):"".concat(o,"/cart"),window.location.href=i}(t);if(Gt(t))return async function(t){const o="https://"+window.location.hostname;var i;i=(0,n.lj5)(t)?"".concat(o,"/cart")+"?"+(0,n.awP)(t)+"&"+(0,n.n9s)(t)+"&"+(0,n.Uch)(t):"".concat(o,"/cart"),window.location.href=i}(t);if("STRGA3S8N41"==t){const i="https://"+window.location.hostname;var o;o=(0,n.lj5)(t)?"".concat(i,"/cart")+"?"+(0,n.awP)(t)+"&"+(0,n.n9s)(t)+"&"+(0,n.Uch)(t):"".concat(i,"/cart"),window.location.href=o}return{}}function Xt(t){if(kt(t))return function(t){const o=c.get(dt),i=mt(t);return fetch(i+"/get-cart",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cart_id:o})}).then((t=>t.json())).then((t=>({json:function(){return{item_count:t.data.item_count}}})))}(t);if(jt(t))return function(t){const o=D(t);return fetch(o+"/wp-json/wc/v3/cart`",{method:"GET",headers:{Authorization:"Basic "+k}}).then((t=>t.json())).then((t=>({json:function(){var o;return{item_count:null!==(o=t.data.item_count)&&void 0!==o?o:0}}})))}(t);if(Pt(t))return function(t){const o=x(t);return fetch(o+"/wp-json/wc/v3/cart`",{method:"GET",headers:{Authorization:"Basic "+L}}).then((t=>t.json())).then((t=>({json:function(){var o;return{item_count:null!==(o=t.data.item_count)&&void 0!==o?o:0}}})))}(t);if(Nt(t))return Promise.resolve({json:function(){return{item_count:0}}});if(Gt(t))return Promise.resolve({json:function(){return{item_count:0}}});if("STRGA3S8N41"==t){return fetch(Rt+"/whatmore-cartcount ",{method:"GET",headers:{"Content-Type":"application/json"}})}return{}}async function xt(t,o,i){if(kt(i))return async function(t,o){const i=await vt(t,o);return{price:i.variants[0].price/100,compare_at_price:i.variants[0].compare_at_price/100,currency_code:ht()}}(t,i);if(jt(i))return async function(t,o){const i=await P(t,o);return{price:i.variants[0].price/100,compare_at_price:i.variants[0].compare_at_price/100,currency_code:"INR"}}(t,i);if(Pt(i))return async function(t,o){const i=await Y(t,o);return{price:i.variants[0].price/100,compare_at_price:i.variants[0].compare_at_price/100,currency_code:"INR"}}(t,i);if(Nt(i))return async function(t,o){const i=await Tt(t,o);return{price:i.variants[0].price/100,compare_at_price:i.variants[0].compare_at_price/100,currency_code:"INR"}}(t,i);if(Dt(i))return async function(t,o){const i=await R(t,o);return{price:i.variants[0].price/100,compare_at_price:i.variants[0].compare_at_price/100,currency_code:i.variants[0].currency_code}}(t,i);if(Bt(i))return async function(t,o){const i=await W(t,o);return{price:i.variants[0].price/100,compare_at_price:i.variants[0].compare_at_price/100,currency_code:i.variants[0].currency_code}}(t,i);if(Gt(i))return async function(t,o){var i,n,r,e;const c=await w(t,o);return{price:null===(i=c.variants[0])||void 0===i||null===(n=i.itemPrice)||void 0===n?void 0:n.netSellerPayable,compare_at_price:null===(r=c.variants[0])||void 0===r||null===(e=r.itemPrice)||void 0===e?void 0:e.mrp,currency_code:"INR"}}(t,i);if(Ct(i))return async function(t,o){var i,n,r,e;const c=await ot(t,o);return{price:null===(i=c.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.price,compare_at_price:null,currency_code:null===(r=c.variants)||void 0===r||null===(e=r[0])||void 0===e?void 0:e.currency_code}}(t,i);if(Ot(i))return async function(t,o){var i,n;const r=await A(t,o);return{price:null===(i=r.variants[0])||void 0===i?void 0:i.price,compare_at_price:null===(n=r.variants[0])||void 0===n?void 0:n.compare_at_price,currency_code:r.currency_code}}(t,i);if(Ut(i))return async function(t,o){var i,n,r,e;const c=await ct(t,o);return{price:null===(i=c.variants)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.price,compare_at_price:null===(r=c.variants)||void 0===r||null===(e=r[0])||void 0===e?void 0:e.compare_at_price,currency_code:et(),discount:c.discount}}(t,i);if(Et(i))return async function(t,o){const i=await p(t,o);return{price:i.variants[0].price,compare_at_price:i.variants[0].compare_at_price,currency_code:i.variants[0].currency_code}}(t,i);if(Mt(i))return async function(t,o){console.log(t,"product");const i=await O(t,o);return{price:i.variants[0].price,compare_at_price:i.variants[0].compare_at_price,currency_code:i.variants[0].currency_code}}(t,i);if("STRGA3S8N41"==i){const o=await It(t,i);return{price:o.variants[0].price,compare_at_price:o.variants[0].compare_at_price,currency_code:o.variants[0].currency_code}}return{}}},6040:function(t,o,i){const n=i(500);t.exports=function(t){if("string"!==typeof t)return;const o=t.toUpperCase();return Object.prototype.hasOwnProperty.call(n,o)?n[o]:void 0},t.exports.currencySymbolMap=n},500:function(t){t.exports={AED:"\u062f.\u0625",AFN:"\u060b",ALL:"L",AMD:"\u058f",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20bc",BAM:"KM",BBD:"$",BDT:"\u09f3",BGN:"\u043b\u0432",BHD:".\u062f.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20bf",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xa5",CNY:"\xa5",COP:"$",COU:"COU",CRC:"\u20a1",CUC:"$",CUP:"\u20b1",CVE:"$",CZK:"K\u010d",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062f\u062c",EEK:"kr",EGP:"\xa3",ERN:"Nfk",ETB:"Br",ETH:"\u039e",EUR:"\u20ac",FJD:"$",FKP:"\xa3",GBP:"\xa3",GEL:"\u20be",GGP:"\xa3",GHC:"\u20b5",GHS:"GH\u20b5",GIP:"\xa3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20aa",IMP:"\xa3",INR:"\u20b9",IQD:"\u0639.\u062f",IRR:"\ufdfc",ISK:"kr",JEP:"\xa3",JMD:"J$",JOD:"JD",JPY:"\xa5",KES:"KSh",KGS:"\u043b\u0432",KHR:"\u17db",KMF:"CF",KPW:"\u20a9",KRW:"\u20a9",KWD:"KD",KYD:"$",KZT:"\u20b8",LAK:"\u20ad",LBP:"\xa3",LKR:"\u20a8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043d",MMK:"K",MNT:"\u20ae",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20a8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20a6",NIO:"C$",NOK:"kr",NPR:"\u20a8",NZD:"$",OMR:"\ufdfc",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20b1",PKR:"\u20a8",PLN:"z\u0142",PYG:"Gs",QAR:"\ufdfc",RMB:"\uffe5",RON:"lei",RSD:"\u0414\u0438\u043d.",RUB:"\u20bd",RWF:"R\u20a3",SAR:"\ufdfc",SBD:"$",SCR:"\u20a8",SDG:"\u062c.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xa3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xa3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xa3",SZL:"E",THB:"\u0e3f",TJS:"SM",TMT:"T",TND:"\u062f.\u062a",TOP:"T$",TRL:"\u20a4",TRY:"\u20ba",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20b4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043b\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20ab",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20a3",XSU:"Sucre",XUA:"XUA",YER:"\ufdfc",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"}},6143:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[580],{3580:function(t,e,n){n.r(e),n.d(e,{default:function(){return u}});var r=n(7313),o=n(8866),i=n(7753),s=(n(9111),n(123),n(9778),n(9854)),a=n(868),l=n(6417);var d=function(t){var e,n;const[d,c,p]=(0,o.Z)(),h=(0,i.MO)("whatmorePrimaryFont"),u=(0,i.MO)("whatmoreSecondaryColor"),f=(0,i.MO)("whatmoreShopId"),[x,m]=(0,r.useState)(!1),w=t.storyId,g=(0,a.V)(t.imageUrl),y=t.title,b=t.onClick,v=t.template,j=(0,s.f63)(f),k="template-stories-a"===v?"50%":"30%",S="portrait"==d?1:(0,s.Zyc)(f),z=Math.floor(t.tileSize*S),C=.12*z*(0,s.LM2)(f),F=null!==(e=(0,s.QaQ)(f))&&void 0!==e?e:h,E=null!==(n=(0,s.u2W)(f))&&void 0!==n?n:[u,j,u,j,u],L=(0,r.useRef)(0),N=(0,r.useRef)(null);return(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:z*(0,s.jJ6)(f)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{m(!0),b(w)},className:[x?"whatmore-scale-on-tap":""].join(" "),children:[(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:k,boxShadow:"0px 2px 1px 0px "+E[0]+"50, 0px -2px 1px 0px "+E[1]+"50, 2px 0px 1px 0px "+E[2]+"50, -2px 0px 1px 0px "+E[3]+"80, 2px -2px 1px 0px "+E[4]+"80, -2px 2px 1px 0px "+E[0]+"DA, 2px 2px 1px 0px "+E[1]+"DA, -2px -2px 1px 0px "+E[2]+"DA"},children:(0,l.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:z+"px",width:z+"px",borderRadius:k,border:"3px solid white",backgroundColor:"#343434"===u?"#d3d3d3":u,overflow:"hidden"},children:(0,l.jsx)("img",{ref:N,className:"whatmore-story-thumbnail",src:g,loading:"lazy",style:{objectFit:"cover",height:z+"px",width:z+"px",backgroundColor:"white"},alt:"story image",onError:function(){if(L.current<3){let e=(0,a.V)(t.imageUrl);N.current.src="",N.current.src=e,L.current=L.current+1}else console.log("Failed to load image after several attempts"),N.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,l.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-size",C+"px","important")},style:{textAlign:"center",color:(0,s.WS3)(f),fontFamily:F,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto"},children:y.substring(0,24)})})]})},c=n(9039),p=n(9302);const h=(0,n(2575).Z)({key:"whatmore-stories-css"});var u=function(t){const[e,n,a]=(0,o.Z)(),[u]=(0,i.j1)("whatmoreLandscapePadding"),[f]=(0,i.j1)("whatmoreStoryTileSize"),[x]=(0,i.j1)("whatmoreStoryTileSizeDesktop"),[m]=(0,i.j1)("whatmoreShopId"),[w,g]=(0,r.useState)("portrait"===e?"flex-start":"center"),y=(0,r.useRef)(null);var b=t.eventsStories;const v=t.onClick,j=t.template;(0,r.useEffect)((()=>{c.$.forEach((t=>{var e;if(!(null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;t&&(t.style.minHeight="0px")}))}),[]);const k=t=>{if(y.current){const e="left"===t?4*-S:4*S;y.current.scrollBy({left:e,behavior:"smooth"})}};(0,r.useEffect)((()=>{!function(){if(y.current){const t=y.current.scrollWidth,e=y.current.offsetWidth;g(t>e?"flex-start":"center")}}()}),[w,a]);const S="landscape"===e?n*(x/100)*.3:a*(f/100)*.5;return(0,l.jsx)(p.C,{value:h,children:"landscape"==e&&!(0,s.DF0)(m)||"portrait"==e&&!(0,s.JaA)(m)?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:w,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:y,children:b.map(((t,e)=>(0,l.jsx)(d,{storyId:t.id,tileSize:(0,s.OFP)(m)?100:S,onClick:t=>{v(e)},template:j,imageUrl:t.thumbnail_image,title:t.title},"whatmore-story-"+t.id)))}),"landscape"===e&&(0,s.sMW)(m)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>k("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,l.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,l.jsx)("button",{onClick:()=>k("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,l.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})}},868:function(t,e,n){n.d(e,{V:function(){return a}});var r=n(9854),o=n(7753);const i={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},s={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},a=function(t){const e=(0,o.MO)("whatmoreShopId");if(!t)return t;if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,r.zpr)(e))return t;if("AZURECDN"==(0,r.zpr)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(i))if(t.includes(e))return t.replace(e,i[e]);return t}}if("BUNNYCDN"==(0,r.zpr)(e)){if(t.includes(".b-cdn.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(s))if(t.includes(e))return t.replace(e,s[e]);return t}}return t}},8866:function(t,e,n){var r=n(7313);function o(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=o();const[i,s]=(0,r.useState)([e>n?"portrait":"landscape",e,n]);return(0,r.useLayoutEffect)((()=>{function t(){var[t,e]=o();s(t>e?["portrait",t,e]:["landscape",t,e])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}}),[]),i}},9111:function(){},123:function(){},9778:function(){}}]);