cloudcommerce 0.26.6 → 0.26.7

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 (231) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  4. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +4 -1
  5. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  6. package/ecomplus-stores/barra-doce/package.json +2 -2
  7. package/ecomplus-stores/barra-doce/scripts/install.sh +12 -2
  8. package/ecomplus-stores/iluminim/scripts/install.sh +12 -2
  9. package/ecomplus-stores/monocard/.firebaserc +1 -1
  10. package/ecomplus-stores/monocard/.github/build-and-deploy +1 -0
  11. package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +1 -0
  12. package/ecomplus-stores/monocard/README.md +11 -82
  13. package/ecomplus-stores/monocard/SETUP.md +129 -0
  14. package/ecomplus-stores/monocard/{README.pt-BR.md → SETUP.pt-BR.md} +39 -12
  15. package/ecomplus-stores/monocard/functions/config.json +1 -1
  16. package/ecomplus-stores/monocard/functions/{passport → many}/index.js +5 -0
  17. package/ecomplus-stores/monocard/functions/{events → many}/package.json +4 -3
  18. package/ecomplus-stores/monocard/functions/ssr/.eslintrc.cjs +1 -1
  19. package/ecomplus-stores/monocard/functions/ssr/content/blog/.gitkeep +0 -0
  20. package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/contato.json +11 -0
  21. package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/terms.json +11 -0
  22. package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/trocas.json +11 -0
  23. package/ecomplus-stores/monocard/functions/ssr/content/layout.json +25 -10
  24. package/ecomplus-stores/monocard/functions/ssr/content/pages/home.json +63 -0
  25. package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +19 -0
  26. package/ecomplus-stores/monocard/functions/ssr/content/settings.json +22 -2
  27. package/ecomplus-stores/monocard/functions/ssr/package.json +8 -9
  28. package/ecomplus-stores/monocard/functions/ssr/public/admin/.gitkeep +0 -0
  29. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  30. package/ecomplus-stores/monocard/functions/ssr/src/assets/card.css +99 -0
  31. package/ecomplus-stores/monocard/functions/ssr/src/assets/style.css +74 -0
  32. package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +5 -14
  33. package/ecomplus-stores/monocard/functions/ssr/src/components/Banner.vue +59 -0
  34. package/ecomplus-stores/monocard/functions/ssr/src/components/BannersGrid.astro +25 -0
  35. package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +44 -0
  36. package/ecomplus-stores/monocard/functions/ssr/src/components/CartItem.vue +64 -0
  37. package/ecomplus-stores/monocard/functions/ssr/src/components/CartSidebar.vue +66 -0
  38. package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +8 -3
  39. package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.astro +30 -0
  40. package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +2 -2
  41. package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +12 -9
  42. package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -105
  43. package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +10 -27
  44. package/ecomplus-stores/monocard/functions/ssr/src/components/ProductCard.vue +117 -0
  45. package/ecomplus-stores/monocard/functions/ssr/src/components/ProductShelf.vue +57 -0
  46. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopFooter.vue +123 -0
  47. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +85 -32
  48. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
  49. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +3 -3
  50. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +2 -2
  51. package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +9 -1
  52. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +9 -44
  53. package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageFooter.astro +52 -0
  54. package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageHeader.astro +35 -0
  55. package/ecomplus-stores/monocard/functions/ssr/src/main/Fallback.astro +0 -5
  56. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +6 -12
  57. package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +38 -0
  58. package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +4 -18
  59. package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +15 -9
  60. package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +19 -9
  61. package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +16 -10
  62. package/ecomplus-stores/monocard/functions/ssr/src/pages/~fallback.astro +25 -0
  63. package/ecomplus-stores/monocard/functions/ssr/src/scripts/InlineScripts.astro +6 -6
  64. package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +1 -11
  65. package/ecomplus-stores/monocard/functions/{modules → with-apps}/index.js +3 -0
  66. package/ecomplus-stores/monocard/functions/{modules → with-apps}/package.json +4 -3
  67. package/ecomplus-stores/monocard/package.json +4 -1
  68. package/ecomplus-stores/monocard/scripts/install.sh +12 -2
  69. package/ecomplus-stores/tia-sonia/scripts/install.sh +12 -2
  70. package/package.json +4 -4
  71. package/packages/api/package.json +1 -1
  72. package/packages/apps/affilate-program/package.json +1 -1
  73. package/packages/apps/correios/package.json +1 -1
  74. package/packages/apps/custom-payment/package.json +1 -1
  75. package/packages/apps/custom-shipping/package.json +1 -1
  76. package/packages/apps/datafrete/package.json +1 -1
  77. package/packages/apps/discounts/package.json +1 -1
  78. package/packages/apps/emails/package.json +1 -1
  79. package/packages/apps/fb-conversions/package.json +2 -2
  80. package/packages/apps/flash-courier/package.json +1 -1
  81. package/packages/apps/frenet/package.json +1 -1
  82. package/packages/apps/galaxpay/package.json +1 -1
  83. package/packages/apps/google-analytics/package.json +1 -1
  84. package/packages/apps/jadlog/package.json +1 -1
  85. package/packages/apps/loyalty-points/package.json +1 -1
  86. package/packages/apps/melhor-envio/package.json +1 -1
  87. package/packages/apps/mercadopago/package.json +1 -1
  88. package/packages/apps/pagarme/package.json +2 -2
  89. package/packages/apps/paghiper/package.json +1 -1
  90. package/packages/apps/pix/package.json +1 -1
  91. package/packages/apps/tiny-erp/package.json +1 -1
  92. package/packages/apps/webhooks/package.json +1 -1
  93. package/packages/cli/package.json +2 -2
  94. package/packages/config/package.json +1 -1
  95. package/packages/emails/package.json +1 -1
  96. package/packages/eslint/package.json +3 -3
  97. package/packages/events/package.json +1 -1
  98. package/packages/feeds/package.json +1 -1
  99. package/packages/firebase/package.json +2 -2
  100. package/packages/i18n/package.json +1 -1
  101. package/packages/modules/package.json +1 -1
  102. package/packages/passport/package.json +1 -1
  103. package/packages/ssr/lib/firebase/serve-storefront.js +23 -8
  104. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  105. package/packages/ssr/package.json +2 -2
  106. package/packages/ssr/src/firebase/serve-storefront.ts +24 -8
  107. package/packages/storefront/dist/client/_astro/{Carousel.9ad2e1dc.js → Carousel.4bf71bce.js} +1 -1
  108. package/packages/storefront/dist/client/_astro/{CartSidebar.a6c6a885.js → CartSidebar.05b12b39.js} +1 -1
  109. package/packages/storefront/dist/client/_astro/{HeroSlider.ee1e6200.js → HeroSlider.fe108a14.js} +1 -1
  110. package/packages/storefront/dist/client/_astro/{PitchBar.6111676e.js → PitchBar.2c821b77.js} +1 -1
  111. package/packages/storefront/dist/client/_astro/{Prices.04ff8fce.js → Prices.78eb0a61.js} +1 -1
  112. package/packages/storefront/dist/client/_astro/{ProductShelf.085721d6.js → ProductShelf.46d8a51c.js} +1 -1
  113. package/packages/storefront/dist/client/_astro/ShopHeader.3694a82b.js +4 -0
  114. package/packages/storefront/dist/client/_astro/_...slug_.a4a7a874.css +1 -0
  115. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  116. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  117. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  118. package/packages/storefront/dist/client/_astro/{firebase-app.8c541cce.js → firebase-app.3f59f3c7.js} +3 -3
  119. package/packages/storefront/dist/client/_astro/headphone_1Ekzdh.avif +0 -0
  120. package/packages/storefront/dist/client/_astro/headphone_Z1GbHcH.webp +0 -0
  121. package/packages/storefront/dist/client/_astro/{hoisted.85fdcf03.js → hoisted.648beb9d.js} +1 -1
  122. package/packages/storefront/dist/client/_astro/index.fadf28bd.js +1 -0
  123. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  124. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  125. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  126. package/packages/storefront/dist/client/_astro/{modules-info.e5d77bf3.js → modules-info.df822732.js} +1 -1
  127. package/packages/storefront/dist/client/_astro/passion_1LvKlp.webp +0 -0
  128. package/packages/storefront/dist/client/_astro/passion_2PSWs.avif +0 -0
  129. package/packages/storefront/dist/client/_astro/rect8589_1A8K2Q.webp +0 -0
  130. package/packages/storefront/dist/client/_astro/rect8589_1ND0he.png +0 -0
  131. package/packages/storefront/dist/client/_astro/rect8589_1mIaKd.png +0 -0
  132. package/packages/storefront/dist/client/_astro/rect8589_LhopI.avif +0 -0
  133. package/packages/storefront/dist/client/_astro/rect8589_Z1NFjiR.avif +0 -0
  134. package/packages/storefront/dist/client/_astro/rect8589_Z2a06Gx.png +0 -0
  135. package/packages/storefront/dist/client/_astro/rect8589_Z2nulUU.webp +0 -0
  136. package/packages/storefront/dist/client/_astro/rect8589_ZH7hsH.avif +0 -0
  137. package/packages/storefront/dist/client/_astro/rect8589_ZorpIx.webp +0 -0
  138. package/packages/storefront/dist/client/_astro/rect859_1CcLjM.avif +0 -0
  139. package/packages/storefront/dist/client/_astro/rect859_1IVKep.png +0 -0
  140. package/packages/storefront/dist/client/_astro/rect859_1zkdb4.webp +0 -0
  141. package/packages/storefront/dist/client/_astro/rect859_299fN7.avif +0 -0
  142. package/packages/storefront/dist/client/_astro/rect859_CnIof.png +0 -0
  143. package/packages/storefront/dist/client/_astro/rect859_Z1OtQaE.avif +0 -0
  144. package/packages/storefront/dist/client/_astro/rect859_flB3g.png +0 -0
  145. package/packages/storefront/dist/client/_astro/rect859_rsWaw.webp +0 -0
  146. package/packages/storefront/dist/client/_astro/rect859_sLbkT.webp +0 -0
  147. package/packages/storefront/dist/client/_astro/rect89_1yf5jS.avif +0 -0
  148. package/packages/storefront/dist/client/_astro/rect89_GQBli.webp +0 -0
  149. package/packages/storefront/dist/client/~fallback.html +67 -0
  150. package/packages/storefront/dist/client/~index.html +113 -0
  151. package/packages/storefront/dist/server/chunks/{CartSidebar.41b20543.mjs → CartSidebar.4179ad81.mjs} +4 -12
  152. package/packages/storefront/dist/server/chunks/{SearchModal.5f5e6a15.mjs → SearchModal.146ce2f7.mjs} +4 -11
  153. package/packages/storefront/dist/server/chunks/{endpoint@_@js.11be892a.mjs → _...05c626ea.mjs} +3 -10
  154. package/packages/storefront/dist/server/chunks/{account@_@astro.204fba92.mjs → account@_@astro.5eaddaf8.mjs} +2 -9
  155. package/packages/storefront/dist/server/chunks/{index@_@astro.19e0f502.mjs → index@_@astro.25a343cc.mjs} +3 -10
  156. package/packages/storefront/dist/server/chunks/{index@_@astro.b37a6ac9.mjs → index@_@astro.2d2f2e33.mjs} +3 -10
  157. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.36e8882b.mjs → _...slug_.astro.0808946e.mjs} +1836 -450
  158. package/packages/storefront/dist/server/chunks/pages/index.astro.d4145872.mjs +186 -0
  159. package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.ba4c2475.mjs → ~fallback.astro.84d4765b.mjs} +6 -23
  160. package/packages/storefront/dist/server/chunks/{~fallback@_@astro.6bb4c4b4.mjs → ~fallback@_@astro.86d710c3.mjs} +3 -10
  161. package/packages/storefront/dist/server/entry.mjs +7 -14
  162. package/packages/storefront/dist/server/images.dist.csv +30 -0
  163. package/packages/storefront/dist/server/images.src.csv +11 -0
  164. package/packages/storefront/dist/server/renderers.mjs +2 -9
  165. package/packages/storefront/dist/server/static-builds.csv +51 -0
  166. package/packages/storefront/package.json +3 -3
  167. package/packages/storefront/scripts/build-prod.sh +3 -2
  168. package/packages/storefront/server.d.ts +1 -0
  169. package/packages/storefront/src/lib/assets/base.css +8 -0
  170. package/packages/storefront/src/lib/assets/reset.css +11 -2
  171. package/packages/storefront/src/lib/components/ContentClearfix.astro +4 -1
  172. package/packages/storefront/src/lib/components/Drawer.vue +1 -1
  173. package/packages/storefront/src/lib/layouts/BaseBody.astro +3 -1
  174. package/packages/storefront/src/lib/layouts/BaseHead.astro +8 -3
  175. package/packages/storefront/src/lib/layouts/use-page-header.ts +2 -2
  176. package/packages/test-base/package.json +1 -1
  177. package/packages/types/package.json +1 -1
  178. package/pnpm-workspace.yaml +2 -0
  179. package/ecomplus-stores/monocard/functions/core/index.js +0 -9
  180. package/ecomplus-stores/monocard/functions/core/package.json +0 -20
  181. package/ecomplus-stores/monocard/functions/events/index.js +0 -9
  182. package/ecomplus-stores/monocard/functions/passport/package.json +0 -21
  183. package/ecomplus-stores/monocard/functions/ssr/content/blog.json +0 -18
  184. package/ecomplus-stores/monocard/functions/ssr/content/brands.json +0 -24
  185. package/ecomplus-stores/monocard/functions/ssr/content/categories.json +0 -24
  186. package/ecomplus-stores/monocard/functions/ssr/content/collections.json +0 -24
  187. package/ecomplus-stores/monocard/functions/ssr/content/home.json +0 -45
  188. package/ecomplus-stores/monocard/functions/ssr/content/maintenance.json +0 -6
  189. package/ecomplus-stores/monocard/functions/ssr/content/pages/contato.json +0 -6
  190. package/ecomplus-stores/monocard/functions/ssr/content/pages/entrega.json +0 -6
  191. package/ecomplus-stores/monocard/functions/ssr/content/pages/faq.json +0 -6
  192. package/ecomplus-stores/monocard/functions/ssr/content/pages/pagamentos.json +0 -6
  193. package/ecomplus-stores/monocard/functions/ssr/content/pages/privacidade.json +0 -6
  194. package/ecomplus-stores/monocard/functions/ssr/content/pages/sobre-nos.json +0 -6
  195. package/ecomplus-stores/monocard/functions/ssr/content/pages/termos.json +0 -6
  196. package/ecomplus-stores/monocard/functions/ssr/content/pages/trocas.json +0 -6
  197. package/ecomplus-stores/monocard/functions/ssr/content/posts/esta-loja-e-um-pwa.json +0 -9
  198. package/ecomplus-stores/monocard/functions/ssr/content/products.json +0 -32
  199. package/ecomplus-stores/monocard/functions/ssr/content/search.json +0 -8
  200. package/ecomplus-stores/monocard/functions/ssr/content/widgets/analytics.json +0 -11
  201. package/ecomplus-stores/monocard/functions/ssr/content/widgets/compre-confie.json +0 -11
  202. package/ecomplus-stores/monocard/functions/ssr/content/widgets/ebit.json +0 -11
  203. package/ecomplus-stores/monocard/functions/ssr/content/widgets/fb-pixel.json +0 -12
  204. package/ecomplus-stores/monocard/functions/ssr/content/widgets/gmc-ratings.json +0 -12
  205. package/ecomplus-stores/monocard/functions/ssr/content/widgets/minicart.json +0 -6
  206. package/ecomplus-stores/monocard/functions/ssr/content/widgets/offers-notification.json +0 -11
  207. package/ecomplus-stores/monocard/functions/ssr/content/widgets/opinioes-verificadas.json +0 -18
  208. package/ecomplus-stores/monocard/functions/ssr/content/widgets/product-card.json +0 -10
  209. package/ecomplus-stores/monocard/functions/ssr/content/widgets/product.json +0 -13
  210. package/ecomplus-stores/monocard/functions/ssr/content/widgets/search-engine.json +0 -8
  211. package/ecomplus-stores/monocard/functions/ssr/content/widgets/search.json +0 -6
  212. package/ecomplus-stores/monocard/functions/ssr/content/widgets/tag-manager.json +0 -12
  213. package/ecomplus-stores/monocard/functions/ssr/content/widgets/tawkto.json +0 -12
  214. package/ecomplus-stores/monocard/functions/ssr/content/widgets/trustvox.json +0 -15
  215. package/ecomplus-stores/monocard/functions/ssr/content/widgets/user.json +0 -5
  216. package/ecomplus-stores/monocard/functions/ssr/public/admin/config.json +0 -1
  217. package/ecomplus-stores/monocard/functions/ssr/public/assets/cms-preview.css +0 -274
  218. package/ecomplus-stores/monocard/functions/ssr/public/assets/cms.css +0 -114
  219. package/ecomplus-stores/monocard/functions/ssr/public/assets/cvv.png +0 -0
  220. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
  221. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
  222. package/ecomplus-stores/monocard/functions/ssr/public/assets/ssl-safe.png +0 -0
  223. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +0 -50
  224. package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +0 -21
  225. package/packages/storefront/dist/client/_astro/ShopHeader.7e485e35.js +0 -4
  226. package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +0 -1
  227. package/packages/storefront/dist/client/_astro/index.ea57babe.js +0 -1
  228. package/packages/storefront/dist/server/chunks/_...4a2548d2.mjs +0 -35
  229. package/packages/storefront/dist/server/chunks/pages/endpoint.js.f7a896a1.mjs +0 -119
  230. package/packages/storefront/dist/server/chunks/pages/index.astro.3145bd93.mjs +0 -1649
  231. /package/ecomplus-stores/monocard/functions/ssr/src/components/{FeatureTabs.astro → FeaturesSection.astro} +0 -0
@@ -1,1649 +0,0 @@
1
- import { c as createAstro, a as createComponent, r as renderTemplate, d as renderComponent, F as Fragment, m as maybeRenderHead, b as addAttribute, u as unescapeHTML } from '../astro.708269c6.mjs';
2
- import { _ as _export_sfc, s as socialNetworks, S as SocialNetworkLink, u as useSharedData, f as filterMainCategories, $ as $$Picture, p as parseShippingPhrase, C as Carousel, a as CarouselControl, b as availableExtraDiscount, c as installmentsOption, d as discountOption, l as loyaltyPointsPrograms, e as addProductToCart, g as loadRouteContext, h as $$BaseHead, j as $$PageHeader, k as $$Base } from './_...slug_.astro.36e8882b.mjs';
3
- import { useSSRContext, defineComponent, computed, mergeProps, createVNode, resolveDynamicComponent, resolveComponent, createSlots, withCtx, toDisplayString, createTextVNode, renderSlot, openBlock, createBlock, createCommentVNode, ref, shallowReactive, withDirectives, vShow, Fragment as Fragment$1, renderList, withModifiers, withAsyncContext } from 'vue';
4
- import { ssrRenderAttrs, ssrInterpolate, ssrRenderVNode, ssrRenderSlot, ssrRenderList, ssrRenderComponent, ssrRenderClass, ssrRenderStyle, ssrRenderAttr } from 'vue/server-renderer';
5
- import api from '@cloudcommerce/api';
6
- import { inStock, price, name, img, onPromotion } from '@ecomplus/utils';
7
- import { useElementHover, watchOnce } from '@vueuse/core';
8
-
9
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10
- __name: "PaymentMethodFlag",
11
- props: {
12
- as: { default: "i" },
13
- flag: {}
14
- },
15
- setup(__props, { expose: __expose }) {
16
- __expose();
17
- const props = __props;
18
- const iconClassName = computed(() => {
19
- switch (props.flag) {
20
- case "pix":
21
- return "i-pix text-[#77B6A8]";
22
- case "visa":
23
- return "i-visa";
24
- case "mastercard":
25
- return "i-mastercard";
26
- case "elo":
27
- return "i-elo";
28
- case "amex":
29
- return "i-amex";
30
- case "hipercard":
31
- return "i-hipercard";
32
- case "diners":
33
- return "i-dinersclub";
34
- case "discover":
35
- return "i-discover";
36
- default:
37
- return "";
38
- }
39
- });
40
- const __returned__ = { props, iconClassName };
41
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
42
- return __returned__;
43
- }
44
- });
45
- function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
46
- if (!$setup.iconClassName) {
47
- _push(`<b${ssrRenderAttrs(mergeProps({ class: "tracking-tighter leading-none mb-1 text-black text-[57%]" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
48
- } else {
49
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
50
- }
51
- }
52
- const _sfc_setup$6 = _sfc_main$6.setup;
53
- _sfc_main$6.setup = (props, ctx) => {
54
- const ssrContext = useSSRContext();
55
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
56
- return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
57
- };
58
- const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$6]]);
59
-
60
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
61
- __name: "ShopFooter",
62
- props: {
63
- stamps: {},
64
- categories: {},
65
- categoriesColTitle: {},
66
- pageLinks: {},
67
- pagesColTitle: {}
68
- },
69
- setup(__props, { expose: __expose }) {
70
- __expose();
71
- const __returned__ = { get socialNetworks() {
72
- return socialNetworks;
73
- }, SocialNetworkLink, PaymentMethodFlag };
74
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
75
- return __returned__;
76
- }
77
- });
78
- function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
79
- const _component_ALink = resolveComponent("ALink");
80
- _push(`<footer${ssrRenderAttrs(mergeProps({ class: "w-screen bg-base-50 border-t border-base-100 py-2" }, _attrs))}><div class="ui-section"><div class="pb-7 border-b border-base-200 flex justify-between flex-wrap lg:flex-nowrap sm:gap-x-10 gap-y-5"><div class="shrink">`);
81
- ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
82
- if (_ctx.$settings.description) {
83
- _push(`<div class="prose"><p>${ssrInterpolate(_ctx.$settings.description)}</p></div>`);
84
- } else {
85
- _push(`<!---->`);
86
- }
87
- _push(`<div class="flex gap-2 text-base-500"><!--[-->`);
88
- ssrRenderList($setup.socialNetworks, (href, network) => {
89
- _push(`<span>`);
90
- _push(ssrRenderComponent($setup["SocialNetworkLink"], {
91
- network,
92
- class: "p-1 hover:text-primary"
93
- }, createSlots({ _: 2 }, [
94
- network === "whatsapp" ? {
95
- name: "append",
96
- fn: withCtx((_, _push2, _parent2, _scopeId) => {
97
- if (_push2) {
98
- _push2(`<span class="ml-1 text-sm text-base-600"${_scopeId}>${ssrInterpolate(_ctx.$settings.whatsapp)}</span>`);
99
- } else {
100
- return [
101
- createVNode("span", { class: "ml-1 text-sm text-base-600" }, toDisplayString(_ctx.$settings.whatsapp), 1)
102
- ];
103
- }
104
- }),
105
- key: "0"
106
- } : void 0
107
- ]), _parent));
108
- _push(`</span>`);
109
- });
110
- _push(`<!--]--></div>`);
111
- if (_ctx.$settings.address || _ctx.$settings.phone) {
112
- _push(`<div class="mt-3 text-base-700">`);
113
- if (_ctx.$settings.address) {
114
- _push(`<address class="inline-block mr-4">${ssrInterpolate(_ctx.$settings.address)}</address>`);
115
- } else {
116
- _push(`<!---->`);
117
- }
118
- if (_ctx.$settings.phone) {
119
- _push(ssrRenderComponent(_component_ALink, {
120
- href: `tel:${_ctx.$settings.phone.replace(/\D/g, "")}`,
121
- class: "hover:text-primary"
122
- }, {
123
- default: withCtx((_, _push2, _parent2, _scopeId) => {
124
- if (_push2) {
125
- _push2(`<i class="i-phone mr-0.5"${_scopeId}></i> ${ssrInterpolate(_ctx.$settings.phone)}`);
126
- } else {
127
- return [
128
- createVNode("i", { class: "i-phone mr-0.5" }),
129
- createTextVNode(" " + toDisplayString(_ctx.$settings.phone), 1)
130
- ];
131
- }
132
- }),
133
- _: 1
134
- }, _parent));
135
- } else {
136
- _push(`<!---->`);
137
- }
138
- _push(`</div>`);
139
- } else {
140
- _push(`<!---->`);
141
- }
142
- _push(`</div>`);
143
- if ($props.categories?.length) {
144
- _push(`<div class="basis-1/2 sm:basis-auto"><div class="text-lg font-medium mb-2.5">${ssrInterpolate($props.categoriesColTitle || "Categorias")}</div><ul class="${ssrRenderClass([$props.categories.length > 4 ? "grid md:grid-cols-2 gap-x-5 gap-y-1.5" : "space-y-1.5", "text-sm"])}"><!--[-->`);
145
- ssrRenderList($props.categories, ({ name, slug }, i) => {
146
- _push(`<li>`);
147
- _push(ssrRenderComponent(_component_ALink, {
148
- href: `/${slug}`,
149
- class: "ui-link text-base-600"
150
- }, {
151
- default: withCtx((_, _push2, _parent2, _scopeId) => {
152
- if (_push2) {
153
- _push2(`${ssrInterpolate(name)}`);
154
- } else {
155
- return [
156
- createTextVNode(toDisplayString(name), 1)
157
- ];
158
- }
159
- }),
160
- _: 2
161
- }, _parent));
162
- _push(`</li>`);
163
- });
164
- _push(`<!--]--><li>`);
165
- _push(ssrRenderComponent(_component_ALink, {
166
- href: "/s",
167
- class: "ui-link text-base-900"
168
- }, {
169
- default: withCtx((_, _push2, _parent2, _scopeId) => {
170
- if (_push2) {
171
- _push2(`${ssrInterpolate("Todos os produtos")}`);
172
- } else {
173
- return [
174
- createTextVNode(toDisplayString("Todos os produtos"))
175
- ];
176
- }
177
- }),
178
- _: 1
179
- }, _parent));
180
- _push(`</li></ul></div>`);
181
- } else {
182
- _push(`<!---->`);
183
- }
184
- if ($props.pageLinks?.length) {
185
- _push(`<div class="basis-1/2 sm:basis-auto"><div class="text-lg font-medium mb-2.5">${ssrInterpolate($props.pagesColTitle || "Institucional")}</div><ul class="${ssrRenderClass([$props.pageLinks.length > 5 ? "grid md:grid-cols-2 gap-x-5 gap-y-1.5" : "space-y-1.5", "text-sm"])}"><!--[-->`);
186
- ssrRenderList($props.pageLinks, ({ title, href }, i) => {
187
- _push(`<li>`);
188
- _push(ssrRenderComponent(_component_ALink, {
189
- href,
190
- class: "ui-link text-base-600"
191
- }, {
192
- default: withCtx((_, _push2, _parent2, _scopeId) => {
193
- if (_push2) {
194
- _push2(`${ssrInterpolate(title)}`);
195
- } else {
196
- return [
197
- createTextVNode(toDisplayString(title), 1)
198
- ];
199
- }
200
- }),
201
- _: 2
202
- }, _parent));
203
- _push(`</li>`);
204
- });
205
- _push(`<!--]--></ul></div>`);
206
- } else {
207
- _push(`<!---->`);
208
- }
209
- _push(`</div></div><div class="ui-section"><div class="flex flex-wrap lg:flex-nowrap justify-between items-start gap-5"><ul class="flex gap-y-3 gap-x-6 lg:gap-x-8 items-center md:flex-wrap mx-auto md:mx-0 overflow-x-auto md:overflow-hidden"><!--[-->`);
210
- ssrRenderList($props.stamps, (stamp, i) => {
211
- _push(`<li>`);
212
- _push(ssrRenderComponent(_component_ALink, {
213
- href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
214
- }, {
215
- default: withCtx((_, _push2, _parent2, _scopeId) => {
216
- if (_push2) {
217
- ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
218
- if (!stamp.img) {
219
- _push2(`<span class="flex items-center"${_scopeId}>`);
220
- if (stamp.icon) {
221
- _push2(`<span class="text-4xl mr-2 [&amp;&gt;*]:bg-gradient-to-br [&amp;&gt;*]:from-success-200 [&amp;&gt;*]:to-success-700"${_scopeId}>`);
222
- if (stamp.icon === "lock") {
223
- _push2(`<i class="i-lock-closed"${_scopeId}></i>`);
224
- } else if (stamp.icon === "check") {
225
- _push2(`<i class="i-check-badge"${_scopeId}></i>`);
226
- } else {
227
- _push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
228
- }
229
- _push2(`</span>`);
230
- } else {
231
- _push2(`<!---->`);
232
- }
233
- _push2(`<span class="text-sm font-medium text-base-600 max-w-[140px]"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
234
- if (stamp.href && stamp.href.charAt(0) !== "/") {
235
- _push2(`<i class="bg-base-400 ml-0.5 i-arrow-top-right-on-square"${_scopeId}></i>`);
236
- } else {
237
- _push2(`<!---->`);
238
- }
239
- _push2(`</span></span>`);
240
- } else {
241
- _push2(`<!---->`);
242
- }
243
- } else {
244
- return [
245
- renderSlot(_ctx.$slots, `picture-${i}`),
246
- !stamp.img ? (openBlock(), createBlock("span", {
247
- key: 0,
248
- class: "flex items-center"
249
- }, [
250
- stamp.icon ? (openBlock(), createBlock("span", {
251
- key: 0,
252
- class: "text-4xl mr-2 [&>*]:bg-gradient-to-br [&>*]:from-success-200 [&>*]:to-success-700"
253
- }, [
254
- stamp.icon === "lock" ? (openBlock(), createBlock("i", {
255
- key: 0,
256
- class: "i-lock-closed"
257
- })) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
258
- key: 1,
259
- class: "i-check-badge"
260
- })) : (openBlock(), createBlock("i", {
261
- key: 2,
262
- class: "i-arrow-path-rounded-square"
263
- }))
264
- ])) : createCommentVNode("", true),
265
- createVNode("span", { class: "text-sm font-medium text-base-600 max-w-[140px]" }, [
266
- createTextVNode(toDisplayString(stamp.alt) + " ", 1),
267
- stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
268
- key: 0,
269
- class: "bg-base-400 ml-0.5 i-arrow-top-right-on-square"
270
- })) : createCommentVNode("", true)
271
- ])
272
- ])) : createCommentVNode("", true)
273
- ];
274
- }
275
- }),
276
- _: 2
277
- }, _parent));
278
- _push(`</li>`);
279
- });
280
- _push(`<!--]--></ul><div class="flex flex-wrap md:flex-nowrap justify-end items-center gap-4 text-2xl mx-auto md:mx-0 overflow-x-auto md:overflow-hidden"><!--[-->`);
281
- ssrRenderList(_ctx.$settings.payment_methods, (paymentMethod) => {
282
- _push(ssrRenderComponent($setup["PaymentMethodFlag"], {
283
- key: paymentMethod,
284
- flag: paymentMethod
285
- }, null, _parent));
286
- });
287
- _push(`<!--]--></div></div><div class="mt-7 text-xs text-center md:text-left md:flex justify-between gap-4"><div class="mb-3 md:mb-0"> @ ${ssrInterpolate(( new Date()).getFullYear())} ${ssrInterpolate(_ctx.$settings.corporate_name)} ${ssrInterpolate(_ctx.$settings.address ? `/ ${_ctx.$settings.address}` : "")} / ${ssrInterpolate(_ctx.$settings.doc_number)}</div>`);
288
- _push(ssrRenderComponent(_component_ALink, {
289
- href: "https://www.ecomplus.io/",
290
- class: "italic text-[#37003c]"
291
- }, {
292
- default: withCtx((_, _push2, _parent2, _scopeId) => {
293
- if (_push2) {
294
- _push2(` powered by <b${_scopeId}>E-Com Plus</b>`);
295
- } else {
296
- return [
297
- createTextVNode(" powered by "),
298
- createVNode("b", null, "E-Com Plus")
299
- ];
300
- }
301
- }),
302
- _: 1
303
- }, _parent));
304
- _push(`</div></div></footer>`);
305
- }
306
- const _sfc_setup$5 = _sfc_main$5.setup;
307
- _sfc_main$5.setup = (props, ctx) => {
308
- const ssrContext = useSSRContext();
309
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopFooter.vue");
310
- return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
311
- };
312
- const ShopFooter = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["ssrRender", _sfc_ssrRender$5]]);
313
-
314
- const $$Astro$6 = createAstro("https://ecom2-demo.web.app");
315
- const $$PageFooter = createComponent(async ($$result, $$props, $$slots) => {
316
- const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
317
- Astro2.self = $$PageFooter;
318
- const { routeContext } = Astro2.locals;
319
- const { settings, getContent, isHomepage } = routeContext;
320
- const LogoHeading = isHomepage ? "h2" : "h3";
321
- const layoutContent = await getContent("layout");
322
- const {
323
- footer: {
324
- stamps,
325
- categories_list: categoriesList,
326
- pages_list: pagesList
327
- }
328
- } = layoutContent;
329
- let mainCategories;
330
- let pageLinks;
331
- if (categoriesList?.enabled) {
332
- if (categoriesList.categories?.length) {
333
- mainCategories = categoriesList.categories;
334
- } else {
335
- const { value: categories } = await useSharedData({ field: "categories" });
336
- mainCategories = filterMainCategories(categories);
337
- }
338
- }
339
- if (pagesList?.enabled) {
340
- if (pagesList.links?.length) {
341
- pageLinks = pagesList.links;
342
- } else {
343
- pageLinks = [];
344
- const pageSlugs = await getContent("extra-pages/");
345
- for (let i = 0; i < pageSlugs.length; i++) {
346
- const { title } = await getContent(`extra-pages/${pageSlugs[i]}`);
347
- if (title) {
348
- pageLinks.push({ title, href: `/p/${pageSlugs[i]}` });
349
- }
350
- }
351
- }
352
- }
353
- return renderTemplate`${renderComponent($$result, "ShopFooter", ShopFooter, { "stamps": stamps, "categories": mainCategories, "categoriesColTitle": categoriesList?.title, "pageLinks": pageLinks, "pagesColTitle": pagesList?.title }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
354
- ${maybeRenderHead()}<a href="/">
355
- ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate`
356
- ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "loading": "lazy", "class": "max-w-[150px]" })}
357
- ` })}
358
- </a>
359
- ` })}` })}`;
360
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageFooter.astro", void 0);
361
-
362
- const useProductShelf = (props) => {
363
- const title = ref(props.title || "");
364
- const titleLink = ref(props.titleLink || "");
365
- const isFetching = ref(false);
366
- let fetching = null;
367
- const fetchError = ref(null);
368
- const products = shallowReactive(props.products || []);
369
- if (!props.products) {
370
- isFetching.value = true;
371
- fetching = (async () => {
372
- let searchQuery = props.searchQuery || "";
373
- let collection;
374
- if (props.collectionId) {
375
- try {
376
- const { data } = await api.get(`collections/${props.collectionId}`);
377
- collection = data;
378
- } catch (err) {
379
- console.error(err);
380
- fetchError.value = err;
381
- }
382
- const productIds = collection?.products;
383
- if (Array.isArray(productIds) && productIds.length) {
384
- searchQuery += `&_id=${productIds.slice(0, 60).join(",")}`;
385
- }
386
- if (!title.value && title.value !== null && collection?.name) {
387
- title.value = collection?.name;
388
- }
389
- }
390
- const limit = props.limit || 24;
391
- const offset = props.page ? (props.page - 1) * limit : 0;
392
- let endpointQuery = `offset=${offset}&limit=${limit}`;
393
- if (props.sort) {
394
- endpointQuery += `&sort=${props.sort}`;
395
- }
396
- endpointQuery += searchQuery;
397
- try {
398
- const { data } = await api.get(`search/v1?${endpointQuery}`);
399
- if (props.isShuffle) {
400
- let m = data.result.filter((item) => {
401
- return item.available && inStock(item);
402
- }).length;
403
- let t;
404
- let i;
405
- while (m) {
406
- i = Math.floor(Math.random() * m--);
407
- t = data.result[m];
408
- data.result[m] = data.result[i];
409
- data.result[i] = t;
410
- }
411
- }
412
- data.result.forEach((item) => products.push(item));
413
- } catch (err) {
414
- console.error(err);
415
- fetchError.value = err;
416
- }
417
- isFetching.value = false;
418
- })();
419
- }
420
- return {
421
- title,
422
- titleLink,
423
- isFetching,
424
- fetching,
425
- fetchError,
426
- products
427
- };
428
- };
429
-
430
- const now = Date.now();
431
- const parseBanners = (banners) => {
432
- const validBanners = [];
433
- banners.forEach(({
434
- img,
435
- start,
436
- end,
437
- mobile_img: mobileImg,
438
- button_link: buttonLink,
439
- button_text: buttonText,
440
- ...rest
441
- }) => {
442
- if (start && new Date(start).getTime() < now)
443
- return;
444
- if (end && new Date(end).getTime() > now)
445
- return;
446
- validBanners.push({
447
- ...rest,
448
- img,
449
- mobileImg,
450
- buttonLink,
451
- buttonText
452
- });
453
- });
454
- return validBanners;
455
- };
456
- const usePageHero = async ({ routeContext }) => {
457
- const { cmsContent } = routeContext;
458
- const heroSlider = { slides: [] };
459
- const heroContent = cmsContent?.hero;
460
- if (heroContent) {
461
- heroSlider.autoplay = heroContent.autoplay;
462
- if (heroContent.slides) {
463
- heroSlider.slides = parseBanners(heroContent.slides);
464
- }
465
- }
466
- return { heroSlider };
467
- };
468
- const usePageSections = async ({ routeContext, handleCustomSection }) => {
469
- const sectionsContent = routeContext.cmsContent?.sections;
470
- const sections = [];
471
- if (sectionsContent) {
472
- await Promise.all(sectionsContent.map(async ({ type, ...sectionContent }, index) => {
473
- if (type === "product-shelf") {
474
- const {
475
- collection_id: collectionIdAndInfo,
476
- headless: isHeadless,
477
- shuffle: isShuffle,
478
- ...rest
479
- } = sectionContent;
480
- let { sort, title } = sectionContent;
481
- switch (sort) {
482
- case "offers":
483
- sort = "-price_discount";
484
- break;
485
- case "news":
486
- sort = "-_id";
487
- break;
488
- case "lowest_price":
489
- sort = "price";
490
- break;
491
- case "highest_price":
492
- sort = "-price";
493
- break;
494
- }
495
- let collectionId = null;
496
- let searchQuery;
497
- let titleLink;
498
- if (collectionIdAndInfo) {
499
- const [_id, resource, name, path] = collectionIdAndInfo.split(":");
500
- collectionId = _id;
501
- if (resource === "categories") {
502
- searchQuery = `&categories._id=${_id}`;
503
- } else if (resource === "brands") {
504
- searchQuery = `&brands._id=${_id}`;
505
- }
506
- if (!title && title !== null && name) {
507
- title = name;
508
- }
509
- titleLink = path;
510
- }
511
- const props = {
512
- ...rest,
513
- collectionId,
514
- searchQuery,
515
- sort,
516
- title: isHeadless ? null : title,
517
- titleLink,
518
- isShuffle
519
- };
520
- const { fetching, products } = useProductShelf(props);
521
- await fetching;
522
- sections[index] = {
523
- type,
524
- props: {
525
- ...rest,
526
- collectionId,
527
- searchQuery,
528
- sort,
529
- title: isHeadless ? null : title,
530
- titleLink,
531
- isShuffle,
532
- products
533
- }
534
- };
535
- return;
536
- }
537
- if (type === "banners-grid") {
538
- sections[index] = {
539
- type,
540
- props: {
541
- banners: parseBanners(sectionContent.banners || [])
542
- }
543
- };
544
- return;
545
- }
546
- if (typeof handleCustomSection === "function") {
547
- const { props } = await handleCustomSection(
548
- type,
549
- sectionContent
550
- );
551
- sections[index] = { type, props };
552
- }
553
- }));
554
- }
555
- return {
556
- sections
557
- };
558
- };
559
-
560
- const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
561
- const $$BannerPictures = createComponent(async ($$result, $$props, $$slots) => {
562
- const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
563
- Astro2.self = $$BannerPictures;
564
- const {
565
- img,
566
- alt,
567
- mobileImg,
568
- title,
569
- subtitle,
570
- buttonText,
571
- index,
572
- class: className = "max-w-screen-sm sm:max-w-[828px] md:max-w-screen-2xl",
573
- mobileClass = "max-w-screen-sm sm:max-w-screen-lg"
574
- } = Astro2.props;
575
- const hasHeader = title || subtitle || buttonText;
576
- let { widths, mobileWidths } = Astro2.props;
577
- if (!widths?.length) {
578
- if (mobileImg) {
579
- widths = [1536, 2048];
580
- } else {
581
- widths = [640, 828, 1536, 2048];
582
- if (hasHeader) {
583
- widths = widths.map((w) => w / 2);
584
- }
585
- }
586
- }
587
- if (!mobileWidths?.length) {
588
- mobileWidths = [640, 1024];
589
- }
590
- return renderTemplate`${img && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": img, "alt": alt || "", "widths": widths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `${mobileImg ? "hidden md:block " : ""}mx-auto text-sm text-opacity-70 ${className}` })}`}
591
- ${mobileImg && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": mobileImg, "alt": alt || "", "widths": mobileWidths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `md:hidden mx-auto text-sm text-opacity-70 ${mobileClass}` })}`}`;
592
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/BannerPictures.astro", void 0);
593
-
594
- const useBanner = (props) => {
595
- const parsedTitle = computed(() => {
596
- return props.title ? parseShippingPhrase(props.title).value : "";
597
- });
598
- const parsedSubtitle = computed(() => {
599
- return props.subtitle ? parseShippingPhrase(props.subtitle).value : "";
600
- });
601
- const parsedButtonText = computed(() => {
602
- return props.buttonText ? parseShippingPhrase(props.buttonText).value : "";
603
- });
604
- const hasHeader = computed(() => {
605
- return Boolean(parsedTitle.value || parsedSubtitle.value || parsedButtonText.value);
606
- });
607
- return {
608
- parsedTitle,
609
- parsedSubtitle,
610
- parsedButtonText,
611
- hasHeader
612
- };
613
- };
614
-
615
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
616
- __name: "Banner",
617
- props: {
618
- img: {},
619
- alt: {},
620
- mobileImg: {},
621
- href: {},
622
- title: {},
623
- subtitle: {},
624
- buttonLink: {},
625
- buttonText: {},
626
- headingTag: { default: "h3" }
627
- },
628
- setup(__props, { expose: __expose }) {
629
- __expose();
630
- const props = __props;
631
- const {
632
- hasHeader,
633
- parsedTitle,
634
- parsedSubtitle,
635
- parsedButtonText
636
- } = useBanner(props);
637
- const __returned__ = { props, hasHeader, parsedTitle, parsedSubtitle, parsedButtonText };
638
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
639
- return __returned__;
640
- }
641
- });
642
- function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
643
- const _component_ALink = resolveComponent("ALink");
644
- _push(`<div${ssrRenderAttrs(mergeProps({
645
- class: ["mx-auto overflow-x-hidden", $setup.hasHeader ? "grid grid-cols-1 sm:grid-cols-2 items-center" : null]
646
- }, _attrs))}>`);
647
- _push(ssrRenderComponent(_component_ALink, {
648
- href: $props.href,
649
- class: $setup.hasHeader ? "sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none [&_img]:aspect-video sm:[&_img]:aspect-[2.5] [&_img]:object-cover" : "[&_img]:max-w-full"
650
- }, {
651
- default: withCtx((_, _push2, _parent2, _scopeId) => {
652
- if (_push2) {
653
- ssrRenderSlot(_ctx.$slots, "picture", {}, null, _push2, _parent2, _scopeId);
654
- } else {
655
- return [
656
- renderSlot(_ctx.$slots, "picture")
657
- ];
658
- }
659
- }),
660
- _: 3
661
- }, _parent));
662
- if ($setup.hasHeader) {
663
- _push(`<div class="p-12 xl:ps-32 mb-3 sm:mb-0">`);
664
- if ($setup.parsedTitle) {
665
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.headingTag), { class: "ui-title mt-1" }, {
666
- default: withCtx((_, _push2, _parent2, _scopeId) => {
667
- if (_push2) {
668
- _push2(`${ssrInterpolate($setup.parsedTitle)}`);
669
- } else {
670
- return [
671
- createTextVNode(toDisplayString($setup.parsedTitle), 1)
672
- ];
673
- }
674
- }),
675
- _: 1
676
- }), _parent);
677
- } else {
678
- _push(`<!---->`);
679
- }
680
- if ($setup.parsedSubtitle) {
681
- _push(`<p class="text-lg mt-4 md:mt-6">${ssrInterpolate($setup.parsedSubtitle)}</p>`);
682
- } else {
683
- _push(`<!---->`);
684
- }
685
- if ($setup.parsedButtonText) {
686
- _push(ssrRenderComponent(_component_ALink, {
687
- href: $props.buttonLink,
688
- class: "ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"
689
- }, {
690
- default: withCtx((_, _push2, _parent2, _scopeId) => {
691
- if (_push2) {
692
- _push2(`${ssrInterpolate($setup.parsedButtonText)}`);
693
- } else {
694
- return [
695
- createTextVNode(toDisplayString($setup.parsedButtonText), 1)
696
- ];
697
- }
698
- }),
699
- _: 1
700
- }, _parent));
701
- } else {
702
- _push(`<!---->`);
703
- }
704
- _push(`</div>`);
705
- } else {
706
- _push(`<!---->`);
707
- }
708
- _push(`</div>`);
709
- }
710
- const _sfc_setup$4 = _sfc_main$4.setup;
711
- _sfc_main$4.setup = (props, ctx) => {
712
- const ssrContext = useSSRContext();
713
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Banner.vue");
714
- return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
715
- };
716
- const Banner = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$4]]);
717
-
718
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
719
- __name: "HeroSlider",
720
- props: {
721
- autoplay: {},
722
- slides: {}
723
- },
724
- setup(__props, { expose: __expose }) {
725
- __expose();
726
- const __returned__ = { Carousel, CarouselControl, Banner };
727
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
728
- return __returned__;
729
- }
730
- });
731
- function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
732
- _push(`<section${ssrRenderAttrs(mergeProps({ class: "relative mx-auto" }, _attrs))}>`);
733
- _push(ssrRenderComponent($setup["Carousel"], {
734
- autoplay: $props.autoplay,
735
- class: "secondary [&>*]:items-center"
736
- }, {
737
- controls: withCtx((_, _push2, _parent2, _scopeId) => {
738
- if (_push2) {
739
- _push2(`<div style="${ssrRenderStyle($props.slides.length > 1 ? null : { display: "none" })}" class="absolute z-10 bottom-5 flex justify-end items-center w-screen right-5 xl:right-auto xl:max-w-screen-xl xl:left-1/2 xl:-ms-[640px]"${_scopeId}><div class="relative w-20 h-10 rounded-full bg-white/50 text-primary shadow-sm ring-1 ring-black/5"${_scopeId}>`);
740
- _push2(ssrRenderComponent($setup["CarouselControl"], {
741
- class: "w-10 h-10 rounded-full hover:bg-primary/10",
742
- "is-prev": ""
743
- }, {
744
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
745
- if (_push3) {
746
- _push3(`<i class="i-arrow-left"${_scopeId2}></i>`);
747
- } else {
748
- return [
749
- createVNode("i", { class: "i-arrow-left" })
750
- ];
751
- }
752
- }),
753
- _: 1
754
- }, _parent2, _scopeId));
755
- _push2(ssrRenderComponent($setup["CarouselControl"], { class: "w-10 h-10 rounded-full hover:bg-primary/10" }, {
756
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
757
- if (_push3) {
758
- _push3(`<i class="i-arrow-right"${_scopeId2}></i>`);
759
- } else {
760
- return [
761
- createVNode("i", { class: "i-arrow-right" })
762
- ];
763
- }
764
- }),
765
- _: 1
766
- }, _parent2, _scopeId));
767
- _push2(`</div></div>`);
768
- } else {
769
- return [
770
- withDirectives(createVNode("div", { class: "absolute z-10 bottom-5 flex justify-end items-center w-screen right-5 xl:right-auto xl:max-w-screen-xl xl:left-1/2 xl:-ms-[640px]" }, [
771
- createVNode("div", { class: "relative w-20 h-10 rounded-full bg-white/50 text-primary shadow-sm ring-1 ring-black/5" }, [
772
- createVNode($setup["CarouselControl"], {
773
- class: "w-10 h-10 rounded-full hover:bg-primary/10",
774
- "is-prev": ""
775
- }, {
776
- default: withCtx(() => [
777
- createVNode("i", { class: "i-arrow-left" })
778
- ]),
779
- _: 1
780
- }),
781
- createVNode($setup["CarouselControl"], { class: "w-10 h-10 rounded-full hover:bg-primary/10" }, {
782
- default: withCtx(() => [
783
- createVNode("i", { class: "i-arrow-right" })
784
- ]),
785
- _: 1
786
- })
787
- ])
788
- ], 512), [
789
- [vShow, $props.slides.length > 1]
790
- ])
791
- ];
792
- }
793
- }),
794
- default: withCtx((_, _push2, _parent2, _scopeId) => {
795
- if (_push2) {
796
- _push2(`<!--[-->`);
797
- ssrRenderList($props.slides, (slide, i) => {
798
- _push2(`<li class="shrink-0 basis-full"${_scopeId}>`);
799
- _push2(ssrRenderComponent($setup["Banner"], mergeProps({ ...slide, headingTag: i === 0 ? "h2" : "h3" }, { class: "w-screen max-w-screen-2xl" }), {
800
- picture: withCtx((_2, _push3, _parent3, _scopeId2) => {
801
- if (_push3) {
802
- ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push3, _parent3, _scopeId2);
803
- } else {
804
- return [
805
- renderSlot(_ctx.$slots, `picture-${i}`)
806
- ];
807
- }
808
- }),
809
- _: 2
810
- }, _parent2, _scopeId));
811
- _push2(`</li>`);
812
- });
813
- _push2(`<!--]-->`);
814
- } else {
815
- return [
816
- (openBlock(true), createBlock(Fragment$1, null, renderList($props.slides, (slide, i) => {
817
- return openBlock(), createBlock("li", {
818
- key: i,
819
- class: "shrink-0 basis-full"
820
- }, [
821
- createVNode($setup["Banner"], mergeProps({ ...slide, headingTag: i === 0 ? "h2" : "h3" }, { class: "w-screen max-w-screen-2xl" }), {
822
- picture: withCtx(() => [
823
- renderSlot(_ctx.$slots, `picture-${i}`)
824
- ]),
825
- _: 2
826
- }, 1040)
827
- ]);
828
- }), 128))
829
- ];
830
- }
831
- }),
832
- _: 3
833
- }, _parent));
834
- _push(`</section>`);
835
- }
836
- const _sfc_setup$3 = _sfc_main$3.setup;
837
- _sfc_main$3.setup = (props, ctx) => {
838
- const ssrContext = useSSRContext();
839
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/HeroSlider.vue");
840
- return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
841
- };
842
- const HeroSlider = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
843
-
844
- const $$Astro$4 = createAstro("https://ecom2-demo.web.app");
845
- const $$BannersGrid = createComponent(async ($$result, $$props, $$slots) => {
846
- const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
847
- Astro2.self = $$BannersGrid;
848
- const { banners } = Astro2.props;
849
- return renderTemplate`${maybeRenderHead()}<section class="ui-section">
850
- <ul class="flex flex-wrap lg:flex-nowrap gap-4">
851
- ${banners.map((banner) => renderTemplate`<li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover">
852
- ${renderComponent($$result, "Banner", Banner, { ...banner }, { "picture": ($$result2) => renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { ...banner, "slot": "picture" })}` })}
853
- </li>`)}
854
- </ul>
855
- </section>`;
856
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/BannersGrid.astro", void 0);
857
-
858
- const useProductCard = (props) => {
859
- const isFetching = ref(false);
860
- let fetching = null;
861
- const fetchError = ref(null);
862
- const { productId } = props;
863
- const product = shallowReactive({
864
- ...props.product,
865
- _id: props.product?._id || productId,
866
- price: price(props.product || {})
867
- });
868
- if (!props.product && productId) {
869
- isFetching.value = true;
870
- fetching = (async () => {
871
- try {
872
- const { data } = await api.get(`products/${productId}`);
873
- Object.assign(product, data);
874
- } catch (err) {
875
- console.error(err);
876
- fetchError.value = err;
877
- }
878
- isFetching.value = false;
879
- })();
880
- }
881
- const title = computed(() => {
882
- return name(product);
883
- });
884
- const link = computed(() => {
885
- const { slug } = product;
886
- if (typeof slug === "string") {
887
- return `/${slug}`;
888
- }
889
- return null;
890
- });
891
- const images = computed(() => {
892
- const { pictures } = product;
893
- const _images = [];
894
- if (pictures) {
895
- pictures.forEach((picture) => {
896
- const img$1 = img(picture);
897
- if (img$1)
898
- _images.push(img$1);
899
- });
900
- }
901
- return _images;
902
- });
903
- const isInStock = computed(() => {
904
- return inStock(product);
905
- });
906
- const isActive = computed(() => {
907
- return isInStock.value && product.available && product.visible;
908
- });
909
- const discountPercentage = computed(() => {
910
- if (onPromotion(product)) {
911
- const basePrice = product.base_price;
912
- return Math.round((basePrice - price(product)) * 100 / basePrice);
913
- }
914
- return 0;
915
- });
916
- const hasVariations = computed(() => {
917
- if (product.has_variations)
918
- return true;
919
- return Boolean(product.variations?.length);
920
- });
921
- return {
922
- isFetching,
923
- fetching,
924
- fetchError,
925
- product,
926
- title,
927
- link,
928
- images,
929
- isInStock,
930
- isActive,
931
- discountPercentage,
932
- hasVariations
933
- };
934
- };
935
-
936
- const getPriceWithDiscount = (price, discount) => {
937
- const { type, value } = discount;
938
- let priceWithDiscount;
939
- if (value) {
940
- if (type === "percentage") {
941
- priceWithDiscount = price * ((100 - value) / 100);
942
- } else {
943
- priceWithDiscount = price - value;
944
- }
945
- return priceWithDiscount > 0 ? priceWithDiscount : 0;
946
- }
947
- return price;
948
- };
949
- const usePrices = (props) => {
950
- const _product = computed(() => {
951
- return props.product || {
952
- price: props.price || 0,
953
- base_price: props.basePrice
954
- };
955
- });
956
- const hasVariedPrices = computed(() => {
957
- const { variations } = _product.value;
958
- if (variations) {
959
- const productPrice = price(_product.value);
960
- for (let i = 0; i < variations.length; i++) {
961
- const price$1 = price({
962
- ..._product.value,
963
- ...variations[i]
964
- });
965
- if (price$1 > productPrice) {
966
- return true;
967
- }
968
- }
969
- }
970
- return false;
971
- });
972
- const salePrice = computed(() => {
973
- const price$1 = price(_product.value);
974
- const discount = availableExtraDiscount.value;
975
- if (discount && (!discount.min_amount || price$1 > discount.min_amount)) {
976
- return getPriceWithDiscount(price$1, discount);
977
- }
978
- return price$1;
979
- });
980
- const comparePrice = computed(() => {
981
- if (onPromotion(_product.value)) {
982
- return _product.value.base_price;
983
- }
984
- const price$1 = price(_product.value);
985
- if (price$1 > salePrice.value) {
986
- return price$1;
987
- }
988
- return 0;
989
- });
990
- const installmentsObject = computed(() => {
991
- return props.installmentsOption || installmentsOption.value || { max_number: 1 };
992
- });
993
- const installmentsNumber = computed(() => {
994
- if (installmentsObject.value.max_number <= 1) {
995
- return 1;
996
- }
997
- const minInstallment = installmentsObject.value.min_installment || 5;
998
- const maxInstallmentsNumber = Math.floor(salePrice.value / minInstallment);
999
- return Math.min(maxInstallmentsNumber, installmentsObject.value.max_number);
1000
- });
1001
- const monthlyInterest = computed(() => {
1002
- return installmentsObject.value.monthly_interest || 0;
1003
- });
1004
- const installmentValue = computed(() => {
1005
- if (installmentsNumber.value >= 2) {
1006
- if (!monthlyInterest.value) {
1007
- return salePrice.value / installmentsNumber.value;
1008
- }
1009
- const interest = monthlyInterest.value / 100;
1010
- return salePrice.value * interest / (1 - (1 + interest) ** -installmentsNumber.value);
1011
- }
1012
- return 0;
1013
- });
1014
- const discountObject = computed(() => {
1015
- const discount = props.discountOption || discountOption.value;
1016
- if (discount && (!discount.min_amount || discount.min_amount <= salePrice.value) && (!props.isAmountTotal || discount.apply_at === "total")) {
1017
- return discount;
1018
- }
1019
- return {};
1020
- });
1021
- const discountLabel = computed(() => {
1022
- const { label } = discountObject.value;
1023
- if (label) {
1024
- if (label.includes(" ")) {
1025
- return label;
1026
- }
1027
- return `via ${label}`;
1028
- }
1029
- return "";
1030
- });
1031
- const priceWithDiscount = computed(() => {
1032
- return getPriceWithDiscount(salePrice.value, discountObject.value);
1033
- });
1034
- const pointsProgramObject = computed(() => {
1035
- if (props.loyaltyPointsProgram) {
1036
- return props.loyaltyPointsProgram;
1037
- }
1038
- const pointsPrograms = loyaltyPointsPrograms.value;
1039
- if (pointsPrograms) {
1040
- const programIds = Object.keys(pointsPrograms);
1041
- for (let i = 0; i < programIds.length; i++) {
1042
- const program = pointsPrograms[programIds[i]];
1043
- if (program?.earn_percentage && program.earn_percentage > 0) {
1044
- return program;
1045
- }
1046
- }
1047
- }
1048
- return { ratio: 0 };
1049
- });
1050
- const pointsMinPrice = computed(() => {
1051
- return pointsProgramObject.value.min_subtotal_to_earn || 0;
1052
- });
1053
- const pointsProgramName = computed(() => {
1054
- return pointsProgramObject.value.name || "";
1055
- });
1056
- const earnPointsPercentage = computed(() => {
1057
- return pointsProgramObject.value.earn_percentage || 0;
1058
- });
1059
- const cashbackPercentage = computed(() => {
1060
- return earnPointsPercentage.value * pointsProgramObject.value.ratio;
1061
- });
1062
- const cashbackValue = computed(() => {
1063
- return cashbackPercentage.value >= 1 ? salePrice.value * (cashbackPercentage.value / 100) : 0;
1064
- });
1065
- return {
1066
- hasVariedPrices,
1067
- salePrice,
1068
- comparePrice,
1069
- installmentsObject,
1070
- installmentsNumber,
1071
- monthlyInterest,
1072
- installmentValue,
1073
- discountObject,
1074
- discountLabel,
1075
- priceWithDiscount,
1076
- pointsProgramObject,
1077
- pointsMinPrice,
1078
- pointsProgramName,
1079
- earnPointsPercentage,
1080
- cashbackPercentage,
1081
- cashbackValue
1082
- };
1083
- };
1084
-
1085
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1086
- __name: "Prices",
1087
- props: {
1088
- isBig: { type: Boolean },
1089
- isLiteral: { type: Boolean },
1090
- hasCashback: { type: Boolean, default: true },
1091
- hasPriceOptions: { type: Boolean, default: true },
1092
- product: {},
1093
- price: {},
1094
- basePrice: {},
1095
- isAmountTotal: { type: Boolean },
1096
- installmentsOption: {},
1097
- discountOption: {},
1098
- loyaltyPointsProgram: {}
1099
- },
1100
- setup(__props, { expose: __expose }) {
1101
- __expose();
1102
- const props = __props;
1103
- const {
1104
- hasVariedPrices,
1105
- salePrice,
1106
- comparePrice,
1107
- cashbackPercentage,
1108
- cashbackValue,
1109
- installmentsNumber,
1110
- monthlyInterest,
1111
- installmentValue,
1112
- priceWithDiscount,
1113
- discountLabel
1114
- } = usePrices(props);
1115
- const __returned__ = { props, hasVariedPrices, salePrice, comparePrice, cashbackPercentage, cashbackValue, installmentsNumber, monthlyInterest, installmentValue, priceWithDiscount, discountLabel };
1116
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1117
- return __returned__;
1118
- }
1119
- });
1120
- function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1121
- const _component_Fade = resolveComponent("Fade");
1122
- _push(`<div${ssrRenderAttrs(mergeProps({
1123
- class: ["text-base-600 [&>div]:[font-size:90%] [&_small]:[font-size:92%] [&_small]:lowercase", $props.isBig ? "text-lg" : null]
1124
- }, _attrs))}>`);
1125
- if ($setup.comparePrice) {
1126
- _push(`<span class="text-base-500 mr-1 text-[87%]">`);
1127
- if ($props.isLiteral) {
1128
- _push(`<small>${ssrInterpolate(`${"De"} `)}</small>`);
1129
- } else {
1130
- _push(`<!---->`);
1131
- }
1132
- _push(`<s>${ssrInterpolate(_ctx.$money($setup.comparePrice))}</s>`);
1133
- if ($props.isLiteral) {
1134
- _push(`<small>${ssrInterpolate(` ${"Por"}`)}</small>`);
1135
- } else {
1136
- _push(`<!---->`);
1137
- }
1138
- _push(`</span>`);
1139
- } else {
1140
- _push(`<!---->`);
1141
- }
1142
- _push(`<strong class="${ssrRenderClass([$props.isBig ? "text-5xl block" : null, "inline-block text-base-800"])}">`);
1143
- if ($setup.hasVariedPrices) {
1144
- _push(`<small>${ssrInterpolate(`${"A partir de"} `)}</small>`);
1145
- } else {
1146
- _push(`<!---->`);
1147
- }
1148
- _push(` ${ssrInterpolate(_ctx.$money($setup.salePrice))}</strong>`);
1149
- _push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
1150
- default: withCtx((_, _push2, _parent2, _scopeId) => {
1151
- if (_push2) {
1152
- if ($setup.cashbackValue && $props.hasCashback) {
1153
- _push2(`<div class="relative z-10"${_scopeId}><span${ssrRenderAttr("data-tooltip", "Receba $1 de volta".replace("$1", _ctx.$percentage($setup.cashbackPercentage)))}${_scopeId}><i class="i-arrow-uturn-left mr-1"${_scopeId}></i><span class="font-medium"${_scopeId}>${ssrInterpolate(_ctx.$money($setup.cashbackValue))}</span><small${_scopeId}> cashback</small></span></div>`);
1154
- } else {
1155
- _push2(`<!---->`);
1156
- }
1157
- } else {
1158
- return [
1159
- $setup.cashbackValue && $props.hasCashback ? (openBlock(), createBlock("div", {
1160
- key: 0,
1161
- class: "relative z-10"
1162
- }, [
1163
- createVNode("span", {
1164
- "data-tooltip": "Receba $1 de volta".replace("$1", _ctx.$percentage($setup.cashbackPercentage))
1165
- }, [
1166
- createVNode("i", { class: "i-arrow-uturn-left mr-1" }),
1167
- createVNode("span", { class: "font-medium" }, toDisplayString(_ctx.$money($setup.cashbackValue)), 1),
1168
- createVNode("small", null, " cashback")
1169
- ], 8, ["data-tooltip"])
1170
- ])) : createCommentVNode("", true)
1171
- ];
1172
- }
1173
- }),
1174
- _: 1
1175
- }, _parent));
1176
- _push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
1177
- default: withCtx((_, _push2, _parent2, _scopeId) => {
1178
- if (_push2) {
1179
- if ($setup.installmentValue && $props.hasPriceOptions) {
1180
- _push2(`<div${_scopeId}>`);
1181
- if ($props.isLiteral) {
1182
- _push2(`<small${_scopeId}>${ssrInterpolate(`${"At\xE9"} `)}</small>`);
1183
- } else {
1184
- _push2(`<!---->`);
1185
- }
1186
- _push2(` ${ssrInterpolate($setup.installmentsNumber)}x `);
1187
- if ($props.isLiteral) {
1188
- _push2(`<small${_scopeId}>${ssrInterpolate(` ${"De"} `)}</small>`);
1189
- } else {
1190
- _push2(`<!---->`);
1191
- }
1192
- _push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$money($setup.installmentValue))}</span>`);
1193
- if (!$setup.monthlyInterest && $props.isLiteral) {
1194
- _push2(`<small${_scopeId}>${ssrInterpolate(` ${"Sem juros"}`)}</small>`);
1195
- } else {
1196
- _push2(`<!---->`);
1197
- }
1198
- _push2(`</div>`);
1199
- } else {
1200
- _push2(`<!---->`);
1201
- }
1202
- } else {
1203
- return [
1204
- $setup.installmentValue && $props.hasPriceOptions ? (openBlock(), createBlock("div", { key: 0 }, [
1205
- $props.isLiteral ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"At\xE9"} `))) : createCommentVNode("", true),
1206
- createTextVNode(" " + toDisplayString($setup.installmentsNumber) + "x ", 1),
1207
- $props.isLiteral ? (openBlock(), createBlock("small", { key: 1 }, toDisplayString(` ${"De"} `))) : createCommentVNode("", true),
1208
- createVNode("span", null, toDisplayString(_ctx.$money($setup.installmentValue)), 1),
1209
- !$setup.monthlyInterest && $props.isLiteral ? (openBlock(), createBlock("small", { key: 2 }, toDisplayString(` ${"Sem juros"}`))) : createCommentVNode("", true)
1210
- ])) : createCommentVNode("", true)
1211
- ];
1212
- }
1213
- }),
1214
- _: 1
1215
- }, _parent));
1216
- _push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
1217
- default: withCtx((_, _push2, _parent2, _scopeId) => {
1218
- if (_push2) {
1219
- if ($setup.priceWithDiscount < $setup.salePrice && $props.hasPriceOptions) {
1220
- _push2(`<div${_scopeId}>`);
1221
- if (!$setup.discountLabel) {
1222
- _push2(`<small${_scopeId}>${ssrInterpolate(`${"A partir de"} `)}</small>`);
1223
- } else {
1224
- _push2(`<!---->`);
1225
- }
1226
- _push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$money($setup.priceWithDiscount))}</span>`);
1227
- if ($setup.discountLabel) {
1228
- _push2(`<small${_scopeId}>${ssrInterpolate(` ${$setup.discountLabel}`)}</small>`);
1229
- } else {
1230
- _push2(`<!---->`);
1231
- }
1232
- _push2(`</div>`);
1233
- } else {
1234
- _push2(`<!---->`);
1235
- }
1236
- } else {
1237
- return [
1238
- $setup.priceWithDiscount < $setup.salePrice && $props.hasPriceOptions ? (openBlock(), createBlock("div", { key: 0 }, [
1239
- !$setup.discountLabel ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"A partir de"} `))) : createCommentVNode("", true),
1240
- createVNode("span", null, toDisplayString(_ctx.$money($setup.priceWithDiscount)), 1),
1241
- $setup.discountLabel ? (openBlock(), createBlock("small", { key: 1 }, toDisplayString(` ${$setup.discountLabel}`), 1)) : createCommentVNode("", true)
1242
- ])) : createCommentVNode("", true)
1243
- ];
1244
- }
1245
- }),
1246
- _: 1
1247
- }, _parent));
1248
- _push(`</div>`);
1249
- }
1250
- const _sfc_setup$2 = _sfc_main$2.setup;
1251
- _sfc_main$2.setup = (props, ctx) => {
1252
- const ssrContext = useSSRContext();
1253
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Prices.vue");
1254
- return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
1255
- };
1256
- const Prices = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
1257
-
1258
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1259
- __name: "ProductCard",
1260
- props: {
1261
- product: {},
1262
- productId: {},
1263
- headingTag: { default: "h3" }
1264
- },
1265
- setup(__props, { expose: __expose }) {
1266
- __expose();
1267
- const props = __props;
1268
- const {
1269
- product,
1270
- title,
1271
- link,
1272
- images,
1273
- isInStock,
1274
- isActive,
1275
- discountPercentage,
1276
- hasVariations
1277
- } = useProductCard(props);
1278
- const card = ref(null);
1279
- const isHovered = useElementHover(card);
1280
- const wasHoveredOnce = ref(false);
1281
- watchOnce(isHovered, () => {
1282
- wasHoveredOnce.value = true;
1283
- });
1284
- const __returned__ = { props, product, title, link, images, isInStock, isActive, discountPercentage, hasVariations, card, isHovered, wasHoveredOnce, get addProductToCart() {
1285
- return addProductToCart;
1286
- }, Prices };
1287
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1288
- return __returned__;
1289
- }
1290
- });
1291
- function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1292
- const _component_ALink = resolveComponent("ALink");
1293
- const _component_AImg = resolveComponent("AImg");
1294
- _push(`<article${ssrRenderAttrs(mergeProps({
1295
- ref: "card",
1296
- "data-sku": $setup.product.sku,
1297
- class: "relative h-full max-w-[350px] mx-auto py-3 group"
1298
- }, _attrs))}>`);
1299
- _push(ssrRenderComponent(_component_ALink, {
1300
- href: $setup.link,
1301
- class: "flex flex-col h-full rounded overflow-hidden group-hover:shadow group-hover:ring-1 ring-black/5"
1302
- }, {
1303
- default: withCtx((_, _push2, _parent2, _scopeId) => {
1304
- if (_push2) {
1305
- _push2(`<div class="aspect-square p-2 motion-safe:group-hover:scale-110 transition-transform"${_scopeId}><div class="relative w-full h-full bg-white rounded overflow-hidden group-hover:rounded-none"${_scopeId}>`);
1306
- if ($setup.images?.length) {
1307
- _push2(`<span class="text-xs text-opacity-70"${_scopeId}>`);
1308
- _push2(ssrRenderComponent(_component_AImg, {
1309
- picture: $setup.images[0],
1310
- alt: $setup.title,
1311
- class: "absolute top-0 left-0 block w-full h-full object-cover"
1312
- }, null, _parent2, _scopeId));
1313
- if ($setup.images[1] && $setup.wasHoveredOnce) {
1314
- _push2(ssrRenderComponent(_component_AImg, {
1315
- picture: $setup.images[1],
1316
- alt: $setup.title,
1317
- class: "absolute top-0 left-0 block w-full h-full object-cover opacity-0 group-hover:opacity-100 transition-opacity motion-safe:duration-300 text-transparent z-10"
1318
- }, null, _parent2, _scopeId));
1319
- } else {
1320
- _push2(`<!---->`);
1321
- }
1322
- _push2(`</span>`);
1323
- } else {
1324
- _push2(`<div class="w-full h-full bg-gradient-to-br from-base-50/20 to-base-100"${_scopeId}></div>`);
1325
- }
1326
- _push2(`</div></div>`);
1327
- if ($setup.discountPercentage) {
1328
- _push2(`<span class="uno-bm03rg"${_scopeId}> -<strong${_scopeId}>${ssrInterpolate($setup.discountPercentage)}</strong>% </span>`);
1329
- } else {
1330
- _push2(`<!---->`);
1331
- }
1332
- _push2(`<div class="relative flex flex-col grow justify-between p-4 group-hover:backdrop-blur-md bg-white/40 z-10"${_scopeId}>`);
1333
- ssrRenderVNode(_push2, createVNode(resolveDynamicComponent($props.headingTag), {
1334
- class: ["ui-link no-underline line-clamp-2", [
1335
- $setup.isActive ? "text-base-700" : "text-base-500",
1336
- $setup.link ? "group-hover:underline group-hover:text-primary" : null
1337
- ]]
1338
- }, {
1339
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
1340
- if (_push3) {
1341
- _push3(`${ssrInterpolate($setup.title)}`);
1342
- } else {
1343
- return [
1344
- createTextVNode(toDisplayString($setup.title), 1)
1345
- ];
1346
- }
1347
- }),
1348
- _: 1
1349
- }), _parent2, _scopeId);
1350
- _push2(`<div class="pt-2"${_scopeId}>`);
1351
- if ($setup.isActive) {
1352
- _push2(`<div${_scopeId}>`);
1353
- _push2(ssrRenderComponent($setup["Prices"], { product: $setup.product }, null, _parent2, _scopeId));
1354
- _push2(`</div>`);
1355
- } else {
1356
- _push2(`<span class="ui-badge bg-warning-100 text-warning-700"${_scopeId}>${ssrInterpolate(!$setup.isInStock ? "Sem estoque" : "Inativo")}</span>`);
1357
- }
1358
- _push2(`</div>`);
1359
- if ($setup.isActive && !$setup.hasVariations) {
1360
- _push2(`<button class="uno-3suct9 ui-btn-sm ui-btn-primary"${_scopeId}><span class="inline-block h-4 w-4 leading-none text-base text-center bg-on-primary text-primary opacity-80 rounded-full mr-1"${_scopeId}> + </span> ${ssrInterpolate("Adicionar ao carrinho")}</button>`);
1361
- } else {
1362
- _push2(`<!---->`);
1363
- }
1364
- _push2(`</div>`);
1365
- } else {
1366
- return [
1367
- createVNode("div", { class: "aspect-square p-2 motion-safe:group-hover:scale-110 transition-transform" }, [
1368
- createVNode("div", { class: "relative w-full h-full bg-white rounded overflow-hidden group-hover:rounded-none" }, [
1369
- $setup.images?.length ? (openBlock(), createBlock("span", {
1370
- key: 0,
1371
- class: "text-xs text-opacity-70"
1372
- }, [
1373
- createVNode(_component_AImg, {
1374
- picture: $setup.images[0],
1375
- alt: $setup.title,
1376
- class: "absolute top-0 left-0 block w-full h-full object-cover"
1377
- }, null, 8, ["picture", "alt"]),
1378
- $setup.images[1] && $setup.wasHoveredOnce ? (openBlock(), createBlock(_component_AImg, {
1379
- key: 0,
1380
- picture: $setup.images[1],
1381
- alt: $setup.title,
1382
- class: "absolute top-0 left-0 block w-full h-full object-cover opacity-0 group-hover:opacity-100 transition-opacity motion-safe:duration-300 text-transparent z-10"
1383
- }, null, 8, ["picture", "alt"])) : createCommentVNode("", true)
1384
- ])) : (openBlock(), createBlock("div", {
1385
- key: 1,
1386
- class: "w-full h-full bg-gradient-to-br from-base-50/20 to-base-100"
1387
- }))
1388
- ])
1389
- ]),
1390
- $setup.discountPercentage ? (openBlock(), createBlock("span", {
1391
- key: 0,
1392
- class: "uno-bm03rg"
1393
- }, [
1394
- createTextVNode(" -"),
1395
- createVNode("strong", null, toDisplayString($setup.discountPercentage), 1),
1396
- createTextVNode("% ")
1397
- ])) : createCommentVNode("", true),
1398
- createVNode("div", { class: "relative flex flex-col grow justify-between p-4 group-hover:backdrop-blur-md bg-white/40 z-10" }, [
1399
- (openBlock(), createBlock(resolveDynamicComponent($props.headingTag), {
1400
- class: ["ui-link no-underline line-clamp-2", [
1401
- $setup.isActive ? "text-base-700" : "text-base-500",
1402
- $setup.link ? "group-hover:underline group-hover:text-primary" : null
1403
- ]]
1404
- }, {
1405
- default: withCtx(() => [
1406
- createTextVNode(toDisplayString($setup.title), 1)
1407
- ]),
1408
- _: 1
1409
- }, 8, ["class"])),
1410
- createVNode("div", { class: "pt-2" }, [
1411
- $setup.isActive ? (openBlock(), createBlock("div", { key: 0 }, [
1412
- createVNode($setup["Prices"], { product: $setup.product }, null, 8, ["product"])
1413
- ])) : (openBlock(), createBlock("span", {
1414
- key: 1,
1415
- class: "ui-badge bg-warning-100 text-warning-700"
1416
- }, toDisplayString(!$setup.isInStock ? "Sem estoque" : "Inativo"), 1))
1417
- ]),
1418
- $setup.isActive && !$setup.hasVariations ? (openBlock(), createBlock("button", {
1419
- key: 0,
1420
- class: "uno-3suct9 ui-btn-sm ui-btn-primary",
1421
- onClick: withModifiers(($event) => $setup.addProductToCart($setup.product), ["prevent"])
1422
- }, [
1423
- createVNode("span", { class: "inline-block h-4 w-4 leading-none text-base text-center bg-on-primary text-primary opacity-80 rounded-full mr-1" }, " + "),
1424
- createTextVNode(" " + toDisplayString("Adicionar ao carrinho"))
1425
- ], 8, ["onClick"])) : createCommentVNode("", true)
1426
- ])
1427
- ];
1428
- }
1429
- }),
1430
- _: 1
1431
- }, _parent));
1432
- _push(`</article>`);
1433
- }
1434
- const _sfc_setup$1 = _sfc_main$1.setup;
1435
- _sfc_main$1.setup = (props, ctx) => {
1436
- const ssrContext = useSSRContext();
1437
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ProductCard.vue");
1438
- return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
1439
- };
1440
- const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
1441
-
1442
- const _sfc_main = /* @__PURE__ */ defineComponent({
1443
- __name: "ProductShelf",
1444
- props: {
1445
- collectionId: {},
1446
- searchQuery: {},
1447
- sort: {},
1448
- title: {},
1449
- titleLink: {},
1450
- isShuffle: { type: Boolean },
1451
- limit: {},
1452
- page: {},
1453
- products: {}
1454
- },
1455
- async setup(__props, { expose: __expose }) {
1456
- __expose();
1457
- let __temp, __restore;
1458
- const props = __props;
1459
- const {
1460
- title,
1461
- titleLink,
1462
- fetching,
1463
- products
1464
- } = useProductShelf(props);
1465
- {
1466
- [__temp, __restore] = withAsyncContext(() => fetching), await __temp, __restore();
1467
- }
1468
- const __returned__ = { props, title, titleLink, fetching, products, Carousel, CarouselControl, ProductCard };
1469
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1470
- return __returned__;
1471
- }
1472
- });
1473
- function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1474
- const _component_ALink = resolveComponent("ALink");
1475
- _push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}>`);
1476
- if ($setup.title) {
1477
- _push(`<div class="max-w-prose mx-auto text-center mb-2"><h2 class="ui-text-brand text-3xl">`);
1478
- _push(ssrRenderComponent(_component_ALink, {
1479
- href: $setup.titleLink,
1480
- class: $setup.titleLink ? "ui-link" : "text-base-700"
1481
- }, {
1482
- default: withCtx((_, _push2, _parent2, _scopeId) => {
1483
- if (_push2) {
1484
- _push2(`${ssrInterpolate($setup.title)}`);
1485
- } else {
1486
- return [
1487
- createTextVNode(toDisplayString($setup.title), 1)
1488
- ];
1489
- }
1490
- }),
1491
- _: 1
1492
- }, _parent));
1493
- _push(`</h2></div>`);
1494
- } else {
1495
- _push(`<!---->`);
1496
- }
1497
- _push(ssrRenderComponent($setup["Carousel"], { class: "group/shelf" }, {
1498
- controls: withCtx((_, _push2, _parent2, _scopeId) => {
1499
- if (_push2) {
1500
- _push2(`<div style="${ssrRenderStyle($setup.products.length > 2 ? null : { display: "none" })}" class="text-3xl lg:text-2xl leading-none text-primary lg:opacity-0 group-hover/shelf:opacity-90 transition-opacity"${_scopeId}>`);
1501
- _push2(ssrRenderComponent($setup["CarouselControl"], {
1502
- class: "!top-1/2 !-left-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5",
1503
- "is-prev": ""
1504
- }, null, _parent2, _scopeId));
1505
- _push2(ssrRenderComponent($setup["CarouselControl"], { class: "!top-1/2 !-right-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5" }, null, _parent2, _scopeId));
1506
- _push2(`</div>`);
1507
- } else {
1508
- return [
1509
- withDirectives(createVNode("div", { class: "text-3xl lg:text-2xl leading-none text-primary lg:opacity-0 group-hover/shelf:opacity-90 transition-opacity" }, [
1510
- createVNode($setup["CarouselControl"], {
1511
- class: "!top-1/2 !-left-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5",
1512
- "is-prev": ""
1513
- }),
1514
- createVNode($setup["CarouselControl"], { class: "!top-1/2 !-right-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5" })
1515
- ], 512), [
1516
- [vShow, $setup.products.length > 2]
1517
- ])
1518
- ];
1519
- }
1520
- }),
1521
- default: withCtx((_, _push2, _parent2, _scopeId) => {
1522
- if (_push2) {
1523
- _push2(`<!--[-->`);
1524
- ssrRenderList($setup.products, (product) => {
1525
- _push2(`<li class="basis-1/2 md:basis-1/3 lg:basis-1/4 shrink-0"${_scopeId}>`);
1526
- _push2(ssrRenderComponent($setup["ProductCard"], { product }, null, _parent2, _scopeId));
1527
- _push2(`</li>`);
1528
- });
1529
- _push2(`<!--]-->`);
1530
- } else {
1531
- return [
1532
- (openBlock(true), createBlock(Fragment$1, null, renderList($setup.products, (product) => {
1533
- return openBlock(), createBlock("li", {
1534
- key: product._id,
1535
- class: "basis-1/2 md:basis-1/3 lg:basis-1/4 shrink-0"
1536
- }, [
1537
- createVNode($setup["ProductCard"], { product }, null, 8, ["product"])
1538
- ]);
1539
- }), 128))
1540
- ];
1541
- }
1542
- }),
1543
- _: 1
1544
- }, _parent));
1545
- _push(`</section>`);
1546
- }
1547
- const _sfc_setup = _sfc_main.setup;
1548
- _sfc_main.setup = (props, ctx) => {
1549
- const ssrContext = useSSRContext();
1550
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ProductShelf.vue");
1551
- return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
1552
- };
1553
- const ProductShelf = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
1554
-
1555
- const $$Astro$3 = createAstro("https://ecom2-demo.web.app");
1556
- const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
1557
- const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
1558
- Astro2.self = $$Sections;
1559
- const { routeContext } = Astro2.locals;
1560
- const { sections } = await usePageSections({
1561
- routeContext,
1562
- handleCustomSection: async (type, content) => {
1563
- if (type === "c:foo")
1564
- return { props: { ...content, foo: "bar" } };
1565
- return { props: content };
1566
- }
1567
- });
1568
- return renderTemplate`${maybeRenderHead()}<article class="my-9 md:my-12">
1569
- ${sections.map(({ type, props }) => {
1570
- switch (type) {
1571
- case "product-shelf":
1572
- return renderTemplate`${renderComponent($$result, "ProductShelf", ProductShelf, { ...props, "client:visible": true, "client:component-hydration": "visible", "client:component-path": "~/components/ProductShelf.vue", "client:component-export": "default" })}`;
1573
- case "banners-grid":
1574
- return renderTemplate`${renderComponent($$result, "BannersGrid", $$BannersGrid, { ...props })}`;
1575
- case "c:foo":
1576
- return renderTemplate`<div${addAttribute(props.foo, "data-foo")}></div>`;
1577
- default:
1578
- return renderTemplate`<div${addAttribute(type, "data-section")}></div>`;
1579
- }
1580
- })}
1581
- </article>`;
1582
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Sections.astro", void 0);
1583
-
1584
- const $$Astro$2 = createAstro("https://ecom2-demo.web.app");
1585
- const $$Home = createComponent(async ($$result, $$props, $$slots) => {
1586
- const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
1587
- Astro2.self = $$Home;
1588
- const { routeContext } = Astro2.locals;
1589
- const { heroSlider } = await usePageHero({ routeContext });
1590
- const heroSlides = heroSlider.slides;
1591
- return renderTemplate`${maybeRenderHead()}<main>
1592
- ${heroSlider.slides.length && renderTemplate`${renderComponent($$result, "HeroSlider", HeroSlider, { ...heroSlider, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/HeroSlider.vue", "client:component-export": "default" }, { "picture-0": ($$result2) => renderTemplate`${heroSlides[0] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-0", ...heroSlides[0], "index": 0 })}`}`, "picture-1": ($$result2) => renderTemplate`${heroSlides[1] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-1", ...heroSlides[1], "index": 1 })}`}`, "picture-2": ($$result2) => renderTemplate`${heroSlides[2] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-2", ...heroSlides[2], "index": 2 })}`}`, "picture-3": ($$result2) => renderTemplate`${heroSlides[3] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-3", ...heroSlides[3], "index": 3 })}`}`, "picture-4": ($$result2) => renderTemplate`${heroSlides[4] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-4", ...heroSlides[4], "index": 4 })}`}`, "picture-5": ($$result2) => renderTemplate`${heroSlides[5] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-5", ...heroSlides[5], "index": 5 })}`}`, "picture-6": ($$result2) => renderTemplate`${heroSlides[6] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-6", ...heroSlides[6], "index": 6 })}`}`, "picture-7": ($$result2) => renderTemplate`${heroSlides[7] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-7", ...heroSlides[7], "index": 7 })}`}`, "picture-8": ($$result2) => renderTemplate`${heroSlides[8] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-8", ...heroSlides[8], "index": 8 })}`}`, "picture-9": ($$result2) => renderTemplate`${heroSlides[9] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-9", ...heroSlides[9], "index": 9 })}`}` })}`}
1593
- ${renderComponent($$result, "Sections", $$Sections, {})}
1594
- </main>`;
1595
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro", void 0);
1596
-
1597
- const $$Astro$1 = createAstro("https://ecom2-demo.web.app");
1598
- const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
1599
- const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
1600
- Astro2.self = $$Index$1;
1601
- let routeContext;
1602
- let loadError;
1603
- try {
1604
- routeContext = await loadRouteContext(Astro2);
1605
- } catch (err) {
1606
- if (err.astroResponse) {
1607
- return err.astroResponse;
1608
- }
1609
- loadError = err;
1610
- }
1611
- return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
1612
- ${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`
1613
-
1614
- ${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
1615
- ${renderComponent($$result2, "HomeMain", $$Home, {})}
1616
- ${renderComponent($$result2, "PageFooter", $$PageFooter, {})}
1617
- ` })}`}
1618
- ${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
1619
- </html>`;
1620
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", void 0);
1621
-
1622
- const $$file$1 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro";
1623
- const $$url$1 = "";
1624
-
1625
- const index$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1626
- __proto__: null,
1627
- default: $$Index$1,
1628
- file: $$file$1,
1629
- url: $$url$1
1630
- }, Symbol.toStringTag, { value: 'Module' }));
1631
-
1632
- const $$Astro = createAstro("https://ecom2-demo.web.app");
1633
- const $$Index = createComponent(async ($$result, $$props, $$slots) => {
1634
- const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
1635
- Astro2.self = $$Index;
1636
- return renderTemplate``;
1637
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro", void 0);
1638
-
1639
- const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro";
1640
- const $$url = "/app";
1641
-
1642
- const index = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1643
- __proto__: null,
1644
- default: $$Index,
1645
- file: $$file,
1646
- url: $$url
1647
- }, Symbol.toStringTag, { value: 'Module' }));
1648
-
1649
- export { Prices as P, index as a, index$1 as i };