{"version":3,"file":"Frameship.BxquuwsL.mjs","names":["ShopifyDataType","FrameshipUpgradeBanner"],"sources":["https:/framerusercontent.com/modules/gd3dcT3w5rYoRy7ZcKte/ynLwCe8GqEfFnZbs0Ao6/Shared.js","https:/framerusercontent.com/modules/ibjYTPLnMMPhPLNCj4uG/S2MuV2jfBPUaq2chuOlb/Cart.js","https:/framerusercontent.com/modules/1kPVCHEEg0BrtObiM14s/rN5yWXt4zxCjS0WXq3nL/Frameship.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{ControlType}from\"framer\";import{cloneElement,useMemo,useId}from\"react\";import{motion}from\"framer-motion\";import CurrencySymbols from\"https://framerusercontent.com/modules/pJIZxaEdKo1uS87sS4xM/4PSl3AVmNoISomoZ0s7m/CurrencySymbols.js\";export const UPGRADE_LINK=\"https://buy.stripe.com/cN29CT5gi1spb5e9AN\";export var ShopifyDataType;(function(ShopifyDataType){ShopifyDataType[\"Product\"]=\"gid://shopify/Product/\";ShopifyDataType[\"ProductVariant\"]=\"gid://shopify/ProductVariant/\";ShopifyDataType[\"ProductOption\"]=\"gid://shopify/ProductOption/\";})(ShopifyDataType||(ShopifyDataType={}));export const SHOPIFY_ID_ATTRIBUTE=\"frameship-shopify-id\";export const OPEN_CART_EVENT=\"frameship-open-cart\";export const DEFAULT_TRANSITION={type:\"spring\",duration:.2,bounce:0};export const Colors={Primary:{color:\"#000\",fill:\"#F3F3F3\",fillA:\"#F3F3F3\",fillB:\"#999999\"},Accent:{color:\"#FFF\",fill:\"#111\",fillA:\"#5E5E5E\",fillB:\"#111\"}};const CHARACTERS=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";const EMPTY_SHOPIFY_DATA={shopifyId:\"\",tracksInventory:false,variants:[]};const shopifyDataCache={};export function parseShopifyId(id,type){if(typeof id!==\"string\"){return\"\";}if(id.startsWith(type)){return id;}return`${type}${id}`;}export function parseShopifyData(shopifyData){if(!shopifyData){return EMPTY_SHOPIFY_DATA;}const cachedData=shopifyDataCache[shopifyData];if(cachedData){return cachedData;}try{const data=JSON.parse(shopifyData);const parsedData={shopifyId:parseShopifyId(data.id,\"gid://shopify/Product/\"),tracksInventory:data.tracksInventory?true:false,variants:Array.isArray(data.variants)?data.variants.map(variant=>({...variant,id:parseShopifyId(variant.id,\"gid://shopify/ProductVariant/\")})):[]};shopifyDataCache[shopifyData]=parsedData;return parsedData;}catch(error){console.error(\"Error parsing Shopify data:\",error);return EMPTY_SHOPIFY_DATA;}}export const generateInstanceId=()=>{const id=useMemo(()=>{let result=\"\";for(let i=0;i<13;i++){result+=CHARACTERS.charAt(Math.floor(Math.random()*CHARACTERS.length));}return result;},[]);return id;};export const useInstanceId=()=>{const id=useId();const cleanId=id.replace(/:/g,\"\");const instanceId=`superfields-${cleanId}`;return instanceId;};export function styleLayer(layer,style){layer=Array.isArray(layer)?layer[0]:layer;let newLayer=layer;const width=style?.width;const height=style?.height;if(layer&&layer.props&&style&&(width||height)){if(typeof layer.type===\"function\"&&typeof layer.props.children===\"object\"){newLayer=/*#__PURE__*/cloneElement(layer,{children:{...layer.props.children,props:{...layer.props.children.props,style:{...layer.props.children.props.style,...width&&{width},...height&&{height}}}}});}else{newLayer=/*#__PURE__*/cloneElement(layer,{style:{...layer.props.style,...width&&{width},...height&&{height}}});}}return newLayer;}export function Icon({image,color,size,style={},defaultImage}){let colorValue=color||(image?.src?undefined:\"#999\");return /*#__PURE__*/_jsx(\"div\",{\"aria-label\":image?.alt,style:{width:size,height:size,minWidth:size,minHeight:size,pointerEvents:\"none\",backgroundColor:colorValue,backgroundImage:colorValue?\"none\":`url('${image?.src}')`,maskImage:image?.src?`url('${image?.src}')`:defaultImage,backgroundSize:\"contain\",backgroundPosition:\"center\",maskSize:\"contain\",maskPosition:\"center\",...style}});}Icon.displayName=\"Frameship/Icon\";export function iconProp({buttonTitle=\"Icon\",size=24,object=true}={}){return{type:ControlType.Object,buttonTitle,optional:true,defaultValue:{color:\"#000\",size},controls:{image:{type:ControlType.ResponsiveImage},color:{type:ControlType.Color,optional:true,defaultValue:\"#000\"},size:{type:ControlType.Number,defaultValue:size,min:1,step:1,displayStepper:true}}};}export function Button({tag=\"button\",fill,color,shadows,border,radius,padding,font,opacity,bgBlur,transition,variant=\"\",children,style,animate,...otherProps}){let background=\"none\";if(fill){if(fill.type===\"color\"){background=fill[`${variant}Color`]||fill.defaultColor;}else{background=`linear-gradient(${fill.gradientAngle}deg, ${fill[`${variant}ColorB`]||fill.defaultColorB}, ${fill[`${variant}ColorA`]||fill.defaultColorA})`;}}const Tag=motion[tag];const addWrapper=tag===\"input\";const elementChildren=[children,border&&/*#__PURE__*/_jsx(motion.div,{animate:{borderColor:border[`${variant}Color`]||border.defaultColor},style:{position:\"absolute\",inset:0,borderWidth:border.width,borderStyle:border.style,borderRadius:radius,pointerEvents:\"none\"},initial:false,transition:transition})];let element=/*#__PURE__*/_jsx(Tag,{style:{position:\"relative\",borderRadius:radius,padding:padding,textAlign:\"center\",appearance:\"none\",border:\"none\",backdropFilter:bgBlur?`blur(${bgBlur}px)`:undefined,...font,...style},animate:{background,color:typeof color===\"object\"?color[`${variant}Color`]||color.defaultColor:color,boxShadow:typeof shadows===\"object\"?shadows[`${variant}Shadows`]||shadows.defaultShadows:shadows,opacity:typeof opacity===\"object\"?typeof opacity[variant]===\"number\"?opacity[variant]:opacity.default:1,...animate},initial:false,transition:transition,children:addWrapper?undefined:elementChildren,...otherProps});if(addWrapper){element=/*#__PURE__*/_jsxs(\"div\",{style:{display:\"contents\"},children:[element,elementChildren]});}return element;}Button.displayName=\"Frameship/Button\";export function createButtonPropertyControls({variants=[],font=true,color=true,placeholder=false,opacity=false,padding=\"10px\",hidden={},endProps={},lastControlDescription=\"\"}){const allVariants=variants.length?variants:[{id:\"default\",title:\"Default\",optional:false,...Colors.Primary}];const colorControls={};const placeholderControls={};const fillControls={};const borderControls={};const shadowsControls={};const opacityControls={};const defaultColorValues={};const defaultPlaceholderValues={};const defaultFillValues={type:\"color\",gradientAngle:0};const defaultBorderValues={width:\"1px\",style:\"solid\"};const defaultOpacityValues={};let hasDefaultBorder=allVariants.some(variant=>variant.borderColor);for(const variant of allVariants){const isDefault=variant.id===\"default\";const optional=variant.optional??true;colorControls[`${variant.id}Color`]={type:ControlType.Color,optional,defaultValue:variant.color,title:isDefault?\"Color\":variant.title};if(placeholder){placeholderControls[`${variant.id}Color`]={type:ControlType.Color,optional,defaultValue:variant.placeholder,title:isDefault?\"Color\":variant.title};}fillControls[`${variant.id}Color`]={type:ControlType.Color,optional,defaultValue:variant.fill,title:isDefault?\"Color\":variant.title,hidden:props=>props.type!=\"color\"};fillControls[`${variant.id}ColorA`]={type:ControlType.Color,optional,defaultValue:variant.fillA,title:isDefault?\"Colors\":variant.title,hidden:props=>props.type!=\"linearGradient\"};fillControls[`${variant.id}ColorB`]={type:ControlType.Color,optional,defaultValue:variant.fillB,title:\" \",hidden:props=>props.type!=\"linearGradient\"};borderControls[`${variant.id}Color`]={type:ControlType.Color,optional,defaultValue:variant.borderColor||(variants.length===1?\"#222\":undefined),title:isDefault?\"Color\":variant.title};shadowsControls[`${variant.id}Shadows`]={type:ControlType.BoxShadow,title:variant.title};if(opacity){opacityControls[variant.id]={type:ControlType.Number,title:variant.title,defaultValue:typeof variant.opacity===\"number\"?variant.opacity:1,min:0,max:1,step:.01};}}for(const prop of Object.keys(colorControls)){defaultColorValues[prop]=colorControls[prop].defaultValue;}for(const prop of Object.keys(placeholderControls)){defaultPlaceholderValues[prop]=placeholderControls[prop].defaultValue;}for(const prop of Object.keys(fillControls)){defaultFillValues[prop]=fillControls[prop].defaultValue;}for(const prop of Object.keys(borderControls)){defaultBorderValues[prop]=borderControls[prop].defaultValue;}for(const prop of Object.keys(opacityControls)){defaultOpacityValues[prop]=opacityControls[prop].defaultValue;}const showTransition=variants.length>0;return{font:font?{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:14,lineHeight:1.4},hidden:hidden[\"font\"]}:undefined,color:color?variants.length?{type:ControlType.Object,defaultValue:defaultColorValues,controls:colorControls,buttonTitle:\"Font Color\"}:colorControls[\"default\"]:undefined,placeholder:placeholder?variants.length?{type:ControlType.Object,defaultValue:defaultPlaceholderValues,controls:placeholderControls,hidden:hidden[\"placeholder\"]}:{...placeholderControls[\"default\"],hidden:hidden[\"placeholder\"]}:undefined,fill:{type:ControlType.Object,optional:true,defaultValue:defaultFillValues,controls:{type:{type:ControlType.Enum,options:[\"color\",\"linearGradient\"],optionTitles:[\"Color\",\"Gradient\"],displaySegmentedControl:true},...fillControls,gradientAngle:{type:ControlType.Number,defaultValue:0,title:\"Angle\",step:1,min:0,max:360,unit:\"\\xb0\",hidden:props=>props.type!=\"linearGradient\"}}},radius:{type:ControlType.BorderRadius,defaultValue:\"10px\"},padding:{type:ControlType.Padding,defaultValue:padding},border:{type:ControlType.Object,optional:true,defaultValue:hasDefaultBorder?defaultBorderValues:undefined,controls:{...borderControls,width:{type:ControlType.Padding,defaultValue:defaultBorderValues.width},style:{type:ControlType.Enum,defaultValue:defaultBorderValues.style,options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}},shadows:variants.length?{type:ControlType.Object,optional:true,controls:shadowsControls}:{type:ControlType.BoxShadow},opacity:opacity?{type:ControlType.Object,controls:opacityControls}:undefined,bgBlur:{type:ControlType.Number,min:0,max:100,step:1,displayStepper:true,title:\"BG Blur\",description:!showTransition?lastControlDescription:undefined},...endProps,transition:showTransition?{type:ControlType.Transition,defaultValue:DEFAULT_TRANSITION,description:lastControlDescription}:undefined};}export function Message({title,subtitle}){return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",width:\"100%\",height:\"100%\",placeContent:\"center\",placeItems:\"center\",flexDirection:\"column\",gap:16,backgroundColor:\"rgba(136, 85, 255, 0.1)\",borderRadius:6,border:\"1px dashed rgb(136, 85, 255)\",color:\"rgb(136, 85, 255)\",fontSize:16,padding:20,minHeight:200,textWrap:\"balance\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontWeight:600,textAlign:\"center\"},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,opacity:.7,lineHeight:1.5,textAlign:\"center\"},children:subtitle})]});}Message.displayName=\"Frameship/Message\";export function currencyFormatProp({title=\"Format\",startProps={},hidden=null}={}){return{type:ControlType.Object,title,hidden,controls:{...startProps,style:{type:ControlType.Enum,defaultValue:\"symbol\",options:[\"symbol\",\"code\"],optionTitles:[\"Symbol ($)\",\"Code (USD)\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},location:{type:ControlType.Enum,defaultValue:\"after\",options:[\"before\",\"after\"],optionTitles:[\"Before\",\"After\"],displaySegmentedControl:true,hidden:props=>props.style!==\"code\"},decimals:{type:ControlType.Enum,defaultValue:\"auto\",options:[\"auto\",\"always\",\"never\"],optionTitles:[\"Auto\",\"Show (10.00)\",\"Hide (10)\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},formatted:{type:ControlType.Boolean,defaultValue:true},locale:{type:ControlType.String,defaultValue:\"\",placeholder:`Auto (${typeof navigator!==\"undefined\"?navigator.language:\"\"})`,description:\"Formatting examples:\\n*1,000* | *1.000* | *1 000*\",hidden:props=>!props.formatted}}};}export function formatCurrency(amount,currencyCode,options){amount=amount||0;const showDecimals=options.decimals==\"auto\"?amount%1!==0:options.decimals==\"always\";const decimals=showDecimals?2:0;let formattedAmount=\"\";if(options.formatted&&typeof Intl!==\"undefined\"){const locale=options.locale||(typeof navigator!==\"undefined\"?navigator.language:\"en-us\");const formatter=new Intl.NumberFormat(locale,{minimumFractionDigits:decimals,maximumFractionDigits:decimals});formattedAmount=formatter.format(amount);}else{formattedAmount=amount.toFixed(decimals);}if(!currencyCode||currencyCode===\"XXX\"){return formattedAmount;}const symbol=CurrencySymbols[currencyCode];if(options.style===\"code\"){return options.location===\"before\"?`${currencyCode} ${formattedAmount}`:`${formattedAmount} ${currencyCode}`;}else{return`${symbol}${formattedAmount}`;}}export function generateVariantTitle(variant,labelOptions){if(!variant||!Array.isArray(variant.selectedOptions)||!variant.selectedOptions.length||variant.title===\"Default Title\"){return\"\";}if(!labelOptions){return variant.title;}switch(labelOptions.style){case\"default\":return variant.selectedOptions.map(option=>option.value).join(labelOptions.separator);case\"multiline\":return variant.selectedOptions.map(option=>option.name+labelOptions.multilineSeparator+option.value).join(\"\\n\");}return variant.title||\"\";}\nexport const __FramerMetadata__ = {\"exports\":{\"Icon\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"createButtonPropertyControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Button\":{\"type\":\"reactComponent\",\"name\":\"Button\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"styleLayer\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"iconProp\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useInstanceId\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseShopifyId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatCurrency\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"generateInstanceId\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"generateVariantTitle\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"UPGRADE_LINK\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SHOPIFY_ID_ATTRIBUTE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"DEFAULT_TRANSITION\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseShopifyData\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyDataType\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Message\":{\"type\":\"reactComponent\",\"name\":\"Message\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"OPEN_CART_EVENT\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Colors\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"currencyFormatProp\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Shared.map","import create from\"zustand\";import{persist}from\"zustand/middleware\";import{useState,useEffect}from\"react\";import{parseShopifyData}from\"https://framerusercontent.com/modules/gd3dcT3w5rYoRy7ZcKte/ynLwCe8GqEfFnZbs0Ao6/Shared.js\";const CART_ID_STORAGE_ID=\"frameship-shopify-cart-id\";const frameshipDataCache={};async function fetchShopifyData(query,variables={}){const{shopUrl,accessToken}=getFrameshipInfo();if(!shopUrl||!accessToken){console.warn(\"Missing shop URL or access token\");return null;}try{const response=await fetch(`https://${shopUrl}/api/2024-10/graphql.json`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"X-Shopify-Storefront-Access-Token\":accessToken},body:JSON.stringify({query,variables})});const value=await response.json();return value?value.data:null;}catch(error){console.error(error);return null;}}// Add this shared fragment for cart fields\nconst CART_FRAGMENT=`\n  fragment CartFields on Cart {\n    id\n    checkoutUrl\n    cost {\n      subtotalAmount {\n        amount\n        currencyCode\n      }\n    }\n    lines(first: 10) {\n      edges {\n        node {\n          id\n          quantity\n          cost {\n            subtotalAmount {\n              amount\n              currencyCode\n            }\n            compareAtAmountPerQuantity {\n              amount\n              currencyCode\n            }\n          }\n          merchandise {\n            ... on ProductVariant {\n              id\n              title\n              price {\n                amount\n                currencyCode\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n`;export const useCartStore=create(persist((set,get)=>({cartId:null,items:[],loading:false,error:null,checkoutUrl:null,subtotal:null,initializeCart:async(createNewCart=false)=>{if(get().items.length>0){return;}set({loading:true});try{const cartId=get().cartId;if(cartId){const cart=await fetchCart(cartId);set({items:cart.lines.edges.map(edge=>edge.node),checkoutUrl:cart.checkoutUrl,subtotal:cart.cost.subtotalAmount,loading:false});}else if(createNewCart){const newCart=await createCart();set({cartId:newCart.id,items:[],checkoutUrl:newCart.checkoutUrl,subtotal:newCart.cost.subtotalAmount,loading:false});}}catch(error){set({error:error.message,loading:false});}},addToCart:async(variantId,quantity)=>{set({loading:true});try{// Initialize cart if needed\n    if(!get().cartId){await get().initializeCart(true);}const cartId=get().cartId;const updatedCart=await addToCart(cartId,variantId,quantity);set({items:updatedCart.lines.edges.map(edge=>edge.node),subtotal:updatedCart.cost.subtotalAmount,loading:false});}catch(error){set({error:error.message,loading:false});}},removeFromCart:async lineId=>{set({loading:true});try{const cartId=get().cartId;const updatedCart=await removeFromCart(cartId,lineId);set({items:updatedCart.lines.edges.map(edge=>edge.node),subtotal:updatedCart.cost.subtotalAmount,loading:false});}catch(error){set({error:error.message,loading:false});}},setCartItemQuantity:async(lineId,quantity)=>{set({loading:true});try{const cartId=get().cartId;const updatedCart=await updateCartLineQuantity(cartId,lineId,quantity);set({items:updatedCart.lines.edges.map(edge=>edge.node),subtotal:updatedCart.cost.subtotalAmount,loading:false});}catch(error){set({error:error.message,loading:false});}},getCheckoutUrl:()=>{return get().checkoutUrl||\"\";},clearError:()=>set({error:null})}),{name:CART_ID_STORAGE_ID,partialize:state=>({cartId:state.cartId})}));async function createCart(){const mutation=`\n    ${CART_FRAGMENT}\n    mutation {\n      cartCreate {\n        cart {\n          ...CartFields\n        }\n      }\n    }\n  `;const data=await fetchShopifyData(mutation);return data?data.cartCreate.cart:null;}async function fetchCart(cartId){const query=`\n    ${CART_FRAGMENT}\n    query($cartId: ID!) {\n      cart(id: $cartId) {\n        ...CartFields\n      }\n    }\n  `;const variables={cartId};const data=await fetchShopifyData(query,variables);return data?data.cart:null;}async function addToCart(cartId,variantId,quantity){const mutation=`\n    ${CART_FRAGMENT}\n    mutation($cartId: ID!, $lines: [CartLineInput!]!) {\n      cartLinesAdd(cartId: $cartId, lines: $lines) {\n        cart {\n          ...CartFields\n        }\n        userErrors {\n          field\n          message\n        }\n      }\n    }\n  `;const variables={cartId,lines:[{quantity:quantity,merchandiseId:variantId}]};try{const data=await fetchShopifyData(mutation,variables);if(data&&data.cartLinesAdd.userErrors.length>0){const cartNotFoundError=data.cartLinesAdd.userErrors.find(e=>e.message===\"The specified cart does not exist.\");if(cartNotFoundError){// Create new cart and retry adding the item\nconst newCart=await createCart();const retryVariables={cartId:newCart.id,lines:[{quantity:quantity,merchandiseId:variantId}]};const retryData=await fetchShopifyData(mutation,retryVariables);if(retryData&&retryData.cartLinesAdd.userErrors.length>0){throw new Error(retryData.cartLinesAdd.userErrors.map(e=>e.message).join(\", \"));}return retryData.cartLinesAdd.cart;}throw new Error(data.cartLinesAdd.userErrors.map(e=>e.message).join(\", \"));}return data?data.cartLinesAdd.cart:null;}catch(error){throw error;}}async function removeFromCart(cartId,lineId){const mutation=`\n    ${CART_FRAGMENT}\n    mutation($cartId: ID!, $lineIds: [ID!]!) {\n      cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n        cart {\n          ...CartFields\n        }\n      }\n    }\n  `;const variables={cartId,lineIds:[lineId]};const data=await fetchShopifyData(mutation,variables);return data?data.cartLinesRemove.cart:null;}export async function getAmountInStock(productId){const query=`\n\t\tquery getInventory($id: ID!) {\n\t\t\tproduct(id: $id) {\n\t\t\t\tvariants(first: 100) {\n\t\t\t\t\tedges {\n\t\t\t\t\t\tnode {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tquantityAvailable\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t`;const variables={id:productId};try{const data=await fetchShopifyData(query,variables);const inventoryByVariant={};if(data){for(const edge of data.product.variants.edges){inventoryByVariant[edge.node.id]=edge.node.quantityAvailable;}}return inventoryByVariant;}catch(error){console.error(\"Error fetching inventory:\",error);throw error;}}export function useAmountInStock(shopifyData){const{shopifyId}=parseShopifyData(shopifyData);const[inventory,setInventory]=useState({});const[isLoading,setIsLoading]=useState(true);useEffect(()=>{setIsLoading(true);getAmountInStock(shopifyId).then(value=>{setInventory(value);setIsLoading(false);});},[shopifyId]);return[inventory,isLoading];}async function updateCartLineQuantity(cartId,lineId,quantity){const mutation=`\n    ${CART_FRAGMENT}\n    mutation($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n      cartLinesUpdate(cartId: $cartId, lines: $lines) {\n        cart {\n          ...CartFields\n        }\n        userErrors {\n          field\n          message\n        }\n      }\n    }\n  `;const variables={cartId,lines:[{id:lineId,quantity:quantity}]};const data=await fetchShopifyData(mutation,variables);if(data&&data.cartLinesUpdate.userErrors.length>0){throw new Error(data.cartLinesUpdate.userErrors.map(e=>e.message).join(\", \"));}return data?data.cartLinesUpdate.cart:null;}export async function generateBuyNowCheckoutUrl(variantId,quantity=1){const mutation=`\n\t\tmutation($input: CartInput!) {\n\t\t\tcartCreate(input: $input) {\n\t\t\t\tcart {\n\t\t\t\t\tcheckoutUrl\n\t\t\t\t}\n\t\t\t\tuserErrors {\n\t\t\t\t\tfield\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t`;const variables={input:{lines:[{quantity:quantity,merchandiseId:variantId}]}};try{const data=await fetchShopifyData(mutation,variables);if(data&&data.cartCreate.userErrors.length>0){throw new Error(data.cartCreate.userErrors.map(e=>e.message).join(\", \"));}return data?data.cartCreate.cart.checkoutUrl:null;}catch(error){console.error(\"Error creating buy now cart:\",error);throw error;}}export function getFrameshipInfo(){let shopUrl=\"\";let accessToken=\"\";let stagingDomain=\"\";let productionDomain=\"\";let isCreatorLicense=false;let hasAccess=false;if(typeof document!==\"undefined\"&&typeof window!==\"undefined\"){const hostname=window.location.hostname;const isPreview=hostname.endsWith(\".framercanvas.com\");if(isPreview){hasAccess=true;}const frameshipIdComponent=document.querySelector(\"div[data-frameship-id]\");if(frameshipIdComponent){const frameshipId=frameshipIdComponent.getAttribute(\"data-frameship-id\")||\"\";const frameshipData=parseFrameshipData(frameshipId);const newHasAccess=hasFrameshipAccess(frameshipData.stagingDomain,frameshipData.productionDomain);hasAccess=newHasAccess;if(hasAccess){shopUrl=frameshipData.shopUrl||\"\";accessToken=frameshipData.shopifyAccessToken||\"\";stagingDomain=frameshipData.stagingDomain||\"\";productionDomain=frameshipData.productionDomain||\"\";isCreatorLicense=frameshipData.isCreatorLicense??false;}}else{const frameshipComponent=document.querySelector(\"div[data-frameship-component]\");if(frameshipComponent){const newStagingDomain=frameshipComponent.getAttribute(\"data-staging-domain\")||\"\";const newProductionDomain=frameshipComponent.getAttribute(\"data-production-domain\")||\"\";const newHasAccess=hasFrameshipAccess(newStagingDomain,newProductionDomain);hasAccess=newHasAccess;if(hasAccess){shopUrl=frameshipComponent.getAttribute(\"data-shop-url\")||\"\";accessToken=frameshipComponent.getAttribute(\"data-shopify-access-token\")||\"\";stagingDomain=newStagingDomain;productionDomain=newProductionDomain;}}}}else{hasAccess=true// Show as having access in optimized version of site\n;}return{shopUrl,accessToken,stagingDomain,productionDomain,hasAccess,isCreatorLicense};}export function hasFrameshipAccess(stagingDomain,productionDomain){if(typeof document===\"undefined\"||typeof window===\"undefined\"){return true;}const hostname=window.location.hostname;const isPreview=hostname.endsWith(\".framercanvas.com\");const stagingDomainValue=(stagingDomain||\"\").replace(\"https://\",\"\");const productionDomainValue=(productionDomain||\"\").replace(\"https://\",\"\");if(isPreview||hostname===stagingDomainValue||hostname===productionDomainValue){return true;}else{return false;}}export function parseFrameshipData(frameshipData){if(!frameshipData||typeof frameshipData!==\"string\"){return{};}if(frameshipDataCache.hasOwnProperty(frameshipData)){return frameshipDataCache[frameshipData];}try{const decoded=decodeFromBase64WithoutPadding(rot13(reverseString(frameshipData)));const data=JSON.parse(decoded);// Validate required properties exist\nif(!data||typeof data!==\"object\"){return{};}const value={shopUrl:typeof data.a===\"string\"?data.a:\"\",shopifyAccessToken:typeof data.b===\"string\"?data.b:\"\",productionDomain:typeof data.c===\"string\"?data.c:\"\",stagingDomain:typeof data.d===\"string\"?data.d:\"\",isCreatorLicense:typeof data.e===\"boolean\"?data.e:false};frameshipDataCache[frameshipData]=value;return value;}catch(error){return{};}}function decodeFromBase64WithoutPadding(base64WithoutPadding){try{// Calculate and add back the required padding\nconst padding=base64WithoutPadding.length%4;const paddedBase64=padding?base64WithoutPadding+\"=\".repeat(4-padding):base64WithoutPadding;// Decode the base64 string back to the original string\nreturn atob(paddedBase64);}catch(error){console.error(\"Error decoding base64:\",error);return\"\";}}function rot13(str){return str.replace(/[A-Za-z]/g,function(char){const charCode=char.charCodeAt(0);const baseCharCode=char.toUpperCase()===char?65:97;return String.fromCharCode((charCode-baseCharCode+13)%26+baseCharCode);});}function reverseString(str){return str.split(\"\").reverse().join(\"\");}\nexport const __FramerMetadata__ = {\"exports\":{\"getAmountInStock\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getFrameshipInfo\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useCartStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hasFrameshipAccess\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"generateBuyNowCheckoutUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseFrameshipData\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useAmountInStock\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Cart.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{createPortal}from\"react-dom\";import{useEffect,useState}from\"react\";import{hasFrameshipAccess,parseFrameshipData,useCartStore}from\"https://framerusercontent.com/modules/ibjYTPLnMMPhPLNCj4uG/S2MuV2jfBPUaq2chuOlb/Cart.js\";import{UPGRADE_LINK}from\"https://framerusercontent.com/modules/gd3dcT3w5rYoRy7ZcKte/ynLwCe8GqEfFnZbs0Ao6/Shared.js\";import FrameshipUpgradeBanner from\"https://framerusercontent.com/modules/b6p2QQlcwhhLAA5Operm/q9t93k88yG1i00iu3f0n/LOQtD1uPa.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerDisableUnlink\n */export default function Frameship(props){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[portalContainer,setPortalContainer]=useState(null);const initializeCart=useCartStore(state=>state.initializeCart);useEffect(()=>{initializeCart?.();},[]);const attributes={};let stagingDomain=\"\";let productionDomain=\"\";if(props.frameshipData){attributes[\"data-frameship-id\"]=props.frameshipData;const frameshipData=parseFrameshipData(props.frameshipData);stagingDomain=frameshipData.stagingDomain;productionDomain=frameshipData.productionDomain;}else{attributes[\"data-frameship-component\"]=true;if(props.shopUrl){attributes[\"data-shop-url\"]=props.shopUrl;}if(props.shopifyAccessToken){attributes[\"data-shopify-access-token\"]=props.shopifyAccessToken;}if(props.productionDomain){attributes[\"data-production-domain\"]=props.productionDomain;}if(props.stagingDomain){attributes[\"data-staging-domain\"]=props.stagingDomain;}stagingDomain=props.stagingDomain;productionDomain=props.productionDomain;}const hasAccess=hasFrameshipAccess(stagingDomain,productionDomain);useEffect(()=>{if(!isCanvas){const container=document.createElement(\"div\");document.body.appendChild(container);setPortalContainer(container);return()=>{document.body.removeChild(container);};}},[]);return /*#__PURE__*/_jsx(\"div\",{...attributes,children:!isCanvas&&portalContainer&&!hasAccess&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",left:20,bottom:20},children:/*#__PURE__*/_jsx(FrameshipUpgradeBanner,{link:UPGRADE_LINK})}),portalContainer)});}Frameship.displayName=\"Frameship (Shopify)\";addPropertyControls(Frameship,{frameshipData:{type:ControlType.String,defaultValue:\"\",preventLocalization:true,hidden:()=>true},shopUrl:{type:ControlType.String,defaultValue:\"\",title:\"Shop URL\",preventLocalization:true,hidden:()=>true},shopifyAccessToken:{type:ControlType.String,defaultValue:\"\",preventLocalization:true,hidden:()=>true},productionDomain:{type:ControlType.String,defaultValue:\"\",preventLocalization:true,hidden:()=>true},stagingDomain:{type:ControlType.String,defaultValue:\"\",preventLocalization:true,hidden:()=>true},note:{type:ControlType.Enum,options:[\"IMPORTANT\"],displaySegmentedControl:true,description:\"*Do not delete this component.*\\n\\nThis component is managed by the [Frameship plugin](https://www.framer.com/marketplace/plugins/frameship--5sty6o8n22smpbcb4oypsggk6/)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Frameship\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"6kBAAqzF,SAAgB,EAAK,CAAC,QAAM,QAAM,OAAK,QAAM,CAAE,EAAC,eAAa,CAAC,CAAC,IAAI,EAAW,IAAQ,GAAO,QAAA,GAAc,QAAQ,MAAoB,GAAK,MAAM,CAAC,aAAa,GAAO,IAAI,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,SAAS,EAAK,UAAU,EAAK,cAAc,OAAO,gBAAgB,EAAW,gBAAgB,EAAW,QAAQ,OAAO,GAAO,IAAI,IAAI,UAAU,GAAO,KAAK,OAAO,GAAO,IAAI,IAAI,EAAa,eAAe,UAAU,mBAAmB,SAAS,SAAS,UAAU,aAAa,SAAS,GAAG,CAAM,CAAC,EAAC,AAAE,CAA2Y,SAAgB,EAAO,CAAC,MAAI,SAAS,OAAK,QAAM,UAAQ,SAAO,SAAO,UAAQ,OAAK,UAAQ,SAAO,aAAW,UAAQ,GAAG,WAAS,QAAM,UAAQ,GAAG,EAAW,CAAC,CA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