@gem-sdk/components 23.1.3 → 24.0.0-dev.9

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 (501) hide show
  1. package/dist/cjs/article/components/ArticleImage.js +1 -1
  2. package/dist/cjs/article/components/ArticleImage.liquid.js +6 -6
  3. package/dist/cjs/article/components/ArticleList.js +1 -1
  4. package/dist/cjs/article/index.js +1 -1
  5. package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
  6. package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
  7. package/dist/cjs/builder.js +1 -1
  8. package/dist/cjs/button/common/helpers.js +2 -2
  9. package/dist/cjs/cart/components/CartList.js +1 -1
  10. package/dist/cjs/cart/index.js +1 -1
  11. package/dist/cjs/collection/index.js +1 -1
  12. package/dist/cjs/common/components/Loading.js +1 -1
  13. package/dist/cjs/common/const.js +1 -1
  14. package/dist/cjs/common/helpers.js +1 -0
  15. package/dist/cjs/common/hooks/useElementWidth.js +1 -0
  16. package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
  17. package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
  18. package/dist/cjs/grid/components/section/Section.js +1 -1
  19. package/dist/cjs/grid/index.js +1 -1
  20. package/dist/cjs/header/components/kind/basic/index.js +1 -1
  21. package/dist/cjs/header/components/kind/modern/index.js +1 -1
  22. package/dist/cjs/header/index.js +1 -1
  23. package/dist/cjs/hero-banner/common/styles.js +1 -1
  24. package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
  25. package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
  26. package/dist/cjs/hero-banner/index.js +1 -1
  27. package/dist/cjs/image/common/adaptiveSources.js +1 -0
  28. package/dist/cjs/image/common/attrs.js +1 -1
  29. package/dist/cjs/image/common/classes.js +1 -1
  30. package/dist/cjs/image/common/helpers.js +2 -2
  31. package/dist/cjs/image/common/liquidSrcset.js +1 -0
  32. package/dist/cjs/image/common/listContext.js +1 -0
  33. package/dist/cjs/image/common/listImageContext.js +1 -0
  34. package/dist/cjs/image/common/sizes.js +1 -0
  35. package/dist/cjs/image/common/srcset.js +1 -0
  36. package/dist/cjs/image/components/AdaptiveImage.js +1 -1
  37. package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
  38. package/dist/cjs/image/components/Image.js +1 -1
  39. package/dist/cjs/image/components/Image.liquid.js +10 -10
  40. package/dist/cjs/image/components/NextImage.js +1 -1
  41. package/dist/cjs/image/components/NextImage.liquid.js +4 -5
  42. package/dist/cjs/image/constants.js +1 -1
  43. package/dist/cjs/image/index.js +1 -1
  44. package/dist/cjs/image/settings/configs/settings.js +1 -1
  45. package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
  46. package/dist/cjs/image-comparison/common/attrs.js +1 -1
  47. package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
  48. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
  49. package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
  50. package/dist/cjs/image-comparison/index.js +1 -1
  51. package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
  52. package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
  53. package/dist/cjs/index.js +1 -1
  54. package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
  55. package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
  56. package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
  57. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  58. package/dist/cjs/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
  59. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
  60. package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
  61. package/dist/cjs/post-purchase/product/index.js +1 -1
  62. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  63. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
  64. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  65. package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
  66. package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.js +1 -1
  67. package/dist/cjs/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
  68. package/dist/cjs/product/components/product-bundle/common/classes.js +1 -1
  69. package/dist/cjs/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
  70. package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  71. package/dist/cjs/product/components/product-discount-tag/common/helpers.js +1 -0
  72. package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
  73. package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
  74. package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
  75. package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
  76. package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +41 -41
  77. package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
  78. package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
  79. package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
  80. package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
  81. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  82. package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
  83. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  84. package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
  85. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +40 -40
  86. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +40 -40
  87. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
  88. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
  89. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
  90. package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
  91. package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  92. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  93. package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +1 -1
  94. package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +9 -7
  95. package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
  96. package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +16 -14
  97. package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
  98. package/dist/cjs/product/components/product-list/common/imagePriority.js +17 -0
  99. package/dist/cjs/product/components/product-list/common/imagePriorityHints.js +1 -0
  100. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  101. package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
  102. package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
  103. package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
  104. package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +16 -14
  105. package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
  106. package/dist/cjs/product/components/product-wrap/Product.js +1 -1
  107. package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
  108. package/dist/cjs/product/helpers/product-bundle.js +1 -1
  109. package/dist/cjs/product/index.js +1 -1
  110. package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
  111. package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  112. package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
  113. package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  114. package/dist/cjs/stock-counter/common/attrs.js +1 -1
  115. package/dist/cjs/stock-counter/common/helpers.js +23 -23
  116. package/dist/cjs/stock-counter/hooks/useStockCounter.js +1 -1
  117. package/dist/cjs/third-party/common/helpers.js +4 -4
  118. package/dist/cjs/third-party/components/KlarnaMessaging.liquid.js +29 -4
  119. package/dist/cjs/third-party/settings/AftershipEmailMarketingsms/index.js +1 -1
  120. package/dist/cjs/third-party/settings/AirProductReviewsAppUgc/index.js +2 -2
  121. package/dist/cjs/third-party/settings/AliReviews/index.js +1 -1
  122. package/dist/cjs/third-party/settings/AlsoBoughtCbb/index.js +1 -1
  123. package/dist/cjs/third-party/settings/AovBundlesVolumeDiscounts/index.js +2 -2
  124. package/dist/cjs/third-party/settings/AovFreeGiftBuyXGetYBogo/index.js +2 -2
  125. package/dist/cjs/third-party/settings/AppointmentBookingCowlendar/index.js +2 -2
  126. package/dist/cjs/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
  127. package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +1 -1
  128. package/dist/cjs/third-party/settings/AppstleSubscriptions/index.js +1 -1
  129. package/dist/cjs/third-party/settings/BestBuyFulfillment/index.js +1 -1
  130. package/dist/cjs/third-party/settings/BfSizeChartSizeGuide/index.js +1 -1
  131. package/dist/cjs/third-party/settings/BirdChime/index.js +4 -4
  132. package/dist/cjs/third-party/settings/BloyRewardsProgramLoyalty/index.js +1 -1
  133. package/dist/cjs/third-party/settings/Bogos/index.js +1 -1
  134. package/dist/cjs/third-party/settings/BoldProductOptions/index.js +4 -4
  135. package/dist/cjs/third-party/settings/BoldSubscriptions/index.js +1 -1
  136. package/dist/cjs/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
  137. package/dist/cjs/third-party/settings/BonySubscriptionsApp/index.js +2 -2
  138. package/dist/cjs/third-party/settings/BoostAISearchDiscovery/index.js +1 -1
  139. package/dist/cjs/third-party/settings/Bundler/index.js +1 -1
  140. package/dist/cjs/third-party/settings/CleanSizeCharts/index.js +1 -1
  141. package/dist/cjs/third-party/settings/CrossSellCartUpsell/index.js +1 -1
  142. package/dist/cjs/third-party/settings/CustomProductOptionsVariant/index.js +2 -2
  143. package/dist/cjs/third-party/settings/DealeasyVolumeDiscounts/index.js +2 -2
  144. package/dist/cjs/third-party/settings/DiscountyBulkDiscountSales/index.js +2 -2
  145. package/dist/cjs/third-party/settings/EasifyProductOptions/index.js +1 -1
  146. package/dist/cjs/third-party/settings/EasyBundleBuilderSkailama/index.js +2 -2
  147. package/dist/cjs/third-party/settings/EasySellCOD/index.js +4 -4
  148. package/dist/cjs/third-party/settings/EcoboostifyShoppableReelUgc/index.js +2 -2
  149. package/dist/cjs/third-party/settings/EcomsendBackInStockAlert/index.js +1 -1
  150. package/dist/cjs/third-party/settings/EssentPreorderBackInStock/index.js +2 -2
  151. package/dist/cjs/third-party/settings/EssentialAnnouncementBar/index.js +1 -1
  152. package/dist/cjs/third-party/settings/EssentialCountdownTimerBar/index.js +2 -2
  153. package/dist/cjs/third-party/settings/EstimatedDeliveryDatePlus/index.js +2 -2
  154. package/dist/cjs/third-party/settings/FastBundleBundlesDiscounts/index.js +2 -2
  155. package/dist/cjs/third-party/settings/FeraReviews/index.js +1 -1
  156. package/dist/cjs/third-party/settings/FirePush/index.js +1 -1
  157. package/dist/cjs/third-party/settings/FlyBundlesUpsellsFbt/index.js +1 -1
  158. package/dist/cjs/third-party/settings/FordeerProductLabels/index.js +2 -2
  159. package/dist/cjs/third-party/settings/FrequentlyBoughtTogether/index.js +1 -1
  160. package/dist/cjs/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
  161. package/dist/cjs/third-party/settings/GloboProductOptionsVariant/index.js +1 -1
  162. package/dist/cjs/third-party/settings/GoogleReviewsByReputon/index.js +1 -1
  163. package/dist/cjs/third-party/settings/Growave/index.js +1 -1
  164. package/dist/cjs/third-party/settings/GrowthSuiteDiscountCodes/index.js +2 -2
  165. package/dist/cjs/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
  166. package/dist/cjs/third-party/settings/HextomFreeShippingBar/index.js +2 -2
  167. package/dist/cjs/third-party/settings/HulkFormBuilder/index.js +1 -1
  168. package/dist/cjs/third-party/settings/HulkProductOptions/index.js +1 -1
  169. package/dist/cjs/third-party/settings/InfiniteOptions/index.js +1 -1
  170. package/dist/cjs/third-party/settings/Instafeed/index.js +1 -1
  171. package/dist/cjs/third-party/settings/InstasellShoppableInstagram/index.js +1 -1
  172. package/dist/cjs/third-party/settings/JudgemeReviews/index.js +1 -1
  173. package/dist/cjs/third-party/settings/JunipProductReviewsUgc/index.js +1 -1
  174. package/dist/cjs/third-party/settings/KachingBundles/index.js +1 -1
  175. package/dist/cjs/third-party/settings/KachingSubscriptionsApp/index.js +1 -1
  176. package/dist/cjs/third-party/settings/KingProductOptions/index.js +1 -1
  177. package/dist/cjs/third-party/settings/KiteFreeGiftDiscount/index.js +2 -2
  178. package/dist/cjs/third-party/settings/KlarnaMessaging/index.js +2 -2
  179. package/dist/cjs/third-party/settings/Klaviyo/index.js +4 -4
  180. package/dist/cjs/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
  181. package/dist/cjs/third-party/settings/LaiProductReviews/index.js +1 -1
  182. package/dist/cjs/third-party/settings/LoloyalLoyaltyReferrals/index.js +1 -1
  183. package/dist/cjs/third-party/settings/LoopSubscriptions/index.js +1 -1
  184. package/dist/cjs/third-party/settings/LooxReviews/index.js +1 -1
  185. package/dist/cjs/third-party/settings/MaxbundleProductBundles/index.js +1 -1
  186. package/dist/cjs/third-party/settings/MbcBundleVolumeDiscount/index.js +1 -1
  187. package/dist/cjs/third-party/settings/MyappgurusProductReviews/index.js +1 -1
  188. package/dist/cjs/third-party/settings/NotifyBackInStockPreOrder/index.js +1 -1
  189. package/dist/cjs/third-party/settings/OkendoReviewsLoyalty/index.js +1 -1
  190. package/dist/cjs/third-party/settings/Omnisend/index.js +1 -1
  191. package/dist/cjs/third-party/settings/Opinew/index.js +1 -1
  192. package/dist/cjs/third-party/settings/ParcelPanel/index.js +1 -1
  193. package/dist/cjs/third-party/settings/PickyStory/index.js +4 -4
  194. package/dist/cjs/third-party/settings/PowerfulContactFormBuilder/index.js +1 -1
  195. package/dist/cjs/third-party/settings/PreorderNowPreOrderPq/index.js +2 -2
  196. package/dist/cjs/third-party/settings/PreorderNowWodPresale/index.js +1 -1
  197. package/dist/cjs/third-party/settings/ProductOptionsCustomizer/index.js +2 -2
  198. package/dist/cjs/third-party/settings/ProductOptionsVariantOption/index.js +2 -2
  199. package/dist/cjs/third-party/settings/PumperBundlesVolumeDiscount/index.js +2 -2
  200. package/dist/cjs/third-party/settings/PushOwl/index.js +1 -1
  201. package/dist/cjs/third-party/settings/QikifyUpsell/index.js +2 -2
  202. package/dist/cjs/third-party/settings/RapiBundleQuantityBreaks/index.js +2 -2
  203. package/dist/cjs/third-party/settings/RechargeSubscriptions/index.js +1 -1
  204. package/dist/cjs/third-party/settings/RecurpaySubscriptionApp/index.js +1 -1
  205. package/dist/cjs/third-party/settings/Releasit/index.js +1 -1
  206. package/dist/cjs/third-party/settings/RequestQuoteHidePrice/index.js +1 -1
  207. package/dist/cjs/third-party/settings/ReviewxpoProductReviewsApp/index.js +1 -1
  208. package/dist/cjs/third-party/settings/Rivyo/index.js +1 -1
  209. package/dist/cjs/third-party/settings/Ryviu/index.js +1 -1
  210. package/dist/cjs/third-party/settings/SealSubscriptions/index.js +2 -2
  211. package/dist/cjs/third-party/settings/SegunoEmailMarketing/index.js +1 -1
  212. package/dist/cjs/third-party/settings/Selleasy/index.js +1 -1
  213. package/dist/cjs/third-party/settings/SeoantTrustBadgesIcon/index.js +2 -2
  214. package/dist/cjs/third-party/settings/ShopifyForms/index.js +1 -1
  215. package/dist/cjs/third-party/settings/ShopifySubscriptions/index.js +2 -2
  216. package/dist/cjs/third-party/settings/SimpleBundlesKits/index.js +1 -1
  217. package/dist/cjs/third-party/settings/SkioSubscriptionsYcS20/index.js +1 -1
  218. package/dist/cjs/third-party/settings/SmartSearchBarAndFilters/index.js +4 -4
  219. package/dist/cjs/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
  220. package/dist/cjs/third-party/settings/Stamped.js +1 -1
  221. package/dist/cjs/third-party/settings/StellarDeliveryDatePickup/index.js +1 -1
  222. package/dist/cjs/third-party/settings/SubifySubscriptionsApp/index.js +2 -2
  223. package/dist/cjs/third-party/settings/TagembedSocialPostReview/index.js +2 -2
  224. package/dist/cjs/third-party/settings/TagshopShoppableVideosUgc/index.js +2 -2
  225. package/dist/cjs/third-party/settings/TeeinblueProductPersonalizer/index.js +2 -2
  226. package/dist/cjs/third-party/settings/TrustBadgesBear/index.js +2 -2
  227. package/dist/cjs/third-party/settings/TrustMe/index.js +4 -4
  228. package/dist/cjs/third-party/settings/TrustedsiteTrustBadges/index.js +1 -1
  229. package/dist/cjs/third-party/settings/Trustoo/index.js +1 -1
  230. package/dist/cjs/third-party/settings/TrustreviewsProductReviews/index.js +1 -1
  231. package/dist/cjs/third-party/settings/TrustshopProductReviews/index.js +1 -1
  232. package/dist/cjs/third-party/settings/UltimateSalesBoost/index.js +1 -1
  233. package/dist/cjs/third-party/settings/UnlimitedBundlesDiscounts/index.js +2 -2
  234. package/dist/cjs/third-party/settings/UppromoteAffiliateMarketing/setting.js +2 -2
  235. package/dist/cjs/third-party/settings/Vitals/index.js +1 -1
  236. package/dist/cjs/third-party/settings/WcWishlistBackInStock/index.js +1 -1
  237. package/dist/cjs/third-party/settings/WhatmoreShoppableVideosreel/index.js +1 -1
  238. package/dist/cjs/third-party/settings/WideBundle/index.js +4 -4
  239. package/dist/cjs/third-party/settings/Wiser/index.js +1 -1
  240. package/dist/cjs/third-party/settings/WishlistKing/index.js +2 -2
  241. package/dist/cjs/third-party/settings/WishlistPlus/index.js +2 -2
  242. package/dist/cjs/third-party/settings/YotpoReviews/index.js +1 -1
  243. package/dist/cjs/video/common/attrs.js +1 -1
  244. package/dist/cjs/video/components/HTML5Embed.js +1 -1
  245. package/dist/cjs/video/components/HTML5Embed.liquid.js +11 -11
  246. package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
  247. package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
  248. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
  249. package/dist/cjs/video/components/Video.liquid.js +1 -1
  250. package/dist/esm/article/components/ArticleImage.js +1 -1
  251. package/dist/esm/article/components/ArticleImage.liquid.js +7 -7
  252. package/dist/esm/article/components/ArticleList.js +1 -1
  253. package/dist/esm/article/index.js +1 -1
  254. package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
  255. package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
  256. package/dist/esm/builder.js +1 -1
  257. package/dist/esm/button/common/helpers.js +2 -2
  258. package/dist/esm/cart/components/CartList.js +1 -1
  259. package/dist/esm/cart/index.js +1 -1
  260. package/dist/esm/collection/index.js +1 -1
  261. package/dist/esm/common/components/Loading.js +1 -1
  262. package/dist/esm/common/const.js +1 -1
  263. package/dist/esm/common/helpers.js +1 -0
  264. package/dist/esm/common/hooks/useElementWidth.js +1 -0
  265. package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
  266. package/dist/esm/grid/components/row/Row.liquid.js +10 -10
  267. package/dist/esm/grid/components/section/Section.js +1 -1
  268. package/dist/esm/grid/index.js +1 -1
  269. package/dist/esm/header/components/kind/basic/index.js +1 -1
  270. package/dist/esm/header/components/kind/modern/index.js +1 -1
  271. package/dist/esm/header/index.js +1 -1
  272. package/dist/esm/hero-banner/common/styles.js +1 -1
  273. package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
  274. package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
  275. package/dist/esm/hero-banner/index.js +1 -1
  276. package/dist/esm/image/common/adaptiveSources.js +1 -0
  277. package/dist/esm/image/common/attrs.js +1 -1
  278. package/dist/esm/image/common/classes.js +1 -1
  279. package/dist/esm/image/common/helpers.js +2 -2
  280. package/dist/esm/image/common/liquidSrcset.js +1 -0
  281. package/dist/esm/image/common/listContext.js +1 -0
  282. package/dist/esm/image/common/listImageContext.js +1 -0
  283. package/dist/esm/image/common/sizes.js +1 -0
  284. package/dist/esm/image/common/srcset.js +1 -0
  285. package/dist/esm/image/components/AdaptiveImage.js +1 -1
  286. package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
  287. package/dist/esm/image/components/Image.js +1 -1
  288. package/dist/esm/image/components/Image.liquid.js +3 -3
  289. package/dist/esm/image/components/NextImage.js +1 -1
  290. package/dist/esm/image/components/NextImage.liquid.js +5 -6
  291. package/dist/esm/image/constants.js +1 -1
  292. package/dist/esm/image/index.js +1 -1
  293. package/dist/esm/image/settings/configs/settings.js +1 -1
  294. package/dist/esm/image/settings/configs/ui-v2.js +1 -1
  295. package/dist/esm/image-comparison/common/attrs.js +1 -1
  296. package/dist/esm/image-comparison/components/CompareImage.js +1 -1
  297. package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
  298. package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
  299. package/dist/esm/image-comparison/index.js +1 -1
  300. package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
  301. package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
  302. package/dist/esm/index.js +1 -1
  303. package/dist/esm/post-purchase/callout-banner/index.js +1 -1
  304. package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
  305. package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
  306. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  307. package/dist/esm/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
  308. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
  309. package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
  310. package/dist/esm/post-purchase/product/index.js +1 -1
  311. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  312. package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
  313. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  314. package/dist/esm/product/components/product-badge/common/styles.js +1 -1
  315. package/dist/esm/product/components/product-bundle/ProductBundleDiscount.js +1 -1
  316. package/dist/esm/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
  317. package/dist/esm/product/components/product-bundle/common/classes.js +1 -1
  318. package/dist/esm/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
  319. package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  320. package/dist/esm/product/components/product-discount-tag/common/helpers.js +1 -0
  321. package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
  322. package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
  323. package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
  324. package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
  325. package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +35 -35
  326. package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
  327. package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
  328. package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
  329. package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
  330. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  331. package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
  332. package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  333. package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
  334. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
  335. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
  336. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
  337. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
  338. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
  339. package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
  340. package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  341. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  342. package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +1 -1
  343. package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +11 -9
  344. package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
  345. package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +18 -16
  346. package/dist/esm/product/components/product-list/common/helpers.js +1 -1
  347. package/dist/esm/product/components/product-list/common/imagePriority.js +17 -0
  348. package/dist/esm/product/components/product-list/common/imagePriorityHints.js +1 -0
  349. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  350. package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
  351. package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +12 -10
  352. package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
  353. package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
  354. package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
  355. package/dist/esm/product/components/product-wrap/Product.js +1 -1
  356. package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
  357. package/dist/esm/product/helpers/product-bundle.js +1 -1
  358. package/dist/esm/product/index.js +1 -1
  359. package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
  360. package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  361. package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
  362. package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  363. package/dist/esm/stock-counter/common/attrs.js +1 -1
  364. package/dist/esm/stock-counter/common/helpers.js +21 -21
  365. package/dist/esm/stock-counter/components/StockCounter.liquid.js +1 -1
  366. package/dist/esm/stock-counter/hooks/useStockCounter.js +1 -1
  367. package/dist/esm/third-party/common/helpers.js +5 -5
  368. package/dist/esm/third-party/components/KlarnaMessaging.liquid.js +30 -5
  369. package/dist/esm/third-party/settings/AftershipEmailMarketingsms/index.js +2 -2
  370. package/dist/esm/third-party/settings/AirProductReviewsAppUgc/index.js +2 -2
  371. package/dist/esm/third-party/settings/AliReviews/index.js +2 -2
  372. package/dist/esm/third-party/settings/AlsoBoughtCbb/index.js +2 -2
  373. package/dist/esm/third-party/settings/AovBundlesVolumeDiscounts/index.js +2 -2
  374. package/dist/esm/third-party/settings/AovFreeGiftBuyXGetYBogo/index.js +2 -2
  375. package/dist/esm/third-party/settings/AppointmentBookingCowlendar/index.js +2 -2
  376. package/dist/esm/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
  377. package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +2 -2
  378. package/dist/esm/third-party/settings/AppstleSubscriptions/index.js +2 -2
  379. package/dist/esm/third-party/settings/BestBuyFulfillment/index.js +2 -2
  380. package/dist/esm/third-party/settings/BfSizeChartSizeGuide/index.js +2 -2
  381. package/dist/esm/third-party/settings/BirdChime/index.js +4 -4
  382. package/dist/esm/third-party/settings/BloyRewardsProgramLoyalty/index.js +2 -2
  383. package/dist/esm/third-party/settings/Bogos/index.js +4 -4
  384. package/dist/esm/third-party/settings/BoldProductOptions/index.js +4 -4
  385. package/dist/esm/third-party/settings/BoldSubscriptions/index.js +2 -2
  386. package/dist/esm/third-party/settings/BonLoyaltyRewardsReferrals/index.js +2 -2
  387. package/dist/esm/third-party/settings/BonySubscriptionsApp/index.js +2 -2
  388. package/dist/esm/third-party/settings/BoostAISearchDiscovery/index.js +2 -2
  389. package/dist/esm/third-party/settings/Bundler/index.js +4 -4
  390. package/dist/esm/third-party/settings/CleanSizeCharts/index.js +2 -2
  391. package/dist/esm/third-party/settings/CrossSellCartUpsell/index.js +2 -2
  392. package/dist/esm/third-party/settings/CustomProductOptionsVariant/index.js +2 -2
  393. package/dist/esm/third-party/settings/DealeasyVolumeDiscounts/index.js +2 -2
  394. package/dist/esm/third-party/settings/DiscountyBulkDiscountSales/index.js +2 -2
  395. package/dist/esm/third-party/settings/EasifyProductOptions/index.js +2 -2
  396. package/dist/esm/third-party/settings/EasyBundleBuilderSkailama/index.js +2 -2
  397. package/dist/esm/third-party/settings/EasySellCOD/index.js +4 -4
  398. package/dist/esm/third-party/settings/EcoboostifyShoppableReelUgc/index.js +2 -2
  399. package/dist/esm/third-party/settings/EcomsendBackInStockAlert/index.js +2 -2
  400. package/dist/esm/third-party/settings/EssentPreorderBackInStock/index.js +2 -2
  401. package/dist/esm/third-party/settings/EssentialAnnouncementBar/index.js +2 -2
  402. package/dist/esm/third-party/settings/EssentialCountdownTimerBar/index.js +2 -2
  403. package/dist/esm/third-party/settings/EstimatedDeliveryDatePlus/index.js +2 -2
  404. package/dist/esm/third-party/settings/FastBundleBundlesDiscounts/index.js +2 -2
  405. package/dist/esm/third-party/settings/FeraReviews/index.js +4 -4
  406. package/dist/esm/third-party/settings/FirePush/index.js +2 -2
  407. package/dist/esm/third-party/settings/FlyBundlesUpsellsFbt/index.js +2 -2
  408. package/dist/esm/third-party/settings/FordeerProductLabels/index.js +2 -2
  409. package/dist/esm/third-party/settings/FrequentlyBoughtTogether/index.js +2 -2
  410. package/dist/esm/third-party/settings/GloColorSwatchvariantImage/index.js +2 -2
  411. package/dist/esm/third-party/settings/GloboProductOptionsVariant/index.js +2 -2
  412. package/dist/esm/third-party/settings/GoogleReviewsByReputon/index.js +2 -2
  413. package/dist/esm/third-party/settings/Growave/index.js +4 -4
  414. package/dist/esm/third-party/settings/GrowthSuiteDiscountCodes/index.js +2 -2
  415. package/dist/esm/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
  416. package/dist/esm/third-party/settings/HextomFreeShippingBar/index.js +2 -2
  417. package/dist/esm/third-party/settings/HulkFormBuilder/index.js +2 -2
  418. package/dist/esm/third-party/settings/HulkProductOptions/index.js +2 -2
  419. package/dist/esm/third-party/settings/InfiniteOptions/index.js +2 -2
  420. package/dist/esm/third-party/settings/Instafeed/index.js +2 -2
  421. package/dist/esm/third-party/settings/InstasellShoppableInstagram/index.js +2 -2
  422. package/dist/esm/third-party/settings/JudgemeReviews/index.js +2 -2
  423. package/dist/esm/third-party/settings/JunipProductReviewsUgc/index.js +2 -2
  424. package/dist/esm/third-party/settings/KachingBundles/index.js +2 -2
  425. package/dist/esm/third-party/settings/KachingSubscriptionsApp/index.js +2 -2
  426. package/dist/esm/third-party/settings/KingProductOptions/index.js +2 -2
  427. package/dist/esm/third-party/settings/KiteFreeGiftDiscount/index.js +2 -2
  428. package/dist/esm/third-party/settings/KlarnaMessaging/index.js +4 -4
  429. package/dist/esm/third-party/settings/Klaviyo/index.js +4 -4
  430. package/dist/esm/third-party/settings/KoalaBundleQuantityDiscount/index.js +2 -2
  431. package/dist/esm/third-party/settings/LaiProductReviews/index.js +2 -2
  432. package/dist/esm/third-party/settings/LoloyalLoyaltyReferrals/index.js +2 -2
  433. package/dist/esm/third-party/settings/LoopSubscriptions/index.js +2 -2
  434. package/dist/esm/third-party/settings/LooxReviews/index.js +4 -4
  435. package/dist/esm/third-party/settings/MaxbundleProductBundles/index.js +2 -2
  436. package/dist/esm/third-party/settings/MbcBundleVolumeDiscount/index.js +2 -2
  437. package/dist/esm/third-party/settings/MyappgurusProductReviews/index.js +2 -2
  438. package/dist/esm/third-party/settings/NotifyBackInStockPreOrder/index.js +2 -2
  439. package/dist/esm/third-party/settings/OkendoReviewsLoyalty/index.js +2 -2
  440. package/dist/esm/third-party/settings/Omnisend/index.js +4 -4
  441. package/dist/esm/third-party/settings/Opinew/index.js +4 -4
  442. package/dist/esm/third-party/settings/ParcelPanel/index.js +4 -4
  443. package/dist/esm/third-party/settings/PickyStory/index.js +4 -4
  444. package/dist/esm/third-party/settings/PowerfulContactFormBuilder/index.js +2 -2
  445. package/dist/esm/third-party/settings/PreorderNowPreOrderPq/index.js +2 -2
  446. package/dist/esm/third-party/settings/PreorderNowWodPresale/index.js +2 -2
  447. package/dist/esm/third-party/settings/ProductOptionsCustomizer/index.js +2 -2
  448. package/dist/esm/third-party/settings/ProductOptionsVariantOption/index.js +2 -2
  449. package/dist/esm/third-party/settings/PumperBundlesVolumeDiscount/index.js +2 -2
  450. package/dist/esm/third-party/settings/PushOwl/index.js +4 -4
  451. package/dist/esm/third-party/settings/QikifyUpsell/index.js +2 -2
  452. package/dist/esm/third-party/settings/RapiBundleQuantityBreaks/index.js +2 -2
  453. package/dist/esm/third-party/settings/RechargeSubscriptions/index.js +2 -2
  454. package/dist/esm/third-party/settings/RecurpaySubscriptionApp/index.js +2 -2
  455. package/dist/esm/third-party/settings/Releasit/index.js +4 -4
  456. package/dist/esm/third-party/settings/RequestQuoteHidePrice/index.js +3 -3
  457. package/dist/esm/third-party/settings/ReviewxpoProductReviewsApp/index.js +2 -2
  458. package/dist/esm/third-party/settings/Rivyo/index.js +4 -4
  459. package/dist/esm/third-party/settings/Ryviu/index.js +4 -4
  460. package/dist/esm/third-party/settings/SealSubscriptions/index.js +2 -2
  461. package/dist/esm/third-party/settings/SegunoEmailMarketing/index.js +2 -2
  462. package/dist/esm/third-party/settings/Selleasy/index.js +2 -2
  463. package/dist/esm/third-party/settings/SeoantTrustBadgesIcon/index.js +2 -2
  464. package/dist/esm/third-party/settings/ShopifyForms/index.js +2 -2
  465. package/dist/esm/third-party/settings/ShopifySubscriptions/index.js +2 -2
  466. package/dist/esm/third-party/settings/SimpleBundlesKits/index.js +2 -2
  467. package/dist/esm/third-party/settings/SkioSubscriptionsYcS20/index.js +2 -2
  468. package/dist/esm/third-party/settings/SmartSearchBarAndFilters/index.js +4 -4
  469. package/dist/esm/third-party/settings/SproutPlantTreesGrowSales/index.js +2 -2
  470. package/dist/esm/third-party/settings/Stamped.js +4 -4
  471. package/dist/esm/third-party/settings/StellarDeliveryDatePickup/index.js +2 -2
  472. package/dist/esm/third-party/settings/SubifySubscriptionsApp/index.js +2 -2
  473. package/dist/esm/third-party/settings/TagembedSocialPostReview/index.js +2 -2
  474. package/dist/esm/third-party/settings/TagshopShoppableVideosUgc/index.js +2 -2
  475. package/dist/esm/third-party/settings/TeeinblueProductPersonalizer/index.js +2 -2
  476. package/dist/esm/third-party/settings/TrustBadgesBear/index.js +2 -2
  477. package/dist/esm/third-party/settings/TrustMe/index.js +4 -4
  478. package/dist/esm/third-party/settings/TrustedsiteTrustBadges/index.js +2 -2
  479. package/dist/esm/third-party/settings/Trustoo/index.js +2 -2
  480. package/dist/esm/third-party/settings/TrustreviewsProductReviews/index.js +2 -2
  481. package/dist/esm/third-party/settings/TrustshopProductReviews/index.js +2 -2
  482. package/dist/esm/third-party/settings/UltimateSalesBoost/index.js +2 -2
  483. package/dist/esm/third-party/settings/UnlimitedBundlesDiscounts/index.js +2 -2
  484. package/dist/esm/third-party/settings/UppromoteAffiliateMarketing/setting.js +2 -2
  485. package/dist/esm/third-party/settings/Vitals/index.js +4 -4
  486. package/dist/esm/third-party/settings/WcWishlistBackInStock/index.js +3 -3
  487. package/dist/esm/third-party/settings/WhatmoreShoppableVideosreel/index.js +2 -2
  488. package/dist/esm/third-party/settings/WideBundle/index.js +4 -4
  489. package/dist/esm/third-party/settings/Wiser/index.js +4 -4
  490. package/dist/esm/third-party/settings/WishlistKing/index.js +2 -2
  491. package/dist/esm/third-party/settings/WishlistPlus/index.js +2 -2
  492. package/dist/esm/third-party/settings/YotpoReviews/index.js +4 -4
  493. package/dist/esm/video/common/attrs.js +1 -1
  494. package/dist/esm/video/components/HTML5Embed.js +1 -1
  495. package/dist/esm/video/components/HTML5Embed.liquid.js +8 -8
  496. package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
  497. package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
  498. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
  499. package/dist/esm/video/components/Video.liquid.js +1 -1
  500. package/dist/types/index.d.ts +26 -8
  501. package/package.json +11 -8
@@ -1,8 +1,8 @@
1
- import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{getShapeByLayout as i,getMinHeightByPosition as o,getZoomDisplay as r,checkDisplayGalleryByWidth as s,getCarouselVerticalConfigByPosition as a}from"../../common/productGallery.js";import{getGalleryCarouselShouldInitByLayout as p,getAspectRatio as l,getDisplayStyle as d,getSrcImage as m}from"../../common/common.js";import g from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";import{getProductImagesClassName as n}from"../../composables/getProductImagesClassName.js";import c from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesAttr as C}from"../../composables/getProductImagesAttr.js";import h from"../../../../../image/components/NextImage.liquid.js";import{getStyleOfObject as y}from"../../../../helpers/function.js";import{LiquidIf as v,LiquidFor as b}from"@gem-sdk/system";let f=({builderPropUID:f,children:w,pageContext:L,...F})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:$}=n(F),{galleryCarouselSettingAttrs:I}=C(F),{galleryCarouselStyle:_,galleryCarouselItemStyle:k}=u(F),j=i({shape:F.shape,shapeForBottom:F.shapeForBottom,shapeFor1Col:F.shapeFor1Col,shapeFor2Col:F.shapeFor2Col,shapeForFtOnly:F.shapeForFtOnly,shapeForInsideBottom:F.shapeForInsideBottom,shapeForInside:F.shapeForInside},F.position),V=(t,i)=>e`${h({srcIsLiquidCode:!0,src:`${m("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer",pageContext:L})}`,M=e=>`
1
+ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{getShapeByLayout as i,getMinHeightByPosition as o,getZoomDisplay as r,checkDisplayGalleryByWidth as s,getCarouselVerticalConfigByPosition as a}from"../../common/productGallery.js";import{getGalleryCarouselShouldInitByLayout as p,getAspectRatio as l,getDisplayStyle as d}from"../../common/common.js";import m from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";import{getProductImagesClassName as g}from"../../composables/getProductImagesClassName.js";import n from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getLiquidImageSrcset as u}from"../../../../../image/common/liquidSrcset.js";import{getProductImagesAttr as C}from"../../composables/getProductImagesAttr.js";import h from"../../../../../image/components/NextImage.liquid.js";import{getStyleOfObject as y}from"../../../../helpers/function.js";import{LiquidIf as v,LiquidFor as f}from"@gem-sdk/system";let b=({builderPropUID:b,children:w,pageContext:L,...F})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:$}=g(F),{galleryCarouselSettingAttrs:I}=C(F),{galleryCarouselStyle:_,galleryCarouselItemStyle:q}=c(F),j=i({shape:F.shape,shapeForBottom:F.shapeForBottom,shapeFor1Col:F.shapeFor1Col,shapeFor2Col:F.shapeFor2Col,shapeForFtOnly:F.shapeForFtOnly,shapeForInsideBottom:F.shapeForInsideBottom,shapeForInside:F.shapeForInside},F.position),k=u({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:F.qualityType,qualityPercent:F.qualityPercent}),V=(t,i)=>e`${h({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:k,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,M=e=>`
2
2
  ${v("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
3
3
  ${v("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
4
4
  ${v("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
5
- ${g({id:"{{imageID}}",contentType:"productImage",className:`${$(`gp-gallery-image-item ${e??""}`)}`,parentId:`${f}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:k,children:`
5
+ ${m({id:"{{imageID}}",contentType:"productImage",className:`${$(`gp-gallery-image-item ${e??""}`)}`,parentId:`${b}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:q,children:`
6
6
  <div class="gp-w-full gp-relative gp-h-full"
7
7
 
8
8
  >
@@ -40,7 +40,7 @@ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{
40
40
  </svg>
41
41
  </div>
42
42
  </div>
43
- `})}`,B=v("product.media.size > 1",b("media in product.media",`${v("media.media_type == 'image'",b("image in product.images",v("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
43
+ `})}`,P=v("product.media.size > 1",f("media in product.media",`${v("media.media_type == 'image'",f("image in product.images",v("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
44
44
  ${v("media.id == product.featured_media.id ",M(F?.borderActive?.border!=="none"?"active":""),M())}`));return e`
45
- ${c({builderProps:{uid:f},rootId:`${f}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=a(F.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:o(F.position,F.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:I,rootStyles:{...(()=>{let e=(e,i,o)=>{let r=t(i,o),s=t(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},i=s({shapeByLayout:j}),o={desktop:i.desktop&&e(F.type,F.position,"desktop"),tablet:i.tablet&&e(F.type,F.position,"tablet"),mobile:i.mobile&&e(F.type,F.position,"mobile")};return d(e=>!o[e],"flex")})()},styles:_,disableMarginAuto:!0,children:B,shouldInitByLayout:p(F.position),carouselType:"feature_image_thumbs"})}
46
- `};export{f as default};
45
+ ${n({builderProps:{uid:b},rootId:`${b}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=a(F.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:o(F.position,F.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:I,rootStyles:{...(()=>{let e=(e,i,o)=>{let r=t(i,o),s=t(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},i=s({shapeByLayout:j}),o={desktop:i.desktop&&e(F.type,F.position,"desktop"),tablet:i.tablet&&e(F.type,F.position,"tablet"),mobile:i.mobile&&e(F.type,F.position,"mobile")};return d(e=>!o[e],"flex")})()},styles:_,disableMarginAuto:!0,children:P,shouldInitByLayout:p(F.position),carouselType:"feature_image_thumbs"})}
46
+ `};export{b as default};
@@ -1,8 +1,8 @@
1
- import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{getShapeByLayout as i,getMinHeightByPosition as o,getZoomDisplay as r,checkDisplayGalleryByWidth as s,getCarouselVerticalConfigByPosition as a}from"../../common/productGallery.js";import{getGalleryCarouselShouldInitByLayout as p,getAspectRatio as l,getDisplayStyle as d,getSrcImage as m}from"../../common/common.js";import g from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";import{getProductImagesClassName as n}from"../../composables/getProductImagesClassName.js";import c from"../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesAttr as C}from"../../composables/getProductImagesAttr.js";import h from"../../../../../image/components/NextImage.liquid.js";import{getStyleOfObject as y}from"../../../../helpers/function.js";import{LiquidIf as v,LiquidFor as b}from"@gem-sdk/system";let f=({builderPropUID:f,children:w,pageContext:L,...F})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:$}=n(F),{galleryCarouselSettingAttrs:I}=C(F),{galleryCarouselStyle:_,galleryCarouselItemStyle:k}=u(F),j=i({shape:F.shape,shapeForBottom:F.shapeForBottom,shapeFor1Col:F.shapeFor1Col,shapeFor2Col:F.shapeFor2Col,shapeForFtOnly:F.shapeForFtOnly,shapeForInsideBottom:F.shapeForInsideBottom,shapeForInside:F.shapeForInside},F.position),V=(t,i)=>e`${h({srcIsLiquidCode:!0,src:`${m("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer",pageContext:L})}`,M=e=>`
1
+ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{getShapeByLayout as i,getMinHeightByPosition as o,getZoomDisplay as r,checkDisplayGalleryByWidth as s,getCarouselVerticalConfigByPosition as a}from"../../common/productGallery.js";import{getGalleryCarouselShouldInitByLayout as p,getAspectRatio as l,getDisplayStyle as d}from"../../common/common.js";import m from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";import{getProductImagesClassName as g}from"../../composables/getProductImagesClassName.js";import n from"../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getLiquidImageSrcset as u}from"../../../../../image/common/liquidSrcset.js";import{getProductImagesAttr as C}from"../../composables/getProductImagesAttr.js";import h from"../../../../../image/components/NextImage.liquid.js";import{getStyleOfObject as y}from"../../../../helpers/function.js";import{LiquidIf as v,LiquidFor as f}from"@gem-sdk/system";let b=({builderPropUID:b,children:w,pageContext:L,...F})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:$}=g(F),{galleryCarouselSettingAttrs:I}=C(F),{galleryCarouselStyle:_,galleryCarouselItemStyle:q}=c(F),j=i({shape:F.shape,shapeForBottom:F.shapeForBottom,shapeFor1Col:F.shapeFor1Col,shapeFor2Col:F.shapeFor2Col,shapeForFtOnly:F.shapeForFtOnly,shapeForInsideBottom:F.shapeForInsideBottom,shapeForInside:F.shapeForInside},F.position),k=u({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:F.qualityType,qualityPercent:F.qualityPercent}),V=(t,i)=>e`${h({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:k,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,M=e=>`
2
2
  ${v("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
3
3
  ${v("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
4
4
  ${v("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
5
- ${g({id:"{{imageID}}",contentType:"productImage",className:`${$(`gp-gallery-image-item ${e??""}`)}`,parentId:`${f}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:k,children:`
5
+ ${m({id:"{{imageID}}",contentType:"productImage",className:`${$(`gp-gallery-image-item ${e??""}`)}`,parentId:`${b}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:q,children:`
6
6
  <div class="gp-w-full gp-relative gp-h-full"
7
7
 
8
8
  >
@@ -40,7 +40,7 @@ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{
40
40
  </svg>
41
41
  </div>
42
42
  </div>
43
- `})}`,B=v("product.media.size > 1",b("media in product.media",`${v("media.media_type == 'image'",b("image in product.images",v("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
43
+ `})}`,P=v("product.media.size > 1",f("media in product.media",`${v("media.media_type == 'image'",f("image in product.images",v("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
44
44
  ${v("media.id == product.featured_media.id ",M(F?.borderActive?.border!=="none"?"active":""),M())}`));return e`
45
- ${c({builderProps:{uid:f},rootId:`${f}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=a(F.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:o(F.position,F.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:I,rootStyles:{...(()=>{let e=(e,i,o)=>{let r=t(i,o),s=t(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},i=s({shapeByLayout:j}),o={desktop:i.desktop&&e(F.type,F.position,"desktop"),tablet:i.tablet&&e(F.type,F.position,"tablet"),mobile:i.mobile&&e(F.type,F.position,"mobile")};return d(e=>!o[e],"flex")})()},styles:_,disableMarginAuto:!0,children:B,shouldInitByLayout:p(F.position),carouselType:"feature_image_thumbs"})}
46
- `};export{f as default};
45
+ ${n({builderProps:{uid:b},rootId:`${b}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=a(F.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:o(F.position,F.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:I,rootStyles:{...(()=>{let e=(e,i,o)=>{let r=t(i,o),s=t(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},i=s({shapeByLayout:j}),o={desktop:i.desktop&&e(F.type,F.position,"desktop"),tablet:i.tablet&&e(F.type,F.position,"tablet"),mobile:i.mobile&&e(F.type,F.position,"mobile")};return d(e=>!o[e],"flex")})()},styles:_,disableMarginAuto:!0,children:P,shouldInitByLayout:p(F.position),carouselType:"feature_image_thumbs"})}
46
+ `};export{b as default};
@@ -1,28 +1,28 @@
1
- import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{getProductImagesClassName as o}from"../../composables/getProductImagesClassName.js";import{getZoomImageClass as s,getZoomLenClass as d}from"../../common/productFeaturedImage.js";import{getProductImagesStyles as r}from"../../composables/getProductImagesStyles.js";import{getShapeByLayout as l,getZoomDisplay as m}from"../../common/productGallery.js";import p from"../../../../../video/components/HTML5Embed.liquid.js";import n from"../../../../../image/components/NextImage.liquid.js";import g from"../../../../../image/components/Modal3d.liquid.js";import{getAspectRatio as c,getSrcImage as u}from"../../common/common.js";import{Liquid as h,LiquidFor as y,LiquidIf as C,If as v}from"@gem-sdk/system";import f from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as w}from"../../../../helpers/function.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,pageContext:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=o(L),{galleryGridStyles:q,galleryGridItemStyles:I}=r(L),M=l({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
2
- ${n({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}
3
- ${v(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",s())}">
4
- ${n({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,pageContext:x})}
1
+ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{getProductImagesClassName as o}from"../../composables/getProductImagesClassName.js";import{getZoomImageClass as s,getZoomLenClass as r}from"../../common/productFeaturedImage.js";import{getProductImagesStyles as d}from"../../composables/getProductImagesStyles.js";import{getLiquidImageSrcset as l}from"../../../../../image/common/liquidSrcset.js";import{getShapeByLayout as m,getZoomDisplay as p}from"../../common/productGallery.js";import n from"../../../../../video/components/HTML5Embed.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import c from"../../../../../image/components/Modal3d.liquid.js";import{Liquid as u,LiquidFor as h,LiquidIf as y,If as C}from"@gem-sdk/system";import v from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as f}from"../../../../helpers/function.js";import{getAspectRatio as w}from"../../common/common.js";let _=({builderPropUID:_,wrapperStyle:b,children:$,pageContext:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:q}=o(L),{galleryGridStyles:V,galleryGridItemStyles:I}=d(L),j=m({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),k=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},M=()=>k(),S=()=>k(!0),P=l({liquidSrc:"media.preview_image",sizeTarget:"ProductFeatureImage",qualityType:L.qualityType,qualityPercent:L.qualityPercent}),T=(e,a)=>i`
2
+ ${g({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:P,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none"})}
3
+ ${C(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",s())}">
4
+ ${g({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:P,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full"})}
5
5
  </div>`," ")}
6
- ${v(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",d())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
6
+ ${C(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",r())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
7
7
  </div>
8
8
  `," ")}
9
- `,z=()=>g({src:C("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:c(M)}),B=()=>f({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>p({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"},pageContext:x}),P=()=>i`
10
- ${C("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
9
+ `,Z=()=>c({src:y("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:w(j)}),B=()=>v({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>n({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",thumbnailImage:{srcset:P&&y("media.preview_image != blank",P)},poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),z=()=>i`
10
+ ${y("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
11
11
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
12
12
  <rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
13
13
  <path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
14
14
  </svg>
15
15
  </div>`)}
16
- ${C("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
16
+ ${y("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
17
17
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
18
18
  <rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
19
19
  <path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
20
20
  </svg>
21
21
  </div>`)}
22
- ${Z({aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},{width:"100%",height:"100%"})}
22
+ ${T({aspectRatio:w(j),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},{width:"100%",height:"100%"})}
23
23
 
24
24
  <div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
25
- style="${w(m(L?.clickOpenLightBox))}" >
25
+ style="${f(p(L?.clickOpenLightBox))}" >
26
26
  <svg
27
27
  height="100%"
28
28
  width="100%"
@@ -39,10 +39,10 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
39
39
  />
40
40
  </svg>
41
41
  </div>
42
- `,T=i=>`
43
- ${C("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
44
- ${C("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
45
- ${C("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
42
+ `,N=i=>`
43
+ ${y("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
44
+ ${y("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
45
+ ${y("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
46
46
  <div
47
47
  aria-hidden
48
48
  id="{{imageID}}"
@@ -54,18 +54,18 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
54
54
  grid-index="{{forloop.index}}"
55
55
  data-outline="none"
56
56
  class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
57
- style="${w(I)}"
57
+ style="${f(I)}"
58
58
  >
59
- ${C("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
59
+ ${y("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
60
60
 
61
- ${C("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
61
+ ${y("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
62
62
 
63
- <div class="gp-w-full" style="${C("media == null or media.media_type == 'image'","display: block !important;")} ${C("isVideo == true",w({...S()}))}">
64
- ${C("media != null",P(),N())}
63
+ <div class="gp-w-full" style="${y("media == null or media.media_type == 'image'","display: block !important;")} ${y("isVideo == true",f({...S()}))}">
64
+ ${y("media != null",z(),E())}
65
65
  </div>
66
66
 
67
- <div class="${C("isMedia","gp-flex gp-justify-center gp-items-center")}"
68
- style="${C("isMedia",w({...e("aspect",c(M))}))} ${w({...k()})}"
67
+ <div class="${y("isMedia","gp-flex gp-justify-center gp-items-center")}"
68
+ style="${y("isMedia",f({...e("aspect",w(j))}))} ${f({...M()})}"
69
69
  >
70
70
  {% case media.media_type %}
71
71
  {% when 'external_video' %}
@@ -75,19 +75,19 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
75
75
  {% assign mediaSourceVideo = media.sources.last.url %}
76
76
  ${H()}
77
77
  {% when 'model' %}
78
- ${z()}
78
+ ${Z()}
79
79
  {% endcase %}
80
80
  </div>
81
81
  {% assign isVideo= false %}
82
82
  {% assign isMedia= false %}
83
- </div>`,N=()=>i`
84
- ${n({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}`;return h(`
83
+ </div>`,E=()=>i`
84
+ ${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",setting:{aspectRatio:w(j),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none"})}`;return u(`
85
85
  <div type="grid-gallery"
86
- class="${V}"
87
- style="${w(q)}}"
86
+ class="${q}"
87
+ style="${f(V)}}"
88
88
  >
89
- ${y("media in product.media",`${C("media.media_type == 'image'",y("image in product.images",C("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
90
- ${C("media.id == product.featured_media.id ",T(L?.borderActive?.border!=="none"?"active":""),T())}`)}
91
- ${C("product.media.size > 0",b)}
92
- ${C("product.media.size < 1",T())}
89
+ ${h("media in product.media",`${y("media.media_type == 'image'",h("image in product.images",y("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
90
+ ${y("media.id == product.featured_media.id ",N(L?.borderActive?.border!=="none"?"active":""),N())}`)}
91
+ ${y("product.media.size > 0",$)}
92
+ ${y("product.media.size < 1",N())}
93
93
  </div>`)};export{_ as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import i from"../../../../../carousel-v3/components/item/CarouselItem.js";import l from"../../../../../carousel-v3/components/root/Carousel.js";import{useFeaturedImageGlobal as s,useEditorMode as d,cls as n}from"@gem-sdk/core";import{isFeatureMedia as r}from"../../common/productFeaturedImage.js";import p from"../../../../../image/components/NextImage.js";import m from"../child/ProductFeatureVideo.js";import"../../../../../modal/components/confirm.js";import a from"../../../../../modal/components/Modal.js";import c from"../child/MediaIcon.js";import{useMemo as g}from"react";let h=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=s(),E=g(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j=d(),v=e=>"edit"!==j&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(a,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(l,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(l=>e(i,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:v(l)?e(m,{type:l?.contentType,url:l.src??"",thumbnail:l?.previewImage,aspectRatio:f}):t(o,{children:[e(p,{src:r(l?.contentType)?l?.previewImage:l?.src,width:l?.width,height:l?.height,alt:l?.alt,"content-type":l?.contentType,setting:{aspectRatio:f},className:n("gp-h-full gp-w-full gp-object-contain")},l?.id),e(c,{contentType:l?.contentType??""})]})},l?.id))})})};export{h as default};
2
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import i from"../../../../../carousel-v3/components/item/CarouselItem.js";import l from"../../../../../carousel-v3/components/root/Carousel.js";import{useFeaturedImageGlobal as s,useEditorMode as d,cls as n}from"@gem-sdk/core";import{isFeatureMedia as r}from"../../common/productFeaturedImage.js";import p from"../../../../../image/components/NextImage.js";import m from"../child/ProductFeatureVideo.js";import"../../../../../modal/components/confirm.js";import a from"../../../../../modal/components/Modal.js";import c from"../child/MediaIcon.js";import{useMemo as g}from"react";let h={desktop:"finest"},u=({builderPropUID:u,productImages:b,open:f,imageRatio:y,onHandleClose:k})=>{let E=s(),I=g(()=>{let e=b?.findIndex(e=>e.id===E?.id);return e&&e>0?e:0},[b,E]),j={desktop:b&&b.length>1,mobile:b&&b?.length>1,tablet:b&&b?.length>1},v=d(),C=e=>"edit"!==v&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(a,{setting:{open:f},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(l,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:I,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:I},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:I,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:b?.map(l=>e(i,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:C(l)?e(m,{type:l?.contentType,url:l.src??"",thumbnail:l?.previewImage,aspectRatio:y}):t(o,{children:[e(p,{src:r(l?.contentType)?l?.previewImage:l?.src,width:l?.width,height:l?.height,alt:l?.alt,"content-type":l?.contentType,setting:{aspectRatio:y,qualityType:h},className:n("gp-h-full gp-w-full gp-object-contain")},l?.id),e(c,{contentType:l?.contentType??""})]})},l?.id))})})};export{u as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as r}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as l,usePageType as i,usePageStore as a,useFetchHandle as c,hasPublicStoreFrontData as s,createStoreFrontFetcher as n,useProductQuery as u,useProductsQueryAll as m,useProductsQuery as g,PICKED_PRODUCT_STATUSES as h,useCollectionQuery as p,flattenConnection as f,ProductListProvider as P,filterToolbarPreview as b}from"@gem-sdk/core";import{useState as k,useMemo as I,useEffect as T}from"react";import v from"../../../common/components/Loading.js";import y from"next/dynamic";import O from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import C from"./ProductListCarouselLayout.js";import E from"./ProductListGridLayout.js";import{getClass as N}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getStyle as L}from"./common/styles.js";import{If as j}from"@gem-sdk/system";import W from"next/head";let x=y(()=>import("../ProductNotFound.js"),{loading:v}),G=y=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=y,{isRelatedProduct:H,productSetting:Q}=w(y),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=d(),$=l(),_=i(),V=a(e=>e.dynamicProduct),q=a(e=>e.dynamicCollection),[U,J]=k(1),[K,X]=k(!0),[Y,Z]=k(),[ee,et]=k(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[r.Collection,r.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=r.DynamicCollection);let er=Q?.productSrc??r.Collection;er===r.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=c(),ei=a(e=>e.publicStoreFrontData),ea=I(()=>s(ei)?n(ei):el,[ei]),{data:ec}=u(H&&ed?ed:void 0,{revalidateOnMount:F||R},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ec?.tags||ec?.tags.length===0),en=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ec?.collections?.edges||ec?.collections.edges.length===0),eu=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ec?.vendor,em=m(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=g(er===r.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?h:void 0}),ep=I(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=p(er!==r.PickProduct?ep:void 0,{revalidateOnMount:eg});T(()=>{if(H&&ec&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(et(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Z({first:A?.numberOfProducts,vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ec?.vendor:"",idNEQ:ec.id});break;case"collection":{let t=ec?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ec.tags||0===ec.tags.length){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags},{nameNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags}]}]})}}},[ec,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let eP=er===r.PickProduct?eh.isValidating:ef.isValidating,eb=er===r.PickProduct?eh.isLoading:ef.isLoading,ek=er===r.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===r.PickProduct?f(eh.data?.products):f(eI?.products),ev=em?.data?.products?f(em?.data?.products):void 0,ey=H&&ev?ev:er===r.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==r.PickProduct?eT:eT.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eO=I(()=>ee&&H&&F||!ey.length&&!eb&&K&&F,[K,eb,ee,H,F,ey.length]),eS=I(()=>!ey||ee&&H,[ee,H,ey]),eC=I(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(A?.slidesToShow?.[$]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(A?.slidesToShow?.[$]??1)*(e+1)&&++e,{gridRow:`${1+U*e}/${U+1+U*e}`,marginBottom:e+1<t?S(M?.horizontalGutter,$):void 0}))},[A?.sameHeight,A?.slidesToShow,U,ey?.length,$,M?.horizontalGutter]),eE=I(()=>eP||eb||ek||!ey||ee&&H,[ek,eb,ee,H,eP,ey]);T(()=>{eE||setTimeout(()=>{let{builderData:e}=B??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&J(o.childElementCount||1)},F?0:500)},[B,eE,F]);let eN=I(()=>({collection:eI,products:ey,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:M?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:M?.horizontalGutter,verticalGutter:M?.verticalGutter,fullWidth:M?.fullWidth,spacing:M?.spacing,width:M?.width,height:M?.height}}),[eI,ey,A,M]);if(B?.isPreview&&eo)return e(t,{});if(eO)return e(t,{children:j(K,e(x,{builderAttrs:D,collectionHandle:eI?.handle,productSrc:er,onClose:()=>X(!1),children:G,relatedTagString:z,assignProductNoTags:es||en||eu,noAssignedProduct:!ed}))});let{productListWrapStyle:ew,productListContentStyle:eL,productListWrapAlignStyle:ej}=L(y),{productListWrapClass:eW}=N(y);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(W,{children:[!!M.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage.desktop.image.src,as:"image"}),!!M.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.tablet?.image?.src,as:"image"}),!!M.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||eb?e(v,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(P,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:j(M?.layout==="grid",e(E,{...y,productSortedById:ey,generateGridRowArray:eC}),e(C,{...y,productSortedById:ey}))})]})})}),b(G,!0)]})};export{G as default};
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{getElementLabel as o,isQueryLoading as d}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as a}from"../../../common/const.js";import{useRenderMode as l,useCurrentDevice as i,usePageType as c,usePageStore as s,useFetchHandle as n,hasPublicStoreFrontData as u,createStoreFrontFetcher as m,useProductQuery as g,useProductsQueryAll as h,useProductsQuery as p,PICKED_PRODUCT_STATUSES as f,useCollectionQuery as P,flattenConnection as T,ProductListProvider as b,filterToolbarPreview as y}from"@gem-sdk/core";import{useState as I,useMemo as v,useEffect as k}from"react";import O from"../../../common/components/Loading.js";import S from"next/dynamic";import{getData as C,isRelatedProductsLoading as L,hasQueryableRelatedTag as E}from"./common/helpers.js";import N from"../SalePageProductListWarning.js";import{getPropertyByDevice as w}from"../../../dialog/common/helpers.js";import j from"./ProductListCarouselLayout.js";import W from"./ProductListGridLayout.js";import{getClass as x}from"./common/classes.js";import{getStyle as G}from"./common/styles.js";import{If as M}from"@gem-sdk/system";import D from"next/head";let Q=S(()=>import("../ProductNotFound.js"),{loading:O}),B=S=>{let{children:B,styles:A,builderProps:H,setting:R,builderAttrs:z}=S,{isRelatedProduct:F,productSetting:$}=C(S),_=$.relatedTag&&$.relatedTag[0],{isEditMode:q,isPreviewSharePageMode:U}=l(),V=i(),J=c(),K=s(e=>e.dynamicProduct),X=s(e=>e.dynamicCollection),[Y,Z]=I(1),[ee,et]=I(!0),[er,eo]=I(),[ed,ea]=I(!1),[el,ei]=I(),ec="GP_FUNNEL_PAGE"===J;"GP_COLLECTION"!=J||[a.Collection,a.DynamicCollection].includes($?.productSrc)||($.productSrc=a.DynamicCollection);let es=$?.productSrc??a.Collection;es===a.DynamicCollection&&($.collectionId=X?.collectionId||"latest");let en=K?.productId&&K?.productId!==$.relatedProductId?K?.productId:$.relatedProductId,eu=n(),em=s(e=>e.publicStoreFrontData),eg=v(()=>u(em)?m(em):eu,[em]),{data:eh,error:ep,isLoading:ef}=g(F&&en?en:void 0,{revalidateOnMount:q||U},eg),eP=$.relatedTag&&"tags"===$.relatedTag[0]&&(!eh?.tags||eh?.tags.length===0),eT=$.relatedTag&&"collection"===$.relatedTag[0]&&(!eh?.collections?.edges||eh?.collections.edges.length===0),eb=$.relatedTag&&"vendor"===$.relatedTag[0]&&!eh?.vendor,ey=h(er,{revalidateOnMount:q||U},eg),eI=q||U,ev=p(es===a.PickProduct?$?.productIds:void 0,{revalidateOnMount:eI},{defaultSelectedProductCount:$?.numOfSelectedProducts,selectedStatus:eI&&$?.productIds?.length?f:void 0}),ek=v(()=>({id:$?.collectionId??"latest",numberOfProducts:R?.numberOfProducts??4,orderBy:R?.orderBy}),[$?.collectionId,Number(R?.numberOfProducts),R?.orderBy]),eO=P(es!==a.PickProduct?ek:void 0,{revalidateOnMount:eI});k(()=>{if(F&&eh&&$.relatedTag&&"recommended-product"!==$.relatedType){let e;switch(ea(!1),$.hasRelatedExclude&&(e=$?.relatedExclude&&$.relatedExclude.split(",").map(e=>e.trim())),$.relatedTag[0]){case"vendor":eo({first:R?.numberOfProducts,vendor:$.relatedTag&&"vendor"===$.relatedTag[0]?eh?.vendor:"",idNEQ:eh.id}),ei(eh.id);break;case"collection":{let t=eh?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ea(!0);break}eo(e&&e.length>0?{first:R?.numberOfProducts,idNEQ:eh.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:R?.numberOfProducts,idNEQ:eh.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}),ei(eh.id);break}case"tags":if(!eh.tags||0===eh.tags.length){ea(!0);break}eo(e&&e.length>0?{first:R?.numberOfProducts,idNEQ:eh.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eh.tags},{nameNotIn:e}]}]}:{first:R?.numberOfProducts,idNEQ:eh.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eh.tags}]}]}),ei(eh.id)}}},[eh,$.relatedType,$.relatedTag,R?.numberOfProducts,$.relatedExclude,$.hasRelatedExclude,F]);let eS=es===a.PickProduct,eC=eS?ev:eO,eL=eC.isValidating,eE=eC.error,eN=d({hasQuery:eI&&(!eS||!!$?.productIds),data:eC.data,error:eC.error,isLoading:eC.isLoading}),ew=L({isRelatedProduct:F,relatedType:$.relatedType,hasRelatedTag:E({relatedTag:$.relatedTag}),relatedProductIdAssigned:en,canRevalidateOnMount:eI,mainProduct:{data:eh,error:ep,isLoading:ef},relatedQuery:er,relatedQuerySource:el,mainProductId:eh?.id,isNotFoundRelatedProduct:ed,relatedProducts:{data:ey.data,error:ey.error,isLoading:ey.isLoading}}),ej=eN||ew,eW=eO.data?.collections?.edges?.[0]?.node,ex=es===a.PickProduct?T(ev.data?.products):T(eW?.products),eG=ey?.data?.products?T(ey?.data?.products):void 0,eM=F&&eG?eG:es===a.PickProduct&&$?.productIds?.length?$?.productIds?.map(e=>ex?.find(t=>t?.baseID===e)).filter(Boolean)??ex:es!==a.PickProduct?ex:ex.filter((e,t)=>t<($?.numOfSelectedProducts??4)),eD=v(()=>ed&&F&&q||!eM.length&&!ej&&ee&&q,[ee,ej,ed,F,q,eM.length]),eQ=v(()=>!eM||ed&&F,[ed,F,eM]),eB=v(()=>{if(!R?.sameHeight)return[];let e=0,t=Math.ceil((eM?.length??0)/+(R?.slidesToShow?.[V]??1));return Array.from(Array(eM?.length??0)).map((r,o)=>(o>=+(R?.slidesToShow?.[V]??1)*(e+1)&&++e,{gridRow:`${1+Y*e}/${Y+1+Y*e}`,marginBottom:e+1<t?w(A?.horizontalGutter,V):void 0}))},[R?.sameHeight,R?.slidesToShow,Y,eM?.length,V,A?.horizontalGutter]),eA=v(()=>eL||ej||eE||!eM||ed&&F,[eE,ej,ed,F,eL,eM]);k(()=>{eA||setTimeout(()=>{let{builderData:e}=H??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&Z(r.childElementCount||1)},q?0:500)},[H,eA,q]);let eH=v(()=>({collection:eW,products:eM,settings:{loop:R?.loop??{desktop:!1},scrollMode:R?.scrollMode??{desktop:"snap"},slidesToShow:R?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:A?.layout,dot:R?.dot,dotStyle:R?.dotStyle,arrow:R?.arrow,controlOverContent:R?.controlOverContent,sameHeight:R?.sameHeight},styles:{horizontalGutter:A?.horizontalGutter,verticalGutter:A?.verticalGutter,fullWidth:A?.fullWidth,spacing:A?.spacing,width:A?.width,height:A?.height}}),[eW,eM,R,A]);if(H?.isPreview&&ec)return e(t,{});if(eD)return e(t,{children:M(ee,e(Q,{builderAttrs:z,collectionHandle:eW?.handle,productSrc:es,onClose:()=>et(!1),children:B,relatedTagString:_,assignProductNoTags:eP||eT||eb,noAssignedProduct:!en}))});let{productListWrapStyle:eR,productListContentStyle:ez,productListWrapAlignStyle:eF}=G(S),{productListWrapClass:e$}=x(S);return r("div",{...z,className:e$,style:eR,children:[!!A?.preloadBgImage&&r(D,{children:[!!A.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage.desktop.image.src,as:"image"}),!!A.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage?.tablet?.image?.src,as:"image"}),!!A.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage?.mobile?.image?.src,as:"image"})]}),eL||ej?e(O,{label:o({builderData:H?.builderData})}):eE?r("div",{children:["Error: ",eE?.message]}):eQ?e("div",{children:"Products not found"}):e(b,{...eH,children:e("div",{className:"gp-flex gp-w-full",style:eF,children:r("div",{style:ez,children:[ec&&e(N,{}),e(t,{children:M(A?.layout==="grid",e(W,{...S,productSortedById:eM,generateGridRowArray:eB}),e(j,{...S,productSortedById:eM}))})]})})}),y(B,!0)]})};export{B as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as e,isEmptyChildren as s}from"@gem-sdk/core";import t from"../../../grid/components/ChildrenDroppable.js";import m from"../../../carousel/components/item/CarouselItem.js";import i from"../../../carousel/components/root/Carousel.js";import{getClass as l}from"./common/classes.js";import{getData as a}from"./common/helpers.js";import{getStyle as c}from"./common/styles.js";import{getAttr as n}from"./common/attrs.js";let p=p=>{let{children:d,builderProps:u,productSortedById:f,advanced:j}=p,h=r(),{carouselConfigSetting:y,carouselConfigStyle:C}=a(p),{productListAttr:b,getAttrProductItemEditor:g}=n(p),{carouselItemStyle:D}=c(p),{carouselClass:I,productItemClass:v}=l(p);return o(i,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...b},rootClass:I,setting:y,styles:C,children:f?.map(r=>o(m,{style:D,children:o(e,{product:r,readOnly:!0,children:o("div",{..."edit"===h?g(r?.baseID):{},className:v,children:s(d)?o(t,{}):d})})},r?.baseID))})};export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as m,isEmptyChildren as e}from"@gem-sdk/core";import s from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as t}from"../../../image/common/listImageContext.js";import{getListImageHints as i}from"./common/imagePriorityHints.js";import{LIST_PRELOAD_ROWS as l}from"./common/imagePriority.js";import n from"../../../carousel/components/item/CarouselItem.js";import a from"../../../carousel/components/root/Carousel.js";import{getClass as c}from"./common/classes.js";import{getData as d}from"./common/helpers.js";import{getStyle as p}from"./common/styles.js";import{getAttr as u}from"./common/attrs.js";let f=f=>{let{children:j,builderProps:h,productSortedById:g,advanced:y,setting:C}=f,P=r(),{carouselConfigSetting:b,carouselConfigStyle:v}=d(f),{productListAttr:x,getAttrProductItemEditor:I}=u(f),{carouselItemStyle:w}=p(f),{carouselClass:D,productItemClass:L}=c(f);return o(a,{advanced:y,builderProps:{uid:h?.uid},rootAttrs:{...x},rootClass:D,setting:b,styles:v,children:g?.map((r,a)=>o(n,{style:w,children:o(m,{product:r,readOnly:!0,children:o(t.Provider,{value:i({slidesToShow:C?.slidesToShow,rows:l.CAROUSEL,index:a+1}),children:o("div",{..."edit"===P?I(r?.baseID):{},className:L,children:e(j)?o(s,{}):j})})})},r?.baseID))})};export{f as default};
@@ -1,22 +1,24 @@
1
- import o from"../../../carousel/components/item/CarouselItem.liquid.js";import t from"../../../carousel/components/root/Carousel.liquid.js";import r from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";import{getClass as i}from"./common/classes.js";import{getData as s}from"./common/helpers.js";import{getStyle as d}from"./common/styles.js";import{template as u}from"@gem-sdk/core";let l=l=>{let{builderProps:c,advanced:n,productSrc:a,productListId:p}=l,{carouselConfigSetting:m,carouselConfigStyle:f}=s(l),{carouselItemStyle:$}=d(l),{carouselClass:g}=i(l);return u`
2
- ${t({advanced:n,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:g,setting:m,styles:f,children:`
1
+ import{getListImagePriorityLiquid as o,LIST_PRELOAD_ROWS as t}from"./common/imagePriority.js";import r from"../../../carousel/components/item/CarouselItem.liquid.js";import e from"../../../carousel/components/root/Carousel.liquid.js";import i from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as m}from"@gem-sdk/core";let n=n=>{let{builderProps:c,advanced:a,productSrc:p,productListId:f}=n,{carouselConfigSetting:$,carouselConfigStyle:g}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:h}=d(n),j=o({slidesToShow:n.setting?.slidesToShow,rows:t.CAROUSEL});return m`
2
+ ${e({advanced:a,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:h,setting:$,styles:g,children:`
3
3
  {%- assign count = 0 -%}
4
4
  {%- for product in products limit: limit -%}
5
5
  {%- if product.id != empty -%}
6
6
  {%- assign count = count | plus: 1 -%}
7
+ ${j.item}
7
8
  {%- assign variant = product.selected_or_first_available_variant -%}
8
9
  {%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
9
- ${o({builderProps:{...c},style:$,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,background:m?.background,children:`
10
- ${r({...l})}
10
+ ${r({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:g,background:$?.background,children:`
11
+ ${i({...n})}
11
12
  `})}
12
13
  {%- endif -%}
13
14
  {% endfor %}
14
- {%- if count == 0 and ${p.length} == 0 -%}
15
- {% if '${a}' == 'RelatedProduct' -%}
16
- <div>${e("ProductList","no_related_products")}</div>
15
+ ${j.reset}
16
+ {%- if count == 0 and ${f.length} == 0 -%}
17
+ {% if '${p}' == 'RelatedProduct' -%}
18
+ <div>${s("ProductList","no_related_products")}</div>
17
19
  {% else %}
18
- <div>${e("ProductList","no_products_found")}</div>
20
+ <div>${s("ProductList","no_products_found")}</div>
19
21
  {%- endif -%}
20
22
  {%- endif -%}
21
23
  `})}
22
- `};export{l as default};
24
+ `};export{n as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Children as o,isValidElement as e,createElement as m}from"react";import{useEditorMode as t,ProductProvider as s,isEmptyChildren as i}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getClass as a}from"./common/classes.js";import{getStyle as d}from"./common/styles.js";import{getAttr as c}from"./common/attrs.js";let p=p=>{let{children:n,productSortedById:f,generateGridRowArray:h,setting:u}=p,y=t(),{gridLayoutStyle:g}=d(p),{gridLayoutClass:j,productItemClass:b}=a(p),{productListAttr:k,getAttrProductItemEditor:v}=c(p);return r("div",{...k,style:g,className:j,children:f?.length?f?.map((t,a)=>r(s,{product:t,readOnly:!0,children:r("div",{..."edit"===y?v(t?.baseID):{},className:b,style:{"--grchild":u?.sameHeight?h?.[a]?.gridRow:void 0,"--mbchild":h?.[a]?.marginBottom},children:i(n)?r(l,{}):o.map(n,r=>e(r)?m(r.type,{...r.props,key:r.key}):null)})},t?.baseID)):null})};export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{Children as r,isValidElement as m,createElement as e}from"react";import{useEditorMode as i,ProductProvider as t,isEmptyChildren as s}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as a}from"../../../image/common/listImageContext.js";import{getListImageHints as d}from"./common/imagePriorityHints.js";import{LIST_PRELOAD_ROWS as n}from"./common/imagePriority.js";import{getClass as c}from"./common/classes.js";import{getStyle as p}from"./common/styles.js";import{getAttr as f}from"./common/attrs.js";let g=g=>{let{children:h,productSortedById:y,generateGridRowArray:u,setting:j}=g,v=i(),{gridLayoutStyle:b}=p(g),{gridLayoutClass:w,productItemClass:x}=c(g),{productListAttr:D,getAttrProductItemEditor:I}=f(g);return o("div",{...D,style:b,className:w,children:y?.length?y?.map((i,c)=>o(t,{product:i,readOnly:!0,children:o(a.Provider,{value:d({slidesToShow:j?.slidesToShow,rows:n.GRID,index:c+1}),children:o("div",{..."edit"===v?I(i?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?u?.[c]?.gridRow:void 0,"--mbchild":u?.[c]?.marginBottom},children:s(h)?o(l,{}):r.map(h,o=>m(o)?e(o.type,{...o.props,key:o.key}):null)})})},i?.baseID)):null})};export{g as default};
@@ -1,36 +1,38 @@
1
- import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as i}from"../../../helpers.js";import{RenderIf as o,template as s}from"@gem-sdk/core";import{getClass as r}from"./common/classes.js";import{getStyle as e}from"./common/styles.js";import{getAttr as d}from"./common/attrs.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=e(a),{gridLayoutClass:f}=r(a),{productListAttr:g}=d(a),$=()=>s`
1
+ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"./common/imagePriority.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as r,template as e}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as m}from"./common/attrs.js";let n=n=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=n,{gridLayoutStyle:g}=a(n),{gridLayoutClass:$}=d(n),{productListAttr:h}=m(n),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>e`
2
2
  {%- assign count = 0 -%}
3
3
  {%- for product in products limit: limit -%}
4
4
  {%- if product.id != empty -%}
5
5
  {%- assign count = count | plus: 1 -%}
6
+ ${v.item}
6
7
  {%- assign variant = product.selected_or_first_available_variant -%}
7
- {%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
8
- ${t({...a})}
8
+ {%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
9
+ ${o({...n})}
9
10
  {%- endif -%}
10
11
  {% endfor %}
11
- {%- if count == 0 and ${m?.length} == 0 -%}
12
- {% if '${l}' == 'RelatedProduct' -%}
13
- <div>${i("ProductList","no_related_products")}</div>
12
+ ${v.reset}
13
+ {%- if count == 0 and ${u?.length} == 0 -%}
14
+ {% if '${f}' == 'RelatedProduct' -%}
15
+ <div>${s("ProductList","no_related_products")}</div>
14
16
  {% else %}
15
- <div>${i("ProductList","no_products_found")}</div>
17
+ <div>${s("ProductList","no_products_found")}</div>
16
18
  {%- endif -%}
17
19
  {%- endif -%}
18
- `;return s`
20
+ `;return e`
19
21
  <div
20
- ${g}
21
- style="${u}"
22
- class="${f}"
22
+ ${h}
23
+ style="${g}"
24
+ class="${$}"
23
25
  >
24
- ${o(n?.sameHeight,s`
26
+ ${r(p?.sameHeight,e`
25
27
  <gp-same-height
26
28
  class="gp-contents"
27
29
  style="visibility: hidden"
28
30
  >
29
- <script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
31
+ <script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
30
32
  </script>
31
- ${`${$()}`}
33
+ ${`${_()}`}
32
34
  </gp-same-height>
33
35
  `)}
34
- ${o(!n?.sameHeight,s`${$()}`)}
36
+ ${r(!p?.sameHeight,e`${_()}`)}
35
37
  </div>
36
- `};export{a as default};
38
+ `};export{n as default};
@@ -1 +1 @@
1
- import{getUpdatedDotStyle as t}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";let r=e=>{let{setting:r,styles:d}=e,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=t(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let p={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete p.backgroundColor,delete p.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:p}},d=t=>{let{setting:o,styles:r}=t,d=o?.productSetting,i=d?.relatedTag,a=d?.hasRelatedExclude,p=(i&&"collection"===i[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",u=p?.split(",").map(t=>t.trim()).toString(),n=d?.productSrc??"Collection",s=d?.collectionId?.replace(c,"")??"latest",g=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,m=r?.layout==="grid",h=e(o?.numberOfProducts,4),P="PickProduct"===n&&d?.productIds?.length?d?.productIds.map(t=>t.replace(l,"")):[],I="PickProduct"===n&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",C=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",k=S&&C?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",f=C?.[C.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:u,collectionID:s,isLatestProducts:g,isGrid:m,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:k,isReverse:f,productSrc:n,productSetting:d,isSorted:S,relatedTag:i,productNumber:"PickProduct"===n?g?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},c="gid://shopify/Collection/",l="gid://shopify/Product/";export{c as PREFIX_COLLECTION_ID,l as PREFIX_PRODUCT_ID,r as getData,d as getDataLiquid};
1
+ import{getUpdatedDotStyle as e}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as t}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";import{isQueryLoading as r}from"../../../../common/helpers.js";import"../../../../common/const.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";let d=t=>{let{setting:r,styles:d}=t,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=e(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let n={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete n.backgroundColor,delete n.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:n}},c=e=>{let{setting:o,styles:r}=e,d=o?.productSetting,c=d?.relatedTag,a=d?.hasRelatedExclude,n=(c&&"collection"===c[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",u=n?.split(",").map(e=>e.trim()).toString(),p=d?.productSrc??"Collection",s=d?.collectionId?.replace(l,"")??"latest",m=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,g=r?.layout==="grid",h=t(o?.numberOfProducts,4),P="PickProduct"===p&&d?.productIds?.length?d?.productIds.map(e=>e.replace(i,"")):[],I="PickProduct"===p&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",k=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",y=S&&k?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",C=k?.[k.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:u,collectionID:s,isLatestProducts:m,isGrid:g,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:y,isReverse:C,productSrc:p,productSetting:d,isSorted:S,relatedTag:c,productNumber:"PickProduct"===p?m?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},l="gid://shopify/Collection/",i="gid://shopify/Product/",a=["vendor","collection","tags"],n=({relatedTag:e})=>!!e?.[0]&&a.includes(e[0]),u=({isRelatedProduct:e,relatedType:t,hasRelatedTag:o,relatedProductIdAssigned:d,canRevalidateOnMount:c,mainProduct:l,mainProductId:i,relatedQuery:a,relatedQuerySource:n,isNotFoundRelatedProduct:u,relatedProducts:p})=>{if(!e)return!1;let s="recommended-product"!==t&&o&&!!d,m=s&&!!l.data&&n!==i&&!u;return c?r({hasQuery:s,...l})||m||r({hasQuery:!!a,...p}):l.isLoading||p.isLoading};export{l as PREFIX_COLLECTION_ID,i as PREFIX_PRODUCT_ID,d as getData,c as getDataLiquid,n as hasQueryableRelatedTag,u as isRelatedProductsLoading};
@@ -0,0 +1,17 @@
1
+ import{DEVICES as i,getResponsiveValueByScreen as e,LIST_IMAGE_LIQUID_VARS as t}from"@gem-sdk/core";import{getImageSizes as s}from"../../../../image/common/sizes.js";let a={desktop:4,tablet:2,mobile:2},r={GRID:2,CAROUSEL:1},m=t=>i.map(i=>{let s=Number(e(t,i));return Math.max(1,Math.floor(s||a[i]))}),n=i=>100/Math.min(...m(i)),g=({slidesToShow:i,rows:e})=>{let t=m(i);return{eagerLimit:Math.max(...t)*e,highLimit:Math.min(...t),sizes:`${Number(n(i).toFixed(2))}vw`}},o=({slidesToShow:i,rows:e,indexVar:a="count"})=>{let{eagerLimit:r,highLimit:m}=g({slidesToShow:i,rows:e}),o=s({slotVw:n(i)});return{item:`{%- liquid
2
+ if ${a} <= ${r}
3
+ assign ${t.LOADING} = 'eager'
4
+ else
5
+ assign ${t.LOADING} = 'lazy'
6
+ endif
7
+ if ${a} <= ${m}
8
+ assign ${t.FETCH_PRIORITY} = 'high'
9
+ else
10
+ assign ${t.FETCH_PRIORITY} = 'auto'
11
+ endif
12
+ assign ${t.SIZES} = '${o}'
13
+ -%}`,reset:`{%- liquid
14
+ assign ${t.LOADING} = nil
15
+ assign ${t.FETCH_PRIORITY} = nil
16
+ assign ${t.SIZES} = nil
17
+ -%}`}};export{r as LIST_PRELOAD_ROWS,g as getListImagePriority,o as getListImagePriorityLiquid};
@@ -0,0 +1 @@
1
+ import{getListImagePriority as t}from"./imagePriority.js";let e=({slidesToShow:e,rows:i,index:r})=>{let{eagerLimit:o,highLimit:a,sizes:g}=t({slidesToShow:e,rows:i});return{loading:r<=o?"eager":"lazy",fetchpriority:r<=a?"high":"auto",sizes:g}};export{e as getListImageHints};
@@ -1 +1 @@
1
- import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as r}from"../../../common/const.js";import{useRenderMode as i,useCurrentDevice as d,usePageType as l,usePageStore as s,flattenConnection as c,ProductListProvider as n,filterToolbarPreview as a,PICKED_PRODUCT_STATUSES as m}from"@gem-sdk/core";import{useState as u,useRef as g,useMemo as p,useEffect as h}from"react";import f from"../../../common/components/Loading.js";import P from"next/dynamic";import y from"./hooks/useRelatedProductIDAssigned.js";import k from"../SalePageProductListWarning.js";import{getPropertyByDevice as I}from"../../../dialog/common/helpers.js";import b from"./hooks/useProductRelatedQuery.js";import S from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as j}from"./constants/index.js";import{useCollectionQuery as C}from"./hooks/useCollectionQuery.js";import{useProductsQuery as v}from"./hooks/useProductsQuery.js";import L from"./ProductListGridLayout.js";import{getClass as w}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getStyle as G}from"./common/styles.js";import{If as T}from"@gem-sdk/system";import A from"next/head";let O=P(()=>import("../ProductNotFound.js"),{loading:f}),x=P=>{let{children:x,styles:D,builderProps:B,setting:E,builderAttrs:H}=P,{isRelatedProduct:z,productSetting:M}=N(P),{isEditMode:Q,isPreviewSharePageMode:R}=i(),W=d(),$=l(),_=s(o=>o.dynamicCollection),[F,V]=u(1),[q,U]=u(!0),J=g(),K="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"!=$||[r.Collection,r.DynamicCollection].includes(M?.productSrc)||(M.productSrc=r.DynamicCollection);let X=M?.productSrc??r.Collection;X===r.DynamicCollection&&(M.collectionId=_?.collectionId||"latest");let Y=Number.isNaN(Number(E?.numberOfProducts))?j:Number(E?.numberOfProducts),{relatedProductIdAssigned:Z}=y({productSetting:M}),{isNotFoundRelatedProduct:oo,relatedProducts:oe,isNoRelatedProductData:ot,relatedTagString:or,isLoading:oi}=b({productSetting:M,isRelatedProduct:z,relatedProductIdAssigned:Z,numberOfProducts:Y}),od=Q||R,ol=v({productIds:M?.productIds,defaultSelectedProductCount:M?.numOfSelectedProducts,productSrc:X,selectedStatus:od&&M?.productIds?.length?m:void 0}),os=C({productSrc:X,collectionID:M?.collectionId??"latest",numberOfProducts:Y,orderBy:E?.orderBy}),oc=oi||(X===r.PickProduct?ol.isLoading:os.isLoading),on=X===r.PickProduct?ol.error:os.error,oa=X===r.PickProduct?ol.isValidating:os.isValidating,om=os.data?.collections?.edges?.[0]?.node,ou=X===r.PickProduct?c(ol.data?.products):c(om?.products),og=s(o=>o.assignedProductIds),op=s(o=>o.isApplyAllProducts),oh=p(()=>(og??[]).length>0&&!op||op,[og,op]),of=oe?.data?.products&&oh?c(oe?.data?.products):[],oP=z?of:X===r.PickProduct&&M?.productIds?.length?M?.productIds?.map(o=>ou?.find(e=>e?.baseID===o)).filter(Boolean)??ou:X!==r.PickProduct?ou:ou.filter((o,e)=>e<(M?.numOfSelectedProducts??4)),oy=p(()=>oo&&z&&Q||!oP.length&&!oc&&q&&Q,[q,oc,oo,z,Q,oP.length]),ok=p(()=>!oP||oo&&z,[oo,z,oP]),oI=p(()=>{if(!E?.sameHeight)return[];let o=0,e=Math.ceil((oP?.length??0)/+(E?.slidesToShow?.[W]??1));return Array.from(Array(oP?.length??0)).map((t,r)=>(r>=+(E?.slidesToShow?.[W]??1)*(o+1)&&++o,{gridRow:`${1+F*o}/${F+1+F*o}`,marginBottom:o+1<e?I(D?.horizontalGutter,W):void 0}))},[E?.sameHeight,E?.slidesToShow,F,oP?.length,W,D?.horizontalGutter]),ob=p(()=>oa||oc||on||!oP||oo&&z,[on,oc,oo,z,oa,oP]);h(()=>{if(!ob)return J.current=setTimeout(()=>{let{builderData:o}=B??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},Q?0:500),()=>{clearTimeout(J.current)}},[B,ob,Q,oP]);let oS=p(()=>({collection:om,products:oP,settings:{loop:E?.loop??{desktop:!1},scrollMode:E?.scrollMode??{desktop:"snap"},slidesToShow:E?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:D?.layout,dot:E?.dot,dotStyle:E?.dotStyle,arrow:E?.arrow,controlOverContent:E?.controlOverContent,sameHeight:E?.sameHeight},styles:{horizontalGutter:D?.horizontalGutter,verticalGutter:D?.verticalGutter,fullWidth:D?.fullWidth,spacing:D?.spacing,width:D?.width,height:D?.height}}),[om,oP,E,D]);if(B?.isPreview&&K)return o(e,{});if(oy)return o(e,{children:T(q,o(O,{builderAttrs:H,collectionHandle:om?.handle,productSrc:X,onClose:()=>U(!1),children:x,relatedTagString:or,assignProductNoTags:ot,noAssignedProduct:!Z}))});let{productListWrapStyle:oj,productListContentStyle:oC,productListWrapAlignStyle:ov}=G(P),{productListWrapClass:oL}=w(P);return t("div",{...H,className:oL,style:oj,children:[!!D?.preloadBgImage&&t(A,{children:[!!D.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage.desktop.image.src,as:"image"}),!!D.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.tablet?.image?.src,as:"image"}),!!D.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.mobile?.image?.src,as:"image"})]}),oc||oa?o(f,{}):on?t("div",{children:["Error: ",on?.message]}):ok?o("div",{children:"Products not found"}):o(n,{...oS,children:o("div",{className:"gp-flex gp-w-full",style:ov,children:t("div",{style:oC,children:[K&&o(k,{}),o(e,{children:T(D?.layout==="grid",o(L,{...P,productSortedById:oP,generateGridRowArray:oI}),o(S,{...P,productSortedById:oP}))})]})})}),a(x,!0)]})};export{x as default};
1
+ import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{getElementLabel as r,isQueryLoading as i}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as l}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as s,usePageType as c,usePageStore as a,flattenConnection as n,ProductListProvider as m,filterToolbarPreview as u,PICKED_PRODUCT_STATUSES as g}from"@gem-sdk/core";import{useState as p,useRef as h,useMemo as f,useEffect as P}from"react";import y from"../../../common/components/Loading.js";import k from"next/dynamic";import b from"./hooks/useRelatedProductIDAssigned.js";import I from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import j from"./hooks/useProductRelatedQuery.js";import C from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as v}from"./constants/index.js";import{useCollectionQuery as L}from"./hooks/useCollectionQuery.js";import{useProductsQuery as w}from"./hooks/useProductsQuery.js";import N from"./ProductListGridLayout.js";import{getClass as G}from"./common/classes.js";import{getData as T}from"./common/helpers.js";import{getStyle as D}from"./common/styles.js";import{If as A}from"@gem-sdk/system";import O from"next/head";let x=k(()=>import("../ProductNotFound.js"),{loading:y}),B=k=>{let{children:B,styles:E,builderProps:H,setting:z,builderAttrs:Q}=k,{isRelatedProduct:M,productSetting:R}=T(k),{isEditMode:W,isPreviewSharePageMode:$}=d(),_=s(),F=c(),q=a(o=>o.dynamicCollection),[U,V]=p(1),[J,K]=p(!0),X=h(),Y="GP_FUNNEL_PAGE"===F;"GP_COLLECTION"!=F||[l.Collection,l.DynamicCollection].includes(R?.productSrc)||(R.productSrc=l.DynamicCollection);let Z=R?.productSrc??l.Collection;Z===l.DynamicCollection&&(R.collectionId=q?.collectionId||"latest");let oo=Number.isNaN(Number(z?.numberOfProducts))?v:Number(z?.numberOfProducts),{relatedProductIdAssigned:oe}=b({productSetting:R}),{isNotFoundRelatedProduct:ot,relatedProducts:or,isNoRelatedProductData:oi,relatedTagString:ol,isLoading:od}=j({productSetting:R,isRelatedProduct:M,relatedProductIdAssigned:oe,numberOfProducts:oo}),os=W||$,oc=w({productIds:R?.productIds,defaultSelectedProductCount:R?.numOfSelectedProducts,productSrc:Z,selectedStatus:os&&R?.productIds?.length?g:void 0}),oa=L({productSrc:Z,collectionID:R?.collectionId??"latest",numberOfProducts:oo,orderBy:z?.orderBy}),on=Z===l.PickProduct,om=on?oc:oa,ou=on?!!R?.productIds:Z===l.Collection||Z===l.DynamicCollection,og=od||i({hasQuery:ou,data:om.data,error:om.error,isLoading:om.isLoading}),op=om.error,oh=om.isValidating,of=oa.data?.collections?.edges?.[0]?.node,oP=Z===l.PickProduct?n(oc.data?.products):n(of?.products),oy=a(o=>o.assignedProductIds),ok=a(o=>o.isApplyAllProducts),ob=f(()=>(oy??[]).length>0&&!ok||ok,[oy,ok]),oI=or?.data?.products&&ob?n(or?.data?.products):[],oS=M?oI:Z===l.PickProduct&&R?.productIds?.length?R?.productIds?.map(o=>oP?.find(e=>e?.baseID===o)).filter(Boolean)??oP:Z!==l.PickProduct?oP:oP.filter((o,e)=>e<(R?.numOfSelectedProducts??4)),oj=f(()=>ot&&M&&W||!oS.length&&!og&&J&&W,[J,og,ot,M,W,oS.length]),oC=f(()=>!oS||ot&&M,[ot,M,oS]),ov=f(()=>{if(!z?.sameHeight)return[];let o=0,e=Math.ceil((oS?.length??0)/+(z?.slidesToShow?.[_]??1));return Array.from(Array(oS?.length??0)).map((t,r)=>(r>=+(z?.slidesToShow?.[_]??1)*(o+1)&&++o,{gridRow:`${1+U*o}/${U+1+U*o}`,marginBottom:o+1<e?S(E?.horizontalGutter,_):void 0}))},[z?.sameHeight,z?.slidesToShow,U,oS?.length,_,E?.horizontalGutter]),oL=f(()=>oh||og||op||!oS||ot&&M,[op,og,ot,M,oh,oS]);P(()=>{if(!oL)return X.current=setTimeout(()=>{let{builderData:o}=H??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},W?0:500),()=>{clearTimeout(X.current)}},[H,oL,W,oS]);let ow=f(()=>({collection:of,products:oS,settings:{loop:z?.loop??{desktop:!1},scrollMode:z?.scrollMode??{desktop:"snap"},slidesToShow:z?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:E?.layout,dot:z?.dot,dotStyle:z?.dotStyle,arrow:z?.arrow,controlOverContent:z?.controlOverContent,sameHeight:z?.sameHeight},styles:{horizontalGutter:E?.horizontalGutter,verticalGutter:E?.verticalGutter,fullWidth:E?.fullWidth,spacing:E?.spacing,width:E?.width,height:E?.height}}),[of,oS,z,E]);if(H?.isPreview&&Y)return o(e,{});if(oj)return o(e,{children:A(J,o(x,{builderAttrs:Q,collectionHandle:of?.handle,productSrc:Z,onClose:()=>K(!1),children:B,relatedTagString:ol,assignProductNoTags:oi,noAssignedProduct:!oe}))});let{productListWrapStyle:oN,productListContentStyle:oG,productListWrapAlignStyle:oT}=D(k),{productListWrapClass:oD}=G(k);return t("div",{...Q,className:oD,style:oN,children:[!!E?.preloadBgImage&&t(O,{children:[!!E.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage.desktop.image.src,as:"image"}),!!E.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.tablet?.image?.src,as:"image"}),!!E.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.mobile?.image?.src,as:"image"})]}),og||oh?o(y,{label:r({builderData:H?.builderData})}):op?t("div",{children:["Error: ",op?.message]}):oC?o("div",{children:"Products not found"}):o(m,{...ow,children:o("div",{className:"gp-flex gp-w-full",style:oT,children:t("div",{style:oG,children:[Y&&o(I,{}),o(e,{children:A(E?.layout==="grid",o(N,{...k,productSortedById:oS,generateGridRowArray:ov}),o(C,{...k,productSortedById:oS}))})]})})}),u(B,!0)]})};export{B as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import r from"../../../carousel-v3/components/item/CarouselItem.js";import s from"../../../carousel-v3/components/root/Carousel.js";import{useEditorMode as t,ProductProvider as e,isEmptyChildren as m}from"@gem-sdk/core";import i from"../../../grid/components/ChildrenDroppable.js";import{getClass as l}from"./common/classes.js";import{getData as a}from"./common/helpers.js";import{getStyle as c}from"./common/styles.js";import{getAttr as n}from"./common/attrs.js";let d=d=>{let{children:p,builderProps:u,productSortedById:f,advanced:j}=d,h=t(),{carouselConfigSetting:y,carouselConfigStyle:C}=a(d),{productListAttr:b,getAttrProductItemEditor:v}=n(d),{carouselItemStyle:g}=c(d),{carouselClass:D,productItemClass:I}=l(d);return o(s,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...b},rootClass:D,setting:y,styles:C,isProductList:!0,children:f?.map(s=>o(r,{style:g,children:o(e,{product:s,readOnly:!0,children:o("div",{..."edit"===h?v(s?.baseID):{},className:I,children:m(p)?o(i,{}):p})})},s?.baseID))})};export{d as default};
1
+ import{jsx as o}from"react/jsx-runtime";import r from"../../../carousel-v3/components/item/CarouselItem.js";import t from"../../../carousel-v3/components/root/Carousel.js";import{useEditorMode as s,ProductProvider as m,isEmptyChildren as e}from"@gem-sdk/core";import{getListImageHints as i}from"../product-list/common/imagePriorityHints.js";import l from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as c}from"../../../image/common/listImageContext.js";import{LIST_PRELOAD_ROWS as n}from"../product-list/common/imagePriority.js";import{getClass as a}from"./common/classes.js";import{getData as d}from"./common/helpers.js";import{getStyle as p}from"./common/styles.js";import{getAttr as u}from"./common/attrs.js";let f=f=>{let{children:j,builderProps:h,productSortedById:g,advanced:y,setting:C}=f,v=s(),{carouselConfigSetting:P,carouselConfigStyle:b}=d(f),{productListAttr:x,getAttrProductItemEditor:I}=u(f),{carouselItemStyle:L}=p(f),{carouselClass:w,productItemClass:D}=a(f);return o(t,{advanced:y,builderProps:{uid:h?.uid},rootAttrs:{...x},rootClass:w,setting:P,styles:b,isProductList:!0,children:g?.map((t,s)=>o(r,{style:L,children:o(m,{product:t,readOnly:!0,children:o(c.Provider,{value:i({slidesToShow:C?.slidesToShow,rows:n.CAROUSEL,index:s+1}),children:o("div",{..."edit"===v?I(t?.baseID):{},className:D,children:e(j)?o(l,{}):j})})})},t?.baseID))})};export{f as default};
@@ -1,22 +1,24 @@
1
- import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import r from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";import{getClass as i}from"./common/classes.js";import{getData as s}from"./common/helpers.js";import{getStyle as d}from"./common/styles.js";import{template as u}from"@gem-sdk/core";let c=c=>{let{builderProps:l,advanced:n,productSrc:p,productListId:a}=c,{carouselConfigSetting:m,carouselConfigStyle:f}=s(c),{carouselItemStyle:g}=d(c),{carouselClass:$}=i(c);return u`
2
- ${t({advanced:n,builderProps:{...l},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${l?.uid}`,rootClass:$,setting:m,styles:f,isProductList:!0,children:`
1
+ import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getListImagePriorityLiquid as r,LIST_PRELOAD_ROWS as i}from"../product-list/common/imagePriority.js";import e from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as c}from"@gem-sdk/core";let n=n=>{let{builderProps:m,advanced:p,productSrc:a,productListId:f}=n,{carouselConfigSetting:g,carouselConfigStyle:$}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:v}=d(n),P=r({slidesToShow:n.setting?.slidesToShow,rows:i.CAROUSEL});return c`
2
+ ${t({advanced:p,builderProps:{...m},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${m?.uid}`,rootClass:v,setting:g,styles:$,isProductList:!0,children:`
3
3
  {%- assign count = 0 -%}
4
4
  {%- for product in products limit: limit -%}
5
5
  {%- if product.id != empty -%}
6
6
  {%- assign count = count | plus: 1 -%}
7
+ ${P.item}
7
8
  {%- assign variant = product.selected_or_first_available_variant -%}
8
- {%- assign product_form_id = 'product-form-' | append: "${l?.uid}" | append: product.id -%}
9
- ${o({builderProps:{...l},style:g,parentId:`product-list-carousel-${l?.uid} gp-child-item-${l?.uid}`,parentStyle:f,parentSettings:m,background:m?.background,children:`
10
- ${r({...c})}
9
+ {%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
10
+ ${o({builderProps:{...m},style:_,parentId:`product-list-carousel-${m?.uid} gp-child-item-${m?.uid}`,parentStyle:$,parentSettings:g,background:g?.background,children:`
11
+ ${e({...n})}
11
12
  `})}
12
13
  {%- endif -%}
13
14
  {% endfor %}
14
- {%- if count == 0 and ${a.length} == 0 -%}
15
- {% if '${p}' == 'RelatedProduct' -%}
16
- <div>${e("ProductList","no_related_products")}</div>
15
+ ${P.reset}
16
+ {%- if count == 0 and ${f.length} == 0 -%}
17
+ {% if '${a}' == 'RelatedProduct' -%}
18
+ <div>${s("ProductList","no_related_products")}</div>
17
19
  {% else %}
18
- <div>${e("ProductList","no_products_found")}</div>
20
+ <div>${s("ProductList","no_products_found")}</div>
19
21
  {%- endif -%}
20
22
  {%- endif -%}
21
23
  `,carouselType:"product_list"})}
22
- `};export{c as default};
24
+ `};export{n as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Children as o,isValidElement as e,createElement as m}from"react";import{useEditorMode as t,ProductProvider as s,isEmptyChildren as i}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getClass as a}from"./common/classes.js";import{getStyle as d}from"./common/styles.js";import{getAttr as c}from"./common/attrs.js";let p=p=>{let{children:n,productSortedById:f,generateGridRowArray:h,setting:u}=p,y=t(),{gridLayoutStyle:g}=d(p),{gridLayoutClass:j,productItemClass:b}=a(p),{productListAttr:k,getAttrProductItemEditor:v}=c(p);return r("div",{...k,style:g,className:j,children:f?.length?f?.map((t,a)=>r(s,{product:t,readOnly:!0,children:r("div",{..."edit"===y?v(t?.baseID):{},className:b,style:{"--grchild":u?.sameHeight?h?.[a]?.gridRow:void 0,"--mbchild":h?.[a]?.marginBottom},children:i(n)?r(l,{}):o.map(n,r=>e(r)?m(r.type,{...r.props,key:r.key}):null)})},t?.baseID)):null})};export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{Children as r,isValidElement as m,createElement as t}from"react";import{useEditorMode as e,ProductProvider as i,isEmptyChildren as s}from"@gem-sdk/core";import{getListImageHints as l}from"../product-list/common/imagePriorityHints.js";import d from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as a}from"../../../image/common/listImageContext.js";import{LIST_PRELOAD_ROWS as c}from"../product-list/common/imagePriority.js";import{getClass as n}from"./common/classes.js";import{getStyle as p}from"./common/styles.js";import{getAttr as f}from"./common/attrs.js";let g=g=>{let{children:h,productSortedById:u,generateGridRowArray:y,setting:j}=g,v=e(),{gridLayoutStyle:b}=p(g),{gridLayoutClass:w,productItemClass:x}=n(g),{productListAttr:D,getAttrProductItemEditor:I}=f(g);return o("div",{...D,style:b,className:w,children:u?.length?u?.map((e,n)=>o(i,{product:e,readOnly:!0,children:o(a.Provider,{value:l({slidesToShow:j?.slidesToShow,rows:c.GRID,index:n+1}),children:o("div",{..."edit"===v?I(e?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?y?.[n]?.gridRow:void 0,"--mbchild":y?.[n]?.marginBottom},children:s(h)?o(d,{}):r.map(h,o=>m(o)?t(o.type,{...o.props,key:o.key}):null)})})},e?.baseID)):null})};export{g as default};