{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/N07JJZfuMtyHijtiRRgH/vuWsYB4j3wQ8nbJ1MmZM/FC_ProductPrice.js", "ssg:https://framerusercontent.com/modules/DfixsupJND2Hhr1xcPbk/9PVLxh7oFkLRDHPOqbXb/FC_ProductPurchaseButton.js", "ssg:https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js", "ssg:https://framerusercontent.com/modules/D4TWeLfcxT6Tysr2BlYg/iZjmqdxVx1EOiM3k1FaW/useOnNavigationTargetChange.js", "ssg:https://framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js", "ssg:https://framerusercontent.com/modules/NQ9LlTfXzHTRhTTi6qMI/5u9VoSaQM7qxLI2scUcH/Loading.js"],
  "sourcesContent": ["/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * \u00A9 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useMemo,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";import{getLocaleFromCountry}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/N2GIWD1ik8HES3ASBGeD/locales.js\";// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};export default function FC_ProductPrice(props){const{shopifyProductID,canvasPrice,format:{showCurrency,showSymbol,showDecimals,currencyCode}={}}=props;const isBrowser=useIsBrowser();const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[subscriptionPrice,setSubscriptionPrice]=useState(null);const[selectedCurrency,setSelectedCurrency]=useState(\"\");const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[isLoadingPrice,setIsLoadingPrice]=useState(false);// Initialize currency and country code on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);// Handle variant changes\nconst handleVariantChange=async e=>{if(!e.detail){return;}setIsLoadingPrice(true);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Find the matching variant in the current product data\nconst matchingVariant=_matchingProduct.node?.variants?.edges?.find(({node})=>node.selectedOptions.every(option=>e.detail.selectedOptions.find(detailOption=>detailOption.name===option.name&&detailOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}catch(error){// Fallback to using the event detail directly\nsetActiveVariant(e.detail);}finally{setIsLoadingPrice(false);}};// Listen for currency changes\nuseEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=event=>{setIsLoadingPrice(true);const{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Preserve active variant selection if possible\nif(activeVariant){const matchingVariant=_matchingProduct.node.variants?.edges.find(({node})=>node.selectedOptions.every(option=>activeVariant.selectedOptions.find(activeOption=>activeOption.name===option.name&&activeOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,shopifyProductID,activeVariant,selectedCurrency,selectedCountryCode]);// Initial product load\nuseEffect(()=>{if(!isBrowser)return;const handleProductsReady=async e=>{if(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}setActiveVariant(_matchingProduct.node?.variants?.edges[0].node);}}};const loadProduct=async()=>{try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}setActiveVariant(_matchingProduct.node?.variants?.edges[0].node);}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}};loadProduct();// Add event listeners\ndocument.addEventListener(\"product__active-variant__changed\",handleVariantChange);document.addEventListener(\"data__products-ready\",handleProductsReady);// Cleanup\nreturn()=>{document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);document.removeEventListener(\"data__products-ready\",handleProductsReady);};},[isBrowser,shopifyProductID,selectedCurrency,selectedCountryCode]);// Add subscription price listener\nuseEffect(()=>{if(!isBrowser)return;const handleSubscriptionPriceUpdate=e=>{if(e.detail?.price){//console.log(\"selling plan event\", e.detail)\nsetSubscriptionPrice(e.detail.price);}else{setSubscriptionPrice(null);}};document.addEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);return()=>{document.removeEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);};},[isBrowser]);// Get currency formatting options at component level\nconst _currencyCode=useMemo(()=>{const variantCurrency=get(activeVariant,\"price.currencyCode\");const productCurrency=get(product,\"priceRange.minVariantPrice.currencyCode\");return variantCurrency||productCurrency||\"USD\";},[activeVariant,product]);const showMockValues=useMemo(()=>RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\"),[isBrowser]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Log browser user agent for debugging iOS-specific issues\n// if (isBrowser) {\n//     console.log(\"[FC_ProductPrice] Format debug:\", {\n//         userAgent: navigator.userAgent,\n//         isCurrencySymbolSameAsCode: symbolSameAsCode,\n//         currencyCode: currCode,\n//         selectedCountryCode,\n//         locale,\n//         showSymbol,\n//         showCurrency,\n//         showDecimals,\n//     })\n// }\n// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){const formattedNumber=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return formattedNumber;}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);if(!showCurrency){return`$${number}`// Just \"$50\" format\n;}else{return`$${number} USD`// \"$50 USD\" format\n;}}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nif(!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} USD`;}}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return`${currCode} ${number}`;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nreturn`${number} ${currCode}`;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} ${currCode}`;};const text=useMemo(()=>{if(!isBrowser)return\"\";// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){const price=canvasPrice||\"50.00\";const numericPrice=parseFloat(price);const currentCurrencyCode=currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);}// For live view, use the selected currency or preview currency\nconst amount=subscriptionPrice||(activeVariant?get(activeVariant,\"price.amount\"):get(product,\"priceRange.minVariantPrice.amount\"));if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);},[isBrowser,showMockValues,activeVariant,product,canvasPrice,showCurrency,showSymbol,currencyCode,showDecimals,selectedCurrency,subscriptionPrice,props.format]);const compareAtPrice=useMemo(()=>{const amount=activeVariant?get(activeVariant,\"compareAtPrice.amount\"):get(product,\"compareAtPriceRange.minVariantPrice.amount\");if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// Use the same formatting function as the main price\nreturn formatPriceWithOptions(numericPrice,currentCurrencyCode);},[activeVariant,product,currencyCode,showCurrency,showSymbol,showDecimals,selectedCurrency,showMockValues,props.format]);const numericValue=useMemo(()=>parseFloat(compareAtPrice.replace(/[^\\d.-]/g,\"\")),[compareAtPrice]);const hasValidCompareAtPrice=!isNaN(numericValue)&&numericValue>0;// console.log(\"Text\", text)\n// Price calculation logging\n// useEffect(() => {\n//     console.log(\"[FC_ProductPrice] Price State Update:\", {\n//         activeVariant,\n//         product,\n//         selectedCurrency,\n//         subscriptionPrice,\n//     })\n// }, [activeVariant, product, selectedCurrency, subscriptionPrice])\n// useEffect(() => {\n//     console.log(\"Active variant updated:\", activeVariant);\n// }, [activeVariant]);\n// Return placeholder during SSR\nif(!isBrowser){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-flex\"}});}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-flex\",whiteSpace:\"nowrap\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,whiteSpace:\"nowrap\",...props[hasValidCompareAtPrice?\"saleFont\":\"regularFont\"],color:props[hasValidCompareAtPrice?\"saleColor\":\"regularColor\"]},children:text})});}// Property controls remain the same\nFC_ProductPrice.defaultProps={shopifyProductID:\"\",canvasPrice:\"50.00\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPrice,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS\"},canvasPrice:{type:ControlType.String,title:\"Price\",description:\"Connect to CMS for canvas preview.\",defaultValue:\"50.00\"},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, \u20AC, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency is for canvas preview only.\"}}},/** Font and Color Controls */regularFont:{type:ControlType.Font,title:\"Regular\",controls:\"extended\"},regularColor:{type:ControlType.Color,title:\"Regular\",defaultValue:\"#000\"},saleFont:{type:ControlType.Font,title:\"Sale\",controls:\"extended\"},saleColor:{type:ControlType.Color,title:\"Sale\",defaultValue:\"#FF0000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPrice\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPrice.map", "/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * \u00A9 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef,useCallback,cloneElement}from\"react\";import{createCartMutation,addToCartMutation,cartQuery,updateCartAttributes,updateCartCurrency}from\"https://framerusercontent.com/modules/yiRfl1JCGhIBUL31WVDk/wupS2XmBAHu1kBQNv9pi/mutations_v2.js\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{appendUTMParamsToUrl}from\"https://framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/624RTOU53ckt7NzZkGeH/utmParams.js\";import{appendLanguageToUrl}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/N2GIWD1ik8HES3ASBGeD/locales.js\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";/**\n * @framerDisableUnlink\n */export default function FC_ProductPurchaseButton(props){const{shopifyProductID,available,OutOfStock,SelectVariant,LoadingState,shopifyProductVariantId,BuyNowATC,title=\"Add to Cart\",required=false}=props;// State from original component\nconst[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[isInStock,setIsInStock]=useState(true);const[needsVariantSelection,setNeedsVariantSelection]=useState(false);const[isLoading,setIsLoading]=useState(true);const[shouldShowLoading,setShouldShowLoading]=useState(false);const[hasInitialized,setHasInitialized]=useState(false);const[countryCode,setCountryCode]=useState();const isBrowser=useIsBrowser();// Additional state for cart functionality\nconst[planSelected,setPlanSelected]=useState(\"one-time\");const[cartExistingData,setCartExistingData]=useState();const[errorMessage,setErrorMessage]=useState();const[productQuantity,setProductQuantity]=useState(1);const viewContentFired=useRef(false);const[autoSelectFirst,setAutoSelectFirst]=useState(false);const[autoSelectReceived,setAutoSelectReceived]=useState(false);const[isVariantManuallySelected,setIsVariantManuallySelected]=useState(false);// Check if variant is autoselected by default\nuseEffect(()=>{if(!isBrowser)return;//console.log(\"FC_ProductPurchaseButton mounted\")\nconst handleAutoSelectFlag=event=>{// console.log(\n//     \"Auto Select event received as:\",\n//     event.detail.autoSelectFirst\n// )\nsetAutoSelectFirst(event.detail.autoSelectFirst);// console.log(\"Auto Select First Flag:\", event.detail.autoSelectFirst)\nsetAutoSelectReceived(true);// console.log(\"Auto Select First Flag Received\")\n};document.addEventListener(\"auto_select_first_flag\",handleAutoSelectFlag);return()=>{document.removeEventListener(\"auto_select_first_flag\",handleAutoSelectFlag);};},[isBrowser]);// Calculate total inventory helper function\nconst calculateTotalInventory=useCallback(productData=>{if(!productData||productData===\"404\")return 0;// If totalInventory is available, use it\nif(typeof productData.totalInventory===\"number\"){return productData.totalInventory;}// Otherwise sum up variant quantities\nreturn get(productData,\"variants.edges\",[]).reduce((total,{node})=>{return total+(node.quantityAvailable||0);},0);},[]);// Helper function to check if variant is available for sale\nconst isVariantAvailable=useCallback(variant=>{if(!variant)return false;// If availableForSale is true, the variant can be sold regardless of quantity\nif(variant.availableForSale)return true;// If availableForSale is false, check quantity\nreturn variant.quantityAvailable>0;},[]);// Error handling\nuseEffect(()=>{if(errorMessage&&isBrowser){const event=new CustomEvent(\"errorChanged\",{detail:errorMessage});window.dispatchEvent(event);}},[errorMessage]);// Load cart from localStorage\nuseEffect(()=>{if(!isBrowser||!window[\"shopXtools\"])return;// Try to load cart ID first\nconst savedCartId=localStorage.getItem(\"shopX_cart_id\");if(savedCartId){// If we have a cart ID, fetch the cart data\nwindow.shopXtools.handleCartMutation(cartQuery,{cartId:savedCartId}).then(data=>{if(data?.cart){setCartExistingData(data.cart);window.shopXtools.cart=data.cart;localStorage.setItem(\"shopXtools.cart\",JSON.stringify(data.cart));}}).catch(error=>{// Clear invalid cart data\nlocalStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");});}const handleSubscriptionChange=event=>{setPlanSelected(event.detail.subscriptionId);};document.addEventListener(\"subscription__selection-sync\",handleSubscriptionChange);return()=>document.removeEventListener(\"subscription__selection-sync\",handleSubscriptionChange);},[isBrowser]);// Add this at the top level with other event handlers\nconst handleQuantityChange=event=>{setProductQuantity(event.detail);};useEffect(()=>{if(isBrowser){window.addEventListener(\"FcQuantitySelectorchanges\",handleQuantityChange);// Track view content\nif(typeof fbq!==\"undefined\"&&!viewContentFired.current){fbq(\"track\",\"ViewContent\");viewContentFired.current=true;}// Cleanup\nreturn()=>{window.removeEventListener(\"FcQuantitySelectorchanges\",handleQuantityChange);};}},[isBrowser]);useEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=async event=>{const{countryCode}=event.detail;setCountryCode(countryCode);const existingCartId=localStorage.getItem(\"shopX_cart_id\");if(existingCartId){try{const updateData=await window.shopXtools.handleCartMutation(updateCartCurrency,{cartId:existingCartId,countryCode:countryCode});if(updateData?.cartBuyerIdentityUpdate?.cart){window.shopXtools.cart=updateData.cartBuyerIdentityUpdate.cart;window.dispatchEvent(new Event(\"shopXtools-cart-update\"));}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to update cart with new country code\"}));}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to update cart currency\"}));}}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser]);// Load product data and set up event listeners\nuseEffect(()=>{if(!isBrowser)return;const handleSingleVariantProduct=productNode=>{if(!productNode)return false;const variants=get(productNode,\"variants.edges\",[]);if(variants.length===1){const variant=variants[0].node;setActiveVariant(variant);setIsInStock(isVariantAvailable(variant));setNeedsVariantSelection(false);return true;}return false;};const handleProductData=_matchingProduct=>{if(_matchingProduct){const productNode=_matchingProduct.node;setProduct(productNode||\"404\");// If shopifyProductVariantId is provided, find and set that variant\nif(shopifyProductVariantId&&productNode){const variantId=`gid://shopify/ProductVariant/${shopifyProductVariantId}`;const matchingVariant=get(productNode,\"variants.edges\",[]).find(({node})=>node.id===variantId);if(matchingVariant){setActiveVariant(matchingVariant.node);setIsInStock(isVariantAvailable(matchingVariant.node));setNeedsVariantSelection(false);return;// Exit early as we've found our variant\n}}// Immediately handle single variant products\nif(handleSingleVariantProduct(productNode)){return;// Exit early as we've handled the single variant\n}if(autoSelectFirst&&!isVariantManuallySelected){//console.log(\"Auto-selecting the first variant\");\nconst firstAvailableVariant=productNode.variants.edges.find(edge=>edge.node.availableForSale)?.node;if(firstAvailableVariant){setActiveVariant(firstAvailableVariant);// console.log(\n//     \"Setting first available variant\",\n//     firstAvailableVariant\n// )\nsetIsInStock(isVariantAvailable(firstAvailableVariant));setNeedsVariantSelection(false);//console.log(\"Setting variant with autoSelectFirst\", firstAvailableVariant);\nreturn;// Exit early as we've set the active variant\n}}// For multi-variant products without a selected variant\nsetNeedsVariantSelection(!shopifyProductVariantId);// Check if any variant is available\nconst anyVariantAvailable=get(productNode,\"variants.edges\",[]).some(({node})=>isVariantAvailable(node));setIsInStock(anyVariantAvailable);}else{setProduct(\"404\");setIsInStock(false);}};// Check if we already have product data available\nif(window.shopXtools?.products&&Array.isArray(window.shopXtools.products)){const _matchingProduct=window.shopXtools.products.find(({node})=>node.id===`gid://shopify/Product/${shopifyProductID}`);handleProductData(_matchingProduct);}const productsReadyHandler=()=>{if(window?.shopXtools?.products){const matchingProduct=window.shopXtools.products.find(({node:product})=>product.id===`gid://shopify/Product/${shopifyProductID}`);handleProductData(matchingProduct);}};const variantChangeHandler=e=>{// Only update the variant if no shopifyProductVariantId is provided\n// console.log(\"Variant changed, active variant is\", e.detail)\nif(e.detail){setActiveVariant(e.detail);setIsInStock(e.detail.quantityAvailable>0);setNeedsVariantSelection(false);setIsVariantManuallySelected(true);}};document.addEventListener(\"data__products-ready\",productsReadyHandler);document.addEventListener(\"product__active-variant__changed\",variantChangeHandler);// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*1).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking View Item - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: 1\n//     }]\n// });\nwindow.fcTrackGAEvent(\"view_item\",{currency,value,items:[{item_id,item_name,price,quantity:1}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking View Item - meta:\", {\n//     content_type: 'product',\n//     content_ids: [item_id],\n//     content_name: item_name,\n//     value,\n//     currency\n// });\nfbq(\"track\",\"ViewContent\",{content_type:\"product\",content_ids:[item_id],content_name:item_name,value,currency});}return()=>{document.removeEventListener(\"data__products-ready\",productsReadyHandler);document.removeEventListener(\"product__active-variant__changed\",variantChangeHandler);};},[shopifyProductID,shopifyProductVariantId,activeVariant,isBrowser,calculateTotalInventory,autoSelectFirst]);// Update variant selection state when activeVariant changes\nuseEffect(()=>{if(!product||product===\"404\")return;const variants=get(product,\"variants.edges\",[]);const hasMultipleVariants=variants.length>1;const noVariantSelected=!activeVariant&&!shopifyProductVariantId;setNeedsVariantSelection(hasMultipleVariants&&noVariantSelected);},[product,activeVariant,shopifyProductVariantId]);// Handle single variant products\nconst handleSingleVariantProducts=product=>{if(!product)return;const variants=get(product,\"variants.edges\",[]);if(variants.length===1){const variant=variants[0].node;setActiveVariant(variant);setIsInStock(variant.quantityAvailable>0);setNeedsVariantSelection(false);}};// Cart functionality\nconst handleSubscription=async(mutation,variables)=>{if(!isBrowser)return null;const handleCartMutation=window[\"shopXtools\"]?.handleCartMutation;if(handleCartMutation){return await handleCartMutation(mutation,variables);}throw new Error(\"handleCartMutation function not available\");};const isValidId=id=>id!==null&&id!==undefined&&id!==\"\";const fullId=`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`;// Add new state for order field validation\nconst[orderFieldError,setOrderFieldError]=useState(false);// Debug logging function\nconst logDebug=(message,data)=>{// Empty function - no logging\n};// Enhanced validation function with logging\nconst validateOrderField=()=>{if(!props.required){logDebug(\"Validation skipped - not required\",{required:props.required});return true;}const productSpecificKey=`shopX_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);logDebug(\"Checking stored attributes\",{productSpecificKey,hasStoredAttributes:!!storedAttributes});if(!storedAttributes){return false;}try{const attributes=JSON.parse(storedAttributes);const isValid=attributes?.Email&&attributes.Email.trim()!==\"\";logDebug(\"Validation result\",{attributes,isValid,email:attributes?.Email});return isValid;}catch(error){return false;}};// Effect to initialize validation state\nuseEffect(()=>{if(props.required){const isValid=validateOrderField();logDebug(\"Initial validation\",{isValid,required:props.required});setOrderFieldError(!isValid);}},[props.required,props.shopifyProductID]);// Listen for order field changes with logging\nuseEffect(()=>{if(props.required){const handleOrderFieldChange=event=>{logDebug(\"Order field change event received\",event.detail);const isValid=validateOrderField();setOrderFieldError(!isValid);logDebug(\"Order field validation updated\",{isValid,orderFieldError:!isValid});};window.addEventListener(\"orderFieldChanged\",handleOrderFieldChange);return()=>window.removeEventListener(\"orderFieldChanged\",handleOrderFieldChange);}},[props.required]);const[isInputRequired,setIsInputRequired]=useState(false);// Effect to check if the input field exists and is required\nuseEffect(()=>{const checkInputRequirement=()=>{const configKey=`shopX_input_config_${shopifyProductID}`;const config=sessionStorage.getItem(configKey);// Only set as required if the config exists and required is true\nif(config){const{required}=JSON.parse(config);setIsInputRequired(required);}else{// If no config exists, the field isn't on the page\nsetIsInputRequired(false);}};checkInputRequirement();// Listen for config changes\nwindow.addEventListener(\"inputConfigChanged\",checkInputRequirement);return()=>window.removeEventListener(\"inputConfigChanged\",checkInputRequirement);},[shopifyProductID]);const getLineItem=()=>{const merchandiseId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(!merchandiseId){throw new Error(\"No valid product variant selected\");}const lineItem={merchandiseId,quantity:productQuantity};// Add selling plan ID if a subscription is selected\nif(planSelected&&planSelected!==\"one-time\"){lineItem[\"sellingPlanId\"]=planSelected;}try{const productSpecificKey=`shopX_cart_attributes_${props.shopifyProductID}`;const stored=sessionStorage.getItem(productSpecificKey);if(!stored)return lineItem;const data=JSON.parse(stored);const value=data[\"Email\"]||data[\"Order Note\"];const key=data[\"Email\"]?\"Email\":\"Order Note\";if(value&&value.trim()){lineItem[\"attributes\"]=[{key,value:value.trim()}];}}catch(e){// Error handling without logging\n}return lineItem;};const[maxQuantityReached,setMaxQuantityReached]=useState(false);// Modify the getCurrentCartQuantity function to add more logging\nconst getCurrentCartQuantity=useCallback(variantId=>{if(!cartExistingData?.lines?.edges){return 0;}const quantity=cartExistingData.lines.edges.reduce((total,{node})=>{if(node.merchandise.id===variantId){return total+node.quantity;}return total;},0);return quantity;},[cartExistingData]);const handleAddToCart=async()=>{try{if(!isBrowser)return;const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(props.maxQuantity>0){const currentCartQuantity=getCurrentCartQuantity(variantId);const totalRequestedQuantity=currentCartQuantity+productQuantity;if(currentCartQuantity>=props.maxQuantity){const message=`Maximum quantity of ${props.maxQuantity} already in cart`;window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:message}));setMaxQuantityReached(true);return;}if(totalRequestedQuantity>props.maxQuantity){const adjustedQuantity=props.maxQuantity-currentCartQuantity;setProductQuantity(adjustedQuantity);return;}}if(props.required||isInputRequired){const productSpecificKey=`shopX_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);const inputElement=document.querySelector(`[data-product-id=\"${props.shopifyProductID}\"]`);const currentInputValue=inputElement?.value||\"\";if(currentInputValue&&(!storedAttributes||currentInputValue!==JSON.parse(storedAttributes)?.Email)){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please save your email before adding to cart\"}}));return;}if(!storedAttributes||!JSON.parse(storedAttributes)?.Email||JSON.parse(storedAttributes).Email.trim()===\"\"){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please fill in all required fields\"}}));return;}}const lines=[getLineItem()];// Retrieve the selected country code from localStorage\nconst countryCode=localStorage.getItem(\"selectedCountryCode\");let existingCartId=localStorage.getItem(\"shopX_cart_id\");if(!BuyNowATC){if(existingCartId){try{const cartValidation=await window.shopXtools.handleCartMutation(cartQuery,{cartId:existingCartId});if(!cartValidation?.cart){localStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");existingCartId=null;}}catch(error){localStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");existingCartId=null;}}if(!existingCartId){try{const cartData=await window.shopXtools.handleCartMutation(createCartMutation,{lines,countryCode:countryCode});if(cartData?.cartCreate?.cart?.id){localStorage.setItem(\"shopX_cart_id\",cartData.cartCreate.cart.id);localStorage.setItem(\"shopXtools.cart\",JSON.stringify(cartData.cartCreate.cart));window.shopXtools.cart=cartData.cartCreate.cart;// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");const activeProduct=product;// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Add to Cart - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: productQuantity\n//     }]\n// });\nwindow.fcTrackGAEvent(\"add_to_cart\",{currency,value,items:[{item_id,item_name,price,quantity:productQuantity}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking Add ToCart - meta:\", {\n//     ccontent_type: 'product',\n//     content_ids: [item_id],\n//     content_name: activeProduct?.title,\n//     value,\n//     currency,\n//     contents: [{\n//         merchandiseId: item_id,\n//         price: price,\n//         quantity: productQuantity\n//     }]\n// })\nfbq(\"track\",\"AddToCart\",{content_type:\"product\",content_ids:[item_id],content_name:activeProduct?.title,value,currency,contents:[{merchandiseId:item_id,price:price,quantity:productQuantity}]});}window.shopXtools.dispatchEvent(\"checkout__changed\",{__triggerCartModal:true});}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to add to cart\"}));}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to create new cart\"}));}}else{const cartData=await window.shopXtools.handleCartMutation(addToCartMutation,{cartId:existingCartId,lines});if(cartData?.cartLinesAdd?.cart){localStorage.setItem(\"shopXtools.cart\",JSON.stringify(cartData.cartLinesAdd.cart));window.shopXtools.cart=cartData.cartLinesAdd.cart;// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Google Analytics tracking\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");const activeProduct=product;// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Add to Cart - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: productQuantity\n//     }]\n// });\nwindow.fcTrackGAEvent(\"add_to_cart\",{currency,value,items:[{item_id,item_name,price,quantity:productQuantity}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking Add ToCart - meta:\", {\n//     content_type: 'product',\n//     content_ids: [item_id],\n//     content_name: activeProduct?.title,\n//     value,\n//     currency,\n//     contents: {\n//         merchandiseId: item_id,\n//         price: price,\n//         quantity: productQuantity\n//     }\n// })\nfbq(\"track\",\"AddToCart\",{content_type:\"product\",content_ids:[item_id],content_name:activeProduct?.title,value,currency,contents:[{merchandiseId:item_id,price:price,quantity:productQuantity}]});}window.shopXtools.dispatchEvent(\"checkout__changed\",{__triggerCartModal:true});}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to add to cart\"}));}}}// Directly proceed to checkout without opening the cart modal\nif(BuyNowATC){//console.log(\"Directly proceeding to checkout without opening the cart modal\")\n// Create the cart and proceed to checkout\nconst variables={lines,countryCode:countryCode};//console.log(\"Sending mutation with variables:\", variables)\nconst result=await window[\"shopXtools\"]?.handleTemporaryCartMutation(createCartMutation,variables);//console.log(\"result:\", result)\nconst checkoutUrl=result.cartCreate.cart.checkoutUrl;if(checkoutUrl){//console.log(\"checkoutUrl:\", checkoutUrl)\nlet finalCheckoutUrl=checkoutUrl;if(finalCheckoutUrl){// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Initiate Checkout (Buy now) - google:\", {\n//     currency,\n//     value,\n//     item_id,\n//     item_name,\n//     price,\n//     quantity: productQuantity\n// });\nwindow.fcTrackGAEvent(\"begin_checkout\",{currency,value,items:[{item_id,item_name,price,quantity:productQuantity}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking Initiate Checkout (Buy now) - meta:\", {\n//     content_type: 'product',\n//     content_ids: [activeVariant?.id],\n//     value,\n//     currency,\n//     num_items: productQuantity\n// })\nfbq(\"track\",\"InitiateCheckout\",{content_type:\"product\",content_ids:[activeVariant?.id],value,currency,num_items:productQuantity});}finalCheckoutUrl=appendUTMParamsToUrl(finalCheckoutUrl);finalCheckoutUrl=appendLanguageToUrl(finalCheckoutUrl);window.location.assign(finalCheckoutUrl)// Use assign instead of href to avoid page reload and make sure it works in Safari and Chrome\n;}}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to create cart for checkout\"}));}}if(lines[0].attributes){// const cartId = existingCartId || cartData?.cartCreate?.cart?.id;\nconst cartId=existingCartId//removed check for cartData\n;await window.shopXtools.handleCartMutation(updateCartAttributes,{cartId,attributes:lines[0].attributes});}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to add item to cart\"}));}};useEffect(()=>{let timer;if(isLoading){setShouldShowLoading(false);timer=setTimeout(()=>{setShouldShowLoading(true);},200)// 200ms delay before showing loading state\n;}else{setShouldShowLoading(false);}return()=>{if(timer)clearTimeout(timer);};},[isLoading]);// Update loading state when product data is received\nuseEffect(()=>{if(product){setIsLoading(false);}},[product]);// Initialize hasInitialized\nuseEffect(()=>{if(!hasInitialized&&product){// Small delay to ensure we have all the necessary data\nconst timer=setTimeout(()=>{setHasInitialized(true);},50);return()=>clearTimeout(timer);}},[product]);let content=null;if(RenderTarget.current()===RenderTarget.canvas){content=available?.[0]||null// Always show available state in canvas\n;}else if(!hasInitialized){content=null;}else if(needsVariantSelection){content=SelectVariant?.[0]||null;}else if(maxQuantityReached&&props.MaxQuantityReached?.[0]){content=props.MaxQuantityReached[0];}else if(!isInStock&&!activeVariant?.availableForSale||activeVariant&&!isVariantAvailable(activeVariant)||product&&!get(product,\"variants.edges\",[]).some(({node})=>isVariantAvailable(node))||props.required&&orderFieldError){content=OutOfStock?.[0]||null;}else{content=available?.[0]||null;}// Near the bottom of the component where we create clonedElement\nconst canAddToCart=(isInStock||activeVariant&&activeVariant.availableForSale)&&!needsVariantSelection&&!maxQuantityReached&&(!props.required||!orderFieldError);const handleClick=e=>{if(canAddToCart){handleAddToCart();}};// Single consolidated effect for maxQuantityReached\nuseEffect(()=>{if(!props.maxQuantity){if(maxQuantityReached){setMaxQuantityReached(false);}return;}const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(!variantId||!cartExistingData?.lines?.edges){if(maxQuantityReached){setMaxQuantityReached(false);}return;}const currentQuantity=cartExistingData.lines.edges.reduce((total,{node})=>{if(node.merchandise.id===variantId){return total+node.quantity;}return total;},0);const shouldBeAtMax=currentQuantity>=props.maxQuantity;if(shouldBeAtMax!==maxQuantityReached){setMaxQuantityReached(shouldBeAtMax);}},[props.maxQuantity,activeVariant,props.shopifyProductVariantId,cartExistingData,maxQuantityReached]);const clonedElement=content?/*#__PURE__*/cloneElement(content,{style:{...content.props?.style||{},width:\"100%\",height:\"100%\",cursor:canAddToCart?\"pointer\":\"not-allowed\",transition:hasInitialized?\"opacity 0.2s ease-in-out\":\"none\",opacity:1},onClick:handleClick,\"aria-hidden\":!hasInitialized,tabIndex:hasInitialized?0:-1}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#666\",fontSize:\"14px\",border:\"1px dashed #ccc\",borderRadius:\"4px\"},children:\"Connect Instance\"});const debugInfo=RenderTarget.current()!==RenderTarget.canvas&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:\"100%\",left:0,background:\"#f0f0f0\",padding:\"4px\",fontSize:\"10px\",display:props.maxQuantity>0?\"block\":\"none\"},children:[\"Max: \",props.maxQuantity,\" | Current:\",\" \",getCurrentCartQuantity(activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null)),\" \",\"| At Max: \",maxQuantityReached?\"Yes\":\"No\"]});// Add this effect near the other useEffect hooks\nuseEffect(()=>{if(props.maxQuantity>0){window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:props.maxQuantity}}));}},[props.maxQuantity,props.shopifyProductID]);// Add this effect to handle cart updates\nuseEffect(()=>{if(props.maxQuantity>0&&cartExistingData){const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);const currentInCart=getCurrentCartQuantity(variantId);const remainingAllowed=Math.max(0,props.maxQuantity-currentInCart);window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:remainingAllowed}}));if(productQuantity>remainingAllowed){setProductQuantity(remainingAllowed);}}},[cartExistingData,props.maxQuantity,activeVariant,props.shopifyProductVariantId,getCurrentCartQuantity]);// Add this effect to handle quantity max reached events\nuseEffect(()=>{const handleQuantityMaxReached=event=>{const{productId,maxQuantity}=event.detail;if(productId===props.shopifyProductID){setMaxQuantityReached(true);}};window.addEventListener(\"quantityMaxReached\",handleQuantityMaxReached);return()=>window.removeEventListener(\"quantityMaxReached\",handleQuantityMaxReached);},[props.shopifyProductID]);// Modify the effect that sets initial max quantity\nuseEffect(()=>{if(props.maxQuantity>0){const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);const currentInCart=getCurrentCartQuantity(variantId);const remainingAllowed=Math.max(0,props.maxQuantity-currentInCart);window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:remainingAllowed}}));}},[props.maxQuantity,props.shopifyProductID,getCurrentCartQuantity,activeVariant,props.shopifyProductVariantId]);return /*#__PURE__*/_jsxs(\"div\",{style:{height:\"100%\",position:\"relative\"},role:\"none\",className:\"fc-purchase-button-container\",children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .fc-purchase-button-container :focus-visible {\n                    outline: ${props.focus.width}px solid ${props.focus.color} !important;\n                    outline-offset: ${props.focus.padding}px !important;\n                    border-radius: ${props.focus.radius}px !important;\n                }\n            `}),debugInfo,RenderTarget.current()===RenderTarget.canvas?// In canvas, only render the available state\navailable?.[0]&&/*#__PURE__*/cloneElement(available[0],{style:{...available[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:\"pointer\",outline:\"none\"},onClick:handleClick,role:\"button\",\"aria-label\":props.BuyNowATC?\"Buy now\":\"Add to cart\"}):// In browser, render all states but only show the active one\n/*#__PURE__*/_jsxs(\"div\",{style:{height:\"100%\",position:\"relative\"},children:[available?.[0]&&/*#__PURE__*/cloneElement(available[0],{style:{...available[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:canAddToCart?\"pointer\":\"not-allowed\",transition:hasInitialized?\"opacity 0.3s ease-in-out\":\"none\",opacity:content===available?.[0]?1:0,position:\"absolute\",top:0,left:0,pointerEvents:content===available?.[0]?\"auto\":\"none\",visibility:content===available?.[0]?\"visible\":\"hidden\",outline:\"none\",zIndex:content===available?.[0]?2:0,transitionDelay:content===available?.[0]?\"0s\":\"0s\"},onClick:handleClick,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();if(canAddToCart){handleClick(e);}}},role:\"button\",\"aria-disabled\":!canAddToCart,\"aria-label\":props.BuyNowATC?\"Buy now\":\"Add to cart\",tabIndex:content===available?.[0]&&hasInitialized?0:-1,\"aria-hidden\":content!==available?.[0]||!hasInitialized}),OutOfStock?.[0]&&/*#__PURE__*/cloneElement(OutOfStock[0],{style:{...OutOfStock[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:\"not-allowed\",transition:hasInitialized?\"opacity 0.3s ease-in-out\":\"none\",opacity:content===OutOfStock?.[0]?1:0,position:\"absolute\",top:0,left:0,pointerEvents:content===OutOfStock?.[0]?\"auto\":\"none\",visibility:content===OutOfStock?.[0]?\"visible\":\"hidden\",outline:\"none\",zIndex:content===OutOfStock?.[0]?2:0,transitionDelay:content===OutOfStock?.[0]?\"0s\":\"0s\"},role:\"button\",\"aria-disabled\":true,\"aria-label\":\"Out of stock\",tabIndex:content===OutOfStock?.[0]&&hasInitialized?0:-1,\"aria-hidden\":content!==OutOfStock?.[0]||!hasInitialized}),SelectVariant?.[0]&&/*#__PURE__*/cloneElement(SelectVariant[0],{style:{...SelectVariant[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:\"not-allowed\",transition:hasInitialized?\"opacity 0.3s ease-in-out\":\"none\",opacity:content===SelectVariant?.[0]?1:content===available?.[0]||content===OutOfStock?.[0]?1-(hasInitialized?1:0):0,position:\"absolute\",top:0,left:0,pointerEvents:content===SelectVariant?.[0]?\"auto\":\"none\",visibility:content===SelectVariant?.[0]||(content===available?.[0]||content===OutOfStock?.[0])&&hasInitialized?\"visible\":\"hidden\",outline:\"none\",zIndex:content===SelectVariant?.[0]?2:1,transitionDelay:content===SelectVariant?.[0]?\"0s\":\"0.3s\"},role:\"button\",\"aria-disabled\":true,\"aria-label\":\"Select variant\",tabIndex:content===SelectVariant?.[0]&&hasInitialized?0:-1,\"aria-hidden\":content!==SelectVariant?.[0]||!hasInitialized})]}),LoadingState?.[0]&&RenderTarget.current()!==RenderTarget.canvas&&/*#__PURE__*/cloneElement(LoadingState[0],{style:{...LoadingState[0].props?.style||{},width:\"100%\",height:\"100%\",position:\"absolute\",top:0,left:0,opacity:isLoading&&shouldShowLoading&&!props.skipLoading?1:0,pointerEvents:isLoading&&shouldShowLoading&&!props.skipLoading?\"auto\":\"none\",visibility:isLoading&&shouldShowLoading&&!props.skipLoading?\"visible\":\"hidden\",transition:\"opacity 0.2s ease-in-out\",outline:\"none\"},role:\"status\",\"aria-label\":`Loading ${props.BuyNowATC?\"buy now\":\"add to cart\"} button`,\"aria-live\":\"polite\",tabIndex:-1,\"aria-hidden\":!isLoading||!shouldShowLoading||props.skipLoading})]});}addPropertyControls(FC_ProductPurchaseButton,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS\"},shopifyProductVariantId:{type:ControlType.String,title:\"Variant ID\",description:\"Manually set a specific product variant ID (optional).\"},available:{type:ControlType.ComponentInstance,title:\"Available\"},OutOfStock:{type:ControlType.ComponentInstance,title:\"Out of Stock\"},SelectVariant:{type:ControlType.ComponentInstance,title:\"Select Variant\"},LoadingState:{type:ControlType.ComponentInstance,title:\"Loading\"},BuyNowATC:{title:\"Buy Now\",description:\"Enabling will skip the cart and go right to checkout.\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},skipLoading:{title:\"Skip Loading\",description:\"Skip loading state\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},focus:{type:ControlType.Object,title:\"Focus\",controls:{radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:100,step:1,displayStepper:true},width:{type:ControlType.Number,title:\"Width\",defaultValue:2,min:0,max:20,step:1,displayStepper:true},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:2,min:0,max:20,step:1,displayStepper:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#007AFF\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPurchaseButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPurchaseButton.map", "import { ControlType } from \"framer\";\nexport const fontStack = `\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`;\nexport const containerStyles = {\n    position: \"relative\",\n    width: \"100%\",\n    height: \"100%\",\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const emptyStateStyle = {\n    ...containerStyles,\n    borderRadius: 6,\n    background: \"rgba(136, 85, 255, 0.3)\",\n    color: \"#85F\",\n    border: \"1px dashed #85F\",\n    flexDirection: \"column\"\n};\nexport const defaultEvents = {\n    onClick: {\n        type: ControlType.EventHandler\n    },\n    onMouseEnter: {\n        type: ControlType.EventHandler\n    },\n    onMouseLeave: {\n        type: ControlType.EventHandler\n    }\n};\nexport const fontSizeOptions = {\n    type: ControlType.Number,\n    title: \"Font Size\",\n    min: 2,\n    max: 200,\n    step: 1,\n    displayStepper: true\n};\nexport const fontControls = {\n    font: {\n        type: ControlType.Boolean,\n        title: \"Font\",\n        defaultValue: false,\n        disabledTitle: \"Default\",\n        enabledTitle: \"Custom\"\n    },\n    fontFamily: {\n        type: ControlType.String,\n        title: \"Family\",\n        placeholder: \"Inter\",\n        hidden: ({ font  })=>!font\n    },\n    fontWeight: {\n        type: ControlType.Enum,\n        title: \"Weight\",\n        options: [\n            100,\n            200,\n            300,\n            400,\n            500,\n            600,\n            700,\n            800,\n            900\n        ],\n        optionTitles: [\n            \"Thin\",\n            \"Extra-light\",\n            \"Light\",\n            \"Regular\",\n            \"Medium\",\n            \"Semi-bold\",\n            \"Bold\",\n            \"Extra-bold\",\n            \"Black\", \n        ],\n        hidden: ({ font  })=>!font\n    }\n};\n// @TODO check if we're missing anything here \u2014 there doesn't seem to be a reliable browser API for this\nexport const localeOptions = {\n    af: \"Afrikaans\",\n    sq: \"Albanian\",\n    an: \"Aragonese\",\n    ar: \"Arabic (Standard)\",\n    \"ar-dz\": \"Arabic (Algeria)\",\n    \"ar-bh\": \"Arabic (Bahrain)\",\n    \"ar-eg\": \"Arabic (Egypt)\",\n    \"ar-iq\": \"Arabic (Iraq)\",\n    \"ar-jo\": \"Arabic (Jordan)\",\n    \"ar-kw\": \"Arabic (Kuwait)\",\n    \"ar-lb\": \"Arabic (Lebanon)\",\n    \"ar-ly\": \"Arabic (Libya)\",\n    \"ar-ma\": \"Arabic (Morocco)\",\n    \"ar-om\": \"Arabic (Oman)\",\n    \"ar-qa\": \"Arabic (Qatar)\",\n    \"ar-sa\": \"Arabic (Saudi Arabia)\",\n    \"ar-sy\": \"Arabic (Syria)\",\n    \"ar-tn\": \"Arabic (Tunisia)\",\n    \"ar-ae\": \"Arabic (U.A.E.)\",\n    \"ar-ye\": \"Arabic (Yemen)\",\n    hy: \"Armenian\",\n    as: \"Assamese\",\n    ast: \"Asturian\",\n    az: \"Azerbaijani\",\n    eu: \"Basque\",\n    bg: \"Bulgarian\",\n    be: \"Belarusian\",\n    bn: \"Bengali\",\n    bs: \"Bosnian\",\n    br: \"Breton\",\n    my: \"Burmese\",\n    ca: \"Catalan\",\n    ch: \"Chamorro\",\n    ce: \"Chechen\",\n    zh: \"Chinese\",\n    \"zh-hk\": \"Chinese (Hong Kong)\",\n    \"zh-cn\": \"Chinese (PRC)\",\n    \"zh-sg\": \"Chinese (Singapore)\",\n    \"zh-tw\": \"Chinese (Taiwan)\",\n    cv: \"Chuvash\",\n    co: \"Corsican\",\n    cr: \"Cree\",\n    hr: \"Croatian\",\n    cs: \"Czech\",\n    da: \"Danish\",\n    nl: \"Dutch (Standard)\",\n    \"nl-be\": \"Dutch (Belgian)\",\n    en: \"English\",\n    \"en-au\": \"English (Australia)\",\n    \"en-bz\": \"English (Belize)\",\n    \"en-ca\": \"English (Canada)\",\n    \"en-ie\": \"English (Ireland)\",\n    \"en-jm\": \"English (Jamaica)\",\n    \"en-nz\": \"English (New Zealand)\",\n    \"en-ph\": \"English (Philippines)\",\n    \"en-za\": \"English (South Africa)\",\n    \"en-tt\": \"English (Trinidad & Tobago)\",\n    \"en-gb\": \"English (United Kingdom)\",\n    \"en-us\": \"English (United States)\",\n    \"en-zw\": \"English (Zimbabwe)\",\n    eo: \"Esperanto\",\n    et: \"Estonian\",\n    fo: \"Faeroese\",\n    fa: \"Farsi\",\n    fj: \"Fijian\",\n    fi: \"Finnish\",\n    fr: \"French (Standard)\",\n    \"fr-be\": \"French (Belgium)\",\n    \"fr-ca\": \"French (Canada)\",\n    \"fr-fr\": \"French (France)\",\n    \"fr-lu\": \"French (Luxembourg)\",\n    \"fr-mc\": \"French (Monaco)\",\n    \"fr-ch\": \"French (Switzerland)\",\n    fy: \"Frisian\",\n    fur: \"Friulian\",\n    gd: \"Gaelic (Scots)\",\n    \"gd-ie\": \"Gaelic (Irish)\",\n    gl: \"Galacian\",\n    ka: \"Georgian\",\n    de: \"German (Standard)\",\n    \"de-at\": \"German (Austria)\",\n    \"de-de\": \"German (Germany)\",\n    \"de-li\": \"German (Liechtenstein)\",\n    \"de-lu\": \"German (Luxembourg)\",\n    \"de-ch\": \"German (Switzerland)\",\n    el: \"Greek\",\n    gu: \"Gujurati\",\n    ht: \"Haitian\",\n    he: \"Hebrew\",\n    hi: \"Hindi\",\n    hu: \"Hungarian\",\n    is: \"Icelandic\",\n    id: \"Indonesian\",\n    iu: \"Inuktitut\",\n    ga: \"Irish\",\n    it: \"Italian (Standard)\",\n    \"it-ch\": \"Italian (Switzerland)\",\n    ja: \"Japanese\",\n    kn: \"Kannada\",\n    ks: \"Kashmiri\",\n    kk: \"Kazakh\",\n    km: \"Khmer\",\n    ky: \"Kirghiz\",\n    tlh: \"Klingon\",\n    ko: \"Korean\",\n    \"ko-kp\": \"Korean (North Korea)\",\n    \"ko-kr\": \"Korean (South Korea)\",\n    la: \"Latin\",\n    lv: \"Latvian\",\n    lt: \"Lithuanian\",\n    lb: \"Luxembourgish\",\n    mk: \"FYRO Macedonian\",\n    ms: \"Malay\",\n    ml: \"Malayalam\",\n    mt: \"Maltese\",\n    mi: \"Maori\",\n    mr: \"Marathi\",\n    mo: \"Moldavian\",\n    nv: \"Navajo\",\n    ng: \"Ndonga\",\n    ne: \"Nepali\",\n    no: \"Norwegian\",\n    nb: \"Norwegian (Bokmal)\",\n    nn: \"Norwegian (Nynorsk)\",\n    oc: \"Occitan\",\n    or: \"Oriya\",\n    om: \"Oromo\",\n    \"fa-ir\": \"Persian/Iran\",\n    pl: \"Polish\",\n    pt: \"Portuguese\",\n    \"pt-br\": \"Portuguese (Brazil)\",\n    pa: \"Punjabi\",\n    \"pa-in\": \"Punjabi (India)\",\n    \"pa-pk\": \"Punjabi (Pakistan)\",\n    qu: \"Quechua\",\n    rm: \"Rhaeto-Romanic\",\n    ro: \"Romanian\",\n    \"ro-mo\": \"Romanian (Moldavia)\",\n    ru: \"Russian\",\n    \"ru-mo\": \"Russian (Moldavia)\",\n    sz: \"Sami (Lappish)\",\n    sg: \"Sango\",\n    sa: \"Sanskrit\",\n    sc: \"Sardinian\",\n    sd: \"Sindhi\",\n    si: \"Singhalese\",\n    sr: \"Serbian\",\n    sk: \"Slovak\",\n    sl: \"Slovenian\",\n    so: \"Somani\",\n    sb: \"Sorbian\",\n    es: \"Spanish\",\n    \"es-ar\": \"Spanish (Argentina)\",\n    \"es-bo\": \"Spanish (Bolivia)\",\n    \"es-cl\": \"Spanish (Chile)\",\n    \"es-co\": \"Spanish (Colombia)\",\n    \"es-cr\": \"Spanish (Costa Rica)\",\n    \"es-do\": \"Spanish (Dominican Republic)\",\n    \"es-ec\": \"Spanish (Ecuador)\",\n    \"es-sv\": \"Spanish (El Salvador)\",\n    \"es-gt\": \"Spanish (Guatemala)\",\n    \"es-hn\": \"Spanish (Honduras)\",\n    \"es-mx\": \"Spanish (Mexico)\",\n    \"es-ni\": \"Spanish (Nicaragua)\",\n    \"es-pa\": \"Spanish (Panama)\",\n    \"es-py\": \"Spanish (Paraguay)\",\n    \"es-pe\": \"Spanish (Peru)\",\n    \"es-pr\": \"Spanish (Puerto Rico)\",\n    \"es-es\": \"Spanish (Spain)\",\n    \"es-uy\": \"Spanish (Uruguay)\",\n    \"es-ve\": \"Spanish (Venezuela)\",\n    sx: \"Sutu\",\n    sw: \"Swahili\",\n    sv: \"Swedish\",\n    \"sv-fi\": \"Swedish (Finland)\",\n    \"sv-sv\": \"Swedish (Sweden)\",\n    ta: \"Tamil\",\n    tt: \"Tatar\",\n    te: \"Teluga\",\n    th: \"Thai\",\n    tig: \"Tigre\",\n    ts: \"Tsonga\",\n    tn: \"Tswana\",\n    tr: \"Turkish\",\n    tk: \"Turkmen\",\n    uk: \"Ukrainian\",\n    hsb: \"Upper Sorbian\",\n    ur: \"Urdu\",\n    ve: \"Venda\",\n    vi: \"Vietnamese\",\n    vo: \"Volapuk\",\n    wa: \"Walloon\",\n    cy: \"Welsh\",\n    xh: \"Xhosa\",\n    ji: \"Yiddish\",\n    zu: \"Zulu\"\n};\n\nexport const __FramerMetadata__ = {\"exports\":{\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./constants.map", "import { useIsInCurrentNavigationTarget } from \"framer\";\nimport { useEffect } from \"react\";\nexport function useOnEnter(onEnter, enabled) {\n    return useOnSpecificTargetChange(true, onEnter, enabled);\n}\nexport function useOnExit(onExit, enabled) {\n    return useOnSpecificTargetChange(false, onExit, enabled);\n}\nfunction useOnSpecificTargetChange(goal, callback, enabled = true) {\n    const isInTarget = useIsInCurrentNavigationTarget();\n    useEffect(()=>{\n        if (enabled && isInTarget === goal) callback();\n    }, [\n        isInTarget\n    ]);\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useOnEnter\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnExit\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useOnNavigationTargetChange.map", "import { useMemo } from \"react\";\nimport { ControlType } from \"framer\";\nexport function useRadius(props) {\n    const { borderRadius , isMixedBorderRadius , topLeftRadius , topRightRadius , bottomRightRadius , bottomLeftRadius ,  } = props;\n    const radiusValue = useMemo(()=>isMixedBorderRadius ? `${topLeftRadius}px ${topRightRadius}px ${bottomRightRadius}px ${bottomLeftRadius}px` : `${borderRadius}px`\n    , [\n        borderRadius,\n        isMixedBorderRadius,\n        topLeftRadius,\n        topRightRadius,\n        bottomRightRadius,\n        bottomLeftRadius, \n    ]);\n    return radiusValue;\n}\nexport const borderRadiusControl = {\n    borderRadius: {\n        title: \"Radius\",\n        type: ControlType.FusedNumber,\n        toggleKey: \"isMixedBorderRadius\",\n        toggleTitles: [\n            \"Radius\",\n            \"Radius per corner\"\n        ],\n        valueKeys: [\n            \"topLeftRadius\",\n            \"topRightRadius\",\n            \"bottomRightRadius\",\n            \"bottomLeftRadius\", \n        ],\n        valueLabels: [\n            \"TL\",\n            \"TR\",\n            \"BR\",\n            \"BL\"\n        ],\n        min: 0\n    }\n};\nexport function usePadding(props) {\n    const { padding , paddingPerSide , paddingTop , paddingRight , paddingBottom , paddingLeft ,  } = props;\n    const paddingValue = useMemo(()=>paddingPerSide ? `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px` : padding\n    , [\n        padding,\n        paddingPerSide,\n        paddingTop,\n        paddingRight,\n        paddingBottom,\n        paddingLeft, \n    ]);\n    return paddingValue;\n}\nexport const paddingControl = {\n    padding: {\n        type: ControlType.FusedNumber,\n        toggleKey: \"paddingPerSide\",\n        toggleTitles: [\n            \"Padding\",\n            \"Padding per side\"\n        ],\n        valueKeys: [\n            \"paddingTop\",\n            \"paddingRight\",\n            \"paddingBottom\",\n            \"paddingLeft\", \n        ],\n        valueLabels: [\n            \"T\",\n            \"R\",\n            \"B\",\n            \"L\"\n        ],\n        min: 0,\n        title: \"Padding\"\n    }\n};\n\nexport const __FramerMetadata__ = {\"exports\":{\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RadiusProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PaddingProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./propUtils.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,useAnimation,motion}from\"framer\";import{defaultEvents,useOnEnter,useOnExit}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";var Indicators;(function(Indicators){Indicators[\"DotWave\"]=\"Dots\";Indicators[\"Material\"]=\"Material\";Indicators[\"IOS\"]=\"iOS\";})(Indicators||(Indicators={}));const angleInRadians=angleInDegrees=>(angleInDegrees-90)*(Math.PI/180);const polarToCartesian=(centerX,centerY,radius,angleInDegrees)=>{const a=angleInRadians(angleInDegrees);return{x:centerX+radius*Math.cos(a),y:centerY+radius*Math.sin(a)};};const arc=(x,y,radius,startAngle,endAngle)=>{const fullCircle=endAngle-startAngle===360;const start=polarToCartesian(x,y,radius,endAngle-0.01);const end=polarToCartesian(x,y,radius,startAngle);const arcFlag=endAngle-startAngle<=180?\"0\":\"1\";let d=[\"M\",start.x,start.y,\"A\",radius,radius,0,arcFlag,0,end.x,end.y,].join(\" \");if(fullCircle)d+=\"z\";return d;};function Spinner({color}){const length=360;const endPercentage=length/360*100;const strokeWidth=10;const width=100;const height=100;return(/*#__PURE__*/ _jsxs(motion.div,{style:{height:\"85%\",width:\"85%\",position:\"relative\",originX:0.5,originY:0.5},animate:{rotate:360},transition:{loop:Infinity,ease:\"linear\",duration:0.5},children:[/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"100%\",width:\"100%\",top:0,left:0,right:0,bottom:0,position:\"absolute\",WebkitMask:`conic-gradient(rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0,1.0) ${endPercentage}%)`},viewBox:\"0 0 100 100\",children:/*#__PURE__*/ _jsx(\"g\",{transform:\"translate(0 0)\",children:/*#__PURE__*/ _jsx(\"path\",{d:arc(width/2,height/2,width/2-strokeWidth/2,0,length),fill:\"none\",stroke:color,strokeWidth:strokeWidth,strokeLinecap:\"round\"})})}),/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"100%\",width:\"100%\",position:\"absolute\"},viewBox:\"0 0 100 100\",children:/*#__PURE__*/ _jsx(\"g\",{transform:\"translate(50 0)\",children:/*#__PURE__*/ _jsx(\"path\",{d:\"M 0 0 C 2.761 0 5 2.239 5 5 C 5 7.761 2.761 10 0 10 C 0 10 0 0 0 0 Z\",fill:color})})})]}));}// <path d=\"M 0 0 C 2.761 0 5 2.239 5 5 C 5 7.761 2.761 10 0 10 C 0 10 0 0 0 0 Z\" fill=\"#CCC\"></path>\n// function Spinner({ color }) {\n//     return (\n//         <svg style={{ height: \"85%\", width: \"85%\" }} viewBox=\"0 0 100 100\">\n//             <motion.g\n//                 transform=\"translate(3 3)\"\n//                 animate={{ rotate: 360 }}\n//                 transition={{ loop: Infinity, ease: \"linear\", duration: 1 }}\n//             >\n//                 {pathStrings.map((data, i) => {\n//                     return <path d={data} fill={color} opacity={i / pathStrings.length} />\n//                 })}\n//             </motion.g>\n//         </svg>\n//     )\n// }\nfunction DotWave({color,animation}){const circles=[0,1,2];const{delay,ease,duration,...animProps}=animation;const transition=animation.type===\"spring\"?animProps:{...animProps,ease,duration};// console.log(animProps)\nreturn(/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"85%\",width:\"85%\"},viewBox:\"0 0 30 30\",variants:{show:{transition:{delayChildren:0.1,staggerChildren:0.12}}},animate:\"show\",children:circles.map(circle=>/*#__PURE__*/ _jsx(motion.circle,{style:{fill:color},variants:{hidden:{y:0},show:{y:[0,0,0,-10,0,0,0]}},transition:{...transition,yoyo:Infinity},r:3,cx:circle*10+5,cy:15},circle))}));}function Material({color,animation}){return(/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"85%\",width:\"85%\",overflow:\"visible\",originX:\"50%\",originY:\"50%\"},animate:{rotate:360},transition:{ease:\"linear\",loop:Infinity,duration:2},viewBox:\"25 25 50 50\",children:/*#__PURE__*/ _jsx(motion.circle,{style:{stroke:color,strokeLinecap:\"round\"},animate:{strokeDasharray:[\"1, 200\",\"89, 200\",\"89, 200\"],strokeDashoffset:[0,-35,-124]},transition:{...animation,loop:Infinity,ease:\"easeInOut\"},cx:\"50\",cy:\"50\",r:\"20\",fill:\"none\",strokeWidth:2,strokeMiterlimit:\"10\"})}));}function IOS({color,animation}){const particles=12;// this was the death of me\nconst arrayRotate=(arr,n)=>arr.slice(n,arr.length).concat(arr.slice(0,n));const lines=[...new Array(particles)].map((l,i)=>0.9/particles*i+0.1).reverse();const lineOpacities=lines.map((l,i)=>arrayRotate(lines,i));return(/*#__PURE__*/ _jsx(motion.svg,{viewBox:\"-15 -15 30 30\",style:{width:\"100%\",height:\"100%\"},children:lineOpacities.map((lineKeyframes,i)=>/*#__PURE__*/ _jsx(motion.g,{initial:{opacity:lineKeyframes[0]},animate:{opacity:lineKeyframes},transition:{...animation,loop:Infinity,repeatDelay:0.0005},children:/*#__PURE__*/ _jsx(\"rect\",{style:{width:7,height:2,fill:color,transform:`rotate(${(particles-i)/particles*360-90}deg)`},x:5,y:-1,rx:1})},i))}));}function getIndicator(indicator,props){switch(indicator){case Indicators.DotWave:return(/*#__PURE__*/ _jsx(DotWave,{...props}));case Indicators.Material:return(/*#__PURE__*/ _jsx(Material,{...props}));case Indicators.IOS:return(/*#__PURE__*/ _jsx(IOS,{...props}));// case Indicators.Spinner:\n//     return <Spinner {...props} />\ndefault:return(/*#__PURE__*/ _jsx(DotWave,{...props}));}}export function handleTimeout(duration,callback){const id=setTimeout(callback,duration*1e3);return()=>clearTimeout(id);}/**\n * Loading\n *\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export function Loading(props){const{duration,onTimeout,fadeOut,hasDuration,indicator,onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,style}=props;const controls=useAnimation();const animDuration=fadeOut?Math.min(duration,0.35):0;const animDelay=fadeOut?duration-animDuration:duration;const currentIndicator=getIndicator(indicator,props);const handlers=useRef([]);const onFadeOut=React.useCallback(()=>{if(hasDuration)controls.start({opacity:0,transition:{duration:animDuration,ease:\"easeIn\"}});},[hasDuration,animDuration]);const resetOpacity=async()=>{controls.set({opacity:1});};useOnEnter(()=>{resetOpacity();if(hasDuration)handlers.current=[handleTimeout(duration,onTimeout),handleTimeout(animDelay,onFadeOut),];});// Cancel all timers on exit.\nuseOnExit(()=>handlers.current.forEach(cleanup=>cleanup));// Cancel all timers on unmount.\nuseEffect(()=>()=>handlers.current.forEach(cleanup=>cleanup),[]);return(/*#__PURE__*/ _jsx(motion.div,{onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,animate:controls,style:{position:\"relative\",overflow:\"show\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",...style},children:currentIndicator}));}Loading.defaultProps={height:40,width:40,duration:2,color:\"#888\",animation:{type:\"tween\",ease:\"linear\",duration:1.3},hasDuration:false};// Learn more: https://framer.com/api/property-controls/\naddPropertyControls(Loading,{indicator:{title:\"Indicator\",type:ControlType.Enum,options:Object.keys(Indicators).map(i=>Indicators[i])},color:{type:ControlType.Color,defaultValue:\"#888\"},// transition: { title: \"Animation\", type: ControlType.Transition },\nhasDuration:{title:\"Duration\",type:ControlType.Boolean,defaultValue:Loading.defaultProps.hasDuration,enabledTitle:\"Timeout\",disabledTitle:\"Infinity\"},duration:{title:\"Time\",hidden:({hasDuration})=>!hasDuration,min:0.1,max:10,defaultValue:Loading.defaultProps.duration,type:ControlType.Number,step:0.1},animation:{type:ControlType.Transition},fadeOut:{title:\"Fade Out\",hidden:({hasDuration})=>!hasDuration,type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\"},onTimeout:{type:ControlType.EventHandler},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"handleTimeout\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Loading\":{\"type\":\"reactComponent\",\"name\":\"Loading\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"40\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"40\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Loading.map"],
  "mappings": "uVAkCA,IAAMA,GAA2BC,GAAc,CAC/C,GAAG,CAACA,EAAa,MAAO,GAAM,GAAGC,GAAgC,SAASD,CAAY,EAAG,MAAO,GAAM,GAAG,CAEzG,OAF0H,IAAI,KAAK,aAAa,OAAU,CAAC,MAAM,WAAW,SAASA,EAAa,gBAAgB,cAAc,CAAC,EAAE,OAAO,CAAC,EAC5M,QAAQ,aAAa,EAAE,IAC9BA,CAAa,MAAS,CAAC,MAAO,EAAM,CAAC,EAAiB,SAARE,GAAiCC,EAAM,CAAC,GAAK,CAAC,iBAAAC,EAAiB,YAAAC,EAAY,OAAO,CAAC,aAAAC,EAAa,WAAAC,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ice", "props", "shopifyProductID", "canvasPrice", "showCurrency", "showSymbol", "showDecimals", "isBrowser", "useIsBrowser", "product", "setProduct", "ye", "activeVariant", "setActiveVariant", "subscriptionPrice", "setSubscriptionPrice", "selectedCurrency", "setSelectedCurrency", "selectedCountryCode", "setSelectedCountryCode", "selectedCountry", "setSelectedCountry", "isLoadingPrice", "setIsLoadingPrice", "ue", "storedCurrency", "storedCountryCode", "storedCountry", "handleVariantChange", "e", "_matchingProduct", "window", "_product", "matchingVariant", "node", "option", "detailOption", "handleCurrencyChange", "event", "currency", "countryCode", "country", "activeOption", "handleProductsReady", "handleSubscriptionPriceUpdate", "_currencyCode", "se", "variantCurrency", "get_default", "productCurrency", "showMockValues", "RenderTarget", "formatPriceWithOptions", "numericPrice", "currCode", "symbolSameAsCode", "locale", "getLocaleFromCountry", "decimalDigits", "navigator", "number", "text", "amount", "compareAtPrice", "numericValue", "hasValidCompareAtPrice", "p", "addPropertyControls", "ControlType", "FC_ProductPurchaseButton", "props", "shopifyProductID", "available", "OutOfStock", "SelectVariant", "LoadingState", "shopifyProductVariantId", "BuyNowATC", "title", "required", "product", "setProduct", "ye", "activeVariant", "setActiveVariant", "isInStock", "setIsInStock", "needsVariantSelection", "setNeedsVariantSelection", "isLoading", "setIsLoading", "shouldShowLoading", "setShouldShowLoading", "hasInitialized", "setHasInitialized", "countryCode", "setCountryCode", "isBrowser", "useIsBrowser", "planSelected", "setPlanSelected", "cartExistingData", "setCartExistingData", "errorMessage", "setErrorMessage", "productQuantity", "setProductQuantity", "viewContentFired", "pe", "autoSelectFirst", "setAutoSelectFirst", "autoSelectReceived", "setAutoSelectReceived", "isVariantManuallySelected", "setIsVariantManuallySelected", "ue", "handleAutoSelectFlag", "event", "calculateTotalInventory", "te", "productData", "get_default", "total", "node", "isVariantAvailable", "variant", "window", "savedCartId", "cartQuery", "data", "error", "handleSubscriptionChange", "handleQuantityChange", "handleCurrencyChange", "existingCartId", "updateData", "updateCartCurrency", "handleSingleVariantProduct", "productNode", "variants", "handleProductData", "_matchingProduct", "variantId", "matchingVariant", "firstAvailableVariant", "edge", "anyVariantAvailable", "productsReadyHandler", "matchingProduct", "variantChangeHandler", "e", "currency", "value", "item_id", "item_name", "price", "hasMultipleVariants", "handleSingleVariantProducts", "handleSubscription", "mutation", "variables", "handleCartMutation", "isValidId", "id", "fullId", "orderFieldError", "setOrderFieldError", "logDebug", "message", "validateOrderField", "productSpecificKey", "storedAttributes", "attributes", "isValid", "handleOrderFieldChange", "isInputRequired", "setIsInputRequired", "checkInputRequirement", "configKey", "config", "getLineItem", "merchandiseId", "lineItem", "stored", "key", "maxQuantityReached", "setMaxQuantityReached", "getCurrentCartQuantity", "handleAddToCart", "currentCartQuantity", "totalRequestedQuantity", "adjustedQuantity", "currentInputValue", "lines", "cartData", "addToCartMutation", "activeProduct", "createCartMutation", "checkoutUrl", "finalCheckoutUrl", "appendUTMParamsToUrl", "appendLanguageToUrl", "cartId", "updateCartAttributes", "timer", "content", "RenderTarget", "canAddToCart", "handleClick", "shouldBeAtMax", "clonedElement", "q", "p", "debugInfo", "u", "currentInCart", "remainingAllowed", "handleQuantityMaxReached", "productId", "maxQuantity", "addPropertyControls", "ControlType", "containerStyles", "emptyStateStyle", "defaultEvents", "ControlType", "fontSizeOptions", "fontControls", "font", "useOnEnter", "onEnter", "enabled", "useOnSpecificTargetChange", "useOnExit", "onExit", "goal", "callback", "isInTarget", "useIsInCurrentNavigationTarget", "ue", "borderRadiusControl", "ControlType", "paddingControl", "ControlType", "Indicators", "DotWave", "color", "animation", "circles", "delay", "ease", "duration", "animProps", "transition", "p", "motion", "circle", "Material", "IOS", "arrayRotate", "arr", "n", "lines", "l", "i", "lineOpacities", "lineKeyframes", "getIndicator", "indicator", "props", "Indicators", "handleTimeout", "callback", "id", "Loading", "onTimeout", "fadeOut", "hasDuration", "onClick", "onMouseDown", "onMouseUp", "onMouseEnter", "onMouseLeave", "style", "controls", "useAnimation", "animDuration", "animDelay", "currentIndicator", "handlers", "pe", "onFadeOut", "te", "resetOpacity", "useOnEnter", "useOnExit", "cleanup", "ue", "addPropertyControls", "ControlType", "defaultEvents"]
}
