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,KAEzBiB,EAAMiN,EAAWhO,MAAM,GAAG,GAC9B,IAAKe,EAAK,OACVA,EAAMA,EAAIkN,OAEV,IAAIjN,EAAQgN,EAAWhO,MAAM,GAAG,GAChC,IAAKgB,EAAO,OACZA,EAAQA,EAAMiN,OACdN,EAAQ5M,GAAOC,QAIJ4K,GAAAA,CAAQgC,EAAgBD,GAC1B,CACXhP,OAAOC,YAAP,yBAAiD+O,EAEjD,IAAIO,EAAQ,IAAIZ,YAAY,wBAAyB,CAACC,OAAQI,IAC9DxP,SAASkP,cAAca,MAExB,SAIL/P,SAASqP,iBAAiB,yBAAyB,SAACE,GAClD,IAAIS,EAAQhQ,SAASC,cAAc,wDACnC,GAAI+P,EAAO,CACT,IACItG,EADgBsG,EAAMxG,cACKA,cAEhBE,EAAWgB,iBAAiB,WAClCrH,SAAQ,SAACtD,GAChB2J,EAAWvB,YAAYpI,UAOxB,SAASkQ,EAAU3B,GACxBhK,IACAvD,IACAwB,IACA8L,EAAoBC,GACpBgB,IACA5L,IACAuK","sources":["webpack://assemble/./apps/common/wix-utils/index.js"],"sourcesContent":["import get from 'lodash/get';\nimport isEqual from 'lodash/isEqual';\nimport * as utils from './Utils';\n\nfunction extractViewerModel() {\n let el = document.querySelector(\"#wix-viewer-model\");\n if (!el) return;\n\n let innerText = el.innerText;\n let payload = {};\n try {\n payload = JSON.parse(innerText);\n } catch(e) {\n return;\n }\n\n return payload;\n}\n\nfunction isWixStore() {\n if (window.OnVoardData['is_wix_store']) return true;\n\n let payload = extractViewerModel();\n if (payload) {\n let payloadRoutes = get(payload, 'siteFeaturesConfigs.router.routes') || {};\n if (payloadRoutes['./checkout']) {\n window.OnVoardData['is_wix_store'] = true;\n return true;\n }\n }\n\n return false;\n}\n\nexport function getCurrency() {\n const urlParams = new URLSearchParams(window.location.search);\n let currency = urlParams.get('currency');\n return currency;\n}\n\n\nexport function initPageType(identifier='') {\n let pageId = wixEmbedsAPI.getCurrentPageInfo().id;\n\n if (identifier) {\n if (identifier === 'product_page') {\n window.OnVoardData['page_type'] = 'product';\n return;\n }\n\n if (identifier === 'shopping_cart') {\n window.OnVoardData['page_type'] = 'cart';\n return;\n }\n\n if (identifier === 'checkout') {\n window.OnVoardData['page_type'] = 'checkout';\n return;\n }\n }\n\n let currentUrl = location.protocol + '//' + location.host;\n if (location.pathname && location.pathname !== '/') currentUrl += location.pathname;\n\n if (wixEmbedsAPI.getExternalBaseUrl() === currentUrl) {\n window.OnVoardData['page_type'] = 'home';\n return;\n }\n\n let paths = location.pathname.split(\"/\");\n if (document.querySelector(\"[data-hook='product-page']\")) {\n window.OnVoardData['page_type'] = 'product';\n return;\n }\n\n if (document.querySelector(`#SITE_PAGES #${pageId} [data-hook='CartAppDataHook.root']`)) {\n window.OnVoardData['page_type'] = 'cart';\n return;\n }\n\n if (document.querySelector(`#SITE_PAGES #${pageId} [data-hook='ThankYouPageAppDataHook.root']`)) {\n window.OnVoardData['page_type'] = 'thank-you';\n return;\n }\n\n if (document.querySelector(`#SITE_PAGES #${pageId} [data-hook='product-list']`)) {\n window.OnVoardData['page_type'] = 'collection';\n return;\n }\n\n if (paths.length > 0 && paths.slice(-1)[0] === 'checkout') {\n window.OnVoardData['page_type'] = 'checkout';\n return;\n }\n}\n\nexport function getCheckoutUrl() {\n let cart = window.OnVoardData.cart;\n if (!cart || !cart.cartId) return;\n\n let params = {\n \"a11y\": true,\n \"cartId\": cart.cartId,\n \"storeUrl\": wixEmbedsAPI.getExternalBaseUrl(),\n \"isFastFlow\": false,\n \"isPickupFlow\": false,\n \"cashierPaymentId\": \"\",\n \"origin\": \"shopping cart\",\n \"originType\": \"addToCart\"\n };\n\n let appSectionParams = encodeURIComponent(JSON.stringify(params));\n return `/checkout?appSectionParams=${appSectionParams}`;\n}\n\nexport function updateCheckoutRoute() {\n let checkoutUrl = getCheckoutUrl();\n if (!checkoutUrl) return;\n if (!window.OnVoardData['routes']) return;\n window.OnVoardData['routes']['checkout'] = checkoutUrl;\n}\n\nexport function initRoutes() {\n let routes = window.OnVoardData.routes || {};\n routes['cart'] = '/cart';\n\n let payload = extractViewerModel();\n if (payload) {\n let payloadRoutes = get(payload, 'siteFeaturesConfigs.router.routes') || {};\n\n // cartUrl\n let cartUrl = '';\n if (payloadRoutes['./cart']) cartUrl = '/cart';\n if (!cartUrl && payloadRoutes['./cart-page']) cartUrl = '/cart-page';\n if (!cartUrl && payloadRoutes['./shopping-cart']) cartUrl = '/shopping-cart';\n\n // find route with \"cart\"\n if (!cartUrl) {\n utils.loopObject(payloadRoutes, (key, value) => {\n if (cartUrl) return;\n if (key.includes(\"cart\")) cartUrl = key.slice(1);\n })\n }\n\n if (cartUrl) routes['cart'] = cartUrl;\n }\n\n let checkoutUrl = getCheckoutUrl();\n if (checkoutUrl) routes['checkout'] = checkoutUrl;\n\n window.OnVoardData['routes'] = routes;\n}\n\n// only works for initial pageload\nexport function initProductData() {\n if (window.OnVoardData['page_type'] !== \"product\") return;\n let el = document.querySelector(\"#wix-warmup-data\");\n if (!el) return;\n\n let innerText = el.innerText;\n let payload = {};\n try {\n payload = JSON.parse(innerText);\n } catch(e) {\n return;\n }\n\n if (!payload) return;\n let appsWarmupData = payload.appsWarmupData;\n if (!appsWarmupData) return;\n\n let storeData = appsWarmupData['1380b703-ce81-ff05-f115-39571d94dfcd'];\n if (!storeData) return;\n\n let productPage = null;\n Object.keys(storeData).forEach((key) => {\n if (key.startsWith(\"productPage\")) {\n productPage = storeData[key];\n }\n });\n\n if (!productPage) return;\n window.OnVoardData['product'] = productPage['catalog']['product'];\n}\n\nexport function getMemberApiParameters() {\n let dynamicModel = window.OnVoardData['dynamicModel'];\n let payload = extractViewerModel();\n if (!payload) return;\n\n let smToken = get(payload, 'siteFeaturesConfigs.siteMembers.smToken', '');\n if (!smToken) smToken = get(dynamicModel, 'smToken', '');\n\n let params = {};\n params['smToken'] = smToken;\n params['collectionId'] = get(payload, 'siteFeaturesConfigs.siteMembers.smcollectionId', '');\n params['metaSiteId'] = get(payload, 'site.metaSiteId', '');\n return params;\n}\n\nexport function fetchMemberData(callback) {\n let params = getMemberApiParameters();\n\n if (!params) return;\n if (!params['smToken'] || !params['collectionId']) return;\n\n let smToken = params['smToken'];\n let collectionId = params['collectionId'];\n let metaSiteId = params['metaSiteId'];\n\n let path = `/_api/wix-sm-webapp/member/${smToken}?collectionId=${collectionId}&metaSiteId=${metaSiteId}`;\n fetch(wixEmbedsAPI.getExternalBaseUrl() + path, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n .then(res => res.json())\n .then(json => {\n const memberData = json.payload;\n if (!memberData) return;\n window.OnVoardData['member'] = memberData;\n if (callback) callback();\n });\n}\n\nexport function loadDynamicModel(callback) {\n fetch(\"/_api/v2/dynamicmodel\", {\n method: 'GET'\n })\n .then(res => res.json())\n .then(json => {\n window.OnVoardData['dynamicModel'] = json;\n if (callback) callback();\n });\n}\n\nexport function getCartAuthorization() {\n let dynamicModel = window.OnVoardData['dynamicModel'];\n if (!dynamicModel) {\n loadDynamicModel();\n return;\n }\n\n let authorization = get(dynamicModel, 'apps.1380b703-ce81-ff05-f115-39571d94dfcd.instance') || null;\n return authorization;\n}\n\nfunction waitUntilCartAuthorizationReady(callback) {\n let interval = 0;\n let authorization = null;\n let handle = window.setInterval(() => {\n if (interval > 1000*15) {\n clearInterval(handle);\n return;\n }\n\n authorization = getCartAuthorization();\n if (authorization) {\n clearInterval(handle);\n callback();\n return;\n }\n\n interval += 200;\n }, 200);\n}\n\nexport function fetchProductData(params) {\n if (!isWixStore()) return;\n\n let callback = params['callback'];\n let currency = params['currency'];\n\n // get product slug\n let paths = decodeURI(window.location.pathname).split(\"/\");\n let slug = paths.slice(-1)[0];\n if (!slug) return;\n\n let xsfrToken = utils.getCookie('XSRF-TOKEN');\n if (!xsfrToken) return;\n\n waitUntilCartAuthorizationReady(() => {\n let authorization = getCartAuthorization();\n if (!authorization) return;\n\n let path = wixEmbedsAPI.getExternalBaseUrl() + `/_api/wix-ecommerce-storefront-web/api?o=getProductBySlug&s=WixStoresWebClient&q=query,getProductBySlug($externalId:String!,$slug:String!,$withPriceRange:Boolean,=,false){appSettings(externalId:$externalId){widgetSettings}catalog{product(slug:$slug,onlyVisible:true){id,description,isVisible,sku,ribbon,brand,price,comparePrice,discountedPrice,formattedPrice,formattedComparePrice,formattedDiscountedPrice,pricePerUnit,formattedPricePerUnit,pricePerUnitData{baseQuantity,baseMeasurementUnit}seoTitle,seoDescription,createVersion,digitalProductFileItems{fileId,fileType,fileName}productItems(withDefaultVariant:true){id,price,comparePrice,formattedPrice,formattedComparePrice,pricePerUnit,formattedPricePerUnit,optionsSelections,isVisible,availableForPreOrder,inventory{status,quantity}sku,weight,surcharge,subscriptionPlans{list{id,price,formattedPrice,pricePerUnit,formattedPricePerUnit}}}name,isTrackingInventory,inventory{status,quantity,availableForPreOrder,preOrderInfoView{message,preOrder,limit}}isVisible,isManageProductItems,productItemsPreOrderAvailability,isInStock,media{id,url,fullUrl,altText,thumbnailFullUrl:fullUrl(width:50,height:50),mediaType,videoType,videoFiles{url,width,height,format,quality}width,height,index,title}customTextFields{key,title,isMandatory,inputLimit}nextOptionsSelectionId,options{id,title,optionType,key,selections{id,value,description,key,linkedMediaItems{altText,url,fullUrl,thumbnailFullUrl:fullUrl(width:50,height:50),mediaType,width,height,index,title,videoFiles{url,width,height,format,quality}}}}productType,urlPart,additionalInfo{id,title,description,index}subscriptionPlans{list(onlyVisible:true){id,name,tagline,frequency,interval,duration,price,formattedPrice,pricePerUnit,formattedPricePerUnit}oneTimePurchase{index}}priceRange(withSubscriptionPriceRange:true),@include(if:$withPriceRange){fromPriceFormatted}discount{mode,value}currency,weight,seoJson}}}&v=`;\n\n let v = {\"slug\":slug,\"externalId\":\"\",\"withPriceRange\":false};\n path += encodeURIComponent(JSON.stringify(v));\n\n let headers = {};\n headers['Content-Type'] = 'application/json';\n headers['Authorization'] = authorization;\n headers['X-XSRF-TOKEN'] = xsfrToken;\n if (currency) headers['x-wix-currency'] = currency;\n\n fetch(path, {\n method: 'GET',\n headers: headers,\n })\n .then(res => res.json())\n .then(json => {\n const productData = get(json, 'data.catalog.product', {}) || {};\n window.OnVoardData['product'] = productData;\n callback();\n });\n });\n}\n\nexport function fetchProductBySlug(params) {\n if (!isWixStore()) return;\n\n let slug = params['slug'];\n let callback = params['callback'];\n let currency = params['currency'];\n\n let xsfrToken = utils.getCookie('XSRF-TOKEN');\n if (!xsfrToken) return;\n\n waitUntilCartAuthorizationReady(() => {\n let authorization = getCartAuthorization();\n if (!authorization) return;\n\n let path = wixEmbedsAPI.getExternalBaseUrl() + `/_api/wix-ecommerce-storefront-web/api?o=getProductBySlug&s=WixStoresWebClient&q=query,getProductBySlug($externalId:String!,$slug:String!,$withPriceRange:Boolean,=,false){appSettings(externalId:$externalId){widgetSettings}catalog{product(slug:$slug,onlyVisible:true){id,description,isVisible,sku,ribbon,brand,price,comparePrice,discountedPrice,formattedPrice,formattedComparePrice,formattedDiscountedPrice,pricePerUnit,formattedPricePerUnit,pricePerUnitData{baseQuantity,baseMeasurementUnit}seoTitle,seoDescription,createVersion,digitalProductFileItems{fileId,fileType,fileName}productItems(withDefaultVariant:true){id,price,comparePrice,formattedPrice,formattedComparePrice,pricePerUnit,formattedPricePerUnit,optionsSelections,isVisible,inventory{status,quantity}sku,weight,surcharge,subscriptionPlans{list{id,price,formattedPrice,pricePerUnit,formattedPricePerUnit}}}name,isTrackingInventory,inventory{status,quantity}isVisible,isManageProductItems,isInStock,media{id,url,fullUrl,altText,thumbnailFullUrl:fullUrl(width:50,height:50),mediaType,videoType,videoFiles{url,width,height,format,quality}width,height,index,title}customTextFields{key,title,isMandatory,inputLimit}nextOptionsSelectionId,options{id,title,optionType,key,selections{id,value,description,key,linkedMediaItems{altText,url,fullUrl,thumbnailFullUrl:fullUrl(width:50,height:50),mediaType,width,height,index,title,videoFiles{url,width,height,format,quality}}}}productType,urlPart,additionalInfo{id,title,description,index}subscriptionPlans{list(onlyVisible:true){id,name,tagline,frequency,duration,price,formattedPrice,pricePerUnit,formattedPricePerUnit}oneTimePurchase{index}}priceRange(withSubscriptionPriceRange:true),@include(if:$withPriceRange){fromPriceFormatted}discount{mode,value}currency,weight,seoJson}}}&v=`;\n\n let v = {\"slug\":slug,\"externalId\":\"\",\"withPriceRange\":false};\n path += encodeURIComponent(JSON.stringify(v));\n\n let headers = {};\n headers['Content-Type'] = 'application/json';\n headers['Authorization'] = authorization;\n headers['X-XSRF-TOKEN'] = xsfrToken;\n if (currency) headers['x-wix-currency'] = currency;\n\n fetch(path, {\n method: 'GET',\n headers: headers,\n })\n .then(res => res.json())\n .then(json => {\n const productData = get(json, 'data.catalog.product', {}) || {};\n callback(productData);\n });\n });\n}\n\n\nexport function fetchProductById(params) {\n if (!isWixStore()) return;\n\n let productId = params['productId'];\n let callback = params['callback'];\n let currency = params['currency'];\n\n let xsfrToken = utils.getCookie('XSRF-TOKEN');\n if (!xsfrToken) return;\n\n waitUntilCartAuthorizationReady(() => {\n let authorization = getCartAuthorization();\n if (!authorization) return;\n\n let query = `query getData(\n $externalId: String!\n $productId: String!\n ) {\n appSettings(externalId: $externalId) {\n widgetSettings\n }\n catalog {\n product(productId: $productId) {\n id\n description\n isVisible\n sku\n ribbon\n brand\n price\n comparePrice\n discountedPrice\n formattedPrice\n formattedComparePrice\n formattedDiscountedPrice\n pricePerUnit\n formattedPricePerUnit\n digitalProductFileItems {\n fileId\n fileType\n fileName\n }\n productItems(withDefaultVariant: true) {\n id\n price\n comparePrice\n formattedPrice\n formattedComparePrice\n pricePerUnit\n formattedPricePerUnit\n optionsSelections\n isVisible\n inventory {\n status\n quantity\n }\n sku\n weight\n surcharge\n }\n name\n isTrackingInventory\n inventory {\n status\n quantity\n }\n isVisible\n isManageProductItems\n isInStock\n media {\n id\n url\n fullUrl\n altText\n thumbnailFullUrl: fullUrl(width: 50, height: 50)\n width\n height\n index\n title\n }\n options {\n id\n title\n optionType\n key\n }\n productType\n urlPart\n }\n }\n }\n `;\n\n let headers = {};\n headers['Content-Type'] = 'application/json';\n headers['Authorization'] = authorization;\n headers['X-XSRF-TOKEN'] = xsfrToken;\n if (currency) headers['x-wix-currency'] = currency;\n\n fetch(wixEmbedsAPI.getExternalBaseUrl() + '/_api/wix-ecommerce-graphql-web/api', {\n method: 'POST',\n headers: headers,\n body: JSON.stringify({\n operationName: \"getData\",\n query: query,\n source: \"WixStoresWebClient\",\n variables: {\"externalId\":\"\",\"productId\": productId},\n }),\n })\n .then(res => res.json())\n .then(json => {\n const productData = get(json, 'data.catalog.product', {}) || {};\n callback(productData);\n });\n });\n}\n\nexport function fetchCartData(params) {\n if (!isWixStore()) return;\n\n let callback = params['callback'];\n let currency = params['currency'];\n\n let xsfrToken = utils.getCookie('XSRF-TOKEN');\n if (!xsfrToken) return;\n\n waitUntilCartAuthorizationReady(() => {\n let authorization = getCartAuthorization();\n if (!authorization) return;\n\n let query = `\n query getCart($locale: String!, $withTax: Boolean, $withShipping: Boolean) {\n cart {\n cartId\n storeId\n buyerNote\n items {\n cartItemId\n product {\n id\n productType\n urlPart\n weight\n name\n price\n comparePrice\n customTextFields {\n title\n value\n }\n media(limit: 1) {\n altText\n mediaType\n url\n height\n width\n }\n digitalProductFileItems {\n fileType\n }\n }\n optionsSelectionsValues {\n id\n title\n value\n }\n freeText {\n title\n value\n }\n sku\n quantity\n inventoryQuantity\n convertedPrices {\n formattedComparePrice\n formattedPrice\n formattedTotalPrice\n totalPrice\n formattedPriceBeforeDiscount\n price\n }\n formattedPriceBeforeDiscount\n discountRules {\n name\n }\n }\n appliedCoupon {\n discountValue\n convertedDiscountValue\n code\n couponId\n couponType\n name\n }\n currencyFormat {\n code\n }\n convertedCurrencyFormat {\n code\n }\n additionalFees {\n code\n name\n totalPrice\n formattedTotalPrice\n convertedFormattedTotalPrice\n }\n totals(withTax: $withTax, withShipping: $withShipping) {\n subTotal\n total\n shipping\n discount\n itemsTotal\n tax\n additionalFeesTotal\n formattedItemsTotal\n formattedSubTotal\n formattedShipping\n formattedDiscount\n formattedTax\n formattedAdditionalFeesTotal\n formattedTotal\n }\n convertedTotals(withTax: $withTax, withShipping: $withShipping) {\n subTotal\n total\n shipping\n discount\n itemsTotal\n tax\n additionalFeesTotal\n formattedItemsTotal\n formattedSubTotal\n formattedShipping\n formattedDiscount\n formattedTax\n formattedAdditionalFeesTotal\n formattedTotal\n }\n destination {\n country\n countryName(translateTo: $locale)\n subdivision\n subdivisionName(translateTo: $locale)\n zipCode\n }\n selectedShippingOption {\n id\n }\n shippingRuleInfo {\n status\n canShipToDestination\n shippingRule {\n id\n options {\n id\n title\n rate: convertedRate\n formattedRate: convertedFormattedRate\n deliveryTime\n pickupInfo {\n address {\n countryName(translateTo: $locale)\n subdivisionName(translateTo: $locale)\n addressLine\n city\n }\n pickupMethod\n }\n }\n }\n }\n destinationCompleteness\n minimumOrderAmount {\n reached\n diff\n value\n convertedDiff\n convertedValue\n formattedConvertedDiff\n formattedConvertedValue\n }\n }\n }\n `;\n\n let headers = {};\n headers['Content-Type'] = 'application/json';\n headers['Authorization'] = authorization;\n headers['X-XSRF-TOKEN'] = xsfrToken;\n if (currency) headers['x-wix-currency'] = currency;\n\n fetch(wixEmbedsAPI.getExternalBaseUrl() + '/_api/wixstores-graphql-server/graphql', {\n method: 'POST',\n headers: headers,\n body: JSON.stringify({\n operationName: \"getCart\",\n query: query,\n source: \"Init\",\n variables: {locale: \"en\", withShipping: false, withTax: false},\n }),\n })\n .then(res => res.json())\n .then(json => {\n const cartData = get(json, 'data.cart', {}) || {};\n window.OnVoardData['cart'] = cartData;\n updateCheckoutRoute();\n callback(cartData);\n });\n });\n}\n\nexport function addCartItem(param, successCallback, errorCallback) {\n if (!isWixStore()) return;\n\n let xsfrToken = utils.getCookie('XSRF-TOKEN');\n if (!xsfrToken) return;\n\n waitUntilCartAuthorizationReady(() => {\n let authorization = getCartAuthorization();\n if (!authorization) return;\n\n let query = `mutation addToCart($params: [AddToCartInput!]) {\n cart {\n addToCart(params: $params) {\n\n errors {\n code\n commandName\n message\n field\n }\n cart {\n cartId\n storeId\n buyerNote\n items {\n cartItemId\n convertedFormattedComparePrice\n convertedFormattedPrice\n convertedFormattedTotalPrice\n convertedPrices {\n comparePrice\n formattedComparePrice\n formattedPrice\n formattedTotalPrice\n price\n totalPrice\n }\n product {\n comparePrice\n convertedComparePrice\n convertedPrice\n customTextFields {\n title\n value\n }\n id\n productType\n urlPart\n name\n pageUrl\n price\n sku\n weight\n media(limit: 1) {\n altText\n mediaType\n url\n height\n width\n }\n digitalProductFileItems {\n fileType\n }\n }\n optionsSelectionsValues {\n id\n title\n value\n }\n convertedTotalPrice\n sku\n quantity\n inventoryQuantity\n formattedComparePrice\n formattedPrice\n formattedTotalPrice\n totalPrice\n }\n }\n }\n }\n }`;\n\n fetch(wixEmbedsAPI.getExternalBaseUrl() + '/_api/wixstores-graphql-server/graphql', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': authorization,\n 'X-XSRF-TOKEN': xsfrToken\n },\n body: JSON.stringify({\n operationName: \"addToCart\",\n query: query,\n source: \"WixStoresWebClient\",\n variables: {\n \"params\": [param]\n },\n }),\n })\n .then(res => res.json())\n .then(json => {\n successCallback(json);\n })\n .catch((error) => {\n errorCallback(error);\n });\n });\n}\n\nfunction htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n}\n\nfunction decodeAppScripts(input) {\n let output = null;\n\n try {\n output = JSON.parse(htmlDecode(input));\n } catch (error) {\n console.error(error);\n }\n\n return output;\n}\n\nfunction shouldReplaceAppScripts(curAppScripts, newAppScripts) {\n if (!curAppScripts || !curAppScripts.ts) return true;\n if (curAppScripts.ts && newAppScripts.ts) {\n if (newAppScripts.ts > curAppScripts.ts) return true;\n }\n\n return false;\n}\n\nfunction mergeAppScripts(curAppScripts, newAppScripts) {\n utils.loopObject(newAppScripts, (key, value) => {\n if (key in curAppScripts) return;\n curAppScripts[key] = value;\n })\n\n return curAppScripts;\n}\n\nfunction getAppScripts() {\n let appScripts = {};\n\n if (window.OnVoardData[\"app_scripts\"]) {\n appScripts = decodeAppScripts(window.OnVoardData[\"app_scripts\"]);\n }\n\n if (window.OV_MARKETING_PLATFORM_APP_SCRIPTS) {\n let mpScripts = decodeAppScripts(window.OV_MARKETING_PLATFORM_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, mpScripts);\n }\n\n if (window.OV_AOV_PROGRESS_BAR_APP_SCRIPTS) {\n let aovProgressBarScripts = decodeAppScripts(window.OV_AOV_PROGRESS_BAR_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, aovProgressBarScripts);\n }\n\n if (window.OV_BACK_IN_STOCK_APP_SCRIPTS) {\n let backInStockScripts = decodeAppScripts(window.OV_BACK_IN_STOCK_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, backInStockScripts);\n }\n\n if (window.OV_REVIEWS_APP_SCRIPTS) {\n let reviewsScripts = decodeAppScripts(window.OV_REVIEWS_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, reviewsScripts);\n }\n\n if (window.OV_PROMPT_APP_SCRIPTS) {\n let promptScripts = decodeAppScripts(window.OV_PROMPT_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, promptScripts);\n }\n\n if (window.OV_RECOMMENDER_APP_SCRIPTS) {\n let recommenderScripts = decodeAppScripts(window.OV_RECOMMENDER_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, recommenderScripts);\n }\n\n if (window.OV_REPERKS_APP_SCRIPTS) {\n let reperksScripts = decodeAppScripts(window.OV_REPERKS_APP_SCRIPTS);\n appScripts = mergeAppScripts(appScripts, reperksScripts);\n }\n\n return appScripts;\n}\n\nexport function provisionAppScripts() {\n let appScripts = getAppScripts();\n if (!appScripts) return;\n let pageId = wixEmbedsAPI.getCurrentPageInfo().id;\n\n // webtracking\n let wt = appScripts.web_tracking;\n if (wt && wt.token) {\n let ovWtDiv = document.querySelector('.ov-app-web-tracking');\n if (!ovWtDiv) {\n ovWtDiv = document.createElement(\"div\");\n ovWtDiv.setAttribute(\"class\", \"ov-app ov-app-web-tracking\");\n ovWtDiv.setAttribute(\"data-app\", \"web-tracking\");\n ovWtDiv.setAttribute(\"data-token\", wt.token);\n document.body.appendChild(ovWtDiv);\n }\n\n if (wt.auto_track) {\n ovWtDiv = document.querySelector('.ov-app-web-tracking-wix');\n if (!ovWtDiv) {\n ovWtDiv = document.createElement(\"div\");\n ovWtDiv.setAttribute(\"class\", \"ov-app ov-app-web-tracking-wix\");\n ovWtDiv.setAttribute(\"data-app\", \"web-tracking-wix\");\n document.body.appendChild(ovWtDiv);\n }\n\n OnVoard(\"web_tracking_wix\", \"identify\", window.OnVoardData);\n\n if (wt.track_checkout_started) {\n OnVoard(\"web_tracking_wix\", \"trackCheckoutStarted\", window.OnVoardData);\n }\n\n if (wt.track_product_viewed) {\n OnVoard(\"web_tracking_wix\", \"trackProductViewed\", window.OnVoardData);\n }\n\n if (wt.track_cart_item_added) {\n OnVoard(\"web_tracking_wix\", \"trackCartItemAdded\", window.OnVoardData);\n }\n }\n }\n\n // prompt\n let prompt = appScripts.prompt;\n if (prompt && prompt.footer) {\n let promptEl = document.querySelector('.ov-app-prompt');\n if (!promptEl) {\n promptEl = document.createElement(\"div\");\n promptEl.setAttribute(\"class\", \"ov-app ov-app-prompt\");\n promptEl.setAttribute(\"data-app\", \"prompt\");\n promptEl.setAttribute(\"data-account-id\", prompt.footer.account_id);\n document.body.appendChild(promptEl);\n }\n }\n\n // reperks widget\n let reperksWidget = appScripts.reperks_widget;\n if (reperksWidget && reperksWidget.global) {\n let reperksWidgetEl = document.querySelector('.ov-app-reperks-widget');\n if (!reperksWidgetEl) {\n reperksWidgetEl = document.createElement(\"div\");\n reperksWidgetEl.setAttribute(\"class\", \"ov-app ov-app-reperks-widget\");\n reperksWidgetEl.setAttribute(\"data-app\", \"reperks-widget\");\n reperksWidgetEl.setAttribute(\"data-app-id\", reperksWidget.global.id);\n document.body.appendChild(reperksWidgetEl);\n }\n }\n\n // aov progress bar\n let aov = appScripts.aov_progress_bar;\n let aovEl = null;\n\n if (aov) {\n aov.product_button.forEach((row) => {\n aovEl = document.querySelector(`ov-app-aov-progress-bar[data-app-id=\"${row.id}\"]`);\n if (aovEl) return;\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n let btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='buy-now-button']\");\n if (!btnEl) {\n btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='add-to-cart']\");\n }\n\n if (!btnEl) return;\n let referenceNode = btnEl.parentElement;\n\n aovEl = document.createElement(\"div\");\n aovEl.setAttribute(\"class\", \"ov-app ov-app-aov-progress-bar\");\n aovEl.setAttribute(\"data-app\", \"aov-progress-bar\");\n aovEl.setAttribute(\"data-app-id\", row.id);\n aovEl.setAttribute(\"data-placement-mode\", row.placement);\n referenceNode.parentNode.insertBefore(aovEl, referenceNode.nextSibling);\n })\n\n aov.product_bottom.forEach((row) => {\n aovEl = document.querySelector(`ov-app-aov-progress-bar[data-app-id=\"${row.id}\"]`);\n if (aovEl) return;\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n aovEl = document.createElement(\"div\");\n aovEl.setAttribute(\"class\", \"ov-app ov-app-aov-progress-bar\");\n aovEl.setAttribute(\"data-app\", \"aov-progress-bar\");\n aovEl.setAttribute(\"data-app-id\", row.id);\n aovEl.setAttribute(\"data-placement-mode\", row.placement);\n document.body.appendChild(aovEl);\n })\n }\n\n // reviews widget\n let rw = appScripts.reviews_widget;\n let rwEl = null;\n\n if (rw) {\n rw.product_bottom.forEach((row) => {\n rwEl = document.querySelector(`ov-app-reviews-widget[data-app-id=\"${row.id}\"]`);\n if (rwEl) return;\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n let productEl = document.querySelector(\"[data-hook='product-page']\");\n if (!productEl) return;\n\n rwEl = document.createElement(\"div\");\n rwEl.setAttribute(\"class\", \"ov-app ov-app-reviews-widget\");\n rwEl.setAttribute(\"data-app\", \"reviews-widget\");\n rwEl.setAttribute(\"data-app-id\", row.id);\n rwEl.setAttribute(\"data-product-external-id\", window.OnVoardData.product.id);\n rwEl.setAttribute(\"data-placement-mode\", row.placement);\n productEl.appendChild(rwEl);\n })\n }\n\n\n // star rating\n let sr = appScripts.star_rating;\n let srEl = null;\n\n if (sr) {\n sr.product_title.forEach((row) => {\n srEl = document.querySelector(`ov-app-star-rating[data-app-id=\"${row.id}\"]`);\n if (srEl) return;\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n let titleEl = document.querySelector(\"[data-hook='product-page'] [data-hook='product-title']\");\n if (!titleEl) return;\n let referenceNode = titleEl.parentElement;\n\n srEl = document.createElement(\"div\");\n srEl.setAttribute(\"class\", \"ov-app ov-app-star-rating\");\n srEl.setAttribute(\"data-app\", \"star-rating\");\n srEl.setAttribute(\"data-app-id\", row.id);\n srEl.setAttribute(\"data-product-external-id\", window.OnVoardData.product.id);\n srEl.setAttribute(\"data-placement-mode\", row.placement);\n referenceNode.parentNode.insertBefore(srEl, referenceNode.nextSibling);\n })\n\n sr.product_bottom.forEach((row) => {\n srEl = document.querySelector(`ov-app-star-rating[data-app-id=\"${row.id}\"]`);\n if (srEl) return;\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n srEl = document.createElement(\"div\");\n srEl.setAttribute(\"class\", \"ov-app ov-app-star-rating\");\n srEl.setAttribute(\"data-app\", \"star-rating\");\n srEl.setAttribute(\"data-app-id\", row.id);\n srEl.setAttribute(\"data-product-external-id\", window.OnVoardData.product.id);\n srEl.setAttribute(\"data-placement-mode\", row.placement);\n document.body.appendChild(srEl);\n })\n\n let attachStarRatingToProduct = (productsMapper, row) => {\n if (!productsMapper) return;\n\n let nodeList = document.querySelectorAll(`#SITE_PAGES #${pageId} [data-hook='product-list'] [data-hook='product-list-grid-item']`);\n nodeList.forEach((el) => {\n const ahrefEl = el.querySelector(`a[data-hook='product-item-container']`);\n if (!ahrefEl) return;\n\n let href = ahrefEl.getAttribute('href');\n let paths = href.split(\"/\");\n let slug = paths.slice(-1)[0];\n if (!slug) return;\n\n let product = productsMapper[slug];\n if (!product) return;\n\n const titleEl = el.querySelector(`[data-hook='product-item-name']`);\n if (!titleEl) return;\n\n // exclude duplicates\n srEl = el.querySelector(`.ov-app-star-rating`);\n if (srEl) return;\n\n srEl = document.createElement(\"div\");\n srEl.setAttribute(\"class\", \"ov-app ov-app-star-rating\");\n srEl.setAttribute(\"data-app\", \"star-rating\");\n srEl.setAttribute(\"data-app-id\", row.id);\n srEl.setAttribute(\"data-product-external-id\", product.id);\n srEl.setAttribute(\"data-placement-mode\", row.placement);\n titleEl.parentNode.insertBefore(srEl, titleEl.nextSibling);\n })\n };\n\n if (sr.collection_product) {\n sr.collection_product.forEach((row) => {\n attachStarRatingToProduct(window.OnVoardData['collection_products'], row);\n });\n }\n\n if (sr.home_product) {\n sr.home_product.forEach((row) => {\n attachStarRatingToProduct(window.OnVoardData['home_products'], row);\n });\n }\n }\n\n // back-in-stock\n let bis = appScripts.back_in_stock;\n let bisEl = null;\n\n if (bis) {\n let bisFloatingBtn = bis.floating_button;\n let bisInlineBtn = bis.inline_button;\n let bisInlineText = bis.inline_text;\n let bisInlineForm = bis.inline_form;\n\n if (bis.global) {\n bisEl = document.querySelector('.ov-app-back-in-stock');\n if (!bisEl) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock\");\n bisEl.setAttribute(\"data-app-id\", bis.global.id);\n document.body.appendChild(bisEl);\n }\n }\n\n if (bisFloatingBtn && bisFloatingBtn.product_bottom) {\n bisEl = document.querySelector('.ov-app-back-in-stock-floating-button');\n if (!bisEl) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-floating-button\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-floating-button\");\n bisEl.setAttribute(\"data-app-id\", bisFloatingBtn.product_bottom.id);\n bisEl.setAttribute(\"data-placement-mode\", bisFloatingBtn.product_bottom.placement);\n document.body.appendChild(bisEl);\n }\n }\n\n if (bisInlineBtn) {\n if (bisInlineBtn.product_button) {\n bisEl = document.querySelector('.ov-app-back-in-stock-inline-button');\n if (!bisEl) {\n let referenceNode = null;\n let btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='buy-now-button']\");\n if (!btnEl) btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='add-to-cart']\");\n if (btnEl) referenceNode = btnEl.parentElement;\n\n if (!referenceNode) referenceNode = document.querySelector(\"[data-hook='product-page'] [data-hook='product-options']\");\n if (referenceNode) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-inline-button\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-inline-button\");\n bisEl.setAttribute(\"data-app-id\", bisInlineBtn.product_button.id);\n bisEl.setAttribute(\"data-placement-mode\", bisInlineBtn.product_button.placement);\n referenceNode.parentNode.insertBefore(bisEl, referenceNode.nextSibling);\n }\n }\n }\n\n if (bisInlineBtn.product_bottom) {\n bisEl = document.querySelector('.ov-app-back-in-stock-inline-button');\n if (!bisEl) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-inline-button\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-inline-button\");\n bisEl.setAttribute(\"data-app-id\", bisInlineBtn.product_bottom.id);\n bisEl.setAttribute(\"data-placement-mode\", bisInlineBtn.product_bottom.placement);\n document.body.appendChild(bisEl);\n }\n }\n }\n\n if (bisInlineText) {\n if (bisInlineText.product_button) {\n bisEl = document.querySelector('.ov-app-back-in-stock-inline-text');\n if (!bisEl) {\n let referenceNode = null;\n let btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='buy-now-button']\");\n if (!btnEl) btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='add-to-cart']\");\n if (btnEl) referenceNode = btnEl.parentElement;\n\n if (!referenceNode) referenceNode = document.querySelector(\"[data-hook='product-page'] [data-hook='product-options']\");\n if (referenceNode) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-inline-text\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-inline-text\");\n bisEl.setAttribute(\"data-app-id\", bisInlineText.product_button.id);\n bisEl.setAttribute(\"data-placement-mode\", bisInlineText.product_button.placement);\n referenceNode.parentNode.insertBefore(bisEl, referenceNode.nextSibling);\n }\n }\n }\n\n if (bisInlineText.product_bottom) {\n bisEl = document.querySelector('.ov-app-back-in-stock-inline-text');\n if (!bisEl) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-inline-text\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-inline-text\");\n bisEl.setAttribute(\"data-app-id\", bisInlineText.product_bottom.id);\n bisEl.setAttribute(\"data-placement-mode\", bisInlineText.product_bottom.placement);\n document.body.appendChild(bisEl);\n }\n }\n }\n\n if (bisInlineForm) {\n if (bisInlineForm.product_button) {\n bisEl = document.querySelector('.ov-app-back-in-stock-inline-form');\n if (!bisEl) {\n let referenceNode = null;\n let btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='buy-now-button']\");\n if (!btnEl) btnEl = document.querySelector(\"[data-hook='product-page'] [data-hook='add-to-cart']\");\n if (btnEl) referenceNode = btnEl.parentElement;\n\n if (!referenceNode) referenceNode = document.querySelector(\"[data-hook='product-page'] [data-hook='product-options']\");\n if (referenceNode) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-inline-form\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-inline-form\");\n bisEl.setAttribute(\"data-app-id\", bisInlineForm.product_button.id);\n bisEl.setAttribute(\"data-placement-mode\", bisInlineForm.product_button.placement);\n referenceNode.parentNode.insertBefore(bisEl, referenceNode.nextSibling);\n }\n }\n }\n\n if (bisInlineForm.product_bottom) {\n bisEl = document.querySelector('.ov-app-back-in-stock-inline-form');\n if (!bisEl) {\n bisEl = document.createElement(\"div\");\n bisEl.setAttribute(\"class\", \"ov-app ov-app-back-in-stock-inline-form\");\n bisEl.setAttribute(\"data-app\", \"back-in-stock-inline-form\");\n bisEl.setAttribute(\"data-app-id\", bisInlineForm.product_bottom.id);\n bisEl.setAttribute(\"data-placement-mode\", bisInlineForm.product_bottom.placement);\n document.body.appendChild(bisEl);\n }\n }\n }\n\n }\n\n // recommender\n let recommender = appScripts.recommender;\n let recommenderEl = null;\n\n if (recommender) {\n if (recommender.tracking) {\n recommenderEl = document.querySelector('.ov-app-recommender-tracking');\n if (!recommenderEl) {\n recommenderEl = document.createElement(\"div\");\n recommenderEl.setAttribute(\"class\", \"ov-app ov-app-recommender-tracking\");\n recommenderEl.setAttribute(\"data-app\", \"recommender-tracking\");\n recommenderEl.setAttribute(\"data-account-id\", recommender.tracking.account_id);\n document.body.appendChild(recommenderEl);\n }\n }\n\n recommender.home_bottom.forEach((row) => {\n recommenderEl = document.querySelector(`ov-app-recommender[data-app-id=\"${row.id}\"]`);\n if (recommenderEl) return;\n if (window.OnVoardData['page_type'] !== 'home') return;\n\n let pageEl = document.querySelector(\"#SITE_PAGES\");\n if (!pageEl) return;\n\n recommenderEl = document.createElement(\"div\");\n recommenderEl.setAttribute(\"class\", \"ov-app ov-app-recommender\");\n recommenderEl.setAttribute(\"data-app\", \"recommender\");\n recommenderEl.setAttribute(\"data-app-id\", row.id);\n recommenderEl.setAttribute(\"data-placement-mode\", row.placement);\n pageEl.appendChild(recommenderEl);\n })\n\n recommender.cart_bottom.forEach((row) => {\n recommenderEl = document.querySelector(`ov-app-recommender[data-app-id=\"${row.id}\"]`);\n if (recommenderEl) return;\n if (window.OnVoardData['page_type'] !== 'cart') return;\n\n let cartEl = document.querySelector(\"[data-hook='CartAppDataHook.root']\");\n if (!cartEl) return;\n\n recommenderEl = document.createElement(\"div\");\n recommenderEl.setAttribute(\"class\", \"ov-app ov-app-recommender\");\n recommenderEl.setAttribute(\"data-app\", \"recommender\");\n recommenderEl.setAttribute(\"data-app-id\", row.id);\n recommenderEl.setAttribute(\"data-placement-mode\", row.placement);\n document.body.appendChild(recommenderEl);\n cartEl.appendChild(recommenderEl);\n })\n\n recommender.collection_bottom.forEach((row) => {\n recommenderEl = document.querySelector(`ov-app-recommender[data-app-id=\"${row.id}\"]`);\n if (recommenderEl) return;\n if (window.OnVoardData['page_type'] !== 'collection') return;\n\n let pageEl = document.querySelector(\"#SITE_PAGES\");\n if (!pageEl) return;\n\n recommenderEl = document.createElement(\"div\");\n recommenderEl.setAttribute(\"class\", \"ov-app ov-app-recommender\");\n recommenderEl.setAttribute(\"data-app\", \"recommender\");\n recommenderEl.setAttribute(\"data-app-id\", row.id);\n recommenderEl.setAttribute(\"data-placement-mode\", row.placement);\n pageEl.appendChild(recommenderEl);\n })\n\n recommender.product_bottom.forEach((row) => {\n recommenderEl = document.querySelector(`ov-app-recommender[data-app-id=\"${row.id}\"]`);\n if (recommenderEl) return;\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n let productEl = document.querySelector(\"[data-hook='product-page']\");\n if (!productEl) return;\n\n recommenderEl = document.createElement(\"div\");\n recommenderEl.setAttribute(\"class\", \"ov-app ov-app-recommender\");\n recommenderEl.setAttribute(\"data-app\", \"recommender\");\n recommenderEl.setAttribute(\"data-app-id\", row.id);\n recommenderEl.setAttribute(\"data-placement-mode\", row.placement);\n productEl.appendChild(recommenderEl);\n })\n }\n}\n\nexport function fetchProductsForGrid(params) {\n let callback = params['callback'];\n let pageId = wixEmbedsAPI.getCurrentPageInfo().id;\n let nodeList = document.querySelectorAll(`#SITE_PAGES #${pageId} [data-hook='product-list'] [data-hook='product-list-grid-item']`);\n let mapper = {};\n let numRequests = 0;\n let pageType = window.OnVoardData['page_type'];\n\n nodeList.forEach((el) => {\n const ahrefEl = el.querySelector(`a[data-hook='product-item-container']`);\n if (!ahrefEl) return;\n\n let href = ahrefEl.getAttribute('href');\n let paths = href.split(\"/\");\n let slug = paths.slice(-1)[0];\n if (!slug) return;\n\n let fetchCallback = (productData) => {\n mapper[slug] = productData;\n };\n\n fetchProductBySlug({\n slug: slug,\n callback: fetchCallback,\n });\n\n numRequests += 1;\n })\n\n // wait until requests complete\n let interval = 0;\n let handle = window.setInterval(() => {\n if (interval > 1000*10) {\n clearInterval(handle);\n return;\n }\n\n if (Object.keys(mapper).length >= numRequests) {\n clearInterval(handle);\n\n if (pageType === 'collection') window.OnVoardData['collection_products'] = mapper;\n if (pageType === 'home') window.OnVoardData['home_products'] = mapper;\n callback()\n return;\n }\n\n interval += 100;\n }, 100);\n}\n\nfunction shouldLoadProducts() {\n if (window.OnVoardData['load_collection_products']) return true;\n\n let appScripts = getAppScripts();\n if (appScripts) {\n let sr = appScripts.star_rating;\n if (sr && sr.collection_product && sr.collection_product.length > 0) return true;\n if (sr && sr.home_product && sr.home_product.length > 0) return true;\n }\n\n return false;\n}\n\nexport function onVariantChange(showWidgetsCallback) {\n let product = window.OnVoardData['product'];\n if (!product.isManageProductItems) return;\n\n let selectedChoices = window.OnVoardData['selected_product_choices'];\n if (!selectedChoices) return;\n\n let optionsSelections = [];\n product.options.forEach((option) => {\n option.selections.forEach((selection) => {\n selection['optionKey'] = option.key;\n optionsSelections.push(selection);\n })\n })\n\n product.productItems.forEach((item) => {\n let itemChoices = {}\n item.optionsSelections.forEach((selectionId, idx) => {\n let selection = optionsSelections.filter((row) => row.id === selectionId)[0];\n if (!selection) return;\n itemChoices[selection.optionKey] = selection.key;\n })\n\n if (!isEqual(selectedChoices, itemChoices)) return;\n if (0 >= item.inventory.quantity) {\n showWidgetsCallback(item);\n }\n })\n}\n\n\nexport function refreshBuiltInBackInStock() {\n // hide wix default back-in-stock\n let el = document.querySelector(\"[data-hook='product-page'] [data-hook='BackInStockButton.Root']\");\n if (el) {\n el.style.display = 'none';\n\n let cellEl = el.closest('.cell');\n if (cellEl) {\n cellEl.style.display = 'none';\n }\n\n return;\n }\n\n // has add cart\n el = document.querySelector(\"[data-hook='product-page'] [data-hook='add-to-cart']\");\n if (el) {\n let cellEl = el.closest('.cell');\n if (cellEl) {\n cellEl.style.display = 'flex';\n }\n }\n}\n\n\nfunction pageReset() {\n // remove OnVoard elements\n document.querySelectorAll(\".ov-app\").forEach((el) => el.remove());\n document.querySelectorAll(\".ov-modals\").forEach((el) => el.remove());\n\n window.OnVoardData['page_type'] = null;\n window.OnVoardData['product'] = null;\n window.OnVoardData['collection_products'] = null;\n window.OnVoardData['home_products'] = null;\n window.OnVoardData['selected_product_choices'] = null;\n}\n\nfunction cartReload() {\n if (!isWixStore()) return;\n\n import('common/cart-utils')\n .then((cartUtils) => {\n cartUtils.setupCartUpdateEvent();\n cartUtils.loadCart();\n });\n}\n\n\nexport function registerWixListener(loadScriptsCallback) {\n let refreshCallback = () => {\n provisionAppScripts();\n loadScriptsCallback();\n };\n\n let handlePageView = (data) => {\n let pageTypeIdentifier = data.pageTypeIdentifier;\n initPageType(pageTypeIdentifier);\n\n let pageType = window.OnVoardData['page_type'];\n if (pageType === 'product') {\n fetchProductData({callback: refreshCallback});\n return;\n }\n\n if (shouldLoadProducts()) {\n fetchProductsForGrid({callback: refreshCallback});\n return;\n }\n\n if ([\"cart\", \"checkout\"].includes(pageType)) {\n cartReload();\n }\n\n // load if cart is missing\n if (!window.OnVoardData['cart']) {\n cartReload();\n }\n\n refreshCallback();\n };\n\n\n let registerListener = () => {\n window.wixDevelopersAnalytics.register('552d8274-b6ec-4a52-abd2-ba974b5ed307', (eventName, data) => {\n if ([\"PageView\", \"productPageLoaded\"].includes(eventName)) {\n\n // `PageView` event won't be fired when hyperlinking from product A to product B (used in Recommender)\n // Hence, we are using `productPageLoaded` event to detect loading of product page\n if (eventName === \"PageView\" && data.pageTypeIdentifier === \"product_page\") return;\n if (eventName === \"productPageLoaded\") data.pageTypeIdentifier = \"product_page\";\n\n pageReset();\n handlePageView(data);\n }\n\n if ([\"AddProductImpression\"].includes(eventName)) {\n let pageType = window.OnVoardData['page_type'];\n\n if (shouldLoadProducts()) {\n fetchProductsForGrid({callback: refreshCallback});\n return;\n }\n }\n\n if ([\"AddToCart\", \"RemoveFromCart\"].includes(eventName)) {\n setTimeout(() => {\n cartReload();\n }, 500);\n }\n\n if (eventName === 'Purchase') {\n window.OnVoardData['purchase'] = data;\n }\n\n if (eventName === 'CustomEvent') {\n if (data.eventAction === 'Log in Success') {\n loadDynamicModel(() => {\n fetchMemberData(() => {\n document.dispatchEvent(new CustomEvent(\"ov_wix_login_success\", {detail: data}));\n });\n })\n }\n\n if (data.eventAction === 'Sign up Success') {\n loadDynamicModel(() => {\n fetchMemberData(() => {\n document.dispatchEvent(new CustomEvent(\"ov_wix_signup_success\", {detail: data}));\n });\n })\n }\n }\n })\n };\n\n window.wixDevelopersAnalytics ? registerListener() : window.addEventListener('wixDevelopersAnalyticsReady', registerListener);\n}\n\nexport function registerVariantChangeEvent() {\n document.addEventListener('click', (evt) => {\n let pageType = window.OnVoardData['page_type'];\n if (window.OnVoardData['page_type'] !== 'product') return;\n\n let choices = {};\n setTimeout(() => {\n let initialChoices = window.OnVoardData['selected_product_choices'];\n let nodeList = document.querySelectorAll(\"[data-hook='product-options-inputs'] > .cell\");\n nodeList.forEach((el) => {\n let isDropdown = el.querySelector(\"[data-hook='options-dropdown']\") ? true : false;\n let isColorPicker = el.querySelector(\"[data-hook='color-picker-item']\") ? true : false;\n\n if (!isDropdown && !isColorPicker) return;\n if (isDropdown) {\n let titleEl = el.querySelector(\"[data-hook='options-dropdown-title']\");\n if (!titleEl) return;\n let key = titleEl.innerText;\n\n let selectedEl = el.querySelector(\"[data-hook='dropdown-base-text']\");\n if (!selectedEl) return;\n let value = selectedEl.innerText;\n choices[key] = value;\n }\n\n if (isColorPicker) {\n let titleEl = el.querySelector(\"[data-hook='product-colors-title']\");\n if (!titleEl) return;\n let title = titleEl.innerText.trim();\n let titleGroup = title.split(\":\");\n\n let key = titleGroup.slice(0)[0];\n if (!key) return;\n key = key.trim();\n\n let value = titleGroup.slice(1)[0];\n if (!value) return;\n value = value.trim();\n choices[key] = value;\n }\n })\n\n let changed = !isEqual(initialChoices, choices);\n if (changed) {\n window.OnVoardData['selected_product_choices'] = choices;\n\n let event = new CustomEvent(\"ov_wix_variant_change\", {detail: choices});\n document.dispatchEvent(event);\n }\n }, 100);\n });\n\n // on variant change, re-attach scripts since wix may dynamically inject elements\n document.addEventListener('ov_wix_variant_change', (evt) => {\n let addEl = document.querySelector(\"[data-hook='product-page'] [data-hook='add-to-cart']\");\n if (addEl) {\n let referenceNode = addEl.parentElement;\n let parentNode = referenceNode.parentElement;\n\n let nodeList = parentNode.querySelectorAll(\".ov-app\");\n nodeList.forEach((el) => {\n parentNode.appendChild(el);\n })\n }\n });\n}\n\n\nexport function provision(loadScriptsCallback) {\n loadDynamicModel();\n initPageType();\n initRoutes();\n registerWixListener(loadScriptsCallback);\n registerVariantChangeEvent();\n fetchMemberData();\n cartReload();\n}\n"],"names":["extractViewerModel","el","document","querySelector","innerText","payload","JSON","parse","e","isWixStore","window","OnVoardData","get","getCurrency","URLSearchParams","location","search","initPageType","identifier","pageId","wixEmbedsAPI","getCurrentPageInfo","id","currentUrl","protocol","host","pathname","getExternalBaseUrl","paths","split","length","slice","getCheckoutUrl","cart","cartId","params","appSectionParams","encodeURIComponent","stringify","updateCheckoutRoute","checkoutUrl","initRoutes","routes","payloadRoutes","cartUrl","utils","key","value","includes","initProductData","appsWarmupData","storeData","productPage","Object","keys","forEach","startsWith","getMemberApiParameters","dynamicModel","smToken","fetchMemberData","callback","collectionId","metaSiteId","path","fetch","method","headers","then","res","json","memberData","loadDynamicModel","getCartAuthorization","waitUntilCartAuthorizationReady","interval","handle","setInterval","clearInterval","fetchProductData","currency","slug","decodeURI","xsfrToken","authorization","v","productData","fetchProductBySlug","fetchProductById","productId","body","operationName","query","source","variables","fetchCartData","locale","withShipping","withTax","cartData","addCartItem","param","successCallback","errorCallback","error","decodeAppScripts","input","output","DOMParser","parseFromString","documentElement","textContent","htmlDecode","console","mergeAppScripts","curAppScripts","newAppScripts","getAppScripts","appScripts","OV_MARKETING_PLATFORM_APP_SCRIPTS","OV_AOV_PROGRESS_BAR_APP_SCRIPTS","OV_BACK_IN_STOCK_APP_SCRIPTS","OV_REVIEWS_APP_SCRIPTS","OV_PROMPT_APP_SCRIPTS","OV_RECOMMENDER_APP_SCRIPTS","OV_REPERKS_APP_SCRIPTS","provisionAppScripts","wt","web_tracking","token","ovWtDiv","createElement","setAttribute","appendChild","auto_track","OnVoard","track_checkout_started","track_product_viewed","track_cart_item_added","prompt","footer","promptEl","account_id","reperksWidget","reperks_widget","global","reperksWidgetEl","aov","aov_progress_bar","aovEl","product_button","row","btnEl","referenceNode","parentElement","placement","parentNode","insertBefore","nextSibling","product_bottom","rw","reviews_widget","rwEl","productEl","product","sr","star_rating","srEl","product_title","titleEl","attachStarRatingToProduct","productsMapper","querySelectorAll","ahrefEl","getAttribute","collection_product","home_product","bis","back_in_stock","bisEl","bisFloatingBtn","floating_button","bisInlineBtn","inline_button","bisInlineText","inline_text","bisInlineForm","inline_form","recommender","recommenderEl","tracking","home_bottom","pageEl","cart_bottom","cartEl","collection_bottom","fetchProductsForGrid","nodeList","mapper","numRequests","pageType","shouldLoadProducts","onVariantChange","showWidgetsCallback","isManageProductItems","selectedChoices","optionsSelections","options","option","selections","selection","push","productItems","item","itemChoices","selectionId","idx","filter","optionKey","isEqual","inventory","quantity","refreshBuiltInBackInStock","style","display","cellEl","closest","cartReload","cartUtils","setupCartUpdateEvent","loadCart","registerWixListener","loadScriptsCallback","refreshCallback","registerListener","wixDevelopersAnalytics","register","eventName","data","pageTypeIdentifier","remove","handlePageView","setTimeout","eventAction","dispatchEvent","CustomEvent","detail","addEventListener","registerVariantChangeEvent","evt","choices","initialChoices","isDropdown","isColorPicker","selectedEl","titleGroup","trim","event","addEl","provision"],"sourceRoot":""}