@ikas/bp-storefront 1.4.0-beta.22 → 1.4.0-beta.221

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 (131) hide show
  1. package/dist/analytics/analytics-functions/addToCart.js +1 -1
  2. package/dist/analytics/analytics-functions/addToWishlist.js +1 -1
  3. package/dist/analytics/analytics-functions/completeRegistration.js +1 -1
  4. package/dist/analytics/analytics-functions/contactForm.js +1 -1
  5. package/dist/analytics/analytics-functions/createEmailSubscription.js +1 -1
  6. package/dist/analytics/analytics-functions/customerLogin.js +1 -1
  7. package/dist/analytics/analytics-functions/customerLogout.js +1 -1
  8. package/dist/analytics/analytics-functions/customerVisit.js +1 -1
  9. package/dist/analytics/analytics-functions/pageView.js +1 -1
  10. package/dist/analytics/analytics-functions/productView.js +1 -1
  11. package/dist/analytics/analytics-functions/removeFromCart.js +1 -1
  12. package/dist/analytics/analytics-functions/search.js +1 -1
  13. package/dist/analytics/analytics-functions/viewBrand.js +1 -1
  14. package/dist/analytics/analytics-functions/viewCart.js +1 -1
  15. package/dist/analytics/analytics-functions/viewCategory.js +1 -1
  16. package/dist/analytics/analytics-functions/viewListing.js +1 -1
  17. package/dist/analytics/analytics-functions/viewSearchResults.js +1 -1
  18. package/dist/analytics/analytics-functions/viewStorefrontPopup.js +1 -1
  19. package/dist/analytics/events.d.ts +8 -0
  20. package/dist/analytics/events.js +1 -1
  21. package/dist/analytics/ikas/analytics.js +1 -1
  22. package/dist/analytics/openai/addToCart.d.ts +2 -0
  23. package/dist/analytics/openai/addToCart.js +1 -0
  24. package/dist/analytics/openai/completeRegistration.d.ts +1 -0
  25. package/dist/analytics/openai/completeRegistration.js +1 -0
  26. package/dist/analytics/openai/contactForm.d.ts +1 -0
  27. package/dist/analytics/openai/contactForm.js +1 -0
  28. package/dist/analytics/openai/initAdvancedMatching.d.ts +12 -0
  29. package/dist/analytics/openai/initAdvancedMatching.js +1 -0
  30. package/dist/analytics/openai/pageView.d.ts +1 -0
  31. package/dist/analytics/openai/pageView.js +1 -0
  32. package/dist/analytics/openai/productView.d.ts +2 -0
  33. package/dist/analytics/openai/productView.js +1 -0
  34. package/dist/analytics/openai/utils.d.ts +26 -0
  35. package/dist/analytics/openai/utils.js +1 -0
  36. package/dist/analytics/utils.d.ts +1 -0
  37. package/dist/analytics/utils.js +1 -1
  38. package/dist/functions/api/cart/index.d.ts +2 -0
  39. package/dist/functions/api/cart/index.js +1 -1
  40. package/dist/functions/api/customer/index.d.ts +10 -2
  41. package/dist/functions/api/customer/index.js +1 -1
  42. package/dist/functions/api/loyalty/index.d.ts +2 -1
  43. package/dist/functions/api/loyalty/index.js +1 -1
  44. package/dist/functions/api/product/index.js +1 -1
  45. package/dist/functions/models/attribute-detail/index.d.ts +3 -0
  46. package/dist/functions/models/attribute-list/index.d.ts +3 -0
  47. package/dist/functions/models/image/index.d.ts +71 -21
  48. package/dist/functions/models/image/index.js +1 -1
  49. package/dist/functions/models/index.d.ts +1 -0
  50. package/dist/functions/models/order/index.d.ts +139 -4
  51. package/dist/functions/models/order/index.js +1 -1
  52. package/dist/functions/models/product/attribute-value/index.d.ts +5 -0
  53. package/dist/functions/models/product/variant/index.d.ts +96 -6
  54. package/dist/functions/models/product/variant/index.js +1 -1
  55. package/dist/functions/models/product-list/index.js +1 -1
  56. package/dist/functions/models/validator/address/index.d.ts +70 -2
  57. package/dist/functions/models/validator/deactivate-customer/index.d.ts +54 -0
  58. package/dist/functions/models/validator/deactivate-customer/index.js +1 -0
  59. package/dist/functions/stores/base/index.d.ts +67 -0
  60. package/dist/functions/stores/base/index.js +1 -1
  61. package/dist/functions/stores/cart/index.d.ts +46 -2
  62. package/dist/functions/stores/cart/index.js +1 -1
  63. package/dist/functions/stores/customer/index.d.ts +322 -29
  64. package/dist/functions/stores/customer/index.js +1 -1
  65. package/dist/i18n/ikas-texts.d.ts +423 -0
  66. package/dist/i18n/index.d.ts +19 -0
  67. package/dist/index.d.ts +5 -1
  68. package/dist/index.js +1 -1
  69. package/dist/packages/storefront-api/src/__api/mutations/removeGiftCardFromCart.js +1 -0
  70. package/dist/packages/storefront-api/src/__api/mutations/unlinkExternalAccount.js +1 -0
  71. package/dist/packages/storefront-api/src/__api/queries/getExternalAccountLink.js +1 -0
  72. package/dist/packages/storefront-api/src/__api/queries/getLoyaltyProgram.js +1 -0
  73. package/dist/packages/storefront-api/src/__api/queries/getMilesSmilesDetails.js +1 -0
  74. package/dist/packages/storefront-api/src/__api/queries/getRefundableLines.js +1 -0
  75. package/dist/packages/storefront-api-client/src/utils/api.js +1 -1
  76. package/dist/packages/storefront-config/src/index.js +1 -1
  77. package/dist/packages/storefront-config/src/theme-globals.js +1 -0
  78. package/dist/router/index.d.ts +28 -0
  79. package/dist/router/index.js +1 -1
  80. package/dist/storefront-api/src/__api/mutations/removeGiftCardFromCart.d.ts +7 -0
  81. package/dist/storefront-api/src/__api/mutations/unlinkExternalAccount.d.ts +6 -0
  82. package/dist/storefront-api/src/__api/queries/getExternalAccountLink.d.ts +6 -0
  83. package/dist/storefront-api/src/__api/queries/getLoyaltyProgram.d.ts +3 -0
  84. package/dist/storefront-api/src/__api/queries/getMilesSmilesDetails.d.ts +3 -0
  85. package/dist/storefront-api/src/__api/queries/getRefundableLines.d.ts +6 -0
  86. package/dist/storefront-api/src/__api/types/index.d.ts +101 -6
  87. package/dist/storefront-api-client/src/utils/api.d.ts +7 -0
  88. package/dist/storefront-config/src/index.d.ts +32 -0
  89. package/dist/storefront-config/src/theme-globals.d.ts +349 -0
  90. package/dist/storefront-models/src/index.d.ts +8 -0
  91. package/dist/storefront-models/src/models/blueprint/prop-value/attribute-list.d.ts +2 -0
  92. package/dist/storefront-models/src/models/blueprint/prop-value/attribute.d.ts +2 -0
  93. package/dist/storefront-models/src/models/blueprint/prop-value/color.d.ts +2 -0
  94. package/dist/storefront-models/src/models/blueprint/prop-value/index.d.ts +1 -0
  95. package/dist/storefront-models/src/models/blueprint/prop-value/variable-binding.d.ts +16 -0
  96. package/dist/storefront-models/src/models/image/index.d.ts +7 -0
  97. package/dist/storefront-models/src/models/loyalty-program/customer-info/index.d.ts +2 -0
  98. package/dist/storefront-models/src/models/loyalty-program/earning-method/index.d.ts +1 -0
  99. package/dist/storefront-models/src/models/loyalty-program/index.d.ts +1 -0
  100. package/dist/storefront-models/src/models/loyalty-program/point-history/index.d.ts +1 -0
  101. package/dist/storefront-models/src/models/order/gift-card-line/index.d.ts +15 -0
  102. package/dist/storefront-models/src/models/order/index.d.ts +10 -0
  103. package/dist/storefront-models/src/models/order/line-item/index.d.ts +6 -1
  104. package/dist/storefront-models/src/models/order/package/index.d.ts +1 -1
  105. package/dist/storefront-models/src/models/order/refund/reason/index.d.ts +6 -0
  106. package/dist/storefront-models/src/models/order/refund/reason/translation/index.d.ts +4 -0
  107. package/dist/storefront-models/src/models/order/refund/refundable-line/index.d.ts +8 -0
  108. package/dist/storefront-models/src/models/order/refund/refundable-lines/index.d.ts +8 -0
  109. package/dist/storefront-models/src/models/order/refund/settings/translation/index.d.ts +4 -0
  110. package/dist/storefront-models/src/models/payment-gateway/index.d.ts +3 -1
  111. package/dist/storefront-models/src/models/product/attribute/index.d.ts +6 -1
  112. package/dist/storefront-models/src/models/product/campaign/data/index.d.ts +2 -0
  113. package/dist/storefront-models/src/models/product/campaign/filter/index.d.ts +1 -1
  114. package/dist/storefront-models/src/models/product/campaign/product-tiered-discount/index.d.ts +13 -0
  115. package/dist/storefront-models/src/models/product/image/index.d.ts +5 -0
  116. package/dist/storefront-models/src/models/product/variant/index.d.ts +17 -0
  117. package/dist/storefront-models/src/models/storefront/index.d.ts +1 -0
  118. package/dist/storefront-models/src/models/validator/deactivate-customer/index.d.ts +4 -0
  119. package/dist/stores/customer/index.d.ts +2 -1
  120. package/dist/stores/customer/index.js +1 -1
  121. package/dist/theme/settings/index.d.ts +51 -0
  122. package/dist/theme/settings/index.js +1 -0
  123. package/dist/utils/component-renderer.js +1 -1
  124. package/dist/utils/currency.d.ts +36 -3
  125. package/dist/utils/helper.d.ts +1 -0
  126. package/dist/utils/helper.js +1 -1
  127. package/dist/utils/pay-with-ikas.d.ts +552 -0
  128. package/dist/utils/pay-with-ikas.js +1 -0
  129. package/dist/utils/svg.d.ts +15 -0
  130. package/dist/utils/svg.js +1 -0
  131. package/package.json +2 -2
@@ -1 +1 @@
1
- import{__awaiter as t,__assign as e,__generator as r}from'./../../../ext/tslib/tslib.es6.mjs.js';import n from"../../../packages/storefront-api-client/src/config/index.js";import"../../../packages/storefront-api-client/src/utils/api.js";import'./../../../ext/isomorphic-fetch/fetch-npm-node.js';import{IkasStorefrontConfig as i}from"../../../packages/storefront-config/src/index.js";import{makeAutoObservable as o,observable as s}from'./../../../ext/mobx/dist/mobx.esm.js';import{Router as a}from"../../../router/index.js";import{baseStore as c}from"../../../stores/base/index.js";import{cartStore as u}from"../../../stores/cart/index.js";import{isServer as d,cloneDeep as l}from"../../../utils/helper.js";import'./../../../ext/lodash/sortBy.js';import"../../../stores/customer/index.js";import"../../../i18n/index.js";import'./../../../ext/lodash/_isFlattenable.js';import{removeCart as m,getCart as f}from"../cart/index.js";import{isCustomerSubscribed as p}from"../../models/customer/index.js";import{initAddressForm as v}from"../../models/validator/address/index.js";import{getOrderLineItemRefundQuantity as h}from"../../models/order/line-item/index.js";import"../../models/product-list/index.js";import{initAccountInfoForm as _}from"../../models/validator/account-info/index.js";import{initContactForm as w}from"../../models/validator/contact-form/index.js";import{initCouponCodeForm as g}from"../../models/validator/coupon-code-form/index.js";import{initForgotPasswordForm as b}from"../../models/validator/forgot-password/index.js";import{initLoginForm as I}from"../../models/validator/login/index.js";import{initNewsletterSubscriptionForm as S}from"../../models/validator/newsletter-subscription/index.js";import{initOrderTrackingForm as y}from"../../models/validator/order-tracking/index.js";import{initRecoverPasswordForm as k}from"../../models/validator/recover-password/index.js";import{initRegisterForm as x}from"../../models/validator/register/index.js";import{initSmsLoginForm as T}from"../../models/validator/sms-login/index.js";import{initVerifyPhoneNumberForm as j}from"../../models/validator/verify-phone-number/index.js";var E="customerToken",F="customerTokenExpiry",P="customerEmailSubscription",C="lastViewedProducts",L="customerConsent";function N(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return function(t){if(d())return;var e=localStorage.getItem(E),r=localStorage.getItem(F);e&&r?xt(t,e,parseInt(r)):Tt(t)}(e),Nt(e),function(t){if(d())return;t._customerConsentGranted=!!window.localStorage.getItem(L)}(e),[4,kt(e)];case 1:return t.sent(),[4,St(e)];case 2:return t.sent(),e._initialized=!0,[4,ct(e)];case 3:return t.sent(),e.customer?[4,import("../../../analytics/analytics-functions/customerVisit.js")]:[3,5];case 4:(0,t.sent().anl_customerVisit)(),t.label=5;case 5:return[2]}})})}function O(t){return!!t.customer&&(!(p(t.customer)||d()||t._visitorSubscribedEmail)&&!window.localStorage.getItem(P))}function R(t){return e(e({},t.customer),{consentGranted:t._customerConsentGranted})}function A(e,n){return t(this,void 0,void 0,function(){var t,e,o,s,c,u;return r(this,function(r){switch(r.label){case 0:return"undefined"==typeof window?[2]:(t=new URLSearchParams(window.location.search).get("redirect")||"",e="".concat(import.meta.env.VITE_BASE_URL,"/ms/").concat(n,"/login/authenticate?redirect=").concat(t),[4,fetch(e,{headers:{"x-api-key":i.apiKey||"","x-sfid":i.storefrontId||"","x-sfrid":i.storefrontRoutingId||""}})]);case 1:return[4,r.sent().json()];case 2:return o=r.sent(),"miles_smiles"===n?(s=function(t){try{return new URL(t).searchParams.get("redirectUrl")}catch(t){return null}},c=function(t){try{var e=s(t);return e?new URL(e).searchParams.get("transactionId"):null}catch(t){return null}},u=function(t){var e=s(o.redirectUrl)||"",r=document.createElement("form");r.method="POST",r.action=e,r.style.display="none";for(var n=0,i=[["transactionId",t.transactionId],["token",t.token],["memberId",t.memberId],["shortTokenExpireMinute",null!=t.shortTokenExpireMinute?String(t.shortTokenExpireMinute):""],["longToken",t.longToken||""],["longTokenExpireMinute",null!=t.longTokenExpireMinute?String(t.longTokenExpireMinute):""]];n<i.length;n++){var a=i[n],c=a[0],u=a[1],d=document.createElement("input");d.type="hidden",d.name=c,d.value=u,r.appendChild(d)}document.body.appendChild(r),r.submit()},window.addEventListener("message",function(t){var e;try{e="string"==typeof t.data?JSON.parse(t.data):t.data}catch(t){return}if(e&&!0===e.isSuccess){var r={transactionId:c(o.redirectUrl),token:e.token,memberId:e.ffid||e.memberId||e.memberID,shortTokenExpireMinute:e.tokenExpireMinute,longToken:e.longToken,longTokenExpireMinute:e.longTokenExpireMinute};r.memberId&&r.token?u(r):console.error("Missing token or memberId")}}),window.open(o.redirectUrl,"mslogin","width=480,height=720"),[2]):(a.navigate(o.redirectUrl),[2])}})})}function V(e){return t(this,void 0,void 0,function(){var t,n,i,o,s;return r(this,function(r){switch(r.label){case 0:return t={status:"fail"},n=new URLSearchParams(window.location.search),i=n.get("socialLoginStatus"),o=n.get("socialLoginToken"),"success"===i&&o?[4,U(e,o)]:[3,2];case 1:return r.sent()?(t.status="success",[2,t]):[2,t];case 2:return s=n.get("socialLoginError"),t.message=s||void 0,[2,t]}})})}function U(e,n){return t(this,void 0,void 0,function(){var t,i,o;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSocialLogin)({code:n})];case 2:return(null==(t=r.sent())?void 0:t.isSuccess)&&(null===(o=t.data)||void 0===o?void 0:o.customer)?(xt(e,t.data.token,t.data.tokenExpiry),yt(e,t.data.customer),[4,import("../../../analytics/analytics-functions/customerLogin.js")]):[2,!1];case 3:return i=r.sent().anl_customerLogin,e.customer&&i(),[2,!0]}})})}function D(e,n){return t(this,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:return(t=l(e.customer))&&t.addresses?-1===(i=t.addresses.findIndex(function(t){return t.id===n.id}))?[2,!1]:(t.addresses.splice(i,1),[4,$(e,t)]):[2,!1];case 1:return[2,r.sent()]}})})}function M(e,n,i){return t(this,void 0,void 0,function(){var t,e,o;return r(this,function(r){switch(r.label){case 0:r.label=1;case 1:return r.trys.push([1,4,,5]),t=[],n.orderLineItems.map(function(e){var r=h(e);r&&(null==t||t.push({orderLineItemId:e.id,quantity:r}))}),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiCreateOrderRefundRequest)({input:{email:i,orderId:n.id,orderLineItems:t}})];case 3:return(e=r.sent()).isSuccess&&e.data?(Object.entries(e.data).forEach(function(t){var e=t[0],r=t[1];n[e]=r}),[2,!0]):[3,5];case 4:return o=r.sent(),console.error(o),[3,5];case 5:return[2,!1]}})})}function B(e,n,i,o){return t(this,void 0,void 0,function(){var t,s;return r(this,function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiLogin)({email:n,password:i,phone:o,captchaToken:e._captchaToken})];case 3:return t=r.sent(),Et(e),t&&t.isSuccess&&t.data?(s=t.data,xt(e,s.token,s.tokenExpiry),s.customer&&yt(e,s.customer),e.customer?[4,import("../../../analytics/analytics-functions/customerLogin.js")]:[3,5]):[3,6];case 4:(0,r.sent().anl_customerLogin)(),r.label=5;case 5:return At(e),[2,{isSuccess:!0,errorCodes:[],otpSend:s.otpSend,flowId:s.flowId}];case 6:return[2,{isSuccess:!1,errorCodes:t.errorCodes.map(function(t){return["CUSTOMER_ACCOUNT_DISABLED","EMAIL_IS_NOT_VERIFIED","CUSTOMER_NOT_FOUND","B2B_CUSTOMER_ACCOUNT_DISABLED","PHONE_IS_NOT_VERIFIED","WRONG_PASSWORD"].includes(t)?t:"UNKOWN"})}]}})})}function G(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return jt(e),m(u),[4,import("../../../analytics/analytics-functions/customerLogout.js")];case 1:return(0,t.sent().anl_customerLogout)(),[2]}})})}function W(e,n,i,o,s,a,c,u,d){return t(this,void 0,void 0,function(){var t,l;return r(this,function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiRegister)({email:o,password:s,firstName:n,lastName:i,isAcceptMarketing:a,attributes:c,captchaToken:e._captchaToken,phone:u,flowId:d})];case 3:return t=r.sent(),Et(e),t&&t.isSuccess&&(null===(l=t.data)||void 0===l?void 0:l.customer)?(xt(e,t.data.token,t.data.tokenExpiry),yt(e,t.data.customer),At(e),[4,import("../../../analytics/analytics-functions/completeRegistration.js")]):[3,5];case 4:return(0,r.sent().anl_completeRegistration)(R(e)),[2,{isSuccess:!0,errorCodes:[]}];case 5:return[2,{isSuccess:!1,errorCodes:t.errorCodes.map(function(t){return["EMAIL_IS_NOT_VERIFIED","CUSTOMER_EMAIL_ALREADY_EXISTS","B2B_CUSTOMER_ACCOUNT_DISABLED","PHONE_IS_NOT_VERIFIED"].includes(t)?t:"UNKOWN"})}]}})})}function q(e){return t(this,void 0,void 0,function(){var t,n,i;return r(this,function(r){switch(r.label){case 0:return t=new URLSearchParams(window.location.search),(n=t.get("token"))?[4,Pt(e)]:[3,4];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiActivateCustomer)({token:n,captchaToken:e._captchaToken})];case 3:return i=r.sent(),Et(e),[2,i.isSuccess];case 4:return[2,!1]}})})}function K(e,n){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return n?[4,Pt(e)]:[3,4];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiResendCustomerActivationMail)({email:n,captchaToken:e._captchaToken})];case 3:return t=r.sent(),Et(e),[2,t.isSuccess];case 4:return[2,!1]}})})}function z(e,n,i){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return n?[4,Pt(e)]:[3,4];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiValidateCustomerPhoneVerificationCode)({verificationCode:n,otpInfo:i,captchaToken:e._captchaToken})];case 3:return t=r.sent(),Et(e),[2,!(!t.isSuccess||!t.data)&&t.data];case 4:return[2,!1]}})})}function H(n,i,o){return t(this,void 0,void 0,function(){var t,s,a,c,u;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,7,,8]),[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiValidateOTPCode)({verificationCode:i,otpInfo:o,captchaToken:n._captchaToken})];case 2:return t=r.sent(),Et(n),t&&t.isSuccess&&(null===(s=t.data)||void 0===s?void 0:s.customer)?(xt(n,t.data.token,t.data.tokenExpiry),yt(n,t.data.customer),At(n),[4,import("../../../analytics/analytics-functions/completeRegistration.js")]):[3,4];case 3:return(0,r.sent().anl_completeRegistration)(R(n)),[2,{isSuccess:!0,errorCodes:[]}];case 4:return t&&t.isSuccess&&((null===(a=t.data)||void 0===a?void 0:a.otpSend)||(null===(c=t.data)||void 0===c?void 0:c.flowId))?[2,{isSuccess:!0,otpSend:!0,flowId:null===(u=t.data)||void 0===u?void 0:u.flowId,errorCodes:[]}]:t.errorCodes.some(function(t){return"B2B_CUSTOMER_ACCOUNT_DISABLED"===t})?[4,import("../../../analytics/analytics-functions/completeRegistration.js")]:[3,6];case 5:(0,r.sent().anl_completeRegistration)(e(e({},R(n)),{notificationsAccepted:null}),!0),r.label=6;case 6:return[2,{isSuccess:!1,errorCodes:t.errorCodes.map(function(t){return["EMAIL_IS_NOT_VERIFIED","CUSTOMER_EMAIL_ALREADY_EXISTS","B2B_CUSTOMER_ACCOUNT_DISABLED","PHONE_IS_NOT_VERIFIED"].includes(t)?t:"UNKOWN"})}];case 7:return r.sent(),[2,{isSuccess:!1,errorCodes:[]}];case 8:return[2]}})})}function J(e){return t(this,void 0,void 0,function(){var t;return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,e.sent().apiResendCustomerPhoneVerificationCode)()];case 2:return[2,!(!(t=e.sent()).isSuccess||!t.data)&&t.data]}})})}function X(n,i){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../analytics/analytics-functions/contactForm.js")];case 1:return(0,r.sent().anl_contactForm)(i),[4,Pt(n)];case 2:return r.sent(),[4,import("../../api/customer/index.js")];case 3:return[4,(0,r.sent().apiSendContactFormToMerchant)(e(e({},i),{captchaToken:n._captchaToken}))];case 4:return t=r.sent(),Et(n),[2,t.isSuccess]}})})}function Y(e,n){return t(this,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiCheckEmail)({email:n,captchaToken:e._captchaToken})];case 3:return t=r.sent(),Et(e),[2,!!t.isSuccess&&!!(null===(i=t.data)||void 0===i?void 0:i.exists)]}})})}function Q(e,n){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiForgotPassword)({email:n,captchaToken:e._captchaToken})];case 3:return t=r.sent(),Et(e),[2,!!t.isSuccess&&t.data]}})})}function Z(e,n,i,o){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiRecoverPassword)({password:n,passwordAgain:i,token:o,captchaToken:e._captchaToken})];case 3:return t=r.sent(),Et(e),[2,t.isSuccess]}})})}function $(e,n){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSaveCustomer)({input:Dt(n)})];case 2:return(t=r.sent()).isSuccess&&t.data?(yt(e,t.data),[2,!0]):[2,!1]}})})}function tt(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,ht(e)];case 1:return t.sent(),e.customer?[4,import("../../api/customer/index.js")]:[2,[]];case 2:return[4,(0,t.sent().apiGetOrders)({})];case 3:return[2,t.sent().data||[]]}})})}function et(e,n){return t(this,void 0,void 0,function(){var o,s,a,c,u,d,l,m=this;return r(this,function(f){switch(f.label){case 0:return[4,ht(e)];case 1:return f.sent(),e.customer?(o=n,!i.isPreview||o&&"orders"!==o?[3,3]:[4,tt(e)]):[2,null];case 2:(s=f.sent()).length&&(o=s[0].id),f.label=3;case 3:return[4,Promise.all([t(m,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[2,(0,t.sent().apiGetOrders)({orderId:o})]}})}),It(e),nt(e,{orderId:o})])];case 4:return a=f.sent(),c=a[0],u=a[2],c.isSuccess&&(null===(l=c.data)||void 0===l?void 0:l.length)?((d=c.data[0]).transactions=u,[2,d]):[2,null]}})})}function rt(e,n,i){return t(this,void 0,void 0,function(){var t,o,s,a;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiGetOrderByEmail)({email:n,orderNumber:i})];case 2:return(t=r.sent()).isSuccess&&t.data?(o=t.data,[4,Promise.all([It(e),nt(e,{orderId:o.id})])]):[2,null];case 3:return s=r.sent(),a=s[1],o.transactions=a,[2,o]}})})}function nt(e){return t(this,arguments,void 0,function(t,e){var n;return void 0===e&&(e={}),r(this,function(t){switch(t.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return n=t.sent().apiListOrderTransactions,e.orderId||e.checkoutId||e.id?[4,n({checkoutId:{eq:e.checkoutId},id:{eq:e.checkoutId},orderId:{eq:e.orderId}})]:[2,[]];case 2:return[2,t.sent().data||[]]}})})}function it(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return e.customer?[4,import("../../api/customer/index.js")]:[2,[]];case 1:return[4,(0,t.sent().apiListFavoriteProducts)()];case 2:return[2,t.sent().data||[]]}})})}function ot(e){return t(this,void 0,void 0,function(){var t,n,o,a,c;return r(this,function(r){switch(r.label){case 0:return[4,ct(e)];case 1:return 0===(t=r.sent()).length?[2,[]]:[4,import("../../api/product/index.js")];case 2:return[4,(0,r.sent().apiSearchProducts)({input:{productIdList:t.map(function(t){return t.productId}),priceListId:i.priceListId,salesChannelId:i.salesChannelId,perPage:100}})];case 3:return n=r.sent(),null===(a=null===(o=n.data)||void 0===o?void 0:o.data)||void 0===a||a.forEach(function(t){t.selectedVariantValues=t.variants[0].variantValues}),[2,s((null===(c=null==n?void 0:n.data)||void 0===c?void 0:c.data)||[])]}})})}function st(e,n){return t(this,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:if(!(null===(i=e.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSaveFavoriteProduct)({isFavorite:!0,productId:n})];case 2:return t=r.sent(),[4,import("../../../analytics/analytics-functions/addToWishlist.js")];case 3:return(0,r.sent().anl_addToWishlist)(n),t.isSuccess?[4,ct(e,!0)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2,t.data||!1]}})})}function at(e,n){return t(this,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:if(!(null===(i=e.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSaveFavoriteProduct)({isFavorite:!1,productId:n})];case 2:return t=r.sent(),[4,import("../../../analytics/analytics-functions/addToWishlist.js")];case 3:return(0,r.sent().anl_addToWishlist)(n,!0),t.isSuccess?[4,ct(e,!0)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2,t.data||!1]}})})}function ct(e){return t(this,arguments,void 0,function(t,e){var n;return void 0===e&&(e=!1),r(this,function(r){switch(r.label){case 0:return[4,ht(t)];case 1:return r.sent(),t.customer?t._isFavoriteProductsLoaded&&!e?[3,3]:[4,it(t)]:[2,[]];case 2:n=r.sent(),t._favoriteProducts=n,t._isFavoriteProductsLoaded=!0,r.label=3;case 3:return[2,t._favoriteProducts]}})})}function ut(e,n){return t(this,void 0,void 0,function(){return r(this,function(t){return[2,e._favoriteProducts.some(function(t){return t.productId===n})]})})}function dt(e,n){return t(this,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiSubscribeToMarketingNotifications)({input:{email:n,captchaToken:e._captchaToken}})];case 3:return(t=r.sent()).isSuccess?(i=e.customer,window.localStorage.setItem(P,"true"),i?i.subscriptionStatus:e._visitorSubscribedEmail=!0,[4,import("../../../analytics/analytics-functions/createEmailSubscription.js")]):[3,5];case 4:(0,r.sent().anl_createEmailSubscription)(n),r.label=5;case 5:return[2,t]}})})}function lt(n,i){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return[4,Pt(n)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiSaveCustomerFormData)({input:e(e({},i),{captchaToken:n._captchaToken})})];case 3:return(t=r.sent()).isSuccess?(window.localStorage.setItem(P,"true"),n.customer?n.customer.subscriptionStatus:n._visitorSubscribedEmail=!0,[4,import("../../../analytics/analytics-functions/createEmailSubscription.js")]):[3,5];case 4:(0,r.sent().anl_createEmailSubscription)(i.email),r.label=5;case 5:return[2,t.isSuccess]}})})}function mt(n,o){return t(this,void 0,void 0,function(){var t,s,a,c,u;return r(this,function(r){switch(r.label){case 0:if(t=i.customerReviewSettings,s=i.salesChannelId,a=i.getCurrentLocale(),!t)return[2];if(!(c=null===(u=n.customer)||void 0===u?void 0:u.id)&&t.customerLoginRequired)throw Error("Unauthorized");return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiCreateCustomerReview)({input:e(e({},o),{customerId:t.customerLoginRequired?c:void 0,salesChannelId:s||"",locale:a})})];case 2:return[2,r.sent().data]}})})}function ft(e,n){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return e.customer?[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,t.sent().apiDeactivateCustomer)({password:n})];case 2:return[2,t.sent()];case 3:return[2]}})})}function pt(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return e.customer?[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,t.sent().apiExportCustomerPersonalData)()];case 2:return[2,t.sent()];case 3:return[2]}})})}function vt(t){!function(t){if(d())return;t._customerConsentGranted=!0,window.localStorage.setItem(L,"true")}(t)}function ht(e){return t(this,void 0,void 0,function(){return r(this,function(t){return d()?[2]:[2,new Promise(function(t){var r=setInterval(function(){e._initialized&&(clearInterval(r),t(null))},100)})]})})}function _t(t){return new Promise(function(e){var r=setInterval(function(){t._captchaToken&&(clearInterval(r),e(null))},100)})}function wt(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiListCustomerAttribute)()];case 2:return t=r.sent(),e.customer&&(null===(n=e.customer.attributes)||void 0===n||n.forEach(function(e){var r,n,i;e.customerAttribute=(null===(r=t.data)||void 0===r?void 0:r.find(function(t){return t.id===e.customerAttributeId}))||null,e.customerAttributeOptionId&&(e.customerAttributeOption=(null===(i=null===(n=e.customerAttribute)||void 0===n?void 0:n.options)||void 0===i?void 0:i.find(function(t){return t.id===e.customerAttributeOptionId}))||null)})),[2,t.data||[]]}})})}function gt(e,n){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return n.length?[4,import("../../api/checkout/index.js")]:[2,[]];case 1:return[4,(0,t.sent().apiListProductFile)({id:{in:n}})];case 2:return[2,t.sent().data||[]]}})})}function bt(e,n,i){return t(this,void 0,void 0,function(){var t,e,o,s,a;return r(this,function(r){switch(r.label){case 0:r.label=1;case 1:return r.trys.push([1,5,,6]),(t=n.orderLineItems.find(function(t){return t.variant.id===i.variantId}))?[4,import("../../api/customer/index.js")]:[3,4];case 2:return[4,(0,r.sent().apiGetDigitalProductFileDownloadUrl)(n.id,t.id)];case 3:e=r.sent(),(o=e.data)&&((s=document.createElement("a")).href=o,s.download=decodeURIComponent(i.name.split("/")[i.name.split("/").length-1])||"",s.click(),s.remove()),r.label=4;case 4:return[3,6];case 5:return a=r.sent(),console.error(a),[3,6];case 6:return[2]}})})}function It(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return e._refundSettings?[3,3]:[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiListOrderRefundSettings)({})];case 2:(t=r.sent()).isSuccess&&(null===(n=t.data)||void 0===n?void 0:n.length)&&(e._refundSettings=t.data[0]),r.label=3;case 3:return[2]}})})}function St(e){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return d()||!e._token?[2]:[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiGetCustomer)()];case 2:return(t=r.sent()).data&&yt(e,t.data),[2]}})})}function yt(t,e){t.customer=e}function kt(e){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return e._token?[4,import("../../api/customer/index.js")]:[2];case 1:return[4,(0,r.sent().apiRefreshToken)({token:e._token})];case 2:if((t=r.sent()).isSuccess&&t.data)xt(e,t.data.token,t.data.tokenExpiry);else{if(t.isCancelled||t.isNetworkError)return[2];console.log("refreshToken error",t),e._token=null,e._tokenExpiry=null,jt(e)}return[2]}})})}function xt(t,e,r){d()||(t._token=e,t._tokenExpiry=r,localStorage.setItem(E,e),localStorage.setItem(F,r+""),i.init({customerToken:e}),n.TOKEN=e)}function Tt(t){localStorage.removeItem(E),localStorage.removeItem(F),t._token=null,t._tokenExpiry=null}function jt(t){Tt(t),t.customer=null,t._favoriteProducts=[],t._isFavoriteProductsLoaded=!1,i.init({customerToken:""}),n.TOKEN="",Et(t)}function Et(t){t._captchaToken=null}function Ft(t,e){t._captchaToken=e}function Pt(e){return t(this,void 0,void 0,function(){var t;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),i.isCaptchaRequired()?(window.grecaptcha.execute(),[4,_t(e)]):[3,2];case 1:r.sent(),window.grecaptcha.reset(),r.label=2;case 2:return[3,4];case 3:return t=r.sent(),console.log("Get captcha error",t),[3,4];case 4:return[2]}})})}function Ct(t,e){t._savedLastViewedProducts=l(t._lastViewedProducts),t._savedLastViewedProductsResponse=e}function Lt(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return e.customer?[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,r.sent().apiGetLastViewedProducts)({customerId:e.customer.id})];case 2:return t=r.sent(),e._lastViewedProducts=(null===(n=l(t.data))||void 0===n?void 0:n.reverse())||[],[3,4];case 3:Nt(e),r.label=4;case 4:return[2,e._lastViewedProducts]}})})}function Nt(t){d()||(t._lastViewedProducts=Ot(),t._lastViewedProducts=l(t._lastViewedProducts).reverse())}function Ot(){if(d())return[];try{var t=window.localStorage.getItem(C);if(t)return JSON.parse(t)}catch(t){console.error(t)}return[]}function Rt(e,n,i){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return e.customer?e._lastViewedProducts.find(function(t){return t.productId===n})?[2]:[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,t.sent().apiSaveLastViewedProducts)({input:{customerId:e.customer.id,products:[{productId:n,variantId:i}]}})];case 2:return t.sent()&&e._lastViewedProducts.push({productId:n,variantId:i}),[3,4];case 3:e._lastViewedProducts=Ot(),e._lastViewedProducts=e._lastViewedProducts.filter(function(t){return t.productId!==n}),e._lastViewedProducts.push({productId:n,variantId:i}),e._lastViewedProducts=e._lastViewedProducts.slice(-20),function(t){d()||window.localStorage.setItem(C,JSON.stringify(t._lastViewedProducts))}(e),t.label=4;case 4:return[2]}})})}function At(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:if(d())return[2];r.label=1;case 1:return r.trys.push([1,5,,6]),(t=Ot()).length?[4,import("../../api/customer/index.js")]:[3,4];case 2:return[4,(0,r.sent().apiSaveLastViewedProducts)({input:{customerId:e.customer.id,products:t}})];case 3:r.sent()&&(d()||window.localStorage.removeItem(C)),r.label=4;case 4:return[3,6];case 5:return n=r.sent(),console.error(n),[3,6];case 6:return[2]}})})}function Vt(t){return t._customerConsentGranted}function Ut(t){d()||window.localStorage.removeItem(L)}function Dt(t){var e;return{addresses:null===(e=t.addresses)||void 0===e?void 0:e.map(function(t){return{addressLine1:t.addressLine1,addressLine2:t.addressLine2,city:t.city,company:t.company,country:t.country,createdAt:t.createdAt,deleted:t.deleted,district:t.district,firstName:t.firstName,id:t.id,identityNumber:t.identityNumber,isDefault:t.isDefault,lastName:t.lastName,phone:t.phone,postalCode:t.postalCode,region:t.region,state:t.state,taxNumber:t.taxNumber,taxOffice:t.taxOffice,title:t.title,updatedAt:t.updatedAt}}),attributes:t.attributes,birthDate:t.birthDate,firstName:t.firstName,gender:t.gender,lastName:t.lastName,phone:t.phone,phoneSubscriptionStatus:t.phoneSubscriptionStatus,smsSubscriptionStatus:t.smsSubscriptionStatus,subscriptionStatus:t.subscriptionStatus}}function Mt(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,import("../../api/loyalty/index.js")];case 1:return[4,(0,t.sent().apiListEarningMethods)()];case 2:return[2,t.sent().data]}})})}function Bt(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return[4,ht(e)];case 1:return r.sent(),(t=null===(n=u.cart)||void 0===n?void 0:n.id)?[4,import("../../api/loyalty/index.js")]:[2,[]];case 2:return[4,(0,r.sent().apiListSpendingMethodsByCartId)({cartId:t})];case 3:return[2,r.sent().data]}})})}function Gt(e){return t(this,void 0,void 0,function(){var t,n,i,o,s,a,c;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,6,,7]),[4,ht(e)];case 1:return r.sent(),t=null===(o=u.cart)||void 0===o?void 0:o.id,n=null===(c=null===(a=null===(s=u.cart)||void 0===s?void 0:s.loyaltyLines)||void 0===a?void 0:a[0])||void 0===c?void 0:c.loyaltySpendingMethodId,t&&n?[4,import("../../api/loyalty/index.js")]:[2];case 2:return[4,(0,r.sent().apiRemoveLoyaltyPointsFromCart)({cartId:t,loyaltySpendingMethodId:n})];case 3:return r.sent().isSuccess?[4,f()]:[3,5];case 4:r.sent(),r.label=5;case 5:return[3,7];case 6:return i=r.sent(),console.error(i),[3,7];case 7:return[2]}})})}function Wt(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return[4,ht(e)];case 1:return r.sent(),Ht(e)?(t=null===(n=u.cart)||void 0===n?void 0:n.id,[4,import("../../api/loyalty/index.js")]):[2,null];case 2:return[4,(0,r.sent().apiGetLoyaltyCustomerInfo)({cartId:t})];case 3:return[2,r.sent().data||null]}})})}function qt(e){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,import("../../api/loyalty/index.js")];case 1:return[4,(0,t.sent().apiListLoyaltyProgramTiers)()];case 2:return[2,t.sent().data]}})})}function Kt(e,n){return t(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,import("../../api/loyalty/index.js")];case 1:return[4,(0,t.sent().apiListLoyaltyProgramPointHistory)(n)];case 2:return[2,t.sent().data]}})})}function zt(n,i){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return(t=null===(n=u.cart)||void 0===n?void 0:n.id)?[4,import("../../api/loyalty/index.js")]:[2,null];case 1:return[4,(0,r.sent().apiUseLoyaltyPoints)({input:e(e({},i.input),{cartId:t})})];case 2:return[2,r.sent().data||null]}})})}function Ht(t){return!!t.customer}function Jt(t){return t._accountInfoForm||(t._accountInfoForm={},_(t._accountInfoForm)),t._accountInfoForm}function Xt(t){t._accountInfoForm=null}function Yt(t){return t._contactForm||(t._contactForm={},w(t._contactForm)),t._contactForm}function Qt(t){t._contactForm=null}function Zt(t){return t._couponCodeForm||(t._couponCodeForm={},g(t._couponCodeForm)),t._couponCodeForm}function $t(t){t._couponCodeForm=null}function te(t){return t._forgotPasswordForm||(t._forgotPasswordForm={},b(t._forgotPasswordForm)),t._forgotPasswordForm}function ee(t){t._forgotPasswordForm=null}function re(t){return t._loginForm||(t._loginForm={},I(t._loginForm)),t._loginForm}function ne(t){return t._smsLoginForm||(t._smsLoginForm={},T(t._smsLoginForm)),t._smsLoginForm}function ie(t){return t._verifyPhoneNumberForm||(t._verifyPhoneNumberForm={},j(t._verifyPhoneNumberForm)),t._verifyPhoneNumberForm}function oe(t){t._loginForm=null}function se(t){return t._newsletterSubscriptionForm||(t._newsletterSubscriptionForm={},S(t._newsletterSubscriptionForm)),t._newsletterSubscriptionForm}function ae(t){t._newsletterSubscriptionForm=null}function ce(t){return t._orderTrackingForm||(t._orderTrackingForm={},y(t._orderTrackingForm)),t._orderTrackingForm}function ue(t){t._orderTrackingForm=null}function de(t){return t._recoverPasswordForm||(t._recoverPasswordForm={},k(t._recoverPasswordForm)),t._recoverPasswordForm}function le(t){t._recoverPasswordForm=null}function me(t){return t._registerForm||(t._registerForm={},x(t._registerForm)),t._registerForm}function fe(t){t._registerForm=null}function pe(t){var e={};return v(e),o(e)}function ve(e){return t(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return"ORDER_DETAIL"!==c.currentPageType||"undefined"==typeof window?[3,4]:(t=a.getCurrentPath().split("/").pop(),!i.isPreview||t&&"orders"!==t?[3,2]:[4,tt(e)]);case 1:(n=r.sent()).length&&(t=n[0].id),r.label=2;case 2:return t?[4,et(e,t)]:[3,4];case 3:return[2,r.sent()];case 4:return[2]}})})}function he(t){try{window.openIkasStorefrontWidget()}catch(t){console.error("Failed to open ikas storefront widget",t)}}function _e(t){try{window.closeIkasStorefrontWidget()}catch(t){console.error("Failed to close ikas storefront widget",t)}}export{q as activateCustomer,st as addProductToFavorites,O as canCustomerCreateEmailSubscription,Y as checkEmail,Xt as clearAccountInfoForm,Qt as clearContactForm,$t as clearCouponCodeForm,ee as clearForgotPasswordForm,oe as clearLoginForm,ae as clearNewsletterSubscriptionForm,ue as clearOrderTrackingForm,le as clearRecoverPasswordForm,fe as clearRegisterForm,_e as closeIkasStorefrontWidget,dt as createEmailSubscription,Wt as cs_getLoyaltyCustomerInfo,Mt as cs_listEarningMethods,Kt as cs_listLoyaltyProgramPointHistory,qt as cs_listLoyaltyProgramTiers,Bt as cs_listSpendingMethodsByCartId,Gt as cs_removeLoyaltyPointsFromCart,zt as cs_useLoyaltyPoints,B as customerLogin,Rt as customerStore_onProductView,R as customerToAnalyticsCustomer,ft as deactivateCustomer,D as deleteCustomerAddress,pt as exportCustomerPersonalData,Q as forgotPassword,Jt as getAccountInfoForm,Yt as getContactForm,Zt as getCouponCodeForm,wt as getCustomerAttributes,Vt as getCustomerConsentGranted,bt as getDigitalProductFileDownloadUrl,pe as getEmptyAddressForm,ot as getFavoriteProducts,it as getFavoriteProductsIds,te as getForgotPasswordForm,Lt as getLastViewedProducts,re as getLoginForm,se as getNewsletterSubscriptionForm,et as getOrder,rt as getOrderByEmail,ve as getOrderDetailsOfPage,gt as getOrderProductFiles,It as getOrderRefundSettings,ce as getOrderTrackingForm,nt as getOrderTransactions,tt as getOrders,de as getRecoverPasswordForm,me as getRegisterForm,ne as getSmsLoginForm,ie as getVerifyPhoneNumberForm,vt as handleCustomerConsentGrant,V as handleSocialLogin,Ht as hasCustomer,N as initCustomerStore,ut as isFavoriteProduct,G as logout,he as openIkasStorefrontWidget,Z as recoverPassword,M as refundOrder,W as register,Ut as removeCustomerConsent,at as removeProductFromFavorites,K as resendCustomerActivationMail,J as resendCustomerPhoneVerificationCode,X as saveContactForm,$ as saveCustomer,lt as saveCustomerFormData,mt as sendReview,Ft as setCaptchaToken,Ct as setSavedLastViewedProductsResponse,A as socialLogin,U as socialLoginToken,z as validateCustomerPhoneVerificationCode,H as validateOTPCode,_t as waitForCaptchaTokenInit,ht as waitForCustomerStoreInit};
1
+ import{__awaiter as e,__assign as t,__generator as r}from'./../../../ext/tslib/tslib.es6.mjs.js';import n from"../../../packages/storefront-api-client/src/config/index.js";import"../../../packages/storefront-api-client/src/utils/api.js";import'./../../../ext/isomorphic-fetch/fetch-npm-node.js';import{IkasStorefrontConfig as i}from"../../../packages/storefront-config/src/index.js";import{makeAutoObservable as s,observable as o}from'./../../../ext/mobx/dist/mobx.esm.js';import{Router as a}from"../../../router/index.js";import{baseStore as c}from"../../../stores/base/index.js";import{cartStore as u}from"../../../stores/cart/index.js";import{isServer as d,cloneDeep as l}from"../../../utils/helper.js";import'./../../../ext/lodash/sortBy.js';import"../../../stores/customer/index.js";import"../../../i18n/index.js";import'./../../../ext/lodash/_isFlattenable.js';import{removeCart as m,getCart as f}from"../cart/index.js";import{isCustomerSubscribed as p}from"../../models/customer/index.js";import{initAddressForm as v}from"../../models/validator/address/index.js";import{getIkasOrderRefundReasonId as h,getIkasOrderRefundReason as _,applyIkasOrderRefundableLines as w}from"../../models/order/index.js";import{getOrderLineItemRefundQuantity as S}from"../../models/order/line-item/index.js";import"../../models/product-list/index.js";import{initAccountInfoForm as I}from"../../models/validator/account-info/index.js";import{initContactForm as b}from"../../models/validator/contact-form/index.js";import{initCouponCodeForm as g}from"../../models/validator/coupon-code-form/index.js";import{initDeactivateCustomerForm as E}from"../../models/validator/deactivate-customer/index.js";import{initForgotPasswordForm as y}from"../../models/validator/forgot-password/index.js";import{initLoginForm as k}from"../../models/validator/login/index.js";import{initNewsletterSubscriptionForm as x}from"../../models/validator/newsletter-subscription/index.js";import{initOrderTrackingForm as C}from"../../models/validator/order-tracking/index.js";import{initRecoverPasswordForm as L}from"../../models/validator/recover-password/index.js";import{initRegisterForm as T}from"../../models/validator/register/index.js";import{initSmsLoginForm as j}from"../../models/validator/sms-login/index.js";import{initVerifyPhoneNumberForm as P}from"../../models/validator/verify-phone-number/index.js";var F="customerToken",R="customerTokenExpiry",N="customerEmailSubscription",O="lastViewedProducts",A="customerConsent";function D(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return Xe(t),tt(t),st(t),[4,ze(t)];case 1:return e.sent(),[4,We(t)];case 2:return e.sent(),t._initialized=!0,[4,Le(t)];case 3:return e.sent(),t.customer?[4,import("../../../analytics/analytics-functions/customerVisit.js")]:[3,5];case 4:(0,e.sent().anl_customerVisit)(),e.label=5;case 5:return[2]}})})}function U(t,n){return e(this,arguments,void 0,function(e,t,n){var i,s;return void 0===n&&(n=[]),r(this,function(r){switch(r.label){case 0:if(Xe(e),tt(e),st(e),!(null==t?void 0:t.customer)||!e._token)return[3,4];if(qe(e,t.customer),e._favoriteProducts=t.favoriteProducts||[],e._isFavoriteProductsLoaded=!0,!(i=n.filter(function(e){return!(e in t.customer)})).length)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,We(e)];case 2:return r.sent(),[3,4];case 3:return s=r.sent(),console.error("[seedCustomerSession] snapshot lacks [".concat(i.join(", "),"] and the fallback fetch failed — ")+"keeping the partial customer:",s),[3,4];case 4:return e._initialized=!0,[2]}})})}function M(e){Qe(e)}function V(e){return!!e.customer&&(!(p(e.customer)||d()||e._visitorSubscribedEmail)&&!window.localStorage.getItem(N))}function G(e){return t(t({},e.customer),{consentGranted:e._customerConsentGranted})}function B(t,n){return e(this,void 0,void 0,function(){var e,t,s;return r(this,function(r){switch(r.label){case 0:return"undefined"==typeof window?[2]:(e=new URLSearchParams(window.location.search).get("redirect")||"",t="".concat(import.meta.env.VITE_BASE_URL,"/ms/").concat(n,"/login/authenticate?redirect=").concat(e),[4,fetch(t,{headers:{"x-api-key":i.apiKey||"","x-sfid":i.storefrontId||"","x-sfrid":i.storefrontRoutingId||""}})]);case 1:return[4,r.sent().json()];case 2:return s=r.sent(),a.navigate(s.redirectUrl),[2]}})})}function W(t){return e(this,void 0,void 0,function(){var e,n,i,s,o;return r(this,function(r){switch(r.label){case 0:return e={status:"fail"},n=new URLSearchParams(window.location.search),i=n.get("socialLoginStatus"),s=n.get("socialLoginToken"),"success"===i&&s?[4,q(t,s)]:[3,2];case 1:return r.sent()?(e.status="success",[2,e]):[2,e];case 2:return o=n.get("socialLoginError"),e.message=o||void 0,[2,e]}})})}function q(t,n){return e(this,void 0,void 0,function(){var e,i,s;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSocialLogin)({code:n})];case 2:return(null==(e=r.sent())?void 0:e.isSuccess)&&(null===(s=e.data)||void 0===s?void 0:s.customer)?(Ke(t,e.data.token,e.data.tokenExpiry),qe(t,e.data.customer),[4,import("../../../analytics/analytics-functions/customerLogin.js")]):[2,!1];case 3:return i=r.sent().anl_customerLogin,t.customer&&i(),[2,!0]}})})}var z="miles_smiles",K="MILES_SMILES",X="c8e4b1a0-5d3f-4a9e-8b2c-1f6d9e0a7c31",H="milesSmilesStatus",Q="milesSmilesError";function J(e){try{return new URL(e).searchParams.get(Q)}catch(e){return null}}function Y(e){var t=function(e){try{return new URL(e).searchParams.get("redirectUrl")}catch(e){return null}}(e);if(!t)return window.location.href=e,Promise.resolve({isSuccess:!0});var r=function(e){try{return new URL(e).searchParams.get("transactionId")}catch(e){return null}}(t);return new Promise(function(n){var i,s=!1,o=function(e){s||(s=!0,window.removeEventListener("message",a),i&&window.clearInterval(i),n(e))},a=function(e){var n;try{n="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){return}if(n&&!0===n.isSuccess){var i={transactionId:r,token:n.token,memberId:n.ffid||n.memberId||n.memberID,shortTokenExpireMinute:n.tokenExpireMinute,longToken:n.longToken,longTokenExpireMinute:n.longTokenExpireMinute};if(!i.memberId||!i.token)return console.error("Miles&Smiles: missing token or memberId in popup message"),void o({isSuccess:!1,errorCode:"MILES_SMILES_LOGIN_CANCELLED_OR_FAILED"});!function(e,t){var r=document.createElement("form");r.method="POST",r.action=e,r.style.display="none";for(var n=0,i=[["transactionId",t.transactionId||""],["token",t.token||""],["memberId",t.memberId||""],["shortTokenExpireMinute",null!=t.shortTokenExpireMinute?String(t.shortTokenExpireMinute):""],["longToken",t.longToken||""],["longTokenExpireMinute",null!=t.longTokenExpireMinute?String(t.longTokenExpireMinute):""]];n<i.length;n++){var s=i[n],o=s[0],a=s[1],c=document.createElement("input");c.type="hidden",c.name=o,c.value=a,r.appendChild(c)}document.body.appendChild(r),r.submit()}(t,i);try{null==c||c.close()}catch(e){}o({isSuccess:!0})}};window.addEventListener("message",a);var c=window.open(e,"mslogin","width=480,height=720");if(!c)return window.removeEventListener("message",a),window.location.href=e,void n({isSuccess:!0});i=window.setInterval(function(){c.closed&&o({isSuccess:!1,errorCode:"MILES_SMILES_LOGIN_CANCELLED_OR_FAILED"})},500)})}function Z(t,n){return e(this,void 0,void 0,function(){var e,s,o,a,c;return r(this,function(r){switch(r.label){case 0:if(d())return[2,{isSuccess:!1,errorCode:"UNEXPECTED_ERROR"}];if(!t.customer||!t._token)return[2,{isSuccess:!1,errorCode:"AUTHORIZATION_REQUIRED"}];e=function(e){return!!e&&e.startsWith("/")&&!e.startsWith("//")&&!e.includes("://")&&!e.includes("@")}(n)?n:"",s="".concat(import.meta.env.VITE_BASE_URL,"/ms/").concat(z,"/bind/authenticate?redirect=").concat(encodeURIComponent(e)),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(s,{headers:{authorization:"Bearer ".concat(t._token),"x-api-key":i.apiKey||"","x-sfid":i.storefrontId||"","x-sfrid":i.storefrontRoutingId||""}})];case 2:return(a=r.sent()).redirected&&a.url?(window.location.href=a.url,[2,{isSuccess:!1,errorCode:J(a.url)}]):a.ok?[4,a.json()]:[2,{isSuccess:!1,errorCode:"UNEXPECTED_ERROR"}];case 3:return c=r.sent(),o=null==c?void 0:c.redirectUrl,[3,5];case 4:return r.sent(),[2,{isSuccess:!1,errorCode:"UNEXPECTED_ERROR"}];case 5:return o?[2,Y(o)]:[2,{isSuccess:!1,errorCode:"UNEXPECTED_ERROR"}]}})})}function $(e){if(void 0===e&&(e=!0),d())return null;var t=new URL(window.location.href),r=t.searchParams.get(H);if("success"!==r&&"fail"!==r)return null;var n=t.searchParams.get(Q);return e&&(t.searchParams.delete(H),t.searchParams.delete(Q),window.history.replaceState(window.history.state,"",t.pathname+t.search+t.hash)),{status:r,errorCode:n}}function ee(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[2,(0,e.sent().apiGetExternalAccountLink)({provider:z})]}})})}function te(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[2,(0,e.sent().apiUnlinkExternalAccount)({provider:z})]}})})}function re(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[2,(0,e.sent().apiGetMilesSmilesDetails)()]}})})}function ne(e){return e.paymentGatewayCode===K||e.paymentGatewayId===X}function ie(t,n){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return(e=l(t.customer))&&e.addresses?-1===(i=e.addresses.findIndex(function(e){return e.id===n.id}))?[2,!1]:(e.addresses.splice(i,1),[4,Se(t,e)]):[2,!1];case 1:return[2,r.sent()]}})})}function se(t,n,i){return e(this,void 0,void 0,function(){var e,t,s,o,a,c,u;return r(this,function(r){switch(r.label){case 0:r.label=1;case 1:return r.trys.push([1,4,,5]),e=[],n.orderLineItems.forEach(function(t){var r=S(t);r&&e.push({orderLineItemId:t.id,quantity:r})}),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiCreateOrderRefundRequest)({input:{email:i,orderId:n.id,orderLineItems:e,refundReasonId:h(n),reason:_(n)}})];case 3:return(t=r.sent()).isSuccess&&t.data?(Object.entries(t.data).forEach(function(e){var t=e[0],r=e[1];n[t]=r}),[2,{isSuccess:!0}]):"REFUND_NOT_ALLOWED"===(s=t.errorCodes[0])?[2,{isSuccess:!1,errorCode:"REFUND_NOT_ALLOWED",lines:(null===(u=null===(c=null===(a=t.graphQLErrors)||void 0===a?void 0:a[0])||void 0===c?void 0:c.extensions)||void 0===u?void 0:u.lines)||[]}]:"REFUND_REASON_REQUIRED"===s?[2,{isSuccess:!1,errorCode:"REFUND_REASON_REQUIRED"}]:[3,5];case 4:return o=r.sent(),console.error(o),[3,5];case 5:return[2,{isSuccess:!1,errorCode:"UNKNOWN"}]}})})}function oe(t,n,i){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,se(0,n,i)];case 1:return[2,e.sent().isSuccess]}})})}function ae(t,n,i,s){return e(this,void 0,void 0,function(){var e,o;return r(this,function(r){switch(r.label){case 0:return[4,Ze(t)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiLogin)({email:n,password:i,phone:s,captchaToken:t._captchaToken})];case 3:return e=r.sent(),Je(t),e&&e.isSuccess&&e.data?(o=e.data,Ke(t,o.token,o.tokenExpiry),o.customer&&qe(t,o.customer),t.customer?[4,import("../../../analytics/analytics-functions/customerLogin.js")]:[3,5]):[3,6];case 4:(0,r.sent().anl_customerLogin)(),r.label=5;case 5:return it(t),[2,{isSuccess:!0,errorCodes:[],otpSend:o.otpSend,flowId:o.flowId}];case 6:return[2,{isSuccess:!1,errorCodes:e.errorCodes.map(function(e){return["CUSTOMER_ACCOUNT_DISABLED","EMAIL_IS_NOT_VERIFIED","CUSTOMER_NOT_FOUND","B2B_CUSTOMER_ACCOUNT_DISABLED","PHONE_IS_NOT_VERIFIED","WRONG_PASSWORD"].includes(e)?e:"UNKOWN"})}]}})})}function ce(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return Qe(t),m(u),[4,import("../../../analytics/analytics-functions/customerLogout.js")];case 1:return(0,e.sent().anl_customerLogout)(),[2]}})})}function ue(t,n,i,s,o,a,c,u,d){return e(this,void 0,void 0,function(){var e,l;return r(this,function(r){switch(r.label){case 0:return[4,Ze(t)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiRegister)({email:s,password:o,firstName:n,lastName:i,isAcceptMarketing:a,attributes:c,captchaToken:t._captchaToken,phone:u,flowId:d})];case 3:return e=r.sent(),Je(t),e&&e.isSuccess&&(null===(l=e.data)||void 0===l?void 0:l.customer)?(Ke(t,e.data.token,e.data.tokenExpiry),qe(t,e.data.customer),it(t),[4,import("../../../analytics/analytics-functions/completeRegistration.js")]):[3,5];case 4:return(0,r.sent().anl_completeRegistration)(G(t)),[2,{isSuccess:!0,errorCodes:[]}];case 5:return[2,{isSuccess:!1,errorCodes:e.errorCodes.map(function(e){return["EMAIL_IS_NOT_VERIFIED","CUSTOMER_EMAIL_ALREADY_EXISTS","B2B_CUSTOMER_ACCOUNT_DISABLED","PHONE_IS_NOT_VERIFIED"].includes(e)?e:"UNKOWN"})}]}})})}function de(t){return e(this,void 0,void 0,function(){var e,n,i;return r(this,function(r){switch(r.label){case 0:return e=new URLSearchParams(window.location.search),(n=e.get("token"))?[4,Ze(t)]:[3,4];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiActivateCustomer)({token:n,captchaToken:t._captchaToken})];case 3:return i=r.sent(),Je(t),[2,i.isSuccess];case 4:return[2,!1]}})})}function le(t,n){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return n?[4,Ze(t)]:[3,4];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiResendCustomerActivationMail)({email:n,captchaToken:t._captchaToken})];case 3:return e=r.sent(),Je(t),[2,e.isSuccess];case 4:return[2,!1]}})})}function me(t,n,i){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return n?[4,Ze(t)]:[3,4];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiValidateCustomerPhoneVerificationCode)({verificationCode:n,otpInfo:i,captchaToken:t._captchaToken})];case 3:return e=r.sent(),Je(t),[2,!(!e.isSuccess||!e.data)&&e.data];case 4:return[2,!1]}})})}function fe(n,i,s){return e(this,void 0,void 0,function(){var e,o,a,c,u;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,7,,8]),[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiValidateOTPCode)({verificationCode:i,otpInfo:s,captchaToken:n._captchaToken})];case 2:return e=r.sent(),Je(n),e&&e.isSuccess&&(null===(o=e.data)||void 0===o?void 0:o.customer)?(Ke(n,e.data.token,e.data.tokenExpiry),qe(n,e.data.customer),it(n),[4,import("../../../analytics/analytics-functions/completeRegistration.js")]):[3,4];case 3:return(0,r.sent().anl_completeRegistration)(G(n)),[2,{isSuccess:!0,errorCodes:[]}];case 4:return e&&e.isSuccess&&((null===(a=e.data)||void 0===a?void 0:a.otpSend)||(null===(c=e.data)||void 0===c?void 0:c.flowId))?[2,{isSuccess:!0,otpSend:!0,flowId:null===(u=e.data)||void 0===u?void 0:u.flowId,errorCodes:[]}]:e.errorCodes.some(function(e){return"B2B_CUSTOMER_ACCOUNT_DISABLED"===e})?[4,import("../../../analytics/analytics-functions/completeRegistration.js")]:[3,6];case 5:(0,r.sent().anl_completeRegistration)(t(t({},G(n)),{notificationsAccepted:null}),!0),r.label=6;case 6:return[2,{isSuccess:!1,errorCodes:e.errorCodes.map(function(e){return["EMAIL_IS_NOT_VERIFIED","CUSTOMER_EMAIL_ALREADY_EXISTS","B2B_CUSTOMER_ACCOUNT_DISABLED","PHONE_IS_NOT_VERIFIED"].includes(e)?e:"UNKOWN"})}];case 7:return r.sent(),[2,{isSuccess:!1,errorCodes:[]}];case 8:return[2]}})})}function pe(t){return e(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,t.sent().apiResendCustomerPhoneVerificationCode)()];case 2:return[2,!(!(e=t.sent()).isSuccess||!e.data)&&e.data]}})})}function ve(n,i){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../analytics/analytics-functions/contactForm.js")];case 1:return(0,r.sent().anl_contactForm)(i),[4,Ze(n)];case 2:return r.sent(),[4,import("../../api/customer/index.js")];case 3:return[4,(0,r.sent().apiSendContactFormToMerchant)(t(t({},i),{captchaToken:n._captchaToken}))];case 4:return e=r.sent(),Je(n),[2,e.isSuccess]}})})}function he(t,n){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,Ze(t)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiCheckEmail)({email:n,captchaToken:t._captchaToken})];case 3:return e=r.sent(),Je(t),[2,!!e.isSuccess&&!!(null===(i=e.data)||void 0===i?void 0:i.exists)]}})})}function _e(t,n){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,Ze(t)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiForgotPassword)({email:n,captchaToken:t._captchaToken})];case 3:return e=r.sent(),Je(t),[2,!!e.isSuccess&&e.data]}})})}function we(t,n,i,s){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,Ze(t)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiRecoverPassword)({password:n,passwordAgain:i,token:s,captchaToken:t._captchaToken})];case 3:return e=r.sent(),Je(t),[2,e.isSuccess]}})})}function Se(t,n){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSaveCustomer)({input:ct(n)})];case 2:return(e=r.sent()).isSuccess&&e.data?(qe(t,e.data),[2,!0]):[2,!1]}})})}function Ie(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,Ae(t)];case 1:return e.sent(),t.customer?[4,import("../../api/customer/index.js")]:[2,[]];case 2:return[4,(0,e.sent().apiGetOrders)({})];case 3:return[2,e.sent().data||[]]}})})}function be(t,n){return e(this,void 0,void 0,function(){var s,o,a,c,u,d,l,m,f=this;return r(this,function(p){switch(p.label){case 0:return[4,Ae(t)];case 1:return p.sent(),t.customer?(s=n,!i.isPreview||s&&"orders"!==s?[3,3]:[4,Ie(t)]):[2,null];case 2:(o=p.sent()).length&&(s=o[0].id),p.label=3;case 3:return[4,Promise.all([e(f,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[2,(0,e.sent().apiGetOrders)({orderId:s})]}})}),Ge(t),Ee(t,{orderId:s}),Be(s)])];case 4:return a=p.sent(),c=a[0],u=a[2],d=a[3],c.isSuccess&&(null===(m=c.data)||void 0===m?void 0:m.length)?((l=c.data[0]).transactions=u,w(l,d),[2,l]):[2,null]}})})}function ge(t,n,i){return e(this,void 0,void 0,function(){var e,s,o,a,c;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiGetOrderByEmail)({email:n,orderNumber:i})];case 2:return(e=r.sent()).isSuccess&&e.data?(s=e.data,[4,Promise.all([Ge(t),Ee(t,{orderId:s.id}),Be(s.id,n)])]):[2,null];case 3:return o=r.sent(),a=o[1],c=o[2],s.transactions=a,w(s,c),[2,s]}})})}function Ee(t){return e(this,arguments,void 0,function(e,t){var n;return void 0===t&&(t={}),r(this,function(e){switch(e.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return n=e.sent().apiListOrderTransactions,t.orderId||t.checkoutId||t.id?[4,n({checkoutId:{eq:t.checkoutId},id:{eq:t.checkoutId},orderId:{eq:t.orderId}})]:[2,[]];case 2:return[2,e.sent().data||[]]}})})}function ye(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return t.customer?[4,import("../../api/customer/index.js")]:[2,[]];case 1:return[4,(0,e.sent().apiListFavoriteProducts)()];case 2:return[2,e.sent().data||[]]}})})}function ke(t){return e(this,void 0,void 0,function(){var e,n,s,a,c;return r(this,function(r){switch(r.label){case 0:return[4,Le(t)];case 1:return 0===(e=r.sent()).length?[2,[]]:[4,import("../../api/product/index.js")];case 2:return[4,(0,r.sent().apiSearchProducts)({input:{productIdList:e.map(function(e){return e.productId}),priceListId:i.priceListId,salesChannelId:i.salesChannelId,perPage:100}})];case 3:return n=r.sent(),null===(a=null===(s=n.data)||void 0===s?void 0:s.data)||void 0===a||a.forEach(function(e){e.selectedVariantValues=e.variants[0].variantValues}),[2,o((null===(c=null==n?void 0:n.data)||void 0===c?void 0:c.data)||[])]}})})}function xe(t,n){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:if(!(null===(i=t.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSaveFavoriteProduct)({isFavorite:!0,productId:n})];case 2:return e=r.sent(),[4,import("../../../analytics/analytics-functions/addToWishlist.js")];case 3:return(0,r.sent().anl_addToWishlist)(n),e.isSuccess?[4,Le(t,!0)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2,e.data||!1]}})})}function Ce(t,n){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:if(!(null===(i=t.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiSaveFavoriteProduct)({isFavorite:!1,productId:n})];case 2:return e=r.sent(),[4,import("../../../analytics/analytics-functions/addToWishlist.js")];case 3:return(0,r.sent().anl_addToWishlist)(n,!0),e.isSuccess?[4,Le(t,!0)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2,e.data||!1]}})})}function Le(t){return e(this,arguments,void 0,function(e,t){var n;return void 0===t&&(t=!1),r(this,function(r){switch(r.label){case 0:return[4,Ae(e)];case 1:return r.sent(),e.customer?e._isFavoriteProductsLoaded&&!t?[3,3]:[4,ye(e)]:[2,[]];case 2:n=r.sent(),e._favoriteProducts=n,e._isFavoriteProductsLoaded=!0,r.label=3;case 3:return[2,e._favoriteProducts]}})})}function Te(t,n){return e(this,void 0,void 0,function(){return r(this,function(e){return[2,t._favoriteProducts.some(function(e){return e.productId===n})]})})}function je(t,n){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,Ze(t)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiSubscribeToMarketingNotifications)({input:{email:n,captchaToken:t._captchaToken}})];case 3:return(e=r.sent()).isSuccess?(i=t.customer,window.localStorage.setItem(N,"true"),i?i.subscriptionStatus:t._visitorSubscribedEmail=!0,[4,import("../../../analytics/analytics-functions/createEmailSubscription.js")]):[3,5];case 4:(0,r.sent().anl_createEmailSubscription)(n),r.label=5;case 5:return[2,e]}})})}function Pe(n,i){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,Ze(n)];case 1:return r.sent(),[4,import("../../api/customer/index.js")];case 2:return[4,(0,r.sent().apiSaveCustomerFormData)({input:t(t({},i),{captchaToken:n._captchaToken})})];case 3:return(e=r.sent()).isSuccess?(window.localStorage.setItem(N,"true"),n.customer?n.customer.subscriptionStatus:n._visitorSubscribedEmail=!0,[4,import("../../../analytics/analytics-functions/createEmailSubscription.js")]):[3,5];case 4:(0,r.sent().anl_createEmailSubscription)(i.email),r.label=5;case 5:return[2,e.isSuccess]}})})}function Fe(n,s){return e(this,void 0,void 0,function(){var e,o,a,c,u;return r(this,function(r){switch(r.label){case 0:if(e=i.customerReviewSettings,o=i.salesChannelId,a=i.getCurrentLocale(),!e)return[2];if(!(c=null===(u=n.customer)||void 0===u?void 0:u.id)&&e.customerLoginRequired)throw Error("Unauthorized");return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiCreateCustomerReview)({input:t(t({},s),{customerId:e.customerLoginRequired?c:void 0,salesChannelId:o||"",locale:a})})];case 2:return[2,r.sent().data]}})})}function Re(t,n){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return t.customer?[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,e.sent().apiDeactivateCustomer)({password:n})];case 2:return[2,e.sent()];case 3:return[2]}})})}function Ne(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return t.customer?[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,e.sent().apiExportCustomerPersonalData)()];case 2:return[2,e.sent()];case 3:return[2]}})})}function Oe(e){!function(e){if(d())return;e._customerConsentGranted=!0,window.localStorage.setItem(A,"true")}(e)}function Ae(t){return e(this,void 0,void 0,function(){return r(this,function(e){return d()||t._initialized?[2]:[2,new Promise(function(e){var r=setInterval(function(){t._initialized&&(clearInterval(r),e(null))},100)})]})})}function De(e){return new Promise(function(t){var r=setInterval(function(){e._captchaToken&&(clearInterval(r),t(null))},100)})}function Ue(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiListCustomerAttribute)()];case 2:return e=r.sent(),t.customer&&(null===(n=t.customer.attributes)||void 0===n||n.forEach(function(t){var r,n,i;t.customerAttribute=(null===(r=e.data)||void 0===r?void 0:r.find(function(e){return e.id===t.customerAttributeId}))||null,t.customerAttributeOptionId&&(t.customerAttributeOption=(null===(i=null===(n=t.customerAttribute)||void 0===n?void 0:n.options)||void 0===i?void 0:i.find(function(e){return e.id===t.customerAttributeOptionId}))||null)})),[2,e.data||[]]}})})}function Me(t,n){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return n.length?[4,import("../../api/checkout/index.js")]:[2,[]];case 1:return[4,(0,e.sent().apiListProductFile)({id:{in:n}})];case 2:return[2,e.sent().data||[]]}})})}function Ve(t,n,i){return e(this,void 0,void 0,function(){var e,t,s,o,a;return r(this,function(r){switch(r.label){case 0:r.label=1;case 1:return r.trys.push([1,5,,6]),(e=n.orderLineItems.find(function(e){return e.variant.id===i.variantId}))?[4,import("../../api/customer/index.js")]:[3,4];case 2:return[4,(0,r.sent().apiGetDigitalProductFileDownloadUrl)(n.id,e.id)];case 3:t=r.sent(),(s=t.data)&&((o=document.createElement("a")).href=s,o.download=decodeURIComponent(i.name.split("/")[i.name.split("/").length-1])||"",o.click(),o.remove()),r.label=4;case 4:return[3,6];case 5:return a=r.sent(),console.error(a),[3,6];case 6:return[2]}})})}function Ge(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return t._refundSettings?[3,3]:[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiListOrderRefundSettings)({})];case 2:(e=r.sent()).isSuccess&&(null===(n=e.data)||void 0===n?void 0:n.length)&&(t._refundSettings=e.data[0]),r.label=3;case 3:return[2]}})})}function Be(t,n){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiGetRefundableLines)({input:{orderId:t,email:n||null}})];case 2:return(e=r.sent()).isSuccess&&e.data?[2,e.data]:[3,4];case 3:return i=r.sent(),console.error(i),[3,4];case 4:return[2,{orderLineItems:[],refundReasons:[],translations:[]}]}})})}function We(t){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return d()||!t._token?[2]:[4,import("../../api/customer/index.js")];case 1:return[4,(0,r.sent().apiGetCustomer)()];case 2:return(e=r.sent()).data&&qe(t,e.data),[2]}})})}function qe(e,t){e.customer=t}function ze(t){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return t._token?[4,import("../../api/customer/index.js")]:[2];case 1:return[4,(0,r.sent().apiRefreshToken)({token:t._token})];case 2:if((e=r.sent()).isSuccess&&e.data)Ke(t,e.data.token,e.data.tokenExpiry);else{if(e.isCancelled||e.isNetworkError)return[2];console.log("refreshToken error",e),t._token=null,t._tokenExpiry=null,Qe(t)}return[2]}})})}function Ke(e,t,r){d()||(e._token=t,e._tokenExpiry=r,localStorage.setItem(F,t),localStorage.setItem(R,r+""),i.init({customerToken:t}),n.TOKEN=t)}function Xe(e){if(!d()){var t=localStorage.getItem(F),r=localStorage.getItem(R);t&&r?Ke(e,t,parseInt(r)):He(e)}}function He(e){localStorage.removeItem(F),localStorage.removeItem(R),e._token=null,e._tokenExpiry=null}function Qe(e){He(e),e.customer=null,e._favoriteProducts=[],e._isFavoriteProductsLoaded=!1,i.init({customerToken:""}),n.TOKEN="",Je(e)}function Je(e){e._captchaToken=null}function Ye(e,t){e._captchaToken=t}function Ze(t){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),i.isCaptchaRequired()?(window.grecaptcha.execute(),[4,De(t)]):[3,2];case 1:r.sent(),window.grecaptcha.reset(),r.label=2;case 2:return[3,4];case 3:return e=r.sent(),console.log("Get captcha error",e),[3,4];case 4:return[2]}})})}function $e(e,t){e._savedLastViewedProducts=l(e._lastViewedProducts),e._savedLastViewedProductsResponse=t}function et(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return t.customer?[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,r.sent().apiGetLastViewedProducts)({customerId:t.customer.id})];case 2:return e=r.sent(),t._lastViewedProducts=(null===(n=l(e.data))||void 0===n?void 0:n.reverse())||[],[3,4];case 3:tt(t),r.label=4;case 4:return[2,t._lastViewedProducts]}})})}function tt(e){d()||(e._lastViewedProducts=rt(),e._lastViewedProducts=l(e._lastViewedProducts).reverse())}function rt(){if(d())return[];try{var e=window.localStorage.getItem(O);if(e)return JSON.parse(e)}catch(e){console.error(e)}return[]}function nt(t,n,i){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return t.customer?t._lastViewedProducts.find(function(e){return e.productId===n})?[2]:[4,import("../../api/customer/index.js")]:[3,3];case 1:return[4,(0,e.sent().apiSaveLastViewedProducts)({input:{customerId:t.customer.id,products:[{productId:n,variantId:i}]}})];case 2:return e.sent()&&t._lastViewedProducts.push({productId:n,variantId:i}),[3,4];case 3:t._lastViewedProducts=rt(),t._lastViewedProducts=t._lastViewedProducts.filter(function(e){return e.productId!==n}),t._lastViewedProducts.push({productId:n,variantId:i}),t._lastViewedProducts=t._lastViewedProducts.slice(-20),function(e){d()||window.localStorage.setItem(O,JSON.stringify(e._lastViewedProducts))}(t),e.label=4;case 4:return[2]}})})}function it(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:if(d())return[2];r.label=1;case 1:return r.trys.push([1,5,,6]),(e=rt()).length?[4,import("../../api/customer/index.js")]:[3,4];case 2:return[4,(0,r.sent().apiSaveLastViewedProducts)({input:{customerId:t.customer.id,products:e}})];case 3:r.sent()&&(d()||window.localStorage.removeItem(O)),r.label=4;case 4:return[3,6];case 5:return n=r.sent(),console.error(n),[3,6];case 6:return[2]}})})}function st(e){d()||(e._customerConsentGranted=!!window.localStorage.getItem(A))}function ot(e){return e._customerConsentGranted}function at(e){d()||window.localStorage.removeItem(A)}function ct(e){var t;return{addresses:null===(t=e.addresses)||void 0===t?void 0:t.map(function(e){return{addressLine1:e.addressLine1,addressLine2:e.addressLine2,city:e.city,company:e.company,country:e.country,createdAt:e.createdAt,deleted:e.deleted,district:e.district,firstName:e.firstName,id:e.id,identityNumber:e.identityNumber,isDefault:e.isDefault,lastName:e.lastName,phone:e.phone,postalCode:e.postalCode,region:e.region,state:e.state,taxNumber:e.taxNumber,taxOffice:e.taxOffice,title:e.title,updatedAt:e.updatedAt}}),attributes:e.attributes,birthDate:e.birthDate,firstName:e.firstName,gender:e.gender,lastName:e.lastName,phone:e.phone,phoneSubscriptionStatus:e.phoneSubscriptionStatus,smsSubscriptionStatus:e.smsSubscriptionStatus,subscriptionStatus:e.subscriptionStatus}}function ut(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/loyalty/index.js")];case 1:return[4,(0,e.sent().apiListEarningMethods)()];case 2:return[2,e.sent().data]}})})}function dt(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,Ae(t)];case 1:return r.sent(),(e=null===(n=u.cart)||void 0===n?void 0:n.id)?[4,import("../../api/loyalty/index.js")]:[2,[]];case 2:return[4,(0,r.sent().apiListSpendingMethodsByCartId)({cartId:e})];case 3:return[2,r.sent().data]}})})}function lt(t){return e(this,void 0,void 0,function(){var e,n,i,s,o,a,c;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,6,,7]),[4,Ae(t)];case 1:return r.sent(),e=null===(s=u.cart)||void 0===s?void 0:s.id,n=null===(c=null===(a=null===(o=u.cart)||void 0===o?void 0:o.loyaltyLines)||void 0===a?void 0:a[0])||void 0===c?void 0:c.loyaltySpendingMethodId,e&&n?[4,import("../../api/loyalty/index.js")]:[2];case 2:return[4,(0,r.sent().apiRemoveLoyaltyPointsFromCart)({cartId:e,loyaltySpendingMethodId:n})];case 3:return r.sent().isSuccess?[4,f()]:[3,5];case 4:r.sent(),r.label=5;case 5:return[3,7];case 6:return i=r.sent(),console.error(i),[3,7];case 7:return[2]}})})}function mt(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,Ae(t)];case 1:return r.sent(),ht(t)?(e=null===(n=u.cart)||void 0===n?void 0:n.id,[4,import("../../api/loyalty/index.js")]):[2,null];case 2:return[4,(0,r.sent().apiGetLoyaltyCustomerInfo)({cartId:e})];case 3:return[2,r.sent().data||null]}})})}function ft(t){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/loyalty/index.js")];case 1:return[4,(0,e.sent().apiListLoyaltyProgramTiers)()];case 2:return[2,e.sent().data]}})})}function pt(t,n){return e(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,import("../../api/loyalty/index.js")];case 1:return[4,(0,e.sent().apiListLoyaltyProgramPointHistory)(n)];case 2:return[2,e.sent().data]}})})}function vt(n,i){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return(e=null===(n=u.cart)||void 0===n?void 0:n.id)?[4,import("../../api/loyalty/index.js")]:[2,null];case 1:return[4,(0,r.sent().apiUseLoyaltyPoints)({input:t(t({},i.input),{cartId:e})})];case 2:return[2,r.sent().data||null]}})})}function ht(e){return!!e.customer}function _t(e){return e._accountInfoForm||(e._accountInfoForm={},I(e._accountInfoForm)),e._accountInfoForm}function wt(e){e._accountInfoForm=null}function St(e){return e._contactForm||(e._contactForm={},b(e._contactForm)),e._contactForm}function It(e){e._contactForm=null}function bt(e){return e._couponCodeForm||(e._couponCodeForm={},g(e._couponCodeForm)),e._couponCodeForm}function gt(e){e._couponCodeForm=null}function Et(e){return e._deactivateCustomerForm||(e._deactivateCustomerForm={},E(e._deactivateCustomerForm)),e._deactivateCustomerForm}function yt(e){e._deactivateCustomerForm=null}function kt(e){return e._forgotPasswordForm||(e._forgotPasswordForm={},y(e._forgotPasswordForm)),e._forgotPasswordForm}function xt(e){e._forgotPasswordForm=null}function Ct(e){return e._loginForm||(e._loginForm={},k(e._loginForm)),e._loginForm}function Lt(e){return e._smsLoginForm||(e._smsLoginForm={},j(e._smsLoginForm)),e._smsLoginForm}function Tt(e){return e._verifyPhoneNumberForm||(e._verifyPhoneNumberForm={},P(e._verifyPhoneNumberForm)),e._verifyPhoneNumberForm}function jt(e){e._loginForm=null}function Pt(e){return e._newsletterSubscriptionForm||(e._newsletterSubscriptionForm={},x(e._newsletterSubscriptionForm)),e._newsletterSubscriptionForm}function Ft(e){e._newsletterSubscriptionForm=null}function Rt(e){return e._orderTrackingForm||(e._orderTrackingForm={},C(e._orderTrackingForm)),e._orderTrackingForm}function Nt(e){e._orderTrackingForm=null}function Ot(e){return e._recoverPasswordForm||(e._recoverPasswordForm={},L(e._recoverPasswordForm)),e._recoverPasswordForm}function At(e){e._recoverPasswordForm=null}function Dt(e){return e._registerForm||(e._registerForm={},T(e._registerForm)),e._registerForm}function Ut(e){e._registerForm=null}function Mt(e){var t={};return v(t),s(t)}function Vt(t){return e(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return"ORDER_DETAIL"!==c.currentPageType||"undefined"==typeof window?[3,4]:(e=a.getCurrentPath().split("/").pop(),!i.isPreview||e&&"orders"!==e?[3,2]:[4,Ie(t)]);case 1:(n=r.sent()).length&&(e=n[0].id),r.label=2;case 2:return e?[4,be(t,e)]:[3,4];case 3:return[2,r.sent()];case 4:return[2]}})})}function Gt(e){try{window.openIkasStorefrontWidget()}catch(e){console.error("Failed to open ikas storefront widget",e)}}function Bt(e){try{window.closeIkasStorefrontWidget()}catch(e){console.error("Failed to close ikas storefront widget",e)}}export{K as MILES_SMILES_PAYMENT_GATEWAY_CODE,X as MILES_SMILES_PAYMENT_GATEWAY_ID,z as MILES_SMILES_PROVIDER,de as activateCustomer,xe as addProductToFavorites,V as canCustomerCreateEmailSubscription,he as checkEmail,wt as clearAccountInfoForm,It as clearContactForm,gt as clearCouponCodeForm,M as clearCustomerSession,yt as clearDeactivateCustomerForm,xt as clearForgotPasswordForm,jt as clearLoginForm,Ft as clearNewsletterSubscriptionForm,Nt as clearOrderTrackingForm,At as clearRecoverPasswordForm,Ut as clearRegisterForm,Bt as closeIkasStorefrontWidget,je as createEmailSubscription,se as createRefundRequest,mt as cs_getLoyaltyCustomerInfo,ut as cs_listEarningMethods,pt as cs_listLoyaltyProgramPointHistory,ft as cs_listLoyaltyProgramTiers,dt as cs_listSpendingMethodsByCartId,lt as cs_removeLoyaltyPointsFromCart,vt as cs_useLoyaltyPoints,ae as customerLogin,nt as customerStore_onProductView,G as customerToAnalyticsCustomer,Re as deactivateCustomer,ie as deleteCustomerAddress,Ne as exportCustomerPersonalData,_e as forgotPassword,_t as getAccountInfoForm,St as getContactForm,bt as getCouponCodeForm,Ue as getCustomerAttributes,ot as getCustomerConsentGranted,Et as getDeactivateCustomerForm,Ve as getDigitalProductFileDownloadUrl,Mt as getEmptyAddressForm,ke as getFavoriteProducts,ye as getFavoriteProductsIds,kt as getForgotPasswordForm,et as getLastViewedProducts,Ct as getLoginForm,re as getMilesSmilesDetails,ee as getMilesSmilesLink,Pt as getNewsletterSubscriptionForm,be as getOrder,ge as getOrderByEmail,Vt as getOrderDetailsOfPage,Me as getOrderProductFiles,Ge as getOrderRefundSettings,Rt as getOrderTrackingForm,Ee as getOrderTransactions,Ie as getOrders,Ot as getRecoverPasswordForm,Dt as getRegisterForm,Lt as getSmsLoginForm,Tt as getVerifyPhoneNumberForm,Oe as handleCustomerConsentGrant,$ as handleMilesSmilesBind,W as handleSocialLogin,ht as hasCustomer,D as initCustomerStore,Te as isFavoriteProduct,ne as isMilesSmilesTransaction,ce as logout,Z as milesSmilesBind,Gt as openIkasStorefrontWidget,we as recoverPassword,oe as refundOrder,ue as register,at as removeCustomerConsent,Ce as removeProductFromFavorites,le as resendCustomerActivationMail,pe as resendCustomerPhoneVerificationCode,ve as saveContactForm,Se as saveCustomer,Pe as saveCustomerFormData,U as seedCustomerSession,Fe as sendReview,Ye as setCaptchaToken,$e as setSavedLastViewedProductsResponse,B as socialLogin,q as socialLoginToken,te as unlinkMilesSmiles,me as validateCustomerPhoneVerificationCode,fe as validateOTPCode,De as waitForCaptchaTokenInit,Ae as waitForCustomerStoreInit};
@@ -0,0 +1,423 @@
1
+ /** The store's common texts (the ikas set), key → English text: a code component reads them with `t("ikas:<key>")`. */
2
+ export type IkasTexts = {
3
+ "checkout_page.ackPoliciesSentence": "I acknowledge the {{ackPrivacyPolicy}} and {{ackTermsOfService}}.";
4
+ "checkout_page.ackPrivacyPolicy": "Privacy Policy";
5
+ "checkout_page.ackTermsOfService": "Terms of Service";
6
+ "checkout_page.actions.acceptOffer": "Add to My Order";
7
+ "checkout_page.actions.addToCart": "Add to Cart";
8
+ "checkout_page.actions.apply": "Apply";
9
+ "checkout_page.actions.backToCart": "Back to Cart";
10
+ "checkout_page.actions.backToShopping": "Back to Shopping";
11
+ "checkout_page.actions.cancel": "Cancel";
12
+ "checkout_page.actions.close": "Close";
13
+ "checkout_page.actions.completeOrder": "Complete the Order";
14
+ "checkout_page.actions.continue": "Continue";
15
+ "checkout_page.actions.continueWithPayment": "Continue with Payment";
16
+ "checkout_page.actions.continueWithShipping": "Continue with Shipping";
17
+ "checkout_page.actions.download": "Download";
18
+ "checkout_page.actions.edit": "Edit";
19
+ "checkout_page.actions.goOrderDetailPage": "Go To Order Detail";
20
+ "checkout_page.actions.hide": "Hide";
21
+ "checkout_page.actions.login": "Login";
22
+ "checkout_page.actions.rejectOffer": "Reject Offer";
23
+ "checkout_page.actions.save": "Save";
24
+ "checkout_page.actions.sendMessage": "Send Message";
25
+ "checkout_page.actions.show": "Show";
26
+ "checkout_page.actions.signup": "Sign Up";
27
+ "checkout_page.actions.updateCart": "Update My Cart";
28
+ "checkout_page.addCouponCode": "Add coupon code";
29
+ "checkout_page.addOrderNote": "Add order note";
30
+ "checkout_page.address": "Address";
31
+ "checkout_page.addressError": "Enter address";
32
+ "checkout_page.addressLine1": "Address";
33
+ "checkout_page.addressLine2": "Address Second Line";
34
+ "checkout_page.addressTitle": "Adress Title";
35
+ "checkout_page.adressTitleError": "Enter address title";
36
+ "checkout_page.alreadyHaveAnAccount": "Already have an account?";
37
+ "checkout_page.appPayment": "App Payment";
38
+ "checkout_page.bankRedirect": "Bank Redirect";
39
+ "checkout_page.billingAddress": "Billing Address";
40
+ "checkout_page.bundleProductsQuantity": "{{value}} Product";
41
+ "checkout_page.buyOnlinePayAtStore": "Pay at Store";
42
+ "checkout_page.cardCVC": "CVC";
43
+ "checkout_page.cardCVCError": "Enter a valid CVC";
44
+ "checkout_page.cardCVCTooltip": "CVC is the 3 digit number behind your card";
45
+ "checkout_page.cardExpiry": "Month / Year";
46
+ "checkout_page.cardExpiryError": "Enter a valid date";
47
+ "checkout_page.cardHolderError": "Enter cardholder name";
48
+ "checkout_page.cardHolderName": "Cardholder Name";
49
+ "checkout_page.cardNumber": "Card Number";
50
+ "checkout_page.cardNumberError": "Please enter a valid card number";
51
+ "checkout_page.cartInterest": "Interest";
52
+ "checkout_page.cartItemProduct": "product";
53
+ "checkout_page.cartShippingTitle": "Delivery / Shipping";
54
+ "checkout_page.cartTaxTitle": "Tax";
55
+ "checkout_page.cash": "Cash";
56
+ "checkout_page.cashOnDelivery": "Cash On Delivery";
57
+ "checkout_page.chargedAmount": "Charged Amount";
58
+ "checkout_page.city": "City";
59
+ "checkout_page.cityError": "Select city";
60
+ "checkout_page.companyName": "Company Name";
61
+ "checkout_page.contactForm": "Contact Form";
62
+ "checkout_page.contactFormCta": "Type your message";
63
+ "checkout_page.contactFormDescription": "We will respond to your message as soon as possible";
64
+ "checkout_page.contactFormSent": "Message sent successfully";
65
+ "checkout_page.contactInfo": "Contact Information";
66
+ "checkout_page.corporateInvoice": "I want a corporate invoice.";
67
+ "checkout_page.country": "Country";
68
+ "checkout_page.countryError": "Select country";
69
+ "checkout_page.couponCode": "Coupon Code";
70
+ "checkout_page.couponInvalidForCartItems": "This coupon code is not valid for the items in your cart.";
71
+ "checkout_page.couponPeriodUsageLimitExceeded": "This coupon code has reached its usage limit for the specified period.";
72
+ "checkout_page.creditCard": "Credit Card";
73
+ "checkout_page.creditCardOnDelivery": "Credit Card On Delivery";
74
+ "checkout_page.customerConsentCta": "Contact me about the news and promotions";
75
+ "checkout_page.customizedProduct": "Customized Product";
76
+ "checkout_page.deleteAddress": "Delete Address";
77
+ "checkout_page.deliveryMethod": "Delivery Method";
78
+ "checkout_page.deliveryToAddress": "Delivery to Address";
79
+ "checkout_page.directDebit": "Bank Debit";
80
+ "checkout_page.discount": "Discount";
81
+ "checkout_page.district": "District";
82
+ "checkout_page.districtError": "Select district";
83
+ "checkout_page.editAddress": "Edit Address";
84
+ "checkout_page.editOrderNote": "Edit order note";
85
+ "checkout_page.email": "E-mail";
86
+ "checkout_page.emailError": "Enter a valid e-mail";
87
+ "checkout_page.enterPhoneNumber": "Enter phone number";
88
+ "checkout_page.errorContactStore": "An unexpected error has occurred. Please contact the store owner.";
89
+ "checkout_page.errorCustomerAccountDisabled": "To use this account, contact us.";
90
+ "checkout_page.errorCustomerRequired": "This e-mail address belongs to a registered user. Please login to your account.";
91
+ "checkout_page.errorNoShipping": "Your region is not available for shipping.";
92
+ "checkout_page.errorPayment": "Your payment could not be received. Please check your information and try again.";
93
+ "checkout_page.errorPickupLocationRequired": "Choose pickup location";
94
+ "checkout_page.errorStockDescription": "Some items in your cart are out of stock. Would you like to continue by removing these products from your cart?";
95
+ "checkout_page.errorStockTitle": "Stock Update!";
96
+ "checkout_page.errorUnknown": "An unexpected error has occurred. Please try again.";
97
+ "checkout_page.estimatedDeliveryTime.day": "Estimated Delivery Time: {{value}} Days";
98
+ "checkout_page.estimatedDeliveryTime.hour": "Estimated Delivery Time: {{value}} Hours";
99
+ "checkout_page.estimatedDeliveryTime.minute": "Estimated Delivery Time: {{value}} Minutes";
100
+ "checkout_page.fieldRestrictionError.addressLine1": "Address must contain at least 2 words and can only include letters, numbers, spaces, and basic punctuation";
101
+ "checkout_page.fieldRestrictionError.addressLine2": "Address can only contain letters, numbers, spaces, and basic punctuation";
102
+ "checkout_page.fieldRestrictionError.companyName": "Company name can only contain letters, numbers, spaces, and basic punctuation";
103
+ "checkout_page.fieldRestrictionError.firstName": "Name can only contain letters, hyphens, apostrophes, and spaces";
104
+ "checkout_page.fieldRestrictionError.lastName": "Surname can only contain letters, hyphens, apostrophes, and spaces";
105
+ "checkout_page.fieldRestrictionError.taxOffice": "Tax office can only contain letters, numbers, spaces, and periods";
106
+ "checkout_page.filesReadyToDownload": "Files Ready to Download";
107
+ "checkout_page.firstName": "Name";
108
+ "checkout_page.firstNameError": "Enter name";
109
+ "checkout_page.free": "Free";
110
+ "checkout_page.freeOrderDescription": "There is no amount to pay. You can place an order by completing this step.";
111
+ "checkout_page.giftCard": "Gift Card";
112
+ "checkout_page.giftCode": "Gift Code";
113
+ "checkout_page.giftCodeErrorDescription": "The gift code you entered is not valid or not applicable to the products in your cart. Please check your code and try again.";
114
+ "checkout_page.giftCodeErrorTitle": "Gift Code Error";
115
+ "checkout_page.giftPackage": "Gift Package";
116
+ "checkout_page.giftPackageCta": "Gift wrap this order";
117
+ "checkout_page.giftPackageCtaPlaceholder": "Enter your gift message";
118
+ "checkout_page.guestEmailTooltip": "Your order information will be sent to this e-mail address";
119
+ "checkout_page.helpCta": "Contact us";
120
+ "checkout_page.helpCtaQuestion": "Do you need help?";
121
+ "checkout_page.hepsiPayErrorMessage": "You do not have a Hepsipay account registered with your phone number.";
122
+ "checkout_page.identityNumber": "Identity Number";
123
+ "checkout_page.identityNumberError": "Enter identity number";
124
+ "checkout_page.imprint": "Imprint";
125
+ "checkout_page.inStoreDelivery": "In Store Delivery";
126
+ "checkout_page.installmentOptions": "Installment Options";
127
+ "checkout_page.installments": "Installments";
128
+ "checkout_page.iyzicoDescription": "To make a payment, you must accept the terms of service.";
129
+ "checkout_page.lastName": "Surname";
130
+ "checkout_page.lastNameError": "Enter surname";
131
+ "checkout_page.loyaltyEarningMethodTitle": "You will earn {{value}} points when you complete this purchase";
132
+ "checkout_page.loyaltyPoint": "Point";
133
+ "checkout_page.loyaltyPointSpending": "{{point}} Loyalty Points used";
134
+ "checkout_page.loyaltyPoints": "Loyalty Points";
135
+ "checkout_page.loyaltyPointsGiftModalDescription": "You can use your loyalty points to get a gift on your order.";
136
+ "checkout_page.loyaltyPointsGiftModalTitle": "Select Gift";
137
+ "checkout_page.loyaltyPointsLineItemButtonAddFree": "Add Free";
138
+ "checkout_page.loyaltyPointsLineItemButtonApply": "Apply";
139
+ "checkout_page.loyaltyPointsLineItemButtonApplyAmount": "{{amount}} Discount Apply";
140
+ "checkout_page.loyaltyPointsLineItemButtonSelectGift": "Select Gift";
141
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleDynamicAmount": "Dynamic Discount";
142
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription": "{{amount}} Discount for {{point}} points";
143
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleFixedAmount": "{{value}} Discount";
144
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleFixedAmountOneRow": "Convert {{value}} Loyalty Points to Discount";
145
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleFreeProduct": "Free Product";
146
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleFreeProductAdded": "Free Product Added";
147
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleFreeShipping": "Free Shipping";
148
+ "checkout_page.loyaltyPointsLinesModalContentItemTitleRatio": "Percentage Discount";
149
+ "checkout_page.loyaltyPointsLinesModalCurrentPoints": "Current Points";
150
+ "checkout_page.loyaltyPointsLinesModalDescription": "You can use your loyalty points to get a discount or a gift on your order.";
151
+ "checkout_page.loyaltyPointsLinesModalTitle": "Convert Loyalty Points to Discount";
152
+ "checkout_page.loyaltyPointsTitle": "Convert Loyalty Points to Discount";
153
+ "checkout_page.loyaltyPointsViewAll": "View All";
154
+ "checkout_page.masterPass.creditCardForm.button": "Send Verification Code";
155
+ "checkout_page.masterPass.creditCardForm.cardName": "Card Name";
156
+ "checkout_page.masterPass.creditCardForm.checkboxLabel": "I want to {{link}} my card in the {{masterpassLogo}} infrastructure.";
157
+ "checkout_page.masterPass.creditCardForm.checkboxLabelLink": "store";
158
+ "checkout_page.masterPass.creditCardForm.moreInformation": "More Information";
159
+ "checkout_page.masterPass.creditCardForm.phoneNumber": "Phone";
160
+ "checkout_page.masterPass.linkCardToClient.buttonText": "OK";
161
+ "checkout_page.masterPass.linkCardToClient.subInfoText": "Payment process will not be made at this stage.";
162
+ "checkout_page.masterPass.linkCardToClient.text": "You have a card registered to Masterpass. Click OK to use your card for your shopping.";
163
+ "checkout_page.masterPass.otpModal.buttonText": "Verify";
164
+ "checkout_page.masterPass.otpModal.countdownText": "Remaining time: ";
165
+ "checkout_page.masterPass.otpModal.inputLabel": "Enter the verification code";
166
+ "checkout_page.masterPass.otpModal.otpTextBank": "Enter the SMS verification code sent to the cardholder by your bank.";
167
+ "checkout_page.masterPass.otpModal.otpTextMasterPass": "Enter the SMS verification code sent by Masterpass.";
168
+ "checkout_page.masterPass.otpModal.resendText": "Resend code";
169
+ "checkout_page.masterPass.paymentGatewaySelectBox.delete": "Delete";
170
+ "checkout_page.masterPass.successModal.linkCardToClientSuccessText": "Your Masterpass account has been successfully confirmed.";
171
+ "checkout_page.masterPass.successModal.otpSuccessText": "Your card successfully registered.";
172
+ "checkout_page.milesSmilesAmountToPay": "Amount to Pay";
173
+ "checkout_page.milesSmilesApproxNote": "The TRY equivalent is approximate; the exact amount is calculated at payment.";
174
+ "checkout_page.milesSmilesAvailableTotal": "Available Total Miles: {{miles}}";
175
+ "checkout_page.milesSmilesBindButton": "Continue with Miles&Smiles";
176
+ "checkout_page.milesSmilesBindPrompt": "Link your Miles&Smiles account to use your miles";
177
+ "checkout_page.milesSmilesErrors.EXTERNAL_ACCOUNT_ALREADY_LINKED": "This Miles&Smiles membership is linked to another account. Please contact support.";
178
+ "checkout_page.milesSmilesErrors.EXTERNAL_ACCOUNT_MEMBER_MISMATCH": "You are trying to connect a different Miles&Smiles membership. Unlink the current one first.";
179
+ "checkout_page.milesSmilesErrors.INVALID_MILES": "Invalid miles amount.";
180
+ "checkout_page.milesSmilesErrors.MILES_MEMBER_DETAILS_FAILED": "Miles&Smiles member details could not be retrieved. Please try again.";
181
+ "checkout_page.milesSmilesErrors.MILES_RESERVE_FAILED": "Your miles could not be reserved. No miles were deducted, please try again.";
182
+ "checkout_page.milesSmilesErrors.MILES_SMILES_LOGIN_CANCELLED_OR_FAILED": "Miles&Smiles login was cancelled or could not be completed.";
183
+ "checkout_page.milesSmilesErrors.MILES_SMILES_LOGIN_REQUIRED": "Your Miles&Smiles session has expired. Please connect again.";
184
+ "checkout_page.milesSmilesErrors.MILES_SMILES_MEMBER_DETAILS_FAILED": "Miles&Smiles member details could not be retrieved. Please try again.";
185
+ "checkout_page.milesSmilesErrors.MILES_SMILES_MEMBER_MISMATCH": "The linked Miles&Smiles membership does not match. Please connect again.";
186
+ "checkout_page.milesSmilesErrors.UNEXPECTED_ERROR": "An unexpected error has occurred. Please try again.";
187
+ "checkout_page.milesSmilesErrors.default": "The Miles&Smiles operation could not be completed. Please try again.";
188
+ "checkout_page.milesSmilesExceedError": "You cannot enter a value higher than available miles";
189
+ "checkout_page.milesSmilesLoginButton": "Login";
190
+ "checkout_page.milesSmilesLoginPrompt": "Login to use your miles";
191
+ "checkout_page.milesSmilesPaymentLabel": "Miles&Smiles";
192
+ "checkout_page.milesSmilesUnit": "miles";
193
+ "checkout_page.milesSmilesUseMyMiles": "use my miles";
194
+ "checkout_page.minTransactionErrorMessage": "Our minimum purchase amount is {{value}}";
195
+ "checkout_page.missingAddressFields": "There are some missing required fields in this address.";
196
+ "checkout_page.moneyOrder": "Money Order";
197
+ "checkout_page.mustBeSignInToApplyCampaign": "You need to sign up to benefit from the discount.";
198
+ "checkout_page.newAddress": "New Address";
199
+ "checkout_page.no": "No";
200
+ "checkout_page.offerDescription": "Description";
201
+ "checkout_page.offerProductName": "ikas Product";
202
+ "checkout_page.offerTitle": "Campaign Title";
203
+ "checkout_page.orderAmount": "Order Amount:";
204
+ "checkout_page.orderDate": "Order Date:";
205
+ "checkout_page.orderNo": "Order Number:";
206
+ "checkout_page.orderNoAndDate": "Order Number / Date";
207
+ "checkout_page.orderNote": "Order Note";
208
+ "checkout_page.orderPackageStatus.cancelRejected": "Cancel Rejected";
209
+ "checkout_page.orderPackageStatus.cancelRequested": "Cancel Requested";
210
+ "checkout_page.orderPackageStatus.cancelled": "Cancelled";
211
+ "checkout_page.orderPackageStatus.delivered": "Delivered";
212
+ "checkout_page.orderPackageStatus.fulfilled": "Fulfilled";
213
+ "checkout_page.orderPackageStatus.partiallyDelivered": "Partially Delivered";
214
+ "checkout_page.orderPackageStatus.partiallyFulfilled": "Partially Fulfilled";
215
+ "checkout_page.orderPackageStatus.readyForShipment": "Ready For Shipment";
216
+ "checkout_page.orderPackageStatus.refundRejected": "Refund Rejected";
217
+ "checkout_page.orderPackageStatus.refundRequestAccepted": "Refund Request Accepted";
218
+ "checkout_page.orderPackageStatus.refundRequested": "Refund Requested";
219
+ "checkout_page.orderPackageStatus.refunded": "Refunded";
220
+ "checkout_page.orderPackageStatus.unableToDeliver": "Unable to Deliver";
221
+ "checkout_page.orderPackageStatus.unfulfilled": "Unfulfilled";
222
+ "checkout_page.orderSuccessDescription": "Dear {{customerName}}, we have received your order. We will notify you when your order is shipped.";
223
+ "checkout_page.orderSuccessDigitalOnlyDescription": "Dear {{customerName}}, we have received your order. We will notify you when your products are ready to use.";
224
+ "checkout_page.orderSuccessInStoreDeliveryDescription": "Dear {{customerName}}, we have received your order. We will notify you by e-mail when your order is delivered to the store.";
225
+ "checkout_page.orderSuccessShortTitle": "Your Order Has Been Confirmed.";
226
+ "checkout_page.orderSuccessTitle": "Thank you for your order!";
227
+ "checkout_page.other": "Other";
228
+ "checkout_page.password": "Password";
229
+ "checkout_page.passwordMinError": "Must be at least {{value}} characters!";
230
+ "checkout_page.passwordRequiredError": "Enter password";
231
+ "checkout_page.payLater": "Pay Later";
232
+ "checkout_page.payment": "Payment";
233
+ "checkout_page.paymentMethod": "Payment Method";
234
+ "checkout_page.paymentMethodAdditionalPrice": "Fee";
235
+ "checkout_page.paymentMethodDiscount": "Discount";
236
+ "checkout_page.paymentSummary": "Payment Summary";
237
+ "checkout_page.phone": "Phone";
238
+ "checkout_page.phoneError": "Enter a valid phone number";
239
+ "checkout_page.pickUpLocation": "Pick Up Location";
240
+ "checkout_page.postalCode": "Postal Code";
241
+ "checkout_page.postalCodeError": "Enter postal code";
242
+ "checkout_page.privacyPolicy": "Privacy Policy";
243
+ "checkout_page.quantity": "Quantity";
244
+ "checkout_page.quickRegistration.accountEmail": "Account email";
245
+ "checkout_page.quickRegistration.completedSubtitle": "Now you can track your orders easily and keep up with the latest offers.";
246
+ "checkout_page.quickRegistration.completedTitle": "Account Created Successfully";
247
+ "checkout_page.quickRegistration.subtitle": "As a member, you can track your orders and get information about the latest offers and discounts.";
248
+ "checkout_page.quickRegistration.title": "Create Your Account";
249
+ "checkout_page.receiver": "Receiver";
250
+ "checkout_page.recipientsInfo": "Recipient Information";
251
+ "checkout_page.refundedAmount": "Refunded Amount";
252
+ "checkout_page.region": "Region";
253
+ "checkout_page.regionError": "Select region";
254
+ "checkout_page.returnPolicy": "Return Policy";
255
+ "checkout_page.saveAddressCta": "Save this address for future purchases";
256
+ "checkout_page.securePayment": "Secure Payment";
257
+ "checkout_page.securePaymentTooltip": "All payments are secure and encrypted";
258
+ "checkout_page.shipping": "Shipping";
259
+ "checkout_page.shippingAddress": "Shipping Address";
260
+ "checkout_page.shippingPolicy": "Shipping Policy";
261
+ "checkout_page.shippingSummary": "Shipping Summary";
262
+ "checkout_page.singleInstallment": "Single Payment";
263
+ "checkout_page.sliceIt": "Slice It";
264
+ "checkout_page.standartShipping": "Standart Shipping";
265
+ "checkout_page.state": "State";
266
+ "checkout_page.stateError": "Select state";
267
+ "checkout_page.stockLocation.deliveryTime.TWO_IN_FOUR_DAYS": "Usually ready in 2-4 days";
268
+ "checkout_page.stockLocation.deliveryTime.WITHIN_FOUR_HOURS": "Usually ready in 4 hours";
269
+ "checkout_page.stockLocation.deliveryTime.WITHIN_ONE_HOUR": "Usually ready in 1 hour";
270
+ "checkout_page.stockLocation.deliveryTime.WITHIN_PLUS_FIVE_DAYS": "Usually ready in +5 days";
271
+ "checkout_page.stockLocation.deliveryTime.WITHIN_TWENTY_FOUR_HOURS": "Usually ready in 24 hours";
272
+ "checkout_page.stockLocation.deliveryTime.WITHIN_TWO_HOURS": "Usually ready in 2 hours";
273
+ "checkout_page.storeCredit": "Store Credit";
274
+ "checkout_page.storeCreditBalance": "Use my store credit";
275
+ "checkout_page.subtotal": "Subtotal";
276
+ "checkout_page.subtotalTooltip": "Subtotal reflects the total for your cart before the discounts and does not include the shipping fees.";
277
+ "checkout_page.summary": "Summary";
278
+ "checkout_page.taxNumber": "Tax Number";
279
+ "checkout_page.taxNumberError": "Enter tax number";
280
+ "checkout_page.taxOffice": "Tax Office";
281
+ "checkout_page.taxOfficeError": "Enter tax office";
282
+ "checkout_page.termsOfService": "Terms of Service";
283
+ "checkout_page.timeRemaining": "Time Remaining:";
284
+ "checkout_page.tkPayDescription": "To make a payment, you must accept the terms of service.";
285
+ "checkout_page.total": "Total";
286
+ "checkout_page.totalAmountPayable": "Total Amount Payable";
287
+ "checkout_page.upsellTimeErrorMessage": "The offer period has expired.";
288
+ "checkout_page.useShippingForBilling": "Use shipping address for billing";
289
+ "checkout_page.wallet": "Wallet";
290
+ "checkout_page.yes": "Yes";
291
+ "label.address_line": "Address";
292
+ "label.address_line_2": "Address 2";
293
+ "label.address_title": "Address Title";
294
+ "label.city": "City";
295
+ "label.comment": "Comment";
296
+ "label.comment_star": "Star";
297
+ "label.comment_title": "Comment Title";
298
+ "label.company": "Company";
299
+ "label.country": "Country";
300
+ "label.coupon_code": "Coupon Code";
301
+ "label.district": "District";
302
+ "label.email": "Email";
303
+ "label.first_name": "First Name";
304
+ "label.identity_number": "Identity Number";
305
+ "label.last_name": "Last Name";
306
+ "label.message": "Message";
307
+ "label.order_number": "Order Number";
308
+ "label.password": "Password";
309
+ "label.password_again": "Password Again";
310
+ "label.phone": "Phone";
311
+ "label.postal_code": "Postal Code";
312
+ "label.region": "Region";
313
+ "label.state": "State";
314
+ "label.tax_number": "Tax Number";
315
+ "label.tax_office": "Tax Office";
316
+ "notification.failure.account_info": "An error occurred while updating user information";
317
+ "notification.failure.address": "An error occurred while saving the address";
318
+ "notification.failure.back_in_stock_notification": "Your back in stock notification request could not be saved.";
319
+ "notification.failure.contact_form": "Contact form submission failed!";
320
+ "notification.failure.coupon_code_cannot_use_this_cart": "Coupon code cannot be used for this cart!";
321
+ "notification.failure.coupon_code_form": "Coupon code could not be saved!";
322
+ "notification.failure.coupon_code_form_remove": "Coupon code could not be removed!";
323
+ "notification.failure.coupon_code_not_exist": "Coupon code does not exist!";
324
+ "notification.failure.coupon_code_usage_limit_error": "Coupon code usage limit error!";
325
+ "notification.failure.customer_review": "Comment submission failed!";
326
+ "notification.failure.deactivate_customer": "An error occurred while deleting your account.";
327
+ "notification.failure.deactivate_customer_request_already_exists": "You already have a pending account deletion request.";
328
+ "notification.failure.forgot_password": "Email is invalid!";
329
+ "notification.failure.login": "Login failed!";
330
+ "notification.failure.newsletter_subscription": "Subscription failed!";
331
+ "notification.failure.newsletter_subscription_already_subscribed": "You are already subscribed to our newsletter.";
332
+ "notification.failure.order_tracking": "Order tracking query failed!";
333
+ "notification.failure.recover_password": "Password reset failed!";
334
+ "notification.failure.register": "Registration failed!";
335
+ "notification.failure.verify_phone_number": "Phone number verification failed!";
336
+ "notification.success.account_info": "User information has been successfully updated";
337
+ "notification.success.address": "The address has been successfully saved.";
338
+ "notification.success.back_in_stock_notification": "You will be notified by email when the product is back in stock.";
339
+ "notification.success.contact_form": "Contact form submitted successfully!";
340
+ "notification.success.coupon_code_form": "Coupon code has been successfully saved!";
341
+ "notification.success.coupon_code_form_remove": "Coupon code has been successfully removed!";
342
+ "notification.success.customer_review": "Comment submitted!";
343
+ "notification.success.deactivate_customer": "Your account has been successfully deleted.";
344
+ "notification.success.forgot_password": "Email sent!";
345
+ "notification.success.login": "Login successful!";
346
+ "notification.success.newsletter_subscription": "Subscription successful!";
347
+ "notification.success.order_tracking": "Order tracking query successful!";
348
+ "notification.success.recover_password": "Password reset successful!";
349
+ "notification.success.register": "Registration successful!";
350
+ "notification.success.verify_phone_number": "Phone number verified successfully!";
351
+ "order_package_status.cancel_rejected": "Cancel Rejected";
352
+ "order_package_status.cancel_requested": "Cancel Requested";
353
+ "order_package_status.cancelled": "Cancelled";
354
+ "order_package_status.delivered": "Delivered";
355
+ "order_package_status.fulfilled": "Fulfilled";
356
+ "order_package_status.partially_cancelled": "Partially Cancelled";
357
+ "order_package_status.partially_delivered": "Partially Delivered";
358
+ "order_package_status.partially_fulfilled": "Partially Fulfilled";
359
+ "order_package_status.partially_ready_for_shipment": "Partially Ready For Shipment";
360
+ "order_package_status.partially_refunded": "Partially Refunded";
361
+ "order_package_status.ready_for_pick_up": "Ready For Pick Up";
362
+ "order_package_status.ready_for_shipment": "Ready For Shipment";
363
+ "order_package_status.refund_rejected": "Refund Rejected";
364
+ "order_package_status.refund_request_accepted": "Refund Request Accepted";
365
+ "order_package_status.refund_requested": "Refund Requested";
366
+ "order_package_status.refunded": "Refunded";
367
+ "order_package_status.return_delivered": "Return Delivered";
368
+ "order_package_status.return_in_transit": "Return Shipped";
369
+ "order_package_status.return_parcel_waiting": "Drop Off the Return";
370
+ "order_package_status.return_rejected": "Return Rejected";
371
+ "order_package_status.unable_to_deliver": "Unable To Deliver";
372
+ "order_package_status.unfulfilled": "Unfulfilled";
373
+ "payment_method.app_payment": "App Payment";
374
+ "payment_method.bank_redirect": "Bank Redirect";
375
+ "payment_method.buy_online_pay_at_store": "Buy Online Pay At Store";
376
+ "payment_method.cash": "Cash";
377
+ "payment_method.cash_on_delivery": "Cash On Delivery";
378
+ "payment_method.credit_card": "Credit Card";
379
+ "payment_method.credit_card_on_delivery": "Credit Card On Delivery";
380
+ "payment_method.direct_debit": "Direct Debit";
381
+ "payment_method.gift_card": "Gift Card";
382
+ "payment_method.interest": "Interest";
383
+ "payment_method.money_order": "Money Order";
384
+ "payment_method.other": "Other";
385
+ "payment_method.pay_later": "Pay Later";
386
+ "payment_method.slice_it": "Slice It";
387
+ "payment_method.wallet": "Wallet";
388
+ "placeholder.comment": "Enter your comment";
389
+ "placeholder.comment_star": "Enter your comment star";
390
+ "placeholder.comment_title": "Enter your comment title";
391
+ "placeholder.coupon_code": "Enter your coupon code";
392
+ "placeholder.email": "Enter your email";
393
+ "placeholder.first_name": "Enter your first name";
394
+ "placeholder.last_name": "Enter your last name";
395
+ "placeholder.message": "Enter your message";
396
+ "placeholder.order_number": "Enter your order number";
397
+ "placeholder.password": "Enter your password";
398
+ "placeholder.password_again": "Enter your password again";
399
+ "placeholder.phone": "Enter your phone number";
400
+ "sort_type.a_z": "A-Z";
401
+ "sort_type.average_rating": "Average Rating";
402
+ "sort_type.decreasing_discount": "Decreasing Discount";
403
+ "sort_type.decreasing_price": "Decreasing Price";
404
+ "sort_type.default": "Default";
405
+ "sort_type.featured": "Featured";
406
+ "sort_type.first_added": "First Added";
407
+ "sort_type.increasing_discount": "Increasing Discount";
408
+ "sort_type.increasing_price": "Increasing Price";
409
+ "sort_type.last_added": "Last Added";
410
+ "sort_type.review_count": "Review Count";
411
+ "sort_type.sale_count": "Sale Count";
412
+ "sort_type.z_a": "Z-A";
413
+ "validation.email": "Invalid email!";
414
+ "validation.equals": "Fields must be equal!";
415
+ "validation.integer": "The entered value must be an integer!";
416
+ "validation.max": "The entered value must be less than {{max}} characters!";
417
+ "validation.max_integer": "The entered value cannot be greater than {{max}}!";
418
+ "validation.min": "The entered value must be greater than {{min}} characters!";
419
+ "validation.min_integer": "The entered value cannot be less than {{min}}!";
420
+ "validation.phone": "Invalid phone number!";
421
+ "validation.regex": "The entered value is not valid!";
422
+ "validation.required": "Required field!";
423
+ };