cloudcommerce 0.38.0 → 0.40.0

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 (211) hide show
  1. package/CHANGELOG.md +83 -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/layouts/PageHeader.astro +3 -6
  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/package.json +6 -6
  8. package/packages/api/lib/api.d.ts +2 -2
  9. package/packages/api/package.json +1 -1
  10. package/packages/api/types/applications.d.ts +15 -0
  11. package/packages/api/types/authentications.d.ts +14 -0
  12. package/packages/api/types/brands.d.ts +17 -0
  13. package/packages/api/types/carts.d.ts +12 -0
  14. package/packages/api/types/categories.d.ts +17 -0
  15. package/packages/api/types/collections.d.ts +15 -0
  16. package/packages/api/types/customers.d.ts +12 -0
  17. package/packages/api/types/grids.d.ts +15 -0
  18. package/packages/api/types/orders.d.ts +15 -0
  19. package/packages/api/types/products.d.ts +17 -0
  20. package/packages/api/types/stores.d.ts +15 -0
  21. package/packages/api/types.d.ts +34 -8
  22. package/packages/apps/affilate-program/package.json +1 -1
  23. package/packages/apps/correios/package.json +2 -2
  24. package/packages/apps/custom-payment/package.json +1 -1
  25. package/packages/apps/custom-shipping/package.json +1 -1
  26. package/packages/apps/datafrete/package.json +2 -2
  27. package/packages/apps/discounts/package.json +2 -2
  28. package/packages/apps/emails/package.json +1 -1
  29. package/packages/apps/fb-conversions/package.json +1 -1
  30. package/packages/apps/flash-courier/package.json +1 -1
  31. package/packages/apps/frenet/package.json +1 -1
  32. package/packages/apps/galaxpay/package.json +1 -1
  33. package/packages/apps/google-analytics/package.json +1 -1
  34. package/packages/apps/jadlog/package.json +1 -1
  35. package/packages/apps/loyalty-points/package.json +2 -2
  36. package/packages/apps/mandae/package.json +2 -2
  37. package/packages/apps/melhor-envio/package.json +1 -1
  38. package/packages/apps/mercadopago/package.json +1 -1
  39. package/packages/apps/pagarme/package.json +1 -1
  40. package/packages/apps/pagarme-v5/package.json +2 -2
  41. package/packages/apps/paghiper/package.json +1 -1
  42. package/packages/apps/pix/package.json +1 -1
  43. package/packages/apps/tiny-erp/package.json +2 -2
  44. package/packages/apps/webhooks/package.json +1 -1
  45. package/packages/cli/config/firebase.json +1 -1
  46. package/packages/cli/package.json +1 -1
  47. package/packages/config/package.json +1 -1
  48. package/packages/emails/package.json +1 -1
  49. package/packages/eslint/package.json +5 -5
  50. package/packages/eslint/storefront.eslintrc.cjs +1 -0
  51. package/packages/events/package.json +1 -1
  52. package/packages/feeds/package.json +1 -1
  53. package/packages/firebase/package.json +2 -2
  54. package/packages/i18n/lib/en_us/i19anyPrice.txt +1 -0
  55. package/packages/i18n/lib/en_us/i19filterOut.txt +1 -0
  56. package/packages/i18n/lib/en_us/i19loadMoreProducts.txt +1 -0
  57. package/packages/i18n/lib/en_us/i19noProductsFound.txt +1 -0
  58. package/packages/i18n/lib/en_us/i19noProductsFoundFor$1.txt +1 -0
  59. package/packages/i18n/lib/en_us/i19noProductsInBrandMsg.txt +1 -0
  60. package/packages/i18n/lib/en_us/i19noProductsInCategoryMsg.txt +1 -0
  61. package/packages/i18n/lib/en_us.d.ts +8 -3
  62. package/packages/i18n/lib/en_us.js +8 -3
  63. package/packages/i18n/lib/en_us.js.map +1 -1
  64. package/packages/i18n/lib/pt_br/i19anyPrice.txt +1 -0
  65. package/packages/i18n/lib/pt_br/i19filterOut.txt +1 -0
  66. package/packages/i18n/lib/pt_br/i19loadMoreProducts.txt +1 -0
  67. package/packages/i18n/lib/pt_br/i19noItemSelected.txt +1 -1
  68. package/packages/i18n/lib/pt_br/i19noProductsFoundFor$1.txt +1 -0
  69. package/packages/i18n/lib/pt_br/i19noProductsInBrandMsg.txt +1 -0
  70. package/packages/i18n/lib/pt_br/i19noProductsInCategoryMsg.txt +1 -0
  71. package/packages/i18n/lib/pt_br.d.ts +9 -4
  72. package/packages/i18n/lib/pt_br.js +9 -4
  73. package/packages/i18n/lib/pt_br.js.map +1 -1
  74. package/packages/i18n/package.json +1 -1
  75. package/packages/i18n/src/en_us.ts +8 -3
  76. package/packages/i18n/src/pt_br.ts +9 -4
  77. package/packages/modules/package.json +2 -2
  78. package/packages/passport/package.json +1 -1
  79. package/packages/ssr/events.js +0 -0
  80. package/packages/ssr/package.json +6 -6
  81. package/packages/storefront/dist/client/_astro/AccountPage.Osc6ffV0.js +1 -0
  82. package/packages/storefront/dist/client/_astro/{CartSidebar.1kUFk9Xn.js → CartSidebar.LrfpXG2B.js} +1 -1
  83. package/packages/storefront/dist/client/_astro/HeroSlider.Zf6kCaqD.js +1 -0
  84. package/packages/storefront/dist/client/_astro/PitchBar.N4d9fV8H.js +1 -0
  85. package/packages/storefront/dist/client/_astro/{Prices.PuQc6C7F.js → Prices.eQ9Vd255.js} +1 -1
  86. package/packages/storefront/dist/client/_astro/ProductDetails.Ln_jf57U.js +7 -0
  87. package/packages/storefront/dist/client/_astro/ProductShelf.X389bv9S.js +1 -0
  88. package/packages/storefront/dist/client/_astro/ProductShelf.vj6lVDCr.js +1 -0
  89. package/packages/storefront/dist/client/_astro/{QuantitySelector.YNmWjN8y.js → QuantitySelector.qSJQlvTe.js} +1 -1
  90. package/packages/storefront/dist/client/_astro/SearchModal.BrVoDBvg.js +1 -0
  91. package/packages/storefront/dist/client/_astro/SearchShowcase.KAz3nwco.js +1 -0
  92. package/packages/storefront/dist/client/_astro/ShopHeader.mFKGzhIu.js +7 -0
  93. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper._suIQ7WC.js +1 -0
  94. package/packages/storefront/dist/client/_astro/_slug_.cfRx-rdA.css +1 -0
  95. package/packages/storefront/dist/client/_astro/client.PdegUP6S.js +1 -0
  96. package/packages/storefront/dist/client/_astro/{customer-session._VkzXnXT.js → customer-session.KkTHFOXl.js} +1 -1
  97. package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
  98. package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
  99. package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
  100. package/packages/storefront/dist/client/_astro/ecom-utils.Ld2zf-Ve.js +1 -0
  101. package/packages/storefront/dist/client/_astro/{format-money.FMQXgKHB.js → format-money.Axn0YFLJ.js} +1 -1
  102. package/packages/storefront/dist/client/_astro/grid-title.GntHOijE.js +1 -0
  103. package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
  104. package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
  105. package/packages/storefront/dist/client/_astro/{hoisted._FbzheVm.js → hoisted.3ec9NcvP.js} +1 -1
  106. package/packages/storefront/dist/client/_astro/{hoisted.B6fKrLPR.js → hoisted.UnTlypMd.js} +1 -1
  107. package/packages/storefront/dist/client/_astro/{i18n.m7SpISxy.js → i18n.3-NUtxYq.js} +1 -1
  108. package/packages/storefront/dist/client/_astro/{img.zh-Drf-O.js → img.pozlYdd3.js} +1 -1
  109. package/packages/storefront/dist/client/_astro/{index.XrHFaN2F.js → index.TkCbiY_p.js} +1 -1
  110. package/packages/storefront/dist/client/_astro/{index.5PN-EYMS.js → index.m6fK0JXC.js} +1 -1
  111. package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
  112. package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
  113. package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
  114. package/packages/storefront/dist/client/_astro/{modules-info.sD0tdb2b.js → modules-info.mmwB1qIJ.js} +1 -1
  115. package/packages/storefront/dist/client/_astro/name.49dZlpDx.js +1 -0
  116. package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
  117. package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
  118. package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
  119. package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
  120. package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
  121. package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
  122. package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
  123. package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
  124. package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
  125. package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
  126. package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
  127. package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
  128. package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
  129. package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
  130. package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
  131. package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
  132. package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
  133. package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
  134. package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
  135. package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
  136. package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
  137. package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
  138. package/packages/storefront/dist/client/_astro/sf-utils.yjuG8NjM.js +1 -0
  139. package/packages/storefront/dist/client/_astro/{shopping-cart.A-1jhlKi.js → shopping-cart.Ean2uW2R.js} +1 -1
  140. package/packages/storefront/dist/client/_astro/use-analytics.Y7amTmnr.js +1 -0
  141. package/packages/storefront/dist/client/_astro/{use-product-card.erbOV6Fv.js → use-product-card.zB4z32bC.js} +1 -1
  142. package/packages/storefront/dist/client/_astro/use-text-value.f9pDzruv.js +4 -0
  143. package/packages/storefront/dist/client/app/account/index.html +56 -0
  144. package/packages/storefront/dist/client/app/index.html +96 -0
  145. package/packages/storefront/dist/client/headset-gamer-corsair-hs40-raptor-ca-9011122-naap-vinho/index.html +107 -0
  146. package/packages/storefront/dist/client/index.html +120 -0
  147. package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +107 -0
  148. package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +107 -0
  149. package/packages/storefront/dist/client/teclado-gamer-fortrek-mecanico-k5-rgb-outemu-blue-preto/index.html +107 -0
  150. package/packages/storefront/dist/client/~fallback/index.html +74 -0
  151. package/packages/storefront/dist/server/chunks/{CartSidebar_hAgJQJgm.mjs → CartSidebar_gCUGFy65.mjs} +1 -1
  152. package/packages/storefront/dist/server/chunks/{SearchModal_eWb5SdQM.mjs → SearchModal_2uYZ9tHy.mjs} +4 -5
  153. package/packages/storefront/dist/server/chunks/{_.._S7DDBn_b.mjs → _.._FnNLvTNv.mjs} +1 -1
  154. package/packages/storefront/dist/server/chunks/{account_3ySmGzMc.mjs → account_iZ2QmK5E.mjs} +1 -1
  155. package/packages/storefront/dist/server/chunks/astro/{assets-service_QlOZG8ov.mjs → assets-service_TpUb271h.mjs} +58 -136
  156. package/packages/storefront/dist/server/chunks/{astro_zcC1GStV.mjs → astro_PpArQAsY.mjs} +4 -4
  157. package/packages/storefront/dist/server/chunks/{index_nIwq11oA.mjs → index_1q5IpD39.mjs} +1 -1
  158. package/packages/storefront/dist/server/chunks/{index_uAR5ZV4d.mjs → index_JEU6B2DI.mjs} +1 -1
  159. package/packages/storefront/dist/server/chunks/{node_2VvC7trl.mjs → node_wOa5hJmt.mjs} +1 -1
  160. package/packages/storefront/dist/server/chunks/pages/{__MSibDuuV.mjs → __cEcxuEWe.mjs} +1674 -422
  161. package/packages/storefront/dist/server/chunks/pages/{account_iG-YqJ5q.mjs → account_WliDuQOB.mjs} +2 -2
  162. package/packages/storefront/dist/server/chunks/pages/{index_BtDyKPh_.mjs → index_2bQLkQf-.mjs} +3 -3
  163. package/packages/storefront/dist/server/chunks/pages/{node_bKqL47eZ.mjs → node_ZaY4t9qW.mjs} +21 -2
  164. package/packages/storefront/dist/server/chunks/pages/{~fallback_73R5VA6j.mjs → ~fallback_TL5hPXF_.mjs} +2 -2
  165. package/packages/storefront/dist/server/chunks/{~fallback_7q1dqY4e.mjs → ~fallback_wxuqpDXG.mjs} +1 -1
  166. package/packages/storefront/dist/server/entry.mjs +34 -16
  167. package/packages/storefront/dist/server/{manifest_dSwvaOdW.mjs → manifest_YgAgEwvF.mjs} +17 -16
  168. package/packages/storefront/dist/server/renderers.mjs +14 -3
  169. package/packages/storefront/package.json +12 -12
  170. package/packages/storefront/src/helpers/sf-utils.ts +11 -0
  171. package/packages/storefront/src/lib/$storefront.d.ts +7 -1
  172. package/packages/storefront/src/lib/components/Drawer.vue +13 -8
  173. package/packages/storefront/src/lib/components/SharedData.astro +2 -2
  174. package/packages/storefront/src/lib/components/globals/ALink.vue +1 -1
  175. package/packages/storefront/src/lib/composables/use-breadcrumbs.ts +1 -1
  176. package/packages/storefront/src/lib/composables/use-pagination.ts +61 -0
  177. package/packages/storefront/src/lib/composables/use-product-shelf.ts +29 -19
  178. package/packages/storefront/src/lib/composables/use-search-filters.ts +271 -0
  179. package/packages/storefront/src/lib/composables/use-search-modal.ts +2 -11
  180. package/packages/storefront/src/lib/composables/use-search-showcase.ts +201 -0
  181. package/packages/storefront/src/lib/composables/use-shared-data.ts +10 -5
  182. package/packages/storefront/src/lib/composables/use-sku-selector.ts +3 -8
  183. package/packages/storefront/src/lib/layouts/use-page-header.ts +6 -3
  184. package/packages/storefront/src/lib/layouts/use-page-main.ts +50 -9
  185. package/packages/storefront/src/lib/state/search-engine.ts +22 -8
  186. package/packages/storefront/tsconfig.json +1 -1
  187. package/packages/test-base/package.json +1 -1
  188. package/packages/types/package.json +1 -1
  189. package/packages/i18n/lib/en_us/i19noProduct.txt +0 -1
  190. package/packages/i18n/lib/en_us/i19noResultsFor.txt +0 -1
  191. package/packages/i18n/lib/pt_br/i19noResultsFor.txt +0 -1
  192. package/packages/storefront/dist/client/_astro/AccountPage.j0C5JBLY.js +0 -1
  193. package/packages/storefront/dist/client/_astro/HeroSlider.tR1dVXyu.js +0 -1
  194. package/packages/storefront/dist/client/_astro/PitchBar.FelC04wE.js +0 -1
  195. package/packages/storefront/dist/client/_astro/ProductCard.ephJafAE.js +0 -1
  196. package/packages/storefront/dist/client/_astro/ProductDetails.B6Ih5MGf.js +0 -7
  197. package/packages/storefront/dist/client/_astro/ProductShelf.GESxuPZ_.js +0 -1
  198. package/packages/storefront/dist/client/_astro/SearchContainer.BzixfU3R.js +0 -1
  199. package/packages/storefront/dist/client/_astro/SearchModal.F7vbwxIv.js +0 -1
  200. package/packages/storefront/dist/client/_astro/ShopHeader.5vR1LgSW.js +0 -10
  201. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.sk5AFsEV.js +0 -1
  202. package/packages/storefront/dist/client/_astro/_slug_.r8QHNfdw.css +0 -1
  203. package/packages/storefront/dist/client/_astro/client.RF8UxjZd.js +0 -1
  204. package/packages/storefront/dist/client/_astro/ecom-utils.gJYgRPRz.js +0 -1
  205. package/packages/storefront/dist/client/_astro/name.HU5l7TJo.js +0 -1
  206. package/packages/storefront/dist/client/_astro/sf-utils.5t7r9A2G.js +0 -1
  207. package/packages/storefront/dist/client/_astro/use-analytics.1EVxbrS7.js +0 -1
  208. package/packages/storefront/src/lib/composables/use-search-container.ts +0 -48
  209. /package/packages/i18n/lib/en_us/{i19relatedProduct.txt → i19relatedProducts.txt} +0 -0
  210. /package/packages/i18n/lib/pt_br/{i19noProduct.txt → i19noProductsFound.txt} +0 -0
  211. /package/packages/i18n/lib/pt_br/{i19relatedProduct.txt → i19relatedProducts.txt} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { isRemotePath, joinPaths } from '@astrojs/internal-helpers/path';
2
- import { A as AstroError$1, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as ExpectedImageOptions, c as InvalidImageService$1, d as MissingSharp } from '../astro_zcC1GStV.mjs';
2
+ import { A as AstroError$1, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as MissingSharp } from '../astro_PpArQAsY.mjs';
3
3
 
4
4
  const InvalidImageService = {
5
5
  name: "InvalidImageService",
@@ -119,7 +119,6 @@ function matchPathname$1(url, pathname, allowWildcard) {
119
119
  }
120
120
  return false;
121
121
  }
122
-
123
122
  function isRemoteAllowed$1(src, {
124
123
  domains = [],
125
124
  remotePatterns = []
@@ -129,20 +128,6 @@ function isRemoteAllowed$1(src, {
129
128
  const url = new URL(src);
130
129
  return domains.some((domain) => matchHostname$1(url, domain)) || remotePatterns.some((remotePattern) => matchPattern$1(url, remotePattern));
131
130
  }
132
- async function getConfiguredImageService$1() {
133
- if (!globalThis?.astroAsset?.imageService) {
134
- const { default: service } = await Promise.resolve().then(() => sharp$1).catch((e) => {
135
- const error = new AstroError(InvalidImageService);
136
- error.cause = e;
137
- throw error;
138
- });
139
- if (!globalThis.astroAsset)
140
- globalThis.astroAsset = {};
141
- globalThis.astroAsset.imageService = service;
142
- return service;
143
- }
144
- return globalThis.astroAsset.imageService;
145
- }
146
131
 
147
132
  const VALID_SUPPORTED_FORMATS = [
148
133
  "jpeg",
@@ -157,6 +142,62 @@ const VALID_SUPPORTED_FORMATS = [
157
142
  const DEFAULT_OUTPUT_FORMAT = "webp";
158
143
  const DEFAULT_HASH_PROPS = ["src", "width", "height", "format", "quality"];
159
144
 
145
+ function isESMImportedImage(src) {
146
+ return typeof src === "object";
147
+ }
148
+ function isRemoteImage(src) {
149
+ return typeof src === "string";
150
+ }
151
+
152
+ function matchPattern(url, remotePattern) {
153
+ return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
154
+ }
155
+ function matchPort(url, port) {
156
+ return !port || port === url.port;
157
+ }
158
+ function matchProtocol(url, protocol) {
159
+ return !protocol || protocol === url.protocol.slice(0, -1);
160
+ }
161
+ function matchHostname(url, hostname, allowWildcard) {
162
+ if (!hostname) {
163
+ return true;
164
+ } else if (!allowWildcard || !hostname.startsWith("*")) {
165
+ return hostname === url.hostname;
166
+ } else if (hostname.startsWith("**.")) {
167
+ const slicedHostname = hostname.slice(2);
168
+ return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
169
+ } else if (hostname.startsWith("*.")) {
170
+ const slicedHostname = hostname.slice(1);
171
+ const additionalSubdomains = url.hostname.replace(slicedHostname, "").split(".").filter(Boolean);
172
+ return additionalSubdomains.length === 1;
173
+ }
174
+ return false;
175
+ }
176
+ function matchPathname(url, pathname, allowWildcard) {
177
+ if (!pathname) {
178
+ return true;
179
+ } else if (!allowWildcard || !pathname.endsWith("*")) {
180
+ return pathname === url.pathname;
181
+ } else if (pathname.endsWith("/**")) {
182
+ const slicedPathname = pathname.slice(0, -2);
183
+ return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
184
+ } else if (pathname.endsWith("/*")) {
185
+ const slicedPathname = pathname.slice(0, -1);
186
+ const additionalPathChunks = url.pathname.replace(slicedPathname, "").split("/").filter(Boolean);
187
+ return additionalPathChunks.length === 1;
188
+ }
189
+ return false;
190
+ }
191
+ function isRemoteAllowed(src, {
192
+ domains = [],
193
+ remotePatterns = []
194
+ }) {
195
+ if (!isRemotePath(src))
196
+ return false;
197
+ const url = new URL(src);
198
+ return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
199
+ }
200
+
160
201
  function isLocalService(service) {
161
202
  if (!service) {
162
203
  return false;
@@ -361,125 +402,6 @@ function getTargetDimensions(options) {
361
402
  };
362
403
  }
363
404
 
364
- function matchPattern(url, remotePattern) {
365
- return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
366
- }
367
- function matchPort(url, port) {
368
- return !port || port === url.port;
369
- }
370
- function matchProtocol(url, protocol) {
371
- return !protocol || protocol === url.protocol.slice(0, -1);
372
- }
373
- function matchHostname(url, hostname, allowWildcard) {
374
- if (!hostname) {
375
- return true;
376
- } else if (!allowWildcard || !hostname.startsWith("*")) {
377
- return hostname === url.hostname;
378
- } else if (hostname.startsWith("**.")) {
379
- const slicedHostname = hostname.slice(2);
380
- return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
381
- } else if (hostname.startsWith("*.")) {
382
- const slicedHostname = hostname.slice(1);
383
- const additionalSubdomains = url.hostname.replace(slicedHostname, "").split(".").filter(Boolean);
384
- return additionalSubdomains.length === 1;
385
- }
386
- return false;
387
- }
388
- function matchPathname(url, pathname, allowWildcard) {
389
- if (!pathname) {
390
- return true;
391
- } else if (!allowWildcard || !pathname.endsWith("*")) {
392
- return pathname === url.pathname;
393
- } else if (pathname.endsWith("/**")) {
394
- const slicedPathname = pathname.slice(0, -2);
395
- return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
396
- } else if (pathname.endsWith("/*")) {
397
- const slicedPathname = pathname.slice(0, -1);
398
- const additionalPathChunks = url.pathname.replace(slicedPathname, "").split("/").filter(Boolean);
399
- return additionalPathChunks.length === 1;
400
- }
401
- return false;
402
- }
403
-
404
- function isESMImportedImage(src) {
405
- return typeof src === "object";
406
- }
407
- function isRemoteImage(src) {
408
- return typeof src === "string";
409
- }
410
- function isRemoteAllowed(src, {
411
- domains = [],
412
- remotePatterns = []
413
- }) {
414
- if (!isRemotePath(src))
415
- return false;
416
- const url = new URL(src);
417
- return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
418
- }
419
- async function getConfiguredImageService() {
420
- if (!globalThis?.astroAsset?.imageService) {
421
- const { default: service } = await Promise.resolve().then(() => sharp$1).catch((e) => {
422
- const error = new AstroError$1(InvalidImageService$1);
423
- error.cause = e;
424
- throw error;
425
- });
426
- if (!globalThis.astroAsset)
427
- globalThis.astroAsset = {};
428
- globalThis.astroAsset.imageService = service;
429
- return service;
430
- }
431
- return globalThis.astroAsset.imageService;
432
- }
433
- async function getImage(options, imageConfig) {
434
- if (!options || typeof options !== "object") {
435
- throw new AstroError$1({
436
- ...ExpectedImageOptions,
437
- message: ExpectedImageOptions.message(JSON.stringify(options))
438
- });
439
- }
440
- const service = await getConfiguredImageService();
441
- const resolvedOptions = {
442
- ...options,
443
- src: typeof options.src === "object" && "then" in options.src ? (await options.src).default ?? await options.src : options.src
444
- };
445
- const clonedSrc = isESMImportedImage(resolvedOptions.src) ? (
446
- // @ts-expect-error - clone is a private, hidden prop
447
- resolvedOptions.src.clone ?? resolvedOptions.src
448
- ) : resolvedOptions.src;
449
- resolvedOptions.src = clonedSrc;
450
- const validatedOptions = service.validateOptions ? await service.validateOptions(resolvedOptions, imageConfig) : resolvedOptions;
451
- const srcSetTransforms = service.getSrcSet ? await service.getSrcSet(validatedOptions, imageConfig) : [];
452
- let imageURL = await service.getURL(validatedOptions, imageConfig);
453
- let srcSets = await Promise.all(
454
- srcSetTransforms.map(async (srcSet) => ({
455
- transform: srcSet.transform,
456
- url: await service.getURL(srcSet.transform, imageConfig),
457
- descriptor: srcSet.descriptor,
458
- attributes: srcSet.attributes
459
- }))
460
- );
461
- if (isLocalService(service) && globalThis.astroAsset.addStaticImage && !(isRemoteImage(validatedOptions.src) && imageURL === validatedOptions.src)) {
462
- const propsToHash = service.propertiesToHash ?? DEFAULT_HASH_PROPS;
463
- imageURL = globalThis.astroAsset.addStaticImage(validatedOptions, propsToHash);
464
- srcSets = srcSetTransforms.map((srcSet) => ({
465
- transform: srcSet.transform,
466
- url: globalThis.astroAsset.addStaticImage(srcSet.transform, propsToHash),
467
- descriptor: srcSet.descriptor,
468
- attributes: srcSet.attributes
469
- }));
470
- }
471
- return {
472
- rawOptions: resolvedOptions,
473
- options: validatedOptions,
474
- src: imageURL,
475
- srcSet: {
476
- values: srcSets,
477
- attribute: srcSets.map((srcSet) => `${srcSet.url} ${srcSet.descriptor}`).join(", ")
478
- },
479
- attributes: service.getHTMLAttributes !== void 0 ? await service.getHTMLAttributes(validatedOptions, imageConfig) : {}
480
- };
481
- }
482
-
483
405
  let sharp;
484
406
  const qualityTable = {
485
407
  low: 25,
@@ -541,4 +463,4 @@ const sharp$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
541
463
  default: sharp_default
542
464
  }, Symbol.toStringTag, { value: 'Module' }));
543
465
 
544
- export { getConfiguredImageService$1 as a, isRemoteAllowed$1 as b, getImage as g, isESMImportedImage as i };
466
+ export { AstroError as A, DEFAULT_HASH_PROPS as D, InvalidImageService as I, isLocalService as a, isRemoteImage as b, isRemoteAllowed$1 as c, isESMImportedImage as i, sharp$1 as s };
@@ -171,8 +171,8 @@ const ResponseSentError = {
171
171
  };
172
172
  const MiddlewareNoDataOrNextCalled = {
173
173
  name: "MiddlewareNoDataOrNextCalled",
174
- title: "The middleware didn't return a response or call `next`.",
175
- message: "The middleware needs to either return a `Response` object or call the `next` function."
174
+ title: "The middleware didn't return a `Response`.",
175
+ message: "Make sure your middleware returns a `Response` object, either directly or by returning the `Response` from calling the `next` function."
176
176
  };
177
177
  const MiddlewareNotAResponse = {
178
178
  name: "MiddlewareNotAResponse",
@@ -324,7 +324,7 @@ function createComponent(arg1, moduleId, propagation) {
324
324
  }
325
325
  }
326
326
 
327
- const ASTRO_VERSION = "4.0.4";
327
+ const ASTRO_VERSION = "4.0.7";
328
328
 
329
329
  function createAstroGlobFn() {
330
330
  const globHandler = (importMetaGlobResult) => {
@@ -2039,4 +2039,4 @@ function spreadAttributes(values = {}, _name, { class: scopedClassName } = {}) {
2039
2039
  return markHTMLString(output);
2040
2040
  }
2041
2041
 
2042
- export { AstroError as A, renderEndpoint as B, ClientAddressNotAvailable as C, ReservedSlotName as D, ExpectedImage as E, Fragment as F, GetStaticPathsRequired as G, renderJSX as H, IncompatibleDescriptorOptions as I, chunkToString as J, CantRenderPage as K, LocalImageUsedWrongly as L, MissingImageDimension as M, NoMatchingStaticPathFound as N, renderPage as O, PageNumberParamNotFound as P, ResponseSentError as R, StaticClientAddressNotAvailable as S, UnsupportedImageFormat as U, UnsupportedImageConversion as a, ExpectedImageOptions as b, InvalidImageService as c, MissingSharp as d, createAstro as e, createComponent as f, ImageMissingAlt as g, addAttribute as h, renderComponent as i, createTransitionScope as j, renderSlotToString as k, renderAllHeadContent as l, maybeRenderHead as m, renderSlot as n, MiddlewareNoDataOrNextCalled as o, MiddlewareNotAResponse as p, InvalidGetStaticPathsReturn as q, renderTemplate as r, spreadAttributes as s, InvalidGetStaticPathsEntry as t, unescapeHTML as u, GetStaticPathsExpectedParams as v, GetStaticPathsInvalidRouteParam as w, PrerenderDynamicEndpointPathCollide as x, LocalsNotAnObject as y, ASTRO_VERSION as z };
2042
+ export { AstroError as A, renderEndpoint as B, ClientAddressNotAvailable as C, ReservedSlotName as D, ExpectedImage as E, Fragment as F, GetStaticPathsRequired as G, renderJSX as H, IncompatibleDescriptorOptions as I, chunkToString as J, CantRenderPage as K, LocalImageUsedWrongly as L, MissingImageDimension as M, NoMatchingStaticPathFound as N, renderPage as O, PageNumberParamNotFound as P, ResponseSentError as R, StaticClientAddressNotAvailable as S, UnsupportedImageFormat as U, UnsupportedImageConversion as a, MissingSharp as b, ExpectedImageOptions as c, InvalidImageService as d, createAstro as e, createComponent as f, ImageMissingAlt as g, addAttribute as h, renderComponent as i, createTransitionScope as j, renderSlotToString as k, renderAllHeadContent as l, maybeRenderHead as m, renderSlot as n, MiddlewareNoDataOrNextCalled as o, MiddlewareNotAResponse as p, InvalidGetStaticPathsReturn as q, renderTemplate as r, spreadAttributes as s, InvalidGetStaticPathsEntry as t, unescapeHTML as u, GetStaticPathsExpectedParams as v, GetStaticPathsInvalidRouteParam as w, PrerenderDynamicEndpointPathCollide as x, LocalsNotAnObject as y, ASTRO_VERSION as z };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/index_BtDyKPh_.mjs').then(n => n.i);
4
+ const page = () => import('./pages/index_2bQLkQf-.mjs').then(n => n.i);
5
5
 
6
6
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/index_BtDyKPh_.mjs').then(n => n.a);
4
+ const page = () => import('./pages/index_2bQLkQf-.mjs').then(n => n.a);
5
5
 
6
6
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/node_bKqL47eZ.mjs');
4
+ const page = () => import('./pages/node_ZaY4t9qW.mjs');
5
5
 
6
6
  export { page };