"use strict";const mutations=require("./mutations-6e603e86.js");require("./address-7404695f.js");const currentCheckout=()=>mutations.getCheckout(mutations.state.formId,mutations.state.mode),checkoutIsLocked=(e="")=>{var t;return e?mutations.state.locks.some((t=>t===e)):!!(null===(t=mutations.state.locks)||void 0===t?void 0:t.length)},getLineItemByProductId=e=>{var t,i;return((null===(i=null===(t=mutations.state.checkout)||void 0===t?void 0:t.line_items)||void 0===i?void 0:i.data)||[]).find((t=>{var i,s;return(null===(s=null===(i=null==t?void 0:t.price)||void 0===i?void 0:i.product)||void 0===s?void 0:s.id)===e}))},fullShippingAddressRequired=()=>{var e;return"full"===(null===(e=mutations.state.checkout)||void 0===e?void 0:e.shipping_address_accuracy_requirement)},shippingAddressRequired=()=>{var e,t;return"full"===(null===(e=mutations.state.checkout)||void 0===e?void 0:e.shipping_address_accuracy_requirement)||"tax"===(null===(t=mutations.state.checkout)||void 0===t?void 0:t.shipping_address_accuracy_requirement)},getResolvedBillingAddress=e=>{const t=e||mutations.state.checkout,i=!1===(null==t?void 0:t.billing_matches_shipping)&&(null==t?void 0:t.billing_address)?t.billing_address:void 0,s=(null==i?void 0:i.line_1)?i:null==t?void 0:t.shipping_address;if(null==s?void 0:s.line_1)return s},toStripeAddress=e=>{if(!(null==e?void 0:e.line_1))return;const{line_1:t,line_2:i,city:s,state:d,country:r,postal_code:o}=e;return{line1:t,line2:i,city:s,state:d,postal_code:o,country:r}};exports.checkoutIsLocked=checkoutIsLocked,exports.currentCheckout=currentCheckout,exports.fullShippingAddressRequired=fullShippingAddressRequired,exports.getLineItemByProductId=getLineItemByProductId,exports.getResolvedBillingAddress=getResolvedBillingAddress,exports.shippingAddressRequired=shippingAddressRequired,exports.toStripeAddress=toStripeAddress;