@ikas/storefront 5.0.63 → 5.0.65
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.
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/facebookPixel.d.ts +2 -0
- package/build/analytics/facebookPixel.js +1 -1
- package/build/analytics/googleAnalytics.d.ts +1 -0
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/components/checkout/components/cart-summary/index.d.ts +7 -0
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/checkbox/index.d.ts +1 -0
- package/build/components/checkout/components/checkbox/index.js +1 -1
- package/build/components/checkout/components/credit-card-form/model.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/iyzico/index.d.ts +8 -0
- package/build/components/checkout/components/iyzico/index.js +1 -0
- package/build/components/checkout/components/step-container/index.d.ts +3 -1
- package/build/components/checkout/components/step-container/index.js +1 -1
- package/build/components/checkout/components/svg/arrow-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/arrow-loyalty.js +1 -0
- package/build/components/checkout/components/svg/arrow-right-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/arrow-right-loyalty.js +1 -0
- package/build/components/checkout/components/svg/gift-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/gift-loyalty.js +1 -0
- package/build/components/checkout/components/svg/info.d.ts +6 -0
- package/build/components/checkout/components/svg/info.js +1 -0
- package/build/components/checkout/components/svg/left-arrow-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/left-arrow-loyalty.js +1 -0
- package/build/components/checkout/components/svg/package-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/package-loyalty.js +1 -0
- package/build/components/checkout/components/svg/percentage-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/percentage-loyalty.js +1 -0
- package/build/components/checkout/components/svg/star-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/star-loyalty.js +1 -0
- package/build/components/checkout/index.d.ts +1 -0
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +18 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/style.module.scss.js +1 -1
- package/build/components/page/widgets/loyaltyWidget.js +1 -1
- package/build/components/pay-with-ikas/index.js +1 -1
- package/build/models/data/order/refund/settings/index.d.ts +1 -0
- package/build/models/data/order/refund/settings/index.js +1 -1
- package/build/models/data/product/index.d.ts +1 -0
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/theme-json/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +7 -2
- package/build/models/ui/product-list/index.js +1 -1
- package/build/store/checkout/index.d.ts +2 -1
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/index.js +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as r}from'./../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import{IkasBrand as s}from"../models/data/brand/index.js";import"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import{IkasCart as i}from"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import{IkasCategory as a}from"../models/data/category/index.js";import{IkasCheckout as n}from"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/order-transaction-with-prices/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import{IkasProduct as c}from"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import{IkasStorefrontPopup as d}from"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{FacebookPixel as m}from"./facebookPixel.js";import{GoogleTagManager as u}from"./googleTagManager.js";import{IkasEventType as l}from"./events.js";import p from"lodash/cloneDeep";import{tryForEach as b}from"../utils/helper.js";import f from"./ikasV3.js";import{GoogleAnalytics as h}from"./googleAnalytics.js";import{TiktokPixel as g}from"./tiktokPixel.js";import{IkasBaseStore as j}from"../store/base.js";import"../store/customer/index.js";import"../store/cart/index.js";var v=function(){function v(){o(this)}return v.getCustomerInfo=function(){return t(this,void 0,void 0,(function(){var t,o;return e(this,(function(e){switch(e.label){case 0:return[4,(t=j.getInstance()).customerStore.waitUntilInitialized()];case 1:return e.sent(),(o=t.customerStore.customer)?[2,r(r({},o.basicInfo),{consentGranted:t.customerStore.customerConsentGranted})]:[2,null]}}))}))},v.pageView=function(r){return t(this,void 0,void 0,(function(){var t,o,s,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,f.checkJourneyId()];case 1:return e.sent(),t=window.location.href,[4,v.getCustomerInfo()];case 2:return o=e.sent(),s=Date.now().toString(),u.pageView(t),m.pageView(t,s),[4,f.pageView(r,s)];case 3:return e.sent(),g.pageView(t),b(v.subscribers,(function(e){e.callback({type:l.PAGE_VIEW,data:{url:t,pageType:r,customer:o}})})),[3,5];case 4:return i=e.sent(),console.error(i),[3,5];case 5:return[2]}}))}))},v.productView=function(r){return t(this,void 0,void 0,(function(){var t,o,s;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=Date.now().toString(),m.productView(r,t),u.productView(r),[4,f.productView(r,t)];case 1:return e.sent(),h.productView(r),g.productView(r),v.subscribers.length&&(o=new c(p(r)),b(v.subscribers,(function(t){t.callback({type:l.PRODUCT_VIEW,data:{productDetail:o}})}))),[3,3];case 2:return s=e.sent(),console.error(s),[3,3];case 3:return[2]}}))}))},v.addToCart=function(t,e,r,o,s){try{if(m.addToCart(t,e,r),u.addToCart(t,e,s),f.addToCart(t,e,o,r),h.addToCart(t,e),g.addToCart(t,e),v.subscribers.length){var a=p(t),n=new i(p(o));b(v.subscribers,(function(t){t.callback({type:l.ADD_TO_CART,data:{item:a,quantity:e,cart:n}})}))}}catch(t){console.error(t)}},v.removeFromCart=function(t,e,r){try{if(u.removeFromCart(t,e),h.removeFromCart(t,e),v.subscribers.length){var o=p(t),s=new i(p(r));b(v.subscribers,(function(t){t.callback({type:l.REMOVE_FROM_CART,data:{item:o,quantity:e,cart:s}})}))}}catch(t){console.error(t)}},v.beginCheckout=function(t){try{var e=localStorage.getItem("gtmBeginCheckout");if(e&&t.id===e)return;localStorage.setItem("gtmBeginCheckout",t.id);var r=Date.now().toString();if(m.beginCheckout(t,r),u.beginCheckout(t),f.beginCheckout(t,r),h.beginCheckout(t),g.beginCheckout(t),v.subscribers.length){var o=new n(p(t));b(v.subscribers,(function(t){t.callback({type:l.BEGIN_CHECKOUT,data:{checkout:o}})}))}}catch(t){console.error(t)}},v.purchase=function(t,e){try{if(localStorage.removeItem("gtmBeginCheckout"),m.purchase(t,e.id||""),u.purchase(t,t.orderNumber||""),f.orderSuccess(t,e.id||""),h.purchase(t,t.orderNumber||""),g.purchase(t),v.subscribers.length){var r=new n(p(t)),o=p(e);b(v.subscribers,(function(t){t.callback({type:l.COMPLETE_CHECKOUT,data:{checkout:r,transaction:o}})}))}}catch(t){console.error(t)}},v.checkoutStep=function(t,e,r){try{if(u.checkoutStep(t,e,r),f.checkoutStep(t,e),h.checkoutStep(t,e,r),v.subscribers.length){var o=new n(p(t));b(v.subscribers,(function(t){t.callback({type:l.CHECKOUT_STEP,data:{checkout:o,step:e}})}))}}catch(t){console.error(t)}},v.disableHTML=function(){try{u.disableHTML()}catch(t){console.error(t)}},v.addToWishlist=function(t,e){try{var r=Date.now().toString();m.addToWishlist(t,r),g.addToWishlist(t),f.addToWishlist(t,r),v.subscribers.length&&b(v.subscribers,(function(r){r.callback({type:e?l.REMOVE_FROM_WISHLIST:l.ADD_TO_WISHLIST,data:{productId:t}})}))}catch(t){console.error(t)}},v.search=function(t,e){try{var r=Date.now().toString();m.search(t,r),u.search(t),g.search(t),h.search(t),f.search(t,r,e),v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.SEARCH,data:{searchKeyword:t}})}))}catch(t){console.error(t)}},v.completeRegistration=function(t,e){try{var o=Date.now().toString();e||(m.completeRegistration(o),u.completeRegistration(t),g.completeRegistration()),f.customerRegister(o),v.subscribers.length&&b(v.subscribers,(function(o){o.callback({type:l.CUSTOMER_REGISTER,data:r({email:t.email,firstName:t.firstName,lastName:t.lastName,notificationsAccepted:t.subscriptionStatus},e?{attributes:t.attributes}:{})})}))}catch(t){console.error(t)}},v.createEmailSubscripition=function(t){try{v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.EMAIL_SUBSCRIPTION,data:{email:t}})}))}catch(t){console.error(t)}},v.customerLogin=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,v.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(u.customerLogin(t),[4,f.customerLogin()]):[2];case 2:return e.sent(),v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.CUSTOMER_LOGIN,data:{customer:t}})})),[3,4];case 3:return r=e.sent(),console.error(r),[3,4];case 4:return[2]}}))}))},v.customerLogout=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){try{u.customerLogout(),v.subscribers.length&&b(v.subscribers,(function(t){t.callback({type:l.CUSTOMER_LOGOUT,data:{}})}))}catch(t){console.error(t)}return[2]}))}))},v.customerVisit=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,v.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(u.customerVisit(t),[4,f.customerVisit()]):[2];case 2:return e.sent(),v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.CUSTOMER_VISIT,data:{customer:t}})})),[3,4];case 3:return r=e.sent(),console.error(r),[3,4];case 4:return[2]}}))}))},v.viewCart=function(t){try{if(t){var e=Date.now().toString();if(m.viewCart(t,e),f.viewCart(t,e),h.viewCart(t),u.viewCart(t),v.subscribers.length){var r=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.VIEW_CART,data:{cart:r}})}))}}}catch(t){console.error(t)}},v.viewCategory=function(t,e){try{var r=Date.now().toString();if(m.viewCategory(t,r),u.viewCategory(e,t),f.viewCategory(e,t,r),g.viewCategory(e),v.subscribers.length){var o=new a(p(e));b(v.subscribers,(function(e){e.callback({type:l.VIEW_CATEGORY,data:{categoryPath:t,category:o}})}))}}catch(t){console.error(t)}},v.viewBrand=function(t){try{if(f.viewBrand(t),v.subscribers.length){var e=new s(p(t));b(v.subscribers,(function(t){t.callback({type:l.VIEW_BRAND,data:{brand:e}})}))}}catch(t){console.error(t)}},v.viewStorefrontPopup=function(t){try{if(f.viewPopup(t.id),v.subscribers.length){var e=new d(p(t));b(v.subscribers,(function(t){t.callback({type:l.POPUP_VIEW,data:{popup:e}})}))}}catch(t){console.error(t)}},v.viewSearchResults=function(t,e){try{if(v.subscribers.length){var r=p(e).map((function(t){return new c(t)}));b(v.subscribers,(function(e){e.callback({type:l.VIEW_SEARCH_RESULTS,data:{searchKeyword:t,productDetails:r}})}))}}catch(t){console.error(t)}},v.viewListing=function(t){try{if(v.subscribers.length){var e=p(t).map((function(t){return new c(t)}));b(v.subscribers,(function(t){t.callback({type:l.VIEW_LISTING,data:{productDetails:e}})}))}}catch(t){console.error(t)}},v.contactForm=function(t){try{var e=Date.now().toString();if(m.contactForm(e),g.contactForm(),f.contactForm(e),v.subscribers.length){var r=p(t);b(v.subscribers,(function(t){t.callback({type:l.CONTACT_FORM,data:{form:r}})}))}}catch(t){console.error(t)}},v.addCouponCode=function(t){try{if(t&&v.subscribers.length){var e=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.ADD_COUPON_CODE,data:{cart:e}})}))}}catch(t){console.error(t)}},v.removeCouponCode=function(t){try{if(t&&v.subscribers.length){var e=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.REMOVE_COUPON_CODE,data:{cart:e}})}))}}catch(t){console.error(t)}},v.removeLoyaltyPoints=function(t){try{if(t&&v.subscribers.length){var e=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.REMOVE_LOYALTY_POINTS,data:{cart:e}})}))}}catch(t){console.error(t)}},v.subscribers=[],v}();export{v as Analytics};
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as r}from'./../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import{IkasBrand as s}from"../models/data/brand/index.js";import"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import{IkasCart as i}from"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import{IkasCategory as a}from"../models/data/category/index.js";import{IkasCheckout as n}from"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/order-transaction-with-prices/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import{IkasProduct as c}from"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import{IkasStorefrontPopup as d}from"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{FacebookPixel as m}from"./facebookPixel.js";import{GoogleTagManager as u}from"./googleTagManager.js";import{IkasEventType as l}from"./events.js";import p from"lodash/cloneDeep";import{tryForEach as b}from"../utils/helper.js";import f from"./ikasV3.js";import{GoogleAnalytics as h}from"./googleAnalytics.js";import{TiktokPixel as g}from"./tiktokPixel.js";import{IkasBaseStore as j}from"../store/base.js";import"../store/customer/index.js";import"../store/cart/index.js";var v=function(){function v(){o(this)}return v.getCustomerInfo=function(){return t(this,void 0,void 0,(function(){var t,o;return e(this,(function(e){switch(e.label){case 0:return[4,(t=j.getInstance()).customerStore.waitUntilInitialized()];case 1:return e.sent(),(o=t.customerStore.customer)?[2,r(r({},o.basicInfo),{consentGranted:t.customerStore.customerConsentGranted})]:[2,null]}}))}))},v.pageView=function(r){return t(this,void 0,void 0,(function(){var t,o,s,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,f.checkJourneyId()];case 1:return e.sent(),t=window.location.href,[4,v.getCustomerInfo()];case 2:return o=e.sent(),s=Date.now().toString(),u.pageView(t),m.pageView(t,s),[4,f.pageView(r,s)];case 3:return e.sent(),g.pageView(t),b(v.subscribers,(function(e){e.callback({type:l.PAGE_VIEW,data:{url:t,pageType:r,customer:o}})})),[3,5];case 4:return i=e.sent(),console.error(i),[3,5];case 5:return[2]}}))}))},v.productView=function(r){return t(this,void 0,void 0,(function(){var t,o,s;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=Date.now().toString(),m.productView(r,t),u.productView(r),[4,f.productView(r,t)];case 1:return e.sent(),h.productView(r),g.productView(r),v.subscribers.length&&(o=new c(p(r)),b(v.subscribers,(function(t){t.callback({type:l.PRODUCT_VIEW,data:{productDetail:o}})}))),[3,3];case 2:return s=e.sent(),console.error(s),[3,3];case 3:return[2]}}))}))},v.addToCart=function(t,e,r,o,s){try{if(m.addToCart(t,e,r),u.addToCart(t,e,s),f.addToCart(t,e,o,r),h.addToCart(t,e),g.addToCart(t,e),v.subscribers.length){var a=p(t),n=new i(p(o));b(v.subscribers,(function(t){t.callback({type:l.ADD_TO_CART,data:{item:a,quantity:e,cart:n}})}))}}catch(t){console.error(t)}},v.removeFromCart=function(t,e,r){try{if(u.removeFromCart(t,e),h.removeFromCart(t,e),v.subscribers.length){var o=p(t),s=new i(p(r));b(v.subscribers,(function(t){t.callback({type:l.REMOVE_FROM_CART,data:{item:o,quantity:e,cart:s}})}))}}catch(t){console.error(t)}},v.beginCheckout=function(t){try{var e=localStorage.getItem("gtmBeginCheckout");if(e&&t.id===e)return;localStorage.setItem("gtmBeginCheckout",t.id);var r=Date.now().toString();if(m.beginCheckout(t,r),u.beginCheckout(t),f.beginCheckout(t,r),h.beginCheckout(t),g.beginCheckout(t),v.subscribers.length){var o=new n(p(t));b(v.subscribers,(function(t){t.callback({type:l.BEGIN_CHECKOUT,data:{checkout:o}})}))}}catch(t){console.error(t)}},v.purchase=function(t,e){try{if(localStorage.removeItem("gtmBeginCheckout"),m.purchase(t,e.id||""),u.purchase(t,t.orderNumber||""),f.orderSuccess(t,e.id||""),h.purchase(t,t.orderNumber||""),g.purchase(t),v.subscribers.length){var r=new n(p(t)),o=p(e);b(v.subscribers,(function(t){t.callback({type:l.COMPLETE_CHECKOUT,data:{checkout:r,transaction:o}})}))}}catch(t){console.error(t)}},v.checkoutStep=function(t,e,r){try{var o=Date.now().toString();if(u.checkoutStep(t,e,r),f.checkoutStep(t,e),h.checkoutStep(t,e,r),m.checkoutStep(t,e,o),v.subscribers.length){var s=new n(p(t));b(v.subscribers,(function(t){t.callback({type:l.CHECKOUT_STEP,data:{checkout:s,step:e}})}))}}catch(t){console.error(t)}},v.disableHTML=function(){try{u.disableHTML()}catch(t){console.error(t)}},v.addToWishlist=function(t,e){try{var r=Date.now().toString();m.addToWishlist(t,r),g.addToWishlist(t),f.addToWishlist(t,r),h.addToWishlist(t),v.subscribers.length&&b(v.subscribers,(function(r){r.callback({type:e?l.REMOVE_FROM_WISHLIST:l.ADD_TO_WISHLIST,data:{productId:t}})}))}catch(t){console.error(t)}},v.search=function(t,e){try{var r=Date.now().toString();m.search(t,r),u.search(t),g.search(t),h.search(t),f.search(t,r,e),v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.SEARCH,data:{searchKeyword:t}})}))}catch(t){console.error(t)}},v.completeRegistration=function(t,e){try{var o=Date.now().toString();e||(m.completeRegistration(o),u.completeRegistration(t),g.completeRegistration()),f.customerRegister(o),v.subscribers.length&&b(v.subscribers,(function(o){o.callback({type:l.CUSTOMER_REGISTER,data:r({email:t.email,firstName:t.firstName,lastName:t.lastName,notificationsAccepted:t.subscriptionStatus},e?{attributes:t.attributes}:{})})}))}catch(t){console.error(t)}},v.createEmailSubscripition=function(t){try{v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.EMAIL_SUBSCRIPTION,data:{email:t}})}))}catch(t){console.error(t)}},v.customerLogin=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,v.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(u.customerLogin(t),[4,f.customerLogin()]):[2];case 2:return e.sent(),v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.CUSTOMER_LOGIN,data:{customer:t}})})),[3,4];case 3:return r=e.sent(),console.error(r),[3,4];case 4:return[2]}}))}))},v.customerLogout=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){try{u.customerLogout(),v.subscribers.length&&b(v.subscribers,(function(t){t.callback({type:l.CUSTOMER_LOGOUT,data:{}})}))}catch(t){console.error(t)}return[2]}))}))},v.customerVisit=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,v.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(u.customerVisit(t),[4,f.customerVisit()]):[2];case 2:return e.sent(),v.subscribers.length&&b(v.subscribers,(function(e){e.callback({type:l.CUSTOMER_VISIT,data:{customer:t}})})),[3,4];case 3:return r=e.sent(),console.error(r),[3,4];case 4:return[2]}}))}))},v.viewCart=function(t){try{if(t){var e=Date.now().toString();if(m.viewCart(t,e),f.viewCart(t,e),h.viewCart(t),u.viewCart(t),v.subscribers.length){var r=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.VIEW_CART,data:{cart:r}})}))}}}catch(t){console.error(t)}},v.viewCategory=function(t,e){try{var r=Date.now().toString();if(m.viewCategory(t,r),u.viewCategory(e,t),f.viewCategory(e,t,r),g.viewCategory(e),v.subscribers.length){var o=new a(p(e));b(v.subscribers,(function(e){e.callback({type:l.VIEW_CATEGORY,data:{categoryPath:t,category:o}})}))}}catch(t){console.error(t)}},v.viewBrand=function(t){try{if(f.viewBrand(t),v.subscribers.length){var e=new s(p(t));b(v.subscribers,(function(t){t.callback({type:l.VIEW_BRAND,data:{brand:e}})}))}}catch(t){console.error(t)}},v.viewStorefrontPopup=function(t){try{if(f.viewPopup(t.id),v.subscribers.length){var e=new d(p(t));b(v.subscribers,(function(t){t.callback({type:l.POPUP_VIEW,data:{popup:e}})}))}}catch(t){console.error(t)}},v.viewSearchResults=function(t,e){try{if(v.subscribers.length){var r=p(e).map((function(t){return new c(t)}));b(v.subscribers,(function(e){e.callback({type:l.VIEW_SEARCH_RESULTS,data:{searchKeyword:t,productDetails:r}})}))}}catch(t){console.error(t)}},v.viewListing=function(t){try{if(v.subscribers.length){var e=p(t).map((function(t){return new c(t)}));b(v.subscribers,(function(t){t.callback({type:l.VIEW_LISTING,data:{productDetails:e}})}))}}catch(t){console.error(t)}},v.contactForm=function(t){try{var e=Date.now().toString();if(m.contactForm(e),g.contactForm(),f.contactForm(e),v.subscribers.length){var r=p(t);b(v.subscribers,(function(t){t.callback({type:l.CONTACT_FORM,data:{form:r}})}))}}catch(t){console.error(t)}},v.addCouponCode=function(t){try{if(t&&v.subscribers.length){var e=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.ADD_COUPON_CODE,data:{cart:e}})}))}}catch(t){console.error(t)}},v.removeCouponCode=function(t){try{if(t&&v.subscribers.length){var e=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.REMOVE_COUPON_CODE,data:{cart:e}})}))}}catch(t){console.error(t)}},v.removeLoyaltyPoints=function(t){try{if(t&&v.subscribers.length){var e=new i(p(t));b(v.subscribers,(function(t){t.callback({type:l.REMOVE_LOYALTY_POINTS,data:{cart:e}})}))}}catch(t){console.error(t)}},v.subscribers=[],v}();export{v as Analytics};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IkasCheckout, IkasProduct, IkasOrderLineItem } from "../models";
|
|
2
2
|
import { IkasCart } from "../models/data/cart";
|
|
3
|
+
import { CheckoutStep } from "../components/checkout/model";
|
|
3
4
|
export declare class FacebookPixel {
|
|
4
5
|
constructor();
|
|
5
6
|
private static get fbpId();
|
|
@@ -8,6 +9,7 @@ export declare class FacebookPixel {
|
|
|
8
9
|
static addToCart(item: IkasOrderLineItem, quantity: number, eventId: string): void;
|
|
9
10
|
static beginCheckout(checkout: IkasCheckout, eventId: string): void;
|
|
10
11
|
static purchase(checkout: IkasCheckout, eventId: string): void;
|
|
12
|
+
static checkoutStep(checkout: IkasCheckout, step: CheckoutStep, eventId: string): void;
|
|
11
13
|
static addToWishlist(id: string, eventId: string): void;
|
|
12
14
|
static search(searchKeyword: string, eventId: string): void;
|
|
13
15
|
static completeRegistration(eventId: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasStorefrontConfig as
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasStorefrontConfig as e}from"@ikas/storefront-config";import{CheckoutStep as n}from"../components/checkout/model.js";var r="undefined"==typeof window,o=function(){function o(){t(this)}return Object.defineProperty(o,"fbpId",{get:function(){return e.getFbpId()},enumerable:!1,configurable:!0}),o.pageView=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","PageView",{},{eventID:e}))}catch(t){console.error(t)}},o.productView=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","ViewContent",(n=t,{content_name:n.name,content_category:n.categories.length>0?n.categories[0].path.map((function(t){return t.name})).join(" > "):"",content_ids:[n.selectedVariant.id],content_type:"product",value:n.selectedVariant.price.finalPrice,currency:""===n.selectedVariant.price.currency?"TRY":n.selectedVariant.price.currency}),{eventID:e}))}catch(t){console.error(t)}var n},o.addToCart=function(t,e,n){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","AddToCart",c(t,e),{eventID:n}))}catch(t){console.error(t)}},o.beginCheckout=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","InitiateCheckout",i(t),{eventID:e}))}catch(t){console.error(t)}},o.purchase=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","Purchase",i(t),{eventID:e}))}catch(t){console.error(t)}},o.checkoutStep=function(t,e,o){var i,a,d;if(e===n.SHIPPING&&1!==(null===(i=t.availableShippingMethods)||void 0===i?void 0:i.length)||1===(null===(a=t.availableShippingMethods)||void 0===a?void 0:a.length)&&e===n.PAYMENT)try{!r&&this.fbpId&&window.fbq&&window.fbq("track","AddPaymentInfo",{currency:t.currencyCode,value:t.totalFinalPrice,shipping_tier:"Ground",coupon:t.couponCode,items:t.items.map((function(t){return c(t,t.quantity)}))},{eventID:o})}catch(t){console.error(t)}if(e===n.PAYMENT)try{!r&&this.fbpId&&window.fbq&&window.fbq("track","AddPaymentInfo",{currency:t.currencyCode,value:t.totalFinalPrice,coupon:t.couponCode,payment_type:null===(d=t.selectedPaymentGateway)||void 0===d?void 0:d.paymentMethodType,items:t.items.map((function(t){return c(t,t.quantity)}))},{eventID:o})}catch(t){console.error(t)}},o.addToWishlist=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","AddToWishlist",{content_ids:[t]},{eventID:e}))}catch(t){console.error(t)}},o.search=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","Search",{search_string:t},{eventID:e}))}catch(t){console.error(t)}},o.completeRegistration=function(t){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","CompleteRegistration",{status:!0,value:0,currency:"TRY"},{eventID:t}))}catch(t){console.error(t)}},o.viewCart=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","ViewCart",function(t){var e=[],n=[];return t.items.map((function(t){e.push(t.variant.id||""),n.push({id:t.variant.id,quantity:t.quantity})})),{contents:n,content_type:"product",content_ids:e,currency:t.items[0].currencyCode,value:t.totalPrice,num_items:t.items.length}}(t),{eventID:e}))}catch(t){console.error(t)}},o.viewCategory=function(t,e){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","ViewCategory",{content_name:t},{eventID:e}))}catch(t){console.error(t)}},o.contactForm=function(t){try{return void(!r&&this.fbpId&&window.fbq&&window.fbq("track","ContactForm",{},{eventID:t}))}catch(t){console.error(t)}},o}();function i(t){var e=[],n=[];return t.items.map((function(t){e.push(t.variant.id||""),n.push({id:t.variant.id,quantity:t.quantity})})),{contents:n,content_category:"",content_type:"product",content_ids:e,currency:t.items[0].currencyCode,value:t.totalFinalPrice,num_items:t.items.length}}function c(t,e){var n,r,o=[];(null===(n=t.variant.categories)||void 0===n?void 0:n.length)&&(null===(r=t.variant.categories[0].categoryPath)||void 0===r||r.map((function(t){return o.push(t.name)}))),t.variant.categories&&t.variant.categories.length>0&&o.push(t.variant.categories[0].name);var i=o.length>0?o.join(" > "):"";return{content_name:t.variant.name,content_category:i,content_ids:[t.variant.id],content_type:"product",value:t.finalPrice,currency:t.currencyCode}}export{o as FacebookPixel};
|
|
@@ -10,5 +10,6 @@ export declare class GoogleAnalytics {
|
|
|
10
10
|
static beginCheckout(checkout: IkasCheckout): void;
|
|
11
11
|
static purchase(checkout: IkasCheckout, orderId: string): void;
|
|
12
12
|
static checkoutStep(checkout: IkasCheckout, step: CheckoutStep, checkoutSettings?: IkasCheckoutSettings): void;
|
|
13
|
+
static addToWishlist(id: string): void;
|
|
13
14
|
static search(searchKeyword: string): void;
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as e}from"mobx";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/order-transaction-with-prices/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import{IkasProduct as t}from"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{CheckoutStep as i}from"../components/checkout/model.js";var o="undefined"==typeof window,r=function(){function r(){e(this)}return r.productView=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_item",{currency:""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency,value:e.selectedVariant.price.finalPrice,items:[a(e)]}))}catch(e){console.error(e)}},r.addToCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","add_to_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.finalPrice*i:e.finalPrice?e.finalPrice*i:null,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.removeFromCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","remove_from_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.price.finalPrice:e.finalPrice,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.viewCart=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_cart",{currency:e.currencyCode,value:e.totalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.beginCheckout=function(e){try{return void(!o&&window.gtag&&window.gtag("event","begin_checkout",{currency:e.currencyCode,value:e.totalFinalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.purchase=function(e,t){try{return void(!o&&window.gtag&&window.gtag("event","purchase",{transaction_id:t,affiliation:window.location.hostname,value:e.totalFinalPrice,tax:e.totalTax,shipping:e.shippingTotal,currency:e.currencyCode,coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.checkoutStep=function(e,t,r){var a,n,s;if(t===i.SHIPPING&&1!==(null===(a=e.availableShippingMethods)||void 0===a?void 0:a.length)||1===(null===(n=e.availableShippingMethods)||void 0===n?void 0:n.length)&&t===i.PAYMENT)try{!o&&window.gtag&&window.gtag("event","add_shipping_info",{currency:e.currencyCode,value:e.totalFinalPrice,shipping_tier:"Ground",coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))})}catch(e){console.error(e)}if(t===i.PAYMENT)try{!o&&window.gtag&&window.gtag("event","add_payment_info",{currency:e.currencyCode,value:e.totalFinalPrice,coupon:e.couponCode,payment_type:null===(s=e.selectedPaymentGateway)||void 0===s?void 0:s.paymentMethodType,items:e.items.map((function(e){return d(e,e.quantity)}))})}catch(e){console.error(e)}},r.search=function(e){try{return void(!o&&window.gtag&&window.gtag("event","search",{search_term:e}))}catch(e){console.error(e)}},r}();function a(e,t){var i;void 0===t&&(t=1);var o=[],r=e.categories;return r&&r.length&&(r[0].categoryPath&&r[0].categoryPath.map((function(e){return o.push(e)})),o.push(r[0].name)),{item_name:e.name,item_id:e.selectedVariant.id,price:e.selectedVariant.price.finalPrice,item_brand:(null===(i=e.brand)||void 0===i?void 0:i.name)||"",item_category:o.length?o[0]:"",item_category2:o.length>1?o[1]:"",item_category3:o.length>2?o[2]:"",item_category4:o.length>3?o.slice(3,o.length).join(" > "):"",item_variant:e.selectedVariant.variantValues.map((function(e){return e.name})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}function d(e,t){var i,o;void 0===t&&(t=1);var r=[],a=e.variant.categories;return a&&a.length&&(a[0].categoryPath&&a[0].categoryPath.map((function(e){return r.push(e.name)})),r.push(a[0].name)),{item_name:e.variant.name,item_id:e.variant.id,price:e.finalPrice||"",item_brand:(null===(i=e.variant.brand)||void 0===i?void 0:i.name)||"",item_category:r.length?r[0]:"",item_category2:r.length>1?r[1]:"",item_category3:r.length>2?r[2]:"",item_category4:r.length>3?r.slice(3,r.length).join(" > "):"",item_variant:null===(o=e.variant.variantValues)||void 0===o?void 0:o.map((function(e){return e.variantValueName})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}export{r as GoogleAnalytics};
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/order-transaction-with-prices/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import{IkasProduct as t}from"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{CheckoutStep as i}from"../components/checkout/model.js";var o="undefined"==typeof window,r=function(){function r(){e(this)}return r.productView=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_item",{currency:""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency,value:e.selectedVariant.price.finalPrice,items:[a(e)]}))}catch(e){console.error(e)}},r.addToCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","add_to_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.finalPrice*i:e.finalPrice?e.finalPrice*i:null,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.removeFromCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","remove_from_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.price.finalPrice:e.finalPrice,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.viewCart=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_cart",{currency:e.currencyCode,value:e.totalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.beginCheckout=function(e){try{return void(!o&&window.gtag&&window.gtag("event","begin_checkout",{currency:e.currencyCode,value:e.totalFinalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.purchase=function(e,t){try{return void(!o&&window.gtag&&window.gtag("event","purchase",{transaction_id:t,affiliation:window.location.hostname,value:e.totalFinalPrice,tax:e.totalTax,shipping:e.shippingTotal,currency:e.currencyCode,coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.checkoutStep=function(e,t,r){var a,n,s;if(t===i.SHIPPING&&1!==(null===(a=e.availableShippingMethods)||void 0===a?void 0:a.length)||1===(null===(n=e.availableShippingMethods)||void 0===n?void 0:n.length)&&t===i.PAYMENT)try{!o&&window.gtag&&window.gtag("event","add_shipping_info",{currency:e.currencyCode,value:e.totalFinalPrice,shipping_tier:"Ground",coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))})}catch(e){console.error(e)}if(t===i.PAYMENT)try{!o&&window.gtag&&window.gtag("event","add_payment_info",{currency:e.currencyCode,value:e.totalFinalPrice,coupon:e.couponCode,payment_type:null===(s=e.selectedPaymentGateway)||void 0===s?void 0:s.paymentMethodType,items:e.items.map((function(e){return d(e,e.quantity)}))})}catch(e){console.error(e)}},r.addToWishlist=function(e){try{return void(!o&&window.gtag&&window.gtag("event","add_to_wishlist",{currency:"",value:0,items:[{item_id:e,item_name:""}]}))}catch(e){console.error(e)}},r.search=function(e){try{return void(!o&&window.gtag&&window.gtag("event","search",{search_term:e}))}catch(e){console.error(e)}},r}();function a(e,t){var i;void 0===t&&(t=1);var o=[],r=e.categories;return r&&r.length&&(r[0].categoryPath&&r[0].categoryPath.map((function(e){return o.push(e)})),o.push(r[0].name)),{item_name:e.name,item_id:e.selectedVariant.id,price:e.selectedVariant.price.finalPrice,item_brand:(null===(i=e.brand)||void 0===i?void 0:i.name)||"",item_category:o.length?o[0]:"",item_category2:o.length>1?o[1]:"",item_category3:o.length>2?o[2]:"",item_category4:o.length>3?o.slice(3,o.length).join(" > "):"",item_variant:e.selectedVariant.variantValues.map((function(e){return e.name})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}function d(e,t){var i,o;void 0===t&&(t=1);var r=[],a=e.variant.categories;return a&&a.length&&(a[0].categoryPath&&a[0].categoryPath.map((function(e){return r.push(e.name)})),r.push(a[0].name)),{item_name:e.variant.name,item_id:e.variant.id,price:e.finalPrice||"",item_brand:(null===(i=e.variant.brand)||void 0===i?void 0:i.name)||"",item_category:r.length?r[0]:"",item_category2:r.length>1?r[1]:"",item_category3:r.length>2?r[2]:"",item_category4:r.length>3?r.slice(3,r.length).join(" > "):"",item_variant:null===(o=e.variant.variantValues)||void 0===o?void 0:o.map((function(e){return e.variantValueName})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}export{r as GoogleAnalytics};
|
|
@@ -24,4 +24,11 @@ declare type CouponProps = {
|
|
|
24
24
|
showOnlyMobile?: boolean;
|
|
25
25
|
} & CommonProps;
|
|
26
26
|
export declare const Coupon: React.FC<CouponProps>;
|
|
27
|
+
declare type LoyaltyPointsLineProps = {
|
|
28
|
+
vm: CheckoutViewModel;
|
|
29
|
+
isVisibleLoyaltyPoints: boolean;
|
|
30
|
+
setIsVisibleLoyaltyPoints: (value: boolean) => void;
|
|
31
|
+
isMobile?: boolean;
|
|
32
|
+
} & CommonProps;
|
|
33
|
+
export declare const LoyaltyPointsLine: React.FC<LoyaltyPointsLineProps>;
|
|
27
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as n from"react";import{observer as o}from"mobx-react-lite";import a from"lodash/sortBy";import c from"../input-with-button/index.js";import r from"../notification-box/index.js";import{CheckoutStep as l}from"../../model.js";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{formatCurrency as u}from"../../../../utils/currency.js";import{useTranslation as s}from"../../../../utils/i18n.js";import{CartItem as m}from"./cart-item/index.js";import{FormItem as d}from"../form-item/index.js";import{FormItemType as p}from"../form-item/model.js";import C from"../tooltip/index.js";import E from"../svg/arrow-down.js";import h from"../svg/cross.js";import v from"../svg/gift.js";import f from"../../styles/common.module.scss.js";import g from"./style.module.scss.js";import y from"../svg/ikas.js";import{Button as k}from"../button/index.js";import{IkasCampaignCreatedFor as N,IkasGiftCardType as S}from"@ikas/storefront-models";import T from"../../../../hooks/useDimension.js";import b from"../svg/coupon-code-tag.js";import O from"../svg/gift-cart-tag.js";import P from"../svg/store-credit-tag.js";var I;!function(e){e.COUPON_CODE_NOT_EXIST="COUPON_CODE_NOT_EXIST",e.COUPON_CODE_NOT_EXIST_FOR_GUESS="COUPON_CODE_NOT_EXIST_FOR_GUESS",e.COUPON_APPLIED_WITHOUT_DISCOUNT="COUPON_APPLIED_WITHOUT_DISCOUNT"}(I||(I={}));var x=o((function(e){var t,o,a,c,d,p,C=e.vm,h=e.allowExpand,v=e.isSuccessPageSummary,f=C.checkout,k=s().t,N=n.useState(!h),S=N[0],b=N[1],O=n.useState(!1),P=O[0],x=O[1],w=n.useState(null),D=w[0],U=w[1],M=n.useState(0),B=M[0],F=M[1],G=n.useState(null),V=G[0],W=G[1],X=n.useState(!1),H=X[0],q=X[1],z=n.useState(!1),Y=z[0],$=z[1],K=n.useState(!1),Q=K[0],J=K[1];T().isMobile,n.useEffect((function(){h&&(S?V&&F(V.getBoundingClientRect().height):F(0))}),[S,V,h,H,Y,P,Q]);var Z=n.useMemo((function(){switch(D){case I.COUPON_CODE_NOT_EXIST:return k("checkout-page:giftCodeErrorDescription");case I.COUPON_CODE_NOT_EXIST_FOR_GUESS:return k("checkout-page:mustBeSignInToApplyCampaign");case I.COUPON_APPLIED_WITHOUT_DISCOUNT:return k("checkout-page:couponInvalidForCartItems");default:return""}}),[D]),ee=[g.CartSummary,h?g.HideOnDesktop:"",v?g.SuccessPageCartSummary:""].join(" "),te=h?{height:B+"px"}:void 0,ne=[g.ArrowDown,S?g.Rotated:""].join(" ");return f?n.createElement(n.Fragment,null,!!h&&n.createElement(n.Fragment,null,n.createElement("div",{id:"checkout-mobile-summary-header"}),n.createElement("div",{className:g.ExpandHeader,onClick:function(){if(!S){var e=document.getElementById("Checkout"),t=document.getElementById("checkout-mobile-summary-header");e&&t&&e.scrollTo({top:t.offsetTop,behavior:"smooth"})}b(!S)}},n.createElement("div",{className:g.Left},k("checkout-page:summary")),n.createElement("div",{className:g.Price},n.createElement("span",{className:g.PriceText},"".concat(u(C.finalPrice||0,f.currencyCode,f.currencySymbol)," (").concat(f.itemQuantity," ").concat(k("checkout-page:cartItemProduct"),")")),n.createElement("span",{className:ne},n.createElement(E,null))))),n.createElement("div",{className:ee},n.createElement("div",{className:[g.DetailsContainer,v?g.SuccessPageDetailContainer:""].join(" "),style:te},n.createElement("div",{className:g.Details,ref:W},n.createElement("div",{className:g.ItemsContainer},n.createElement("div",null,f.items.map((function(e,t){return n.createElement(m,{key:t,vm:C,cartItem:e,currencyCode:f.currencyCode,onChange:J,isSuccessPageSummary:v})})))),n.createElement("div",{className:g.Divider}),n.createElement("div",{className:g.SubTotalInfo},P&&n.createElement("div",{className:g.NotificationContainer},n.createElement(r,{type:"warning",title:k("checkout-page:giftCodeErrorTitle"),content:Z,onClose:function(){x(!1),U(null)}})),n.createElement(j,{label:k("checkout-page:subtotal"),value:f.formattedTotalPrice,tooltipText:k("checkout-page:subtotalTooltip")}),!!(null===(t=f.shippingLines)||void 0===t?void 0:t.length)&&(C.step===l.SUCCESS?n.createElement(j,{label:k("checkout-page:cartShippingTitle"),value:f.shippingTotal?f.formattedShippingTotal:k("checkout-page:free")}):f.shippingLines.map((function(e,t){return n.createElement(j,{key:t,label:e.paymentMethod?e.title:k("checkout-page:cartShippingTitle"),value:e.finalPrice?u(e.finalPrice,f.currencyCode,f.currencySymbol):k("checkout-page:free")})}))),n.createElement(L,{vm:C}),n.createElement(_,{vm:C}),(C.step===l.SUCCESS&&(!!C.checkout.note||!!C.checkout.appliedCouponCode)||C.step!==l.SUCCESS)&&C.isCouponCodeVisible&&n.createElement("div",{className:g.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),n.createElement(A,{vm:C,isAddingCoupon:Y,setAddingCoupon:$,setCouponError:x,setCouponErrorCode:U}),n.createElement(R,{vm:C,isAddingNote:H,setAddingNote:q}),!!C.installmentExtraPrice&&C.installmentExtraPrice>0&&n.createElement(n.Fragment,null,n.createElement("div",{className:g.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),n.createElement(j,{label:k("checkout-page:cartInterest"),value:u(C.installmentExtraPrice,f.currencyCode,f.currencySymbol)}))),C.isOpenEditOrderWithTransaction&&n.createElement("div",{className:g.SubTotalInfo,style:{}},!!(null===(o=C.openEditOrderTransaction)||void 0===o?void 0:o.chargedAmount)&&n.createElement(j,{label:k("checkout-page:chargedAmount"),value:u((null===(a=C.openEditOrderTransaction)||void 0===a?void 0:a.chargedAmount)||0,f.currencyCode,f.currencySymbol)}),!!(null===(c=C.openEditOrderTransaction)||void 0===c?void 0:c.refundedAmount)&&n.createElement(j,{label:k("checkout-page:refundedAmount"),value:u((null===(d=C.openEditOrderTransaction)||void 0===d?void 0:d.refundedAmount)||0,f.currencyCode,f.currencySymbol)})),n.createElement("div",{className:[g.TotalContainer,v?g.SuccessPageTotalContainer:""].join(" ")},n.createElement("div",{className:g.TitleContainer},n.createElement("div",{className:g.Title},C.isOpenEditOrderWithTransaction?k("checkout-page:totalAmountPayable"):k("checkout-page:total"))),n.createElement("div",null,n.createElement("div",{className:g.TotalPricesContainer},n.createElement("div",{className:g.TotalPrice},u(C.finalPrice||0,f.currencyCode,f.currencySymbol)),!!f.$totalTax&&!!(null===(p=C.customizationProps)||void 0===p?void 0:p.showTax)&&n.createElement("div",{className:[g.TotalTax].join(" ")},k("checkout-page:cartTaxTitle")+" "+f.$formattedTotalTax)))),!v&&!C.isPoweredByHidden&&n.createElement("div",{className:g.PoweredBy},n.createElement("span",null,"powered by"),n.createElement("a",{href:"https://ikas.com"+("tr"===i.getCurrentLocale()?"/tr":""),target:"_blank"},n.createElement(y,null))))))):null})),j=o((function(e){var t=e.label,o=e.value,a=e.tooltipText,c=e.hideMarginBottom;return n.createElement("div",{className:[g.InfoRow,c?g.hideMb:""].join(" ")},n.createElement("div",{className:g.Label},n.createElement("span",null,t),!!a&&n.createElement(C,{text:a,style:{marginLeft:"8px"}})),n.createElement("div",{className:g.Value},o))})),L=o((function(e){var t=e.vm,o=s().t;return t.checkout?n.createElement(n.Fragment,null,a(t.checkout.nonCouponAdjustments||[],"order").filter((function(e){return e.createdFor!==N.LOYALTY_SPEND})).map((function(e,a){return n.createElement("div",{className:g.InfoRow,key:a},n.createElement("div",{className:g.Label},"INTEREST"===e.name?o("checkout-page:cartInterest"):e.name),n.createElement("div",{className:g.Value},n.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",n.createElement("span",null,u(e.amount,t.checkout.currencyCode,t.checkout.currencySymbol))))}))):null})),_=o((function(e){var t,o=e.vm,a=s().t;return o.checkout?n.createElement(n.Fragment,null,null===(t=o.checkout.giftPackageLines)||void 0===t?void 0:t.map((function(e,t){return n.createElement("div",{className:g.InfoRow,key:t},n.createElement("div",{className:g.Label},n.createElement("div",{className:g.GiftLabel},n.createElement(v,{style:{position:"relative",top:"-1px"}}),n.createElement("span",null,a("checkout-page:giftPackage")))),n.createElement("div",{className:g.Value},n.createElement("span",null,u(e.price,o.checkout.currencyCode,o.checkout.currencySymbol))))}))):null})),A=o((function(o){var a=o.vm,r=o.isAddingCoupon,i=o.setAddingCoupon,u=o.setCouponError,m=o.setCouponErrorCode,C=o.isOpenCouponCode,E=o.isMobile,h=o.showOnlyMobile,v=s().t,y=n.useState(""),N=y[0],S=y[1],T=n.useState(!1),b=T[0],O=T[1],P=n.useRef(null);n.useEffect((function(){r&&P.current&&P.current.focus()}),[r]);var I=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return a.checkout.couponCode=N,O(!0),[4,a.onCouponCodeApply(!0)];case 1:return t.sent(),O(!1),S(""),e=a.checkout.giftCardLines&&!!a.checkout.giftCardLines.length,a.couponError?[3,4]:a.checkout.appliedCouponCode||e?(u(!1),m(null),[4,a.reInitPaymentMethod()]):[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:a.checkout.couponCode=null,u(!0),m(a.couponError),t.label=5;case 5:return[2]}}))}))},x=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return O(!0),[4,a.removeGiftCardLine(n)];case 1:return e.sent(),[4,a.reInitPaymentMethod()];case 2:return e.sent(),O(!1),[2]}}))}))},j=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return O(!0),[4,a.removeLoyaltyPointsFromCart(n)];case 1:return e.sent(),[4,a.reInitPaymentMethod()];case 2:return e.sent(),O(!1),[2]}}))}))};a.step,l.SUCCESS;var L=a.step===l.SHIPPING,_=!!a.checkout.appliedCouponCode||!!(a.checkout.giftCardLines&&a.checkout.giftCardLines.length>0)||!!(a.checkout.loyaltyLines&&a.checkout.loyaltyLines.length>0),A=!!a.checkout.appliedCouponCode&&C,R=!r&&a.isCouponCodeVisible&&!a.isCouponCodeRequirementOpen&&a.step!==l.SUCCESS,U=_&&(!C||E);return n.createElement(n.Fragment,null,!!C&&n.createElement(n.Fragment,null,n.createElement("div",{className:[g.CartSummary,g.OpenCouponCodeSummary].join(" ")},n.createElement("div",{className:f.FormSectionTitle},n.createElement("div",{style:{paddingBottom:A?0:6},className:f.Title},v("checkout-page:couponCode"))))),_&&!L&&!a.isCouponCodeRequirementDefult&&n.createElement("div",{className:g.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),n.createElement("div",{className:R?g.InfoRow:""},R&&n.createElement("div",{className:g.ActionTextBtn,onClick:function(){return i(!0)}},v("checkout-page:addCouponCode")),r&&!C&&n.createElement("div",{style:{marginBottom:"10px"}},n.createElement(c,{value:N,placeholder:v("checkout-page:couponCode"),buttonLabel:v("checkout-page:actions.apply"),inputRef:P,onClick:I,isLoading:b,onChange:S})),C&&n.createElement("div",{tabIndex:0,onKeyDown:function(e){"Enter"===e.key&&I()},className:[g.OpenCouponCodeMain,U?g.OpenCouponCodeMainWithMb:""].join(" ")},n.createElement(d,{name:"couponCode",label:v("checkout-page:addCouponCode"),type:p.TEXT,value:N,onChange:S}),n.createElement(k,{style:{width:"33%"},text:v("checkout-page:actions.apply"),isLoading:b,onClick:I}))),U&&n.createElement(n.Fragment,null,!!a.checkout.appliedCouponCode&&n.createElement("div",{className:[g.InfoRow,h?g.InfoRowGiftCardMobile:""].join(" ")},n.createElement(w,{vm:a,onClearCouponCode:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return a.checkout.couponCode=null,O(!0),[4,a.onCouponCodeApply(!1)];case 1:return e.sent(),[4,a.reInitPaymentMethod()];case 2:return e.sent(),O(!1),[2]}}))}))},couponCode:a.checkout.appliedCouponCode})),!!a.checkout.giftCardLines&&!!a.checkout.giftCardLines.length&&a.checkout.giftCardLines.map((function(e){return n.createElement("div",{className:[g.InfoRow,h?g.InfoRowGiftCardMobile:""].join(" ")},n.createElement(w,{vm:a,onClearGiftCode:x,couponCode:e.code,giftCardLine:e}))})),!!a.checkout.loyaltyLines&&!!a.checkout.loyaltyLines.length&&a.checkout.loyaltyLines.map((function(e){return n.createElement("div",{className:[g.InfoRow,h?g.InfoRowGiftCardMobile:""].join(" ")},n.createElement(D,{vm:a,onClearLoyaltyPoints:j,loyaltyPointsLine:e}))}))))})),w=o((function(e){var t=e.vm,o=e.onClearCouponCode,a=e.couponCode,c=e.giftCardLine,r=e.onClearGiftCode,i=t.checkout.couponAdjustment,m=s().t,d=!c,p=(null==c?void 0:c.type)===S.STORE_CREDIT;return n.createElement(n.Fragment,null,n.createElement("div",{className:[g.ActionTextBtn,g.NoUnderline].join(" ")},c&&p&&n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px"}},n.createElement("span",{style:{height:"20px"}},n.createElement(P,null)),n.createElement("span",{className:g.StoreCreditTag},m("checkout-page:storeCredit"))),!p&&n.createElement("span",{className:[g.AppliedCoupon,t.isCouponCodeRequirementDefult?"":g.NotClosed].join(" ")},d?n.createElement("span",{style:{height:"16px"}},n.createElement(b,null)):!p&&n.createElement("span",{style:{height:"16px"}},n.createElement(O,null)),n.createElement("span",{className:g.CouponCode},a),t.step!==l.SUCCESS&&!t.isOpenEditOrderWithTransaction&&n.createElement("span",{className:g.ClearCoupon,onClick:function(){return c?r&&r(c.giftCardId):o&&o()}},n.createElement(h,null)))),n.createElement("div",null,c?n.createElement("div",{className:g.Value},n.createElement("span",null,"-")," ",n.createElement("span",null,u((null==c?void 0:c.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol))):n.createElement("div",{className:g.Value},n.createElement("span",null,"DECREMENT"===(null==i?void 0:i.type)?"- ":"")," ",n.createElement("span",null,u((null==i?void 0:i.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol)))))})),D=o((function(e){var t,o=e.vm,a=e.onClearLoyaltyPoints,c=e.loyaltyPointsLine,r=null===(t=o.checkout.nonCouponAdjustments)||void 0===t?void 0:t.find((function(e){return e.campaignId===c.id})),i=s().t;return n.createElement(n.Fragment,null,n.createElement("div",{className:[g.ActionTextBtn,g.NoUnderline].join(" ")},n.createElement("span",{className:[g.AppliedCoupon,o.isCouponCodeRequirementDefult?"":g.NotClosed].join(" ")},n.createElement("span",{style:{height:"16px"}},n.createElement(b,null)),n.createElement("span",{className:g.CouponCode},c.amount," ",i("checkout-page:loyaltyPoints")),o.step!==l.SUCCESS&&!o.isOpenEditOrderWithTransaction&&n.createElement("span",{className:g.ClearCoupon,onClick:function(){return a&&a(c.loyaltySpendingMethodId)}},n.createElement(h,null)))),n.createElement("div",null,n.createElement("div",{className:g.Value},n.createElement("span",null,"-")," ",n.createElement("span",null,u((null==r?void 0:r.amount)||0,o.checkout.currencyCode,o.checkout.currencySymbol)))))})),R=o((function(e){var t=e.vm,o=e.isAddingNote,a=e.setAddingNote,c=s().t,r=n.useState(t.checkout.note?c("checkout-page:editOrderNote"):c("checkout-page:addOrderNote"))[0],i=n.useCallback((function(){a(!0)}),[]),u=n.useCallback((function(e){t.checkout.note=e}),[t,t.checkout]);if(!t.checkoutSettings.showCheckoutNote)return null;var m=t.step===l.SUCCESS;return m&&!t.checkout.note?null:n.createElement("div",{className:g.InfoRow},!o&&!m&&n.createElement("div",{className:g.ActionTextBtn,onClick:i},r),(o||m)&&n.createElement("div",{className:[g.CheckoutNoteContainer,m?g.Success:""].join(" ")},n.createElement("div",{className:g.Title},c("checkout-page:orderNote")),m?n.createElement("div",{className:g.CheckoutNoteDisplay},t.checkout.note):n.createElement(d,{style:{width:"100%"},type:p.TEXT_AREA,disableResize:!0,label:"",value:t.checkout.note||"",onChange:u,maxLength:320})))}));export{x as CartSummary,A as Coupon,I as CouponErrorCode};
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as n}from'./../../../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as i}from"mobx-react-lite";import a from"lodash/sortBy";import l from"../input-with-button/index.js";import s from"../notification-box/index.js";import{CheckoutStep as r}from"../../model.js";import{IkasStorefrontConfig as c}from"@ikas/storefront-config";import{formatCurrency as d}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";import{CartItem as m}from"./cart-item/index.js";import{FormItem as y}from"../form-item/index.js";import{FormItemType as p}from"../form-item/model.js";import v from"../tooltip/index.js";import E from"../svg/arrow-down.js";import f from"../svg/cross.js";import g from"../svg/gift.js";import h from"../../styles/common.module.scss.js";import C from"./style.module.scss.js";import L from"../svg/ikas.js";import{Button as P}from"../button/index.js";import{IkasCampaignCreatedFor as k,IkasGiftCardType as N}from"@ikas/storefront-models";import S from"../../../../hooks/useDimension.js";import I from"../svg/coupon-code-tag.js";import M from"../svg/gift-cart-tag.js";import x from"../svg/store-credit-tag.js";import T from"../svg/gift-loyalty.js";import j from"../svg/package-loyalty.js";import b from"../svg/percentage-loyalty.js";import w from"../svg/arrow-loyalty.js";import O from"../svg/star-loyalty.js";import{LoyaltyProgramMethodSpendingTypeEnum as A,searchProducts as D,useLoyaltyPoints as F}from"@ikas/storefront-api";import R from"../svg/left-arrow-loyalty.js";import"../../../../models/data/blog/category/index.js";import"../../../../models/data/blog/content/index.js";import"../../../../models/data/blog/meta-data/index.js";import"../../../../models/data/blog/tag/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"mobx";import"../../../../models/data/campaign-offer/index.js";import"../../../../models/data/cart/campaign-offer/index.js";import"../../../../models/data/cart/index.js";import"../../../../models/data/category/path-item/index.js";import"../../../../models/data/category/index.js";import{IkasCheckout as _}from"../../../../models/data/checkout/index.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import{IkasImage as V}from"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import U from"../svg/arrow-right-loyalty.js";var H;!function(e){e.COUPON_CODE_NOT_EXIST="COUPON_CODE_NOT_EXIST",e.COUPON_CODE_NOT_EXIST_FOR_GUESS="COUPON_CODE_NOT_EXIST_FOR_GUESS",e.COUPON_APPLIED_WITHOUT_DISCOUNT="COUPON_APPLIED_WITHOUT_DISCOUNT"}(H||(H={}));var B=i((function(e){var t,n,i,a,l,y,p,v,f,g,h,P,k=e.vm,N=e.allowExpand,I=e.isSuccessPageSummary,M=k.checkout,x=u().t,T=o.useState(!N),j=T[0],b=T[1],w=o.useState(!1),O=w[0],A=w[1],D=o.useState(null),F=D[0],R=D[1],_=o.useState(0),V=_[0],U=_[1],B=o.useState(null),q=B[0],Y=B[1],J=o.useState(!1),Z=J[0],ee=J[1],te=o.useState(!1),ne=te[0],oe=te[1],ie=o.useState(!1),ae=ie[0],le=ie[1],se=S().isMobile;o.useEffect((function(){N&&(j?q&&U(q.getBoundingClientRect().height):U(0))}),[j,q,N,Z,ne,O,ae]);var re=o.useMemo((function(){switch(F){case H.COUPON_CODE_NOT_EXIST:return x("checkout-page:giftCodeErrorDescription");case H.COUPON_CODE_NOT_EXIST_FOR_GUESS:return x("checkout-page:mustBeSignInToApplyCampaign");case H.COUPON_APPLIED_WITHOUT_DISCOUNT:return x("checkout-page:couponInvalidForCartItems");default:return""}}),[F]),ce=[C.CartSummary,N?C.HideOnDesktop:"",I?C.SuccessPageCartSummary:""].join(" "),de=N?{height:V+"px"}:void 0,ue=[C.ArrowDown,j?C.Rotated:""].join(" ");return M?o.createElement(o.Fragment,null,!!N&&o.createElement(o.Fragment,null,o.createElement("div",{id:"checkout-mobile-summary-header"}),o.createElement("div",{className:C.ExpandHeader,onClick:function(){if(!j){var e=document.getElementById("Checkout"),t=document.getElementById("checkout-mobile-summary-header");e&&t&&e.scrollTo({top:t.offsetTop,behavior:"smooth"})}b(!j)}},o.createElement("div",{className:C.Left},x("checkout-page:summary")),o.createElement("div",{className:C.Price},o.createElement("span",{className:C.PriceText},"".concat(d(k.finalPrice||0,M.currencyCode,M.currencySymbol)," (").concat(M.itemQuantity," ").concat(x("checkout-page:cartItemProduct"),")")),o.createElement("span",{className:ue},o.createElement(E,null))))),o.createElement("div",{className:ce},o.createElement("div",{className:[C.DetailsContainer,I?C.SuccessPageDetailContainer:""].join(" "),style:de},o.createElement("div",{className:C.Details,ref:Y},o.createElement("div",{className:C.ItemsContainer},o.createElement("div",null,M.items.map((function(e,t){return o.createElement(m,{key:t,vm:k,cartItem:e,currencyCode:M.currencyCode,onChange:le,isSuccessPageSummary:I})})))),o.createElement("div",{className:C.Divider}),o.createElement("div",{className:C.SubTotalInfo},O&&o.createElement("div",{className:C.NotificationContainer},o.createElement(s,{type:"warning",title:x("checkout-page:giftCodeErrorTitle"),content:re,onClose:function(){A(!1),R(null)}})),o.createElement(G,{label:x("checkout-page:subtotal"),value:M.formattedTotalPrice,tooltipText:x("checkout-page:subtotalTooltip"),hideMarginBottom:!(k.isCouponCodeVisible||(null===(t=k.checkout.giftCardLines)||void 0===t?void 0:t.length)||(null===(n=k.checkout.loyaltyLines)||void 0===n?void 0:n.length)||(null===(i=k.checkout.nonCouponAdjustments)||void 0===i?void 0:i.length))}),!!(null===(a=M.shippingLines)||void 0===a?void 0:a.length)&&(k.step===r.SUCCESS?o.createElement(G,{label:x("checkout-page:cartShippingTitle"),value:M.shippingTotal?M.formattedShippingTotal:x("checkout-page:free")}):M.shippingLines.map((function(e,t){return o.createElement(G,{key:t,label:e.paymentMethod?e.title:x("checkout-page:cartShippingTitle"),value:e.finalPrice?d(e.finalPrice,M.currencyCode,M.currencySymbol):x("checkout-page:free")})}))),o.createElement(X,{vm:k}),o.createElement(z,{vm:k}),(k.step===r.SUCCESS&&(!!k.checkout.note||!!k.checkout.appliedCouponCode)||k.step!==r.SUCCESS)&&k.isCouponCodeVisible&&o.createElement("div",{className:C.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),!!(null===(l=k.loyaltySpendingMethods)||void 0===l?void 0:l.length)&&(null===(y=k.loyaltySpendingMethods)||void 0===y?void 0:y.length)>0&&!se&&!!(null===(p=k.customizationProps)||void 0===p?void 0:p.showLoyaltyPoints)&&o.createElement($,{vm:k,isVisibleLoyaltyPoints:k.isLoyaltyPointsVisible,setIsVisibleLoyaltyPoints:k.setIsLoyaltyPointsVisible,isMobile:se}),o.createElement(K,{vm:k,isVisibleLoyaltyPoints:k.isLoyaltyPointsVisible,setIsVisibleLoyaltyPoints:k.setIsLoyaltyPointsVisible}),o.createElement(W,{vm:k,isAddingCoupon:ne,setAddingCoupon:oe,setCouponError:A,setCouponErrorCode:R}),o.createElement(Q,{vm:k,isAddingNote:Z,setAddingNote:ee}),!!k.installmentExtraPrice&&k.installmentExtraPrice>0&&o.createElement(o.Fragment,null,o.createElement("div",{className:C.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),o.createElement(G,{label:x("checkout-page:cartInterest"),value:d(k.installmentExtraPrice,M.currencyCode,M.currencySymbol)}))),k.isOpenEditOrderWithTransaction&&o.createElement("div",{className:C.SubTotalInfo,style:{}},!!(null===(v=k.openEditOrderTransaction)||void 0===v?void 0:v.chargedAmount)&&o.createElement(G,{label:x("checkout-page:chargedAmount"),value:d((null===(f=k.openEditOrderTransaction)||void 0===f?void 0:f.chargedAmount)||0,M.currencyCode,M.currencySymbol)}),!!(null===(g=k.openEditOrderTransaction)||void 0===g?void 0:g.refundedAmount)&&o.createElement(G,{label:x("checkout-page:refundedAmount"),value:d((null===(h=k.openEditOrderTransaction)||void 0===h?void 0:h.refundedAmount)||0,M.currencyCode,M.currencySymbol)})),o.createElement("div",{className:[C.TotalContainer,I?C.SuccessPageTotalContainer:""].join(" ")},o.createElement("div",{className:C.TitleContainer},o.createElement("div",{className:C.Title},k.isOpenEditOrderWithTransaction?x("checkout-page:totalAmountPayable"):x("checkout-page:total"))),o.createElement("div",null,o.createElement("div",{className:C.TotalPricesContainer},o.createElement("div",{className:C.TotalPrice},d(k.finalPrice||0,M.currencyCode,M.currencySymbol)),!!M.$totalTax&&!!(null===(P=k.customizationProps)||void 0===P?void 0:P.showTax)&&o.createElement("div",{className:[C.TotalTax].join(" ")},x("checkout-page:cartTaxTitle")+" "+M.$formattedTotalTax)))),!!k.loyaltyEarningMethod&&!!k.loyaltyCustomerInfo&&o.createElement("div",{className:C.LoyaltyEarningMethod},o.createElement("div",{className:C.LoyaltyEarningMethodTitle},x("checkout-page:loyaltyEarningMethodTitle",{value:(k.loyaltyEarningMethod.pointsEarned/(k.loyaltyEarningMethod.amountPerPointsEarned||1)*k.finalPrice).toFixed(2)}))),!I&&!k.isPoweredByHidden&&o.createElement("div",{className:C.PoweredBy},o.createElement("span",null,"powered by"),o.createElement("a",{href:"https://ikas.com"+("tr"===c.getCurrentLocale()?"/tr":""),target:"_blank"},o.createElement(L,null))))))):null})),G=i((function(e){var t=e.label,n=e.value,i=e.tooltipText,a=e.hideMarginBottom;return o.createElement("div",{className:[C.InfoRow,a?C.hideMb:""].join(" ")},o.createElement("div",{className:C.Label},o.createElement("span",null,t),!!i&&o.createElement(v,{text:i,style:{marginLeft:"8px"}})),o.createElement("div",{className:C.Value},n))})),X=i((function(e){var t=e.vm,n=u().t;return t.checkout?o.createElement(o.Fragment,null,a(t.checkout.nonCouponAdjustments||[],"order").filter((function(e){return e.createdFor!==k.LOYALTY_SPEND})).map((function(e,i){return o.createElement("div",{className:C.InfoRow,key:i},o.createElement("div",{className:C.Label},"INTEREST"===e.name?n("checkout-page:cartInterest"):e.name),o.createElement("div",{className:C.Value},o.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",o.createElement("span",null,d(e.amount,t.checkout.currencyCode,t.checkout.currencySymbol))))}))):null})),z=i((function(e){var t,n=e.vm,i=u().t;return n.checkout?o.createElement(o.Fragment,null,null===(t=n.checkout.giftPackageLines)||void 0===t?void 0:t.map((function(e,t){return o.createElement("div",{className:C.InfoRow,key:t},o.createElement("div",{className:C.Label},o.createElement("div",{className:C.GiftLabel},o.createElement(g,{style:{position:"relative",top:"-1px"}}),o.createElement("span",null,i("checkout-page:giftPackage")))),o.createElement("div",{className:C.Value},o.createElement("span",null,d(e.price,n.checkout.currencyCode,n.checkout.currencySymbol))))}))):null})),W=i((function(n){var i=n.vm,a=n.isAddingCoupon,s=n.setAddingCoupon,c=n.setCouponError,d=n.setCouponErrorCode,m=n.isOpenCouponCode,v=n.isMobile,E=n.showOnlyMobile,f=u().t,g=o.useState(""),L=g[0],k=g[1],N=o.useState(!1),S=N[0],I=N[1],M=o.useRef(null);o.useEffect((function(){a&&M.current&&M.current.focus()}),[a]);var x=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return i.checkout.couponCode=L,I(!0),[4,i.onCouponCodeApply(!0)];case 1:return t.sent(),I(!1),k(""),e=i.checkout.giftCardLines&&!!i.checkout.giftCardLines.length,i.couponError?[3,4]:i.checkout.appliedCouponCode||e?(c(!1),d(null),[4,i.reInitPaymentMethod()]):[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:i.checkout.couponCode=null,c(!0),d(i.couponError),t.label=5;case 5:return[2]}}))}))},T=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return I(!0),[4,i.removeGiftCardLine(n)];case 1:return e.sent(),[4,i.reInitPaymentMethod()];case 2:return e.sent(),I(!1),[2]}}))}))},j=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return I(!0),[4,i.removeLoyaltyPointsFromCart(n)];case 1:return e.sent(),[4,i.reInitPaymentMethod()];case 2:return e.sent(),I(!1),[2]}}))}))};i.step,r.SUCCESS;var b=i.step===r.SHIPPING,w=!!i.checkout.appliedCouponCode||!!(i.checkout.giftCardLines&&i.checkout.giftCardLines.length>0)||!!(i.checkout.loyaltyLines&&i.checkout.loyaltyLines.length>0),O=!!i.checkout.appliedCouponCode&&m,A=!a&&i.isCouponCodeVisible&&!i.isCouponCodeRequirementOpen&&i.step!==r.SUCCESS,D=w&&(!m||v);return o.createElement(o.Fragment,null,!!m&&o.createElement(o.Fragment,null,o.createElement("div",{className:[C.CartSummary,C.OpenCouponCodeSummary].join(" ")},o.createElement("div",{className:h.FormSectionTitle},o.createElement("div",{style:{paddingBottom:O?0:6},className:h.Title},f("checkout-page:couponCode"))))),w&&!b&&!i.isCouponCodeRequirementDefult&&o.createElement("div",{className:C.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),o.createElement("div",{className:A?C.InfoRow:""},A&&o.createElement("div",{className:C.ActionTextBtn,onClick:function(){return s(!0)}},f("checkout-page:addCouponCode")),a&&!m&&o.createElement("div",{style:{marginBottom:"10px"}},o.createElement(l,{value:L,placeholder:f("checkout-page:couponCode"),buttonLabel:f("checkout-page:actions.apply"),inputRef:M,onClick:x,isLoading:S,onChange:k})),m&&o.createElement("div",{tabIndex:0,onKeyDown:function(e){"Enter"===e.key&&x()},className:[C.OpenCouponCodeMain,D?C.OpenCouponCodeMainWithMb:""].join(" ")},o.createElement(y,{name:"couponCode",label:f("checkout-page:addCouponCode"),type:p.TEXT,value:L,onChange:k}),o.createElement(P,{style:{width:"33%"},text:f("checkout-page:actions.apply"),isLoading:S,onClick:x}))),D&&o.createElement(o.Fragment,null,!!i.checkout.appliedCouponCode&&o.createElement("div",{className:[C.InfoRow,E?C.InfoRowGiftCardMobile:""].join(" ")},o.createElement(q,{vm:i,onClearCouponCode:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return i.checkout.couponCode=null,I(!0),[4,i.onCouponCodeApply(!1)];case 1:return e.sent(),[4,i.reInitPaymentMethod()];case 2:return e.sent(),I(!1),[2]}}))}))},couponCode:i.checkout.appliedCouponCode})),!!i.checkout.giftCardLines&&!!i.checkout.giftCardLines.length&&i.checkout.giftCardLines.map((function(e){return o.createElement("div",{className:[C.InfoRow,E?C.InfoRowGiftCardMobile:""].join(" ")},o.createElement(q,{vm:i,onClearGiftCode:T,couponCode:e.code,giftCardLine:e}))})),!!i.checkout.loyaltyLines&&!!i.checkout.loyaltyLines.length&&i.checkout.loyaltyLines.map((function(e){return o.createElement("div",{className:[C.InfoRow,E?C.InfoRowGiftCardMobile:""].join(" ")},o.createElement(Y,{vm:i,onClearLoyaltyPoints:j,loyaltyPointsLine:e}))}))))})),q=i((function(e){var t=e.vm,n=e.onClearCouponCode,i=e.couponCode,a=e.giftCardLine,l=e.onClearGiftCode,s=t.checkout.couponAdjustment,c=u().t,m=!a,y=(null==a?void 0:a.type)===N.STORE_CREDIT;return o.createElement(o.Fragment,null,o.createElement("div",{className:[C.ActionTextBtn,C.NoUnderline].join(" ")},a&&y&&o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px"}},o.createElement("span",{style:{height:"20px"}},o.createElement(x,null)),o.createElement("span",{className:C.StoreCreditTag},c("checkout-page:storeCredit"))),!y&&o.createElement("span",{className:[C.AppliedCoupon,t.isCouponCodeRequirementDefult?"":C.NotClosed].join(" ")},m?o.createElement("span",{style:{height:"16px"}},o.createElement(I,null)):!y&&o.createElement("span",{style:{height:"16px"}},o.createElement(M,null)),o.createElement("span",{className:C.CouponCode},i),t.step!==r.SUCCESS&&!t.isOpenEditOrderWithTransaction&&o.createElement("span",{className:C.ClearCoupon,onClick:function(){return a?l&&l(a.giftCardId):n&&n()}},o.createElement(f,null)))),o.createElement("div",null,a?o.createElement("div",{className:C.Value},o.createElement("span",null,"-")," ",o.createElement("span",null,d((null==a?void 0:a.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol))):o.createElement("div",{className:C.Value},o.createElement("span",null,"DECREMENT"===(null==s?void 0:s.type)?"- ":"")," ",o.createElement("span",null,d((null==s?void 0:s.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol)))))})),Y=i((function(e){var t,n,i=e.vm,a=e.onClearLoyaltyPoints,l=e.loyaltyPointsLine,s=null===(t=i.checkout.nonCouponAdjustments)||void 0===t?void 0:t.find((function(e){return e.campaignId===l.id})),c=u().t,m=null===(n=i.loyaltySpendingMethodsAll)||void 0===n?void 0:n.find((function(e){return e.id===l.loyaltySpendingMethodId})),y=function(){return m?m.type===A.FREE_PRODUCT?{icon:o.createElement(T,null),title:c("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProductAdded")}:m.type===A.FREE_SHIPPING?{icon:o.createElement(j,null),title:c("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping")}:{icon:o.createElement(b,null),title:c("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null==s?void 0:s.amount)||0,i.checkout.currencyCode,i.checkout.currencySymbol)})}:{icon:o.createElement(b,null),title:c("checkout-page:loyaltyPoints")}};return o.createElement(o.Fragment,null,o.createElement("div",{className:C.LoyaltyPointsLineContainer},o.createElement("div",{className:[C.ActionTextBtn,C.NoUnderline].join(" ")},o.createElement("span",{className:[C.AppliedCouponLoyalty,i.isCouponCodeRequirementDefult?"":C.NotClosed].join(" ")},o.createElement("div",{style:{width:"16px",height:"16px"},className:C.LoyaltyPointsLineIcon},y().icon),o.createElement("span",{className:C.CouponCode},y().title),i.step!==r.SUCCESS&&!i.isOpenEditOrderWithTransaction&&o.createElement("span",{className:C.ClearCouponLoyalty,onClick:function(){return a&&a(l.loyaltySpendingMethodId)}},o.createElement(f,null)))),o.createElement("span",{className:C.LoyaltyPointSpending},"(",c("checkout-page:loyaltyPointSpending",{point:l.amount}),")")),m?m.type!==A.FREE_PRODUCT&&m.type!==A.FREE_SHIPPING?o.createElement("div",null,o.createElement("div",{className:C.ValueLoyalty},o.createElement("span",null,"-")," ",o.createElement("span",null,d((null==s?void 0:s.amount)||0,i.checkout.currencyCode,i.checkout.currencySymbol)))):null:o.createElement("div",null,o.createElement("div",{className:C.ValueLoyalty},o.createElement("span",null,"-")," ",o.createElement("span",null,d((null==s?void 0:s.amount)||0,i.checkout.currencyCode,i.checkout.currencySymbol)))))})),$=i((function(e){var t,n,i,a,l,s,r,c,m,y=e.vm;e.isVisibleLoyaltyPoints;var p=e.setIsVisibleLoyaltyPoints,v=e.isMobile,E=o.useState("undefined"!=typeof window?window.innerWidth:1500),f=E[0],g=E[1];o.useEffect((function(){var e=function(){return g(window.innerWidth)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var h=null===(t=y.loyaltySpendingMethods)||void 0===t?void 0:t.filter((function(e){return e.type===A.FREE_PRODUCT})),L=null!==(n=null==h?void 0:h.map((function(e){var t;return null===(t=e.discountSettings)||void 0===t?void 0:t.point})).filter((function(e){return"number"==typeof e})))&&void 0!==n?n:[],P=L.length?Math.min.apply(Math,L):null,k=L.length?Math.max.apply(Math,L):null,N=1===(null===(i=y.loyaltySpendingMethods)||void 0===i?void 0:i.length),S=function(e){var t,n,i,a,l,s="",r=null;return e.type===A.FIXED_AMOUNT&&e.isDynamic&&(s=N?"".concat(I("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount")," (").concat(I("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:(null===(t=e.discountSettings)||void 0===t?void 0:t.point)||0,amount:d((null===(n=e.discountSettings)||void 0===n?void 0:n.discountAmount)||0,y.checkout.currencyCode,y.checkout.currencySymbol)}),")"):I("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount"),r=o.createElement(b,null)),e.type===A.FREE_SHIPPING&&(s=I("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping"),r=o.createElement(j,null)),e.type!==A.FIXED_AMOUNT||e.isDynamic||(s=N?I("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmountOneRow",{value:d((null===(i=e.discountSettings)||void 0===i?void 0:i.discountAmount)||0,y.checkout.currencyCode,y.checkout.currencySymbol)}):I("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null===(a=e.discountSettings)||void 0===a?void 0:a.discountAmount)||0,y.checkout.currencyCode,y.checkout.currencySymbol)}),r=o.createElement(b,null)),e.type===A.FREE_PRODUCT&&(s=I("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"),r=o.createElement(T,null)),e.type===A.RATIO&&(s="".concat(I("checkout-page:loyaltyPointsLinesModalContentItemTitleRatio")," (%").concat((null===(l=e.discountSettings)||void 0===l?void 0:l.discountAmount)||0,")"),r=o.createElement(b,null)),{title:s,icon:r}},I=u().t,M=null!==(l=null===(a=y.loyaltySpendingMethods)||void 0===a?void 0:a.filter((function(e){return e.type!==A.FREE_PRODUCT})))&&void 0!==l?l:[],x=f>1380||v?h&&h.length>0?2:3:f<1100?h&&h.length>0?0:1:h&&h.length>0?1:2,O=M.slice(0,Math.min(x,M.length));return 1===(null===(s=y.loyaltySpendingMethods)||void 0===s?void 0:s.length)?o.createElement("div",{className:C.LoyaltyPointsContainer},o.createElement("div",{className:C.LoyaltyPointsLineOneRow,onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineOneRowTitle},S(null===(r=y.loyaltySpendingMethods)||void 0===r?void 0:r[0]).icon&&S(null===(c=y.loyaltySpendingMethods)||void 0===c?void 0:c[0]).icon,o.createElement("span",{className:C.LoyaltyPointsLineOneRowTitleText},S(null===(m=y.loyaltySpendingMethods)||void 0===m?void 0:m[0]).title)),o.createElement(w,null))):o.createElement("div",{className:C.LoyaltyPointsContainer},o.createElement("div",{className:C.LoyaltyPointsTitle},I("checkout-page:loyaltyPointsTitle")),o.createElement("div",{className:C.LoyaltyPointsLines},O.map((function(e){var t;return o.createElement("div",{key:e.id,className:C.LoyaltyPointsLine,onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineTitle},S(e).icon&&S(e).icon,o.createElement("span",{className:C.LoyaltyPointsLineTitleText},S(e).title)),o.createElement("span",{className:C.LoyaltyPointsLineValue},(null===(t=e.discountSettings)||void 0===t?void 0:t.point)||0," ",I("checkout-page:loyaltyPoint")))})),h&&h.length>0&&o.createElement("div",{className:C.LoyaltyPointsLine,onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineTitle},o.createElement(T,null),o.createElement("span",{className:C.LoyaltyPointsLineTitleText},I("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"))),o.createElement("span",{className:C.LoyaltyPointsLineValue},P&&k?"".concat(P," ~ ").concat(k):""," ",I("checkout-page:loyaltyPoint"))),o.createElement("div",{className:[C.LoyaltyPointsLine,C.LoyaltyPointsLineAllMain].join(" "),onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineAllContainer},o.createElement("span",{className:C.LoyaltyPointsLineAll},I("checkout-page:loyaltyPointsViewAll")),o.createElement(w,null)))))})),K=i((function(i){var a,l,s,r,m,y,p,v,E,g,h,L,k,N=i.vm,S=i.isVisibleLoyaltyPoints,I=i.setIsVisibleLoyaltyPoints,M=o.useState(!1),x=M[0],w=M[1],H=o.useState(!1),B=H[0],G=H[1],X=o.useState(!1),z=X[0],W=X[1],q=o.useState(!1),Y=q[0],$=q[1],K=o.useState(!1),Q=K[0],J=K[1],Z=o.useState(!1),ee=Z[0],te=Z[1],ne=o.useState(null),oe=ne[0],ie=ne[1],ae=o.useState(0),le=ae[0],se=ae[1];o.useEffect((function(){if(S&&!Q){var e=requestAnimationFrame((function(){requestAnimationFrame((function(){return te(!0)}))}));return function(){return cancelAnimationFrame(e)}}S||te(!1)}),[S,Q]),o.useEffect((function(){if(Q){var e=setTimeout((function(){I(!1),J(!1)}),250);return function(){return clearTimeout(e)}}}),[Q]);var re=o.useCallback((function(){J(!0)}),[]),ce=o.useCallback((function(){G(!0)}),[]),de=o.useCallback((function(){$(!0)}),[]);o.useEffect((function(){if(B){var e=setTimeout((function(){w(!1),G(!1)}),180);return function(){return clearTimeout(e)}}}),[B]),o.useEffect((function(){if(Y){var e=setTimeout((function(){W(!1),ie(null),$(!1)}),180);return function(){return clearTimeout(e)}}}),[Y]),o.useEffect((function(){var e,t;if(oe){var n=(null===(e=oe.discountSettings)||void 0===e?void 0:e.point)||1,o=null===(t=oe.pointUsageLimit)||void 0===t?void 0:t.minPointLimit;se("number"==typeof o&&o>0?o:n)}}),[oe]);var ue=null===(a=N.loyaltySpendingMethods)||void 0===a?void 0:a.filter((function(e){return e.type===A.FREE_PRODUCT})),me=o.useState("undefined"!=typeof window?window.innerHeight:1200),ye=me[0],pe=me[1];o.useEffect((function(){var e=function(){return pe(window.innerHeight)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),o.useEffect((function(){S&&ge((null==ue?void 0:ue.map((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)||""})))||[])}),[S]);var ve=o.useState([]),Ee=ve[0],fe=ve[1],ge=function(n){return e(void 0,void 0,void 0,(function(){var e,o,i;return t(this,(function(t){switch(t.label){case 0:return(null==n?void 0:n.length)?[4,D({input:{productIdList:n,page:1,perPage:n.length,priceListId:c.getPriceListId(),salesChannelId:c.getSalesChannelId()}},[])]:[2,[]];case 1:return e=t.sent(),o=(null===(i=e.data)||void 0===i?void 0:i.data)||[],fe(o.map((function(e){var t,n,o,i,a,l;return{id:e.id,name:e.name,mainImageSrc:new V({id:(null===(a=null===(i=null===(o=null===(n=null===(t=e.variants)||void 0===t?void 0:t[0])||void 0===n?void 0:n.images)||void 0===o?void 0:o.find((function(e){return e.isMain})))||void 0===i?void 0:i.image)||void 0===a?void 0:a.id)||null,isVideo:!1}).thumbnailSrc,variants:(null===(l=e.variants)||void 0===l?void 0:l.map((function(e){var t,n,o,i;return{id:e.id,mainImageSrc:new V({id:(null===(o=null===(n=null===(t=e.images)||void 0===t?void 0:t.find((function(e){return e.isMain})))||void 0===n?void 0:n.image)||void 0===o?void 0:o.id)||null,isVideo:!1}).thumbnailSrc,variantText:(null===(i=e.variantValues)||void 0===i?void 0:i.map((function(e){return e.name})).join(" / "))||null}})))||[]}}))),[2]}}))}))},he=null!==(l=null==ue?void 0:ue.map((function(e){var t;return null===(t=e.discountSettings)||void 0===t?void 0:t.point})).filter((function(e){return"number"==typeof e})))&&void 0!==l?l:[],Ce=he.length?Math.min.apply(Math,he):null,Le=he.length?Math.max.apply(Math,he):null,Pe=function(e){var t,n,i="",a=null;return e.type===A.FIXED_AMOUNT&&e.isDynamic&&(i=Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount"),a=o.createElement(b,null)),e.type===A.FREE_SHIPPING&&(i=Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping"),a=o.createElement(j,null)),e.type!==A.FIXED_AMOUNT||e.isDynamic||(i=Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null===(t=e.discountSettings)||void 0===t?void 0:t.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)}),a=o.createElement(b,null)),e.type===A.FREE_PRODUCT&&(i=Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"),a=o.createElement(T,null)),e.type===A.RATIO&&(i="".concat(Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleRatio")," (%").concat((null===(n=e.discountSettings)||void 0===n?void 0:n.discountAmount)||0,")"),a=o.createElement(b,null)),{title:i,icon:a}},ke=null===(s=N.loyaltySpendingMethods)||void 0===s?void 0:s.filter((function(e){return e.type!==A.FREE_PRODUCT})),Ne=function(e,t){var n,o,i,a,l=null!==(o=null===(n=N.loyaltyCustomerInfo)||void 0===n?void 0:n.totalPoint)&&void 0!==o?o:0;return(null==t?void 0:t.type)===A.FIXED_AMOUNT&&(null==t?void 0:t.isDynamic)?!!((null===(i=t.pointUsageLimit)||void 0===i?void 0:i.minPointLimit)&&(null===(a=t.pointUsageLimit)||void 0===a?void 0:a.minPointLimit)>l):!l||l<e},Se=function(o,i,a){return e(void 0,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return[4,F({input:n({cartId:N.checkout.id,loyaltyProgramId:o,loyaltySpendingMethodId:i},a?{amount:a}:{})})];case 1:return(e=t.sent()).isSuccess?(re(),l=e.data,N.checkout=new _(n(n({},l),{shippingAddress:N.checkout.shippingAddress,billingAddress:N.checkout.billingAddress,customer:N.checkout.customer,selectedPaymentGateway:N.checkout.selectedPaymentGateway}),N.countrySettings),[4,N.getLoyaltyCustomerInfo()]):[3,4];case 2:return t.sent(),[4,N.listSpendingMethodsByCartId()];case 3:t.sent(),t.label=4;case 4:return[2,e]}}))}))},Ie=u().t;if(!S&&!Q)return null;var Me=[C.LoyaltyPointsLinesModalContainer,ee&&!Q&&C.LoyaltyPointsLinesModalContainerVisible,Q&&C.LoyaltyPointsLinesModalContainerClosing].filter(Boolean).join(" ");return o.createElement("div",{className:Me,onClick:re,role:"presentation"},o.createElement("div",{className:C.LoyaltyPointsLinesModal,onClick:function(e){return e.stopPropagation()},role:"dialog","aria-modal":"true"},o.createElement("span",{onClick:re,className:C.LoyaltyPointsLinesModalCloseButton},o.createElement(f,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeader},o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderTitle},Ie("checkout-page:loyaltyPointsLinesModalTitle")),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderDescription},Ie("checkout-page:loyaltyPointsLinesModalDescription"))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContent,style:z?{maxHeight:"316px"}:{maxHeight:ye<748?ye-140+"px":650}},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeader},o.createElement("span",null,Ie("checkout-page:loyaltyPointsLinesModalCurrentPoints")," "),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValue},o.createElement("div",{style:{width:"18px",height:"18px"}},o.createElement(O,null)),o.createElement("span",null,(null===(r=N.loyaltyCustomerInfo)||void 0===r?void 0:r.totalPoint)||0," ",Ie("checkout-page:loyaltyPoint")))),null==ke?void 0:ke.map((function(n,i){var a,l,s,r;return o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItems},o.createElement("div",{className:[C.LoyaltyPointsLinesModalContentItem,0===i?C.LoyaltyPointsLinesModalContentItemsFirst:"",i!==((null==ke?void 0:ke.length)||0)-1||ue?"":C.LoyaltyPointsLinesModalContentItemsLast].join(" ")},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconContainer},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIcon},Pe(n).icon&&Pe(n).icon),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMain},o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle},Pe(n).title),o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue},n.type===A.FIXED_AMOUNT&&n.isDynamic?Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:(null===(a=n.discountSettings)||void 0===a?void 0:a.point)||0,amount:d((null===(l=n.discountSettings)||void 0===l?void 0:l.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)}):"".concat((null===(s=n.discountSettings)||void 0===s?void 0:s.point)||0," ").concat(Ie("checkout-page:loyaltyPoint"))))),o.createElement("div",null,o.createElement("button",{type:"button",disabled:Ne((null===(r=n.discountSettings)||void 0===r?void 0:r.point)||0,n),onClick:function(){return e(void 0,void 0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:return e=(null===(o=n.discountSettings)||void 0===o?void 0:o.point)||0,Ne(e,n)?[2]:n.type===A.FIXED_AMOUNT&&n.isDynamic?(ie(n),W(!0),[3,3]):[3,1];case 1:return[4,Se(n.loyaltyProgramId,n.id)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},className:C.LoyaltyPointsLinesModalContentItemButton},Ie("checkout-page:loyaltyPointsLineItemButtonApply")))))})),ue&&ue.length>0&&o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItems},o.createElement("div",{className:[C.LoyaltyPointsLinesModalContentItem,C.LoyaltyPointsLinesModalContentItemsLast].join(" ")},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconContainer},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIcon},o.createElement(T,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMain},o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle},Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct")),o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue},Ce&&Le?"".concat(Ce," ~ ").concat(Le):""," ",Ie("checkout-page:loyaltyPoint")))),o.createElement("div",null,o.createElement("button",{type:"button",disabled:function(){var e,t,n=null!==(t=null===(e=N.loyaltyCustomerInfo)||void 0===e?void 0:e.totalPoint)&&void 0!==t?t:0;return!n||n<(null!=Ce?Ce:0)}(),className:C.LoyaltyPointsLinesModalContentItemButton,onClick:function(){var e,t,n=null!==(t=null===(e=N.loyaltyCustomerInfo)||void 0===e?void 0:e.totalPoint)&&void 0!==t?t:0;!n||n<(null!=Ce?Ce:0)||w(!0)}},Ie("checkout-page:loyaltyPointsLineItemButtonSelectGift")))))),(x||B)&&o.createElement("div",{className:C.LoyaltyPointsGiftModalOverlay},o.createElement("div",{className:[C.LoyaltyPointsGiftModal,B&&C.LoyaltyPointsGiftModalClosing].filter(Boolean).join(" ")},o.createElement("span",{onClick:re,className:C.LoyaltyPointsLinesModalCloseButton},o.createElement(f,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeader},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",cursor:"pointer"},onClick:ce,className:C.LoyaltyPointsLinesModalHeaderTitle},o.createElement(R,null),Ie("checkout-page:loyaltyPointsGiftModalTitle")),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderDescription},Ie("checkout-page:loyaltyPointsGiftModalDescription"))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContent},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeader},o.createElement("span",null,Ie("checkout-page:loyaltyPointsLinesModalCurrentPoints")," "),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValue},o.createElement("div",{style:{width:"18px",height:"18px"}},o.createElement(O,null)),o.createElement("span",null,(null===(m=N.loyaltyCustomerInfo)||void 0===m?void 0:m.totalPoint)||0," ",Ie("checkout-page:loyaltyPoint")))),null==Ee?void 0:Ee.map((function(n,i){var a,l,s,r,c,d;return o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItems},o.createElement("div",{className:[C.LoyaltyPointsLinesModalContentItemFreeProduct,C.LoyaltyPointsLinesModalContentItem,0===i?C.LoyaltyPointsLinesModalContentItemsFirst:"",i===((null==Ee?void 0:Ee.length)||0)-1?C.LoyaltyPointsLinesModalContentItemsLast:""].join(" ")},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconContainer},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconImage},n.mainImageSrc&&o.createElement("img",{src:n.mainImageSrc,alt:n.name})),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMain},o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle},n.name),o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue},(null===(l=null===(a=n.variants)||void 0===a?void 0:a.find((function(e){var t,o;return e.id===(null===(o=null===(t=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})))||void 0===t?void 0:t.discountSettings)||void 0===o?void 0:o.freeProductVariantId)})))||void 0===l?void 0:l.variantText)||""),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemPoint},(null===(r=null===(s=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})))||void 0===s?void 0:s.discountSettings)||void 0===r?void 0:r.point)||0," ",Ie("checkout-page:loyaltyPoint")))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemButtonContainerMobile},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemPointMobile},(null===(d=null===(c=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})))||void 0===c?void 0:c.discountSettings)||void 0===d?void 0:d.point)||0," ",Ie("checkout-page:loyaltyPoint")),function(){var i,a=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})),l=(null===(i=null==a?void 0:a.discountSettings)||void 0===i?void 0:i.point)||0,s=Ne(l,a);return o.createElement("button",{type:"button",disabled:s,onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return s||!a?[2]:[4,Se(a.loyaltyProgramId,a.id)];case 1:return e.sent(),[2]}}))}))},className:C.LoyaltyPointsLinesModalContentItemButton},Ie("checkout-page:loyaltyPointsLineItemButtonAddFree"))}())))}))))),(z&&oe||Y)&&o.createElement("div",{className:C.LoyaltyPointsGiftModalOverlay},o.createElement("div",{className:[C.LoyaltyPointsGiftModal,Y&&C.LoyaltyPointsGiftModalClosing].filter(Boolean).join(" ")},o.createElement("span",{onClick:re,className:C.LoyaltyPointsLinesModalCloseButton},o.createElement(f,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeader},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",cursor:"pointer"},onClick:de,className:C.LoyaltyPointsLinesModalHeaderTitle},o.createElement(R,null),Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null===(y=null==oe?void 0:oe.discountSettings)||void 0===y?void 0:y.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)})),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderDescription},Ie("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:(null===(p=null==oe?void 0:oe.discountSettings)||void 0===p?void 0:p.point)||0,amount:d((null===(v=null==oe?void 0:oe.discountSettings)||void 0===v?void 0:v.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)}))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContent,style:{maxHeight:"316px",overflow:"hidden"}},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeader},o.createElement("span",null,Ie("checkout-page:loyaltyPointsLinesModalCurrentPoints")," "),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValue},o.createElement("div",{style:{width:"18px",height:"18px"}},o.createElement(O,null)),o.createElement("span",null,(null===(E=N.loyaltyCustomerInfo)||void 0===E?void 0:E.totalPoint)||0," ",Ie("checkout-page:loyaltyPoint")))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemSlider},o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfo},o.createElement("span",null,le," ",Ie("checkout-page:loyaltyPoint")),o.createElement(U,null),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoValue},o.createElement(b,null),o.createElement("span",null,d(le/((null===(g=null==oe?void 0:oe.discountSettings)||void 0===g?void 0:g.point)||1)*((null===(h=null==oe?void 0:oe.discountSettings)||void 0===h?void 0:h.discountAmount)||0),N.checkout.currencyCode,N.checkout.currencySymbol)))),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSlider},function(){var e,t,n,i,a,l,s,r=(null===(e=null==oe?void 0:oe.discountSettings)||void 0===e?void 0:e.point)||1,c=null!==(n=null===(t=null==oe?void 0:oe.pointUsageLimit)||void 0===t?void 0:t.minPointLimit)&&void 0!==n?n:r,d=null!==(s=null!==(a=null===(i=null==oe?void 0:oe.pointUsageLimit)||void 0===i?void 0:i.maxPointLimit)&&void 0!==a?a:null===(l=N.loyaltyCustomerInfo)||void 0===l?void 0:l.totalPoint)&&void 0!==s?s:r,u=Math.max(d-c,0),m=u>0?(le-c)/u*100:0,y=Math.min(100,Math.max(0,m));return o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSlider},o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSliderValue}),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSliderValueText,style:{width:"".concat(y,"%")}}),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSliderValueTextValue,style:{left:"".concat(y,"%")}}),o.createElement("input",{type:"range",min:c,max:d,step:r,className:C.LoyaltyPointsLinesModalSliderInput,value:le,onChange:function(e){return se(Number(e.target.value))}}))}())),o.createElement("div",{style:{display:"flex",width:"100%",marginTop:"24px",marginBottom:"24px"}},o.createElement(P,{onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,Se(oe.loyaltyProgramId,oe.id,le)];case 1:return e.sent(),[2]}}))}))},style:{width:"100%"},text:Ie("checkout-page:loyaltyPointsLineItemButtonApplyAmount",{amount:d(le/((null===(L=null==oe?void 0:oe.discountSettings)||void 0===L?void 0:L.point)||1)*((null===(k=null==oe?void 0:oe.discountSettings)||void 0===k?void 0:k.discountAmount)||0),N.checkout.currencyCode,N.checkout.currencySymbol)})})))))))})),Q=i((function(e){var t=e.vm,n=e.isAddingNote,i=e.setAddingNote,a=u().t,l=o.useState(t.checkout.note?a("checkout-page:editOrderNote"):a("checkout-page:addOrderNote"))[0],s=o.useCallback((function(){i(!0)}),[]),c=o.useCallback((function(e){t.checkout.note=e}),[t,t.checkout]);if(!t.checkoutSettings.showCheckoutNote)return null;var d=t.step===r.SUCCESS;return d&&!t.checkout.note?null:o.createElement("div",{className:C.InfoRow},!n&&!d&&o.createElement("div",{className:C.ActionTextBtn,onClick:s},l),(n||d)&&o.createElement("div",{className:[C.CheckoutNoteContainer,d?C.Success:""].join(" ")},o.createElement("div",{className:C.Title},a("checkout-page:orderNote")),d?o.createElement("div",{className:C.CheckoutNoteDisplay},t.checkout.note):o.createElement(y,{style:{width:"100%"},type:p.TEXT_AREA,disableResize:!0,label:"",value:t.checkout.note||"",onChange:c,maxLength:320})))}));export{B as CartSummary,W as Coupon,H as CouponErrorCode,$ as LoyaltyPointsLine};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={ExpandHeader:"style-module_ExpandHeader__LQwWm",Left:"style-module_Left__-N12h",Price:"style-module_Price__OT1Wh",PriceText:"style-module_PriceText__bq1pk",ArrowDown:"style-module_ArrowDown__YhRny",Rotated:"style-module_Rotated__ZPfId",CartSummary:"style-module_CartSummary__m77tn",OpenCouponCodeSummary:"style-module_OpenCouponCodeSummary__ua9wx",HideOnDesktop:"style-module_HideOnDesktop__Vs5AV",ItemsContainer:"style-module_ItemsContainer__QFKQV",DetailsContainer:"style-module_DetailsContainer__PK33m",SuccessPageDetailContainer:"style-module_SuccessPageDetailContainer__-p8kJ",Details:"style-module_Details__hWJ9o",Divider:"style-module_Divider__MNDti",ActionTextBtn:"style-module_ActionTextBtn__7yua4",NoUnderline:"style-module_NoUnderline__FphKn",Light:"style-module_Light__dIcW-",SubTotalInfo:"style-module_SubTotalInfo__JMqK9",InfoRow:"style-module_InfoRow__oAvZS",hideMb:"style-module_hideMb__j7VBr",LoyaltyPoints:"style-module_LoyaltyPoints__3gd4k",Label:"style-module_Label__28Bij",Value:"style-module_Value__7rELF",TotalContainer:"style-module_TotalContainer__sGR7d",TitleContainer:"style-module_TitleContainer__LgmJI",Title:"style-module_Title__oMVSD",TotalPricesContainer:"style-module_TotalPricesContainer__-PsOD",TotalPrice:"style-module_TotalPrice__QBdM1",TotalTax:"style-module_TotalTax__9pA4Y",SuccessPageTotalContainer:"style-module_SuccessPageTotalContainer__NZGFF",AppliedCoupon:"style-module_AppliedCoupon__UNo1h",AppliedCouponBgGray:"style-module_AppliedCouponBgGray__MYoYu",NotClosed:"style-module_NotClosed__E-N9z",CouponCode:"style-module_CouponCode__UKPmf",ClearCoupon:"style-module_ClearCoupon__CBAzl",NotificationContainer:"style-module_NotificationContainer__AXfJT",CheckoutNoteContainer:"style-module_CheckoutNoteContainer__d-z4m",CheckoutNoteDisplay:"style-module_CheckoutNoteDisplay__DtnXo",Success:"style-module_Success__VI2Bw",GiftLabel:"style-module_GiftLabel__cazrS",PoweredBy:"style-module_PoweredBy__DKBJF",SuccessPageCartSummary:"style-module_SuccessPageCartSummary__pjgea",OpenCouponCodeMain:"style-module_OpenCouponCodeMain__lZtb3",OpenCouponCodeMainWithMb:"style-module_OpenCouponCodeMainWithMb__DqVmh",InfoRowGiftCardMobile:"style-module_InfoRowGiftCardMobile__Kp-zh",StoreCreditTag:"style-module_StoreCreditTag__D1TtS"};e(".style-module_ExpandHeader__LQwWm {\n position: sticky;\n top: 0;\n z-index: 10;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-top: 1px solid var(--checkout-border-color);\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom 0.3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color);\n}\n@media only screen and (min-width: 1000px) {\n .style-module_ExpandHeader__LQwWm {\n display: none;\n }\n}\n.style-module_ExpandHeader__LQwWm .style-module_Left__-N12h {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh {\n font-weight: 600;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_PriceText__bq1pk {\n font-weight: 600;\n margin-right: 8px;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny {\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny.style-module_Rotated__ZPfId {\n transform: rotate(-180deg);\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn {\n width: 100%;\n background-color: var(--checkout-card-bg-color);\n }\n .style-module_CartSummary__m77tn.style-module_OpenCouponCodeSummary__ua9wx {\n background-color: #fff;\n }\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CartSummary__m77tn.style-module_HideOnDesktop__Vs5AV {\n display: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: 50vh;\n overflow-y: auto;\n margin-bottom: 24px;\n /* Track */\n /* Handle */\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: unset;\n overflow-y: unset;\n margin-bottom: 0;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar {\n width: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-track {\n box-shadow: inset 0 0 20px 20px #e3e7ef;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 20px 20px #000000;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n overflow: hidden;\n width: 100%;\n transition: height 0.3s ease-in-out;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n padding: 0 24px;\n box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ {\n padding: 0;\n box-shadow: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ .style-module_Details__hWJ9o {\n padding-top: 0;\n}\n.style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n overflow: hidden;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n padding-top: 24px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_Divider__MNDti {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_LoyaltyPoints__3gd4k {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS:last-of-type {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d {\n display: flex;\n justify-content: space-between;\n margin-top: 12px;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TitleContainer__LgmJI .style-module_Title__oMVSD {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPricesContainer__-PsOD {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPrice__QBdM1 {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalTax__9pA4Y {\n font-size: 14px;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d {\n height: 64px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF {\n height: unset;\n margin-top: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_Title__oMVSD {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_TotalPrice__QBdM1 {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 2px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_AppliedCouponBgGray__MYoYu {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n margin-left: 6px;\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n.style-module_CartSummary__m77tn .style-module_NotificationContainer__AXfJT {\n margin-bottom: 14px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_Title__oMVSD {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_CheckoutNoteDisplay__DtnXo {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m.style-module_Success__VI2Bw {\n margin-top: 0;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS {\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS span {\n margin-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n display: flex;\n }\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF a {\n display: flex;\n align-items: center;\n}\n\n.style-module_SuccessPageCartSummary__pjgea {\n background-color: #fff;\n}\n\n.style-module_OpenCouponCodeMain__lZtb3 {\n display: flex;\n}\n.style-module_OpenCouponCodeMain__lZtb3 input {\n width: calc(100% - 12px);\n}\n.style-module_OpenCouponCodeMain__lZtb3.style-module_OpenCouponCodeMainWithMb__DqVmh {\n margin-bottom: 12px;\n}\n\n.style-module_InfoRowGiftCardMobile__Kp-zh {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh:last-of-type {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 .style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_AppliedCoupon__UNo1h {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n\n.style-module_StoreCreditTag__D1TtS {\n color: var(--checkout-secondary-text-color);\n}");export{n as default};
|
|
1
|
+
import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={ExpandHeader:"style-module_ExpandHeader__LQwWm",Left:"style-module_Left__-N12h",Price:"style-module_Price__OT1Wh",PriceText:"style-module_PriceText__bq1pk",ArrowDown:"style-module_ArrowDown__YhRny",Rotated:"style-module_Rotated__ZPfId",CartSummary:"style-module_CartSummary__m77tn",OpenCouponCodeSummary:"style-module_OpenCouponCodeSummary__ua9wx",HideOnDesktop:"style-module_HideOnDesktop__Vs5AV",ItemsContainer:"style-module_ItemsContainer__QFKQV",DetailsContainer:"style-module_DetailsContainer__PK33m",SuccessPageDetailContainer:"style-module_SuccessPageDetailContainer__-p8kJ",Details:"style-module_Details__hWJ9o",Divider:"style-module_Divider__MNDti",ActionTextBtn:"style-module_ActionTextBtn__7yua4",NoUnderline:"style-module_NoUnderline__FphKn",Light:"style-module_Light__dIcW-",SubTotalInfo:"style-module_SubTotalInfo__JMqK9",InfoRow:"style-module_InfoRow__oAvZS",hideMb:"style-module_hideMb__j7VBr",LoyaltyPoints:"style-module_LoyaltyPoints__3gd4k",Label:"style-module_Label__28Bij",Value:"style-module_Value__7rELF",TotalContainer:"style-module_TotalContainer__sGR7d",TitleContainer:"style-module_TitleContainer__LgmJI",Title:"style-module_Title__oMVSD",TotalPricesContainer:"style-module_TotalPricesContainer__-PsOD",TotalPrice:"style-module_TotalPrice__QBdM1",TotalTax:"style-module_TotalTax__9pA4Y",SuccessPageTotalContainer:"style-module_SuccessPageTotalContainer__NZGFF",AppliedCoupon:"style-module_AppliedCoupon__UNo1h",AppliedCouponBgGray:"style-module_AppliedCouponBgGray__MYoYu",NotClosed:"style-module_NotClosed__E-N9z",CouponCode:"style-module_CouponCode__UKPmf",ClearCoupon:"style-module_ClearCoupon__CBAzl",NotificationContainer:"style-module_NotificationContainer__AXfJT",CheckoutNoteContainer:"style-module_CheckoutNoteContainer__d-z4m",CheckoutNoteDisplay:"style-module_CheckoutNoteDisplay__DtnXo",Success:"style-module_Success__VI2Bw",GiftLabel:"style-module_GiftLabel__cazrS",PoweredBy:"style-module_PoweredBy__DKBJF",SuccessPageCartSummary:"style-module_SuccessPageCartSummary__pjgea",OpenCouponCodeMain:"style-module_OpenCouponCodeMain__lZtb3",OpenCouponCodeMainWithMb:"style-module_OpenCouponCodeMainWithMb__DqVmh",InfoRowGiftCardMobile:"style-module_InfoRowGiftCardMobile__Kp-zh",StoreCreditTag:"style-module_StoreCreditTag__D1TtS",LoyaltyPointsContainer:"style-module_LoyaltyPointsContainer__NDR6k",LoyaltyPointsTitle:"style-module_LoyaltyPointsTitle__4rwqg",LoyaltyPointsLines:"style-module_LoyaltyPointsLines__rAHEY",LoyaltyPointsLine:"style-module_LoyaltyPointsLine__WPMxS",LoyaltyPointsLineTitle:"style-module_LoyaltyPointsLineTitle__ikVAx",LoyaltyPointsLineTitleText:"style-module_LoyaltyPointsLineTitleText__bngZY",LoyaltyPointsLineValue:"style-module_LoyaltyPointsLineValue__EDVfX",LoyaltyPointsLineAll:"style-module_LoyaltyPointsLineAll__RHBd4",LoyaltyPointsLineAllContainer:"style-module_LoyaltyPointsLineAllContainer__IX7I0",LoyaltyPointsLinesModalContainer:"style-module_LoyaltyPointsLinesModalContainer__cjW0h",LoyaltyPointsLinesModalContainerVisible:"style-module_LoyaltyPointsLinesModalContainerVisible__4sXcV",LoyaltyPointsLinesModalContainerClosing:"style-module_LoyaltyPointsLinesModalContainerClosing__IEpXx",LoyaltyPointsLinesModal:"style-module_LoyaltyPointsLinesModal__h1aD-",LoyaltyPointsLinesModalHeader:"style-module_LoyaltyPointsLinesModalHeader__-Zcj7",LoyaltyPointsLinesModalCloseButton:"style-module_LoyaltyPointsLinesModalCloseButton__nb3-5",LoyaltyPointsLinesModalHeaderTitle:"style-module_LoyaltyPointsLinesModalHeaderTitle__xcD59",LoyaltyPointsLinesModalHeaderDescription:"style-module_LoyaltyPointsLinesModalHeaderDescription__9N8ot",LoyaltyPointsLinesModalContent:"style-module_LoyaltyPointsLinesModalContent__hjwxz",LoyaltyPointsLinesModalContentItemHeader:"style-module_LoyaltyPointsLinesModalContentItemHeader__aQV4i",LoyaltyPointsLinesModalContentItemHeaderValue:"style-module_LoyaltyPointsLinesModalContentItemHeaderValue__T9r6z",LoyaltyPointsLinesModalContentItem:"style-module_LoyaltyPointsLinesModalContentItem__r1qmE",LoyaltyPointsLinesModalContentItemFreeProduct:"style-module_LoyaltyPointsLinesModalContentItemFreeProduct__aAUrx",LoyaltyPointsLinesModalContentItemsFirst:"style-module_LoyaltyPointsLinesModalContentItemsFirst__Sj8rF",LoyaltyPointsLinesModalContentItemsLast:"style-module_LoyaltyPointsLinesModalContentItemsLast__gc8cc",LoyaltyPointsLinesModalContentItemHeaderValueIcon:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueIcon__c4CR6",LoyaltyPointsLinesModalContentItemHeaderValueIconContainer:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconContainer__26F-5",LoyaltyPointsLinesModalContentItemHeaderValueTextMain:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMain__aft8A",LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle__TQC3n",LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue__TSz0-",LoyaltyPointsLinesModalContentItemButton:"style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7",LoyaltyPointsGiftModalOverlay:"style-module_LoyaltyPointsGiftModalOverlay__xeQyA",LoyaltyPointsGiftModal:"style-module_LoyaltyPointsGiftModal__C7rhN",LoyaltyGiftSlideIn:"style-module_LoyaltyGiftSlideIn__sZfMa",LoyaltyPointsGiftModalClosing:"style-module_LoyaltyPointsGiftModalClosing__cEwwl",LoyaltyGiftSlideOut:"style-module_LoyaltyGiftSlideOut__uTEqW",LoyaltyPointsGiftModalHeader:"style-module_LoyaltyPointsGiftModalHeader__54vAK",LoyaltyPointsGiftModalTitle:"style-module_LoyaltyPointsGiftModalTitle__qnzx3",LoyaltyPointsGiftModalDescription:"style-module_LoyaltyPointsGiftModalDescription__80l9h",LoyaltyPointsGiftModalClose:"style-module_LoyaltyPointsGiftModalClose__bsSO2",LoyaltyPointsGiftModalBody:"style-module_LoyaltyPointsGiftModalBody__aLoj3",LoyaltyPointsLinesModalContentItemHeaderValueIconImage:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0",LoyaltyPointsLinesModalContentItemPoint:"style-module_LoyaltyPointsLinesModalContentItemPoint__xvR23",LoyaltyPointsLinesModalContentItemPointMobile:"style-module_LoyaltyPointsLinesModalContentItemPointMobile__AUrpP",LoyaltyPointsLinesModalContentItemSlider:"style-module_LoyaltyPointsLinesModalContentItemSlider__iWpgU",LoyaltyPointsLinesModalSliderInfo:"style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X",LoyaltyPointsLinesModalSliderInfoSlider:"style-module_LoyaltyPointsLinesModalSliderInfoSlider__tnBdu",LoyaltyPointsLinesModalSliderInfoSliderValue:"style-module_LoyaltyPointsLinesModalSliderInfoSliderValue__oG1fM",LoyaltyPointsLinesModalSliderInfoSliderValueText:"style-module_LoyaltyPointsLinesModalSliderInfoSliderValueText__fnKQh",LoyaltyPointsLinesModalSliderInfoSliderValueTextValue:"style-module_LoyaltyPointsLinesModalSliderInfoSliderValueTextValue__lGm4z",LoyaltyPointsLinesModalSliderInput:"style-module_LoyaltyPointsLinesModalSliderInput__sgZrN",LoyaltyPointsLinesModalSliderInfoValue:"style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6",LoyaltyEarningMethod:"style-module_LoyaltyEarningMethod__UNcvo",LoyaltyEarningMethodTitle:"style-module_LoyaltyEarningMethodTitle__d5p2X",LoyaltyPointsLineOneRow:"style-module_LoyaltyPointsLineOneRow__YdQkF",LoyaltyPointsLineOneRowTitle:"style-module_LoyaltyPointsLineOneRowTitle__V04li",LoyaltyPointsLineOneRowTitleText:"style-module_LoyaltyPointsLineOneRowTitleText__y3UOy",AppliedCouponLoyalty:"style-module_AppliedCouponLoyalty__p2Mi0",LoyaltyPointsLineIcon:"style-module_LoyaltyPointsLineIcon__ECQ1W",ClearCouponLoyalty:"style-module_ClearCouponLoyalty__vRYH4",ValueLoyalty:"style-module_ValueLoyalty__jdjW9",LoyaltyPointSpending:"style-module_LoyaltyPointSpending__qam9Z",LoyaltyPointsLineContainer:"style-module_LoyaltyPointsLineContainer__85Cvs",LoyaltyPointsLinesModalContentItemButtonContainerMobile:"style-module_LoyaltyPointsLinesModalContentItemButtonContainerMobile__iNiif"};e(".style-module_ExpandHeader__LQwWm {\n position: sticky;\n top: 0;\n z-index: 10;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-top: 1px solid var(--checkout-border-color);\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom 0.3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color);\n}\n@media only screen and (min-width: 1000px) {\n .style-module_ExpandHeader__LQwWm {\n display: none;\n }\n}\n.style-module_ExpandHeader__LQwWm .style-module_Left__-N12h {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh {\n font-weight: 600;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_PriceText__bq1pk {\n font-weight: 600;\n margin-right: 8px;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny {\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny.style-module_Rotated__ZPfId {\n transform: rotate(-180deg);\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn {\n width: 100%;\n background-color: var(--checkout-card-bg-color);\n }\n .style-module_CartSummary__m77tn.style-module_OpenCouponCodeSummary__ua9wx {\n background-color: transparent;\n }\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CartSummary__m77tn.style-module_HideOnDesktop__Vs5AV {\n display: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: 50vh;\n overflow-y: auto;\n margin-bottom: 24px;\n /* Track */\n /* Handle */\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: unset;\n overflow-y: unset;\n margin-bottom: 0;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar {\n width: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-track {\n box-shadow: inset 0 0 20px 20px #e3e7ef;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 20px 20px #000000;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n overflow: hidden;\n width: 100%;\n transition: height 0.3s ease-in-out;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n padding: 0 24px;\n box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ {\n padding: 0;\n box-shadow: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ .style-module_Details__hWJ9o {\n padding-top: 0;\n}\n.style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n overflow: hidden;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n padding-top: 24px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_Divider__MNDti {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_LoyaltyPoints__3gd4k {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS:last-of-type {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d {\n display: flex;\n justify-content: space-between;\n margin-top: 12px;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TitleContainer__LgmJI .style-module_Title__oMVSD {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPricesContainer__-PsOD {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPrice__QBdM1 {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalTax__9pA4Y {\n font-size: 14px;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF {\n height: unset;\n margin-top: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_Title__oMVSD {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_TotalPrice__QBdM1 {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 2px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_AppliedCouponBgGray__MYoYu {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n margin-left: 6px;\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n.style-module_CartSummary__m77tn .style-module_NotificationContainer__AXfJT {\n margin-bottom: 14px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_Title__oMVSD {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_CheckoutNoteDisplay__DtnXo {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m.style-module_Success__VI2Bw {\n margin-top: 0;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS {\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS span {\n margin-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none;\n margin-top: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n display: flex;\n }\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF a {\n display: flex;\n align-items: center;\n}\n\n.style-module_SuccessPageCartSummary__pjgea {\n background-color: #fff;\n}\n\n.style-module_OpenCouponCodeMain__lZtb3 {\n display: flex;\n}\n.style-module_OpenCouponCodeMain__lZtb3 input {\n width: calc(100% - 12px);\n}\n.style-module_OpenCouponCodeMain__lZtb3.style-module_OpenCouponCodeMainWithMb__DqVmh {\n margin-bottom: 12px;\n}\n\n.style-module_InfoRowGiftCardMobile__Kp-zh {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh:last-of-type {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 .style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_AppliedCoupon__UNo1h {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n\n.style-module_StoreCreditTag__D1TtS {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsContainer__NDR6k {\n margin-bottom: 24px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsContainer__NDR6k {\n margin-bottom: 0;\n margin-top: 16px;\n }\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsTitle__4rwqg {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 8px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY {\n overflow: auto;\n }\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLine__WPMxS {\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n padding: 10px 12px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n justify-content: center;\n cursor: pointer;\n white-space: nowrap;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineTitle__ikVAx {\n display: flex;\n gap: 6px;\n align-items: center;\n margin-bottom: 2px;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineTitle__ikVAx .style-module_LoyaltyPointsLineTitleText__bngZY {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n letter-spacing: 0;\n white-space: nowrap;\n width: 100px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineValue__EDVfX {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n letter-spacing: 0;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineAll__RHBd4 {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineAllContainer__IX7I0 {\n display: flex;\n gap: 6px;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n align-self: center;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineAllContainer__IX7I0 svg path {\n stroke: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLinesModalContainer__cjW0h {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(39, 39, 39, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n opacity: 0;\n transition: opacity 0.25s ease-out;\n pointer-events: none;\n}\n.style-module_LoyaltyPointsLinesModalContainer__cjW0h.style-module_LoyaltyPointsLinesModalContainerVisible__4sXcV {\n opacity: 1;\n pointer-events: auto;\n}\n.style-module_LoyaltyPointsLinesModalContainer__cjW0h.style-module_LoyaltyPointsLinesModalContainerClosing__IEpXx {\n opacity: 0;\n pointer-events: none;\n}\n\n.style-module_LoyaltyPointsLinesModal__h1aD- {\n width: 720px;\n border-radius: 8px;\n background-color: #fff;\n position: relative;\n overflow: hidden;\n transform: scale(0.96);\n transition: transform 0.25s ease-out;\n}\n.style-module_LoyaltyPointsLinesModalContainerVisible__4sXcV .style-module_LoyaltyPointsLinesModal__h1aD- {\n transform: scale(1);\n}\n.style-module_LoyaltyPointsLinesModalContainerClosing__IEpXx .style-module_LoyaltyPointsLinesModal__h1aD- {\n transform: scale(0.96);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- {\n width: 96%;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalHeader__-Zcj7 {\n border-bottom: 1px solid var(--checkout-border-color);\n padding: 24px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalCloseButton__nb3-5 {\n position: absolute;\n top: 16px;\n right: 16px;\n width: 24px;\n height: 24px;\n cursor: pointer;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalHeaderTitle__xcD59 {\n font-size: 22px;\n font-weight: 500;\n line-height: 32px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 4px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalHeaderDescription__9N8ot {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContent__hjwxz {\n padding: 24px;\n max-height: 650px;\n overflow: auto;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContent__hjwxz {\n max-height: 500px !important;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeader__aQV4i {\n display: flex;\n gap: 6px;\n align-items: center;\n margin-bottom: 16px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeader__aQV4i span {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValue__T9r6z {\n display: flex;\n gap: 4px;\n align-items: center;\n background-color: #f7f7f9;\n padding: 2px 6px;\n border-radius: 28px;\n line-height: 22px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItem__r1qmE {\n padding: 16px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--checkout-border-color);\n border-bottom: none;\n transition: background-color 0.3s ease;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItem__r1qmE:hover {\n background-color: #f7f7f9;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemFreeProduct__aAUrx {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemFreeProduct__aAUrx button {\n display: flex;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemsFirst__Sj8rF {\n border-top-right-radius: 8px;\n border-top-left-radius: 8px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemsLast__gc8cc {\n border-bottom-right-radius: 8px;\n border-bottom-left-radius: 8px;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIcon__c4CR6 {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconContainer__26F-5 {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMain__aft8A {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMain__aft8A {\n width: 72%;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle__TQC3n {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue__TSz0- {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7 {\n background-color: var(--checkout-button-bg-color);\n border-radius: 8px;\n padding: 8px 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n color: var(--checkout-button-text-color);\n outline: none;\n border: none;\n min-width: 123px;\n transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7 {\n min-width: unset;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7:disabled {\n background-color: #e3e8ef;\n color: var(--checkout-secondary-text-color);\n cursor: not-allowed;\n opacity: 0.8;\n}\n\n.style-module_LoyaltyPointsGiftModalOverlay__xeQyA {\n position: absolute;\n inset: 0;\n z-index: 10;\n display: flex;\n justify-content: flex-end;\n align-items: stretch;\n border-radius: 8px;\n}\n\n.style-module_LoyaltyPointsGiftModal__C7rhN {\n width: 100%;\n max-width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n transform: translateX(0);\n animation: style-module_LoyaltyGiftSlideIn__sZfMa 0.18s ease-out forwards;\n}\n.style-module_LoyaltyPointsGiftModal__C7rhN.style-module_LoyaltyPointsGiftModalClosing__cEwwl {\n animation: style-module_LoyaltyGiftSlideOut__uTEqW 0.18s ease-in forwards;\n}\n\n@keyframes style-module_LoyaltyGiftSlideOut__uTEqW {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes style-module_LoyaltyGiftSlideIn__sZfMa {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0%);\n }\n}\n.style-module_LoyaltyPointsGiftModalHeader__54vAK {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n padding: 20px 24px;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n\n.style-module_LoyaltyPointsGiftModalTitle__qnzx3 {\n font-size: 18px;\n font-weight: 600;\n line-height: 26px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsGiftModalDescription__80l9h {\n margin-top: 4px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsGiftModalClose__bsSO2 {\n width: 28px;\n height: 28px;\n border-radius: 999px;\n border: none;\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsGiftModalClose__bsSO2:hover {\n background-color: var(--checkout-secondary-bg-color);\n}\n\n.style-module_LoyaltyPointsGiftModalBody__aLoj3 {\n padding: 16px 24px 24px;\n overflow-y: auto;\n flex: 1;\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 {\n width: 72px;\n height: 72px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 {\n width: 42px;\n height: 42px;\n }\n}\n.style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 img {\n width: 72px;\n height: 72px;\n object-fit: contain;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 img {\n width: 42px;\n height: 42px;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemPoint__xvR23 {\n border-radius: 12px;\n padding: 2px 8px;\n border: 1px solid var(--checkout-border-color);\n background-color: #f7f7f9;\n width: fit-content;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemPoint__xvR23 {\n display: none;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemPointMobile__AUrpP {\n border-radius: 12px;\n padding: 2px 8px;\n border: 1px solid var(--checkout-border-color);\n background-color: #f7f7f9;\n width: fit-content;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemPointMobile__AUrpP {\n display: flex;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemSlider__iWpgU {\n height: 152px;\n background-color: #f7f7f9;\n padding: 32px 48px;\n border-radius: 8px;\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemSlider__iWpgU {\n padding: 32px 16px;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n.style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X span {\n font-size: 20px;\n font-weight: 500;\n line-height: 32px;\n color: var(--checkout-primary-text-color);\n white-space: nowrap;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X span {\n font-size: 18px !important;\n line-height: 30px !important;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSlider__tnBdu {\n position: relative;\n width: 100%;\n height: 24px;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n margin-top: 24px;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSliderValue__oG1fM {\n position: absolute;\n left: 0;\n right: 0;\n height: 6px;\n border-radius: 3px;\n background-color: #e3e8ef;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSliderValueText__fnKQh {\n position: absolute;\n left: 0;\n height: 6px;\n width: 0;\n border-radius: 3px;\n background: linear-gradient(90deg, #36398e 0%, #6d76cb 100%);\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSliderValueTextValue__lGm4z {\n position: absolute;\n left: 0;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 20px;\n height: 20px;\n border-radius: 50%;\n background: #ffffff;\n border: 2px solid #ffffff;\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1), 0 0.5px 4px rgba(0, 0, 0, 0.1);\n z-index: 2;\n pointer-events: none;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInput__sgZrN {\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n z-index: 3;\n margin: 0;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 {\n display: flex;\n border-radius: 8px;\n background-color: #fff;\n padding: 2px 8px;\n border: 0.6px solid #cfced3;\n gap: 8px;\n align-items: center;\n}\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 svg {\n width: 22px;\n height: 22px;\n}\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 svg path {\n stroke: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 span {\n font-size: 20px;\n font-weight: 500;\n line-height: 32px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyEarningMethod__UNcvo {\n margin-top: 2px;\n}\n.style-module_LoyaltyEarningMethod__UNcvo .style-module_LoyaltyEarningMethodTitle__d5p2X {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n display: flex;\n gap: 4px;\n align-items: center;\n}\n.style-module_LoyaltyEarningMethod__UNcvo .style-module_LoyaltyEarningMethodTitle__d5p2X span {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineOneRow__YdQkF {\n border-radius: 8px;\n padding: 10px 12px;\n background-color: #fff;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n border: 1px solid var(--checkout-border-color);\n align-items: center;\n}\n.style-module_LoyaltyPointsLineOneRow__YdQkF svg path {\n stroke: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineOneRowTitle__V04li {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.style-module_LoyaltyPointsLineOneRowTitleText__y3UOy {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_AppliedCouponLoyalty__p2Mi0 {\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n padding: 4px 8px;\n background-color: #fff;\n display: flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n line-height: 20px;\n}\n.style-module_AppliedCouponLoyalty__p2Mi0 .style-module_CouponCode__UKPmf {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineIcon__ECQ1W svg path {\n stroke: var(--checkout-secondary-text-color);\n}\n\n.style-module_ClearCouponLoyalty__vRYH4 {\n width: 20px;\n height: 20px;\n}\n\n.style-module_ClearCouponLoyalty__vRYH4 svg {\n width: 20px;\n height: 20px;\n}\n.style-module_ClearCouponLoyalty__vRYH4 svg path {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_ValueLoyalty__jdjW9 {\n color: var(--checkout-error-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_LoyaltyPointSpending__qam9Z {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsLineContainer__85Cvs {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLineContainer__85Cvs {\n flex-direction: column;\n gap: 2px;\n align-items: flex-start;\n }\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemButtonContainerMobile__iNiif {\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n }\n}");export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as r}from"mobx-react-lite";import a from"./check.js";import o from"./style.module.scss.js";var c=r((function(r){var c=r.value,t=r.label,i=r.hasError,l=r.removePadding,n=r.onChange,m=[o.CheckboxBorder],
|
|
1
|
+
import*as e from"react";import{observer as r}from"mobx-react-lite";import a from"./check.js";import o from"./style.module.scss.js";var c=r((function(r){var c=r.value,t=r.label,i=r.hasError,l=r.removePadding,n=r.onChange,m=r.id,s=[o.CheckboxBorder],d=[o.CheckboxLabel],h=[o.CheckboxTick];return c&&(s.push(o.Checked),h.push(o.Visible)),i&&d.push(o.CheckboxLabelError),e.createElement("div",{className:[o.CheckboxWrapper,l?o.WithoutPadding:""].join(" "),onClick:function(){n(!c)}},e.createElement("div",{className:o.CheckboxContainer},e.createElement("div",{className:s.join(" ")}),e.createElement("div",{className:h.join(" ")},e.createElement(a,null))),!!t&&e.createElement("div",{id:m,className:d.join(" ")},t))}));export{c as Checkbox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as e}from"mobx";var t=function(){function t(t){void 0===t&&(t={});var r=this;this.installmentCount=1,this.toInput=function(){var e=r.expirationDate.split(" / "),t=parseInt(e[0]),
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";var t,r=(t=[0,2,4,6,8,1,3,5,7,9],function(e){for(var r,a=e.replace(/\D/g,""),n=a.length,i=1,o=0;n;)r=parseInt(a.charAt(--n),10),o+=(i^=1)?t[r]:r;return!!o&&o%10==0});function a(e){var t=null==e?void 0:e.match(/^(\d{2})\s*\/\s*(\d{2})$/);if(!t)return!1;var r=parseInt(t[1],10),a=parseInt(t[2],10);if(r<1||r>12)return!1;var n=2e3+a,i=new Date,o=i.getFullYear(),u=i.getMonth()+1;return n>o||n===o&&r>=u}var n=function(){function t(t){void 0===t&&(t={});var r=this;this.installmentCount=1,this.toInput=function(){var e=r.expirationDate.split(" / "),t=parseInt(e[0]),a=parseInt(e[1]);return{cardNumber:r.cardNumber.split(" ").join(""),cardHolderName:r.cardHolderName,cvv:r.cvv,expiredMonth:t,expiredYear:a,installmentCount:r.installmentCount,threeDSecure:r.threeDSecure}},this.cardNumber=t.cardNumber||"",this.cardHolderName=t.cardHolderName||"",this.expirationDate=t.expirationDate||"",this.cvv=t.cvv||"",this.installmentCount=t.installmentCount||1,this.threeDSecure=t.threeDSecure||!1,e(this)}return Object.defineProperty(t.prototype,"validationResult",{get:function(){var e,t,n=null!==(t=null===(e=this.cardNumber)||void 0===e?void 0:e.replace(/\D/g,""))&&void 0!==t?t:"";return{cardNumber:!!this.cardNumber&&(19===this.cardNumber.length||17===this.cardNumber.length)&&r(n),cardHolderName:!!this.cardHolderName,expirationDate:!!this.expirationDate&&7===this.expirationDate.length&&a(this.expirationDate),cvv:!!this.cvv}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return Object.values(this.validationResult).every((function(e){return e}))},enumerable:!1,configurable:!0}),t}();export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import s from"../../style.module.scss.js";import r from"../select-box/index.js";import{AddressForm as d}from"../address-form/index.js";import{Checkbox as i}from"../checkbox/index.js";import{FormItem as o}from"../form-item/index.js";import{FormItemType as a}from"../form-item/model.js";import n from"./style.module.scss.js";import l from"../../styles/common.module.scss.js";import{Button as c}from"../button/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{useTranslation as u}from"../../../../utils/i18n.js";import v from"../delivery-methods/index.js";import{CheckoutStep as p}from"../../model.js";var h=t((function(t){var d,i=t.vm,o=t.showBillingAddressOnShippingStep,a=u().t,h=e.useMemo((function(){return e.createElement("div",null,e.createElement(g,{vm:i}),e.createElement(k,{vm:i}))}),[i]),C=e.useMemo((function(){return e.createElement("div",null,e.createElement(E,{vm:i}))}),[i]),f=e.useState("-1"),A=f[0],y=f[1];e.useEffect((function(){i.vm.checkout.stockLocationId&&y(i.vm.checkout.stockLocationId)}),[]);var b=function(e){if(!e.address)return"";var t=[];return e.address.address&&t.push(e.address.address),e.address.postalCode&&t.push(e.address.postalCode),e.address.district&&e.address.district.name&&t.push(e.address.district.name),e.address.city&&e.address.city.name&&t.push(e.address.city.name),e.address.state&&e.address.state.name&&"Default"!==e.address.state.name&&t.push(e.address.state.name),e.address.country&&e.address.country.name&&t.push(e.address.country.name),t.join(", ")};return e.createElement(e.Fragment,null,!!m.getPickupStockLocationIds()&&!i.vm.isDigitalOnly&&i.vm.availableStockLocations.length>0&&i.vm.step!==p.PAYMENT&&!o&&e.createElement(e.Fragment,null,e.createElement("div",{className:l.FormSectionTitle},e.createElement("div",{className:l.Title},a("checkout-page:deliveryMethod"))),e.createElement(v,{deliveryMethod:i.vm.deliveryMethod,onClick:function(e){"address"===e&&y("-1"),i.vm.onDeliveryMethodChange(e)}})),e.createElement("div",{className:l.FormSectionTitle},"address"===i.vm.deliveryMethod?e.createElement("div",{className:l.Title},i.editingCustomerAddress?a("checkout-page:editAddress"):"billing"===i.addressType?a("checkout-page:billingAddress"):a("checkout-page:shippingAddress")):i.vm.step===p.PAYMENT||o?e.createElement("div",{className:l.Title},a("checkout-page:billingAddress")):e.createElement("div",{className:l.Title},a("checkout-page:pickUpLocation"),e.createElement("span",{className:n.ErrorMessage},i.vm.isErrorsVisible&&!i.vm.checkout.stockLocationId&&a("checkout-page:errorPickupLocationRequired"))),!!i.editingCustomerAddress&&e.createElement("div",{className:n.CancelEdit,onClick:i.onCancelEditAddressClick},a("checkout-page:actions.cancel"))),!!i.vm.store.customerStore.customer&&!i.editingCustomerAddress&&("address"===i.vm.deliveryMethod||i.vm.step===p.PAYMENT&&"in-store"===i.vm.deliveryMethod||o)&&e.createElement("div",{className:s.RowPB},null===(d=i.vm.customerAddresses)||void 0===d?void 0:d.map((function(t){return e.createElement(r,{key:t.id,label:t.title||"",isSelected:t.id===i.selectedAddressId,rightContent:e.createElement("div",{onClick:function(){return i.onEditAddressClick(t)}},a("checkout-page:actions.edit")),bottomContent:e.createElement("div",{className:n.AddressContent},e.createElement("div",{className:n.AddressText},t.firstName," ",t.lastName),e.createElement("div",{className:n.AddressText},t.addressText)),bottomContentVisible:!0,hasError:!t.isValidAddress,errorText:a("checkout-page:missingAddressFields"),onClick:function(){return t.id!==i.selectedAddressId&&i.onAddressSelect(t)}})})),e.createElement(r,{label:a("checkout-page:newAddress"),isSelected:"-1"===i.selectedAddressId,bottomContent:h,onClick:function(){return"-1"!==i.selectedAddressId&&i.onAddressSelect()}})),i.vm.store.customerStore.customer||i.vm.step!==p.INFO||"address"!==i.vm.deliveryMethod?(o&&!i.vm.store.customerStore.customer||i.vm.step===p.PAYMENT&&!i.vm.store.customerStore.customer)&&h:h,"in-store"===i.vm.deliveryMethod&&!o&&e.createElement("div",{className:s.RowPB},i.vm.stockLocations.map((function(t){return function(e){return e.address&&e.address.address&&e.address.city&&e.address.country&&i.vm.availableStockLocations.find((function(t){return t.id===e.id}))}(t)&&e.createElement(r,{key:t.id,label:t.name||"",isSelected:A===t.id,bottomContent:e.createElement("div",null,e.createElement("div",{className:n.AddressText},b(t)),t.deliveryTime&&e.createElement("div",{className:n.DeliveryTime},a("checkout-page:stockLocation.deliveryTime.".concat(t.deliveryTime)))),bottomContentVisible:!0,onClick:function(){i.vm.onStockLocationChange(t),y(t.id)}})}))),"in-store"===i.vm.deliveryMethod&&i.vm.step!==p.PAYMENT&&!o&&e.createElement(e.Fragment,null,e.createElement("div",{className:l.FormSectionTitle},e.createElement("div",{className:l.Title},a("checkout-page:recipientsInfo"))),C),!!i.editingCustomerAddress&&e.createElement(g,{vm:i}),!!i.editingCustomerAddress&&e.createElement("div",{className:n.EditAddressActions},e.createElement(c,{style:{width:"100%"},text:a("checkout-page:deleteAddress"),isLine:!0,isLoading:i.isDeleteAddressLoading,isDisabled:i.isEditAddressLoading,onClick:i.onDeleteAddressClick}),e.createElement(c,{style:{width:"100%",marginTop:i.vm.store.customerStore.customer?"0px":"32px"},text:a("checkout-page:actions.save"),isLoading:i.isEditAddressLoading,isDisabled:i.isDeleteAddressLoading,onClick:i.onSaveAddressClick})))})),g=t((function(t){var s,r=t.vm,i=e.useRef(null),o=r.isEditAddressErrorsVisible||r.vm.isErrorsVisible;e.useEffect((function(){o&&i.current&&i.current.scrollIntoView({behavior:"smooth",block:"center"})}),[o]);var a=(!!(null===(s=r.vm.checkout.customer)||void 0===s?void 0:s.isGuestCheckout)||!!r.vm.store.customerStore.customer)&&r.vm.isCorporateInvoiceVisible&&!!r.vm.checkoutSettings.showCompanyInfoInShippingAddress;return e.createElement("div",{ref:i},e.createElement(d,{address:r.editingCustomerAddress||r.address,isErrorsVisible:o,allowedCountryIds:r.vm.shippingCountryIds||void 0,allowCorporateInfo:"billing"===r.addressType?"in-store"===r.vm.deliveryMethod||(r.vm.isDigitalOnly?a:!a):a,firstNameChangeCallback:r.firstNameChangeCallback,lastNameChangeCallback:r.lastNameChangeCallback,allowTitleChange:!!r.editingCustomerAddress,deliveryMethod:"address",isShippingAddress:"shipping"===r.addressType}))})),E=t((function(t){var s=t.vm;return e.createElement(d,{address:s.editingCustomerAddress||s.address,isErrorsVisible:s.isEditAddressErrorsVisible||s.vm.isErrorsVisible,firstNameChangeCallback:s.firstNameChangeCallback,lastNameChangeCallback:s.lastNameChangeCallback,deliveryMethod:"in-store"})})),k=t((function(t){var s=t.vm,r=u().t;return s.vm.store.customerStore.customer&&"-1"===s.selectedAddressId?e.createElement("div",{style:{marginTop:"12px"}},e.createElement(i,{value:s.vm.shouldSaveAddress,label:r("checkout-page:saveAddressCta"),onChange:s.vm.setShouldSaveAddress}),s.vm.shouldSaveAddress&&e.createElement("div",{style:{marginTop:"8px"}},e.createElement(o,{name:"addressTitle",type:a.TEXT,label:r("checkout-page:addressTitle"),value:s.vm.addressTitle,onChange:s.vm.setAddressTitle}))):null}));export{g as CustomerAddressForm,E as RecipientForm,k as SaveAddressCheckboxAndTitle,h as default};
|