@ikas/storefront 2.0.32 → 2.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
  2. package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
  3. package/build/analytics/analytics.js +1 -1
  4. package/build/analytics/googleTagManager.js +1 -1
  5. package/build/analytics/ikas.js +1 -1
  6. package/build/api/brand/index.js +1 -1
  7. package/build/api/category/index.js +1 -1
  8. package/build/api/checkout/index.js +1 -1
  9. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +1 -1
  10. package/build/api/customer/index.js +1 -1
  11. package/build/api/customer-review/index.js +1 -1
  12. package/build/api/customer-review-summary/__generated__/listCustomerReviewSummary.d.ts +56 -0
  13. package/build/api/customer-review-summary/index.d.ts +22 -0
  14. package/build/api/customer-review-summary/index.js +1 -0
  15. package/build/api/favorite-product/index.js +1 -1
  16. package/build/api/html-meta-data/index.js +1 -1
  17. package/build/api/index.d.ts +1 -0
  18. package/build/api/merchant/index.js +1 -1
  19. package/build/api/product-search/index.js +1 -1
  20. package/build/components/checkout/components/address-form/model.js +1 -1
  21. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  22. package/build/components/checkout/components/credit-card-form/index.js +1 -1
  23. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  24. package/build/components/checkout/index.js +1 -1
  25. package/build/components/checkout/model.js +1 -1
  26. package/build/components/checkout/steps/step-success/index.js +1 -1
  27. package/build/components/page/head.js +1 -1
  28. package/build/components/page/index.js +1 -1
  29. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  30. package/build/components/page-editor/model.js +1 -1
  31. package/build/ikas.js +7 -7
  32. package/build/index.js +1 -1
  33. package/build/models/data/customer-review-summary/index.d.ts +16 -0
  34. package/build/models/data/customer-review-summary/index.js +1 -0
  35. package/build/models/data/index.d.ts +1 -0
  36. package/build/models/data/product/variant/index.js +1 -1
  37. package/build/models/data/storefront/theme-localization/index.js +1 -1
  38. package/build/models/theme/page/component/prop-value/product-list.js +1 -1
  39. package/build/models/ui/blog-category-list/index.js +1 -1
  40. package/build/models/ui/blog-list/index.js +1 -1
  41. package/build/models/ui/brand-list/index.js +1 -1
  42. package/build/models/ui/category-list/index.js +1 -1
  43. package/build/models/ui/customer-review-list/index.js +1 -1
  44. package/build/models/ui/customer-review-summary-list/index.d.ts +43 -0
  45. package/build/models/ui/customer-review-summary-list/index.js +1 -0
  46. package/build/models/ui/index.d.ts +1 -0
  47. package/build/models/ui/product-detail/index.d.ts +2 -1
  48. package/build/models/ui/product-detail/index.js +1 -1
  49. package/build/models/ui/product-list/index.js +1 -1
  50. package/build/models/ui/raffle-list/index.js +1 -1
  51. package/build/models/ui/validator/form/address.js +1 -1
  52. package/build/pages/404.js +1 -1
  53. package/build/pages/_slug_/index.js +1 -1
  54. package/build/pages/account/addresses.js +1 -1
  55. package/build/pages/account/favorite-products.js +1 -1
  56. package/build/pages/account/forgot-password.js +1 -1
  57. package/build/pages/account/index.js +1 -1
  58. package/build/pages/account/login.js +1 -1
  59. package/build/pages/account/orders/_id_.js +1 -1
  60. package/build/pages/account/orders/index.js +1 -1
  61. package/build/pages/account/raffles.js +1 -1
  62. package/build/pages/account/recover-password.js +1 -1
  63. package/build/pages/account/register.js +1 -1
  64. package/build/pages/blog/_slug_.js +1 -1
  65. package/build/pages/blog/index.js +1 -1
  66. package/build/pages/cart.js +1 -1
  67. package/build/pages/checkout.js +1 -1
  68. package/build/pages/home.js +1 -1
  69. package/build/pages/pages/_slug_.js +1 -1
  70. package/build/pages/raffle/_slug_.js +1 -1
  71. package/build/pages/raffle/index.js +1 -1
  72. package/build/pages/search.js +1 -1
  73. package/build/providers/helpers/raffles.js +1 -1
  74. package/build/providers/page-data-get.js +1 -1
  75. package/build/providers/page-data-init.js +1 -1
  76. package/build/providers/page-data-next.js +1 -1
  77. package/build/providers/placeholders.js +1 -1
  78. package/build/providers/prop-value/attribute-list.js +1 -1
  79. package/build/providers/prop-value/attribute.js +1 -1
  80. package/build/providers/prop-value/blog-category-list.js +1 -1
  81. package/build/providers/prop-value/blog-category.js +1 -1
  82. package/build/providers/prop-value/blog-list.js +1 -1
  83. package/build/providers/prop-value/blog.js +1 -1
  84. package/build/providers/prop-value/brand-list.js +1 -1
  85. package/build/providers/prop-value/brand.js +1 -1
  86. package/build/providers/prop-value/category-list.js +1 -1
  87. package/build/providers/prop-value/category.js +1 -1
  88. package/build/providers/prop-value/custom.js +1 -1
  89. package/build/providers/prop-value/image-list.js +1 -1
  90. package/build/providers/prop-value/image.js +1 -1
  91. package/build/providers/prop-value/link.js +1 -1
  92. package/build/providers/prop-value/product-detail.js +1 -1
  93. package/build/providers/prop-value/product-list.js +1 -1
  94. package/build/providers/prop-value/raffle-list.js +1 -1
  95. package/build/providers/prop-value/raffle.js +1 -1
  96. package/build/scripts/generators/types/index.js +1 -1
  97. package/build/store/base.js +1 -1
  98. package/build/store/cart.js +1 -1
  99. package/build/store/customer.js +1 -1
  100. package/package.json +1 -1
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as d}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as r}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(d,o({},t))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,r.REGISTER)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(r,o({},t))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,d.REGISTER)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import*as e from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{observer as m}from"mobx-react-lite";import{IkasNextPageDataProvider as s}from"../../providers/page-data-next.js";var a=m((function(t){return e.createElement(r,o({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),n=function(){return t(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,{paths:[],fallback:"blocking"}]}))}))},p=function(o){return t(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s.getStaticProps(o,void 0,[d.BLOG,d.BLOG_CATEGORY])];case 1:return[2,t.sent()]}}))}))};export{a as default,n as getStaticPaths,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import*as e from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{observer as m}from"mobx-react-lite";import{IkasNextPageDataProvider as s}from"../../providers/page-data-next.js";var a=m((function(t){return e.createElement(r,o({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),n=function(){return t(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,{paths:[],fallback:"blocking"}]}))}))},p=function(o){return t(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s.getStaticProps(o,void 0,[d.BLOG,d.BLOG_CATEGORY])];case 1:return[2,t.sent()]}}))}))};export{a as default,n as getStaticPaths,p as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as d}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as r}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(d,o({},t,{addOgpMetas:!0}))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,r.BLOG_INDEX)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as d}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as r}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(d,o({},t,{addOgpMetas:!0}))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,r.BLOG_INDEX)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as d}from"../components/page/index.js";import"../components/page/head.js";import"../components/page-editor/index.js";import"next/image.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"mobx";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as r}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(d,o({},t))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,r.CART)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as r}from"../components/page/index.js";import"../components/page/head.js";import"../components/page-editor/index.js";import"next/image.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as d}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(r,o({},t))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,d.CART)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
@@ -1 +1 @@
1
- import{__rest as t,__awaiter as o,__generator as e,__assign as r}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as s}from"mobx-react-lite";import d from"../components/checkout/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import{IkasMerchantSettings as n}from"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"mobx";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as m}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import{IkasCheckoutAPI as l}from"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasCheckoutSettings as a}from"../models/data/checkout-settings/index.js";import{IkasNextPageDataProvider as c}from"../providers/page-data-next.js";import{IkasStorefrontConfig as u}from"../storefront/index.js";import{useRouter as p}from"next/router.js";import{FullscreenLoading as j}from"../components/checkout/components/fullscreen-loading/index.js";import{initIkasEvents as x}from"../analytics/events.js";var f=s((function(s){var m=s.merchantSettingsStr,c=s.checkoutSettingsStr,f=s.customizationProps,h=s.configJson,v=t(s,["merchantSettingsStr","checkoutSettingsStr","customizationProps","configJson"]),g=p(),y=i.useState(),b=y[0],F=y[1];u.initWithJson(h,g);var k=u.store,E=i.useMemo((function(){return c?new a(JSON.parse(c)):new a}),[c]),C=i.useMemo((function(){return m?new n(JSON.parse(m)):null}),[m]);i.useEffect((function(){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==f?void 0:f.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==f?void 0:f.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==f?void 0:f.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==f?void 0:f.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==f?void 0:f.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==f?void 0:f.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==f?void 0:f.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==f?void 0:f.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==f?void 0:f.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==f?void 0:f.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==f?void 0:f.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==f?void 0:f.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==f?void 0:f.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==f?void 0:f.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==f?void 0:f.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==f?void 0:f.successLightColor)||"#F6FFED")}),[f]),i.useEffect((function(){k.checkLocalization(),P(),x()}),[]);var P=i.useCallback((function(){return o(void 0,void 0,void 0,(function(){var t,o,r;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(o=t.get("id"))?[4,l.getCheckoutById(o)]:[2,g.replace("/")];case 1:return(r=e.sent())?F(r):g.replace("/"),[2]}}))}))}),[]);return b?i.createElement(d,r({checkout:b,merchantSettings:C,checkoutSettings:E,customizationProps:f},v)):i.createElement(j,null)})),h=function(t){return o(void 0,void 0,void 0,(function(){return e(this,(function(o){switch(o.label){case 0:return[4,c.getStaticProps(t,m.CHECKOUT)];case 1:return[2,o.sent()]}}))}))};export{f as default,h as getStaticProps};
1
+ import{__rest as t,__awaiter as o,__generator as e,__assign as r}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as s}from"mobx-react-lite";import d from"../components/checkout/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import{IkasMerchantSettings as m}from"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as n}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import{IkasCheckoutAPI as a}from"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasCheckoutSettings as l}from"../models/data/checkout-settings/index.js";import{IkasNextPageDataProvider as c}from"../providers/page-data-next.js";import{IkasStorefrontConfig as u}from"../storefront/index.js";import{useRouter as p}from"next/router.js";import{FullscreenLoading as j}from"../components/checkout/components/fullscreen-loading/index.js";import{initIkasEvents as x}from"../analytics/events.js";var f=s((function(s){var n=s.merchantSettingsStr,c=s.checkoutSettingsStr,f=s.customizationProps,v=s.configJson,h=t(s,["merchantSettingsStr","checkoutSettingsStr","customizationProps","configJson"]),g=p(),y=i.useState(),b=y[0],F=y[1];u.initWithJson(v,g);var k=u.store,E=i.useMemo((function(){return c?new l(JSON.parse(c)):new l}),[c]),C=i.useMemo((function(){return n?new m(JSON.parse(n)):null}),[n]);i.useEffect((function(){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==f?void 0:f.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==f?void 0:f.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==f?void 0:f.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==f?void 0:f.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==f?void 0:f.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==f?void 0:f.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==f?void 0:f.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==f?void 0:f.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==f?void 0:f.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==f?void 0:f.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==f?void 0:f.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==f?void 0:f.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==f?void 0:f.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==f?void 0:f.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==f?void 0:f.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==f?void 0:f.successLightColor)||"#F6FFED")}),[f]),i.useEffect((function(){k.checkLocalization(),P(),x()}),[]);var P=i.useCallback((function(){return o(void 0,void 0,void 0,(function(){var t,o,r;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(o=t.get("id"))?[4,a.getCheckoutById(o)]:[2,g.replace("/")];case 1:return(r=e.sent())?F(r):g.replace("/"),[2]}}))}))}),[]);return b?i.createElement(d,r({checkout:b,merchantSettings:C,checkoutSettings:E,customizationProps:f},h)):i.createElement(j,null)})),v=function(t){return o(void 0,void 0,void 0,(function(){return e(this,(function(o){switch(o.label){case 0:return[4,c.getStaticProps(t,n.CHECKOUT)];case 1:return[2,o.sent()]}}))}))};export{f as default,v as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as d}from"mobx-react-lite";import{IkasPage as r}from"../components/page/index.js";import"../components/page/head.js";import"../components/page-editor/index.js";import"next/image.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"mobx";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as m}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as s}from"../providers/page-data-next.js";var a=d((function(t){return i.createElement(r,o({},t))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,s.getStaticProps(o,m.INDEX)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as r}from"mobx-react-lite";import{IkasPage as d}from"../components/page/index.js";import"../components/page/head.js";import"../components/page-editor/index.js";import"next/image.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as m}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as s}from"../providers/page-data-next.js";var a=r((function(t){return i.createElement(d,o({},t))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,s.getStaticProps(o,m.INDEX)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as s}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as a}from"../../providers/page-data-next.js";import{observer as d}from"mobx-react-lite";var m=d((function(t){return i.createElement(r,o({},t))})),l=function(o){return t(void 0,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return o.locales?[4,Promise.all(o.locales.map((function(o){return a.getSettings(o)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return t=e.sent(),i=[],t.forEach((function(o){var t=o.themeLocalization,e=o.routing;t&&t.themeJson.pages.filter((function(o){return o.type===s.CUSTOM})).forEach((function(o){o.slug&&!i.some((function(t){return t.params.slug===o.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?i.push({params:{slug:o.slug}}):i.push({params:{slug:o.slug},locale:e.path||e.id}))}))})),[2,{paths:i.map((function(o){return{params:o.params,locale:o.locale}})),fallback:"blocking"}]}}))}))},n=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,a.getStaticProps(o,s.CUSTOM)];case 1:return[2,t.sent()]}}))}))};export{m as default,l as getStaticPaths,n as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as s}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as a}from"../../providers/page-data-next.js";import{observer as m}from"mobx-react-lite";var d=m((function(t){return i.createElement(r,o({},t))})),l=function(o){return t(void 0,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return o.locales?[4,Promise.all(o.locales.map((function(o){return a.getSettings(o)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return t=e.sent(),i=[],t.forEach((function(o){var t=o.themeLocalization,e=o.routing;t&&t.themeJson.pages.filter((function(o){return o.type===s.CUSTOM})).forEach((function(o){o.slug&&!i.some((function(t){return t.params.slug===o.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?i.push({params:{slug:o.slug}}):i.push({params:{slug:o.slug},locale:e.path||e.id}))}))})),[2,{paths:i.map((function(o){return{params:o.params,locale:o.locale}})),fallback:"blocking"}]}}))}))},n=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,a.getStaticProps(o,s.CUSTOM)];case 1:return[2,t.sent()]}}))}))};export{d as default,l as getStaticPaths,n as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import*as e from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return e.createElement(r,o({},t))})),n=function(){return t(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,{paths:[],fallback:"blocking"}]}))}))},p=function(o){return t(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,d.RAFFLE_DETAIL)];case 1:return[2,t.sent()]}}))}))};export{a as default,n as getStaticPaths,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import*as e from"react";import{IkasPage as r}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return e.createElement(r,o({},t))})),n=function(){return t(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,{paths:[],fallback:"blocking"}]}))}))},p=function(o){return t(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,d.RAFFLE_DETAIL)];case 1:return[2,t.sent()]}}))}))};export{a as default,n as getStaticPaths,p as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as d}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as r}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(d,o({},t,{addOgpMetas:!0}))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,r.RAFFLE)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as d}from"../../components/page/index.js";import"../../components/page/head.js";import"../../components/page-editor/index.js";import"next/image.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as r}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(d,o({},t,{addOgpMetas:!0}))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,r.RAFFLE)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
@@ -1 +1 @@
1
- import{__assign as o,__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as r}from"../components/page/index.js";import"../components/page/head.js";import"../components/page-editor/index.js";import"next/image.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"mobx";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as d}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(r,o({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,d.SEARCH)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
1
+ import{__assign as o,__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import*as i from"react";import{IkasPage as r}from"../components/page/index.js";import"../components/page/head.js";import"../components/page-editor/index.js";import"next/image.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as d}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasNextPageDataProvider as m}from"../providers/page-data-next.js";import{observer as s}from"mobx-react-lite";var a=s((function(t){return i.createElement(r,o({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),p=function(o){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,m.getStaticProps(o,d.SEARCH)];case 1:return[2,t.sent()]}}))}))};export{a as default,p as getStaticProps};
@@ -1 +1 @@
1
- import{__awaiter as i,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import{IkasProductDetail as o}from"../../models/ui/product-detail/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/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasStorefrontConfig as r}from"../../storefront/index.js";import"../../api/blog/index.js";import"../../api/brand/index.js";import"../../api/cart/index.js";import"../../api/category/index.js";import"../../api/checkout/index.js";import"../../api/city/index.js";import"../../api/country/index.js";import"../../api/customer/index.js";import"../../api/customer-review/index.js";import"../../api/district/index.js";import"../../api/html-meta-data/index.js";import"../../api/merchant/index.js";import{IkasProductSearchAPI as e}from"../../api/product-search/index.js";import"../../api/apollo.js";import"../../api/favorite-product/index.js";import"../../api/contact-form/index.js";import"../../api/state/index.js";import{IkasProductOptionSetAPI as d}from"../../api/product-option-set/index.js";import"../../api/raffle/index.js";import"../../api/back-in-stock-reminder/index.js";import"../../api/product-campaign/index.js";var a=function(a){return i(void 0,void 0,void 0,(function(){var i,s,m,n,p,l,u,c,j;return t(this,(function(t){switch(t.label){case 0:for(i=[],s=0,m=a;s<m.length;s++)n=m[s],null===(j=n.variants)||void 0===j||j.forEach((function(t){i.find((function(i){return i===t.productId}))||i.push(t.productId)}));return[4,e.searchProducts({productIdList:i,priceListId:r.priceListId,salesChannelId:r.salesChannelId})];case 1:return(p=t.sent())&&(l=p.data).length?(u=l.map((function(i){return i.productOptionSetId})).filter((function(i){return!!i})),[4,d.list(u)]):[3,3];case 2:c=t.sent(),a.forEach((function(i){var t;null===(t=i.variants)||void 0===t||t.forEach((function(t){var r=l.find((function(i){return t.productId===i.id}));if(r){r.productOptionSet=null==c?void 0:c.find((function(i){return i.id===r.productOptionSetId}));var e=r.variants.find((function(i){return i.isActive&&t.variantId===i.id}))||r.variants[0];if(!i.products.find((function(i){return i.product.id===r.id}))){var d=new o(r,e.variantValues);d.product.variants=d.product.variants.filter((function(t){var o;return null===(o=i.variants)||void 0===o?void 0:o.find((function(i){return i.variantId===t.id}))})),i.products.push(d)}}}))})),t.label=3;case 3:return[2]}}))}))};export{a as populateRaffleProducts};
1
+ import{__awaiter as i,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import{IkasProductDetail as o}from"../../models/ui/product-detail/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/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import"../../api/blog/index.js";import"../../api/brand/index.js";import"../../api/cart/index.js";import"../../api/category/index.js";import"../../api/checkout/index.js";import"../../api/city/index.js";import"../../api/country/index.js";import"../../api/customer/index.js";import"../../api/customer-review/index.js";import"../../api/customer-review-summary/index.js";import"../../api/district/index.js";import"../../api/html-meta-data/index.js";import"../../api/merchant/index.js";import{IkasProductSearchAPI as r}from"../../api/product-search/index.js";import"../../api/apollo.js";import"../../api/favorite-product/index.js";import"../../api/contact-form/index.js";import"../../api/state/index.js";import{IkasProductOptionSetAPI as e}from"../../api/product-option-set/index.js";import"../../api/raffle/index.js";import"../../api/back-in-stock-reminder/index.js";import"../../api/product-campaign/index.js";var d=function(d){return i(void 0,void 0,void 0,(function(){var i,a,s,m,n,p,l,u,c;return t(this,(function(t){switch(t.label){case 0:for(i=[],a=0,s=d;a<s.length;a++)m=s[a],null===(c=m.variants)||void 0===c||c.forEach((function(t){i.find((function(i){return i===t.productId}))||i.push(t.productId)}));return[4,r.searchProducts({productIdList:i})];case 1:return(n=t.sent())&&(p=n.data).length?(l=p.map((function(i){return i.productOptionSetId})).filter((function(i){return!!i})),[4,e.list(l)]):[3,3];case 2:u=t.sent(),d.forEach((function(i){var t;null===(t=i.variants)||void 0===t||t.forEach((function(t){var r=p.find((function(i){return t.productId===i.id}));if(r){r.productOptionSet=null==u?void 0:u.find((function(i){return i.id===r.productOptionSetId}));var e=r.variants.find((function(i){return i.isActive&&t.variantId===i.id}))||r.variants[0];if(!i.products.find((function(i){return i.product.id===r.id}))){var d=new o(r,e.variantValues);d.product.variants=d.product.variants.filter((function(t){var o;return null===(o=i.variants)||void 0===o?void 0:o.find((function(i){return i.variantId===t.id}))})),i.products.push(d)}}}))})),t.label=3;case 3:return[2]}}))}))};export{d as populateRaffleProducts};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t}from'../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import i from'../ext/lodash/uniq.js';import a from'../ext/lzutf8/build/production/lzutf8.js';import{IkasBlogMetadataTargetType as s}from"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import{IkasHTMLMetaDataTargetType as n}from"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import{IkasRaffleMetadataTargetType as o}from"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import{IkasTheme as p}from"../models/theme/theme.js";import{IkasThemePageType as u}from"../models/theme/page/index.js";import{IkasThemePageComponent as c}from"../models/theme/page/component/index.js";import{IkasThemeComponent as d}from"../models/theme/component/index.js";import{IkasThemeComponentPropType as l}from"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import{IkasProductDetail as m}from"../models/ui/product-detail/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/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasBlogAPI as f}from"../api/blog/index.js";import{IkasBrandAPI as g}from"../api/brand/index.js";import"../api/cart/index.js";import{IkasCategoryAPI as h}from"../api/category/index.js";import"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/district/index.js";import{IkasHTMLMetaDataAPI as v}from"../api/html-meta-data/index.js";import{IkasMerchantAPI as j}from"../api/merchant/index.js";import{IkasProductSearchAPI as T}from"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import{IkasProductOptionSetAPI as x}from"../api/product-option-set/index.js";import{IkasRaffleAPI as y}from"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasProductListPropValueProvider as b}from"./prop-value/product-list.js";import{IkasProductDetailPropValueProvider as D}from"./prop-value/product-detail.js";import{IkasBrandListPropValueProvider as L}from"./prop-value/brand-list.js";import{IkasBrandPropValueProvider as S}from"./prop-value/brand.js";import{IkasLinkPropValueProvider as O}from"./prop-value/link.js";import{IkasImageListPropValueProvider as w}from"./prop-value/image-list.js";import{IkasTextPropValueProvider as P}from"./prop-value/text.js";import{IkasColorPropValueProvider as C}from"./prop-value/color.js";import{IkasBooleanPropValueProvider as I}from"./prop-value/boolean.js";import{IkasImagePropValueProvider as R}from"./prop-value/image.js";import{IkasCategoryPropValueProvider as E}from"./prop-value/category.js";import{IkasCategoryListPropValueProvider as A}from"./prop-value/category-list.js";import{IkasCustomPropValueProvider as B}from"./prop-value/custom.js";import{IkasStorefrontConfig as M}from"../storefront/index.js";import{IkasSliderPropValueProvider as G}from"./prop-value/slider.js";import{IkasRichTextPropValueProvider as _}from"./prop-value/rich-text.js";import{IkasBlogPropValueProvider as V}from"./prop-value/blog.js";import{IkasBlogListPropValueProvider as F}from"./prop-value/blog-list.js";import{IkasAttributePropValueProvider as k}from"./prop-value/attribute.js";import{IkasAttributeListPropValueProvider as U}from"./prop-value/attribute-list.js";import{IkasBlogCategoryPropValueProvider as N}from"./prop-value/blog-category.js";import{IkasBlogCategoryListPropValueProvider as Y}from"./prop-value/blog-category-list.js";import{IkasRafflePropValueProvider as J}from"./prop-value/raffle.js";import{IkasRaffleListPropValueProvider as H}from"./prop-value/raffle-list.js";import{populateRaffleProducts as z}from"./helpers/raffles.js";var K=function(){function c(e,t,i){this.pageType=null,this.pageParams={},this.pageComponentPropValues=[],this.pageSpecificData=null,this.merchantSettings=null,this.possiblePageTypes=[],this.linkMetaDataTargetIds=[],this.theme=new p(e),this.pageParams=t||{},this.pageType=i,r(this)}return Object.defineProperty(c.prototype,"page",{get:function(){var e=this;if(this.pageType===u.CUSTOM){var t=this.pageParams.slug;return this.theme.pages.find((function(e){return e.type===u.CUSTOM&&e.slug===t}))}return this.theme.pages.find((function(t){return t.type===e.pageType}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"nextPageData",{get:function(){var e,t,r;return{props:{propValuesStr:a.compress(JSON.stringify(this.pageComponentPropValues),{outputEncoding:"Base64"}),pageSpecificDataStr:this.pageSpecificData?JSON.stringify(this.pageSpecificData||{}):"",pageType:(null===(e=this.page)||void 0===e?void 0:e.type)||u.CUSTOM,pageTitle:(null===(t=this.page)||void 0===t?void 0:t.pageTitle)||null,pageDescription:(null===(r=this.page)||void 0===r?void 0:r.description)||null,settingsStr:JSON.stringify(this.theme.settings||{}),merchantSettingsStr:this.merchantSettings?JSON.stringify(this.merchantSettings):null,configJson:M.getJson()}}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"specification",{get:function(){var e,t,r=this,i=this.page;return(null==i?void 0:i.type)===u.PRODUCT?null===(e=i.specifications)||void 0===e?void 0:e.find((function(e){var t;return e.id===(null===(t=r.pageSpecificData)||void 0===t?void 0:t.product.id)})):null===(t=null==i?void 0:i.specifications)||void 0===t?void 0:t.find((function(e){var t;return e.id===(null===(t=r.pageSpecificData)||void 0===t?void 0:t.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"pageComponents",{get:function(){var e;return this.specification?this.specification.components:(null===(e=this.page)||void 0===e?void 0:e.components)||[]},enumerable:!1,configurable:!0}),c.prototype.getMerchantSettings=function(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,j.listMerchantSettings()];case 1:return(e=t.sent())&&(this.merchantSettings=e),[2]}}))}))},c.prototype.getPageData=function(){return e(this,void 0,void 0,(function(){var e,r=this;return t(this,(function(t){switch(t.label){case 0:return this.pageSpecificData?[3,2]:[4,this.getPageSpecificData()];case 1:t.sent(),t.label=2;case 2:return this.page?[4,this.getMerchantSettings()]:[2];case 3:return t.sent(),e=this,[4,Promise.all(this.pageComponents.map((function(e){return r.getPageComponentPropValues(e)})))];case 4:return e.pageComponentPropValues=t.sent(),[4,this.setLinkSlugs()];case 5:return t.sent(),[2]}}))}))},c.prototype.getPageSpecificData=function(){var r,i,a;return e(this,void 0,void 0,(function(){var p,c,d,l,j,b,D,L,S,O=this;return t(this,(function(w){switch(w.label){case 0:return this.pageType&&![u.BRAND,u.PRODUCT,u.CATEGORY,u.BLOG,u.BLOG_CATEGORY,u.RAFFLE_DETAIL].includes(this.pageType)?[2]:(p=this.pageParams.slug)?(c=[],(null===(r=this.possiblePageTypes)||void 0===r?void 0:r.includes(u.BLOG))||(null===(i=this.possiblePageTypes)||void 0===i?void 0:i.includes(u.BLOG_CATEGORY))?[4,f.listBlogMetaData(p)]:[3,2]):[2];case 1:return(c=w.sent()).length?[3,6]:[2];case 2:return(null===(a=this.possiblePageTypes)||void 0===a?void 0:a.includes(u.RAFFLE_DETAIL))?[4,y.listRaffleMetaData(p)]:[3,4];case 3:return(c=w.sent()).length?[3,6]:[2];case 4:return[4,v.listHTMLMetaData(p)];case 5:if(!(c=w.sent())||!c.length)return[2];w.label=6;case 6:if(!(d=c[0]).targetId)return[2];switch(l=function(){return e(O,void 0,void 0,(function(){var e,r,i,a,s,n;return t(this,(function(t){switch(t.label){case 0:return[4,T.searchProducts({productIdList:[d.targetId],priceListId:M.priceListId,salesChannelId:M.salesChannelId})];case 1:return(null==(e=t.sent())?void 0:e.data.length)?(r=e.data[0]).productOptionSetId?[4,x.list([r.productOptionSetId])]:[3,3]:[2];case 2:(null==(i=t.sent())?void 0:i.length)&&(r.productOptionSet=i[0]),t.label=3;case 3:return(a=r.variants.find((function(e){return e.isActive})))?(this.pageSpecificData=new m(r,a.variantValues),this.pageSpecificData.displayedVariantTypes.length&&(s=this.pageSpecificData.displayedVariantTypes[0]).displayedVariantValues.length&&(n=s.displayedVariantValues.find((function(e){return e.hasStock})))&&(this.pageSpecificData.selectedVariantValues=n.variant.variantValues),this.pageType=u.PRODUCT,this.setPageMetaData(d),[2]):[2]}}))}))},j=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,g.listBrands({idList:[d.targetId]})];case 1:return(e=t.sent()).brands.length?(r=e.brands[0],this.pageSpecificData=r,this.pageType=u.BRAND,this.setPageMetaData(d),[2]):[2]}}))}))},b=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,h.listCategories({idList:[d.targetId]})];case 1:return(e=t.sent()).categories.length?(r=e.categories[0],this.pageSpecificData=r,this.pageType=u.CATEGORY,this.setPageMetaData(d),[2]):[2]}}))}))},D=function(){return e(O,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,f.getBlog({id:d.targetId})];case 1:return(e=t.sent())?(this.pageSpecificData=e,this.pageType=u.BLOG,this.setPageMetaData(d),[2]):[2]}}))}))},L=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,f.listBlogCategory({idList:[d.targetId],page:1,limit:1})];case 1:return(e=t.sent())&&e.blogCategories.length?(r=e.blogCategories[0],this.pageSpecificData=r,this.pageType=u.BLOG_CATEGORY,this.setPageMetaData(d),[2]):[2]}}))}))},S=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,y.listRaffles({id:d.targetId})];case 1:return(e=t.sent())&&e.raffles.length?(r=e.raffles[0],[4,z([r])]):[2];case 2:return t.sent(),this.pageSpecificData=r,this.pageType=u.RAFFLE_DETAIL,this.setPageMetaData(d),[2]}}))}))},d.targetType){case n.BRAND:return[3,7];case n.CATEGORY:return[3,9];case n.PRODUCT:return[3,11];case s.BLOG:return[3,13];case s.BLOG_CATEGORY:return[3,15];case o.RAFFLE:return[3,17]}return[3,19];case 7:return[4,j()];case 8:return[2,w.sent()];case 9:return[4,b()];case 10:return[2,w.sent()];case 11:return[4,l()];case 12:return[2,w.sent()];case 13:return[4,D()];case 14:return[2,w.sent()];case 15:return[4,L()];case 16:return[2,w.sent()];case 17:return[4,S()];case 18:return[2,w.sent()];case 19:return[3,20];case 20:return[2]}}))}))},c.prototype.getPageComponentPropValues=function(r){return e(this,void 0,void 0,(function(){var i,a,s,n=this;return t(this,(function(o){switch(o.label){case 0:return i=this.theme.components.find((function(e){return e.id===r.componentId})),a={pageComponent:r,component:i,propValues:{}},s=function(i){return e(n,void 0,void 0,(function(){var e,s;return t(this,(function(t){switch(t.label){case 0:return e=a.propValues,s=i.name,[4,this.getPageComponentPropValue(r,i)];case 1:return e[s]=t.sent(),[2]}}))}))},[4,Promise.all(i.props.map(s))];case 1:return o.sent(),[2,a]}}))}))},c.prototype.getPageComponentPropValue=function(r,i){return e(this,void 0,void 0,(function(){var e,a,s,n,o,p=this;return t(this,(function(t){switch(t.label){case 0:if(a=r.propValues[i.name],s=[l.RAFFLE_LIST],null==a&&!s.includes(i.type))return[2,null];switch(i.type){case l.TEXT:return[3,1];case l.RICH_TEXT:return[3,2];case l.BOOLEAN:return[3,3];case l.IMAGE:return[3,4];case l.IMAGE_LIST:return[3,5];case l.BRAND:return[3,6];case l.BRAND_LIST:return[3,7];case l.PRODUCT_LIST:return[3,8];case l.PRODUCT_DETAIL:return[3,9];case l.PRODUCT_ATTRIBUTE:return[3,10];case l.PRODUCT_ATTRIBUTE_LIST:return[3,11];case l.CATEGORY:return[3,12];case l.CATEGORY_LIST:return[3,13];case l.LINK:case l.LIST_OF_LINK:return[3,14];case l.COLOR:return[3,15];case l.CUSTOM:return[3,16];case l.COMPONENT:case l.COMPONENT_LIST:return[3,17];case l.BLOG:return[3,19];case l.BLOG_LIST:return[3,20];case l.BLOG_CATEGORY:return[3,21];case l.BLOG_CATEGORY_LIST:return[3,22];case l.RAFFLE:return[3,23];case l.RAFFLE_LIST:return[3,24];case l.SLIDER:return[3,25]}return[3,26];case 1:return e=new P(a),[3,27];case 2:return e=new _(a),[3,27];case 3:return e=new I(a),[3,27];case 4:return e=new R(a),[3,27];case 5:return e=new w(a),[3,27];case 6:return e=new S(a),[3,27];case 7:return e=new L(a),[3,27];case 8:return e=new b(this.pageType,a,this.pageSpecificData),[3,27];case 9:return e=new D(a),[3,27];case 10:return e=new k(a),[3,27];case 11:return e=new U(a),[3,27];case 12:return e=new E(a),[3,27];case 13:return e=new A(a),[3,27];case 14:return e=new O(a,this.theme,this.linkMetaDataTargetIds),[3,27];case 15:return e=new C(a),[3,27];case 16:return(n=this.theme.customData.find((function(e){return e.id===i.customDataId})))?(e=new B(a,n,this.theme,this.pageType,this,this.pageSpecificData,this.pageParams),[3,27]):[2];case 17:return o=a,[4,Promise.all(o.map((function(e){return p.getPageComponentPropValues(e)})))];case 18:case 28:return[2,t.sent()];case 19:return e=new V(a),[3,27];case 20:return e=new F(this.pageType,a,this.pageSpecificData),[3,27];case 21:return e=new N(a),[3,27];case 22:return e=new Y(a),[3,27];case 23:return e=new J(a),[3,27];case 24:return e=new H,[3,27];case 25:return e=new G(a),[3,27];case 26:return[3,27];case 27:return[4,null==e?void 0:e.getValue()]}}))}))},c.prototype.setPageMetaData=function(e){this.page&&(this.page.pageTitle=e.pageTitle,this.page.description=e.description)},c.prototype.setLinkSlugs=function(){return e(this,void 0,void 0,(function(){var e,r,i;return t(this,(function(t){switch(t.label){case 0:return e=[],r=[],i=[],this.linkMetaDataTargetIds.forEach((function(t){switch(t.type){case"DEFAULT":e.push(t);break;case"BLOG":r.push(t);break;case"RAFFLE":i.push(t)}})),[4,Promise.all([this.getLinkSlugs(e,"DEFAULT"),this.getLinkSlugs(r,"BLOG"),this.getLinkSlugs(i,"RAFFLE")])];case 1:return[2,t.sent()]}}))}))},c.prototype.getLinkSlugs=function(r,a){return e(this,void 0,void 0,(function(){var s,n,o=this;return t(this,(function(p){switch(p.label){case 0:return s=i(r.map((function(e){return e.id}))),n=[],[4,function(){return e(o,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:switch(e=[],a){case"DEFAULT":return[3,1];case"BLOG":return[3,3];case"RAFFLE":return[3,5]}return[3,7];case 1:return[4,v.listHTMLMetaData(void 0,s,void 0)];case 2:case 4:case 6:return e=t.sent(),[3,8];case 3:return[4,f.listBlogMetaData(void 0,s,void 0)];case 5:return[4,y.listRaffleMetaData(void 0,s,void 0)];case 7:return[3,8];case 8:return e.length&&(n=e),[2]}}))}))}()];case 1:return p.sent(),r.forEach((function(e){var t=n.find((function(t){return t.targetId===e.id}));t&&(e.navigationLink.href+=t.slug)})),[2]}}))}))},c}(),X=function(e){this.pageComponent=e.pageComponent?new c(e.pageComponent):new c({}),this.component=e.component?new d(e.component):new d({}),this.propValues=e.propValues||{}};export{X as IkasPageComponentPropValue,K as IkasPageDataProvider};
1
+ import{__awaiter as e,__generator as t}from'../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import i from'../ext/lodash/uniq.js';import a from'../ext/lzutf8/build/production/lzutf8.js';import{IkasBlogMetadataTargetType as s}from"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import{IkasHTMLMetaDataTargetType as n}from"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import{IkasRaffleMetadataTargetType as o}from"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import{IkasTheme as p}from"../models/theme/theme.js";import{IkasThemePageType as u}from"../models/theme/page/index.js";import{IkasThemePageComponent as c}from"../models/theme/page/component/index.js";import{IkasThemeComponent as d}from"../models/theme/component/index.js";import{IkasThemeComponentPropType as l}from"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import{IkasProductDetail as m}from"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasBlogAPI as f}from"../api/blog/index.js";import{IkasBrandAPI as g}from"../api/brand/index.js";import"../api/cart/index.js";import{IkasCategoryAPI as h}from"../api/category/index.js";import"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import{IkasHTMLMetaDataAPI as v}from"../api/html-meta-data/index.js";import{IkasMerchantAPI as j}from"../api/merchant/index.js";import{IkasProductSearchAPI as T}from"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import{IkasProductOptionSetAPI as x}from"../api/product-option-set/index.js";import{IkasRaffleAPI as y}from"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasProductListPropValueProvider as b}from"./prop-value/product-list.js";import{IkasProductDetailPropValueProvider as D}from"./prop-value/product-detail.js";import{IkasBrandListPropValueProvider as L}from"./prop-value/brand-list.js";import{IkasBrandPropValueProvider as S}from"./prop-value/brand.js";import{IkasLinkPropValueProvider as O}from"./prop-value/link.js";import{IkasImageListPropValueProvider as w}from"./prop-value/image-list.js";import{IkasTextPropValueProvider as P}from"./prop-value/text.js";import{IkasColorPropValueProvider as C}from"./prop-value/color.js";import{IkasBooleanPropValueProvider as I}from"./prop-value/boolean.js";import{IkasImagePropValueProvider as R}from"./prop-value/image.js";import{IkasCategoryPropValueProvider as E}from"./prop-value/category.js";import{IkasCategoryListPropValueProvider as A}from"./prop-value/category-list.js";import{IkasCustomPropValueProvider as B}from"./prop-value/custom.js";import{IkasStorefrontConfig as M}from"../storefront/index.js";import{IkasSliderPropValueProvider as G}from"./prop-value/slider.js";import{IkasRichTextPropValueProvider as _}from"./prop-value/rich-text.js";import{IkasBlogPropValueProvider as V}from"./prop-value/blog.js";import{IkasBlogListPropValueProvider as F}from"./prop-value/blog-list.js";import{IkasAttributePropValueProvider as k}from"./prop-value/attribute.js";import{IkasAttributeListPropValueProvider as U}from"./prop-value/attribute-list.js";import{IkasBlogCategoryPropValueProvider as N}from"./prop-value/blog-category.js";import{IkasBlogCategoryListPropValueProvider as Y}from"./prop-value/blog-category-list.js";import{IkasRafflePropValueProvider as J}from"./prop-value/raffle.js";import{IkasRaffleListPropValueProvider as H}from"./prop-value/raffle-list.js";import{populateRaffleProducts as z}from"./helpers/raffles.js";var K=function(){function c(e,t,i){this.pageType=null,this.pageParams={},this.pageComponentPropValues=[],this.pageSpecificData=null,this.merchantSettings=null,this.possiblePageTypes=[],this.linkMetaDataTargetIds=[],this.theme=new p(e),this.pageParams=t||{},this.pageType=i,r(this)}return Object.defineProperty(c.prototype,"page",{get:function(){var e=this;if(this.pageType===u.CUSTOM){var t=this.pageParams.slug;return this.theme.pages.find((function(e){return e.type===u.CUSTOM&&e.slug===t}))}return this.theme.pages.find((function(t){return t.type===e.pageType}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"nextPageData",{get:function(){var e,t,r;return{props:{propValuesStr:a.compress(JSON.stringify(this.pageComponentPropValues),{outputEncoding:"Base64"}),pageSpecificDataStr:this.pageSpecificData?JSON.stringify(this.pageSpecificData||{}):"",pageType:(null===(e=this.page)||void 0===e?void 0:e.type)||u.CUSTOM,pageTitle:(null===(t=this.page)||void 0===t?void 0:t.pageTitle)||null,pageDescription:(null===(r=this.page)||void 0===r?void 0:r.description)||null,settingsStr:JSON.stringify(this.theme.settings||{}),merchantSettingsStr:this.merchantSettings?JSON.stringify(this.merchantSettings):null,configJson:M.getJson()}}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"specification",{get:function(){var e,t,r=this,i=this.page;return(null==i?void 0:i.type)===u.PRODUCT?null===(e=i.specifications)||void 0===e?void 0:e.find((function(e){var t;return e.id===(null===(t=r.pageSpecificData)||void 0===t?void 0:t.product.id)})):null===(t=null==i?void 0:i.specifications)||void 0===t?void 0:t.find((function(e){var t;return e.id===(null===(t=r.pageSpecificData)||void 0===t?void 0:t.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"pageComponents",{get:function(){var e;return this.specification?this.specification.components:(null===(e=this.page)||void 0===e?void 0:e.components)||[]},enumerable:!1,configurable:!0}),c.prototype.getMerchantSettings=function(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,j.listMerchantSettings()];case 1:return(e=t.sent())&&(this.merchantSettings=e),[2]}}))}))},c.prototype.getPageData=function(){return e(this,void 0,void 0,(function(){var e,r=this;return t(this,(function(t){switch(t.label){case 0:return this.pageSpecificData?[3,2]:[4,this.getPageSpecificData()];case 1:t.sent(),t.label=2;case 2:return this.page?[4,this.getMerchantSettings()]:[2];case 3:return t.sent(),e=this,[4,Promise.all(this.pageComponents.map((function(e){return r.getPageComponentPropValues(e)})))];case 4:return e.pageComponentPropValues=t.sent(),[4,this.setLinkSlugs()];case 5:return t.sent(),[2]}}))}))},c.prototype.getPageSpecificData=function(){var r,i,a;return e(this,void 0,void 0,(function(){var p,c,d,l,j,b,D,L,S,O=this;return t(this,(function(w){switch(w.label){case 0:return this.pageType&&![u.BRAND,u.PRODUCT,u.CATEGORY,u.BLOG,u.BLOG_CATEGORY,u.RAFFLE_DETAIL].includes(this.pageType)?[2]:(p=this.pageParams.slug)?(c=[],(null===(r=this.possiblePageTypes)||void 0===r?void 0:r.includes(u.BLOG))||(null===(i=this.possiblePageTypes)||void 0===i?void 0:i.includes(u.BLOG_CATEGORY))?[4,f.listBlogMetaData(p)]:[3,2]):[2];case 1:return(c=w.sent()).length?[3,6]:[2];case 2:return(null===(a=this.possiblePageTypes)||void 0===a?void 0:a.includes(u.RAFFLE_DETAIL))?[4,y.listRaffleMetaData(p)]:[3,4];case 3:return(c=w.sent()).length?[3,6]:[2];case 4:return[4,v.listHTMLMetaData(p)];case 5:if(!(c=w.sent())||!c.length)return[2];w.label=6;case 6:if(!(d=c[0]).targetId)return[2];switch(l=function(){return e(O,void 0,void 0,(function(){var e,r,i,a,s,n;return t(this,(function(t){switch(t.label){case 0:return[4,T.searchProducts({productIdList:[d.targetId],priceListId:M.priceListId,salesChannelId:M.salesChannelId})];case 1:return(null==(e=t.sent())?void 0:e.data.length)?(r=e.data[0]).productOptionSetId?[4,x.list([r.productOptionSetId])]:[3,3]:[2];case 2:(null==(i=t.sent())?void 0:i.length)&&(r.productOptionSet=i[0]),t.label=3;case 3:return(a=r.variants.find((function(e){return e.isActive})))?(this.pageSpecificData=new m(r,a.variantValues),this.pageSpecificData.displayedVariantTypes.length&&(s=this.pageSpecificData.displayedVariantTypes[0]).displayedVariantValues.length&&(n=s.displayedVariantValues.find((function(e){return e.hasStock})))&&(this.pageSpecificData.selectedVariantValues=n.variant.variantValues),this.pageType=u.PRODUCT,this.setPageMetaData(d),[2]):[2]}}))}))},j=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,g.listBrands({idList:[d.targetId]})];case 1:return(e=t.sent()).brands.length?(r=e.brands[0],this.pageSpecificData=r,this.pageType=u.BRAND,this.setPageMetaData(d),[2]):[2]}}))}))},b=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,h.listCategories({idList:[d.targetId]})];case 1:return(e=t.sent()).categories.length?(r=e.categories[0],this.pageSpecificData=r,this.pageType=u.CATEGORY,this.setPageMetaData(d),[2]):[2]}}))}))},D=function(){return e(O,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,f.getBlog({id:d.targetId})];case 1:return(e=t.sent())?(this.pageSpecificData=e,this.pageType=u.BLOG,this.setPageMetaData(d),[2]):[2]}}))}))},L=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,f.listBlogCategory({idList:[d.targetId],page:1,limit:1})];case 1:return(e=t.sent())&&e.blogCategories.length?(r=e.blogCategories[0],this.pageSpecificData=r,this.pageType=u.BLOG_CATEGORY,this.setPageMetaData(d),[2]):[2]}}))}))},S=function(){return e(O,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,y.listRaffles({id:d.targetId})];case 1:return(e=t.sent())&&e.raffles.length?(r=e.raffles[0],[4,z([r])]):[2];case 2:return t.sent(),this.pageSpecificData=r,this.pageType=u.RAFFLE_DETAIL,this.setPageMetaData(d),[2]}}))}))},d.targetType){case n.BRAND:return[3,7];case n.CATEGORY:return[3,9];case n.PRODUCT:return[3,11];case s.BLOG:return[3,13];case s.BLOG_CATEGORY:return[3,15];case o.RAFFLE:return[3,17]}return[3,19];case 7:return[4,j()];case 8:return[2,w.sent()];case 9:return[4,b()];case 10:return[2,w.sent()];case 11:return[4,l()];case 12:return[2,w.sent()];case 13:return[4,D()];case 14:return[2,w.sent()];case 15:return[4,L()];case 16:return[2,w.sent()];case 17:return[4,S()];case 18:return[2,w.sent()];case 19:return[3,20];case 20:return[2]}}))}))},c.prototype.getPageComponentPropValues=function(r){return e(this,void 0,void 0,(function(){var i,a,s,n=this;return t(this,(function(o){switch(o.label){case 0:return i=this.theme.components.find((function(e){return e.id===r.componentId})),a={pageComponent:r,component:i,propValues:{}},s=function(i){return e(n,void 0,void 0,(function(){var e,s;return t(this,(function(t){switch(t.label){case 0:return e=a.propValues,s=i.name,[4,this.getPageComponentPropValue(r,i)];case 1:return e[s]=t.sent(),[2]}}))}))},[4,Promise.all(i.props.map(s))];case 1:return o.sent(),[2,a]}}))}))},c.prototype.getPageComponentPropValue=function(r,i){return e(this,void 0,void 0,(function(){var e,a,s,n,o,p=this;return t(this,(function(t){switch(t.label){case 0:if(a=r.propValues[i.name],s=[l.RAFFLE_LIST],null==a&&!s.includes(i.type))return[2,null];switch(i.type){case l.TEXT:return[3,1];case l.RICH_TEXT:return[3,2];case l.BOOLEAN:return[3,3];case l.IMAGE:return[3,4];case l.IMAGE_LIST:return[3,5];case l.BRAND:return[3,6];case l.BRAND_LIST:return[3,7];case l.PRODUCT_LIST:return[3,8];case l.PRODUCT_DETAIL:return[3,9];case l.PRODUCT_ATTRIBUTE:return[3,10];case l.PRODUCT_ATTRIBUTE_LIST:return[3,11];case l.CATEGORY:return[3,12];case l.CATEGORY_LIST:return[3,13];case l.LINK:case l.LIST_OF_LINK:return[3,14];case l.COLOR:return[3,15];case l.CUSTOM:return[3,16];case l.COMPONENT:case l.COMPONENT_LIST:return[3,17];case l.BLOG:return[3,19];case l.BLOG_LIST:return[3,20];case l.BLOG_CATEGORY:return[3,21];case l.BLOG_CATEGORY_LIST:return[3,22];case l.RAFFLE:return[3,23];case l.RAFFLE_LIST:return[3,24];case l.SLIDER:return[3,25]}return[3,26];case 1:return e=new P(a),[3,27];case 2:return e=new _(a),[3,27];case 3:return e=new I(a),[3,27];case 4:return e=new R(a),[3,27];case 5:return e=new w(a),[3,27];case 6:return e=new S(a),[3,27];case 7:return e=new L(a),[3,27];case 8:return e=new b(this.pageType,a,this.pageSpecificData),[3,27];case 9:return e=new D(a),[3,27];case 10:return e=new k(a),[3,27];case 11:return e=new U(a),[3,27];case 12:return e=new E(a),[3,27];case 13:return e=new A(a),[3,27];case 14:return e=new O(a,this.theme,this.linkMetaDataTargetIds),[3,27];case 15:return e=new C(a),[3,27];case 16:return(n=this.theme.customData.find((function(e){return e.id===i.customDataId})))?(e=new B(a,n,this.theme,this.pageType,this,this.pageSpecificData,this.pageParams),[3,27]):[2];case 17:return o=a,[4,Promise.all(o.map((function(e){return p.getPageComponentPropValues(e)})))];case 18:case 28:return[2,t.sent()];case 19:return e=new V(a),[3,27];case 20:return e=new F(this.pageType,a,this.pageSpecificData),[3,27];case 21:return e=new N(a),[3,27];case 22:return e=new Y(a),[3,27];case 23:return e=new J(a),[3,27];case 24:return e=new H,[3,27];case 25:return e=new G(a),[3,27];case 26:return[3,27];case 27:return[4,null==e?void 0:e.getValue()]}}))}))},c.prototype.setPageMetaData=function(e){this.page&&(this.page.pageTitle=e.pageTitle,this.page.description=e.description)},c.prototype.setLinkSlugs=function(){return e(this,void 0,void 0,(function(){var e,r,i;return t(this,(function(t){switch(t.label){case 0:return e=[],r=[],i=[],this.linkMetaDataTargetIds.forEach((function(t){switch(t.type){case"DEFAULT":e.push(t);break;case"BLOG":r.push(t);break;case"RAFFLE":i.push(t)}})),[4,Promise.all([this.getLinkSlugs(e,"DEFAULT"),this.getLinkSlugs(r,"BLOG"),this.getLinkSlugs(i,"RAFFLE")])];case 1:return[2,t.sent()]}}))}))},c.prototype.getLinkSlugs=function(r,a){return e(this,void 0,void 0,(function(){var s,n,o=this;return t(this,(function(p){switch(p.label){case 0:return s=i(r.map((function(e){return e.id}))),n=[],[4,function(){return e(o,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:switch(e=[],a){case"DEFAULT":return[3,1];case"BLOG":return[3,3];case"RAFFLE":return[3,5]}return[3,7];case 1:return[4,v.listHTMLMetaData(void 0,s,void 0)];case 2:case 4:case 6:return e=t.sent(),[3,8];case 3:return[4,f.listBlogMetaData(void 0,s,void 0)];case 5:return[4,y.listRaffleMetaData(void 0,s,void 0)];case 7:return[3,8];case 8:return e.length&&(n=e),[2]}}))}))}()];case 1:return p.sent(),r.forEach((function(e){var t=n.find((function(t){return t.targetId===e.id}));t&&(e.navigationLink.href+=t.slug)})),[2]}}))}))},c}(),X=function(e){this.pageComponent=e.pageComponent?new c(e.pageComponent):new c({}),this.component=e.component?new d(e.component):new d({}),this.propValues=e.propValues||{}};export{X as IkasPageComponentPropValue,K as IkasPageDataProvider};
@@ -1 +1 @@
1
- import{renderComponent as e}from"../components/page/index.js";import{IkasBlogCategory as t,IkasBlog as i}from"../models/data/blog/index.js";import{IkasBrand as a}from"../models/data/brand/index.js";import{IkasCategory as r}from"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import{IkasImage as o}from"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import{observable as n}from"mobx";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import{IkasRaffle as u}from"../models/data/raffle/index.js";import{IkasSlider as s}from"../models/data/slider/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as p}from"../models/theme/page/index.js";import{IkasThemePageComponent as l}from"../models/theme/page/component/index.js";import{IkasThemeComponent as c}from"../models/theme/component/index.js";import{IkasThemeComponentPropType as m}from"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import{IkasBrandList as d}from"../models/ui/brand-list/index.js";import{IkasBlogList as f}from"../models/ui/blog-list/index.js";import{IkasBlogCategoryList as V}from"../models/ui/blog-category-list/index.js";import{IkasCategoryList as P}from"../models/ui/category-list/index.js";import{IkasNavigationLink as g}from"../models/ui/navigation-link/index.js";import{IkasProductDetail as _}from"../models/ui/product-detail/index.js";import{IkasProductList as L}from"../models/ui/product-list/index.js";import{IkasAttributeDetail as h}from"../models/ui/product-attribute-detail/index.js";import{IkasAttributeList as D}from"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-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/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{IkasComponentRenderer as v}from"../models/ui/component-renderer/index.js";import{IkasRaffleList as C}from"../models/ui/raffle-list/index.js";import{IkasThemeSettings as T}from"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import S from'../ext/lzutf8/build/production/lzutf8.js';import{IkasPageComponentPropValue as b}from"./page-data-get.js";import{getPlaceholderBrand as j,getPlaceholderCategory as B,getPlaceholderProduct as x,getPlaceholderBlog as I,getPlaceholderBlogCategory as w,getPlaceholderRaffle as O}from"./placeholders.js";var y=function(){function y(){}return y.setPageSpecificData=function(e,a,o){if(e){var n=JSON.parse(e);switch(a){case p.PRODUCT:var s=n;y.pageSpecificData=new _(s.product,s.selectedVariantValues),o&&this._initProductDetailOnBrowser(y.pageSpecificData);break;case p.CATEGORY:var l=n;y.pageSpecificData=new r(l);break;case p.BRAND:var c=n;y.pageSpecificData=new r(c);break;case p.BLOG:var m=n;y.pageSpecificData=new i(m);break;case p.BLOG_CATEGORY:var d=n;y.pageSpecificData=new t(d);break;case p.RAFFLE_DETAIL:var f=n;y.pageSpecificData=new u(f)}}else this.pageSpecificData=void 0},y.isServer=function(){return"undefined"==typeof window},y.initPropValues=function(e,t,i,a,r){var o=new T(JSON.parse(i)),n=a?S.decompress(e,{inputEncoding:"Base64"}):e,u=JSON.parse(n).map((function(e){return{pageComponent:new l(e.pageComponent),component:new c(e.component),propValues:e.propValues}}));return u.forEach((function(e){e.component.props.forEach((function(i){var a=e.propValues[i.name];if(null!=a)switch(i.type){case m.IMAGE:y.initImagePropValue(i,a,e);break;case m.IMAGE_LIST:y.initImageListPropValue(i,a,e);break;case m.BRAND:y.initBrandPropValue(i,a,e);break;case m.BRAND_LIST:y.initBrandListPropValue(i,a,e);break;case m.CATEGORY:y.initCategoryPropValue(i,a,e);break;case m.CATEGORY_LIST:y.initCategoryListPropValue(i,a,e);break;case m.PRODUCT_LIST:y.initProductListPropValue(i,a,e,t);break;case m.PRODUCT_DETAIL:y.initProductDetailPropValue(i,a,e,t);break;case m.PRODUCT_ATTRIBUTE:y.initAttributePropValue(i,a,e);break;case m.PRODUCT_ATTRIBUTE_LIST:y.initAttributeListPropValue(i,a,e);break;case m.LINK:case m.LIST_OF_LINK:y.initLinkPropValue(i,a,e);break;case m.COMPONENT:y.initComponentPropValue(i,a,e,t,o,r);break;case m.COMPONENT_LIST:y.initComponentListPropValue(i,a,e,t,o,r);break;case m.CUSTOM:y.initCustomDataPropValue(i,a,e,t,o,r);break;case m.BLOG:y.initBlogPropValue(i,a,e);break;case m.BLOG_LIST:y.initBlogListPropValue(i,a,e);break;case m.BLOG_CATEGORY:y.initBlogCategoryPropValue(i,a,e);break;case m.BLOG_LIST:y.initBlogCategoryListPropValue(i,a,e);break;case m.RAFFLE:y.initRafflePropValue(i,a,e);break;case m.RAFFLE_LIST:y.initRaffleListPropValue(i,a,e);break;case m.SLIDER:y.initSliderPropValue(i,a,e)}}))})),u},y.initBrandPropValue=function(e,t,i){i.propValues[e.name]=y._initBrandPropValue(t)},y._initBrandPropValue=function(e){return e.brandPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.brand?new a(e.brand):j()},y.initBrandListPropValue=function(e,t,i){i.propValues[e.name]=y._initBrandListPropValue(t)},y._initBrandListPropValue=function(e){return new d(e)},y.initCategoryPropValue=function(e,t,i){i.propValues[e.name]=y._initCategoryPropValue(t)},y._initCategoryPropValue=function(e){return e.categoryPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.category?new r(e.category):B()},y.initCategoryListPropValue=function(e,t,i){var a=new P(t);i.propValues[e.name]=a},y._initCategoryListPropValue=function(e){return new P(e)},y.initProductListPropValue=function(e,t,i,a){i.propValues[e.name]=this._initProductListPropValue(t,a)},y._initProductListPropValue=function(e,t){return new L(e,t)},y.initProductDetailPropValue=function(e,t,i,a){i.propValues[e.name]=this._initProductDetailPropValue(t,a)},y._initProductDetailPropValue=function(e,t){var i=x();return e.productDetailPropValue.usePageData&&this.pageSpecificData?i=this.pageSpecificData:e.productDetail&&(i=new _(e.productDetail.product,e.productDetail.selectedVariantValues)),i.router=t,i},y._initProductDetailOnBrowser=function(e){var t=new URLSearchParams(window.location.search),i=t.get("vid");if(i){var a=e.product.variants.find((function(e){return e.id===i}));a&&(e.selectedVariantValues=a.variantValues)}else{var r=e.product.variantTypes.map((function(e){return e.variantType.slug})),o=[];r.forEach((function(i,a){var r=e.product.variantTypes[a],n=t.get(i);if(n){var u=r.variantType.values.find((function(e){return e.slug===n}));u&&o.push(u)}})),o.length===e.selectedVariantValues.length&&(e.selectedVariantValues=o)}},y.initAttributePropValue=function(e,t,i){i.propValues[e.name]=y._initAttributePropValue(t)},y._initAttributePropValue=function(e){var t=null;return e.attributePropValue.usePageData&&this.pageSpecificData?t=this.pageSpecificData:e.productDetail&&(t=new _(e.productDetail.product,e.productDetail.selectedVariantValues)),new h(t,e.attributePropValue)},y.initAttributeListPropValue=function(e,t,i){i.propValues[e.name]=y._initAttributeListPropValue(t)},y._initAttributeListPropValue=function(e){var t=null;return e.attributeListPropValue.usePageData&&this.pageSpecificData?t=this.pageSpecificData:e.productDetail&&(t=new _(e.productDetail.product,e.productDetail.selectedVariantValues)),new D(t,e.attributeListPropValue)},y.initLinkPropValue=function(e,t,i){i.propValues[e.name]=this._initLinkPropValue(t)},y._initLinkPropValue=function(e){return Array.isArray(e)?e.map((function(e){return new g(e.href,e.label,e.subLinks,e.isExternal||void 0)})):e?new g(e.href,e.label,e.subLinks,e.isExternal):void 0},y.initImagePropValue=function(e,t,i){i.propValues[e.name]=this._initImagePropValue(t)},y._initImagePropValue=function(e){return new o(e.id)},y.initImageListPropValue=function(e,t,i){i.propValues[e.name]=this._initImageListPropValue(t)},y._initImageListPropValue=function(e){return e.map((function(e){return new o(e.id)}))},y.initCustomDataPropValue=function(e,t,i,a,r,o){t&&t.value&&t.customData&&(i.propValues[e.name]=this._initCustomDataPropValue(t,t.customData,a,r,o))},y._initCustomDataPropValue=function(e,t,i,a,r){var o=this;if(!e)return null;var n=e.value;if(null==n)return null;switch(t.type){case m.BRAND:return this._initBrandPropValue(n);case m.BRAND_LIST:return this._initBrandListPropValue(n);case m.CATEGORY_LIST:return this._initCategoryListPropValue(n);case m.CATEGORY:return this._initCategoryPropValue(n);case m.IMAGE_LIST:return this._initImageListPropValue(n);case m.IMAGE:return this._initImagePropValue(n);case m.LINK:return this._initLinkPropValue(n);case m.PRODUCT_DETAIL:return this._initProductDetailPropValue(n,i);case m.PRODUCT_LIST:return this._initProductListPropValue(n,i);case m.PRODUCT_ATTRIBUTE:return this._initAttributePropValue(n);case m.PRODUCT_ATTRIBUTE_LIST:return this._initAttributeListPropValue(n);case m.BLOG:return this._initBlogPropValue(n);case m.BLOG_LIST:return this._initBlogListPropValue(n);case m.BLOG_CATEGORY:return this._initBlogCategoryPropValue(n);case m.BLOG_CATEGORY_LIST:return this._initBlogCategoryListPropValue(n);case m.RAFFLE:return this._initRafflePropValue(n);case m.RAFFLE_LIST:return this._initRaffleListPropValue(n);case m.SLIDER:return this._initSliderPropValue(n);case m.OBJECT:for(var u={},s=0,p=t.nestedData||[];s<p.length;s++){var l=p[s],c=n[l.key],d=void 0;l.customDataId&&(d=c.customData),u[l.key]=this._initCustomDataPropValue(c,d||l,i,a,r)}return u;case m.DYNAMIC_LIST:case m.STATIC_LIST:try{if(!n||!n.length)return null;var f=[],V=t.nestedData[0];return n.forEach((function(e){var t;V.customDataId&&(t=e.customData),f.push(o._initCustomDataPropValue(e,t||V,i,a,r))})),f}catch(e){return[]}case m.COMPONENT:return this._initComponentPropValue(n,i,a,r);case m.COMPONENT_LIST:return this._initComponentListPropValue(n,i,a,r);default:return n}},y.initComponentPropValue=function(e,t,i,a,r,o){i.propValues[e.name]=this._initComponentPropValue(t,a,r,o)},y._initComponentPropValue=function(t,i,a,r){var o=t.length?t[0]:void 0;if(o){var n=new b(o),u=this.initPropValues(JSON.stringify([n]),i,JSON.stringify(a),!1,r);if(u.length)return new v((function(){return e(u[0],a,-10)}))}},y.initComponentListPropValue=function(e,t,i,a,r,o){i.propValues[e.name]=this._initComponentListPropValue(t,a,r,o)},y._initComponentListPropValue=function(t,i,a,r){var o=this;return t&&t.length?t.map((function(t){var n=new b(t),u=o.initPropValues(JSON.stringify([n]),i,JSON.stringify(a),!1,r);return new v((function(){return e(u[0],a,-1)}))})):[]},y.initBlogPropValue=function(e,t,i){i.propValues[e.name]=y._initBlogPropValue(t)},y._initBlogPropValue=function(e){return e.blogPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.blog?new i(e.blog):I()},y.initBlogListPropValue=function(e,t,i){i.propValues[e.name]=this._initBlogListPropValue(t)},y._initBlogListPropValue=function(e){return new f(e)},y.initBlogCategoryPropValue=function(e,t,i){i.propValues[e.name]=y._initBlogCategoryPropValue(t)},y._initBlogCategoryPropValue=function(e){return e.blogCategoryPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.blogCategory?new t(e.blogCategory):w()},y.initBlogCategoryListPropValue=function(e,t,i){i.propValues[e.name]=this._initBlogCategoryListPropValue(t)},y._initBlogCategoryListPropValue=function(e){return new V(e)},y.initRafflePropValue=function(e,t,i){i.propValues[e.name]=y._initRafflePropValue(t)},y._initRafflePropValue=function(e){return e.rafflePropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.raffle?new u(e.raffle):O()},y.initRaffleListPropValue=function(e,t,i){i.propValues[e.name]=this._initRaffleListPropValue(t)},y._initRaffleListPropValue=function(e){return new C(e)},y.initSliderPropValue=function(e,t,i){i.propValues[e.name]=this._initSliderPropValue(t)},y._initSliderPropValue=function(e){return new s(e)},y.pageSpecificData=n({}),y}();export{y as IkasPageDataInit};
1
+ import{renderComponent as e}from"../components/page/index.js";import{IkasBlogCategory as t,IkasBlog as i}from"../models/data/blog/index.js";import{IkasBrand as a}from"../models/data/brand/index.js";import{IkasCategory as r}from"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import{observable as o}from"mobx";import"../models/data/html-meta-data/index.js";import{IkasImage as n}from"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import{IkasRaffle as u}from"../models/data/raffle/index.js";import{IkasSlider as s}from"../models/data/slider/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import{IkasThemePageType as p}from"../models/theme/page/index.js";import{IkasThemePageComponent as l}from"../models/theme/page/component/index.js";import{IkasThemeComponent as c}from"../models/theme/component/index.js";import{IkasThemeComponentPropType as m}from"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import{IkasBrandList as d}from"../models/ui/brand-list/index.js";import{IkasBlogList as f}from"../models/ui/blog-list/index.js";import{IkasBlogCategoryList as V}from"../models/ui/blog-category-list/index.js";import{IkasCategoryList as P}from"../models/ui/category-list/index.js";import{IkasNavigationLink as g}from"../models/ui/navigation-link/index.js";import{IkasProductDetail as _}from"../models/ui/product-detail/index.js";import{IkasProductList as L}from"../models/ui/product-list/index.js";import{IkasAttributeDetail as h}from"../models/ui/product-attribute-detail/index.js";import{IkasAttributeList as D}from"../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/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{IkasComponentRenderer as v}from"../models/ui/component-renderer/index.js";import{IkasRaffleList as C}from"../models/ui/raffle-list/index.js";import{IkasThemeSettings as T}from"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import S from'../ext/lzutf8/build/production/lzutf8.js';import{IkasPageComponentPropValue as b}from"./page-data-get.js";import{getPlaceholderBrand as j,getPlaceholderCategory as B,getPlaceholderProduct as x,getPlaceholderBlog as w,getPlaceholderBlogCategory as I,getPlaceholderRaffle as O}from"./placeholders.js";var y=function(){function y(){}return y.setPageSpecificData=function(e,a,o){if(e){var n=JSON.parse(e);switch(a){case p.PRODUCT:var s=n;y.pageSpecificData=new _(s.product,s.selectedVariantValues),o&&this._initProductDetailOnBrowser(y.pageSpecificData);break;case p.CATEGORY:var l=n;y.pageSpecificData=new r(l);break;case p.BRAND:var c=n;y.pageSpecificData=new r(c);break;case p.BLOG:var m=n;y.pageSpecificData=new i(m);break;case p.BLOG_CATEGORY:var d=n;y.pageSpecificData=new t(d);break;case p.RAFFLE_DETAIL:var f=n;y.pageSpecificData=new u(f)}}else this.pageSpecificData=void 0},y.isServer=function(){return"undefined"==typeof window},y.initPropValues=function(e,t,i,a,r){var o=new T(JSON.parse(i)),n=a?S.decompress(e,{inputEncoding:"Base64"}):e,u=JSON.parse(n).map((function(e){return{pageComponent:new l(e.pageComponent),component:new c(e.component),propValues:e.propValues}}));return u.forEach((function(e){e.component.props.forEach((function(i){var a=e.propValues[i.name];if(null!=a)switch(i.type){case m.IMAGE:y.initImagePropValue(i,a,e);break;case m.IMAGE_LIST:y.initImageListPropValue(i,a,e);break;case m.BRAND:y.initBrandPropValue(i,a,e);break;case m.BRAND_LIST:y.initBrandListPropValue(i,a,e);break;case m.CATEGORY:y.initCategoryPropValue(i,a,e);break;case m.CATEGORY_LIST:y.initCategoryListPropValue(i,a,e);break;case m.PRODUCT_LIST:y.initProductListPropValue(i,a,e,t);break;case m.PRODUCT_DETAIL:y.initProductDetailPropValue(i,a,e,t);break;case m.PRODUCT_ATTRIBUTE:y.initAttributePropValue(i,a,e);break;case m.PRODUCT_ATTRIBUTE_LIST:y.initAttributeListPropValue(i,a,e);break;case m.LINK:case m.LIST_OF_LINK:y.initLinkPropValue(i,a,e);break;case m.COMPONENT:y.initComponentPropValue(i,a,e,t,o,r);break;case m.COMPONENT_LIST:y.initComponentListPropValue(i,a,e,t,o,r);break;case m.CUSTOM:y.initCustomDataPropValue(i,a,e,t,o,r);break;case m.BLOG:y.initBlogPropValue(i,a,e);break;case m.BLOG_LIST:y.initBlogListPropValue(i,a,e);break;case m.BLOG_CATEGORY:y.initBlogCategoryPropValue(i,a,e);break;case m.BLOG_LIST:y.initBlogCategoryListPropValue(i,a,e);break;case m.RAFFLE:y.initRafflePropValue(i,a,e);break;case m.RAFFLE_LIST:y.initRaffleListPropValue(i,a,e);break;case m.SLIDER:y.initSliderPropValue(i,a,e)}}))})),u},y.initBrandPropValue=function(e,t,i){i.propValues[e.name]=y._initBrandPropValue(t)},y._initBrandPropValue=function(e){return e.brandPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.brand?new a(e.brand):j()},y.initBrandListPropValue=function(e,t,i){i.propValues[e.name]=y._initBrandListPropValue(t)},y._initBrandListPropValue=function(e){return new d(e)},y.initCategoryPropValue=function(e,t,i){i.propValues[e.name]=y._initCategoryPropValue(t)},y._initCategoryPropValue=function(e){return e.categoryPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.category?new r(e.category):B()},y.initCategoryListPropValue=function(e,t,i){var a=new P(t);i.propValues[e.name]=a},y._initCategoryListPropValue=function(e){return new P(e)},y.initProductListPropValue=function(e,t,i,a){i.propValues[e.name]=this._initProductListPropValue(t,a)},y._initProductListPropValue=function(e,t){return new L(e,t)},y.initProductDetailPropValue=function(e,t,i,a){i.propValues[e.name]=this._initProductDetailPropValue(t,a)},y._initProductDetailPropValue=function(e,t){var i=x();return e.productDetailPropValue.usePageData&&this.pageSpecificData?i=this.pageSpecificData:e.productDetail&&(i=new _(e.productDetail.product,e.productDetail.selectedVariantValues)),i.router=t,i},y._initProductDetailOnBrowser=function(e){var t=new URLSearchParams(window.location.search),i=t.get("vid");if(i){var a=e.product.variants.find((function(e){return e.id===i}));a&&(e.selectedVariantValues=a.variantValues)}else{var r=e.product.variantTypes.map((function(e){return e.variantType.slug})),o=[];r.forEach((function(i,a){var r=e.product.variantTypes[a],n=t.get(i);if(n){var u=r.variantType.values.find((function(e){return e.slug===n}));u&&o.push(u)}})),o.length===e.selectedVariantValues.length&&(e.selectedVariantValues=o)}},y.initAttributePropValue=function(e,t,i){i.propValues[e.name]=y._initAttributePropValue(t)},y._initAttributePropValue=function(e){var t=null;return e.attributePropValue.usePageData&&this.pageSpecificData?t=this.pageSpecificData:e.productDetail&&(t=new _(e.productDetail.product,e.productDetail.selectedVariantValues)),new h(t,e.attributePropValue)},y.initAttributeListPropValue=function(e,t,i){i.propValues[e.name]=y._initAttributeListPropValue(t)},y._initAttributeListPropValue=function(e){var t=null;return e.attributeListPropValue.usePageData&&this.pageSpecificData?t=this.pageSpecificData:e.productDetail&&(t=new _(e.productDetail.product,e.productDetail.selectedVariantValues)),new D(t,e.attributeListPropValue)},y.initLinkPropValue=function(e,t,i){i.propValues[e.name]=this._initLinkPropValue(t)},y._initLinkPropValue=function(e){return Array.isArray(e)?e.map((function(e){return new g(e.href,e.label,e.subLinks,e.isExternal||void 0)})):e?new g(e.href,e.label,e.subLinks,e.isExternal):void 0},y.initImagePropValue=function(e,t,i){i.propValues[e.name]=this._initImagePropValue(t)},y._initImagePropValue=function(e){return new n(e.id)},y.initImageListPropValue=function(e,t,i){i.propValues[e.name]=this._initImageListPropValue(t)},y._initImageListPropValue=function(e){return e.map((function(e){return new n(e.id)}))},y.initCustomDataPropValue=function(e,t,i,a,r,o){t&&t.value&&t.customData&&(i.propValues[e.name]=this._initCustomDataPropValue(t,t.customData,a,r,o))},y._initCustomDataPropValue=function(e,t,i,a,r){var o=this;if(!e)return null;var n=e.value;if(null==n)return null;switch(t.type){case m.BRAND:return this._initBrandPropValue(n);case m.BRAND_LIST:return this._initBrandListPropValue(n);case m.CATEGORY_LIST:return this._initCategoryListPropValue(n);case m.CATEGORY:return this._initCategoryPropValue(n);case m.IMAGE_LIST:return this._initImageListPropValue(n);case m.IMAGE:return this._initImagePropValue(n);case m.LINK:return this._initLinkPropValue(n);case m.PRODUCT_DETAIL:return this._initProductDetailPropValue(n,i);case m.PRODUCT_LIST:return this._initProductListPropValue(n,i);case m.PRODUCT_ATTRIBUTE:return this._initAttributePropValue(n);case m.PRODUCT_ATTRIBUTE_LIST:return this._initAttributeListPropValue(n);case m.BLOG:return this._initBlogPropValue(n);case m.BLOG_LIST:return this._initBlogListPropValue(n);case m.BLOG_CATEGORY:return this._initBlogCategoryPropValue(n);case m.BLOG_CATEGORY_LIST:return this._initBlogCategoryListPropValue(n);case m.RAFFLE:return this._initRafflePropValue(n);case m.RAFFLE_LIST:return this._initRaffleListPropValue(n);case m.SLIDER:return this._initSliderPropValue(n);case m.OBJECT:for(var u={},s=0,p=t.nestedData||[];s<p.length;s++){var l=p[s],c=n[l.key],d=void 0;l.customDataId&&(d=c.customData),u[l.key]=this._initCustomDataPropValue(c,d||l,i,a,r)}return u;case m.DYNAMIC_LIST:case m.STATIC_LIST:try{if(!n||!n.length)return null;var f=[],V=t.nestedData[0];return n.forEach((function(e){var t;V.customDataId&&(t=e.customData),f.push(o._initCustomDataPropValue(e,t||V,i,a,r))})),f}catch(e){return[]}case m.COMPONENT:return this._initComponentPropValue(n,i,a,r);case m.COMPONENT_LIST:return this._initComponentListPropValue(n,i,a,r);default:return n}},y.initComponentPropValue=function(e,t,i,a,r,o){i.propValues[e.name]=this._initComponentPropValue(t,a,r,o)},y._initComponentPropValue=function(t,i,a,r){var o=t.length?t[0]:void 0;if(o){var n=new b(o),u=this.initPropValues(JSON.stringify([n]),i,JSON.stringify(a),!1,r);if(u.length)return new v((function(){return e(u[0],a,-10)}))}},y.initComponentListPropValue=function(e,t,i,a,r,o){i.propValues[e.name]=this._initComponentListPropValue(t,a,r,o)},y._initComponentListPropValue=function(t,i,a,r){var o=this;return t&&t.length?t.map((function(t){var n=new b(t),u=o.initPropValues(JSON.stringify([n]),i,JSON.stringify(a),!1,r);return new v((function(){return e(u[0],a,-1)}))})):[]},y.initBlogPropValue=function(e,t,i){i.propValues[e.name]=y._initBlogPropValue(t)},y._initBlogPropValue=function(e){return e.blogPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.blog?new i(e.blog):w()},y.initBlogListPropValue=function(e,t,i){i.propValues[e.name]=this._initBlogListPropValue(t)},y._initBlogListPropValue=function(e){return new f(e)},y.initBlogCategoryPropValue=function(e,t,i){i.propValues[e.name]=y._initBlogCategoryPropValue(t)},y._initBlogCategoryPropValue=function(e){return e.blogCategoryPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.blogCategory?new t(e.blogCategory):I()},y.initBlogCategoryListPropValue=function(e,t,i){i.propValues[e.name]=this._initBlogCategoryListPropValue(t)},y._initBlogCategoryListPropValue=function(e){return new V(e)},y.initRafflePropValue=function(e,t,i){i.propValues[e.name]=y._initRafflePropValue(t)},y._initRafflePropValue=function(e){return e.rafflePropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:e.raffle?new u(e.raffle):O()},y.initRaffleListPropValue=function(e,t,i){i.propValues[e.name]=this._initRaffleListPropValue(t)},y._initRaffleListPropValue=function(e){return new C(e)},y.initSliderPropValue=function(e,t,i){i.propValues[e.name]=this._initSliderPropValue(t)},y._initSliderPropValue=function(e){return new s(e)},y.pageSpecificData=o({}),y}();export{y as IkasPageDataInit};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t,__assign as o,__spreadArray as r}from'../ext/tslib/tslib.es6.js';import i from"fs";import n from"next/config.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"mobx";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import{IkasTheme as s}from"../models/theme/theme.js";import{IkasThemePageType as a}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasStorefront as d}from"../models/data/storefront/index.js";import{IkasSalesChannel as l}from"../models/data/sales-channel/index.js";import{IkasStorefrontRouting as m}from"../models/data/storefront/routing/index.js";import{IkasStorefrontConfig as c}from"../storefront/index.js";import{IkasPageDataProvider as p}from"./page-data-get.js";import{IkasStorefrontThemeLocalization as u}from"../models/data/storefront/theme-localization/index.js";import{IkasStorefrontAPI as f}from"../api/storefront/index.js";import{I18NFileReader as g}from"../utils/i18n.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import{IkasCheckoutAPI as j}from"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{getGoogleFontHref as x}from"../utils/google-fonts.js";var h=function(){function h(){}return h.readLocalTheme=function(){return new Promise((function(e,t){i.readFile("./src/theme.json",{flag:"a+"},(function(o,r){if(o)return t(o);var i=r.length?JSON.parse(r.toString()):{};e(new s(i))}))}))},h.readSettingsFile=function(){return new Promise((function(e){var t=n().serverRuntimeConfig.SETTINGS;i.readFile(t,{flag:"a+"},(function(t,o){if(t)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(t),e(null);var r=o.length?JSON.parse(o.toString()):{};e(r)}))}))},h.getSettings=function(o){var r=this;return new Promise((function(n){return e(r,void 0,void 0,(function(){var e,r,s,a,p,g,j,x,v,S,C,b,y,I,w,k;return t(this,(function(t){switch(t.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?c.storefrontId?[4,f.getStorefront(c.storefrontId)]:(console.error("Missing storefrontId in the config.json file!"),[2,n(null)]):[3,3];case 1:return(e=t.sent())?(r=e,[4,h.readLocalTheme()]):[2,n(null)];case 2:return s=t.sent(),a=h.createColorScript(s.settings),p=h.createFontScript(s.settings),g=[],a&&g.push(a),p&&g.push(p),n({storefront:r,themeLocalization:new u({themeJson:s}),salesChannel:new l({id:r.salesChannelId}),routing:r.routings.length?r.routings.find((function(e){return e.locale===o||e.id===o}))||r.routings[0]:new m({}),favicon:s.settings.favicon,stockPreference:s.settings.stockPreference,storefrontJSScripts:g,domain:"",productBackInStockSettings:{customerLoginRequired:!0},customerReviewSettings:{customerLoginRequired:!0,customerPurchaseRequired:!1}}),[3,5];case 3:return[4,h.readSettingsFile()];case 4:if(!(j=t.sent())||!j.localizationMap)return[2,n(null)];if(x=new d(j.storefront),v=new l(j.salesChannel),S=j.localizationMap,C=j.storefrontJSScripts||[],b=j.domain,y=j.productBackInStockSettings?{customerLoginRequired:j.productBackInStockSettings.customerLoginRequired}:null,I=j.customerReviewSettings?{customerLoginRequired:j.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:j.customerReviewSettings.customerPurchaseRequired||!1}:null,w=S[o],k=x.routings.find((function(e){return e.id===o||e.path===o})),!w||!k)return console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,n(null)];i.readFile(w,{flag:"a+"},(function(e,t){if(e)return console.error("THEME LOCALZIATION FILE READ ERROR!!!"),console.error(e),n(null);var o=t.length?JSON.parse(t.toString()):{},r=new u(o),i=r.themeJson.settings.favicon,s=r.themeJson.settings.stockPreference;if(r.themeJson.settings){var a=h.createColorScript(r.themeJson.settings),d=h.createFontScript(r.themeJson.settings);a&&C.push(a),d&&C.push(d)}n({storefront:x,themeLocalization:r,salesChannel:v,routing:k,favicon:i,stockPreference:s,storefrontJSScripts:C,domain:b,productBackInStockSettings:y,customerReviewSettings:I})})),t.label=5;case 5:return[2]}}))}))}))},h.getPageData=function(i,s,d,l,m){var u,f;return e(this,void 0,void 0,(function(){var e,x,v,S,C,b,y,I,w,k,P,R,L,T,B,E,V,J,F,O,N,D,q,A,z,M;return t(this,(function(t){switch(t.label){case 0:return e="local"===process.env.NEXT_PUBLIC_ENV,x=!e&&m,v=n().serverRuntimeConfig,x?[3,7]:(S=i.locale)?[4,h.getSettings(S)]:[2,{props:{},notFound:!0}];case 1:return(C=t.sent())&&C.storefront.mainStorefrontThemeId&&C.storefront.salesChannelId?(b=C.storefront,y=C.themeLocalization,I=C.salesChannel,w=C.routing,k=C.favicon,P=C.stockPreference,R=C.storefrontJSScripts,L=C.domain,T=C.productBackInStockSettings,B=C.customerReviewSettings,c.storefrontId=b.id,c.storefrontRoutingId=w.id,c.storefrontThemeId=b.mainStorefrontThemeId,c.salesChannelId=b.salesChannelId,c.priceListId=w.priceListId||void 0,c.stockLocationIds=null===(u=I.stockLocations)||void 0===u?void 0:u.map((function(e){return e.id})),c.routings=b.routings,c.paymentGateways=I.paymentGateways||[],c.gtmId=b.gtmId||void 0,c.fbpId=b.fbpId||void 0,c.favicon=k||null,c.stockPreference=P||null,c.storefrontJSScripts=R||[],c.domain=L,c.productBackInStockSettings=T,c.customerReviewSettings=B,(E=new p(y.themeJson,i.params,d)).possiblePageTypes=l||(d?[d]:[]),m?[3,3]:[4,E.getPageData()]):[2,{props:{},notFound:!0}];case 2:if(t.sent(),!E.page)return[2,{props:{},notFound:!0}];t.label=3;case 3:return V=m?E.theme.components.map((function(e){return e.id})):E.page.components.map((function(e){return e.componentId})),J=y.themeJson.components.filter((function(e){return m||V.includes(e.id)})),F=r(["common"],J.map((function(e){return e.dir})),!0),(d===a.CHECKOUT||m)&&F.push("checkout-page"),O=v.nextI18nConf,N=w.locale,[4,new g(N,F,e?void 0:O.localePath).read()];case 4:return D=t.sent(),c.translations=D,q={},d!==a.CHECKOUT?[3,6]:(A=null===(f=E.page)||void 0===f?void 0:f.components[0])?[4,j.listCheckoutSettings()]:[3,6];case 5:z=t.sent(),M={buttonBgColor:A.propValues.buttonBgColor,buttonTextColor:A.propValues.buttonTextColor,buttonDisabledBgColor:A.propValues.buttonDisabledBgColor,buttonDisabledTextColor:A.propValues.buttonDisabledTextColor,primaryTextColor:A.propValues.primaryTextColor,secondaryTextColor:A.propValues.secondaryTextColor,primaryBgColor:A.propValues.primaryBgColor,secondaryBgColor:A.propValues.secondaryBgColor,borderColor:A.propValues.borderColor,cardBgColor:A.propValues.cardBgColor,errorColor:A.propValues.errorColor,errorLightColor:A.propValues.errorLightColor,warningColor:A.propValues.warningColor,warningLightColor:A.propValues.warningLightColor,successColor:A.propValues.successColor,successLightColor:A.propValues.successLightColor},q.customizationProps=M,q.returnPolicy=y.returnPolicy,q.privacyPolicy=y.privacyPolicy,q.termsOfService=y.termsOfService,q.checkoutSettingsStr=(null==z?void 0:z.length)?JSON.stringify(z[0]):null,t.label=6;case 6:return s?[2,{props:o(o({},E.nextPageData.props),q)}]:[2,{props:o(o({},E.nextPageData.props),q),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},h.getStaticProps=function(o,r,i,n){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,h.getPageData(o,!1,r,i,n)];case 1:return[2,e.sent()]}}))}))},h.getServerSideProps=function(o,r){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,h.getPageData(o,!0,r)];case 1:return[2,e.sent()]}}))}))},h.createColorScript=function(e){if(e.colors)return"<script>".concat(e.colors.map((function(e){return'document.documentElement.style.setProperty("'.concat(e.key,'","').concat(e.color,'");')})).join("\r\n"),"<\/script> \n ")},h.createFontScript=function(e){var t=x(e.fontFamily);if(t)return'<link id="ikas-font" rel="stylesheet" href="'.concat(t,"\"> \n <style>\n body { \n font-family: '").concat(e.fontFamily.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n } \n </style>')},h}();export{h as IkasNextPageDataProvider};
1
+ import{__awaiter as e,__generator as t,__assign as o,__spreadArray as r}from'../ext/tslib/tslib.es6.js';import i from"fs";import n from"next/config.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import{IkasTheme as s}from"../models/theme/theme.js";import{IkasThemePageType as a}from"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{IkasStorefront as d}from"../models/data/storefront/index.js";import{IkasSalesChannel as l}from"../models/data/sales-channel/index.js";import{IkasStorefrontRouting as m}from"../models/data/storefront/routing/index.js";import{IkasStorefrontConfig as c}from"../storefront/index.js";import{IkasPageDataProvider as p}from"./page-data-get.js";import{IkasStorefrontThemeLocalization as u}from"../models/data/storefront/theme-localization/index.js";import{IkasStorefrontAPI as f}from"../api/storefront/index.js";import{I18NFileReader as g}from"../utils/i18n.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import{IkasCheckoutAPI as j}from"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{getGoogleFontHref as x}from"../utils/google-fonts.js";var h=function(){function h(){}return h.readLocalTheme=function(){return new Promise((function(e,t){i.readFile("./src/theme.json",{flag:"a+"},(function(o,r){if(o)return t(o);var i=r.length?JSON.parse(r.toString()):{};e(new s(i))}))}))},h.readSettingsFile=function(){return new Promise((function(e){var t=n().serverRuntimeConfig.SETTINGS;i.readFile(t,{flag:"a+"},(function(t,o){if(t)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(t),e(null);var r=o.length?JSON.parse(o.toString()):{};e(r)}))}))},h.getSettings=function(o){var r=this;return new Promise((function(n){return e(r,void 0,void 0,(function(){var e,r,s,a,p,g,j,x,v,S,C,y,b,I,w,k;return t(this,(function(t){switch(t.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?c.storefrontId?[4,f.getStorefront(c.storefrontId)]:(console.error("Missing storefrontId in the config.json file!"),[2,n(null)]):[3,3];case 1:return(e=t.sent())?(r=e,[4,h.readLocalTheme()]):[2,n(null)];case 2:return s=t.sent(),a=h.createColorScript(s.settings),p=h.createFontScript(s.settings),g=[],a&&g.push(a),p&&g.push(p),n({storefront:r,themeLocalization:new u({themeJson:s}),salesChannel:new l({id:r.salesChannelId}),routing:r.routings.length?r.routings.find((function(e){return e.locale===o||e.id===o}))||r.routings[0]:new m({}),favicon:s.settings.favicon,stockPreference:s.settings.stockPreference,storefrontJSScripts:g,domain:"",productBackInStockSettings:{customerLoginRequired:!0},customerReviewSettings:{customerLoginRequired:!0,customerPurchaseRequired:!1}}),[3,5];case 3:return[4,h.readSettingsFile()];case 4:if(!(j=t.sent())||!j.localizationMap)return[2,n(null)];if(x=new d(j.storefront),v=new l(j.salesChannel),S=j.localizationMap,C=j.storefrontJSScripts||[],y=j.domain,b=j.productBackInStockSettings?{customerLoginRequired:j.productBackInStockSettings.customerLoginRequired}:null,I=j.customerReviewSettings?{customerLoginRequired:j.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:j.customerReviewSettings.customerPurchaseRequired||!1}:null,w=S[o],k=x.routings.find((function(e){return e.id===o||e.path===o})),!w||!k)return console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,n(null)];i.readFile(w,{flag:"a+"},(function(e,t){if(e)return console.error("THEME LOCALZIATION FILE READ ERROR!!!"),console.error(e),n(null);var o=t.length?JSON.parse(t.toString()):{},r=new u(o),i=r.themeJson.settings.favicon,s=r.themeJson.settings.stockPreference;if(r.themeJson.settings){var a=h.createColorScript(r.themeJson.settings),d=h.createFontScript(r.themeJson.settings);a&&C.push(a),d&&C.push(d)}n({storefront:x,themeLocalization:r,salesChannel:v,routing:k,favicon:i,stockPreference:s,storefrontJSScripts:C,domain:y,productBackInStockSettings:b,customerReviewSettings:I})})),t.label=5;case 5:return[2]}}))}))}))},h.getPageData=function(i,s,d,l,m){var u,f;return e(this,void 0,void 0,(function(){var e,x,v,S,C,y,b,I,w,k,P,R,L,T,B,E,V,J,F,O,N,D,q,A,z,M;return t(this,(function(t){switch(t.label){case 0:return e="local"===process.env.NEXT_PUBLIC_ENV,x=!e&&m,v=n().serverRuntimeConfig,x?[3,7]:(S=i.locale)?[4,h.getSettings(S)]:[2,{props:{},notFound:!0}];case 1:return(C=t.sent())&&C.storefront.mainStorefrontThemeId&&C.storefront.salesChannelId?(y=C.storefront,b=C.themeLocalization,I=C.salesChannel,w=C.routing,k=C.favicon,P=C.stockPreference,R=C.storefrontJSScripts,L=C.domain,T=C.productBackInStockSettings,B=C.customerReviewSettings,c.storefrontId=y.id,c.storefrontRoutingId=w.id,c.storefrontThemeId=y.mainStorefrontThemeId,c.salesChannelId=y.salesChannelId,c.priceListId=w.priceListId||void 0,c.stockLocationIds=null===(u=I.stockLocations)||void 0===u?void 0:u.map((function(e){return e.id})),c.routings=y.routings,c.paymentGateways=I.paymentGateways||[],c.gtmId=y.gtmId||void 0,c.fbpId=y.fbpId||void 0,c.favicon=k||null,c.stockPreference=P||null,c.storefrontJSScripts=R||[],c.domain=L,c.productBackInStockSettings=T,c.customerReviewSettings=B,(E=new p(b.themeJson,i.params,d)).possiblePageTypes=l||(d?[d]:[]),m?[3,3]:[4,E.getPageData()]):[2,{props:{},notFound:!0}];case 2:if(t.sent(),!E.page)return[2,{props:{},notFound:!0}];t.label=3;case 3:return V=m?E.theme.components.map((function(e){return e.id})):E.page.components.map((function(e){return e.componentId})),J=b.themeJson.components.filter((function(e){return m||V.includes(e.id)})),F=r(["common"],J.map((function(e){return e.dir})),!0),(d===a.CHECKOUT||m)&&F.push("checkout-page"),O=v.nextI18nConf,N=w.locale,[4,new g(N,F,e?void 0:O.localePath).read()];case 4:return D=t.sent(),c.translations=D,q={},d!==a.CHECKOUT?[3,6]:(A=null===(f=E.page)||void 0===f?void 0:f.components[0])?[4,j.listCheckoutSettings()]:[3,6];case 5:z=t.sent(),M={buttonBgColor:A.propValues.buttonBgColor,buttonTextColor:A.propValues.buttonTextColor,buttonDisabledBgColor:A.propValues.buttonDisabledBgColor,buttonDisabledTextColor:A.propValues.buttonDisabledTextColor,primaryTextColor:A.propValues.primaryTextColor,secondaryTextColor:A.propValues.secondaryTextColor,primaryBgColor:A.propValues.primaryBgColor,secondaryBgColor:A.propValues.secondaryBgColor,borderColor:A.propValues.borderColor,cardBgColor:A.propValues.cardBgColor,errorColor:A.propValues.errorColor,errorLightColor:A.propValues.errorLightColor,warningColor:A.propValues.warningColor,warningLightColor:A.propValues.warningLightColor,successColor:A.propValues.successColor,successLightColor:A.propValues.successLightColor},q.customizationProps=M,q.returnPolicy=b.returnPolicy,q.privacyPolicy=b.privacyPolicy,q.termsOfService=b.termsOfService,q.checkoutSettingsStr=(null==z?void 0:z.length)?JSON.stringify(z[0]):null,t.label=6;case 6:return s?[2,{props:o(o({},E.nextPageData.props),q)}]:[2,{props:o(o({},E.nextPageData.props),q),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},h.getStaticProps=function(o,r,i,n){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,h.getPageData(o,!1,r,i,n)];case 1:return[2,e.sent()]}}))}))},h.getServerSideProps=function(o,r){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,h.getPageData(o,!0,r)];case 1:return[2,e.sent()]}}))}))},h.createColorScript=function(e){if(e.colors)return"<script>".concat(e.colors.map((function(e){return'document.documentElement.style.setProperty("'.concat(e.key,'","').concat(e.color,'");')})).join("\r\n"),"<\/script> \n ")},h.createFontScript=function(e){var t=x(e.fontFamily);if(t)return'<link id="ikas-font" rel="stylesheet" href="'.concat(t,"\"> \n <style>\n body { \n font-family: '").concat(e.fontFamily.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n } \n </style>')},h}();export{h as IkasNextPageDataProvider};