@zonos/elements 1.3.55 → 1.3.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/cjs/{CheckoutConfig-c75fe0fe.js → CheckoutConfig-4d03e084.js} +1 -1
  2. package/dist/cjs/{cart-6095475b.js → cart-6c7bf457.js} +4 -4
  3. package/dist/cjs/{createCustomEvent-0cef191b.js → createCustomEvent-a10ed604.js} +2 -2
  4. package/dist/cjs/{handleFetch-57c46afa.js → handleFetch-c0e07666.js} +2 -2
  5. package/dist/cjs/index.cjs.js +9 -9
  6. package/dist/cjs/{paypal-ac2f82ef.js → paypal-ec9ebaf5.js} +4 -4
  7. package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
  10. package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
  11. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
  17. package/dist/collection/__mocks__/vercel-app/localization.js +1 -1
  18. package/dist/collection/__mocks__/zonos-url/localization.js +2899 -1
  19. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  20. package/dist/collection/components/main/zonos-controller.js +2 -2
  21. package/dist/collection/components/store/checkout/paypal.js +2 -2
  22. package/dist/collection/components/store/checkout/stripe.js +3 -3
  23. package/dist/collection/components/utils/handleFetch.js +2 -2
  24. package/dist/collection/components/utils/hello/detectItemRestrictions.js +1 -1
  25. package/dist/collection/components/utils/hello/getProductsOnPage.js +2 -2
  26. package/dist/collection/types/generated/graphql.customer.types.js +9 -0
  27. package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -1
  28. package/dist/collection/utils/formattedUrl.js +1 -1
  29. package/dist/esm/{CheckoutConfig-49ba0fef.js → CheckoutConfig-7fe6442e.js} +1 -1
  30. package/dist/esm/{cart-0467d5ac.js → cart-a845a902.js} +4 -4
  31. package/dist/esm/{createCustomEvent-ccb2f324.js → createCustomEvent-0797e187.js} +2 -2
  32. package/dist/esm/{handleFetch-de935ec3.js → handleFetch-613fbc00.js} +2 -2
  33. package/dist/esm/index.js +10 -10
  34. package/dist/esm/{paypal-e68cf8df.js → paypal-6d80dfd9.js} +4 -4
  35. package/dist/esm/zonos-address_8.entry.js +2 -2
  36. package/dist/esm/zonos-badge_13.entry.js +4 -4
  37. package/dist/esm/zonos-checkout.entry.js +6 -6
  38. package/dist/esm/zonos-controller.entry.js +4 -4
  39. package/dist/esm/zonos-country-flag.entry.js +2 -2
  40. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  41. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  42. package/dist/esm/zonos-hello.entry.js +5 -5
  43. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  44. package/dist/esm/zonos-notification_3.entry.js +3 -3
  45. package/dist/esm-es5/{CheckoutConfig-49ba0fef.js → CheckoutConfig-7fe6442e.js} +1 -1
  46. package/dist/esm-es5/{cart-0467d5ac.js → cart-a845a902.js} +1 -1
  47. package/dist/esm-es5/{createCustomEvent-ccb2f324.js → createCustomEvent-0797e187.js} +1 -1
  48. package/dist/esm-es5/{handleFetch-de935ec3.js → handleFetch-613fbc00.js} +1 -1
  49. package/dist/esm-es5/index.js +1 -1
  50. package/dist/esm-es5/{paypal-e68cf8df.js → paypal-6d80dfd9.js} +2 -2
  51. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  52. package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
  53. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  54. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  55. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  56. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  57. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  58. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  59. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  60. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  61. package/dist/scripts/index.js +1 -1
  62. package/dist/scripts/loadZonos.js +1 -1
  63. package/dist/scripts/zonos.js +1 -1
  64. package/dist/types/types/generated/graphql.customer.types.d.ts +11 -0
  65. package/dist/types/types/generated/graphql.customer.types.ts +15 -0
  66. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  67. package/dist/zonos-elements/index.esm.js +1 -1
  68. package/dist/zonos-elements/{p-aff41c41.system.js → p-08e19004.system.js} +1 -1
  69. package/dist/zonos-elements/{p-59c51734.system.entry.js → p-0954e8fe.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-29ad5aa6.entry.js → p-173f8e5b.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-f0ebd55a.system.entry.js → p-17ea3429.system.entry.js} +1 -1
  72. package/dist/zonos-elements/p-1df63802.system.js +1 -0
  73. package/dist/zonos-elements/{p-c7a8a6bb.system.js → p-206cf031.system.js} +1 -1
  74. package/dist/zonos-elements/{p-7e431f33.system.entry.js → p-298df70c.system.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-ce149fc7.system.entry.js → p-324a8c0d.system.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-fb3c4b52.system.entry.js → p-3492c75f.system.entry.js} +1 -1
  77. package/dist/zonos-elements/{p-726cef64.system.entry.js → p-35122d9c.system.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-1b071708.entry.js → p-35ca4dcc.entry.js} +1 -1
  79. package/dist/zonos-elements/{p-b2e18e34.system.entry.js → p-40001536.system.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-b80ef150.system.entry.js → p-40f73fb4.system.entry.js} +1 -1
  81. package/dist/zonos-elements/{p-4c30186a.js → p-472a6c19.js} +1 -1
  82. package/dist/zonos-elements/{p-ffa7d4c2.entry.js → p-4b205b2f.entry.js} +1 -1
  83. package/dist/zonos-elements/{p-7b18892a.system.entry.js → p-4dd2f617.system.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-478b5c7d.entry.js → p-51d82a07.entry.js} +1 -1
  85. package/dist/zonos-elements/{p-a164f76d.entry.js → p-556d4ddb.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-386bef53.entry.js → p-6f87b869.entry.js} +1 -1
  87. package/dist/zonos-elements/{p-60129618.system.js → p-8260b820.system.js} +1 -1
  88. package/dist/zonos-elements/{p-e65dd068.entry.js → p-921d3603.entry.js} +1 -1
  89. package/dist/zonos-elements/{p-9a1a2aa2.entry.js → p-95a18511.entry.js} +1 -1
  90. package/dist/zonos-elements/{p-8d9112e9.js → p-9fd3995f.js} +1 -1
  91. package/dist/zonos-elements/p-a99620c8.entry.js +1 -0
  92. package/dist/zonos-elements/{p-974ce80b.system.entry.js → p-b65b3e7b.system.entry.js} +1 -1
  93. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  94. package/dist/zonos-elements/{p-de2bd8da.system.js → p-d067bb64.system.js} +2 -2
  95. package/dist/zonos-elements/{p-41871fbd.js → p-d20f6cf1.js} +2 -2
  96. package/dist/zonos-elements/{p-f32d7972.entry.js → p-d42018fc.entry.js} +1 -1
  97. package/dist/zonos-elements/{p-ac162a0f.system.js → p-e89c2805.system.js} +1 -1
  98. package/dist/zonos-elements/{p-068c9ba4.js → p-f9c2288f.js} +1 -1
  99. package/dist/zonos-elements/{p-6be07fde.js → p-fb59c3c3.js} +1 -1
  100. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  101. package/package.json +1 -1
  102. package/dist/zonos-elements/p-0f198151.entry.js +0 -1
  103. package/dist/zonos-elements/p-93f12fa9.system.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as o,h as s,H as e,F as t}from"./p-5b7da777.js";import{l as n,s as c,a as i,b as r,c as a,i as h,d,e as l,f as u,g as m,h as z,j as p,k,m as g,n as f,t as b,o as w,p as v,q as y,r as C,u as x,v as S}from"./p-9fd3995f.js";import{s as I,p as A}from"./p-d20f6cf1.js";import{z as j,g as O,m as B}from"./p-9dd6b00d.js";import{c as P,t as T,g as L}from"./p-472a6c19.js";import{i as $}from"./p-81a54668.js";import{l as D,a as H,s as N}from"./p-fb59c3c3.js";import{c as _}from"./p-b4b7f705.js";import{g as M}from"./p-f05f3e27.js";import{i as R}from"./p-23a84835.js";import{s as E,d as F,c as U}from"./p-f9c2288f.js";import{R as Z}from"./p-08e7107d.js";const V=o=>{const s=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:s}},W=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(document.dispatchEvent(P("legacyCheckoutError","Unable to initiate checkout process in a country where shipping is not available")),o&&D("Checkout: not shippable country"),1)),q='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',G=class{constructor(s){o(this,s),this.onChangeLocaleListener=()=>{},this.applyStripeTheme=async()=>{var o,s,e,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||j.appearance.theme;await h({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0})},this.getCurrentLocalePageEnum=()=>{switch(d.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.inventoryCheckErrorMessage=null}async initCartInfoHandler(o){l({adjustments:d.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var s,e;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,I("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==d.step||u(),d.step="customer-info",m(),z(),null===(e=(s=j.checkoutSettings).onClose)||void 0===e||e.call(s)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if(window.Zonos.cartData){D("tempCartUUID is provided, start building cart");const{adjustments:o,cartItems:s}=V(window.Zonos.cartData);await l({adjustments:o,cartItems:s})}else if("function"==typeof j.checkoutSettings.createCartId){D('"createCartId" is provided, start building cart');const o=await j.checkoutSettings.createCartId();window.Zonos.cartId=o;const s=await E(o),e=null==s?void 0:s.cartData;if(!e)return void H("Failed to build cart, please try again.");const{adjustments:t,cartItems:n}=V(e);await l({adjustments:t,cartItems:n})}else if(j.checkoutSettings.buildCartDetail&&n.selectedCountryCode){D("build cart detail");const o=await j.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency});await l({adjustments:[],cartItems:o})}if(!p.clientSecret){const o=await k();if(D(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}reloadCheckoutSession(){window.location.reload()}attachCheckout(){const o=j.checkoutSettings.placeOrderButtonSelector;if(D(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const s=[o,`#${F}`,`#${U}`].filter(Boolean);document.querySelectorAll(s.join(",")).forEach((s=>{s.getAttribute("data-zonos-checkout-attached")||(D(`attached event to button ${o}`,"info",{button:s}),s.addEventListener("click",(async o=>{if(W()){o.preventDefault(),o.stopPropagation(),D("zonos checkout button clicked"),p.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");g({isPreview:this.preview,sessionTimeout:54e5}),I("zonos-checkout-start"),T("checkout_open")}catch(o){p.isFetchingSession=!1,f({messages:[b("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:b("Error creating Checkout")})}}}),{capture:!0,passive:!1}),j.checkoutSettings.disablePlaceOrderButtonActivation||s.removeAttribute("disabled"),s.setAttribute("data-zonos-checkout-attached","true"),s.matches(F)&&(s.dispatchEvent(P("click")),r(),s.remove()),s.matches(`#${U}`)&&(s.dispatchEvent(P("click")),s.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParam(){const o=new URLSearchParams(window.location.search),s={country:o.get("country")||n.selectedCountryCode,customerAddress1:o.get("customerAddress1"),customerAddress2:o.get("customerAddress2"),customerCity:o.get("customerCity"),customerEmail:o.get("customerEmail"),customerName:o.get("customerName"),customerPhone:o.get("customerPhone"),customerState:o.get("customerState"),customerZip:o.get("customerZip")};s.customerAddress1&&s.customerCity&&s.customerName&&s.customerPhone&&s.customerState&&s.customerZip&&s.country?this.defaultAddress={address:{city:s.customerCity,country:s.country,line1:s.customerAddress1,line2:s.customerAddress2||"",postal_code:s.customerZip,state:s.customerState},email:s.customerEmail||"",name:s.customerName,phone:s.customerPhone}:D("Missing some query params so it can not be prefilled","info",s)}async init(){p.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const t=document.querySelector(o),n=c();if(!t&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(n),void e.disconnect()}const h=document.querySelector('select[name="shippingAddress.countryCode"]'),d=document.querySelector("#checkout-shipping-continue");h&&d&&(e.disconnect(),d.addEventListener("click",(async o=>{var s,e;const t=h.value;if(!t)return;if(i(t),!W(!1))return void r();const n=document.querySelector("form");if(!n)return;const c=new FormData(n),d=document.querySelector("input#addressLine1Input"),l={address1:null!==(s=c.get("shippingAddress.address1"))&&void 0!==s?s:d&&d.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=c.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return H("One or more shipping address field is missing",Object.entries(l)),void N({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:j.storeId}});a({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:F,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos&&this.useLegacyQueryParam();const o=setInterval((()=>{p.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(D("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):D("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){d.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await w();const o=setInterval((()=>{!d.landedCostData&&p.isFetchingLandedCost||(d.landedCostData&&(A({currency:d.currency}),v()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{v(),this.submitLoading=!1}),500)}handleInventoryCheckDialogCancel(){d.inventoryCheckErrorMessage=null}handleInventoryCheckDialogConfirm(){d.inventoryCheckErrorMessage=null,this.closeDialogHandler({confirmed:!0})}async handleStripePaymentContinue(){p.hasPaymentError=!1,this.submitLoading=!0,d.inventoryCheckErrorMessage=null;try{d.inventoryCheckErrorMessage=await y()}catch(o){d.inventoryCheckErrorMessage=b("Unable to check inventory. Please try again.")}if(d.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await C(),v(),z()}catch(o){H(o),p.hasPaymentError=!0}this.submitLoading=!1}}async handleFinishClick(){if(x(),this.preview)return d.step="customer-info",void await this.init();if(u(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl;return void(window.location.href=o)}const o=window.location.href.split("?")[0],s=L();this.open=!1,s||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=$(this.mobile),this.applyStripeTheme(),D(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=$(this.mobile),this.applyStripeTheme(),D(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=O(this.appearanceSettingsOverride.theme))}handleAddressChange(){x()}componentWillLoad(){this.init(),this.isMobile=$(this.mobile),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=S("selectedLocale",(()=>{this.applyStripeTheme()})),D(`mobile: ${this.isMobile}`)}disconnectedCallback(){x(),u(),this.onChangeLocaleListener()}render(){var o;const c="finish"!==d.step&&"error"!==d.step&&!p.stripeElements||p.isFetchingSession,{colorPrimary:i,colorSecondary:r,logoUrl:a,style:h}=B(j.appearance,this.appearanceSettingsOverride),l="ENABLED"===j.appearance.zonosAttribution,u=j.appearance.theme,m=i&&R(i)?"DARK":"LIGHT",z=this.isMobile?u:m,k=this.isMobile?void 0:r,{customMessages:g}=n,f=null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,w=this.getCurrentLocalePageEnum(),v=g.filter((o=>o.pageName===w)),y=()=>{const o=this.preview?`${a}?timestamp=${Date.now()}`:a;return s("div",{class:"zonos--logo"},o&&s("img",{alt:`${j.organizationName} logo`,src:o,width:100}))},C=L(),x=()=>s("zonos-v-stack",null,s("div",{class:"zonos--logo-wrapper"},y(),C&&s("zonos-badge",{badgeColor:"orange",size:"small"},b("Test mode"))),s("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),v.map((o=>s("zonos-custom-message",{icon:q,message:o.message})))),S=()=>d.checkoutSessionTimeoutShow?s("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:b("Your checkout session has expired. Please reload the page to continue."),restStateTitle:b("Session timed out"),restStateType:"Warning"},s("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},b("Reload"))):s("div",{class:"zonos--content",style:{"--border-radius":M({overrideBorderStyle:h})}},"finish"!==d.step&&"error"!==d.step&&s(t,null,s("div",{class:"zonos--left","data-theme":z,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&x(),"customer-info"===d.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k}),"shipping"===d.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k}),"payment"===d.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:k})),s("div",{class:"zonos--right","data-theme":u},this.isMobile&&x(),!this.isLegacyCheckout&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:Z}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null),this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:q,message:f})))),s("zonos-cart-restricted-items",null),!this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:q,message:f}))))),("finish"===d.step||"error"===d.step)&&s("div",{class:"zonos--done","data-theme":u},s("div",{class:"zonos--header"},y(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:Z}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:u})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===d.step&&d.error?Object.assign(Object.assign({},d.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",{"data-theme":u,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return s(e,{class:_(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?S():s("zonos-dialog",{borderStyle:h,"data-theme":u,height:"980px",isLoading:c,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},S()),s("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:b("Don't close"),dialogConfirmBtnText:b("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:b("Would you like to close checkout and return to the site?"),dialogTitle:b("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),s("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:b("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:b("Couldn't place order"),dialogType:"alert",onCancelClicked:()=>{this.handleInventoryCheckDialogCancel()},onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}}};G.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";export{G as zonos_checkout}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(a,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-c7a8a6bb.system.js","./p-8e8defdc.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-ac162a0f.system.js","./p-29814fd7.system.js","./p-e97793ce.system.js"],(function(o){"use strict";var e,t,n,i,s,a,r,l,d,c,h,u;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.F;s=o.H},function(o){a=o.t;r=o.l;l=o.D},function(o){d=o.z},function(o){c=o.c},function(o){h=o.f},function(o){u=o.g},function(){},function(){},function(){}],execute:function(){var f=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var m=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var g='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var p='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var x='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var z=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var C=z;var y="".concat(a("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(m({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")}));var k=o("zonos_hello_dialog",function(){function o(o){var n=this;e(this,o);this.closeDialog=t(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(d.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=r.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.hasInclusivePrices=function(){var o;return((o=r.inclusivePricing)===null||o===void 0?void 0:o.status)==="ENABLED"};this.isNoThresholdCountry=function(o){if(!o||!n.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?a("Spend [threshold] duty free.",{threshold:e}):a("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?a("Spend [threshold] tax free.",{threshold:e}):a("Taxes will apply to all orders.")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(n.hasInclusivePrices()){return[y]}return[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:"".concat(o.vatTaxRate*100,"%")}),y]};this.getNewZealandDutyTaxMessge=function(o){if(n.hasInclusivePrices()){return null}return[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:l({amount:o.vatTaxDeminimus})})]};this.getInclusivePriceMessage=function(){var o=r.inclusivePricing;if((o===null||o===void 0?void 0:o.status)!=="ENABLED"){return null}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"){return a("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"){return a("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"){return a("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.")}if(o.fee.status==="INCLUDED"){return a("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.")}return null};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!n.hasTaxId()){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e;var t=r.selectedCountryCode;var l=this.hasInclusivePrices();var m=this.getInclusivePriceMessage();var z=this.getDutyMessage();var C=this.getTaxMessage();var y=this.getAdditionalDutyTaxMessage();var k=this.animateFromLeftOverride||this.dialogRef&&u(this.dialogRef);var L=this.dialogRef&&f(this.dialogRef);var D=r.customMessages;var H=a("Welcome to [storeName]",{storeName:d.organizationName});var N=((e=D.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var V=h(N);var M=this.getCurrentPageEnum();var _=D.filter((function(o){return o.pageName===M}));return n(s,{key:"df052224c778ebfceeef7c827fa3da0e8a2f3dc9",class:"zonos--elements"},n("div",{key:"0ecff6a07d24a72fb4f200cce82ab09e40b48baf",class:c(["zonos--hello-dialog",k&&"zonos--hello-dialog-animate-from-left",L&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"b2939d49930c8a34288a884582eb849a492080ff"},n("div",{key:"f1a22291d7865d57d37cbcd3c8f70c4aea57ed39",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"ee3794826efc9fed856f0a320cf6428a428b4ea4",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:x}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"3d2ff0b68268c97e385eb3cf7fcc34454d2ed3b5",spacing:24},n("zonos-country-flag",{key:"e09645ac583e59354d11b3c194d4d3f6d4780c55",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"42017a698c1678b90c8c7bbece5d623d0800e37b",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"ac30b7683dcc65773159832eadad8542d1d1bda8",type:"boldSubheader"},H),n("zonos-text",{key:"58cc0e8c51774c339b0fc735e4e98917ed614c8a",innerHTML:V,textColor:"gray-800"})),n("zonos-v-stack",{key:"0b3a3b2bf981ed72654506cc31f07edf6268b0a4",spacing:8},this.restrictedItems.map((function(o){var e;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{key:"196a593b167fc979bf0a2bef7f266ad3778f6ca0",spacing:"12px"},n("zonos-v-stack",{key:"94925c753ddfdd1a659580f7f78f8d6626cdcdaa",spacing:12},l?n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:v}),n("zonos-text",null,m)):n(i,null,n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:b}),n("zonos-text",null,z)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:w}),n("zonos-text",null,C))),y===null||y===void 0?void 0:y.map((function(o){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:g}),n("zonos-text",{innerHTML:o}))})))),_.map((function(o){return n("zonos-custom-message",{icon:p,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"540006185ce1d28d610052801dcf9281773c5504",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"886c371fdfa8c9c15188ef9d6cbb637162fb0d27"},n("zonos-country-select",{key:"1365bee67831b64637e5c481f239c557f2649694",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"44929f0c23627970b1706f6e8c76e51022201379"},n("zonos-language-select",{key:"86b9f68c84da77f9e1af51dcb7d512eb6b289a27",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());k.style=C}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function r(o){try{l(n.next(o))}catch(o){s(o)}}function a(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(r,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-206cf031.system.js","./p-8e8defdc.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-e89c2805.system.js","./p-29814fd7.system.js","./p-e97793ce.system.js"],(function(o){"use strict";var e,t,n,i,s,r,a,l,d,c,h,u;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.F;s=o.H},function(o){r=o.t;a=o.l;l=o.D},function(o){d=o.z},function(o){c=o.c},function(o){h=o.f},function(o){u=o.g},function(){},function(){},function(){}],execute:function(){var f=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var m=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var g='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var p='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var x='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var z=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var C=z;var y="".concat(r("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(m({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:r("Learn more.")}));var k=o("zonos_hello_dialog",function(){function o(o){var n=this;e(this,o);this.closeDialog=t(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(d.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=a.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.hasInclusivePrices=function(){var o;return((o=a.inclusivePricing)===null||o===void 0?void 0:o.status)==="ENABLED"};this.isNoThresholdCountry=function(o){if(!o||!n.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=a.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?r("Spend [threshold] duty free.",{threshold:e}):r("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=a.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?r("Spend [threshold] tax free.",{threshold:e}):r("Taxes will apply to all orders.")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[r("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(n.hasInclusivePrices()){return[y]}return[r("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:"".concat(o.vatTaxRate*100,"%")}),y]};this.getNewZealandDutyTaxMessge=function(o){if(n.hasInclusivePrices()){return null}return[r("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:l({amount:o.vatTaxDeminimus})})]};this.getInclusivePriceMessage=function(){var o=a.inclusivePricing;if((o===null||o===void 0?void 0:o.status)!=="ENABLED"){return null}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return r("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"){return r("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return r("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return r("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"){return r("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"){return r("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.")}if(o.fee.status==="INCLUDED"){return r("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.")}return null};this.getAdditionalDutyTaxMessage=function(){if(!a.countryLandedCost){return null}if(!n.hasTaxId()){return null}switch(a.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(a.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e;var t=a.selectedCountryCode;var l=this.hasInclusivePrices();var m=this.getInclusivePriceMessage();var z=this.getDutyMessage();var C=this.getTaxMessage();var y=this.getAdditionalDutyTaxMessage();var k=this.animateFromLeftOverride||this.dialogRef&&u(this.dialogRef);var L=this.dialogRef&&f(this.dialogRef);var D=a.customMessages;var H=r("Welcome to [storeName]",{storeName:d.organizationName});var N=((e=D.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var V=h(N);var M=this.getCurrentPageEnum();var _=D.filter((function(o){return o.pageName===M}));return n(s,{key:"df052224c778ebfceeef7c827fa3da0e8a2f3dc9",class:"zonos--elements"},n("div",{key:"0ecff6a07d24a72fb4f200cce82ab09e40b48baf",class:c(["zonos--hello-dialog",k&&"zonos--hello-dialog-animate-from-left",L&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"b2939d49930c8a34288a884582eb849a492080ff"},n("div",{key:"f1a22291d7865d57d37cbcd3c8f70c4aea57ed39",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"ee3794826efc9fed856f0a320cf6428a428b4ea4",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:x}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"3d2ff0b68268c97e385eb3cf7fcc34454d2ed3b5",spacing:24},n("zonos-country-flag",{key:"e09645ac583e59354d11b3c194d4d3f6d4780c55",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"42017a698c1678b90c8c7bbece5d623d0800e37b",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"ac30b7683dcc65773159832eadad8542d1d1bda8",type:"boldSubheader"},H),n("zonos-text",{key:"58cc0e8c51774c339b0fc735e4e98917ed614c8a",innerHTML:V,textColor:"gray-800"})),n("zonos-v-stack",{key:"0b3a3b2bf981ed72654506cc31f07edf6268b0a4",spacing:8},this.restrictedItems.map((function(o){var e;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{key:"196a593b167fc979bf0a2bef7f266ad3778f6ca0",spacing:"12px"},n("zonos-v-stack",{key:"94925c753ddfdd1a659580f7f78f8d6626cdcdaa",spacing:12},l?n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:v}),n("zonos-text",null,m)):n(i,null,n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:b}),n("zonos-text",null,z)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:w}),n("zonos-text",null,C))),y===null||y===void 0?void 0:y.map((function(o){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:g}),n("zonos-text",{innerHTML:o}))})))),_.map((function(o){return n("zonos-custom-message",{icon:p,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"540006185ce1d28d610052801dcf9281773c5504",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"886c371fdfa8c9c15188ef9d6cbb637162fb0d27"},n("zonos-country-select",{key:"1365bee67831b64637e5c481f239c557f2649694",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"44929f0c23627970b1706f6e8c76e51022201379"},n("zonos-language-select",{key:"86b9f68c84da77f9e1af51dcb7d512eb6b289a27",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());k.style=C}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):n(e.value).then(r,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,i,n;return{setters:[function(t){o=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return o(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i([["p-b2e18e34.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-b80ef150.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-7e431f33.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-1e4f7997.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-a3e2592b.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-ecd6a58a.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-7ef2737b.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-2a47d2cc.system",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-a3547b34.system",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-89d8c1ad.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-5a59ed7f.system",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-f0ebd55a.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-7b18892a.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-974ce80b.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-4b59ada6.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-f3811c4c.system",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-ce149fc7.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-fb3c4b52.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-1c72e53f.system",[[17,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-59c51734.system",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-726cef64.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):n(e.value).then(r,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,i,n;return{setters:[function(t){o=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return o(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i([["p-40001536.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-40f73fb4.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-298df70c.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-1e4f7997.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-a3e2592b.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-ecd6a58a.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-7ef2737b.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-2a47d2cc.system",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-a3547b34.system",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-89d8c1ad.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-5a59ed7f.system",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-17ea3429.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-4dd2f617.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-b65b3e7b.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-4b59ada6.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-f3811c4c.system",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-324a8c0d.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-3492c75f.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-1c72e53f.system",[[17,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-0954e8fe.system",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-35122d9c.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],t)]}}))}))}))}}}));
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(r,n,e,t){function o(r){return r instanceof e?r:new e((function(n){n(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{c(t.next(r))}catch(r){i(r)}}function u(r){try{c(t["throw"](r))}catch(r){i(r)}}function c(r){r.done?e(r.value):o(r.value).then(a,u)}c((t=t.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(r){return function(n){return c([r,n])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=n.call(r,e)}catch(r){u=[6,r];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-8e8defdc.system.js","./p-c7a8a6bb.system.js","./p-ac162a0f.system.js","./p-29814fd7.system.js"],(function(r){"use strict";var n,e,t,o,i,a,u,c,s,l,d,f;return{setters:[function(r){n=r.z;e=r.c},function(r){t=r.d;o=r.q;i=r.t;a=r.p;u=r.h},function(r){c=r.h;s=r.l;l=r.a;d=r.j},function(r){f=r.t}],execute:function(){var v=this;
1
+ var __awaiter=this&&this.__awaiter||function(r,n,e,t){function o(r){return r instanceof e?r:new e((function(n){n(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{c(t.next(r))}catch(r){i(r)}}function u(r){try{c(t["throw"](r))}catch(r){i(r)}}function c(r){r.done?e(r.value):o(r.value).then(a,u)}c((t=t.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(r){return function(n){return c([r,n])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=n.call(r,e)}catch(r){u=[6,r];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-8e8defdc.system.js","./p-206cf031.system.js","./p-e89c2805.system.js","./p-29814fd7.system.js"],(function(r){"use strict";var n,e,t,o,i,a,u,c,s,d,l,f;return{setters:[function(r){n=r.z;e=r.c},function(r){t=r.d;o=r.q;i=r.t;a=r.p;u=r.h},function(r){c=r.h;s=r.l;d=r.a;l=r.j},function(r){f=r.t}],execute:function(){var v=this;
2
2
  /*!
3
3
  * paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
@@ -14,4 +14,4 @@ var __awaiter=this&&this.__awaiter||function(r,n,e,t){function o(r){return r ins
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */function p(r,n){var e=document.querySelector('script[src="'.concat(r,'"]'));if(e===null)return null;var t=_(r,n);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(r){if(o.dataset[r]!==t.dataset[r]){i=false}}));return i?e:null}function w(r){var n=r.url,e=r.attributes,t=r.onSuccess,o=r.onError;var i=_(n,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function h(r){var n=r.environment;var e=n==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete r.environment;if(r.sdkBaseUrl){e=r.sdkBaseUrl;delete r.sdkBaseUrl}var t=r;var o=Object.keys(t).filter((function(r){return typeof t[r]!=="undefined"&&t[r]!==null&&t[r]!==""})).reduce((function(r,n){var e=t[n].toString();n=y(n);if(n.substring(0,4)==="data"||n==="crossorigin"){r.attributes[n]=e}else{r.queryParams[n]=e}return r}),{queryParams:{},attributes:{}}),i=o.queryParams,a=o.attributes;if(i["merchant-id"]&&i["merchant-id"].indexOf(",")!==-1){a["data-merchant-id"]=i["merchant-id"];i["merchant-id"]="*"}return{url:"".concat(e,"?").concat(b(i)),attributes:a}}function y(r){var n=function(r,n){return(n?"-":"")+r.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,n)}function b(r){var n="";Object.keys(r).forEach((function(e){if(n.length!==0)n+="&";n+=e+"="+r[e]}));return n}function _(r,n){if(n===void 0){n={}}var e=document.createElement("script");e.src=r;Object.keys(n).forEach((function(r){e.setAttribute(r,n[r]);if(r==="data-csp-nonce"){e.setAttribute("nonce",n["data-csp-nonce"])}}));return e}function g(r,n){if(n===void 0){n=Promise}k(r,n);if(typeof document==="undefined")return n.resolve(null);var e=h(r),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=P(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(p(t,o)&&a){return n.resolve(a)}return m({url:t,attributes:o},n).then((function(){var r=P(i);if(r){return r}throw new Error("The window.".concat(i," global variable is not available."))}))}function m(r,n){if(n===void 0){n=Promise}k(r,n);var e=r.url,t=r.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new n((function(r,n){if(typeof document==="undefined")return r();w({url:e,attributes:t,onSuccess:function(){return r()},onError:function(){var r=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return n(r)}})}))}function P(r){return window[r]}function k(r,n){if(typeof r!=="object"||r===null){throw new Error("Expected an options object.")}var e=r.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof n!=="undefined"&&typeof n!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var j=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t;var o=r.checkoutSessionId,i=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:return[4,c("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:n=r.sent(),e=n.errors,t=n.json;return[2,{errors:e,json:t}]}}))}))};var E=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t;var o=r.checkoutSessionId;return __generator(this,(function(r){switch(r.label){case 0:return[4,c("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o},method:"POST"})];case 1:n=r.sent(),e=n.errors,t=n.json;return[2,{errors:e,json:t}]}}))}))};var S=r("i",(function(r){var n=r.backgroundColor1,e=r.backgroundColor2;var t=f.readability(n,e);return t>2.5}));var I=r("s",(function(r){var e=n.checkoutSettings.analyticsProviders.find((function(r){return r.type==="GOOGLE_ANALYTICS"}));if(!e||(e===null||e===void 0?void 0:e.status)==="DISABLED"){return}if(typeof window.gtag==="function"){s("Zonos submits gtag event","log",r);window.gtag("event",r,{})}}));var A=e((function(){return{orderIdCreated:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),x=A.reset,O=A.state;r({b:x,a:O});var T=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t,o,i,a;var u=r.checkoutSessionId;return __generator(this,(function(r){switch(r.label){case 0:return[4,E({checkoutSessionId:u})];case 1:t=r.sent(),o=t.errors,i=t.json;a=(n=i===null||i===void 0?void 0:i.paypalOrderCreate)===null||n===void 0?void 0:n.paypalOrderId;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,a]}}))}))};var L=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t,o,a,u;var c=r.checkoutSessionId,s=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:new URL(window.location.href);return[4,j({checkoutSessionId:c,paypalMockResponse:s})];case 1:t=r.sent(),o=t.errors,a=t.json;u=(n=a===null||a===void 0?void 0:a.paypalOrderCapture.order)===null||n===void 0?void 0:n.id;if(o.length||!u){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||i("An unexpected error occurred when processing PayPal order."))}return[2,u]}}))}))};var B=function(r){var n=r.error;var e;var t=d(n.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var a=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!a){O.paypalErrorMessage=i("An unexpected error occurred when processing PayPal order.")}var u=a[2]||i("An unexpected error occurred when processing PayPal order.");O.paypalErrorMessage=u};var C=function(r){var e=r.checkoutSessionId,c=r.onPaypalFail,s=r.onPaypalSessionDone,d=r.overrideBorderRaidus,f=r.overridePrimaryColor;var p=f||n.appearance.colorPrimary;var w="#ffc33a";var h=S({backgroundColor1:w,backgroundColor2:p||""});return{createOrder:function(){return __awaiter(v,void 0,void 0,(function(){var r,n,a,u;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,6,,7]);O.paypalErrorMessage=null;t.inventoryCheckErrorMessage=null;s.label=1;case 1:s.trys.push([1,3,,4]);r=t;return[4,o()];case 2:r.inventoryCheckErrorMessage=s.sent();return[3,4];case 3:n=s.sent();t.inventoryCheckErrorMessage=i("Unable to check inventory. Please try again.");return[3,4];case 4:if(t.inventoryCheckErrorMessage){return[2,""]}return[4,T({checkoutSessionId:e})];case 5:a=s.sent();return[2,a];case 6:u=s.sent();l("Failed to create paypal order",u);O.paypalErrorMessage=i("Failed to create PayPal order. Please try again, or consider using an alternative method.");c===null||c===void 0?void 0:c();return[2,""];case 7:return[2]}}))}))},onApprove:function(r,n){return __awaiter(v,void 0,void 0,(function(){var r,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);O.paypalErrorMessage=null;I("zonos-checkout-payment-info");return[4,L({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:r=t.sent();O.orderIdCreated=r;s===null||s===void 0?void 0:s({orderId:r});a();u();return[3,3];case 2:n=t.sent();l("==== Failed to capture paypal order",n);if(n instanceof Error){return[2,B({error:n})]}c===null||c===void 0?void 0:c();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:d==="SHARP"?0:10,color:h?"gold":"blue",shape:"rect"}}};var R=function(){if(!O.paypalButtons.length){return}O.paypalButtons.forEach((function(r){return __awaiter(v,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,r.close()];case 1:n.sent();return[2]}}))}))}));O.paypalButtons=[]};var D=r("p",(function(r){return __awaiter(v,[r],void 0,(function(r){var e,t,o,i,a;var u=r.currency;return __generator(this,(function(r){switch(r.label){case 0:t=!!((e=n.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(r){return r.type==="PAYPAL"&&r.status==="ENABLED"})));if(!t){s("=== Paypal is disabled for this store","warn");return[2]}o=n.checkoutSettings.externalServiceTokens.find((function(r){return r.type==="PAYPAL_CLIENT_ID"}));if(!o){s("Fail to load paypal -- missing paypal publishable key","warn");return[2]}i=n.zonosMode==="production"&&n.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=window.Zonos;return[4,g({clientId:o.token,currency:u,environment:i})];case 1:a.paypal=r.sent();s("==== Paypal script loaded");return[2]}}))}))}));var F=r("d",(function(r){var n;var e=window.Zonos.paypal;if(!e){s("Paypal is not available");return null}var o=t.checkoutSessionId;if(!o){s("Paypal is not available due to checkoutSessionId is not available");return null}s("==== Loading Paypal buttons");R();var i=[(n=e.FUNDING)===null||n===void 0?void 0:n.PAYPAL].filter(Boolean);O.paypalButtons=i.map((function(n){var t;var i=null;try{i=((t=e.Buttons)===null||t===void 0?void 0:t.call(e,Object.assign(Object.assign({},C(Object.assign({checkoutSessionId:o,fundingSource:n},r))),{fundingSource:n})))||null}catch(r){s("===== Fail to load paypal's \"".concat(n,'" button'),"warn",r)}if(i===null||i===void 0?void 0:i.isEligible()){s("==== Paypal button ".concat(n," loaded"));return i}return null})).filter(Boolean);return O.paypalButtons}));var z=r("c",(function(){return!!O.paypalButtons.length}))}}}));
17
+ */function p(r,n){var e=document.querySelector('script[src="'.concat(r,'"]'));if(e===null)return null;var t=_(r,n);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(r){if(o.dataset[r]!==t.dataset[r]){i=false}}));return i?e:null}function w(r){var n=r.url,e=r.attributes,t=r.onSuccess,o=r.onError;var i=_(n,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function h(r){var n=r.environment;var e=n==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete r.environment;if(r.sdkBaseUrl){e=r.sdkBaseUrl;delete r.sdkBaseUrl}var t=r;var o=Object.keys(t).filter((function(r){return typeof t[r]!=="undefined"&&t[r]!==null&&t[r]!==""})).reduce((function(r,n){var e=t[n].toString();n=y(n);if(n.substring(0,4)==="data"||n==="crossorigin"){r.attributes[n]=e}else{r.queryParams[n]=e}return r}),{queryParams:{},attributes:{}}),i=o.queryParams,a=o.attributes;if(i["merchant-id"]&&i["merchant-id"].indexOf(",")!==-1){a["data-merchant-id"]=i["merchant-id"];i["merchant-id"]="*"}return{url:"".concat(e,"?").concat(b(i)),attributes:a}}function y(r){var n=function(r,n){return(n?"-":"")+r.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,n)}function b(r){var n="";Object.keys(r).forEach((function(e){if(n.length!==0)n+="&";n+=e+"="+r[e]}));return n}function _(r,n){if(n===void 0){n={}}var e=document.createElement("script");e.src=r;Object.keys(n).forEach((function(r){e.setAttribute(r,n[r]);if(r==="data-csp-nonce"){e.setAttribute("nonce",n["data-csp-nonce"])}}));return e}function g(r,n){if(n===void 0){n=Promise}k(r,n);if(typeof document==="undefined")return n.resolve(null);var e=h(r),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=P(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(p(t,o)&&a){return n.resolve(a)}return m({url:t,attributes:o},n).then((function(){var r=P(i);if(r){return r}throw new Error("The window.".concat(i," global variable is not available."))}))}function m(r,n){if(n===void 0){n=Promise}k(r,n);var e=r.url,t=r.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new n((function(r,n){if(typeof document==="undefined")return r();w({url:e,attributes:t,onSuccess:function(){return r()},onError:function(){var r=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return n(r)}})}))}function P(r){return window[r]}function k(r,n){if(typeof r!=="object"||r===null){throw new Error("Expected an options object.")}var e=r.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof n!=="undefined"&&typeof n!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var j=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t;var o=r.checkoutSessionId,i=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:return[4,c("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:n=r.sent(),e=n.errors,t=n.json;return[2,{errors:e,json:t}]}}))}))};var E=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t;var o=r.checkoutSessionId;return __generator(this,(function(r){switch(r.label){case 0:return[4,c("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o},method:"POST"})];case 1:n=r.sent(),e=n.errors,t=n.json;return[2,{errors:e,json:t}]}}))}))};var S=r("i",(function(r){var n=r.backgroundColor1,e=r.backgroundColor2;var t=f.readability(n,e);return t>2.5}));var I=r("s",(function(r){var e=n.checkoutSettings.analyticsProviders.find((function(r){return r.type==="GOOGLE_ANALYTICS"}));if(!e||(e===null||e===void 0?void 0:e.status)==="DISABLED"){return}if(typeof window.gtag==="function"){s("Zonos submits gtag event","log",r);window.gtag("event",r,{})}}));var A=e((function(){return{orderIdCreated:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),x=A.reset,O=A.state;r({b:x,a:O});var T=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t,o,i,a;var u=r.checkoutSessionId;return __generator(this,(function(r){switch(r.label){case 0:return[4,E({checkoutSessionId:u})];case 1:t=r.sent(),o=t.errors,i=t.json;a=(n=i===null||i===void 0?void 0:i.paypalOrderCreate)===null||n===void 0?void 0:n.paypalOrderId;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,a]}}))}))};var L=function(r){return __awaiter(v,[r],void 0,(function(r){var n,e,t,o,a,u;var c=r.checkoutSessionId,s=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:new URL(window.location.href);return[4,j({checkoutSessionId:c,paypalMockResponse:s})];case 1:t=r.sent(),o=t.errors,a=t.json;u=(n=a===null||a===void 0?void 0:a.paypalOrderCapture.order)===null||n===void 0?void 0:n.id;if(o.length||!u){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||i("An unexpected error occurred when processing PayPal order."))}return[2,u]}}))}))};var B=function(r){var n=r.error;var e;var t=l(n.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var a=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!a){O.paypalErrorMessage=i("An unexpected error occurred when processing PayPal order.")}var u=a[2]||i("An unexpected error occurred when processing PayPal order.");O.paypalErrorMessage=u};var C=function(r){var e=r.checkoutSessionId,c=r.onPaypalFail,s=r.onPaypalSessionDone,l=r.overrideBorderRaidus,f=r.overridePrimaryColor;var p=f||n.appearance.colorPrimary;var w="#ffc33a";var h=S({backgroundColor1:w,backgroundColor2:p||""});return{createOrder:function(){return __awaiter(v,void 0,void 0,(function(){var r,n,a,u;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,6,,7]);O.paypalErrorMessage=null;t.inventoryCheckErrorMessage=null;s.label=1;case 1:s.trys.push([1,3,,4]);r=t;return[4,o()];case 2:r.inventoryCheckErrorMessage=s.sent();return[3,4];case 3:n=s.sent();t.inventoryCheckErrorMessage=i("Unable to check inventory. Please try again.");return[3,4];case 4:if(t.inventoryCheckErrorMessage){return[2,""]}return[4,T({checkoutSessionId:e})];case 5:a=s.sent();return[2,a];case 6:u=s.sent();d("Failed to create paypal order",u);O.paypalErrorMessage=i("Failed to create PayPal order. Please try again, or consider using an alternative method.");c===null||c===void 0?void 0:c();return[2,""];case 7:return[2]}}))}))},onApprove:function(r,n){return __awaiter(v,void 0,void 0,(function(){var r,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);O.paypalErrorMessage=null;I("zonos-checkout-payment-info");return[4,L({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:r=t.sent();O.orderIdCreated=r;s===null||s===void 0?void 0:s({orderId:r});a();u();return[3,3];case 2:n=t.sent();d("==== Failed to capture paypal order",n);if(n instanceof Error){return[2,B({error:n})]}c===null||c===void 0?void 0:c();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:l==="SHARP"?0:10,color:h?"gold":"blue",shape:"rect"}}};var R=function(){if(!O.paypalButtons.length){return}O.paypalButtons.forEach((function(r){return __awaiter(v,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,r.close()];case 1:n.sent();return[2]}}))}))}));O.paypalButtons=[]};var D=r("p",(function(r){return __awaiter(v,[r],void 0,(function(r){var e,t,o,i,a;var u=r.currency;return __generator(this,(function(r){switch(r.label){case 0:t=!!((e=n.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(r){return r.type==="PAYPAL"&&r.status==="ENABLED"})));if(!t){s("=== Paypal is disabled for this store","warn");return[2]}o=n.checkoutSettings.externalServiceTokens.find((function(r){return r.type==="PAYPAL_CLIENT_ID"}));if(!o){s("Failed to load paypal -- missing paypal publishable key","warn");return[2]}i=n.zonosMode==="production"&&n.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=window.Zonos;return[4,g({clientId:o.token,currency:u,environment:i})];case 1:a.paypal=r.sent();s("==== Paypal script loaded");return[2]}}))}))}));var F=r("d",(function(r){var n;var e=window.Zonos.paypal;if(!e){s("Paypal is not available");return null}var o=t.checkoutSessionId;if(!o){s("Paypal is not available due to checkoutSessionId is not available");return null}s("==== Loading Paypal buttons");R();var i=[(n=e.FUNDING)===null||n===void 0?void 0:n.PAYPAL].filter(Boolean);O.paypalButtons=i.map((function(n){var t;var i=null;try{i=((t=e.Buttons)===null||t===void 0?void 0:t.call(e,Object.assign(Object.assign({},C(Object.assign({checkoutSessionId:o,fundingSource:n},r))),{fundingSource:n})))||null}catch(r){s("===== Failed to load paypal's \"".concat(n,'" button'),"warn",r)}if(i===null||i===void 0?void 0:i.isEligible()){s("==== Paypal button ".concat(n," loaded"));return i}return null})).filter(Boolean);return O.paypalButtons}));var z=r("c",(function(){return!!O.paypalButtons.length}))}}}));
@@ -1,4 +1,4 @@
1
- import{z as o,c as e}from"./p-9dd6b00d.js";import{d as r,q as n,t,p as a,h as i}from"./p-8d9112e9.js";import{h as s,l as c,a as l,j as u}from"./p-6be07fde.js";import{t as d}from"./p-23a84835.js";
1
+ import{z as o,c as e}from"./p-9dd6b00d.js";import{d as r,q as n,t,p as a,h as i}from"./p-9fd3995f.js";import{h as s,l as c,a as l,j as u}from"./p-fb59c3c3.js";import{t as d}from"./p-23a84835.js";
2
2
  /*!
3
3
  * paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
@@ -14,4 +14,4 @@ import{z as o,c as e}from"./p-9dd6b00d.js";import{d as r,q as n,t,p as a,h as i}
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */function p(o,e){void 0===e&&(e={});var r=document.createElement("script");return r.src=o,Object.keys(e).forEach((function(o){r.setAttribute(o,e[o]),"data-csp-nonce"===o&&r.setAttribute("nonce",e["data-csp-nonce"])})),r}function y(o){return window[o]}function v(o,e){if("object"!=typeof o||null===o)throw new Error("Expected an options object.");var r=o.environment;if(r&&"production"!==r&&"sandbox"!==r)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==e&&"function"!=typeof e)throw new Error("Expected PromisePonyfill to be a function.")}const f=({backgroundColor1:o,backgroundColor2:e})=>d.readability(o,e)>2.5,w=e=>{const r=o.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));r&&"DISABLED"!==(null==r?void 0:r.status)&&"function"==typeof window.gtag&&(c("Zonos submits gtag event","log",e),window.gtag("event",e,{}))},{reset:b,state:h}=e((()=>({orderIdCreated:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}))),m=({checkoutSessionId:e,onPaypalFail:c,onPaypalSessionDone:d,overrideBorderRaidus:p,overridePrimaryColor:y})=>({createOrder:async()=>{try{h.paypalErrorMessage=null,r.inventoryCheckErrorMessage=null;try{r.inventoryCheckErrorMessage=await n()}catch(o){r.inventoryCheckErrorMessage=t("Unable to check inventory. Please try again.")}return r.inventoryCheckErrorMessage?"":await(async({checkoutSessionId:o})=>{var e,r;const{errors:n,json:t}=await(async({checkoutSessionId:o})=>{const{errors:e,json:r}=await s("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o},method:"POST"});return{errors:e,json:r}})({checkoutSessionId:o}),a=null===(e=null==t?void 0:t.paypalOrderCreate)||void 0===e?void 0:e.paypalOrderId;if(n.length||!a)throw new Error((null===(r=n.find(Boolean))||void 0===r?void 0:r.message)||"An unexpected error occurred when creating paypal order.");return a})({checkoutSessionId:e})}catch(o){return l("Failed to create paypal order",o),h.paypalErrorMessage=t("Failed to create PayPal order. Please try again, or consider using an alternative method."),null==c||c(),""}},onApprove:async()=>{try{h.paypalErrorMessage=null,w("zonos-checkout-payment-info");const o=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{var r,n;new URL(window.location.href);const{errors:a,json:i}=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{const{errors:r,json:n}=await s("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:e},method:"POST"});return{errors:r,json:n}})({checkoutSessionId:o,paypalMockResponse:e}),c=null===(r=null==i?void 0:i.paypalOrderCapture.order)||void 0===r?void 0:r.id;if(a.length||!c)throw new Error((null===(n=a.find(Boolean))||void 0===n?void 0:n.message)||t("An unexpected error occurred when processing PayPal order."));return c})({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse});h.orderIdCreated=o,null==d||d({orderId:o}),a(),i()}catch(o){if(l("==== Failed to capture paypal order",o),o instanceof Error)return(({error:o})=>{var e;const r=u(o.message),n=null===(e=null==r?void 0:r.errors.find(Boolean))||void 0===e?void 0:e.message,a=(null==n?void 0:n.match(/\[(.*?)\] (.*)/i))||[];a||(h.paypalErrorMessage=t("An unexpected error occurred when processing PayPal order."));const i=a[2]||t("An unexpected error occurred when processing PayPal order.");h.paypalErrorMessage=i})({error:o});null==c||c()}},style:{borderRadius:"SHARP"===p?0:10,color:f({backgroundColor1:"#ffc33a",backgroundColor2:y||o.appearance.colorPrimary||""})?"gold":"blue",shape:"rect"}}),P=async({currency:e})=>{var r;if(!(null===(r=o.checkoutSettings.externalPaymentMethods)||void 0===r?void 0:r.find((o=>"PAYPAL"===o.type&&"ENABLED"===o.status))))return void c("=== Paypal is disabled for this store","warn");const n=o.checkoutSettings.externalServiceTokens.find((o=>"PAYPAL_CLIENT_ID"===o.type));if(!n)return void c("Fail to load paypal -- missing paypal publishable key","warn");const t="production"===o.zonosMode&&"LIVE"===o.checkoutSettings.mode?"production":"sandbox";window.Zonos.paypal=await function(o,e){if(void 0===e&&(e=Promise),v(o,e),"undefined"==typeof document)return e.resolve(null);var r=function(o){var e="sandbox"===o.environment?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete o.environment,o.sdkBaseUrl&&(e=o.sdkBaseUrl,delete o.sdkBaseUrl);var r,n,t=o,a=Object.keys(t).filter((function(o){return null!=t[o]&&""!==t[o]})).reduce((function(o,e){var r=t[e].toString();return"data"===(e=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(function(o,e){return(e?"-":"")+o.toLowerCase()}))).substring(0,4)||"crossorigin"===e?o.attributes[e]=r:o.queryParams[e]=r,o}),{queryParams:{},attributes:{}}),i=a.queryParams,s=a.attributes;return i["merchant-id"]&&-1!==i["merchant-id"].indexOf(",")&&(s["data-merchant-id"]=i["merchant-id"],i["merchant-id"]="*"),{url:"".concat(e,"?").concat((r=i,n="",Object.keys(r).forEach((function(o){0!==n.length&&(n+="&"),n+=o+"="+r[o]})),n)),attributes:s}}(o),n=r.url,t=r.attributes,a=t["data-namespace"]||"paypal",i=y(a);return t["data-js-sdk-library"]||(t["data-js-sdk-library"]="paypal-js"),function(o,e){var r=document.querySelector('script[src="'.concat(o,'"]'));if(null===r)return null;var n=p(o,e),t=r.cloneNode();if(delete t.dataset.uidAuto,Object.keys(t.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(t.dataset).forEach((function(o){t.dataset[o]!==n.dataset[o]&&(a=!1)})),a?r:null}(n,t)&&i?e.resolve(i):function(o,e){void 0===e&&(e=Promise),v(o,e);var r=o.url,n=o.attributes;if("string"!=typeof r||0===r.length)throw new Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw new Error("Expected attributes to be an object.");return new e((function(o,e){if("undefined"==typeof document)return o();!function(o){var e=o.onSuccess,r=o.onError,n=p(o.url,o.attributes);n.onerror=r,n.onload=e,document.head.insertBefore(n,document.head.firstElementChild)}({url:r,attributes:n,onSuccess:function(){return o()},onError:function(){var o=new Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return e(o)}})}))}({url:n,attributes:t},e).then((function(){var o=y(a);if(o)return o;throw new Error("The window.".concat(a," global variable is not available."))}))}({clientId:n.token,currency:e,environment:t}),c("==== Paypal script loaded")},k=o=>{var e;const n=window.Zonos.paypal;if(!n)return c("Paypal is not available"),null;const t=r.checkoutSessionId;if(!t)return c("Paypal is not available due to checkoutSessionId is not available"),null;c("==== Loading Paypal buttons"),h.paypalButtons.length&&(h.paypalButtons.forEach((async o=>{await o.close()})),h.paypalButtons=[]);const a=[null===(e=n.FUNDING)||void 0===e?void 0:e.PAYPAL].filter(Boolean);return h.paypalButtons=a.map((e=>{var r;let a=null;try{a=(null===(r=n.Buttons)||void 0===r?void 0:r.call(n,Object.assign(Object.assign({},m(Object.assign({checkoutSessionId:t,fundingSource:e},o))),{fundingSource:e})))||null}catch(o){c(`===== Fail to load paypal's "${e}" button`,"warn",o)}return(null==a?void 0:a.isEligible())?(c(`==== Paypal button ${e} loaded`),a):null})).filter(Boolean),h.paypalButtons},j=()=>!!h.paypalButtons.length;export{h as a,b,j as c,k as d,f as i,P as p,w as s}
17
+ */function p(o,e){void 0===e&&(e={});var r=document.createElement("script");return r.src=o,Object.keys(e).forEach((function(o){r.setAttribute(o,e[o]),"data-csp-nonce"===o&&r.setAttribute("nonce",e["data-csp-nonce"])})),r}function y(o){return window[o]}function v(o,e){if("object"!=typeof o||null===o)throw new Error("Expected an options object.");var r=o.environment;if(r&&"production"!==r&&"sandbox"!==r)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==e&&"function"!=typeof e)throw new Error("Expected PromisePonyfill to be a function.")}const f=({backgroundColor1:o,backgroundColor2:e})=>d.readability(o,e)>2.5,w=e=>{const r=o.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));r&&"DISABLED"!==(null==r?void 0:r.status)&&"function"==typeof window.gtag&&(c("Zonos submits gtag event","log",e),window.gtag("event",e,{}))},{reset:b,state:h}=e((()=>({orderIdCreated:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}))),m=({checkoutSessionId:e,onPaypalFail:c,onPaypalSessionDone:d,overrideBorderRaidus:p,overridePrimaryColor:y})=>({createOrder:async()=>{try{h.paypalErrorMessage=null,r.inventoryCheckErrorMessage=null;try{r.inventoryCheckErrorMessage=await n()}catch(o){r.inventoryCheckErrorMessage=t("Unable to check inventory. Please try again.")}return r.inventoryCheckErrorMessage?"":await(async({checkoutSessionId:o})=>{var e,r;const{errors:n,json:t}=await(async({checkoutSessionId:o})=>{const{errors:e,json:r}=await s("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o},method:"POST"});return{errors:e,json:r}})({checkoutSessionId:o}),a=null===(e=null==t?void 0:t.paypalOrderCreate)||void 0===e?void 0:e.paypalOrderId;if(n.length||!a)throw new Error((null===(r=n.find(Boolean))||void 0===r?void 0:r.message)||"An unexpected error occurred when creating paypal order.");return a})({checkoutSessionId:e})}catch(o){return l("Failed to create paypal order",o),h.paypalErrorMessage=t("Failed to create PayPal order. Please try again, or consider using an alternative method."),null==c||c(),""}},onApprove:async()=>{try{h.paypalErrorMessage=null,w("zonos-checkout-payment-info");const o=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{var r,n;new URL(window.location.href);const{errors:a,json:i}=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{const{errors:r,json:n}=await s("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:e},method:"POST"});return{errors:r,json:n}})({checkoutSessionId:o,paypalMockResponse:e}),c=null===(r=null==i?void 0:i.paypalOrderCapture.order)||void 0===r?void 0:r.id;if(a.length||!c)throw new Error((null===(n=a.find(Boolean))||void 0===n?void 0:n.message)||t("An unexpected error occurred when processing PayPal order."));return c})({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse});h.orderIdCreated=o,null==d||d({orderId:o}),a(),i()}catch(o){if(l("==== Failed to capture paypal order",o),o instanceof Error)return(({error:o})=>{var e;const r=u(o.message),n=null===(e=null==r?void 0:r.errors.find(Boolean))||void 0===e?void 0:e.message,a=(null==n?void 0:n.match(/\[(.*?)\] (.*)/i))||[];a||(h.paypalErrorMessage=t("An unexpected error occurred when processing PayPal order."));const i=a[2]||t("An unexpected error occurred when processing PayPal order.");h.paypalErrorMessage=i})({error:o});null==c||c()}},style:{borderRadius:"SHARP"===p?0:10,color:f({backgroundColor1:"#ffc33a",backgroundColor2:y||o.appearance.colorPrimary||""})?"gold":"blue",shape:"rect"}}),P=async({currency:e})=>{var r;if(!(null===(r=o.checkoutSettings.externalPaymentMethods)||void 0===r?void 0:r.find((o=>"PAYPAL"===o.type&&"ENABLED"===o.status))))return void c("=== Paypal is disabled for this store","warn");const n=o.checkoutSettings.externalServiceTokens.find((o=>"PAYPAL_CLIENT_ID"===o.type));if(!n)return void c("Failed to load paypal -- missing paypal publishable key","warn");const t="production"===o.zonosMode&&"LIVE"===o.checkoutSettings.mode?"production":"sandbox";window.Zonos.paypal=await function(o,e){if(void 0===e&&(e=Promise),v(o,e),"undefined"==typeof document)return e.resolve(null);var r=function(o){var e="sandbox"===o.environment?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete o.environment,o.sdkBaseUrl&&(e=o.sdkBaseUrl,delete o.sdkBaseUrl);var r,n,t=o,a=Object.keys(t).filter((function(o){return null!=t[o]&&""!==t[o]})).reduce((function(o,e){var r=t[e].toString();return"data"===(e=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(function(o,e){return(e?"-":"")+o.toLowerCase()}))).substring(0,4)||"crossorigin"===e?o.attributes[e]=r:o.queryParams[e]=r,o}),{queryParams:{},attributes:{}}),i=a.queryParams,s=a.attributes;return i["merchant-id"]&&-1!==i["merchant-id"].indexOf(",")&&(s["data-merchant-id"]=i["merchant-id"],i["merchant-id"]="*"),{url:"".concat(e,"?").concat((r=i,n="",Object.keys(r).forEach((function(o){0!==n.length&&(n+="&"),n+=o+"="+r[o]})),n)),attributes:s}}(o),n=r.url,t=r.attributes,a=t["data-namespace"]||"paypal",i=y(a);return t["data-js-sdk-library"]||(t["data-js-sdk-library"]="paypal-js"),function(o,e){var r=document.querySelector('script[src="'.concat(o,'"]'));if(null===r)return null;var n=p(o,e),t=r.cloneNode();if(delete t.dataset.uidAuto,Object.keys(t.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(t.dataset).forEach((function(o){t.dataset[o]!==n.dataset[o]&&(a=!1)})),a?r:null}(n,t)&&i?e.resolve(i):function(o,e){void 0===e&&(e=Promise),v(o,e);var r=o.url,n=o.attributes;if("string"!=typeof r||0===r.length)throw new Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw new Error("Expected attributes to be an object.");return new e((function(o,e){if("undefined"==typeof document)return o();!function(o){var e=o.onSuccess,r=o.onError,n=p(o.url,o.attributes);n.onerror=r,n.onload=e,document.head.insertBefore(n,document.head.firstElementChild)}({url:r,attributes:n,onSuccess:function(){return o()},onError:function(){var o=new Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return e(o)}})}))}({url:n,attributes:t},e).then((function(){var o=y(a);if(o)return o;throw new Error("The window.".concat(a," global variable is not available."))}))}({clientId:n.token,currency:e,environment:t}),c("==== Paypal script loaded")},k=o=>{var e;const n=window.Zonos.paypal;if(!n)return c("Paypal is not available"),null;const t=r.checkoutSessionId;if(!t)return c("Paypal is not available due to checkoutSessionId is not available"),null;c("==== Loading Paypal buttons"),h.paypalButtons.length&&(h.paypalButtons.forEach((async o=>{await o.close()})),h.paypalButtons=[]);const a=[null===(e=n.FUNDING)||void 0===e?void 0:e.PAYPAL].filter(Boolean);return h.paypalButtons=a.map((e=>{var r;let a=null;try{a=(null===(r=n.Buttons)||void 0===r?void 0:r.call(n,Object.assign(Object.assign({},m(Object.assign({checkoutSessionId:t,fundingSource:e},o))),{fundingSource:e})))||null}catch(o){c(`===== Failed to load paypal's "${e}" button`,"warn",o)}return(null==a?void 0:a.isEligible())?(c(`==== Paypal button ${e} loaded`),a):null})).filter(Boolean),h.paypalButtons},j=()=>!!h.paypalButtons.length;export{h as a,b,j as c,k as d,f as i,P as p,w as s}
@@ -1 +1 @@
1
- import{r as e,h as o,H as t}from"./p-5b7da777.js";import{K as s,t as a,l as n}from"./p-8d9112e9.js";import{d as l}from"./p-9dd6b00d.js";import{l as i}from"./p-97aceb11.js";import"./p-6be07fde.js";import"./p-23a84835.js";import"./p-f05f3e27.js";const c=class{constructor(o){e(this,o),this.languageSelected=e=>{s(e),this.handleOnClose()},this.handleOnClose=()=>{}}render(){const{selectedLocale:e}=n;return o(t,{key:"448f89b5870956b6e9455968134b94c9409a983d",class:"zonos--elements",style:{"--font-family":l()}},o("div",{key:"23841aa801d68da4b537cfaab5ea89405ec66a9f",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"5fc1b45aa0cb27c94163c2dace5ce4ad63215dfc",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"7030fb276a05eea0e7333add3219b5316495662c",class:"zonos--language-select-content"},i.map((t=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(t.code)},o("zonos-text",{textColor:"gray-800"},t.translatedLabel),t.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};c.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const d=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(t,{key:"8ac4e1bcd64f6a2073e1161fec76c9b117345ada",class:"zonos--elements",style:{"--font-family":l()}},o("zonos-v-stack",{key:"fe4a184a8bed7aceb4c3f8d341fed50380587c77",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"2176069a11ba20c7408ef898044f2ba68eea4a80",class:"zonos--select-dialog-header"},o("zonos-text",{key:"45b9d890484881a15c4fa7a7e4028f9887cc942e",type:"boldLabel"},this.label),o("zonos-button",{key:"65f0d9ea7b6dee35d23aa6fca19fd686190b667f",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"758fce95d668ad755745687d3fcf1a6a307061bc"})))}};d.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{c as zonos_language_select,d as zonos_select_dialog_header}
1
+ import{r as e,h as o,H as t}from"./p-5b7da777.js";import{K as s,t as a,l as n}from"./p-9fd3995f.js";import{d as l}from"./p-9dd6b00d.js";import{l as i}from"./p-97aceb11.js";import"./p-fb59c3c3.js";import"./p-23a84835.js";import"./p-f05f3e27.js";const c=class{constructor(o){e(this,o),this.languageSelected=e=>{s(e),this.handleOnClose()},this.handleOnClose=()=>{}}render(){const{selectedLocale:e}=n;return o(t,{key:"448f89b5870956b6e9455968134b94c9409a983d",class:"zonos--elements",style:{"--font-family":l()}},o("div",{key:"23841aa801d68da4b537cfaab5ea89405ec66a9f",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"5fc1b45aa0cb27c94163c2dace5ce4ad63215dfc",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"7030fb276a05eea0e7333add3219b5316495662c",class:"zonos--language-select-content"},i.map((t=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(t.code)},o("zonos-text",{textColor:"gray-800"},t.translatedLabel),t.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};c.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const d=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(t,{key:"8ac4e1bcd64f6a2073e1161fec76c9b117345ada",class:"zonos--elements",style:{"--font-family":l()}},o("zonos-v-stack",{key:"fe4a184a8bed7aceb4c3f8d341fed50380587c77",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"2176069a11ba20c7408ef898044f2ba68eea4a80",class:"zonos--select-dialog-header"},o("zonos-text",{key:"45b9d890484881a15c4fa7a7e4028f9887cc942e",type:"boldLabel"},this.label),o("zonos-button",{key:"65f0d9ea7b6dee35d23aa6fca19fd686190b667f",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"758fce95d668ad755745687d3fcf1a6a307061bc"})))}};d.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{c as zonos_language_select,d as zonos_select_dialog_header}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,n,o){function t(e){return e instanceof n?e:new n((function(r){r(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{u(o.next(e))}catch(e){a(e)}}function s(e){try{u(o["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):t(e.value).then(i,s)}u((o=o.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,t,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(r){return u([e,r])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(n=0)),n)try{if(o=1,t&&(a=s[0]&2?t["return"]:s[0]?t["throw"]||((a=t["return"])&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;if(t=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;t=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=r.call(e,n)}catch(e){s=[6,e];t=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r,n){if(n||arguments.length===2)for(var o=0,t=r.length,a;o<t;o++){if(a||!(o in r)){if(!a)a=Array.prototype.slice.call(r,0,o);a[o]=r[o]}}return e.concat(a||Array.prototype.slice.call(r))};System.register([],(function(e){"use strict";return{execute:function(){var r=this;var n=e("l",(function(e,r){var n=[];for(var o=2;o<arguments.length;o++){n[o-2]=arguments[o]}var t,a;var i=!!((t=window.Zonos)===null||t===void 0?void 0:t.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/);if(!i){if(r==="error"){console.error.apply(console,__spreadArray([e],n,false))}return}var s=document.querySelector("iframe#zonos---debug-logging-iframe");if(!s){s=document.createElement("iframe");s.id="zonos---debug-logging-iframe";s.style.display="none";s.style.opacity="0";s.style.position="absolute";s.style.top="-9999px";s.style.left="-9999px";s.style.width="1px";s.style.height="1px";s.style.border="none";s.style.overflow="hidden";s.style.visibility="hidden";document.body.appendChild(s)}var u=((a=s.contentWindow)===null||a===void 0?void 0:a.window.console)||window.console;switch(r){case"warn":u.warn.apply(u,__spreadArray([e],n,false));break;case"info":u.info.apply(u,__spreadArray([e],n,false));break;case"error":u.error.apply(u,__spreadArray([e],n,false));break;default:u.groupCollapsed.apply(u,__spreadArray([e],n,false));u.trace();u.groupEnd();break}}));var o=e("a",(function(e){var r=[];for(var o=1;o<arguments.length;o++){r[o-1]=arguments[o]}n.apply(void 0,__spreadArray([e,"error"],r,false))}));var t=["cloudflare","vercel"];var a=t[0];var i=e("f",{cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"});var s=i[a];var u=function(e){if(e===void 0){e=a}var r=t.indexOf(e);var n=t[r+1];if(!n){return null}return n};var c=e("j",(function(e){if(typeof e==="string"){try{var r=JSON.parse(e);return r}catch(e){return null}}return null}));var f=1*3600*1e3;var l=e("s",(function(e){return __awaiter(r,[e],void 0,(function(e){var r,n,o,t,a;var c=e.endpoint,l=e.errors,d=e.metadata,v=e.shouldPostReleaseErrorReporting;return __generator(this,(function(e){if(v){r=Number(window.Zonos.releaseDate);n=(new Date).getTime();if(n-r>f){return[2]}}o="userAgentData"in window.navigator?window.navigator.userAgentData:null;t={endpoint:c,errors:l,metadata:Object.assign({href:window.location.href,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent},d)};try{void fetch("".concat(s,"/api/zonos-elements/log-error"),{body:JSON.stringify(t),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){a=u();if(!a){return[2]}void fetch("".concat(i[a],"/api/zonos-elements/log-error"),{body:JSON.stringify(t),method:"POST"})}return[2]}))}))}));var d=undefined&&undefined.__rest||function(e,r){var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0)n[o]=e[o];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var t=0,o=Object.getOwnPropertySymbols(e);t<o.length;t++){if(r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t]))n[o[t]]=e[o[t]]}return n};var v=function(e){return __awaiter(r,[e],void 0,(function(e){var r,n;var o=e.response,t=e.shouldLog,a=t===void 0?true:t,i=e.shouldThrow,s=i===void 0?false:i;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,o.json()];case 1:r=e.sent();return[2,r];case 2:n=e.sent();if(s){throw n}if(a){console.error(n)}return[2,null];case 3:return[2]}}))}))};var w=function(e){try{var r=btoa(e).replace(/=/g,"");return r}catch(r){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}};var h=function(e){return __awaiter(r,[e],void 0,(function(e){var r,n,o,t,s,u,c,f,l,d,l,u,h,u;var p=e.basePathType,b=e.options,y=e.path;return __generator(this,(function(e){switch(e.label){case 0:n=i[p]||a;o=n+y;t=new URL(o);t.searchParams.set("zToken",w(window.location.hostname));e.label=1;case 1:e.trys.push([1,3,,4]);return[4,fetch(t.toString(),b)];case 2:r=e.sent();return[3,4];case 3:s=e.sent();if(s instanceof Error){return[2,{baseUrl:n,errors:[{message:s.message,type:"unknown"}],json:null,response:null,zonosMode:null}]}u="Fail to fetch";return[2,{baseUrl:n,errors:[{message:u,type:"unknown"}],json:null,response:null,zonosMode:null}];case 4:c=r.headers.get("Zonos-Mode");f=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&c&&f){window.Zonos.modeAlerted=true}if(!r.ok)return[3,6];return[4,v({response:r})];case 5:l=e.sent();return[2,{baseUrl:n,errors:[],json:l,response:r,zonosMode:c}];case 6:d=r.status.toString();e.label=7;case 7:e.trys.push([7,9,,10]);return[4,v({response:r,shouldThrow:true})];case 8:l=e.sent();u=JSON.stringify(l);return[2,{baseUrl:n,errors:[{message:u,type:d}],json:null,response:r,zonosMode:c}];case 9:h=e.sent();u="Unknown error";return[2,{baseUrl:n,errors:[{message:"".concat(d,": ").concat(u),type:d}],json:null,response:null,zonosMode:c}];case 10:return[2]}}))}))};var p=function(e){return __awaiter(r,[e],void 0,(function(e){var r,o,t,a,s,f,v,w,b,y,_,m;var g=e.basePathType,k=e.options,j=e.path;return __generator(this,(function(e){switch(e.label){case 0:t=j.startsWith("/api/bigcommerce");a=t?"vercel":g;return[4,h({basePathType:a,options:k,path:j})];case 1:s=e.sent(),f=s.errors,v=s.response,w=d(s,["errors","response"]);b=u(a);y=f.find((function(e){var r=e.type;return r==="unknown"}));_=!!y||(v===null||v===void 0?void 0:v.status)===404;m=b&&_;if(_){void l({endpoint:i[a]+j,errors:f.map((function(e){var r=e.message;return"API: ".concat(r)})),metadata:{currentBasePath:a,nextFallbackApiType:b,requestHeaders:k===null||k===void 0?void 0:k.headers,requestPayload:c((r=k===null||k===void 0?void 0:k.body)===null||r===void 0?void 0:r.toString())||((o=k===null||k===void 0?void 0:k.body)===null||o===void 0?void 0:o.toString()),status:v===null||v===void 0?void 0:v.status,statusText:v===null||v===void 0?void 0:v.statusText},shouldPostReleaseErrorReporting:true})}if(m){n('=== "'.concat(j,'" failed to fetch, trying next fallback ').concat(b));return[2,p({basePathType:b,options:k,path:j})]}return[2,Object.assign({errors:f,response:v},w)]}}))}))};var b=e("h",(function(e,n){return __awaiter(r,void 0,void 0,(function(){var r,o,t,i,s,u;return __generator(this,(function(c){r=d(n||{},[]);o=r.body?JSON.stringify(r.body):undefined;t=r.method||"GET";i=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},r.headers);s=Object.assign(Object.assign({},r),{body:t==="GET"?undefined:o,headers:i,method:t});u=new URLSearchParams(window.location.search).get("useFallbackApi");return[2,p({basePathType:u||a,options:s,path:e})]}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,r,n,o){function t(e){return e instanceof n?e:new n((function(r){r(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{u(o.next(e))}catch(e){a(e)}}function s(e){try{u(o["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):t(e.value).then(i,s)}u((o=o.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,t,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(r){return u([e,r])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(n=0)),n)try{if(o=1,t&&(a=s[0]&2?t["return"]:s[0]?t["throw"]||((a=t["return"])&&a.call(t),0):t.next)&&!(a=a.call(t,s[1])).done)return a;if(t=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;t=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=r.call(e,n)}catch(e){s=[6,e];t=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r,n){if(n||arguments.length===2)for(var o=0,t=r.length,a;o<t;o++){if(a||!(o in r)){if(!a)a=Array.prototype.slice.call(r,0,o);a[o]=r[o]}}return e.concat(a||Array.prototype.slice.call(r))};System.register([],(function(e){"use strict";return{execute:function(){var r=this;var n=e("l",(function(e,r){var n=[];for(var o=2;o<arguments.length;o++){n[o-2]=arguments[o]}var t,a;var i=!!((t=window.Zonos)===null||t===void 0?void 0:t.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/);if(!i){if(r==="error"){console.error.apply(console,__spreadArray([e],n,false))}return}var s=document.querySelector("iframe#zonos---debug-logging-iframe");if(!s){s=document.createElement("iframe");s.id="zonos---debug-logging-iframe";s.style.display="none";s.style.opacity="0";s.style.position="absolute";s.style.top="-9999px";s.style.left="-9999px";s.style.width="1px";s.style.height="1px";s.style.border="none";s.style.overflow="hidden";s.style.visibility="hidden";document.body.appendChild(s)}var u=((a=s.contentWindow)===null||a===void 0?void 0:a.window.console)||window.console;switch(r){case"warn":u.warn.apply(u,__spreadArray([e],n,false));break;case"info":u.info.apply(u,__spreadArray([e],n,false));break;case"error":u.error.apply(u,__spreadArray([e],n,false));break;default:u.groupCollapsed.apply(u,__spreadArray([e],n,false));u.trace();u.groupEnd();break}}));var o=e("a",(function(e){var r=[];for(var o=1;o<arguments.length;o++){r[o-1]=arguments[o]}n.apply(void 0,__spreadArray([e,"error"],r,false))}));var t=["cloudflare","vercel"];var a=t[0];var i=e("f",{cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"});var s=i[a];var u=function(e){if(e===void 0){e=a}var r=t.indexOf(e);var n=t[r+1];if(!n){return null}return n};var c=e("j",(function(e){if(typeof e==="string"){try{var r=JSON.parse(e);return r}catch(e){return null}}return null}));var f=1*3600*1e3;var l=e("s",(function(e){return __awaiter(r,[e],void 0,(function(e){var r,n,o,t,a;var c=e.endpoint,l=e.errors,d=e.metadata,v=e.shouldPostReleaseErrorReporting;return __generator(this,(function(e){if(v){r=Number(window.Zonos.releaseDate);n=(new Date).getTime();if(n-r>f){return[2]}}o="userAgentData"in window.navigator?window.navigator.userAgentData:null;t={endpoint:c,errors:l,metadata:Object.assign({href:window.location.href,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent},d)};try{void fetch("".concat(s,"/api/zonos-elements/log-error"),{body:JSON.stringify(t),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){a=u();if(!a){return[2]}void fetch("".concat(i[a],"/api/zonos-elements/log-error"),{body:JSON.stringify(t),method:"POST"})}return[2]}))}))}));var d=undefined&&undefined.__rest||function(e,r){var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0)n[o]=e[o];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var t=0,o=Object.getOwnPropertySymbols(e);t<o.length;t++){if(r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t]))n[o[t]]=e[o[t]]}return n};var v=function(e){return __awaiter(r,[e],void 0,(function(e){var r,n;var o=e.response,t=e.shouldLog,a=t===void 0?true:t,i=e.shouldThrow,s=i===void 0?false:i;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,o.json()];case 1:r=e.sent();return[2,r];case 2:n=e.sent();if(s){throw n}if(a){console.error(n)}return[2,null];case 3:return[2]}}))}))};var w=function(e){try{var r=btoa(e).replace(/=/g,"");return r}catch(r){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}};var h=function(e){return __awaiter(r,[e],void 0,(function(e){var r,n,o,t,s,u,c,f,l,d,l,u,h,u;var p=e.basePathType,b=e.options,y=e.path;return __generator(this,(function(e){switch(e.label){case 0:n=i[p]||a;o=n+y;t=new URL(o);t.searchParams.set("zToken",w(window.location.hostname));e.label=1;case 1:e.trys.push([1,3,,4]);return[4,fetch(t.toString(),b)];case 2:r=e.sent();return[3,4];case 3:s=e.sent();if(s instanceof Error){return[2,{baseUrl:n,errors:[{message:s.message,type:"unknown"}],json:null,response:null,zonosMode:null}]}u="Failed to fetch";return[2,{baseUrl:n,errors:[{message:u,type:"unknown"}],json:null,response:null,zonosMode:null}];case 4:c=r.headers.get("Zonos-Mode");f=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&c&&f){window.Zonos.modeAlerted=true}if(!r.ok)return[3,6];return[4,v({response:r})];case 5:l=e.sent();return[2,{baseUrl:n,errors:[],json:l,response:r,zonosMode:c}];case 6:d=r.status.toString();e.label=7;case 7:e.trys.push([7,9,,10]);return[4,v({response:r,shouldThrow:true})];case 8:l=e.sent();u=JSON.stringify(l);return[2,{baseUrl:n,errors:[{message:u,type:d}],json:null,response:r,zonosMode:c}];case 9:h=e.sent();u="Unknown error";return[2,{baseUrl:n,errors:[{message:"".concat(d,": ").concat(u),type:d}],json:null,response:null,zonosMode:c}];case 10:return[2]}}))}))};var p=function(e){return __awaiter(r,[e],void 0,(function(e){var r,o,t,a,s,f,v,w,b,y,_,m;var g=e.basePathType,k=e.options,j=e.path;return __generator(this,(function(e){switch(e.label){case 0:t=j.startsWith("/api/bigcommerce");a=t?"vercel":g;return[4,h({basePathType:a,options:k,path:j})];case 1:s=e.sent(),f=s.errors,v=s.response,w=d(s,["errors","response"]);b=u(a);y=f.find((function(e){var r=e.type;return r==="unknown"}));_=!!y||(v===null||v===void 0?void 0:v.status)===404;m=b&&_;if(_){void l({endpoint:i[a]+j,errors:f.map((function(e){var r=e.message;return"API: ".concat(r)})),metadata:{currentBasePath:a,nextFallbackApiType:b,requestHeaders:k===null||k===void 0?void 0:k.headers,requestPayload:c((r=k===null||k===void 0?void 0:k.body)===null||r===void 0?void 0:r.toString())||((o=k===null||k===void 0?void 0:k.body)===null||o===void 0?void 0:o.toString()),status:v===null||v===void 0?void 0:v.status,statusText:v===null||v===void 0?void 0:v.statusText},shouldPostReleaseErrorReporting:true})}if(m){n('=== "'.concat(j,'" failed to fetch, trying next fallback ').concat(b));return[2,p({basePathType:b,options:k,path:j})]}return[2,Object.assign({errors:f,response:v},w)]}}))}))};var b=e("h",(function(e,n){return __awaiter(r,void 0,void 0,(function(){var r,o,t,i,s,u;return __generator(this,(function(c){r=d(n||{},[]);o=r.body?JSON.stringify(r.body):undefined;t=r.method||"GET";i=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},r.headers);s=Object.assign(Object.assign({},r),{body:t==="GET"?undefined:o,headers:i,method:t});u=new URLSearchParams(window.location.search).get("useFallbackApi");return[2,p({basePathType:u||a,options:s,path:e})]}))}))}))}}}));
@@ -1 +1 @@
1
- import{h as t,l as o,a as e}from"./p-6be07fde.js";const a=async a=>{const s=await(async o=>{const{errors:e,json:a}=await t("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"});return!a||e.length?null:a})(a);return o("[ZONOS - loadZonos] getting temp cart data","info",s),s?{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}:(e("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)},s="zonos--checkout-hidden-button",n="zonos--domestic-redirected-checkout-button";export{s as c,n as d,a as s}
1
+ import{h as t,l as o,a as e}from"./p-fb59c3c3.js";const a=async a=>{const s=await(async o=>{const{errors:e,json:a}=await t("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"});return!a||e.length?null:a})(a);return o("[ZONOS - loadZonos] getting temp cart data","info",s),s?{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}:(e("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)},s="zonos--checkout-hidden-button",n="zonos--domestic-redirected-checkout-button";export{s as c,n as d,a as s}
@@ -1 +1 @@
1
- const e=(e,o,...n)=>{var r,t;if(!(null===(r=window.Zonos)||void 0===r?void 0:r.debug)&&!window.location.search.match(/\?.*(&*)zonosDebug=1/))return void("error"===o&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const a=(null===(t=s.contentWindow)||void 0===t?void 0:t.window.console)||window.console;switch(o){case"warn":a.warn(e,...n);break;case"info":a.info(e,...n);break;case"error":a.error(e,...n);break;default:a.groupCollapsed(e,...n),a.trace(),a.groupEnd()}},o=(o,...n)=>{e(o,"error",...n)},n=["cloudflare","vercel"],r=n[0],t={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},s=t[r],a=(e=r)=>{const o=n.indexOf(e);return n[o+1]||null},l=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},i=async({endpoint:e,errors:o,metadata:n,shouldPostReleaseErrorReporting:r})=>{if(r){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const l="userAgentData"in window.navigator?window.navigator.userAgentData:null,i={endpoint:e,errors:o,metadata:Object.assign({href:window.location.href,userAgent:l&&l.brands.length>0?l:window.navigator.userAgent},n)};try{fetch(`${s}/api/zonos-elements/log-error`,{body:JSON.stringify(i),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const o=a();if(!o)return;fetch(`${t[o]}/api/zonos-elements/log-error`,{body:JSON.stringify(i),method:"POST"})}};var d=function(e,o){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)o.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(n[r[t]]=e[r[t]])}return n};const c=async({response:e,shouldLog:o=!0,shouldThrow:n=!1})=>{try{return await e.json()}catch(e){if(n)throw e;return o&&console.error(e),null}},u=async({basePathType:o,options:n,path:s})=>{var p,w;const h=s.startsWith("/api/bigcommerce")?"vercel":o,b=await(async({basePathType:e,options:o,path:n})=>{let s;const a=t[e]||r,l=new URL(a+n);l.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));try{s=await fetch(l.toString(),o)}catch(e){return e instanceof Error?{baseUrl:a,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null}:{baseUrl:a,errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const i=s.headers.get("Zonos-Mode"),d=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&i&&d&&(window.Zonos.modeAlerted=!0),s.ok)return{baseUrl:a,errors:[],json:await c({response:s}),response:s,zonosMode:i};const u=s.status.toString();try{const e=await c({response:s,shouldThrow:!0});return{baseUrl:a,errors:[{message:JSON.stringify(e),type:u}],json:null,response:s,zonosMode:i}}catch(e){return{baseUrl:a,errors:[{message:`${u}: Unknown error`,type:u}],json:null,response:null,zonosMode:i}}})({basePathType:h,options:n,path:s}),{errors:f,response:m}=b,y=d(b,["errors","response"]),g=a(h),v=!!f.find((({type:e})=>"unknown"===e))||404===(null==m?void 0:m.status),j=g&&v;return v&&i({endpoint:t[h]+s,errors:f.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:h,nextFallbackApiType:g,requestHeaders:null==n?void 0:n.headers,requestPayload:l(null===(p=null==n?void 0:n.body)||void 0===p?void 0:p.toString())||(null===(w=null==n?void 0:n.body)||void 0===w?void 0:w.toString()),status:null==m?void 0:m.status,statusText:null==m?void 0:m.statusText},shouldPostReleaseErrorReporting:!0}),j?(e(`=== "${s}" failed to fetch, trying next fallback ${g}`),u({basePathType:g,options:n,path:s})):Object.assign({errors:f,response:m},y)},p=async(e,o)=>{const n=d(o||{},[]),t=n.body?JSON.stringify(n.body):void 0,s=n.method||"GET",a=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},n.headers),l=Object.assign(Object.assign({},n),{body:"GET"===s?void 0:t,headers:a,method:s}),i=new URLSearchParams(window.location.search).get("useFallbackApi");return u({basePathType:i||r,options:l,path:e})};export{o as a,t as f,p as h,l as j,e as l,i as s}
1
+ const e=(e,o,...n)=>{var r,t;if(!(null===(r=window.Zonos)||void 0===r?void 0:r.debug)&&!window.location.search.match(/\?.*(&*)zonosDebug=1/))return void("error"===o&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const a=(null===(t=s.contentWindow)||void 0===t?void 0:t.window.console)||window.console;switch(o){case"warn":a.warn(e,...n);break;case"info":a.info(e,...n);break;case"error":a.error(e,...n);break;default:a.groupCollapsed(e,...n),a.trace(),a.groupEnd()}},o=(o,...n)=>{e(o,"error",...n)},n=["cloudflare","vercel"],r=n[0],t={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},s=t[r],a=(e=r)=>{const o=n.indexOf(e);return n[o+1]||null},l=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},i=async({endpoint:e,errors:o,metadata:n,shouldPostReleaseErrorReporting:r})=>{if(r){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const l="userAgentData"in window.navigator?window.navigator.userAgentData:null,i={endpoint:e,errors:o,metadata:Object.assign({href:window.location.href,userAgent:l&&l.brands.length>0?l:window.navigator.userAgent},n)};try{fetch(`${s}/api/zonos-elements/log-error`,{body:JSON.stringify(i),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const o=a();if(!o)return;fetch(`${t[o]}/api/zonos-elements/log-error`,{body:JSON.stringify(i),method:"POST"})}};var d=function(e,o){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)o.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(n[r[t]]=e[r[t]])}return n};const c=async({response:e,shouldLog:o=!0,shouldThrow:n=!1})=>{try{return await e.json()}catch(e){if(n)throw e;return o&&console.error(e),null}},u=async({basePathType:o,options:n,path:s})=>{var p,w;const h=s.startsWith("/api/bigcommerce")?"vercel":o,b=await(async({basePathType:e,options:o,path:n})=>{let s;const a=t[e]||r,l=new URL(a+n);l.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));try{s=await fetch(l.toString(),o)}catch(e){return e instanceof Error?{baseUrl:a,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null}:{baseUrl:a,errors:[{message:"Failed to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const i=s.headers.get("Zonos-Mode"),d=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&i&&d&&(window.Zonos.modeAlerted=!0),s.ok)return{baseUrl:a,errors:[],json:await c({response:s}),response:s,zonosMode:i};const u=s.status.toString();try{const e=await c({response:s,shouldThrow:!0});return{baseUrl:a,errors:[{message:JSON.stringify(e),type:u}],json:null,response:s,zonosMode:i}}catch(e){return{baseUrl:a,errors:[{message:`${u}: Unknown error`,type:u}],json:null,response:null,zonosMode:i}}})({basePathType:h,options:n,path:s}),{errors:f,response:m}=b,y=d(b,["errors","response"]),g=a(h),v=!!f.find((({type:e})=>"unknown"===e))||404===(null==m?void 0:m.status),j=g&&v;return v&&i({endpoint:t[h]+s,errors:f.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:h,nextFallbackApiType:g,requestHeaders:null==n?void 0:n.headers,requestPayload:l(null===(p=null==n?void 0:n.body)||void 0===p?void 0:p.toString())||(null===(w=null==n?void 0:n.body)||void 0===w?void 0:w.toString()),status:null==m?void 0:m.status,statusText:null==m?void 0:m.statusText},shouldPostReleaseErrorReporting:!0}),j?(e(`=== "${s}" failed to fetch, trying next fallback ${g}`),u({basePathType:g,options:n,path:s})):Object.assign({errors:f,response:m},y)},p=async(e,o)=>{const n=d(o||{},[]),t=n.body?JSON.stringify(n.body):void 0,s=n.method||"GET",a=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},n.headers),l=Object.assign(Object.assign({},n),{body:"GET"===s?void 0:t,headers:a,method:s}),i=new URLSearchParams(window.location.search).get("useFallbackApi");return u({basePathType:i||r,options:l,path:e})};export{o as a,t as f,p as h,l as j,e as l,i as s}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-5b7da777.js";export{s as setNonce}from"./p-5b7da777.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-0f198151",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-ffa7d4c2",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-386bef53",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-6de38759",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-25633055",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-70bb4a25",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-5f7f51bd",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-747eed39",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-8e9dcaa3",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-6dcef5ce",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-eb3520e7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-f32d7972",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-9a1a2aa2",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-478b5c7d",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-cf9a46e8",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-a4309beb",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-e65dd068",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-1b071708",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-54f66cd1",[[17,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-a164f76d",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-29ad5aa6",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
1
+ import{p as e,b as o}from"./p-5b7da777.js";export{s as setNonce}from"./p-5b7da777.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-a99620c8",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-4b205b2f",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-6f87b869",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-6de38759",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-25633055",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-70bb4a25",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-5f7f51bd",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-747eed39",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-8e9dcaa3",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-6dcef5ce",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-eb3520e7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-d42018fc",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-95a18511",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-51d82a07",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-cf9a46e8",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-a4309beb",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-921d3603",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-35ca4dcc",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-54f66cd1",[[17,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-556d4ddb",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-173f8e5b",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.3.55",
3
+ "version": "1.3.57",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",