@gem-sdk/components 2.0.0-dev.877 → 2.0.0-dev.878

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 (187) hide show
  1. package/dist/cjs/accordion/components/Accordion.js +1 -1
  2. package/dist/cjs/accordion/components/AccordionItem.js +3 -3
  3. package/dist/cjs/accordion/hooks/useMountTransition.js +1 -1
  4. package/dist/cjs/article/components/ArticleAuthor.js +1 -1
  5. package/dist/cjs/article/components/ArticleCategory.js +1 -1
  6. package/dist/cjs/article/components/ArticleDate.js +1 -1
  7. package/dist/cjs/article/components/ArticleExcerpt.js +1 -1
  8. package/dist/cjs/article/components/ArticleImage.js +1 -1
  9. package/dist/cjs/article/components/ArticleList.js +1 -1
  10. package/dist/cjs/article/components/ArticleTag.js +1 -1
  11. package/dist/cjs/banner/components/hero-banner/index.js +1 -1
  12. package/dist/cjs/builder.js +1 -1
  13. package/dist/cjs/carousel/components/Carousel.js +1 -1
  14. package/dist/cjs/carousel/components/CarouselItem.js +1 -1
  15. package/dist/cjs/carousel/components/Dots.js +1 -1
  16. package/dist/cjs/carousel/components/hooks/useTrackPreviewPause.js +1 -1
  17. package/dist/cjs/cart/components/Cart.js +1 -1
  18. package/dist/cjs/cart/components/CartLinePrice.js +1 -1
  19. package/dist/cjs/cart/components/CartOrderNote.js +1 -1
  20. package/dist/cjs/cart/components/CartTotalPrice.js +1 -1
  21. package/dist/cjs/cart/components/CheckoutNow.js +1 -1
  22. package/dist/cjs/cart/components/ShopPayButton/index.js +1 -1
  23. package/dist/cjs/code/components/CSSCode.js +1 -1
  24. package/dist/cjs/countdown-timer/hooks/useTimeLeft.js +1 -1
  25. package/dist/cjs/dialog/components/Dialog.js +1 -1
  26. package/dist/cjs/dialog/hooks/use-scroll-percentage.js +1 -1
  27. package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +1 -1
  28. package/dist/cjs/form/components/form-dropdown/FormDropdown.js +1 -1
  29. package/dist/cjs/form/components/textarea/TextArea.js +1 -1
  30. package/dist/cjs/grid/components/ChildrenDroppable.js +4 -4
  31. package/dist/cjs/grid/components/Col.js +1 -1
  32. package/dist/cjs/grid/components/Row.js +1 -1
  33. package/dist/cjs/grid/components/Section.js +1 -1
  34. package/dist/cjs/header/components/Header.js +1 -1
  35. package/dist/cjs/header/components/kind/basic/MenuMobileItem.js +1 -1
  36. package/dist/cjs/header/components/kind/basic/MobileMenu.js +1 -1
  37. package/dist/cjs/header/hooks/use-body-overlay.js +1 -1
  38. package/dist/cjs/heading/Heading.js +1 -1
  39. package/dist/cjs/hooks/useGetProductId.js +1 -1
  40. package/dist/cjs/icon/components/Icon.js +1 -1
  41. package/dist/cjs/icon-list/components/IconList.js +1 -1
  42. package/dist/cjs/icon-list/components/IconListItem.js +1 -1
  43. package/dist/cjs/icon-list-hoz/components/IconListHoz.js +1 -1
  44. package/dist/cjs/icon-list-hoz/components/IconListHozItem.js +1 -1
  45. package/dist/cjs/icon-list-v2/components/IconList.js +1 -1
  46. package/dist/cjs/ignoreHashClasses.js +4 -1
  47. package/dist/cjs/image/components/BackgroundImage.js +1 -1
  48. package/dist/cjs/image/components/Image.js +1 -1
  49. package/dist/cjs/image-comparison/components/CompareImage.js +5 -5
  50. package/dist/cjs/image-comparison/components/ImageComparison.js +1 -1
  51. package/dist/cjs/image-detection/ImageDetection.js +1 -1
  52. package/dist/cjs/index.js +1 -1
  53. package/dist/cjs/index.liquid.js +1 -1
  54. package/dist/cjs/input/Input.js +1 -1
  55. package/dist/cjs/intersection-observer/InView.js +1 -1
  56. package/dist/cjs/intersection-observer/useInView.js +1 -1
  57. package/dist/cjs/link/components/Link.js +1 -1
  58. package/dist/cjs/link/components/next-link/index.js +1 -1
  59. package/dist/cjs/marquee/components/Marquee.js +1 -0
  60. package/dist/cjs/marquee/components/Marquee.liquid.js +28 -0
  61. package/dist/cjs/marquee/components/MarqueeItem.js +1 -0
  62. package/dist/cjs/marquee/components/MarqueeItem.liquid.js +6 -0
  63. package/dist/cjs/marquee/hooks/useMarqueeScrollToItem.js +1 -0
  64. package/dist/cjs/marquee/hooks/useMarqueeStyles.js +1 -0
  65. package/dist/cjs/marquee/next.js +1 -0
  66. package/dist/cjs/marquee/setting/Marquee.js +27 -0
  67. package/dist/cjs/marquee/setting/MarqueeItem.js +1 -0
  68. package/dist/cjs/marquee/setting/childTemplate.js +1 -0
  69. package/dist/cjs/marquee/setting/index.js +1 -0
  70. package/dist/cjs/modal/components/Modal.js +1 -1
  71. package/dist/cjs/modal/components/confirm.js +1 -1
  72. package/dist/cjs/modal/hooks/useModalContainer.js +1 -1
  73. package/dist/cjs/next.js +1 -1
  74. package/dist/cjs/notification/components/Notice.js +1 -1
  75. package/dist/cjs/notification/components/Notifications.js +1 -1
  76. package/dist/cjs/notification/hooks/use-notification.js +1 -1
  77. package/dist/cjs/pagination/Pagination.js +1 -1
  78. package/dist/cjs/post-purchase/advanced-list/components/AdvancedListPostPurchase.js +1 -1
  79. package/dist/cjs/post-purchase/button/Button.js +1 -1
  80. package/dist/cjs/post-purchase/callout-banner/components/CalloutText.js +1 -1
  81. package/dist/cjs/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +1 -1
  82. package/dist/cjs/post-purchase/countdown-timer/components/TextCountdown.js +1 -1
  83. package/dist/cjs/post-purchase/countdown-timer/hooks/useCountdownTimer.js +1 -1
  84. package/dist/cjs/post-purchase/product/components/AcceptButton.js +1 -1
  85. package/dist/cjs/post-purchase/product/components/ProductOffer.js +1 -1
  86. package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
  87. package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +1 -1
  88. package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
  89. package/dist/cjs/post-purchase/product/components/ProductVariant.js +1 -1
  90. package/dist/cjs/post-purchase/product/components/product-image/Arrow.js +1 -1
  91. package/dist/cjs/post-purchase/product/components/product-image/CarouselPostPurchase.js +1 -1
  92. package/dist/cjs/post-purchase/product/components/product-image/FeatureImage.js +1 -1
  93. package/dist/cjs/post-purchase/product/components/product-image/ImageListCarousel.js +1 -1
  94. package/dist/cjs/post-purchase/product/components/product-image/ImageListGrid.js +1 -1
  95. package/dist/cjs/post-purchase/product/components/product-image/index.js +1 -1
  96. package/dist/cjs/post-purchase/product/components/product-image/layouts/FeatureImageWithGalleryImage.js +1 -1
  97. package/dist/cjs/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
  98. package/dist/cjs/post-purchase/product/components/variants/Dropdown.js +1 -1
  99. package/dist/cjs/post-purchase/product/components/variants/RectangleList.js +1 -1
  100. package/dist/cjs/post-purchase/product/components/variants/VariantGroup.js +1 -1
  101. package/dist/cjs/post-purchase/product/components/variants/VariantItem.js +1 -1
  102. package/dist/cjs/post-purchase/text/Text.js +1 -1
  103. package/dist/cjs/product/components/Product.js +1 -1
  104. package/dist/cjs/product/components/ProductBundleDiscount.js +1 -1
  105. package/dist/cjs/product/components/ProductButton.js +1 -1
  106. package/dist/cjs/product/components/ProductDescription.js +1 -1
  107. package/dist/cjs/product/components/ProductImages/ProductFeaturedImage.js +1 -1
  108. package/dist/cjs/product/components/ProductImages/ProductGalleryCarousel.js +1 -1
  109. package/dist/cjs/product/components/ProductImages/ProductGalleryGrid.js +1 -1
  110. package/dist/cjs/product/components/ProductImages/ProductImagesLightBox.js +1 -1
  111. package/dist/cjs/product/components/ProductImages.js +1 -1
  112. package/dist/cjs/product/components/ProductImagesV2/jsx/ProductImages.js +4 -4
  113. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +1 -1
  114. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductGalleryCarousel.js +1 -1
  115. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductGalleryGrid.js +1 -1
  116. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductImagesLightBox.js +1 -1
  117. package/dist/cjs/product/components/ProductImagesV2/jsx/layouts/FeatureImageWithGallery.js +1 -1
  118. package/dist/cjs/product/components/ProductList.js +1 -1
  119. package/dist/cjs/product/components/ProductNotFound.js +1 -1
  120. package/dist/cjs/product/components/ProductPrice.js +1 -1
  121. package/dist/cjs/product/components/ProductProperties/ProductPropertyInput.js +1 -1
  122. package/dist/cjs/product/components/ProductProperties.js +1 -1
  123. package/dist/cjs/product/components/ProductQuantity.js +1 -1
  124. package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +1 -1
  125. package/dist/cjs/product/components/ProductTag.js +1 -1
  126. package/dist/cjs/product/components/ProductVariants/common.js +1 -1
  127. package/dist/cjs/product/components/ProductVariants/index.js +1 -1
  128. package/dist/cjs/product/components/ProductVariants/variants/Base.js +3 -3
  129. package/dist/cjs/product/components/ProductVariants/variants/Color.js +1 -1
  130. package/dist/cjs/product/components/ProductVariants/variants/Dropdown.js +1 -1
  131. package/dist/cjs/product/components/ProductVariants/variants/Image.js +1 -1
  132. package/dist/cjs/product/components/ProductVariants/variants/ImageShopify.js +1 -1
  133. package/dist/cjs/product/components/ProductVariants/variants/RadioButtons.js +1 -1
  134. package/dist/cjs/product/components/ProductVariants/variants/RectangleList.js +1 -1
  135. package/dist/cjs/product/components/ProductVariants/variants/VariantGroup.js +1 -1
  136. package/dist/cjs/product/components/ProductVariants/variants/index.js +1 -1
  137. package/dist/cjs/stock-counter/components/StockCounter.js +1 -1
  138. package/dist/cjs/tab/components/Tabs.js +1 -1
  139. package/dist/cjs/text/components/Text.js +1 -1
  140. package/dist/cjs/third-party/components/AliReviews/AliReviewsSampleContent.js +1 -1
  141. package/dist/cjs/third-party/components/BoldSubscriptions/BoldSubscriptionsSampleContent.js +1 -1
  142. package/dist/cjs/third-party/components/FeraReviews/FeraReviewsSampleContent.js +1 -1
  143. package/dist/cjs/third-party/components/Growave/GrowaveSampleContent.js +1 -1
  144. package/dist/cjs/third-party/components/Judgeme/JudgemeSampleContent.js +1 -1
  145. package/dist/cjs/third-party/components/KachingBundles/KachingBundlesSampleContent.js +1 -1
  146. package/dist/cjs/third-party/components/LaiProductReviews/LaiProductReviewsSampleContent.js +1 -1
  147. package/dist/cjs/third-party/components/LooxReviews/LooxReviewsSampleContent.js +1 -1
  148. package/dist/cjs/third-party/components/Omnisend/OmnisendSampleContent.js +1 -1
  149. package/dist/cjs/third-party/components/Opinew/OpinewSampleContent.js +1 -1
  150. package/dist/cjs/third-party/components/PickyStory/PickyStorySampleContent.js +1 -1
  151. package/dist/cjs/third-party/components/ProductReviews/ProductReviewsSampleContent.js +1 -1
  152. package/dist/cjs/third-party/components/Rivyo/RivyoSampleContent.js +1 -1
  153. package/dist/cjs/third-party/components/Ryviu/RyviuSampleContent.js +1 -1
  154. package/dist/cjs/third-party/components/Stamped/StampedSampleContent.js +1 -1
  155. package/dist/cjs/third-party/components/Trustoo/TrustooSampleContent.js +1 -1
  156. package/dist/cjs/third-party/components/UltimateSalesBoost/UltimateSalesBoostSampleContent.js +1 -1
  157. package/dist/cjs/third-party/components/Vitals/VitalsSampleContent.js +1 -1
  158. package/dist/cjs/third-party/components/Wiser/WiserSampleContent.js +1 -1
  159. package/dist/cjs/third-party/components/YotpoReviews/YotpoReviewsSampleContent.js +1 -1
  160. package/dist/cjs/third-party-instant/components/InstantJudgemeReviews.js +1 -1
  161. package/dist/cjs/third-party-instant/components/Judgeme/SingleProduct.js +1 -1
  162. package/dist/cjs/third-party-instant/components/Judgeme/WithoutProduct.js +1 -1
  163. package/dist/cjs/third-party-instant/components/LooxReviews/SingleProduct.js +1 -1
  164. package/dist/cjs/third-party-instant/components/LooxReviews/WithoutProduct.js +1 -1
  165. package/dist/cjs/video/components/HTML5Embed.js +1 -1
  166. package/dist/cjs/video/components/LiteVimeoEmbed.js +1 -1
  167. package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
  168. package/dist/cjs/video/components/Video.js +1 -1
  169. package/dist/esm/builder.js +1 -1
  170. package/dist/esm/grid/components/Row.js +1 -1
  171. package/dist/esm/ignoreHashClasses.js +4 -1
  172. package/dist/esm/index.js +1 -1
  173. package/dist/esm/index.liquid.js +1 -1
  174. package/dist/esm/marquee/components/Marquee.js +1 -0
  175. package/dist/esm/marquee/components/Marquee.liquid.js +28 -0
  176. package/dist/esm/marquee/components/MarqueeItem.js +1 -0
  177. package/dist/esm/marquee/components/MarqueeItem.liquid.js +6 -0
  178. package/dist/esm/marquee/hooks/useMarqueeScrollToItem.js +1 -0
  179. package/dist/esm/marquee/hooks/useMarqueeStyles.js +1 -0
  180. package/dist/esm/marquee/next.js +1 -0
  181. package/dist/esm/marquee/setting/Marquee.js +27 -0
  182. package/dist/esm/marquee/setting/MarqueeItem.js +1 -0
  183. package/dist/esm/marquee/setting/childTemplate.js +1 -0
  184. package/dist/esm/marquee/setting/index.js +1 -0
  185. package/dist/esm/next.js +1 -1
  186. package/dist/types/index.d.ts +160 -52
  187. package/package.json +5 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),Image=require("../../../image/components/Image.js"),helper=require("../../../utils/helper.js"),core=require("@gem-sdk/core");const ImageListGrid=({styles:e,setting:r,productImages:t})=>{let s={...e,...r},{ilObjectFit:a,ilAspectRatio:c,layoutType:o,ilNumberPerRow:i,ilSpacing:l}=s,u=react.useMemo(()=>helper.postPurchaseSpacing[l||"none"],[l]),d=react.useMemo(()=>{let e=5;switch(o){case"bottom-center":e=i||5;break;case"two-col":e=2;break;case"one-col":e=1;break;default:e=5}return e},[i,o]),n=core.useProductStore(e=>e.setProductFeaturedImage),m=core.useFeaturedImageGlobal();return jsxRuntime.jsx("div",{className:"gp-grid gp-h-fit gp-w-full gp-flex-wrap",style:{...core.makeStyle({gg:u}),...core.makeStyle({gtc:`repeat(${d}, 1fr)`})},children:t?.map(e=>{let r={src:e.src,alt:""};return jsxRuntime.jsx("div",{"aria-hidden":"true",className:`gp-w-full gp-border gp-border-transparent ${m?.id===e?.id&&s?.ilBorder!=="none"?"!gp-border-[#d9d9d9]":""}`,onClick:()=>{n(e)},children:jsxRuntime.jsx(Image.default,{setting:{srcSet:{desktop:r,mobile:r,tablet:r}},styles:{aspectRatio:c,objectFit:a,enableBorder:"none"}},e?.src)},e?.src)})})};exports.default=ImageListGrid;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),Image=require("../../../image/components/Image.js"),helper=require("../../../utils/helper.js"),core=require("@gem-sdk/core");const ImageListGrid=({styles:e,setting:r,productImages:t})=>{let s={...e,...r},{ilObjectFit:a,ilAspectRatio:c,layoutType:o,ilNumberPerRow:i,ilSpacing:l}=s,u=React.useMemo(()=>helper.postPurchaseSpacing[l||"none"],[l]),d=React.useMemo(()=>{let e=5;switch(o){case"bottom-center":e=i||5;break;case"two-col":e=2;break;case"one-col":e=1;break;default:e=5}return e},[i,o]),n=core.useProductStore(e=>e.setProductFeaturedImage),m=core.useFeaturedImageGlobal();return jsxRuntime.jsx("div",{className:"gp-grid gp-h-fit gp-w-full gp-flex-wrap",style:{...core.makeStyle({gg:u}),...core.makeStyle({gtc:`repeat(${d}, 1fr)`})},children:t?.map(e=>{let r={src:e.src,alt:""};return jsxRuntime.jsx("div",{"aria-hidden":"true",className:`gp-w-full gp-border gp-border-transparent ${m?.id===e?.id&&s?.ilBorder!=="none"?"!gp-border-[#d9d9d9]":""}`,onClick:()=>{n(e)},children:jsxRuntime.jsx(Image.default,{setting:{srcSet:{desktop:r,mobile:r,tablet:r}},styles:{aspectRatio:c,objectFit:a,enableBorder:"none"}},e?.src)},e?.src)})})};exports.default=ImageListGrid;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),core=require("@gem-sdk/core"),FeatureImageWithGalleryImage=require("./layouts/FeatureImageWithGalleryImage.js"),index=require("../../helpers/index.js"),FeatureImage=require("./FeatureImage.js"),OnlyGalleryImage=require("./layouts/OnlyGalleryImage.js");const PostPurchaseProductImages=e=>{let{setting:s,styles:t,builderProps:r,builderAttrs:a,style:l,children:u,advanced:i}=e,c={...s,...t},{layoutType:g}=c,n=i?.cssClass,o=core.useProduct(),m=e=>e?.medias?.edges.filter(e=>!["VIDEO","EXTERNAL_VIDEO","MODEL_3D"].includes(e.node?.contentType||"")).map(e=>e?.node),d=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),I=react.useMemo(()=>{let e=m(o)?.map(e=>(e&&(e.src=d(e.contentType)?e?.previewImage:e.src),e));return e?.length?e:[{id:o?.featuredImage?.id||"noImageError",src:o?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:o?.featuredImage?.width||480,height:o?.featuredImage?.height||480}]},[o]),y=react.useMemo(()=>"bottom-center"===g||"left"===g||"right"===g,[g]),f=react.useMemo(()=>"only-feature"===g,[g]),h=react.useMemo(()=>"one-col"===g||"two-col"===g,[g]);return jsxRuntime.jsxs("div",{...a,className:core.cls("gp-flex",r?.uid,n,index.getPostPurchaseAlignClasses(c?.align)),style:{...l},children:[jsxRuntime.jsxs("div",{className:core.cls("gp-flex",index.getPostPurchaseAlignClasses(c?.align)),children:[y&&jsxRuntime.jsx(FeatureImageWithGalleryImage.default,{gallery:I,builderProps:r,setting:s,styles:t}),f&&jsxRuntime.jsx(FeatureImage.default,{styles:t,setting:s}),h&&jsxRuntime.jsx(OnlyGalleryImage.default,{gallery:I,builderProps:r,setting:s,styles:t})]}),u]})};exports.default=PostPurchaseProductImages;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),FeatureImageWithGalleryImage=require("./layouts/FeatureImageWithGalleryImage.js"),index=require("../../helpers/index.js"),FeatureImage=require("./FeatureImage.js"),OnlyGalleryImage=require("./layouts/OnlyGalleryImage.js");const PostPurchaseProductImages=e=>{let{setting:s,styles:t,builderProps:r,builderAttrs:a,style:l,children:u,advanced:i}=e,c={...s,...t},{layoutType:g}=c,n=i?.cssClass,o=core.useProduct(),m=e=>e?.medias?.edges.filter(e=>!["VIDEO","EXTERNAL_VIDEO","MODEL_3D"].includes(e.node?.contentType||"")).map(e=>e?.node),d=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),I=React.useMemo(()=>{let e=m(o)?.map(e=>(e&&(e.src=d(e.contentType)?e?.previewImage:e.src),e));return e?.length?e:[{id:o?.featuredImage?.id||"noImageError",src:o?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:o?.featuredImage?.width||480,height:o?.featuredImage?.height||480}]},[o]),y=React.useMemo(()=>"bottom-center"===g||"left"===g||"right"===g,[g]),f=React.useMemo(()=>"only-feature"===g,[g]),h=React.useMemo(()=>"one-col"===g||"two-col"===g,[g]);return jsxRuntime.jsxs("div",{...a,className:core.cls("gp-flex",r?.uid,n,index.getPostPurchaseAlignClasses(c?.align)),style:{...l},children:[jsxRuntime.jsxs("div",{className:core.cls("gp-flex",index.getPostPurchaseAlignClasses(c?.align)),children:[y&&jsxRuntime.jsx(FeatureImageWithGalleryImage.default,{gallery:I,builderProps:r,setting:s,styles:t}),f&&jsxRuntime.jsx(FeatureImage.default,{styles:t,setting:s}),h&&jsxRuntime.jsx(OnlyGalleryImage.default,{gallery:I,builderProps:r,setting:s,styles:t})]}),u]})};exports.default=PostPurchaseProductImages;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),core=require("@gem-sdk/core"),helper=require("../../../../utils/helper.js"),FeatureImage=require("../FeatureImage.js"),OnlyGalleryImage=require("./OnlyGalleryImage.js");const FeatureImageWithGalleryImage=e=>{let{setting:t,styles:r,builderProps:a,gallery:l}=e,i={...t,...r},{layoutType:s}=i,u=react.useMemo(()=>l.length>1,[l.length]),g=react.useMemo(()=>{let e={"--gtc":"minmax(0, 12fr)"};if(u){let t="left"===s?i.ratioLayoutLeft:i.ratioLayoutRight,r=["left","right"].includes(s||"");r&&t&&Object.assign(e={...e,"--gtc":`minmax(0, ${t[0]}fr) minmax(0, ${t[1]}fr)`},{"--gtr":"fit-content(0)"})}return e},[u,s,i.ratioLayoutLeft,i.ratioLayoutRight]),c=react.useMemo(()=>"bottom-center"===s?helper.postPurchaseSpacing[i?.spacingVertical||"none"]:i?.spacingHoz,[s,i?.spacingHoz,i?.spacingVertical]);return jsxRuntime.jsxs("div",{className:core.cls("gp-grid gp-w-full"),style:{...g,...core.makeStyle({gg:c})},children:[jsxRuntime.jsx("div",{className:core.cls(`gp-flex gp-justify-center gp-h-fit gp-w-full gp-product-images-feature-${a?.uid}`),style:{"--o":"left"===s?"1":"0","--jc":r?.align==="left"?"flex-start":r?.align==="right"?"flex-end":"center"},children:jsxRuntime.jsx(FeatureImage.default,{...e})}),u&&jsxRuntime.jsx(OnlyGalleryImage.default,{...e})]})};exports.default=FeatureImageWithGalleryImage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),helper=require("../../../../utils/helper.js"),FeatureImage=require("../FeatureImage.js"),OnlyGalleryImage=require("./OnlyGalleryImage.js");const FeatureImageWithGalleryImage=e=>{let{setting:t,styles:r,builderProps:a,gallery:l}=e,i={...t,...r},{layoutType:s}=i,u=React.useMemo(()=>l.length>1,[l.length]),g=React.useMemo(()=>{let e={"--gtc":"minmax(0, 12fr)"};if(u){let t="left"===s?i.ratioLayoutLeft:i.ratioLayoutRight,r=["left","right"].includes(s||"");r&&t&&Object.assign(e={...e,"--gtc":`minmax(0, ${t[0]}fr) minmax(0, ${t[1]}fr)`},{"--gtr":"fit-content(0)"})}return e},[u,s,i.ratioLayoutLeft,i.ratioLayoutRight]),c=React.useMemo(()=>"bottom-center"===s?helper.postPurchaseSpacing[i?.spacingVertical||"none"]:i?.spacingHoz,[s,i?.spacingHoz,i?.spacingVertical]);return jsxRuntime.jsxs("div",{className:core.cls("gp-grid gp-w-full"),style:{...g,...core.makeStyle({gg:c})},children:[jsxRuntime.jsx("div",{className:core.cls(`gp-flex gp-justify-center gp-h-fit gp-w-full gp-product-images-feature-${a?.uid}`),style:{"--o":"left"===s?"1":"0","--jc":r?.align==="left"?"flex-start":r?.align==="right"?"flex-end":"center"},children:jsxRuntime.jsx(FeatureImage.default,{...e})}),u&&jsxRuntime.jsx(OnlyGalleryImage.default,{...e})]})};exports.default=FeatureImageWithGalleryImage;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),ImageListGrid=require("../ImageListGrid.js"),ImageListCarousel=require("../ImageListCarousel.js"),core=require("@gem-sdk/core");const OnlyGalleryImage=e=>{let{setting:r,styles:s,gallery:t,builderProps:a}=e,i={...r,...s},{layoutType:l}=i,u=react.useMemo(()=>"two-col"!==l&&("left"===l||"right"===l||"slider"===i.displayType),[l,i.displayType]);return jsxRuntime.jsx("div",{className:core.cls(`gp-product-images-gallery-${a?.uid} gp-flex gp-h-fit gp-max-w-full`,(i?.ilNavigation,"")),children:u?jsxRuntime.jsx(ImageListCarousel.default,{...e,productImages:t}):jsxRuntime.jsx(ImageListGrid.default,{...e,productImages:t})})};exports.default=OnlyGalleryImage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),ImageListGrid=require("../ImageListGrid.js"),ImageListCarousel=require("../ImageListCarousel.js"),core=require("@gem-sdk/core");const OnlyGalleryImage=e=>{let{setting:r,styles:s,gallery:t,builderProps:a}=e,i={...r,...s},{layoutType:l}=i,u=React.useMemo(()=>"two-col"!==l&&("left"===l||"right"===l||"slider"===i.displayType),[l,i.displayType]);return jsxRuntime.jsx("div",{className:core.cls(`gp-product-images-gallery-${a?.uid} gp-flex gp-h-fit gp-max-w-full`,(i?.ilNavigation,"")),children:u?jsxRuntime.jsx(ImageListCarousel.default,{...e,productImages:t}):jsxRuntime.jsx(ImageListGrid.default,{...e,productImages:t})})};exports.default=OnlyGalleryImage;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),DropdownOption=require("./DropdownOption.js"),react=require("react"),VariantOption=require("./VariantOption.js");const DropdownVariant=({option:e,optionPosition:t,optionNumber:n,variantGroup:p,variants:i,price:a,blankText:s,combineWidth:r,combineFullWidth:o,label:l,initValue:d,hasPreSelected:u,soldOutStyle:g,soldOutMark:c,preset:x})=>{let{setSelectedOption:m,forceSelectedOption:j,selectedOptions:h}=core.useSelectedOption(),v=core.useProduct(),w=react.useMemo(()=>"Disable"===g&&c,[g,c]),f=e=>{let t=i?.find(t=>t?.id===e);if(t&&t.selectedOptions){let e=core.parseSelectedOption(t.selectedOptions);e&&j(e,v?.id)}},[b,R]=react.useState(u?d:"blank");react.useEffect(()=>{R(h?.[e?.name??"blank"])},[h,e]),react.useEffect(()=>{u||R("blank")},[u]);let y=e=>!!e&&(e?.inventoryQuantity&&e.inventoryQuantity>0||!e?.manageInventory||"continue"===e.inventoryPolicy),O=react.useMemo(()=>p?core.makeStyleResponsive("w",core.makeWidth(r,o)):core.makeStyleResponsive("w",core.makeWidth(x?.width,x?.fullWidth)),[x?.width,x?.fullWidth,p,r,o]);return jsxRuntime.jsx("div",{className:"gp-grid gp-w-full gp-gap-y-[9px] gp-leading-[1.3]",style:{...O},children:jsxRuntime.jsxs("div",{className:"gp-relative",children:[jsxRuntime.jsx("label",{className:"!gp-max-w-[calc(100%_-_66px)] gp-absolute gp-left-[12px] gp-top-[6px] gp-p-0 gp-text-xs gp-leading-[1.3] gp-text-[#737373] gp-transition-[top]",children:jsxRuntime.jsx("span",{className:"gp-max-w-full",children:jsxRuntime.jsx("span",{className:"gp-block gp-overflow-hidden",children:l})})}),jsxRuntime.jsx("select",{autoComplete:"off",name:e?.name||"Select Option",className:"gp-min-h-[47px] gp-w-full gp-whitespace-nowrap gp-rounded-[5px] gp-border gp-border-[#d9d9d9] gp-pb-[6px] gp-pl-[11px] gp-pr-[40px] gp-pt-[21px] gp-text-[14px] gp-outline-none gp-text-[#545454]",value:b??d,onChange:t=>{p?f(t.target?.value):m(e?.name,t.target?.value,v?.id)},children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!u&&jsxRuntime.jsx("option",{value:"blank",children:s??"Please select an option"}),e?.values?.map(p=>jsxRuntime.jsx(DropdownOption.default,{value:p,optionName:e.name,optionPosition:t,optionNumber:n,isSoldOutMark:w},p?.id)),p&&i?.map(e=>jsxRuntime.jsx(VariantOption.default,{disabled:!y(e)&&w,value:e?.id,variant:e,includePrice:a},e?.id))]})}),jsxRuntime.jsx("div",{className:"gp-pointer-events-none gp-absolute gp-right-[2px] gp-top-[50%] gp-flex gp-h-[43%] gp-w-[40px] gp-translate-y-[-50%] gp-items-center gp-justify-center gp-border-l-[1px] gp-bg-white gp-border-[#545454]",children:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false","aria-hidden":"true",role:"presentation",className:"gp-h-[10px] gp-w-[10px]",children:jsxRuntime.jsx("path",{d:"M0 5h20L10 15"})})})]})})};exports.default=DropdownVariant;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),DropdownOption=require("./DropdownOption.js"),React=require("react"),VariantOption=require("./VariantOption.js");const DropdownVariant=({option:e,optionPosition:t,optionNumber:n,variantGroup:p,variants:i,price:a,blankText:s,combineWidth:r,combineFullWidth:o,label:l,initValue:d,hasPreSelected:u,soldOutStyle:g,soldOutMark:c,preset:x})=>{let{setSelectedOption:m,forceSelectedOption:j,selectedOptions:h}=core.useSelectedOption(),v=core.useProduct(),w=React.useMemo(()=>"Disable"===g&&c,[g,c]),f=e=>{let t=i?.find(t=>t?.id===e);if(t&&t.selectedOptions){let e=core.parseSelectedOption(t.selectedOptions);e&&j(e,v?.id)}},[R,b]=React.useState(u?d:"blank");React.useEffect(()=>{b(h?.[e?.name??"blank"])},[h,e]),React.useEffect(()=>{u||b("blank")},[u]);let y=e=>!!e&&(e?.inventoryQuantity&&e.inventoryQuantity>0||!e?.manageInventory||"continue"===e.inventoryPolicy),O=React.useMemo(()=>p?core.makeStyleResponsive("w",core.makeWidth(r,o)):core.makeStyleResponsive("w",core.makeWidth(x?.width,x?.fullWidth)),[x?.width,x?.fullWidth,p,r,o]);return jsxRuntime.jsx("div",{className:"gp-grid gp-w-full gp-gap-y-[9px] gp-leading-[1.3]",style:{...O},children:jsxRuntime.jsxs("div",{className:"gp-relative",children:[jsxRuntime.jsx("label",{className:"!gp-max-w-[calc(100%_-_66px)] gp-absolute gp-left-[12px] gp-top-[6px] gp-p-0 gp-text-xs gp-leading-[1.3] gp-text-[#737373] gp-transition-[top]",children:jsxRuntime.jsx("span",{className:"gp-max-w-full",children:jsxRuntime.jsx("span",{className:"gp-block gp-overflow-hidden",children:l})})}),jsxRuntime.jsx("select",{autoComplete:"off",name:e?.name||"Select Option",className:"gp-min-h-[47px] gp-w-full gp-whitespace-nowrap gp-rounded-[5px] gp-border gp-border-[#d9d9d9] gp-pb-[6px] gp-pl-[11px] gp-pr-[40px] gp-pt-[21px] gp-text-[14px] gp-outline-none gp-text-[#545454]",value:R??d,onChange:t=>{p?f(t.target?.value):m(e?.name,t.target?.value,v?.id)},children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!u&&jsxRuntime.jsx("option",{value:"blank",children:s??"Please select an option"}),e?.values?.map(p=>jsxRuntime.jsx(DropdownOption.default,{value:p,optionName:e.name,optionPosition:t,optionNumber:n,isSoldOutMark:w},p?.id)),p&&i?.map(e=>jsxRuntime.jsx(VariantOption.default,{disabled:!y(e)&&w,value:e?.id,variant:e,includePrice:a},e?.id))]})}),jsxRuntime.jsx("div",{className:"gp-pointer-events-none gp-absolute gp-right-[2px] gp-top-[50%] gp-flex gp-h-[43%] gp-w-[40px] gp-translate-y-[-50%] gp-items-center gp-justify-center gp-border-l-[1px] gp-bg-white gp-border-[#545454]",children:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false","aria-hidden":"true",role:"presentation",className:"gp-h-[10px] gp-w-[10px]",children:jsxRuntime.jsx("path",{d:"M0 5h20L10 15"})})})]})})};exports.default=DropdownVariant;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Text=require("../../../text/Text.js"),helper=require("../../../utils/helper.js"),react=require("react");const RectangleListVariant=({value:e,isVariantOutStock:t,checked:r,preset:l})=>{let o=react.useMemo(()=>t?helper.buttonColor.secondary:r?helper.buttonColor.primary:helper.buttonColor.defaultText,[t,r]);return jsxRuntime.jsx("div",{className:core.cls("gp-box-border gp-inline-flex gp-w-full gp- gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[5px] gp-px-[26px] gp-py-[21px] gp-text-center",{"gp-pointer-events-none !gp-cursor-not-allowed":t}),style:{boxShadow:`inset 0 0 0 1px ${helper.buttonColor.secondary}`,backgroundColor:o},children:jsxRuntime.jsx(Text.default,{setting:{text:e?.label},className:"gp-flex gp-items-center",textClassWrapper:"gp-leading-[15px]",styles:{typo:{fontSize:l?.labelTextSize||"large",textTransform:l?.labelTransform||"capitalize",textColor:r||t?"defaultButton":"defaultLink",fontWeight:"bold"}}})})};exports.default=RectangleListVariant;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Text=require("../../../text/Text.js"),helper=require("../../../utils/helper.js"),React=require("react");const RectangleListVariant=({value:e,isVariantOutStock:t,checked:r,preset:l})=>{let o=React.useMemo(()=>t?helper.buttonColor.secondary:r?helper.buttonColor.primary:helper.buttonColor.defaultText,[t,r]);return jsxRuntime.jsx("div",{className:core.cls("gp-box-border gp-inline-flex gp-w-full gp- gp-cursor-pointer gp-items-center gp-justify-center gp-rounded-[5px] gp-px-[26px] gp-py-[21px] gp-text-center",{"gp-pointer-events-none !gp-cursor-not-allowed":t}),style:{boxShadow:`inset 0 0 0 1px ${helper.buttonColor.secondary}`,backgroundColor:o},children:jsxRuntime.jsx(Text.default,{setting:{text:e?.label},className:"gp-flex gp-items-center",textClassWrapper:"gp-leading-[15px]",styles:{typo:{fontSize:l?.labelTextSize||"large",textTransform:l?.labelTransform||"capitalize",textColor:r||t?"defaultButton":"defaultLink",fontWeight:"bold"}}})})};exports.default=RectangleListVariant;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Dropdown=require("./Dropdown.js"),react=require("react");const VariantGroup=({...e})=>{let r=core.useVariants(),{selectedOptions:t}=core.useSelectedOption(),a=react.useMemo(()=>{let e=Object.keys(t||{}),a=r.find(r=>{let a=0;return e.forEach(e=>{let n=r?.selectedOptions.find(r=>r.name===e);n?.value===t?.[e]&&a++}),a===e.length});return a},[r,t]);return jsxRuntime.jsx(Dropdown.default,{variants:r,initValue:a?.id,variantGroup:e.variantGroup,...e})};exports.default=VariantGroup;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Dropdown=require("./Dropdown.js"),React=require("react");const VariantGroup=({...e})=>{let r=core.useVariants(),{selectedOptions:t}=core.useSelectedOption(),a=React.useMemo(()=>{let e=Object.keys(t||{}),a=r.find(r=>{let a=0;return e.forEach(e=>{let n=r?.selectedOptions.find(r=>r.name===e);n?.value===t?.[e]&&a++}),a===e.length});return a},[r,t]);return jsxRuntime.jsx(Dropdown.default,{variants:r,initValue:a?.id,variantGroup:e.variantGroup,...e})};exports.default=VariantGroup;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),RectangleList=require("./RectangleList.js"),helper=require("../../../utils/helper.js");const VariantItem=({name:e,variantKey:t,...r})=>{let{setSelectedOption:o}=core.useSelectedOption(),a=core.useProduct(),i=react.useMemo(()=>{if(!r.presetConfiguration)return;let{presets:e,optionType:t}=r.presetConfiguration;return e?.[t||"rectangle_list"]},[r.presetConfiguration]),s=i?.itemSpacing,l=i?.numberPerRow||5,n=react.useMemo(()=>({minWidth:`${100/l}%`,paddingLeft:helper.postPurchaseSpacing[s||"none"],paddingTop:helper.postPurchaseSpacing[s||"none"],width:`${100/l}%`}),[s,l]),u=react.useMemo(()=>RectangleList.default,[]),c=core.useVariantOutStock(e??"",r.value?.label??"",{position:r.optionPosition,optionNumber:r.optionNumber}),d=react.useMemo(()=>"Disable"===r.soldOutStyle&&r.soldOutMark,[r.soldOutStyle,r.soldOutMark]),p=react.useMemo(()=>"Line"===r.soldOutStyle&&r.soldOutMark,[r.soldOutStyle,r.soldOutMark]),m=()=>{if(c||!d){o(e,r.value?.label,a?.id);let t=new CustomEvent("change-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:e,optionValue:r.value?.label,productId:a?.id}});window.dispatchEvent(t)}};return jsxRuntime.jsxs("label",{className:core.cls({"gp-pointer-events-none":d&&!c,"gp-flex gp-items-center":!0}),style:{...n},htmlFor:`${r.uid}-${t}`,children:[jsxRuntime.jsx("input",{checked:r.checked,name:`${a?.id}-options-${e?.toString().replaceAll('"','\\"')}`,id:`${r.uid}-${t}`,value:r.value?.label,type:"radio",className:"gp-sr-only",onChange:m}),jsxRuntime.jsx("span",{className:"gp-sr-only",children:r.value?.label}),jsxRuntime.jsx(u,{...r,preset:i,isVariantOutStock:d&&!c&&0!==r.optionPosition,soldOutMark:d,soldOutMarkLine:p,available:c})]})};VariantItem.defaultProps={},exports.default=VariantItem;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),RectangleList=require("./RectangleList.js"),helper=require("../../../utils/helper.js");const VariantItem=({name:e,variantKey:t,...o})=>{let{setSelectedOption:a}=core.useSelectedOption(),i=core.useProduct(),s=React.useMemo(()=>{if(!o.presetConfiguration)return;let{presets:e,optionType:t}=o.presetConfiguration;return e?.[t||"rectangle_list"]},[o.presetConfiguration]),l=s?.itemSpacing,r=s?.numberPerRow||5,n=React.useMemo(()=>({minWidth:`${100/r}%`,paddingLeft:helper.postPurchaseSpacing[l||"none"],paddingTop:helper.postPurchaseSpacing[l||"none"],width:`${100/r}%`}),[l,r]),u=React.useMemo(()=>RectangleList.default,[]),c=core.useVariantOutStock(e??"",o.value?.label??"",{position:o.optionPosition,optionNumber:o.optionNumber}),d=React.useMemo(()=>"Disable"===o.soldOutStyle&&o.soldOutMark,[o.soldOutStyle,o.soldOutMark]),p=React.useMemo(()=>"Line"===o.soldOutStyle&&o.soldOutMark,[o.soldOutStyle,o.soldOutMark]),m=()=>{if(c||!d){a(e,o.value?.label,i?.id);let t=new CustomEvent("change-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:e,optionValue:o.value?.label,productId:i?.id}});window.dispatchEvent(t)}};return jsxRuntime.jsxs("label",{className:core.cls({"gp-pointer-events-none":d&&!c,"gp-flex gp-items-center":!0}),style:{...n},htmlFor:`${o.uid}-${t}`,children:[jsxRuntime.jsx("input",{checked:o.checked,name:`${i?.id}-options-${e?.toString().replaceAll('"','\\"')}`,id:`${o.uid}-${t}`,value:o.value?.label,type:"radio",className:"gp-sr-only",onChange:m}),jsxRuntime.jsx("span",{className:"gp-sr-only",children:o.value?.label}),jsxRuntime.jsx(u,{...o,preset:s,isVariantOutStock:d&&!c&&0!==o.optionPosition,soldOutMark:d,soldOutMarkLine:p,available:c})]})};VariantItem.defaultProps={},exports.default=VariantItem;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),helper=require("../utils/helper.js"),react=require("react");const Text=({styles:e,builderAttrs:t,style:r,setting:i,advanced:o,builderProps:s,className:n,children:a,textClassWrapper:l,textClass:u,...c})=>{let{text:p,options:d}=i??{},{width:g,textAlign:m,typo:x,align:f}=e??{},h=core.useEditorMode(),j=e=>{if(!e)return{};let t=JSON.parse(JSON.stringify(e));return t},y=react.useMemo(()=>({textTransform:x?.textTransform,color:helper.makeTextColor(x?.textColor,x?.fontWeight),fontWeight:helper.makeFontWeight(x?.fontWeight),fontSize:helper.makeFontSize(x?.fontSize)}),[x]),S=react.useMemo(()=>x?.textTransform==="capitalize"?p?.toString().toLocaleLowerCase():p?.toString()||"",[p,x?.textTransform]);return jsxRuntime.jsx("div",{...c,...t,className:`${core.cls(s?.uid,f?"gp-flex gp-w-full":"","center"===f?"gp-justify-center":"right"===f?"gp-justify-end":"gp-justify-start")} ${n}`,style:{...j(r)},children:jsxRuntime.jsx("div",{className:core.cls("gp-block gp-leading-[1.3]",l||""),style:{...core.makeStyleResponsive("w",g)},children:jsxRuntime.jsx("div",{className:core.cls("gp-text gp-cursor-pointer",d?.useState&&"edit"===h?"child-item-text gp-outline gp-outline-1 gp-outline-transparent hover:!gp-outline-[#3C67FF]":"",u),"data-unique-text":d?.uniqueId??"","data-product-id":d?.productID??"","data-not-editing":!!d?.isCannotEditing||"",style:{wordBreak:"break-word",...y,...core.makeStyle({ta:m})},dangerouslySetInnerHTML:{__html:`<span>${S}</span>`}})})})};exports.default=Text;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),helper=require("../utils/helper.js"),React=require("react");const Text=({styles:e,builderAttrs:t,style:r,setting:i,advanced:o,builderProps:s,className:n,children:a,textClassWrapper:l,textClass:u,...c})=>{let{text:p,options:d}=i??{},{width:g,textAlign:m,typo:x,align:f}=e??{},h=core.useEditorMode(),j=e=>{if(!e)return{};let t=JSON.parse(JSON.stringify(e));return t},y=React.useMemo(()=>({textTransform:x?.textTransform,color:helper.makeTextColor(x?.textColor,x?.fontWeight),fontWeight:helper.makeFontWeight(x?.fontWeight),fontSize:helper.makeFontSize(x?.fontSize)}),[x]),S=React.useMemo(()=>x?.textTransform==="capitalize"?p?.toString().toLocaleLowerCase():p?.toString()||"",[p,x?.textTransform]);return jsxRuntime.jsx("div",{...c,...t,className:`${core.cls(s?.uid,f?"gp-flex gp-w-full":"","center"===f?"gp-justify-center":"right"===f?"gp-justify-end":"gp-justify-start")} ${n}`,style:{...j(r)},children:jsxRuntime.jsx("div",{className:core.cls("gp-block gp-leading-[1.3]",l||""),style:{...core.makeStyleResponsive("w",g)},children:jsxRuntime.jsx("div",{className:core.cls("gp-text gp-cursor-pointer",d?.useState&&"edit"===h?"child-item-text gp-outline gp-outline-1 gp-outline-transparent hover:!gp-outline-[#3C67FF]":"",u),"data-unique-text":d?.uniqueId??"","data-product-id":d?.productID??"","data-not-editing":!!d?.isCannotEditing||"",style:{wordBreak:"break-word",...y,...core.makeStyle({ta:m})},dangerouslySetInnerHTML:{__html:`<span>${S}</span>`}})})})};exports.default=Text;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),Loading=require("../../common/components/Loading.js"),react=require("react"),Row=require("../../grid/components/Row.js"),dynamic=require("next/dynamic"),index=require("../../post-purchase/product/helpers/index.js");const ProductNotFound=dynamic(()=>Promise.resolve().then(function(){return require("./ProductNotFound.js")}),{loading:Loading.default}),Product=({children:e,setting:r,styles:t,style:o,builderAttrs:i})=>{let{productSetting:d,quantity:u,readOnly:n,isAuto:s,isSyncProduct:c,...a}=r??{},{...l}=t??{},m=core.usePageType(),x=core.usePageStore(e=>e.dynamicProduct),j=d?.productStatus=="dynamic"?x??{}:{};return"PRODUCT"===m&&s?jsxRuntime.jsx(jsxRuntime.Fragment,{children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e}):jsxRuntime.jsx(LocalProduct,{builderAttrs:i,rowSetting:a,rowStyles:l,style:o,productSetting:{...d,...j},quantity:u,readOnly:n,isSyncProduct:c,children:e})},LocalProduct=({children:e,productSetting:r,quantity:t,readOnly:o,rowSetting:i,style:d,rowStyles:u,builderAttrs:n,isSyncProduct:s})=>{let c=r?.productId??"latest",a=r?.initialVariantId,l=core.usePageStore(e=>e.publicStoreFrontData),m=react.useMemo(()=>index.hasPublicStoreFrontData(l)?index.createStoreFrontFetcher(l):void 0,[l]),{data:x,isLoading:j,error:p}=core.useProductQuery(c,void 0,m),[P,h]=react.useState(!0),g=core.useEditorMode();return!p&&(x||j)||"edit"!==g?jsxRuntime.jsx(jsxRuntime.Fragment,{children:j?jsxRuntime.jsx(Loading.default,{}):p?jsxRuntime.jsxs("div",{children:["Error: ",p?.message]}):x?jsxRuntime.jsx(core.ProductProvider,{product:x,initialVariantId:a,quantity:t,readOnly:o,isSyncProduct:s,children:jsxRuntime.jsx(Row.default,{builderAttrs:n,style:d,setting:i,styles:u,..."edit"===g?{"data-product-id":x?.baseID?.replace("gid://shopify/Product/","")}:{},children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})},`uid-${x.id}-${a??""}`):null}):P?jsxRuntime.jsx(ProductNotFound,{builderAttrs:n,productSrc:"PickProduct",onClose:()=>h(!1),children:e}):null};exports.default=Product;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),Loading=require("../../common/components/Loading.js"),React=require("react"),Row=require("../../grid/components/Row.js"),dynamic=require("next/dynamic"),index=require("../../post-purchase/product/helpers/index.js");const ProductNotFound=dynamic(()=>Promise.resolve().then(function(){return require("./ProductNotFound.js")}),{loading:Loading.default}),Product=({children:e,setting:r,styles:t,style:o,builderAttrs:i})=>{let{productSetting:d,quantity:u,readOnly:n,isAuto:s,isSyncProduct:c,...a}=r??{},{...l}=t??{},m=core.usePageType(),x=core.usePageStore(e=>e.dynamicProduct),j=d?.productStatus=="dynamic"?x??{}:{};return"PRODUCT"===m&&s?jsxRuntime.jsx(jsxRuntime.Fragment,{children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e}):jsxRuntime.jsx(LocalProduct,{builderAttrs:i,rowSetting:a,rowStyles:l,style:o,productSetting:{...d,...j},quantity:u,readOnly:n,isSyncProduct:c,children:e})},LocalProduct=({children:e,productSetting:r,quantity:t,readOnly:o,rowSetting:i,style:d,rowStyles:u,builderAttrs:n,isSyncProduct:s})=>{let c=r?.productId??"latest",a=r?.initialVariantId,l=core.usePageStore(e=>e.publicStoreFrontData),m=React.useMemo(()=>index.hasPublicStoreFrontData(l)?index.createStoreFrontFetcher(l):void 0,[l]),{data:x,isLoading:j,error:p}=core.useProductQuery(c,void 0,m),[P,R]=React.useState(!0),h=core.useEditorMode();return!p&&(x||j)||"edit"!==h?jsxRuntime.jsx(jsxRuntime.Fragment,{children:j?jsxRuntime.jsx(Loading.default,{}):p?jsxRuntime.jsxs("div",{children:["Error: ",p?.message]}):x?jsxRuntime.jsx(core.ProductProvider,{product:x,initialVariantId:a,quantity:t,readOnly:o,isSyncProduct:s,children:jsxRuntime.jsx(Row.default,{builderAttrs:n,style:d,setting:i,styles:u,..."edit"===h?{"data-product-id":x?.baseID?.replace("gid://shopify/Product/","")}:{},children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})},`uid-${x.id}-${a??""}`):null}):P?jsxRuntime.jsx(ProductNotFound,{builderAttrs:n,productSrc:"PickProduct",onClose:()=>R(!1),children:e}):null};exports.default=Product;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const ProductBundleDiscount=({builderAttrs:e,style:t,children:o,setting:r,styles:l})=>{let[a,c]=react.useState(r?.selectItemDefault);react.useEffect(()=>{c(r?.selectItemDefault)},[r?.selectItemDefault]);let n=core.makeGlobalSize(l?.size),i=react.useMemo(()=>{switch(l?.align){case"left":return{...core.makeStyle({ai:"start"})};case"right":return{...core.makeStyle({ai:"end"})};default:return{...core.makeStyle({ai:"center"})}}},[l?.align]);return jsxRuntime.jsx("div",{...e,className:core.cls({"gp-flex-col":r?.layout==="vertical-layout"},"gp-flex"),style:{...n.gap,...i,...t},children:react.Children.map(o,(e,t)=>react.isValidElement(e)?jsxRuntime.jsxs("div",{"aria-hidden":!0,onClick:()=>c(t),className:core.cls({"gp-items-center":r?.iconPosition==="center","gp-items-start":r?.iconPosition==="baseline","gp-flex-col":r?.layout==="horizontal-layout"},"gp-flex gp-justify-center"),style:{...n.width,...n.padding,...core.makeStyleState("bg",l?.backgroundColor),...core.makeStyle({bg:a===t?l?.backgroundColor?.active:l?.backgroundColor?.normal}),...core.composeRadius(l?.roundedBundle),...core.getStyleShadowState(l?.boxShadowBundle,"box-shadow",l?.hasBoxShadowBundle),...a===t?core.getStyleShadow({value:l?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:l?.hasBoxShadowBundle?.active}):{},...core.handleConvertBorderWidth(l?.borderBundle),...core.handleConvertBorderStyle(l?.borderBundle),...core.handleConvertBorderColor(l?.borderBundle),...a===t?core.getBorderStyle(l?.borderBundle?.active):{},...a===t?core.getRadiusStyleActiveState({...l?.roundedBundle,active:{...l?.roundedBundle?.active||{},radiusType:"custom"}}):{}},children:[r?.enableIcon&&jsxRuntime.jsx("div",{className:"gp-flex-none",style:{...core.makeStyle({mr:r.iconSpacing}),...core.makeStyleResponsive("w",r.iconSize,"px"),...core.makeStyleResponsive("h",r.iconSize,"px")},children:a===t&&r?.hasPreSelectItem?jsxRuntime.jsx("svg",{style:{...core.getGlobalColorStateStyle("c",l?.iconColor),...core.makeStyle({c:l?.iconColor?.active})},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor","data-id":"493334324348453213",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Z"})}):jsxRuntime.jsx("svg",{style:{...core.getGlobalColorStateStyle("c",l?.iconColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor","data-id":"508817616304734568",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"})})}),jsxRuntime.jsx(e.type,{...e.props,className:"gp-w-full"})]},t):e)})};exports.default=ProductBundleDiscount;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react");const ProductBundleDiscount=({builderAttrs:e,style:t,children:o,setting:r,styles:l})=>{let[a,c]=React.useState(r?.selectItemDefault);React.useEffect(()=>{c(r?.selectItemDefault)},[r?.selectItemDefault]);let n=core.makeGlobalSize(l?.size),i=React.useMemo(()=>{switch(l?.align){case"left":return{...core.makeStyle({ai:"start"})};case"right":return{...core.makeStyle({ai:"end"})};default:return{...core.makeStyle({ai:"center"})}}},[l?.align]);return jsxRuntime.jsx("div",{...e,className:core.cls({"gp-flex-col":r?.layout==="vertical-layout"},"gp-flex"),style:{...n.gap,...i,...t},children:React.Children.map(o,(e,t)=>React.isValidElement(e)?jsxRuntime.jsxs("div",{"aria-hidden":!0,onClick:()=>c(t),className:core.cls({"gp-items-center":r?.iconPosition==="center","gp-items-start":r?.iconPosition==="baseline","gp-flex-col":r?.layout==="horizontal-layout"},"gp-flex gp-justify-center"),style:{...n.width,...n.padding,...core.makeStyleState("bg",l?.backgroundColor),...core.makeStyle({bg:a===t?l?.backgroundColor?.active:l?.backgroundColor?.normal}),...core.composeRadius(l?.roundedBundle),...core.getStyleShadowState(l?.boxShadowBundle,"box-shadow",l?.hasBoxShadowBundle),...a===t?core.getStyleShadow({value:l?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:l?.hasBoxShadowBundle?.active}):{},...core.handleConvertBorderWidth(l?.borderBundle),...core.handleConvertBorderStyle(l?.borderBundle),...core.handleConvertBorderColor(l?.borderBundle),...a===t?core.getBorderStyle(l?.borderBundle?.active):{},...a===t?core.getRadiusStyleActiveState({...l?.roundedBundle,active:{...l?.roundedBundle?.active||{},radiusType:"custom"}}):{}},children:[r?.enableIcon&&jsxRuntime.jsx("div",{className:"gp-flex-none",style:{...core.makeStyle({mr:r.iconSpacing}),...core.makeStyleResponsive("w",r.iconSize,"px"),...core.makeStyleResponsive("h",r.iconSize,"px")},children:a===t&&r?.hasPreSelectItem?jsxRuntime.jsx("svg",{style:{...core.getGlobalColorStateStyle("c",l?.iconColor),...core.makeStyle({c:l?.iconColor?.active})},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor","data-id":"493334324348453213",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Z"})}):jsxRuntime.jsx("svg",{style:{...core.getGlobalColorStateStyle("c",l?.iconColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor","data-id":"508817616304734568",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"})})}),jsxRuntime.jsx(e.type,{...e.props,className:"gp-w-full"})]},t):e)})};exports.default=ProductBundleDiscount;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Button=require("../../button/components/Button.js"),Text=require("../../text/components/Text.js"),tracking=require("../helpers/tracking.js"),react=require("react"),useNotification=require("../../notification/hooks/use-notification.js");require("../../notification/components/Notice.js");const ProductButton=({setting:e,builderProps:t,builderAttrs:o,style:r,styles:n,advanced:c,children:s})=>{let{successColor:i,successTypo:a,errorColor:u,errorTypo:l,isCustomOutOfStock:d,oosBackground:m,oosTextColor:p,oosBorder:f,oosEnableShadow:x,oosShadow:b,oosRounded:g,...k}=n??{},{storefrontToken:j}=core.useStoreFront(),{currency:C}=core.useCurrency(),y=core.useEditorMode(),{cartId:h,updateCartId:v}=core.useCartId(),{openCart:I}=core.useCartUI(),[R,w]=useNotification.default({closable:!0,maxCount:3}),E=jsxRuntime.jsx("div",{children:jsxRuntime.jsx(Text.default,{setting:{text:e?.errorMessage,excludeFlex:!0},styles:{typo:n?.errorTypo,color:{normal:n?.errorColor}}})}),S=react.useCallback(t=>{e?.actionEffect==="continue-shopping"&&(R.open({content:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(Text.default,{setting:{text:e?.successMessage,excludeFlex:!0},styles:{typo:n?.successTypo,color:{normal:n?.successColor}}})}),placement:"top"}),I()),e?.actionEffect!=="buy-now"&&v(t.id),e?.actionEffect==="buy-now"?t.checkoutUrl&&(window.location.href=j?`${t.checkoutUrl}?access_token=${j}`:t.checkoutUrl):e?.actionEffect==="open-cart-drawer"?I():e?.actionEffect==="go-to-url"&&e.customURL?.link&&(e.customURL?.target==="_blank"?window.open(e.customURL.link,"_blank"):window.location.href=e.customURL.link)},[R,I,e?.actionEffect,e?.customURL?.link,e?.customURL?.target,e?.successMessage,n?.successColor,n?.successTypo,v,j]),{isMutating:T,trigger:B}=core.useCreateCart({onSuccess:S,onError:()=>{R.open({content:E,placement:"top"})}}),{isMutating:U,trigger:q}=core.useAddToCart({onSuccess:S,onError:()=>{R.open({content:E,placement:"top"})}}),D=core.useCurrentVariant(),{quantity:P}=core.useQuantity(),L=core.useProduct(),M=core.useProductProperties(),_=core.useProductStore(e=>e.updateIsSubmit),A=react.useCallback(()=>{if(!D?.baseID||!P||!L?.baseID||"edit"===y)return;let t=M?.some(e=>e.required&&!e.value);if(_(!0),t)return;let o=M?.filter(e=>!!e.value)?.map(e=>({key:e.key,value:e.value}));tracking.addToCartTracking({id:L?.baseID,name:L?.title,sku:D.sku,quantity:P,price:D?.price,variant:D.title,brand:L?.vendor,currency:C}),e?.actionEffect==="buy-now"?B({items:[{quantity:P,variantId:D.baseID,attributes:o}]}):h?q({cartId:h,lines:[{quantity:P,variantId:D.baseID,attributes:o}]}):B({items:[{quantity:P,variantId:D.baseID,attributes:o}]})},[D?.baseID,D?.price,D?.title,D?.sku,P,L?.baseID,L?.title,L?.vendor,y,M,_,C,e?.actionEffect,B,h,q]),F=core.useCurrentVariantInStock(),N=!F||T||U,V=F?e?.label:e?.outOfStockLabel;return!F&&d&&(k.backgroundColor={normal:m},k.textColor={normal:p},k.borderBtn=f,k.hasBoxShadowBtn={normal:x},k.boxShadowBtn={normal:b},k.roundedBtn={normal:g}),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Button.default,{className:core.cls({"gp-cursor-default gp-opacity-30":N}),builderProps:t,builderAttrs:{...o,"data-is-in-stock":F},advanced:c,setting:{label:V,htmlType:"button",loading:U||T,iconAlign:e?.iconAlign,iconSvg:e?.iconSvg,iconVisible:e?.iconVisible,shouldClearSpace:e?.shouldClearSpace},style:r,styles:k,onClick:A,children:s}),w]})};exports.default=ProductButton;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Button=require("../../button/components/Button.js"),Text=require("../../text/components/Text.js"),tracking=require("../helpers/tracking.js"),React=require("react"),useNotification=require("../../notification/hooks/use-notification.js");require("../../notification/components/Notice.js");const ProductButton=({setting:e,builderProps:t,builderAttrs:o,style:r,styles:n,advanced:c,children:s})=>{let{successColor:i,successTypo:a,errorColor:u,errorTypo:l,isCustomOutOfStock:d,oosBackground:m,oosTextColor:p,oosBorder:f,oosEnableShadow:x,oosShadow:b,oosRounded:g,...k}=n??{},{storefrontToken:j}=core.useStoreFront(),{currency:C}=core.useCurrency(),y=core.useEditorMode(),{cartId:h,updateCartId:v}=core.useCartId(),{openCart:R}=core.useCartUI(),[I,w]=useNotification.default({closable:!0,maxCount:3}),E=jsxRuntime.jsx("div",{children:jsxRuntime.jsx(Text.default,{setting:{text:e?.errorMessage,excludeFlex:!0},styles:{typo:n?.errorTypo,color:{normal:n?.errorColor}}})}),S=React.useCallback(t=>{e?.actionEffect==="continue-shopping"&&(I.open({content:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(Text.default,{setting:{text:e?.successMessage,excludeFlex:!0},styles:{typo:n?.successTypo,color:{normal:n?.successColor}}})}),placement:"top"}),R()),e?.actionEffect!=="buy-now"&&v(t.id),e?.actionEffect==="buy-now"?t.checkoutUrl&&(window.location.href=j?`${t.checkoutUrl}?access_token=${j}`:t.checkoutUrl):e?.actionEffect==="open-cart-drawer"?R():e?.actionEffect==="go-to-url"&&e.customURL?.link&&(e.customURL?.target==="_blank"?window.open(e.customURL.link,"_blank"):window.location.href=e.customURL.link)},[I,R,e?.actionEffect,e?.customURL?.link,e?.customURL?.target,e?.successMessage,n?.successColor,n?.successTypo,v,j]),{isMutating:T,trigger:B}=core.useCreateCart({onSuccess:S,onError:()=>{I.open({content:E,placement:"top"})}}),{isMutating:U,trigger:q}=core.useAddToCart({onSuccess:S,onError:()=>{I.open({content:E,placement:"top"})}}),D=core.useCurrentVariant(),{quantity:P}=core.useQuantity(),L=core.useProduct(),M=core.useProductProperties(),_=core.useProductStore(e=>e.updateIsSubmit),A=React.useCallback(()=>{if(!D?.baseID||!P||!L?.baseID||"edit"===y)return;let t=M?.some(e=>e.required&&!e.value);if(_(!0),t)return;let o=M?.filter(e=>!!e.value)?.map(e=>({key:e.key,value:e.value}));tracking.addToCartTracking({id:L?.baseID,name:L?.title,sku:D.sku,quantity:P,price:D?.price,variant:D.title,brand:L?.vendor,currency:C}),e?.actionEffect==="buy-now"?B({items:[{quantity:P,variantId:D.baseID,attributes:o}]}):h?q({cartId:h,lines:[{quantity:P,variantId:D.baseID,attributes:o}]}):B({items:[{quantity:P,variantId:D.baseID,attributes:o}]})},[D?.baseID,D?.price,D?.title,D?.sku,P,L?.baseID,L?.title,L?.vendor,y,M,_,C,e?.actionEffect,B,h,q]),F=core.useCurrentVariantInStock(),N=!F||T||U,V=F?e?.label:e?.outOfStockLabel;return!F&&d&&(k.backgroundColor={normal:m},k.textColor={normal:p},k.borderBtn=f,k.hasBoxShadowBtn={normal:x},k.boxShadowBtn={normal:b},k.roundedBtn={normal:g}),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Button.default,{className:core.cls({"gp-cursor-default gp-opacity-30":N}),builderProps:t,builderAttrs:{...o,"data-is-in-stock":F},advanced:c,setting:{label:V,htmlType:"button",loading:U||T,iconAlign:e?.iconAlign,iconSvg:e?.iconSvg,iconVisible:e?.iconVisible,shouldClearSpace:e?.shouldClearSpace},style:r,styles:k,onClick:A,children:s}),w]})};exports.default=ProductButton;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const ProductDescription=({setting:e})=>{let[t,o]=react.useState(!1),[r,s]=react.useState(!1),l=core.useProduct(),{htmlTag:i}=e??{},n=react.useRef(null),a=core.useCurrentDevice(),c=core.getResponsiveValueByScreen(e?.hasLineClamp,a),p=core.getResponsiveValueByScreen(e?.lineClamp,a);react.useEffect(()=>{let e=n.current;o(!1),e&&c&&l?.description&&setTimeout(()=>{let t=e?.scrollHeight??0,o=e?.clientHeight??0,r=window.getComputedStyle(e).getPropertyValue("line-height"),l=Math.round((t??0)/parseInt(r)),i=core.isSafari()?p&&p<l:o<t;p&&i?s(()=>!0):s(()=>!1)},100)},[c,p,l?.description]);let u="html"===i?"div":"p",m=core.composeTypographyClassName(e?.typo,e?.typography),g=core.composeTypographyStyle(e?.typo,e?.typography),x=`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react");const ProductDescription=({setting:e})=>{let[t,o]=React.useState(!1),[r,s]=React.useState(!1),l=core.useProduct(),{htmlTag:i}=e??{},n=React.useRef(null),a=core.useCurrentDevice(),c=core.getResponsiveValueByScreen(e?.hasLineClamp,a),p=core.getResponsiveValueByScreen(e?.lineClamp,a);React.useEffect(()=>{let e=n.current;o(!1),e&&c&&l?.description&&setTimeout(()=>{let t=e?.scrollHeight??0,o=e?.clientHeight??0,r=window.getComputedStyle(e).getPropertyValue("line-height"),l=Math.round((t??0)/parseInt(r)),i=core.isSafari()?p&&p<l:o<t;p&&i?s(()=>!0):s(()=>!1)},100)},[c,p,l?.description]);let u="html"===i?"div":"p",m=core.composeTypographyClassName(e?.typo,e?.typography),g=core.composeTypographyStyle(e?.typo,e?.typography),x=`
2
2
  .gp-p-description-text > *:not(ol):not(ul):not(table) {
3
3
  display: inline !important;
4
4
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),NextImage=require("../../../image/components/NextImage.js"),productFeaturedImage=require("./common/productFeaturedImage.js"),core=require("@gem-sdk/core"),urlJoin=require("../../../link/helpers/url-join.js"),react=require("react");const ProductFeaturedImage=({productImages:e,imgRef:t,onOpenLightBox:r,...o})=>{let s=core.useFeaturedImageGlobal(),i=core.useProduct(),c=react.useRef(null),a=react.useRef(null),l=react.useRef(null),u=o?.clickEffect!==void 0&&o?.clickEffect=="link",n=i?.handle?urlJoin.urlJoin("/products",i.handle):"#",p=u?"a":"div",g=react.useMemo(()=>o?.hoverEffect==="other"?e?.[o?.otherImage?o.otherImage:0]:e?.find(e=>e.id===s?.id),[s,e,o?.hoverEffect,o?.otherImage]),d=react.useMemo(()=>s?.id?e?.find(e=>e.id===s?.id):e?.[0],[s,e]),m=u?{href:n}:{onClick:()=>o?.clickEffect=="popup"&&r(),role:"presentation"},f=({event:e,featureImageDom:t,zoomSize:r,imagePosition:s,slideWidth:i,imageOffsetX:c,imageOffsetY:u})=>{if(a?.current){if(a.current.style.width=`${r}px`,e.clientX>=s?.x&&e.clientX<=s.right&&e.clientY>=s?.y&&e.clientY<=s.bottom?((o?.hoverEffect=="zoom"&&o?.zoomType=="default"||o?.hoverEffect=="other")&&(a.current.style.opacity="1"),l?.current&&o?.hoverEffect=="zoom"&&o?.zoomType=="glasses"&&(l.current.style.opacity="1")):(a.current.style.opacity="0",l?.current&&(l.current.style.opacity="0")),i&&o?.hoverEffect=="zoom"&&o?.zoomType=="default"){let e=c/t?.offsetWidth,o=u/t?.offsetHeight;a.current.style.top=(t?.offsetHeight-a.current.offsetHeight)*o+"px",a.current.style.left=(i-r)*e+"px"}a&&o?.hoverEffect=="other"&&(a.current.style.top="0px",a.current.style.left="0px")}},h=e=>{let t=e.currentTarget?.querySelector("img"),r=t?.getBoundingClientRect(),s=c?.current?.clientWidth||0,i=c?.current?.clientHeight||0,a=!o?.zoom||o.zoom<100?1:o.zoom/100||1,u=(c?.current?.clientWidth||1)*(o?.hoverEffect=="other"?1:a),n=e.clientX-r?.x,p=e.clientY-r?.y;if(f({event:e,featureImageDom:t,zoomSize:u,imagePosition:r,slideWidth:s,imageOffsetX:n,imageOffsetY:p}),o?.hoverEffect=="zoom"&&o?.zoomType=="glasses"&&l.current){let e=l.current.offsetWidth/2,t=l.current.offsetHeight/2,r=i||1;n>s-e/a&&(n=s-e/a),n<e/a&&(n=e/a),p>r-t/a&&(p=r-t/a),p<t/a&&(p=t/a),l.current.style.top=p-t+"px",l.current.style.left=n-e+"px",l.current.style.backgroundSize=u+"px "+r*a+"px",l.current.style.backgroundPosition=`-${n*a-e}px -${p*a-t}px`}},x=()=>{a?.current&&(a.current.style.opacity="0"),l?.current&&(l.current.style.opacity="0")},y=react.useMemo(()=>productFeaturedImage.getFeatureImageAspectRatio(o.ftCustomAspectRadio,o.ftAspectRatio),[o?.ftAspectRatio,o.ftCustomAspectRadio]),v=react.useMemo(()=>productFeaturedImage.getStyleFeaturedImageWidth(o),[o]);return jsxRuntime.jsx("div",{className:"gp-product-images-ft gp-flex",style:{...productFeaturedImage.getStyleFeatureImageJustify(o.position),...v},children:jsxRuntime.jsx(p,{...m,onMouseMove:h,onMouseOut:x,className:core.cls("gp-relative gp-flex gp-w-full",{"gp-overflow-hidden":o?.zoomType!=="glasses"}),style:{...core.makeStyleResponsive("aspect",y)},children:jsxRuntime.jsx("div",{className:"gp-flex gp-w-full gp-items-start gp-justify-center",children:jsxRuntime.jsxs("div",{ref:c,className:"gp-group gp-relative gp-w-full gp-overflow-hidden",children:[jsxRuntime.jsx(NextImage.default,{imgRef:t,src:s?.previewImage||s?.src,width:s?.width,height:s?.height,alt:s?.alt,setting:{layout:o.ftLayout,aspectRatio:y},className:core.cls("featured-image-only gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==o.hoverEffect})}),(s?.contentType=="VIDEO"||s?.contentType=="EXTERNAL_VIDEO")&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-[15px] gp-pr-[15px]",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("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",strokeMiterlimit:"10"})]})}),s?.contentType=="MODEL_3D"&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-[15px] gp-pr-[15px]",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"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"})]})}),o?.hoverEffect!=="none"&&o?.hoverEffect!=="other"&&jsxRuntime.jsx("div",{ref:a,className:core.cls("!gp-max-w-none",productFeaturedImage.isFeatureMedia(d?.contentType)?"":productFeaturedImage.getZoomImageClass()),children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(g?.contentType)?g?.previewImage:g?.src,width:g?.width,height:g?.height,alt:g?.alt,setting:{layout:o.ftLayout,aspectRatio:y},className:"featured-image-only gp-w-full"})}),o?.hoverEffect==="other"&&jsxRuntime.jsx("div",{ref:a,className:core.cls("!gp-max-w-none",productFeaturedImage.getZoomImageClass()),children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(d?.contentType)?d?.previewImage:g?g?.previewImage||g?.src:d?.src,width:g?.width,height:g?.height,alt:g?.alt,setting:{layout:o.ftLayout,aspectRatio:y},className:"featured-image-only gp-w-full"})}),o?.hoverEffect==="zoom"&&o?.zoomType==="glasses"&&!productFeaturedImage.isFeatureMedia(d?.contentType)&&jsxRuntime.jsx("div",{ref:l,className:core.cls(productFeaturedImage.getZoomLenClass()),style:{...core.makeStyle({bgi:`url("${d?.src}")`})}})]})})})})};exports.default=ProductFeaturedImage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),NextImage=require("../../../image/components/NextImage.js"),productFeaturedImage=require("./common/productFeaturedImage.js"),core=require("@gem-sdk/core"),urlJoin=require("../../../link/helpers/url-join.js"),React=require("react");const ProductFeaturedImage=({productImages:e,imgRef:t,onOpenLightBox:r,...o})=>{let s=core.useFeaturedImageGlobal(),i=core.useProduct(),c=React.useRef(null),a=React.useRef(null),l=React.useRef(null),u=o?.clickEffect!==void 0&&o?.clickEffect=="link",n=i?.handle?urlJoin.urlJoin("/products",i.handle):"#",p=u?"a":"div",g=React.useMemo(()=>o?.hoverEffect==="other"?e?.[o?.otherImage?o.otherImage:0]:e?.find(e=>e.id===s?.id),[s,e,o?.hoverEffect,o?.otherImage]),d=React.useMemo(()=>s?.id?e?.find(e=>e.id===s?.id):e?.[0],[s,e]),m=u?{href:n}:{onClick:()=>o?.clickEffect=="popup"&&r(),role:"presentation"},f=({event:e,featureImageDom:t,zoomSize:r,imagePosition:s,slideWidth:i,imageOffsetX:c,imageOffsetY:u})=>{if(a?.current){if(a.current.style.width=`${r}px`,e.clientX>=s?.x&&e.clientX<=s.right&&e.clientY>=s?.y&&e.clientY<=s.bottom?((o?.hoverEffect=="zoom"&&o?.zoomType=="default"||o?.hoverEffect=="other")&&(a.current.style.opacity="1"),l?.current&&o?.hoverEffect=="zoom"&&o?.zoomType=="glasses"&&(l.current.style.opacity="1")):(a.current.style.opacity="0",l?.current&&(l.current.style.opacity="0")),i&&o?.hoverEffect=="zoom"&&o?.zoomType=="default"){let e=c/t?.offsetWidth,o=u/t?.offsetHeight;a.current.style.top=(t?.offsetHeight-a.current.offsetHeight)*o+"px",a.current.style.left=(i-r)*e+"px"}a&&o?.hoverEffect=="other"&&(a.current.style.top="0px",a.current.style.left="0px")}},h=e=>{let t=e.currentTarget?.querySelector("img"),r=t?.getBoundingClientRect(),s=c?.current?.clientWidth||0,i=c?.current?.clientHeight||0,a=!o?.zoom||o.zoom<100?1:o.zoom/100||1,u=(c?.current?.clientWidth||1)*(o?.hoverEffect=="other"?1:a),n=e.clientX-r?.x,p=e.clientY-r?.y;if(f({event:e,featureImageDom:t,zoomSize:u,imagePosition:r,slideWidth:s,imageOffsetX:n,imageOffsetY:p}),o?.hoverEffect=="zoom"&&o?.zoomType=="glasses"&&l.current){let e=l.current.offsetWidth/2,t=l.current.offsetHeight/2,r=i||1;n>s-e/a&&(n=s-e/a),n<e/a&&(n=e/a),p>r-t/a&&(p=r-t/a),p<t/a&&(p=t/a),l.current.style.top=p-t+"px",l.current.style.left=n-e+"px",l.current.style.backgroundSize=u+"px "+r*a+"px",l.current.style.backgroundPosition=`-${n*a-e}px -${p*a-t}px`}},x=()=>{a?.current&&(a.current.style.opacity="0"),l?.current&&(l.current.style.opacity="0")},y=React.useMemo(()=>productFeaturedImage.getFeatureImageAspectRatio(o.ftCustomAspectRadio,o.ftAspectRatio),[o?.ftAspectRatio,o.ftCustomAspectRadio]),v=React.useMemo(()=>productFeaturedImage.getStyleFeaturedImageWidth(o),[o]);return jsxRuntime.jsx("div",{className:"gp-product-images-ft gp-flex",style:{...productFeaturedImage.getStyleFeatureImageJustify(o.position),...v},children:jsxRuntime.jsx(p,{...m,onMouseMove:h,onMouseOut:x,className:core.cls("gp-relative gp-flex gp-w-full",{"gp-overflow-hidden":o?.zoomType!=="glasses"}),style:{...core.makeStyleResponsive("aspect",y)},children:jsxRuntime.jsx("div",{className:"gp-flex gp-w-full gp-items-start gp-justify-center",children:jsxRuntime.jsxs("div",{ref:c,className:"gp-group gp-relative gp-w-full gp-overflow-hidden",children:[jsxRuntime.jsx(NextImage.default,{imgRef:t,src:s?.previewImage||s?.src,width:s?.width,height:s?.height,alt:s?.alt,setting:{layout:o.ftLayout,aspectRatio:y},className:core.cls("featured-image-only gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==o.hoverEffect})}),(s?.contentType=="VIDEO"||s?.contentType=="EXTERNAL_VIDEO")&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-[15px] gp-pr-[15px]",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("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",strokeMiterlimit:"10"})]})}),s?.contentType=="MODEL_3D"&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-[15px] gp-pr-[15px]",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"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"})]})}),o?.hoverEffect!=="none"&&o?.hoverEffect!=="other"&&jsxRuntime.jsx("div",{ref:a,className:core.cls("!gp-max-w-none",productFeaturedImage.isFeatureMedia(d?.contentType)?"":productFeaturedImage.getZoomImageClass()),children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(g?.contentType)?g?.previewImage:g?.src,width:g?.width,height:g?.height,alt:g?.alt,setting:{layout:o.ftLayout,aspectRatio:y},className:"featured-image-only gp-w-full"})}),o?.hoverEffect==="other"&&jsxRuntime.jsx("div",{ref:a,className:core.cls("!gp-max-w-none",productFeaturedImage.getZoomImageClass()),children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(d?.contentType)?d?.previewImage:g?g?.previewImage||g?.src:d?.src,width:g?.width,height:g?.height,alt:g?.alt,setting:{layout:o.ftLayout,aspectRatio:y},className:"featured-image-only gp-w-full"})}),o?.hoverEffect==="zoom"&&o?.zoomType==="glasses"&&!productFeaturedImage.isFeatureMedia(d?.contentType)&&jsxRuntime.jsx("div",{ref:l,className:core.cls(productFeaturedImage.getZoomLenClass()),style:{...core.makeStyle({bgi:`url("${d?.src}")`})}})]})})})})};exports.default=ProductFeaturedImage;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),Carousel=require("../../../carousel/components/Carousel.js"),CarouselItem=require("../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("./common/common.js"),NextImage=require("../../../image/components/NextImage.js"),productGallery=require("./common/productGallery.js"),productGallery$1=require("../ProductImagesV2/common/productGallery.js");const ProductGalleryCarousel=({builderPropUID:e,productImages:t,onHandleClick:o,...i})=>{let s=core.useCurrentDevice(),r=core.useFeaturedImageGlobal(),l=react.useMemo(()=>{let e=t?.findIndex(e=>e.id===r?.id);return e&&e>0?e:0},[t,r]),a=react.useMemo(()=>core.getResponsiveValueByScreen(i?.position,s),[s,i?.position]),c=react.useMemo(()=>{let e="left"===a||"right"===a;return e?{desktop:"auto",tablet:"auto",mobile:"auto"}:i?.slidesToShow},[a,i?.slidesToShow]),n=react.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.width,tablet:i?.customAspectRadio?.tablet?.width,mobile:i?.customAspectRadio?.mobile?.width}),[i?.customAspectRadio]),u=react.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.height,tablet:i?.customAspectRadio?.tablet?.height,mobile:i?.customAspectRadio?.mobile?.height}),[i?.customAspectRadio]),p=react.useMemo(()=>core.makeAspectRatio(i?.aspectRatio,n,u),[n,i?.aspectRatio,u]);return jsxRuntime.jsx(Carousel.default,{setting:{loop:i?.loop,slidesToShow:c,dot:productGallery.getAllowDotConfig(),dotStyle:productGallery$1.getDotStyleConfig(),controlOverContent:i?.controlOverContent,enableDrag:{desktop:i?.dragToScroll,tablet:i?.dragToScroll,mobile:i?.dragToScroll},vertical:productGallery.getCarouselVerticalConfigByPosition(i.position),dotActiveColor:i?.dotActiveColor,dotColor:i?.dotColor,arrowCustom:i?.arrowIcon},styles:{sizeSetting:{desktop:{width:"100%",height:"auto"},tablet:{width:"100%",height:"auto"},mobile:{width:"100%",height:"auto"}},spacing:common.convertSpacing(i?.spacing)},builderProps:{uid:e},isHiddenArrowWhenDisabled:!0,children:t?.map((t,r,a)=>{let c=r===l&&a.length>1,n="VIDEO"==t.contentType||"EXTERNAL_VIDEO"==t.contentType||"MODEL_3D"==t.contentType?t?.previewImage:t?.src;return jsxRuntime.jsxs(CarouselItem.default,{className:core.cls(`gem-slider-item gem-slider-item-${e} gp-group gp-flex gp-w-full gp-items-center gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1`,{"gp-outline ":c&&!!i?.showActiveStatus}),onClick:()=>{o(t?.id||"")},style:{outlineColor:"var(--g-c-brand, brand)"},children:[jsxRuntime.jsx(NextImage.default,{src:n,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:p,layout:i?.layout},style:{...core.makeStyleResponsive("w",core.makeWidth(i?.width,i?.fullWidth)),...core.makeStyleResponsive("aspect",i?.aspectRatio)}}),("VIDEO"==t.contentType||"EXTERNAL_VIDEO"==t.contentType)&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("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",strokeMiterlimit:"10"})]})}),"MODEL_3D"==t.contentType&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"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"})]})}),core.getResponsiveValueByScreen(i?.largeViewInPopup,s)&&jsxRuntime.jsx("div",{className:"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-all gp-duration-100 group-hover:gp-opacity-100",children:jsxRuntime.jsx("svg",{height:"100%",width:"100%",xmlns:"http://www.w3.org/2000/svg",className:"gp-h-6 gp-w-6",viewBox:"0 0 512 512",color:"#fff",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M62.2467 345.253C43.7072 326.714 29.1474 305.116 18.9714 281.057C8.42839 256.13 3.08301 229.671 3.08301 202.418C3.08301 175.165 8.43012 148.707 18.974 123.78C29.15 99.7213 43.7098 78.123 62.2485 59.5834C80.788 41.0439 102.386 26.4841 126.445 16.3081C151.372 5.76422 177.831 0.417969 205.084 0.417969C232.337 0.417969 258.794 5.76421 283.722 16.3064C307.78 26.4823 329.379 41.0422 347.918 59.5817C366.458 78.1212 381.017 99.7196 391.194 123.778C401.737 148.706 407.083 175.163 407.083 202.417C407.083 229.671 401.737 256.129 391.194 281.056C388.406 287.648 385.277 294.048 381.839 300.257L493.397 411.815C514.091 432.511 514.091 466.187 493.395 486.883L484.272 496.006C474.245 506.032 460.915 511.553 446.738 511.553C432.559 511.553 419.228 506.032 409.202 496.006L296.022 382.824C291.996 384.854 287.898 386.762 283.721 388.528C258.794 399.073 232.336 404.419 205.082 404.419C177.828 404.419 151.371 399.071 126.443 388.528C102.385 378.352 80.7863 363.793 62.2467 345.253ZM301.699 336.166C313.928 327.317 324.896 316.835 334.282 305.034C342.149 295.142 348.9 284.325 354.355 272.775C364.433 251.432 370.076 227.586 370.076 202.419C370.076 111.296 296.206 37.4253 205.083 37.4253C113.96 37.4253 40.0895 111.294 40.0895 202.418C40.0895 293.541 113.96 367.411 205.084 367.411C227.413 367.411 248.701 362.967 268.126 354.928C280.091 349.976 291.347 343.658 301.699 336.166ZM467.229 460.716C473.507 454.439 473.507 444.26 467.229 437.982L360.595 331.348C356.601 336.153 352.378 340.794 347.919 345.253C341.671 351.502 335.068 357.286 328.147 362.615L435.371 469.839C438.511 472.977 442.624 474.547 446.739 474.547C450.853 474.547 454.967 472.978 458.106 469.839L467.229 460.716ZM223.582 183.91H281.071C291.292 183.91 299.574 192.194 299.575 202.414C299.575 206.778 298.062 210.786 295.533 213.951C292.143 218.195 286.926 220.916 281.072 220.916H228.303H223.583V225.63V278.406C223.583 287.081 217.613 294.358 209.559 296.361C208.124 296.717 206.625 296.909 205.08 296.909C194.861 296.909 186.577 288.625 186.577 278.406V220.917H129.087C118.868 220.917 110.584 212.633 110.584 202.414C110.584 192.195 118.868 183.911 129.087 183.911H186.576V126.421C186.576 116.202 194.86 107.918 205.079 107.918C215.298 107.918 223.582 116.202 223.582 126.421V183.91Z"})})})]},t?.id)})})};exports.default=ProductGalleryCarousel;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),Carousel=require("../../../carousel/components/Carousel.js"),CarouselItem=require("../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("./common/common.js"),NextImage=require("../../../image/components/NextImage.js"),productGallery=require("./common/productGallery.js"),productGallery$1=require("../ProductImagesV2/common/productGallery.js");const ProductGalleryCarousel=({builderPropUID:e,productImages:t,onHandleClick:o,...i})=>{let s=core.useCurrentDevice(),r=core.useFeaturedImageGlobal(),l=React.useMemo(()=>{let e=t?.findIndex(e=>e.id===r?.id);return e&&e>0?e:0},[t,r]),a=React.useMemo(()=>core.getResponsiveValueByScreen(i?.position,s),[s,i?.position]),c=React.useMemo(()=>{let e="left"===a||"right"===a;return e?{desktop:"auto",tablet:"auto",mobile:"auto"}:i?.slidesToShow},[a,i?.slidesToShow]),n=React.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.width,tablet:i?.customAspectRadio?.tablet?.width,mobile:i?.customAspectRadio?.mobile?.width}),[i?.customAspectRadio]),u=React.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.height,tablet:i?.customAspectRadio?.tablet?.height,mobile:i?.customAspectRadio?.mobile?.height}),[i?.customAspectRadio]),p=React.useMemo(()=>core.makeAspectRatio(i?.aspectRatio,n,u),[n,i?.aspectRatio,u]);return jsxRuntime.jsx(Carousel.default,{setting:{loop:i?.loop,slidesToShow:c,dot:productGallery.getAllowDotConfig(),dotStyle:productGallery$1.getDotStyleConfig(),controlOverContent:i?.controlOverContent,enableDrag:{desktop:i?.dragToScroll,tablet:i?.dragToScroll,mobile:i?.dragToScroll},vertical:productGallery.getCarouselVerticalConfigByPosition(i.position),dotActiveColor:i?.dotActiveColor,dotColor:i?.dotColor,arrowCustom:i?.arrowIcon},styles:{sizeSetting:{desktop:{width:"100%",height:"auto"},tablet:{width:"100%",height:"auto"},mobile:{width:"100%",height:"auto"}},spacing:common.convertSpacing(i?.spacing)},builderProps:{uid:e},isHiddenArrowWhenDisabled:!0,children:t?.map((t,r,a)=>{let c=r===l&&a.length>1,n="VIDEO"==t.contentType||"EXTERNAL_VIDEO"==t.contentType||"MODEL_3D"==t.contentType?t?.previewImage:t?.src;return jsxRuntime.jsxs(CarouselItem.default,{className:core.cls(`gem-slider-item gem-slider-item-${e} gp-group gp-flex gp-w-full gp-items-center gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1`,{"gp-outline ":c&&!!i?.showActiveStatus}),onClick:()=>{o(t?.id||"")},style:{outlineColor:"var(--g-c-brand, brand)"},children:[jsxRuntime.jsx(NextImage.default,{src:n,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:p,layout:i?.layout},style:{...core.makeStyleResponsive("w",core.makeWidth(i?.width,i?.fullWidth)),...core.makeStyleResponsive("aspect",i?.aspectRatio)}}),("VIDEO"==t.contentType||"EXTERNAL_VIDEO"==t.contentType)&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("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",strokeMiterlimit:"10"})]})}),"MODEL_3D"==t.contentType&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"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"})]})}),core.getResponsiveValueByScreen(i?.largeViewInPopup,s)&&jsxRuntime.jsx("div",{className:"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-all gp-duration-100 group-hover:gp-opacity-100",children:jsxRuntime.jsx("svg",{height:"100%",width:"100%",xmlns:"http://www.w3.org/2000/svg",className:"gp-h-6 gp-w-6",viewBox:"0 0 512 512",color:"#fff",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M62.2467 345.253C43.7072 326.714 29.1474 305.116 18.9714 281.057C8.42839 256.13 3.08301 229.671 3.08301 202.418C3.08301 175.165 8.43012 148.707 18.974 123.78C29.15 99.7213 43.7098 78.123 62.2485 59.5834C80.788 41.0439 102.386 26.4841 126.445 16.3081C151.372 5.76422 177.831 0.417969 205.084 0.417969C232.337 0.417969 258.794 5.76421 283.722 16.3064C307.78 26.4823 329.379 41.0422 347.918 59.5817C366.458 78.1212 381.017 99.7196 391.194 123.778C401.737 148.706 407.083 175.163 407.083 202.417C407.083 229.671 401.737 256.129 391.194 281.056C388.406 287.648 385.277 294.048 381.839 300.257L493.397 411.815C514.091 432.511 514.091 466.187 493.395 486.883L484.272 496.006C474.245 506.032 460.915 511.553 446.738 511.553C432.559 511.553 419.228 506.032 409.202 496.006L296.022 382.824C291.996 384.854 287.898 386.762 283.721 388.528C258.794 399.073 232.336 404.419 205.082 404.419C177.828 404.419 151.371 399.071 126.443 388.528C102.385 378.352 80.7863 363.793 62.2467 345.253ZM301.699 336.166C313.928 327.317 324.896 316.835 334.282 305.034C342.149 295.142 348.9 284.325 354.355 272.775C364.433 251.432 370.076 227.586 370.076 202.419C370.076 111.296 296.206 37.4253 205.083 37.4253C113.96 37.4253 40.0895 111.294 40.0895 202.418C40.0895 293.541 113.96 367.411 205.084 367.411C227.413 367.411 248.701 362.967 268.126 354.928C280.091 349.976 291.347 343.658 301.699 336.166ZM467.229 460.716C473.507 454.439 473.507 444.26 467.229 437.982L360.595 331.348C356.601 336.153 352.378 340.794 347.919 345.253C341.671 351.502 335.068 357.286 328.147 362.615L435.371 469.839C438.511 472.977 442.624 474.547 446.739 474.547C450.853 474.547 454.967 472.978 458.106 469.839L467.229 460.716ZM223.582 183.91H281.071C291.292 183.91 299.574 192.194 299.575 202.414C299.575 206.778 298.062 210.786 295.533 213.951C292.143 218.195 286.926 220.916 281.072 220.916H228.303H223.583V225.63V278.406C223.583 287.081 217.613 294.358 209.559 296.361C208.124 296.717 206.625 296.909 205.08 296.909C194.861 296.909 186.577 288.625 186.577 278.406V220.917H129.087C118.868 220.917 110.584 212.633 110.584 202.414C110.584 192.195 118.868 183.911 129.087 183.911H186.576V126.421C186.576 116.202 194.86 107.918 205.079 107.918C215.298 107.918 223.582 116.202 223.582 126.421V183.91Z"})})})]},t?.id)})})};exports.default=ProductGalleryCarousel;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),common=require("./common/common.js"),NextImage=require("../../../image/components/NextImage.js"),productGallery=require("./common/productGallery.js");const ProductGalleryGrid=({builderPropUID:e,productImages:t,onHandleClick:o,...i})=>{let s=core.useCurrentDevice(),r=core.useFeaturedImageGlobal(),l=react.useMemo(()=>{let e=t?.findIndex(e=>e.id===r?.id);return e&&e>0?e:0},[t,r]),c=react.useMemo(()=>core.getResponsiveValueByScreen(i?.position,s),[s,i?.position]),p=react.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.width,tablet:i?.customAspectRadio?.tablet?.width,mobile:i?.customAspectRadio?.mobile?.width}),[i?.customAspectRadio]),n=react.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.height,tablet:i?.customAspectRadio?.tablet?.height,mobile:i?.customAspectRadio?.mobile?.height}),[i?.customAspectRadio]),a=react.useMemo(()=>core.makeAspectRatio(i?.aspectRatio,p,n),[p,i?.aspectRatio,n]);return jsxRuntime.jsx("div",{className:core.cls("gp-flex gp-h-fit gp-w-full gp-flex-wrap",{"!gp-flex-nowrap gp-overflow-y-auto scrollbar:gp-w-[6px] scrollbar-track:gp-rounded-2xl scrollbar-thumb:gp-rounded-2xl scrollbar-thumb:gp-bg-gray-400":"left"===c||"right"===c,"!gp-items-end":"left"===c,"!gp-items-start":"right"===c,"gp-justify-center":"bottom-center"===c}),style:{...core.makeStyleResponsive("gg",common.convertSpacingPx(i?.spacing))},children:t?.map((e,t)=>{let r=t===l,c="VIDEO"==e.contentType||"EXTERNAL_VIDEO"==e.contentType||"MODEL_3D"==e.contentType?e?.previewImage:e?.src;return jsxRuntime.jsxs("div",{"aria-hidden":!0,className:core.cls("gp-group gp-relative gp-cursor-pointer gp-overflow-hidden gp-outline-1 -gp-outline-offset-1",{outline:r&&!!i?.showActiveStatus}),onClick:()=>o(e?.id||""),style:{...core.makeStyleResponsive("aspect",i?.aspectRatio),...productGallery.getStyleWidthForGridItem(i?.numberPerRow,i?.spacing,i?.position),maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)"},children:[jsxRuntime.jsx(NextImage.default,{src:c,width:e?.width,height:e?.height,alt:e?.alt,setting:{aspectRatio:a,layout:i?.layout},style:{width:"100%",height:"100%"}},e?.id),("VIDEO"==e.contentType||"EXTERNAL_VIDEO"==e.contentType)&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("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",strokeMiterlimit:"10"})]})}),"MODEL_3D"==e.contentType&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"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"})]})}),core.getResponsiveValueByScreen(i?.largeViewInPopup,s)&&jsxRuntime.jsx("div",{className:"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-all gp-duration-100 group-hover:gp-opacity-100",children:jsxRuntime.jsx("svg",{height:"100%",width:"100%",xmlns:"http://www.w3.org/2000/svg",className:"gp-h-6 gp-w-6",viewBox:"0 0 512 512",color:"#fff",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M62.2467 345.253C43.7072 326.714 29.1474 305.116 18.9714 281.057C8.42839 256.13 3.08301 229.671 3.08301 202.418C3.08301 175.165 8.43012 148.707 18.974 123.78C29.15 99.7213 43.7098 78.123 62.2485 59.5834C80.788 41.0439 102.386 26.4841 126.445 16.3081C151.372 5.76422 177.831 0.417969 205.084 0.417969C232.337 0.417969 258.794 5.76421 283.722 16.3064C307.78 26.4823 329.379 41.0422 347.918 59.5817C366.458 78.1212 381.017 99.7196 391.194 123.778C401.737 148.706 407.083 175.163 407.083 202.417C407.083 229.671 401.737 256.129 391.194 281.056C388.406 287.648 385.277 294.048 381.839 300.257L493.397 411.815C514.091 432.511 514.091 466.187 493.395 486.883L484.272 496.006C474.245 506.032 460.915 511.553 446.738 511.553C432.559 511.553 419.228 506.032 409.202 496.006L296.022 382.824C291.996 384.854 287.898 386.762 283.721 388.528C258.794 399.073 232.336 404.419 205.082 404.419C177.828 404.419 151.371 399.071 126.443 388.528C102.385 378.352 80.7863 363.793 62.2467 345.253ZM301.699 336.166C313.928 327.317 324.896 316.835 334.282 305.034C342.149 295.142 348.9 284.325 354.355 272.775C364.433 251.432 370.076 227.586 370.076 202.419C370.076 111.296 296.206 37.4253 205.083 37.4253C113.96 37.4253 40.0895 111.294 40.0895 202.418C40.0895 293.541 113.96 367.411 205.084 367.411C227.413 367.411 248.701 362.967 268.126 354.928C280.091 349.976 291.347 343.658 301.699 336.166ZM467.229 460.716C473.507 454.439 473.507 444.26 467.229 437.982L360.595 331.348C356.601 336.153 352.378 340.794 347.919 345.253C341.671 351.502 335.068 357.286 328.147 362.615L435.371 469.839C438.511 472.977 442.624 474.547 446.739 474.547C450.853 474.547 454.967 472.978 458.106 469.839L467.229 460.716ZM223.582 183.91H281.071C291.292 183.91 299.574 192.194 299.575 202.414C299.575 206.778 298.062 210.786 295.533 213.951C292.143 218.195 286.926 220.916 281.072 220.916H228.303H223.583V225.63V278.406C223.583 287.081 217.613 294.358 209.559 296.361C208.124 296.717 206.625 296.909 205.08 296.909C194.861 296.909 186.577 288.625 186.577 278.406V220.917H129.087C118.868 220.917 110.584 212.633 110.584 202.414C110.584 192.195 118.868 183.911 129.087 183.911H186.576V126.421C186.576 116.202 194.86 107.918 205.079 107.918C215.298 107.918 223.582 116.202 223.582 126.421V183.91Z"})})})]},e?.id)})})};exports.default=ProductGalleryGrid;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),common=require("./common/common.js"),NextImage=require("../../../image/components/NextImage.js"),productGallery=require("./common/productGallery.js");const ProductGalleryGrid=({builderPropUID:e,productImages:t,onHandleClick:o,...i})=>{let s=core.useCurrentDevice(),r=core.useFeaturedImageGlobal(),l=React.useMemo(()=>{let e=t?.findIndex(e=>e.id===r?.id);return e&&e>0?e:0},[t,r]),c=React.useMemo(()=>core.getResponsiveValueByScreen(i?.position,s),[s,i?.position]),p=React.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.width,tablet:i?.customAspectRadio?.tablet?.width,mobile:i?.customAspectRadio?.mobile?.width}),[i?.customAspectRadio]),n=React.useMemo(()=>({desktop:i?.customAspectRadio?.desktop?.height,tablet:i?.customAspectRadio?.tablet?.height,mobile:i?.customAspectRadio?.mobile?.height}),[i?.customAspectRadio]),a=React.useMemo(()=>core.makeAspectRatio(i?.aspectRatio,p,n),[p,i?.aspectRatio,n]);return jsxRuntime.jsx("div",{className:core.cls("gp-flex gp-h-fit gp-w-full gp-flex-wrap",{"!gp-flex-nowrap gp-overflow-y-auto scrollbar:gp-w-[6px] scrollbar-track:gp-rounded-2xl scrollbar-thumb:gp-rounded-2xl scrollbar-thumb:gp-bg-gray-400":"left"===c||"right"===c,"!gp-items-end":"left"===c,"!gp-items-start":"right"===c,"gp-justify-center":"bottom-center"===c}),style:{...core.makeStyleResponsive("gg",common.convertSpacingPx(i?.spacing))},children:t?.map((e,t)=>{let r=t===l,c="VIDEO"==e.contentType||"EXTERNAL_VIDEO"==e.contentType||"MODEL_3D"==e.contentType?e?.previewImage:e?.src;return jsxRuntime.jsxs("div",{"aria-hidden":!0,className:core.cls("gp-group gp-relative gp-cursor-pointer gp-overflow-hidden gp-outline-1 -gp-outline-offset-1",{outline:r&&!!i?.showActiveStatus}),onClick:()=>o(e?.id||""),style:{...core.makeStyleResponsive("aspect",i?.aspectRatio),...productGallery.getStyleWidthForGridItem(i?.numberPerRow,i?.spacing,i?.position),maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)"},children:[jsxRuntime.jsx(NextImage.default,{src:c,width:e?.width,height:e?.height,alt:e?.alt,setting:{aspectRatio:a,layout:i?.layout},style:{width:"100%",height:"100%"}},e?.id),("VIDEO"==e.contentType||"EXTERNAL_VIDEO"==e.contentType)&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("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",strokeMiterlimit:"10"})]})}),"MODEL_3D"==e.contentType&&jsxRuntime.jsx("div",{className:"gp-absolute gp-bottom-0 gp-right-0 gp-pb-1 gp-pr-1",children:jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{opacity:"0.9",width:"24",height:"24",rx:"3",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"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"})]})}),core.getResponsiveValueByScreen(i?.largeViewInPopup,s)&&jsxRuntime.jsx("div",{className:"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-all gp-duration-100 group-hover:gp-opacity-100",children:jsxRuntime.jsx("svg",{height:"100%",width:"100%",xmlns:"http://www.w3.org/2000/svg",className:"gp-h-6 gp-w-6",viewBox:"0 0 512 512",color:"#fff",children:jsxRuntime.jsx("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M62.2467 345.253C43.7072 326.714 29.1474 305.116 18.9714 281.057C8.42839 256.13 3.08301 229.671 3.08301 202.418C3.08301 175.165 8.43012 148.707 18.974 123.78C29.15 99.7213 43.7098 78.123 62.2485 59.5834C80.788 41.0439 102.386 26.4841 126.445 16.3081C151.372 5.76422 177.831 0.417969 205.084 0.417969C232.337 0.417969 258.794 5.76421 283.722 16.3064C307.78 26.4823 329.379 41.0422 347.918 59.5817C366.458 78.1212 381.017 99.7196 391.194 123.778C401.737 148.706 407.083 175.163 407.083 202.417C407.083 229.671 401.737 256.129 391.194 281.056C388.406 287.648 385.277 294.048 381.839 300.257L493.397 411.815C514.091 432.511 514.091 466.187 493.395 486.883L484.272 496.006C474.245 506.032 460.915 511.553 446.738 511.553C432.559 511.553 419.228 506.032 409.202 496.006L296.022 382.824C291.996 384.854 287.898 386.762 283.721 388.528C258.794 399.073 232.336 404.419 205.082 404.419C177.828 404.419 151.371 399.071 126.443 388.528C102.385 378.352 80.7863 363.793 62.2467 345.253ZM301.699 336.166C313.928 327.317 324.896 316.835 334.282 305.034C342.149 295.142 348.9 284.325 354.355 272.775C364.433 251.432 370.076 227.586 370.076 202.419C370.076 111.296 296.206 37.4253 205.083 37.4253C113.96 37.4253 40.0895 111.294 40.0895 202.418C40.0895 293.541 113.96 367.411 205.084 367.411C227.413 367.411 248.701 362.967 268.126 354.928C280.091 349.976 291.347 343.658 301.699 336.166ZM467.229 460.716C473.507 454.439 473.507 444.26 467.229 437.982L360.595 331.348C356.601 336.153 352.378 340.794 347.919 345.253C341.671 351.502 335.068 357.286 328.147 362.615L435.371 469.839C438.511 472.977 442.624 474.547 446.739 474.547C450.853 474.547 454.967 472.978 458.106 469.839L467.229 460.716ZM223.582 183.91H281.071C291.292 183.91 299.574 192.194 299.575 202.414C299.575 206.778 298.062 210.786 295.533 213.951C292.143 218.195 286.926 220.916 281.072 220.916H228.303H223.583V225.63V278.406C223.583 287.081 217.613 294.358 209.559 296.361C208.124 296.717 206.625 296.909 205.08 296.909C194.861 296.909 186.577 288.625 186.577 278.406V220.917H129.087C118.868 220.917 110.584 212.633 110.584 202.414C110.584 192.195 118.868 183.911 129.087 183.911H186.576V126.421C186.576 116.202 194.86 107.918 205.079 107.918C215.298 107.918 223.582 116.202 223.582 126.421V183.91Z"})})})]},e?.id)})})};exports.default=ProductGalleryGrid;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Carousel=require("../../../carousel/components/Carousel.js"),CarouselItem=require("../../../carousel/components/CarouselItem.js"),NextImage=require("../../../image/components/NextImage.js");require("../../../modal/components/confirm.js");var Modal=require("../../../modal/components/Modal.js"),react=require("react"),productFeaturedImage=require("./common/productFeaturedImage.js");const ProductImagesLightBox=({builderPropUID:e,productImages:t,open:o,imageRatio:s,onHandleClose:r})=>{let l=core.useFeaturedImageGlobal(),i=react.useMemo(()=>{let e=t?.findIndex(e=>e.id===l?.id);return e&&e>0?e:0},[t,l]),a={desktop:t&&t.length>1,mobile:t&&t?.length>1,tablet:t&&t?.length>1},d={desktop:!1,mobile:!1,tablet:!1};return jsxRuntime.jsx(Modal.default,{setting:{open:o},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>r(),disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2",children:jsxRuntime.jsx(Carousel.default,{setting:{loop:d,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"},controlOverContent:{desktop:!0,mobile:!0,tablet:!0},arrow:a},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:i,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:e},children:t?.map(t=>jsxRuntime.jsx(CarouselItem.default,{className:`gem-slider-item gem-slider-item-${e} gp-flex gp-items-center gp-justify-center gp-px-4`,children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(t?.contentType)?t?.previewImage:t?.src,width:t?.width,height:t?.height,alt:t?.alt,"content-type":t?.contentType,setting:{aspectRatio:s},className:core.cls("gp-h-full gp-w-full gp-object-contain")},t?.id)},t?.id))})})};exports.default=ProductImagesLightBox;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Carousel=require("../../../carousel/components/Carousel.js"),CarouselItem=require("../../../carousel/components/CarouselItem.js"),NextImage=require("../../../image/components/NextImage.js");require("../../../modal/components/confirm.js");var Modal=require("../../../modal/components/Modal.js"),React=require("react"),productFeaturedImage=require("./common/productFeaturedImage.js");const ProductImagesLightBox=({builderPropUID:e,productImages:t,open:o,imageRatio:s,onHandleClose:l})=>{let i=core.useFeaturedImageGlobal(),r=React.useMemo(()=>{let e=t?.findIndex(e=>e.id===i?.id);return e&&e>0?e:0},[t,i]),a={desktop:t&&t.length>1,mobile:t&&t?.length>1,tablet:t&&t?.length>1},d={desktop:!1,mobile:!1,tablet:!1};return jsxRuntime.jsx(Modal.default,{setting:{open:o},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>l(),disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2",children:jsxRuntime.jsx(Carousel.default,{setting:{loop:d,slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:r,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"},controlOverContent:{desktop:!0,mobile:!0,tablet:!0},arrow:a},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:r,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:e},children:t?.map(t=>jsxRuntime.jsx(CarouselItem.default,{className:`gem-slider-item gem-slider-item-${e} gp-flex gp-items-center gp-justify-center gp-px-4`,children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(t?.contentType)?t?.previewImage:t?.src,width:t?.width,height:t?.height,alt:t?.alt,"content-type":t?.contentType,setting:{aspectRatio:s},className:core.cls("gp-h-full gp-w-full gp-object-contain")},t?.id)},t?.id))})})};exports.default=ProductImagesLightBox;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),ProductFeaturedImage=require("./ProductImages/ProductFeaturedImage.js"),productImage=require("../helpers/product-image.js"),common=require("./ProductImages/common/common.js"),ProductGalleryCarousel=require("./ProductImages/ProductGalleryCarousel.js"),ProductGalleryGrid=require("./ProductImages/ProductGalleryGrid.js"),ProductImagesLightBox=require("./ProductImages/ProductImagesLightBox.js"),productGallery=require("./ProductImages/common/productGallery.js");const DEVICES=["mobile","tablet","desktop"],getProductGallery=e=>e?.medias?.edges.map(e=>e?.node),ProductImages=e=>{let{setting:t,styles:r,builderProps:o,builderAttrs:i,style:s,children:a}=e,l={...e.styles,...e.setting},u={...e.styles,...e.setting},c=core.useProduct(),n=core.useCurrentDevice(),g=core.useCurrentVariant(),m=core.useProductStore(e=>e.setProductFeaturedImage),[d,p]=react.useState(!1),[f,y]=react.useState(100),b=react.useRef(null),h=core.getResponsiveValueByScreen(t?.galleryVisible,n),I=core.getResponsiveValueByScreen(t?.featureImageVisible,n),P=react.useMemo(()=>core.getResponsiveValueByScreen(r?.position,n),[n,r?.position]),j=react.useMemo(()=>productGallery.getStyleWidthForGallery({galleryVisible:t?.galleryVisible,featureImageVisible:t?.featureImageVisible,position:r?.position,width:r?.width,widthHorizontalLayout:r?.widthHorizontalLayout}),[r?.position,r?.width,r?.widthHorizontalLayout,t?.galleryVisible,t?.featureImageVisible]),x=react.useMemo(()=>{let e=getProductGallery(c);return e?.length?e:[{id:c?.featuredImage?.id||"noImageError",src:c?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:c?.featuredImage?.width||480,height:c?.featuredImage?.height||480}]},[c]),V=react.useMemo(()=>common.getStyleAlignment(r?.align,r?.position),[r?.position,r?.align]),v=react.useMemo(()=>x.reduce((e,t,r)=>t?{...e,[t.id]:r}:e,{}),[x]),R=react.useMemo(()=>productGallery.getStyleGallerySpacing(r?.position,r?.gallerySpacing),[r?.position,r?.gallerySpacing]),S=react.useMemo(()=>common.checkAddOverFlowClass(s),[s]),G=react.useMemo(()=>{let e={};return DEVICES.forEach(o=>{let i=common.convertUnitToNumber(r?.height?.[o],0),s=core.getResponsiveValueByScreen(t?.galleryVisible,o),a=core.getResponsiveValueByScreen(t?.featureImageVisible,o),l=core.getResponsiveValueByScreen(r?.position,o),u=("left"===l||"right"===l)&&s&&a;e=i?"number"==typeof r?.height?.[o]?{...e,[o]:r?.height?.[o]+"px"}:r?.height?.[o]?.includes("%")?{...e,[o]:common.convertUnitToNumber(r?.height?.[o],f)*f/100+"px"}:{...e,[o]:r?.height?.[o]}:{...e,[o]:u?f+"px":"auto"}}),e},[f,r?.height,r?.position,t?.featureImageVisible,t?.galleryVisible]),w=react.useCallback(()=>core.makeStyleResponsive("h",core.makeHeight(G)),[G]);react.useEffect(()=>{if(g){let e=v[g?.mediaId]||0,t=x[e]??c?.featuredImage;t&&m(t)}},[g,v,x,c?.featuredImage,m]),react.useEffect(()=>{let e=null;return b?.current&&(e=new ResizeObserver(()=>{y(b?.current?.offsetHeight||0)})).observe(b.current,{}),()=>{e?.disconnect()}},[t?.featureImageVisible,n]),react.useEffect(()=>{t?.featureImageVisible&&setTimeout(()=>{y(b?.current?.offsetHeight||0)},100)},[t?.featureImageVisible,n]);let k=e=>{if(!e)return;let t=v[e];if(void 0!==t){let e=x[t];e&&m(e)}},B=e=>{let r=t?.clickEffect=="popup"||core.getResponsiveValueByScreen(t?.largeViewInPopup,n);r&&p(!0),k(e)},C=e=>{let r=core.getResponsiveValueByScreen(t?.largeViewInPopup,n);r&&B(e),k(e)};return jsxRuntime.jsxs("div",{...i,className:core.cls(o?.uid,{"gp-overflow-hidden":S}),style:{...s},children:[jsxRuntime.jsxs("div",{className:core.cls("gp-flex gp-w-full",{...productImage.getFlexDirection(e)}),style:{...V},children:[I&&jsxRuntime.jsx(ProductFeaturedImage.default,{imgRef:b,productImages:x,...l,onOpenLightBox:()=>p(!0)}),h&&x.length>1&&jsxRuntime.jsx("div",{className:core.cls("gp-product-images-gallery gp-inline-flex gp-h-fit gp-max-w-full",{"gp-justify-start":r?.position?.desktop=="bottom-left","tablet:gp-justify-start":r?.position?.tablet=="bottom-left","mobile:gp-justify-start":r?.position?.mobile=="bottom-left","gp-justify-center":r?.position?.desktop=="bottom-center","tablet:gp-justify-center":r?.position?.tablet=="bottom-center","mobile:gp-justify-center":r?.position?.mobile=="bottom-center","gp-mx-auto":"bottom-center"==P}),style:{...core.makeStyle({fs:"1.23"}),...j,...R,...w()},children:"slider"===common.getTypeWidthDevice(t?.type)[n]||"left"===P||"right"===P?jsxRuntime.jsx(ProductGalleryCarousel.default,{productImages:x,...u,builderPropUID:o?.uid,onHandleClick:e=>C(e||"")}):jsxRuntime.jsx(ProductGalleryGrid.default,{productImages:x,...u,builderPropUID:o?.uid,onHandleClick:e=>C(e||"")})})]}),(t?.clickEffect=="popup"||core.getResponsiveValueByScreen(t?.largeViewInPopup,n))&&jsxRuntime.jsx(ProductImagesLightBox.default,{productImages:x,builderPropUID:o?.uid,open:d,onHandleClose:()=>p(!1),imageRatio:r?.ftAspectRatio}),a]})};exports.default=ProductImages;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),ProductFeaturedImage=require("./ProductImages/ProductFeaturedImage.js"),productImage=require("../helpers/product-image.js"),common=require("./ProductImages/common/common.js"),ProductGalleryCarousel=require("./ProductImages/ProductGalleryCarousel.js"),ProductGalleryGrid=require("./ProductImages/ProductGalleryGrid.js"),ProductImagesLightBox=require("./ProductImages/ProductImagesLightBox.js"),productGallery=require("./ProductImages/common/productGallery.js");const DEVICES=["mobile","tablet","desktop"],getProductGallery=e=>e?.medias?.edges.map(e=>e?.node),ProductImages=e=>{let{setting:t,styles:r,builderProps:o,builderAttrs:i,style:s,children:a}=e,l={...e.styles,...e.setting},u={...e.styles,...e.setting},c=core.useProduct(),n=core.useCurrentDevice(),g=core.useCurrentVariant(),m=core.useProductStore(e=>e.setProductFeaturedImage),[d,p]=React.useState(!1),[f,y]=React.useState(100),b=React.useRef(null),h=core.getResponsiveValueByScreen(t?.galleryVisible,n),I=core.getResponsiveValueByScreen(t?.featureImageVisible,n),R=React.useMemo(()=>core.getResponsiveValueByScreen(r?.position,n),[n,r?.position]),P=React.useMemo(()=>productGallery.getStyleWidthForGallery({galleryVisible:t?.galleryVisible,featureImageVisible:t?.featureImageVisible,position:r?.position,width:r?.width,widthHorizontalLayout:r?.widthHorizontalLayout}),[r?.position,r?.width,r?.widthHorizontalLayout,t?.galleryVisible,t?.featureImageVisible]),j=React.useMemo(()=>{let e=getProductGallery(c);return e?.length?e:[{id:c?.featuredImage?.id||"noImageError",src:c?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:c?.featuredImage?.width||480,height:c?.featuredImage?.height||480}]},[c]),x=React.useMemo(()=>common.getStyleAlignment(r?.align,r?.position),[r?.position,r?.align]),V=React.useMemo(()=>j.reduce((e,t,r)=>t?{...e,[t.id]:r}:e,{}),[j]),v=React.useMemo(()=>productGallery.getStyleGallerySpacing(r?.position,r?.gallerySpacing),[r?.position,r?.gallerySpacing]),S=React.useMemo(()=>common.checkAddOverFlowClass(s),[s]),G=React.useMemo(()=>{let e={};return DEVICES.forEach(o=>{let i=common.convertUnitToNumber(r?.height?.[o],0),s=core.getResponsiveValueByScreen(t?.galleryVisible,o),a=core.getResponsiveValueByScreen(t?.featureImageVisible,o),l=core.getResponsiveValueByScreen(r?.position,o),u=("left"===l||"right"===l)&&s&&a;e=i?"number"==typeof r?.height?.[o]?{...e,[o]:r?.height?.[o]+"px"}:r?.height?.[o]?.includes("%")?{...e,[o]:common.convertUnitToNumber(r?.height?.[o],f)*f/100+"px"}:{...e,[o]:r?.height?.[o]}:{...e,[o]:u?f+"px":"auto"}}),e},[f,r?.height,r?.position,t?.featureImageVisible,t?.galleryVisible]),w=React.useCallback(()=>core.makeStyleResponsive("h",core.makeHeight(G)),[G]);React.useEffect(()=>{if(g){let e=V[g?.mediaId]||0,t=j[e]??c?.featuredImage;t&&m(t)}},[g,V,j,c?.featuredImage,m]),React.useEffect(()=>{let e=null;return b?.current&&(e=new ResizeObserver(()=>{y(b?.current?.offsetHeight||0)})).observe(b.current,{}),()=>{e?.disconnect()}},[t?.featureImageVisible,n]),React.useEffect(()=>{t?.featureImageVisible&&setTimeout(()=>{y(b?.current?.offsetHeight||0)},100)},[t?.featureImageVisible,n]);let k=e=>{if(!e)return;let t=V[e];if(void 0!==t){let e=j[t];e&&m(e)}},B=e=>{let r=t?.clickEffect=="popup"||core.getResponsiveValueByScreen(t?.largeViewInPopup,n);r&&p(!0),k(e)},C=e=>{let r=core.getResponsiveValueByScreen(t?.largeViewInPopup,n);r&&B(e),k(e)};return jsxRuntime.jsxs("div",{...i,className:core.cls(o?.uid,{"gp-overflow-hidden":S}),style:{...s},children:[jsxRuntime.jsxs("div",{className:core.cls("gp-flex gp-w-full",{...productImage.getFlexDirection(e)}),style:{...x},children:[I&&jsxRuntime.jsx(ProductFeaturedImage.default,{imgRef:b,productImages:j,...l,onOpenLightBox:()=>p(!0)}),h&&j.length>1&&jsxRuntime.jsx("div",{className:core.cls("gp-product-images-gallery gp-inline-flex gp-h-fit gp-max-w-full",{"gp-justify-start":r?.position?.desktop=="bottom-left","tablet:gp-justify-start":r?.position?.tablet=="bottom-left","mobile:gp-justify-start":r?.position?.mobile=="bottom-left","gp-justify-center":r?.position?.desktop=="bottom-center","tablet:gp-justify-center":r?.position?.tablet=="bottom-center","mobile:gp-justify-center":r?.position?.mobile=="bottom-center","gp-mx-auto":"bottom-center"==R}),style:{...core.makeStyle({fs:"1.23"}),...P,...v,...w()},children:"slider"===common.getTypeWidthDevice(t?.type)[n]||"left"===R||"right"===R?jsxRuntime.jsx(ProductGalleryCarousel.default,{productImages:j,...u,builderPropUID:o?.uid,onHandleClick:e=>C(e||"")}):jsxRuntime.jsx(ProductGalleryGrid.default,{productImages:j,...u,builderPropUID:o?.uid,onHandleClick:e=>C(e||"")})})]}),(t?.clickEffect=="popup"||core.getResponsiveValueByScreen(t?.largeViewInPopup,n))&&jsxRuntime.jsx(ProductImagesLightBox.default,{productImages:j,builderPropUID:o?.uid,open:d,onHandleClose:()=>p(!1),imageRatio:r?.ftAspectRatio}),a]})};exports.default=ProductImages;
@@ -1,11 +1,11 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),common=require("../common/common.js"),core=require("@gem-sdk/core"),react=require("react"),FeatureImageWithGallery=require("./layouts/FeatureImageWithGallery.js"),GalleryOneCol=require("./layouts/GalleryOneCol.js"),GalleryTwoCol=require("./layouts/GalleryTwoCol.js"),OnlyFeatureImage=require("./layouts/OnlyFeatureImage.js"),ProductImagesLightBox=require("./components/ProductImagesLightBox.js"),productFeaturedImage=require("../common/productFeaturedImage.js"),productBadgeSetting=require("../common/product-badge-setting.js");const getProductGallery=e=>e?.medias?.edges.map(e=>e?.node),LAYOUT_FEATURE_IMAGE_GALLERY=["bottom-left","bottom-center","left","right","inside-left","inside-right","inside-bottom"],ProductImagesV2=e=>{let{setting:t,styles:r,builderProps:a,builderAttrs:o,style:i,children:s,advanced:l}=e,c=react.useMemo(()=>common.checkAddOverFlowClass(i),[i]),n=core.useProduct(),u=core.useCurrentDevice(),d=core.useCurrentVariant(),m=core.useEditorMode(),g=core.useProductStore(e=>e.setProductFeaturedImage),p=l?.cssClass,[y,f]=react.useState(!1),[h,I]=react.useState(!0),x=e=>e?.medias?.edges.find(e=>e?.node?.contentType==="VIDEO")?.node,j=e=>e?.featuredImage,v=e=>e?.medias?.edges.find(e=>e?.node?.contentType==="MODEL_3D")?.node,R=react.useMemo(()=>{if(t?.typeDisplay==="all-images"){let e;switch(I(!0),t?.preDisplay){case"1st-images":e=j(n),I(!1);break;case"1st-3d-mode":e=v(n),I(!1);break;case"1st-video":e=x(n),I(!1);break;case"1st-available-variant":e=d?.media,I(!1)}return g(e),e}},[t?.typeDisplay,t?.preDisplay,n,g,d?.media]),b=react.useMemo(()=>{let e=getProductGallery(n)?.map(e=>(e&&(e.src=productFeaturedImage.isFeatureMedia(e.contentType)?e?.previewImage:e.src),e));return e?.length?e:[{id:n?.featuredImage?.id||"noImageError",src:n?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:n?.featuredImage?.width||480,height:n?.featuredImage?.height||480}]},[n]),C=react.useMemo(()=>b.reduce((e,t,r)=>t?{...e,[t.id]:r}:e,{}),[b]),w=react.useMemo(()=>core.getResponsiveValueByScreen(r?.position,u),[u,r?.position]),L=(e,t)=>{k(e),t&&O()},O=()=>{f(!0)},k=e=>{if(!e)return;let t=C[e];if(void 0!==t){let e=b[t];e&&g(e)}};react.useEffect(()=>{if(d&&h){let e=C[d?.mediaId];if(void 0!==e){let t=b[e]??n?.featuredImage;t&&g(t)}}},[d,C,b,n?.featuredImage,g,h]);let P=react.useMemo(()=>{let e="popup"===core.getResponsiveValueByScreen(t?.ftClickOpenLightBox,u)||core.getResponsiveValueByScreen(t?.clickOpenLightBox,u);return e||"edit"!==m||window?.parent?.postMessage?.(JSON.stringify({type:"active-modal",value:open}),"*"),e},[t?.ftClickOpenLightBox,t?.clickOpenLightBox,u,m]),F=`
2
- .gem-slider-item-active.gem-slider-item-${a?.uid}.gp-gallery-image-item::after {
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),common=require("../common/common.js"),core=require("@gem-sdk/core"),React=require("react"),FeatureImageWithGallery=require("./layouts/FeatureImageWithGallery.js"),GalleryOneCol=require("./layouts/GalleryOneCol.js"),GalleryTwoCol=require("./layouts/GalleryTwoCol.js"),OnlyFeatureImage=require("./layouts/OnlyFeatureImage.js"),ProductImagesLightBox=require("./components/ProductImagesLightBox.js"),productFeaturedImage=require("../common/productFeaturedImage.js"),productBadgeSetting=require("../common/product-badge-setting.js");const getProductGallery=e=>e?.medias?.edges.map(e=>e?.node),LAYOUT_FEATURE_IMAGE_GALLERY=["bottom-left","bottom-center","left","right","inside-left","inside-right","inside-bottom"],ProductImagesV2=e=>{let{setting:t,styles:a,builderProps:r,builderAttrs:o,style:i,children:s,advanced:l}=e,c=React.useMemo(()=>common.checkAddOverFlowClass(i),[i]),n=core.useProduct(),u=core.useCurrentDevice(),d=core.useCurrentVariant(),m=core.useEditorMode(),g=core.useProductStore(e=>e.setProductFeaturedImage),p=l?.cssClass,[y,f]=React.useState(!1),[h,R]=React.useState(!0),I=e=>e?.medias?.edges.find(e=>e?.node?.contentType==="VIDEO")?.node,x=e=>e?.featuredImage,j=e=>e?.medias?.edges.find(e=>e?.node?.contentType==="MODEL_3D")?.node,v=React.useMemo(()=>{if(t?.typeDisplay==="all-images"){let e;switch(R(!0),t?.preDisplay){case"1st-images":e=x(n),R(!1);break;case"1st-3d-mode":e=j(n),R(!1);break;case"1st-video":e=I(n),R(!1);break;case"1st-available-variant":e=d?.media,R(!1)}return g(e),e}},[t?.typeDisplay,t?.preDisplay,n,g,d?.media]),b=React.useMemo(()=>{let e=getProductGallery(n)?.map(e=>(e&&(e.src=productFeaturedImage.isFeatureMedia(e.contentType)?e?.previewImage:e.src),e));return e?.length?e:[{id:n?.featuredImage?.id||"noImageError",src:n?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:n?.featuredImage?.width||480,height:n?.featuredImage?.height||480}]},[n]),C=React.useMemo(()=>b.reduce((e,t,a)=>t?{...e,[t.id]:a}:e,{}),[b]),w=React.useMemo(()=>core.getResponsiveValueByScreen(a?.position,u),[u,a?.position]),L=(e,t)=>{k(e),t&&O()},O=()=>{f(!0)},k=e=>{if(!e)return;let t=C[e];if(void 0!==t){let e=b[t];e&&g(e)}};React.useEffect(()=>{if(d&&h){let e=C[d?.mediaId];if(void 0!==e){let t=b[e]??n?.featuredImage;t&&g(t)}}},[d,C,b,n?.featuredImage,g,h]);let P=React.useMemo(()=>{let e="popup"===core.getResponsiveValueByScreen(t?.ftClickOpenLightBox,u)||core.getResponsiveValueByScreen(t?.clickOpenLightBox,u);return e||"edit"!==m||window?.parent?.postMessage?.(JSON.stringify({type:"active-modal",value:open}),"*"),e},[t?.ftClickOpenLightBox,t?.clickOpenLightBox,u,m]),F=`
2
+ .gem-slider-item-active.gem-slider-item-${r?.uid}.gp-gallery-image-item::after {
3
3
  content: "";
4
4
  height: 100%;
5
5
  width: 100%;
6
6
  position: absolute;
7
7
  z-index: 1000;
8
8
  ${core.composeBorderCss(t?.borderActive)}
9
- ${core.composeCornerCss(r?.corner)}
9
+ ${core.composeCornerCss(a?.corner)}
10
10
  }
11
- `,G=productBadgeSetting.getProductBadgeContainerStyles(r?.position,{layoutRatioLeft:r?.ratioLayout,layoutRatioRight:r?.ratioLayoutRight,spacing:r?.spacing},b.length>1);return jsxRuntime.jsxs("div",{...o,className:core.cls(a?.uid,{"gp-overflow-hidden":c},"gp-relative",p),style:{...i},children:[jsxRuntime.jsx("style",{children:F}),LAYOUT_FEATURE_IMAGE_GALLERY.includes(w)&&jsxRuntime.jsx(FeatureImageWithGallery.default,{...e,gallery:b,priorityFeatureImage:R,onHandleClickImage:(e,t)=>L(e||"",t)}),"only-feature"===w&&jsxRuntime.jsx(OnlyFeatureImage.default,{gallery:b,...e,onHandleClickImage:(e,t)=>L(e||"",t)}),"one-col"===w&&jsxRuntime.jsx(GalleryOneCol.default,{gallery:b,...e,onHandleClickImage:(e,t)=>L(e||"",t)}),"two-col"===w&&jsxRuntime.jsx(GalleryTwoCol.default,{gallery:b,...e,onHandleClickImage:(e,t)=>L(e||"",t)}),P&&jsxRuntime.jsx(ProductImagesLightBox.default,{productImages:b,builderPropUID:a?.uid,open:y,onHandleClose:()=>f(!1),imageRatio:common.getAspectRatio(r?.ftShape)}),b.length>0&&jsxRuntime.jsx("div",{className:core.cls("product-badge-container gp-absolute gp-top-0"),style:{...core.makeStyleResponsive("w",G.width),...core.makeStyleResponsive("h",G.height),...core.makeStyleResponsive("left",G.left)},children:jsxRuntime.jsx("div",{className:"gp-relative gp-w-full gp-h-full gp-top-0",children:react.Children.map(core.filterToolbarPreview(s),e=>react.isValidElement(e)?jsxRuntime.jsx(e.type,{...e.props,isInsideProductImage:!0}):null)})}),core.filterToolbarPreview(s,!0)]})};exports.default=ProductImagesV2;
11
+ `,G=productBadgeSetting.getProductBadgeContainerStyles(a?.position,{layoutRatioLeft:a?.ratioLayout,layoutRatioRight:a?.ratioLayoutRight,spacing:a?.spacing},b.length>1);return jsxRuntime.jsxs("div",{...o,className:core.cls(r?.uid,{"gp-overflow-hidden":c},"gp-relative",p),style:{...i},children:[jsxRuntime.jsx("style",{children:F}),LAYOUT_FEATURE_IMAGE_GALLERY.includes(w)&&jsxRuntime.jsx(FeatureImageWithGallery.default,{...e,gallery:b,priorityFeatureImage:v,onHandleClickImage:(e,t)=>L(e||"",t)}),"only-feature"===w&&jsxRuntime.jsx(OnlyFeatureImage.default,{gallery:b,...e,onHandleClickImage:(e,t)=>L(e||"",t)}),"one-col"===w&&jsxRuntime.jsx(GalleryOneCol.default,{gallery:b,...e,onHandleClickImage:(e,t)=>L(e||"",t)}),"two-col"===w&&jsxRuntime.jsx(GalleryTwoCol.default,{gallery:b,...e,onHandleClickImage:(e,t)=>L(e||"",t)}),P&&jsxRuntime.jsx(ProductImagesLightBox.default,{productImages:b,builderPropUID:r?.uid,open:y,onHandleClose:()=>f(!1),imageRatio:common.getAspectRatio(a?.ftShape)}),b.length>0&&jsxRuntime.jsx("div",{className:core.cls("product-badge-container gp-absolute gp-top-0"),style:{...core.makeStyleResponsive("w",G.width),...core.makeStyleResponsive("h",G.height),...core.makeStyleResponsive("left",G.left)},children:jsxRuntime.jsx("div",{className:"gp-relative gp-w-full gp-h-full gp-top-0",children:React.Children.map(core.filterToolbarPreview(s),e=>React.isValidElement(e)?jsxRuntime.jsx(e.type,{...e.props,isInsideProductImage:!0}):null)})}),core.filterToolbarPreview(s,!0)]})};exports.default=ProductImagesV2;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),hoverAction=require("../../common/hoverAction.js"),MediaIcon=require("./MediaIcon.js"),NextImage=require("../../../../../image/components/NextImage.js"),react=require("react"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductFeaturedImageCarousel=({productImages:e,imgRef:t,onHandleClick:o,onClickArrow:r,onHandleLoaded:a,onHandleUpdateActiveIndex:i,builderPropUID:s,builderPropsClass:l,...u})=>{let n;let c=core.useFeaturedImageGlobal(),d=core.useCurrentDevice(),g=core.useEditorMode(),m=core.useProduct(),p=core.useShopStore(e=>e.storefrontUrl),h=react.useMemo(()=>{let t=e?.findIndex(e=>e.id===c?.id);return t&&t>0?t:0},[e,c]),f=react.useCallback(()=>{getSrcSet.handleSetSrcForFeatureProductImage({builderPropUID:s,ftShape:u.ftShape,qualityType:u.qualityType,qualityPercent:u.qualityPercent})},[u.ftShape,u.qualityPercent,u.qualityType,s]),y=react.useMemo(()=>core.getResponsiveValueByScreen(u?.position,d),[d,u?.position]);react.useEffect(()=>{if("edit"===g)return;let e=document?.querySelector(`.gem-slider-item-${s} .featured-image-only`);if(!e)return;f();let t=new ResizeObserver(()=>{f()});return t?.observe(e,{}),()=>{t?.disconnect()}},[f,s,g]);let S=react.useMemo(()=>({desktop:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"desktop"),tablet:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"tablet"),mobile:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"mobile")}),[u.ftNavigationPosition]),v=react.useMemo(()=>"popup"===core.getResponsiveValueByScreen(u.ftClickOpenLightBox,d),[u.ftClickOpenLightBox,d]),w=react.useMemo(()=>{if(!p)return"#";let e=new URL(p);return m?`${e.protocol}//${e.host}/products/${m.handle}`:"#"},[p,m]),x=react.useMemo(()=>{let e={},t=["desktop","mobile","tablet"];return t.forEach(t=>{let o=core.getResponsiveValueByScreen(u.ftShape,t),r=o?.width;e={...e,[t]:r||"100%"}}),e},[u.ftShape]),C=react.useMemo(()=>core.getHeightByShapeGlobalSize(u.ftShape),[u.ftShape]),I=react.useMemo(()=>u?.hoverEffect==="other"?e?.[u?.otherImage?u.otherImage:0]:e?.find(e=>e.id===c?.id)||e?.[0],[c,e,u?.hoverEffect,u?.otherImage]),b=function(){return Math.random().toString(36).substr(2,5)},j=e=>{n&&clearTimeout(n),n=setTimeout(()=>i&&i(e),500)},k=e=>"product-link"===core.getResponsiveValueByScreen(u.ftClickOpenLightBox,d)?jsxRuntime.jsx("a",{title:m?.title,href:w,className:"gp-w-full",children:e}):e,R=()=>{let t="1/1",o=0;return e?.forEach(e=>{if(e.width&&e.height){let r=e.height/e.width;r>o&&(o=r,t=`${e.width}/${e.height}`)}}),t},B=()=>{let e=common.getAspectRatio(u.ftShape),t=R();return{desktop:e.desktop||t,tablet:e.tablet||t,mobile:e.mobile||t}};return jsxRuntime.jsx("div",{"data-slot":"children",className:"product-feature-image",children:jsxRuntime.jsx(Carousel.default,{parentClass:l,elmRef:t,setting:{loop:u?.ftLoop,dotStyle:productFeaturedImage.getDotSettingByLayout(y,u.ftDotStyle),dotSize:productFeaturedImage.getDotSettingByLayout(y,u.ftDotSize),dotGapToCarousel:productFeaturedImage.getDotSettingByLayout(y,u.ftDotGapToCarousel),dotColor:productFeaturedImage.getDotSettingByLayout(y,u.ftDotColor),dotActiveColor:productFeaturedImage.getDotSettingByLayout(y,u.ftDotActiveColor),itemNumber:{desktop:1},slidesToShow:{desktop:1},defaultCurrentSlider:h,controlOverContent:S,enableDrag:{desktop:u?.ftDragToScroll,tablet:u?.ftDragToScroll,mobile:u?.ftDragToScroll},arrowCustom:u?.ftArrowIcon,arrowCustomColor:u?.ftArrowIconColor,arrowBackgroundColor:u?.ftArrowNavColor,arrowBorder:{desktop:u?.ftArrowNavBorder},roundedArrow:{desktop:u?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:u?.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},styles:{sizeSetting:{desktop:{width:x?.desktop||"100%",height:"auto"},tablet:{width:x?.tablet||"100%",height:"auto"},mobile:{width:x?.mobile||"100%",height:"auto"}},align:{desktop:core.getResponsiveValueByScreen(u?.align,"desktop"),tablet:core.getResponsiveValueByScreen(u?.align,"tablet"),mobile:core.getResponsiveValueByScreen(u?.align,"mobile")}},builderProps:{uid:s},isHiddenArrowWhenDisabled:!0,onLoaded:e=>a&&a(e),onChangeActive:e=>j(e),onClickArrow:()=>r&&r(b()),moveToIdx:h,disableMarginAuto:!0,children:e?.map(e=>jsxRuntime.jsx(CarouselItem.default,{contentType:"productImage",className:core.cls(`gem-slider-item !gp-min-w-full !gp-max-w-full gem-slider-item-${s} gp-ft-image-item gp-group gp-relative gp-flex gp-w-full gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1`),onClick:()=>{o(e?.id||"",v)},style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.composeRadius({normal:u.ftCorner}),...core.makeStyleResponsive("h",core.makeHeight(C))},onMouseMove:e=>hoverAction.handleMouseMove(e,u),onMouseOut:e=>hoverAction.handleMouseOut(e),children:k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NextImage.default,{src:e.src,width:e?.width,height:e?.height,alt:e?.alt,setting:{aspectRatio:B(),layout:u?.ftLayout},className:"featured-image-only",priority:u?.preload,style:{width:"100%",height:"100%",cursor:"pointer"}}),jsxRuntime.jsx(MediaIcon.default,{contentType:e?.contentType||""}),u?.hoverEffect!=="none"&&!productFeaturedImage.isFeatureMedia(e?.contentType)&&jsxRuntime.jsx(NextImage.default,{src:u?.hoverEffect==="other"?I?.src:e.src,width:u?.hoverEffect==="other"?I?.width:e.width,height:u?.hoverEffect==="other"?I?.height:e.height,alt:u?.hoverEffect==="other"?I?.alt:e.alt,setting:{aspectRatio:B(),layout:u?.ftLayout},style:{width:"100%",height:"100%"},className:core.cls("hover-image featured-image-only !gp-max-w-none",productFeaturedImage.getZoomImageClass()),priority:u?.preload}),u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!productFeaturedImage.isFeatureMedia(e?.contentType)&&jsxRuntime.jsx("div",{className:core.cls(productFeaturedImage.getZoomLenClass(),"room-len"),style:{...core.makeStyle({bgi:`url("${e?.src}")`})}})]}))},e?.id))})})};var ProductFeaturedImageCarousel$1=react.memo(ProductFeaturedImageCarousel);exports.default=ProductFeaturedImageCarousel$1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),hoverAction=require("../../common/hoverAction.js"),MediaIcon=require("./MediaIcon.js"),NextImage=require("../../../../../image/components/NextImage.js"),React=require("react"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductFeaturedImageCarousel=({productImages:e,imgRef:t,onHandleClick:o,onClickArrow:r,onHandleLoaded:a,onHandleUpdateActiveIndex:i,builderPropUID:s,builderPropsClass:l,...u})=>{let n;let c=core.useFeaturedImageGlobal(),d=core.useCurrentDevice(),g=core.useEditorMode(),m=core.useProduct(),p=core.useShopStore(e=>e.storefrontUrl),h=React.useMemo(()=>{let t=e?.findIndex(e=>e.id===c?.id);return t&&t>0?t:0},[e,c]),f=React.useCallback(()=>{getSrcSet.handleSetSrcForFeatureProductImage({builderPropUID:s,ftShape:u.ftShape,qualityType:u.qualityType,qualityPercent:u.qualityPercent})},[u.ftShape,u.qualityPercent,u.qualityType,s]),y=React.useMemo(()=>core.getResponsiveValueByScreen(u?.position,d),[d,u?.position]);React.useEffect(()=>{if("edit"===g)return;let e=document?.querySelector(`.gem-slider-item-${s} .featured-image-only`);if(!e)return;f();let t=new ResizeObserver(()=>{f()});return t?.observe(e,{}),()=>{t?.disconnect()}},[f,s,g]);let S=React.useMemo(()=>({desktop:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"desktop"),tablet:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"tablet"),mobile:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"mobile")}),[u.ftNavigationPosition]),v=React.useMemo(()=>"popup"===core.getResponsiveValueByScreen(u.ftClickOpenLightBox,d),[u.ftClickOpenLightBox,d]),R=React.useMemo(()=>{if(!p)return"#";let e=new URL(p);return m?`${e.protocol}//${e.host}/products/${m.handle}`:"#"},[p,m]),w=React.useMemo(()=>{let e={},t=["desktop","mobile","tablet"];return t.forEach(t=>{let o=core.getResponsiveValueByScreen(u.ftShape,t),r=o?.width;e={...e,[t]:r||"100%"}}),e},[u.ftShape]),x=React.useMemo(()=>core.getHeightByShapeGlobalSize(u.ftShape),[u.ftShape]),C=React.useMemo(()=>u?.hoverEffect==="other"?e?.[u?.otherImage?u.otherImage:0]:e?.find(e=>e.id===c?.id)||e?.[0],[c,e,u?.hoverEffect,u?.otherImage]),I=function(){return Math.random().toString(36).substr(2,5)},b=e=>{n&&clearTimeout(n),n=setTimeout(()=>i&&i(e),500)},j=e=>"product-link"===core.getResponsiveValueByScreen(u.ftClickOpenLightBox,d)?jsxRuntime.jsx("a",{title:m?.title,href:R,className:"gp-w-full",children:e}):e,k=()=>{let t="1/1",o=0;return e?.forEach(e=>{if(e.width&&e.height){let r=e.height/e.width;r>o&&(o=r,t=`${e.width}/${e.height}`)}}),t},B=()=>{let e=common.getAspectRatio(u.ftShape),t=k();return{desktop:e.desktop||t,tablet:e.tablet||t,mobile:e.mobile||t}};return jsxRuntime.jsx("div",{"data-slot":"children",className:"product-feature-image",children:jsxRuntime.jsx(Carousel.default,{parentClass:l,elmRef:t,setting:{loop:u?.ftLoop,dotStyle:productFeaturedImage.getDotSettingByLayout(y,u.ftDotStyle),dotSize:productFeaturedImage.getDotSettingByLayout(y,u.ftDotSize),dotGapToCarousel:productFeaturedImage.getDotSettingByLayout(y,u.ftDotGapToCarousel),dotColor:productFeaturedImage.getDotSettingByLayout(y,u.ftDotColor),dotActiveColor:productFeaturedImage.getDotSettingByLayout(y,u.ftDotActiveColor),itemNumber:{desktop:1},slidesToShow:{desktop:1},defaultCurrentSlider:h,controlOverContent:S,enableDrag:{desktop:u?.ftDragToScroll,tablet:u?.ftDragToScroll,mobile:u?.ftDragToScroll},arrowCustom:u?.ftArrowIcon,arrowCustomColor:u?.ftArrowIconColor,arrowBackgroundColor:u?.ftArrowNavColor,arrowBorder:{desktop:u?.ftArrowNavBorder},roundedArrow:{desktop:u?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:u?.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},styles:{sizeSetting:{desktop:{width:w?.desktop||"100%",height:"auto"},tablet:{width:w?.tablet||"100%",height:"auto"},mobile:{width:w?.mobile||"100%",height:"auto"}},align:{desktop:core.getResponsiveValueByScreen(u?.align,"desktop"),tablet:core.getResponsiveValueByScreen(u?.align,"tablet"),mobile:core.getResponsiveValueByScreen(u?.align,"mobile")}},builderProps:{uid:s},isHiddenArrowWhenDisabled:!0,onLoaded:e=>a&&a(e),onChangeActive:e=>b(e),onClickArrow:()=>r&&r(I()),moveToIdx:h,disableMarginAuto:!0,children:e?.map(e=>jsxRuntime.jsx(CarouselItem.default,{contentType:"productImage",className:core.cls(`gem-slider-item !gp-min-w-full !gp-max-w-full gem-slider-item-${s} gp-ft-image-item gp-group gp-relative gp-flex gp-w-full gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1`),onClick:()=>{o(e?.id||"",v)},style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.composeRadius({normal:u.ftCorner}),...core.makeStyleResponsive("h",core.makeHeight(x))},onMouseMove:e=>hoverAction.handleMouseMove(e,u),onMouseOut:e=>hoverAction.handleMouseOut(e),children:j(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NextImage.default,{src:e.src,width:e?.width,height:e?.height,alt:e?.alt,setting:{aspectRatio:B(),layout:u?.ftLayout},className:"featured-image-only",priority:u?.preload,style:{width:"100%",height:"100%",cursor:"pointer"}}),jsxRuntime.jsx(MediaIcon.default,{contentType:e?.contentType||""}),u?.hoverEffect!=="none"&&!productFeaturedImage.isFeatureMedia(e?.contentType)&&jsxRuntime.jsx(NextImage.default,{src:u?.hoverEffect==="other"?C?.src:e.src,width:u?.hoverEffect==="other"?C?.width:e.width,height:u?.hoverEffect==="other"?C?.height:e.height,alt:u?.hoverEffect==="other"?C?.alt:e.alt,setting:{aspectRatio:B(),layout:u?.ftLayout},style:{width:"100%",height:"100%"},className:core.cls("hover-image featured-image-only !gp-max-w-none",productFeaturedImage.getZoomImageClass()),priority:u?.preload}),u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!productFeaturedImage.isFeatureMedia(e?.contentType)&&jsxRuntime.jsx("div",{className:core.cls(productFeaturedImage.getZoomLenClass(),"room-len"),style:{...core.makeStyle({bgi:`url("${e?.src}")`})}})]}))},e?.id))})})};var ProductFeaturedImageCarousel$1=React.memo(ProductFeaturedImageCarousel);exports.default=ProductFeaturedImageCarousel$1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("../../common/common.js"),NextImage=require("../../../../../image/components/NextImage.js"),productGallery=require("../../common/productGallery.js"),ButtonOpenLightBox=require("./ButtonOpenLightBox.js"),MediaIcon=require("./MediaIcon.js"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductGalleryCarousel=({builderPropUID:e,productImages:t,onHandleClick:o,activeIndexFormFeatureImage:r,onClickFeatureArrow:i,builderPropsClass:a,arrow:s,priorityFeatureImage:l,...n})=>{let c=core.useCurrentDevice(),u=core.useFeaturedImageGlobal(),[p,d]=react.useState(i||""),g=core.useEditorMode(),[m,y]=react.useState(0);react.useEffect(()=>{d(i||"")},[i]),react.useEffect(()=>{p&&(y(r||0),d(""))},[r]),react.useEffect(()=>{if(l){let e=t?.findIndex(e=>e.id===l.id)||0;y(e),d("")}},[l,t]),react.useEffect(()=>{let e=t?.findIndex(e=>e.id===u?.id);y(e||0),d("")},[u,t]);let h=react.useMemo(()=>core.getResponsiveValueByScreen(n?.position,c),[c,n?.position]),S=react.useMemo(()=>({desktop:"inside"===core.getResponsiveValueByScreen(n.navigationPosition,"desktop"),tablet:"inside"===core.getResponsiveValueByScreen(n.navigationPosition,"tablet"),mobile:"inside"===core.getResponsiveValueByScreen(n.navigationPosition,"mobile")}),[n.navigationPosition]),C=react.useMemo(()=>productGallery.getShapeByLayout({shape:n.shape,shapeForBottom:n.shapeForBottom,shapeFor1Col:n.shapeFor1Col,shapeFor2Col:n.shapeFor2Col,shapeForFtOnly:n.shapeForFtOnly},n.position),[n.shape,n.shapeForBottom,n.shapeFor1Col,n.shapeFor2Col,n.shapeForFtOnly,n.position]),v=react.useCallback(()=>{getSrcSet.handleSetSrcForProductImageList({builderPropUID:e,shapeByLayout:C,qualityType:n.qualityType,qualityPercent:n.qualityPercent})},[C,n.qualityPercent,n.qualityType,e]);react.useEffect(()=>{if("edit"===g)return;let t=document?.querySelector(`.gem-slider-item-${e} .product-list-image`);if(!t)return;v();let o=new ResizeObserver(()=>{v()});return o?.observe(t,{}),()=>{o?.disconnect()}},[v,e,g]);let f=react.useMemo(()=>productGallery.getSliderPerShowConfig(C,n.position),[n.position,C]),b=react.useMemo(()=>{let e={},t=["desktop","mobile","tablet"];return t.forEach(t=>{let o="bottom-center"===h||"inside-bottom"===h;e={...e,[t]:o?"100%":core.getResponsiveValueByScreen(C,t)?.width}}),e},[C,h]),x=react.useMemo(()=>productGallery.getSettingWidthForCarouselItem({shapeByLayout:C,position:n.position}),[C,n.position]),w=react.useMemo(()=>productGallery.getSettingMinWidthForCarouselItem({shapeByLayout:C,position:n.position,spacing:n.itemSpacing}),[C,n.position,n.itemSpacing]),B=react.useMemo(()=>core.getHeightByShapeGlobalSize(C),[C]),k=react.useMemo(()=>core.getResponsiveValueByScreen(n.clickOpenLightBox,c),[n.clickOpenLightBox,c]),j=react.useMemo(()=>{let e=productGallery.checkDisplayGalleryByWidth({shapeByLayout:C});return core.getResponsiveValueByScreen(e,c)},[C,c]);return j&&jsxRuntime.jsx(Carousel.default,{parentClass:a,rootClass:a,setting:{loop:n?.loop,itemNumber:f,dot:productGallery.getAllowDotConfig(),dotStyle:productGallery.getDotStyleConfig(),controlOverContent:S,enableDrag:{desktop:n?.dragToScroll,tablet:n?.dragToScroll,mobile:n?.dragToScroll},vertical:productGallery.getCarouselVerticalConfigByPosition(n.position),arrowCustom:n?.arrowIcon,arrowCustomColor:n?.arrowIconColor,arrowBackgroundColor:n?.arrowNavColor,arrowBorder:{desktop:n?.arrowNavBorder},roundedArrow:{desktop:n?.arrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:n.navigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},styles:{spacing:common.convertSpacing(n?.itemSpacing),sizeSetting:{desktop:{width:b.desktop||"100%",height:"auto"},tablet:{width:b.tablet||"100%",height:"auto"},mobile:{width:b.mobile||"100%",height:"auto"}}},slidesClass:productGallery.getEditorMinHeightClass(c,n.position,n.navigationPosition),builderProps:{uid:e},moveToIdx:m,isHiddenArrowWhenDisabled:!0,disableMarginAuto:!0,children:t?.map((t,r)=>{let i=r===m;return jsxRuntime.jsxs(CarouselItem.default,{contentType:"productImage",className:core.cls(`gem-slider-item gem-slider-item-${e} gp-gallery-image-item gp-group gp-flex gp-w-full gp-items-center gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 data-[border=deactive]:after:!gp-border-transparent`,{"gem-slider-item-active":n?.borderActive?.border!=="none"&&i}),onClick:()=>{o(t?.id||"",k)},style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.makeStyleResponsive("minw",core.makeWidth(w)),...core.makeStyleResponsive("w",core.makeWidth(x)),...core.makeStyleResponsive("h",core.makeHeight(B)),...core.composeRadius({normal:n.corner})},children:[jsxRuntime.jsx(NextImage.default,{src:t.src,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:common.getAspectRatio(C),layout:n?.layout,qualityPercent:n?.qualityPercent,qualityType:n?.qualityType},style:{width:"100%",height:"100%",cursor:"pointer"},className:"product-list-image"}),jsxRuntime.jsx(MediaIcon.default,{contentType:t?.contentType||""}),core.getResponsiveValueByScreen(n?.clickOpenLightBox,c)&&jsxRuntime.jsx(ButtonOpenLightBox.default,{})]},t?.id)})})};var ProductGalleryCarousel$1=react.memo(ProductGalleryCarousel);exports.default=ProductGalleryCarousel$1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("../../common/common.js"),NextImage=require("../../../../../image/components/NextImage.js"),productGallery=require("../../common/productGallery.js"),ButtonOpenLightBox=require("./ButtonOpenLightBox.js"),MediaIcon=require("./MediaIcon.js"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductGalleryCarousel=({builderPropUID:e,productImages:t,onHandleClick:o,activeIndexFormFeatureImage:r,onClickFeatureArrow:i,builderPropsClass:a,arrow:s,priorityFeatureImage:l,...n})=>{let c=core.useCurrentDevice(),u=core.useFeaturedImageGlobal(),[p,d]=React.useState(i||""),g=core.useEditorMode(),[m,y]=React.useState(0);React.useEffect(()=>{d(i||"")},[i]),React.useEffect(()=>{p&&(y(r||0),d(""))},[r]),React.useEffect(()=>{if(l){let e=t?.findIndex(e=>e.id===l.id)||0;y(e),d("")}},[l,t]),React.useEffect(()=>{let e=t?.findIndex(e=>e.id===u?.id);y(e||0),d("")},[u,t]);let h=React.useMemo(()=>core.getResponsiveValueByScreen(n?.position,c),[c,n?.position]),R=React.useMemo(()=>({desktop:"inside"===core.getResponsiveValueByScreen(n.navigationPosition,"desktop"),tablet:"inside"===core.getResponsiveValueByScreen(n.navigationPosition,"tablet"),mobile:"inside"===core.getResponsiveValueByScreen(n.navigationPosition,"mobile")}),[n.navigationPosition]),S=React.useMemo(()=>productGallery.getShapeByLayout({shape:n.shape,shapeForBottom:n.shapeForBottom,shapeFor1Col:n.shapeFor1Col,shapeFor2Col:n.shapeFor2Col,shapeForFtOnly:n.shapeForFtOnly},n.position),[n.shape,n.shapeForBottom,n.shapeFor1Col,n.shapeFor2Col,n.shapeForFtOnly,n.position]),C=React.useCallback(()=>{getSrcSet.handleSetSrcForProductImageList({builderPropUID:e,shapeByLayout:S,qualityType:n.qualityType,qualityPercent:n.qualityPercent})},[S,n.qualityPercent,n.qualityType,e]);React.useEffect(()=>{if("edit"===g)return;let t=document?.querySelector(`.gem-slider-item-${e} .product-list-image`);if(!t)return;C();let o=new ResizeObserver(()=>{C()});return o?.observe(t,{}),()=>{o?.disconnect()}},[C,e,g]);let v=React.useMemo(()=>productGallery.getSliderPerShowConfig(S,n.position),[n.position,S]),f=React.useMemo(()=>{let e={},t=["desktop","mobile","tablet"];return t.forEach(t=>{let o="bottom-center"===h||"inside-bottom"===h;e={...e,[t]:o?"100%":core.getResponsiveValueByScreen(S,t)?.width}}),e},[S,h]),b=React.useMemo(()=>productGallery.getSettingWidthForCarouselItem({shapeByLayout:S,position:n.position}),[S,n.position]),x=React.useMemo(()=>productGallery.getSettingMinWidthForCarouselItem({shapeByLayout:S,position:n.position,spacing:n.itemSpacing}),[S,n.position,n.itemSpacing]),w=React.useMemo(()=>core.getHeightByShapeGlobalSize(S),[S]),B=React.useMemo(()=>core.getResponsiveValueByScreen(n.clickOpenLightBox,c),[n.clickOpenLightBox,c]),k=React.useMemo(()=>{let e=productGallery.checkDisplayGalleryByWidth({shapeByLayout:S});return core.getResponsiveValueByScreen(e,c)},[S,c]);return k&&jsxRuntime.jsx(Carousel.default,{parentClass:a,rootClass:a,setting:{loop:n?.loop,itemNumber:v,dot:productGallery.getAllowDotConfig(),dotStyle:productGallery.getDotStyleConfig(),controlOverContent:R,enableDrag:{desktop:n?.dragToScroll,tablet:n?.dragToScroll,mobile:n?.dragToScroll},vertical:productGallery.getCarouselVerticalConfigByPosition(n.position),arrowCustom:n?.arrowIcon,arrowCustomColor:n?.arrowIconColor,arrowBackgroundColor:n?.arrowNavColor,arrowBorder:{desktop:n?.arrowNavBorder},roundedArrow:{desktop:n?.arrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:n.navigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},styles:{spacing:common.convertSpacing(n?.itemSpacing),sizeSetting:{desktop:{width:f.desktop||"100%",height:"auto"},tablet:{width:f.tablet||"100%",height:"auto"},mobile:{width:f.mobile||"100%",height:"auto"}}},slidesClass:productGallery.getEditorMinHeightClass(c,n.position,n.navigationPosition),builderProps:{uid:e},moveToIdx:m,isHiddenArrowWhenDisabled:!0,disableMarginAuto:!0,children:t?.map((t,r)=>{let i=r===m;return jsxRuntime.jsxs(CarouselItem.default,{contentType:"productImage",className:core.cls(`gem-slider-item gem-slider-item-${e} gp-gallery-image-item gp-group gp-flex gp-w-full gp-items-center gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 data-[border=deactive]:after:!gp-border-transparent`,{"gem-slider-item-active":n?.borderActive?.border!=="none"&&i}),onClick:()=>{o(t?.id||"",B)},style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.makeStyleResponsive("minw",core.makeWidth(x)),...core.makeStyleResponsive("w",core.makeWidth(b)),...core.makeStyleResponsive("h",core.makeHeight(w)),...core.composeRadius({normal:n.corner})},children:[jsxRuntime.jsx(NextImage.default,{src:t.src,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:common.getAspectRatio(S),layout:n?.layout,qualityPercent:n?.qualityPercent,qualityType:n?.qualityType},style:{width:"100%",height:"100%",cursor:"pointer"},className:"product-list-image"}),jsxRuntime.jsx(MediaIcon.default,{contentType:t?.contentType||""}),core.getResponsiveValueByScreen(n?.clickOpenLightBox,c)&&jsxRuntime.jsx(ButtonOpenLightBox.default,{})]},t?.id)})})};var ProductGalleryCarousel$1=React.memo(ProductGalleryCarousel);exports.default=ProductGalleryCarousel$1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),common=require("../../common/common.js"),NextImage=require("../../../../../image/components/NextImage.js"),productGallery=require("../../common/productGallery.js"),ButtonOpenLightBox=require("./ButtonOpenLightBox.js"),MediaIcon=require("./MediaIcon.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),hoverAction=require("../../common/hoverAction.js"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductGalleryGrid=({builderPropUID:e,productImages:t,onHandleClick:r,activeIndexFormFeatureImage:o,...a})=>{let i=core.useCurrentDevice(),c=core.useFeaturedImageGlobal(),[s,l]=react.useState(0),n=core.useEditorMode();react.useEffect(()=>{l(o||0)},[o]),react.useEffect(()=>{let e=t?.findIndex(e=>e.id===c?.id);l(e&&e>0?e:0)},[c,t]);let u=react.useMemo(()=>productGallery.getShapeByLayout({shape:a.shape,shapeForBottom:a.shapeForBottom,shapeFor1Col:a.shapeFor1Col,shapeFor2Col:a.shapeFor2Col,shapeForFtOnly:a.shapeForFtOnly},a.position),[a.shape,a.shapeForBottom,a.shapeFor1Col,a.shapeFor2Col,a.shapeForFtOnly,a.position]),m=react.useCallback(()=>{getSrcSet.handleSetSrcForProductImageList({builderPropUID:e,shapeByLayout:u,qualityType:a.qualityType,qualityPercent:a.qualityPercent})},[u,a.qualityPercent,a.qualityType,e]);react.useEffect(()=>{if("edit"===n)return;let e=document?.querySelector(".grid-gallery");if(!e)return;m();let t=new ResizeObserver(()=>{m()});return t?.observe(e,{}),()=>{t?.disconnect()}},[m,e,n]);let d=react.useMemo(()=>core.getHeightByShapeGlobalSize(u),[u]),p=react.useMemo(()=>productGallery.getSettingWidthForGridItem({shapeByLayout:u,itemSpacing:a.itemSpacing}),[u,a.itemSpacing]),g=react.useMemo(()=>core.getResponsiveValueByScreen(a.clickOpenLightBox,i),[a.clickOpenLightBox,i]),y=react.useMemo(()=>{let e=productGallery.checkDisplayGalleryByWidth({shapeByLayout:u});return core.getResponsiveValueByScreen(e,i)},[u,i]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:y&&jsxRuntime.jsx("div",{className:core.cls("grid-gallery gp-flex gp-h-fit gp-w-full gp-flex-wrap"),style:{...core.makeStyleResponsive("cg",a?.itemSpacing),...core.makeStyleResponsive("rg",a?.itemSpacing),...core.makeStyleResponsive("jc",a?.align)},children:t?.map((t,o)=>{let c=o===s;return jsxRuntime.jsxs("div",{"aria-hidden":!0,className:core.cls(`gem-slider-item gem-slider-item-${e} gp-gallery-image-item gp-group gp-relative gp-cursor-pointer gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 data-[border=deactive]:after:!gp-border-transparent`),onClick:()=>r(t?.id||"",g),style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.makeStyleResponsive("h",core.makeHeight(d)),...core.makeStyleResponsive("w",core.makeWidth(p)),...core.composeRadius({normal:a.corner})},onMouseMove:e=>hoverAction.handleMouseMove(e,{hoverEffect:a.galleryHoverEffect,zoom:a.galleryZoom,zoomType:a.galleryZoomType}),onMouseOut:e=>hoverAction.handleMouseOut(e),"data-border":c&&a?.borderActive?"active":"deactive",children:[jsxRuntime.jsx(NextImage.default,{src:t.src,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:common.getAspectRatio(u),layout:a?.layout},style:{width:"100%",height:"100%"}},t?.id),jsxRuntime.jsx(MediaIcon.default,{contentType:t?.contentType||""}),a?.galleryHoverEffect!=="none"&&!productFeaturedImage.isFeatureMedia(t?.contentType)&&jsxRuntime.jsx(NextImage.default,{src:t?.src,width:t?.width,height:t?.height,alt:t?.alt,setting:{layout:a.layout,aspectRatio:common.getAspectRatio(u)},className:core.cls("hover-image !gp-max-w-none",productFeaturedImage.getZoomImageClass())}),a?.galleryHoverEffect=="zoom"&&a?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(core.getResponsiveValueByScreen(a.position,i)||"")&&!productFeaturedImage.isFeatureMedia(t?.contentType)&&jsxRuntime.jsx("div",{className:core.cls(productFeaturedImage.getZoomLenClass(),"room-len"),style:{...core.makeStyle({bgi:`url("${t?.src}")`})}}),core.getResponsiveValueByScreen(a?.clickOpenLightBox,i)&&jsxRuntime.jsx(ButtonOpenLightBox.default,{})]},t?.id)})})})};var ProductGalleryGrid$1=react.memo(ProductGalleryGrid);exports.default=ProductGalleryGrid$1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),common=require("../../common/common.js"),NextImage=require("../../../../../image/components/NextImage.js"),productGallery=require("../../common/productGallery.js"),ButtonOpenLightBox=require("./ButtonOpenLightBox.js"),MediaIcon=require("./MediaIcon.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),hoverAction=require("../../common/hoverAction.js"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductGalleryGrid=({builderPropUID:e,productImages:t,onHandleClick:o,activeIndexFormFeatureImage:r,...a})=>{let i=core.useCurrentDevice(),c=core.useFeaturedImageGlobal(),[s,l]=React.useState(0),n=core.useEditorMode();React.useEffect(()=>{l(r||0)},[r]),React.useEffect(()=>{let e=t?.findIndex(e=>e.id===c?.id);l(e&&e>0?e:0)},[c,t]);let u=React.useMemo(()=>productGallery.getShapeByLayout({shape:a.shape,shapeForBottom:a.shapeForBottom,shapeFor1Col:a.shapeFor1Col,shapeFor2Col:a.shapeFor2Col,shapeForFtOnly:a.shapeForFtOnly},a.position),[a.shape,a.shapeForBottom,a.shapeFor1Col,a.shapeFor2Col,a.shapeForFtOnly,a.position]),m=React.useCallback(()=>{getSrcSet.handleSetSrcForProductImageList({builderPropUID:e,shapeByLayout:u,qualityType:a.qualityType,qualityPercent:a.qualityPercent})},[u,a.qualityPercent,a.qualityType,e]);React.useEffect(()=>{if("edit"===n)return;let e=document?.querySelector(".grid-gallery");if(!e)return;m();let t=new ResizeObserver(()=>{m()});return t?.observe(e,{}),()=>{t?.disconnect()}},[m,e,n]);let d=React.useMemo(()=>core.getHeightByShapeGlobalSize(u),[u]),p=React.useMemo(()=>productGallery.getSettingWidthForGridItem({shapeByLayout:u,itemSpacing:a.itemSpacing}),[u,a.itemSpacing]),g=React.useMemo(()=>core.getResponsiveValueByScreen(a.clickOpenLightBox,i),[a.clickOpenLightBox,i]),y=React.useMemo(()=>{let e=productGallery.checkDisplayGalleryByWidth({shapeByLayout:u});return core.getResponsiveValueByScreen(e,i)},[u,i]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:y&&jsxRuntime.jsx("div",{className:core.cls("grid-gallery gp-flex gp-h-fit gp-w-full gp-flex-wrap"),style:{...core.makeStyleResponsive("cg",a?.itemSpacing),...core.makeStyleResponsive("rg",a?.itemSpacing),...core.makeStyleResponsive("jc",a?.align)},children:t?.map((t,r)=>{let c=r===s;return jsxRuntime.jsxs("div",{"aria-hidden":!0,className:core.cls(`gem-slider-item gem-slider-item-${e} gp-gallery-image-item gp-group gp-relative gp-cursor-pointer gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 data-[border=deactive]:after:!gp-border-transparent`),onClick:()=>o(t?.id||"",g),style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.makeStyleResponsive("h",core.makeHeight(d)),...core.makeStyleResponsive("w",core.makeWidth(p)),...core.composeRadius({normal:a.corner})},onMouseMove:e=>hoverAction.handleMouseMove(e,{hoverEffect:a.galleryHoverEffect,zoom:a.galleryZoom,zoomType:a.galleryZoomType}),onMouseOut:e=>hoverAction.handleMouseOut(e),"data-border":c&&a?.borderActive?"active":"deactive",children:[jsxRuntime.jsx(NextImage.default,{src:t.src,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:common.getAspectRatio(u),layout:a?.layout},style:{width:"100%",height:"100%"}},t?.id),jsxRuntime.jsx(MediaIcon.default,{contentType:t?.contentType||""}),a?.galleryHoverEffect!=="none"&&!productFeaturedImage.isFeatureMedia(t?.contentType)&&jsxRuntime.jsx(NextImage.default,{src:t?.src,width:t?.width,height:t?.height,alt:t?.alt,setting:{layout:a.layout,aspectRatio:common.getAspectRatio(u)},className:core.cls("hover-image !gp-max-w-none",productFeaturedImage.getZoomImageClass())}),a?.galleryHoverEffect=="zoom"&&a?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(core.getResponsiveValueByScreen(a.position,i)||"")&&!productFeaturedImage.isFeatureMedia(t?.contentType)&&jsxRuntime.jsx("div",{className:core.cls(productFeaturedImage.getZoomLenClass(),"room-len"),style:{...core.makeStyle({bgi:`url("${t?.src}")`})}}),core.getResponsiveValueByScreen(a?.clickOpenLightBox,i)&&jsxRuntime.jsx(ButtonOpenLightBox.default,{})]},t?.id)})})})};var ProductGalleryGrid$1=React.memo(ProductGalleryGrid);exports.default=ProductGalleryGrid$1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),NextImage=require("../../../../../image/components/NextImage.js");require("../../../../../modal/components/confirm.js");var Modal=require("../../../../../modal/components/Modal.js"),react=require("react"),productFeaturedImage=require("../../common/productFeaturedImage.js");const ProductImagesLightBox=({builderPropUID:e,productImages:t,open:o,imageRatio:s,onHandleClose:r})=>{let l=core.useFeaturedImageGlobal(),i=react.useMemo(()=>{let e=t?.findIndex(e=>e.id===l?.id);return e&&e>0?e:0},[t,l]),a={desktop:t&&t.length>1,mobile:t&&t?.length>1,tablet:t&&t?.length>1},d={desktop:!1,mobile:!1,tablet:!1};return jsxRuntime.jsx(Modal.default,{setting:{open:o},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>r(),disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2",children:jsxRuntime.jsx(Carousel.default,{setting:{loop:d,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"},controlOverContent:{desktop:!0,mobile:!0,tablet:!0},arrow:a},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:i,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:e},children:t?.map(t=>jsxRuntime.jsx(CarouselItem.default,{className:`gem-slider-item gem-slider-item-${e} gp-flex gp-items-center gp-justify-center gp-px-4`,children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(t?.contentType)?t?.previewImage:t?.src,width:t?.width,height:t?.height,alt:t?.alt,"content-type":t?.contentType,setting:{aspectRatio:s},className:core.cls("gp-h-full gp-w-full gp-object-contain")},t?.id)},t?.id))})})};exports.default=ProductImagesLightBox;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),NextImage=require("../../../../../image/components/NextImage.js");require("../../../../../modal/components/confirm.js");var Modal=require("../../../../../modal/components/Modal.js"),React=require("react"),productFeaturedImage=require("../../common/productFeaturedImage.js");const ProductImagesLightBox=({builderPropUID:e,productImages:t,open:o,imageRatio:s,onHandleClose:l})=>{let i=core.useFeaturedImageGlobal(),r=React.useMemo(()=>{let e=t?.findIndex(e=>e.id===i?.id);return e&&e>0?e:0},[t,i]),a={desktop:t&&t.length>1,mobile:t&&t?.length>1,tablet:t&&t?.length>1},d={desktop:!1,mobile:!1,tablet:!1};return jsxRuntime.jsx(Modal.default,{setting:{open:o},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>l(),disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2",children:jsxRuntime.jsx(Carousel.default,{setting:{loop:d,slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:r,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"},controlOverContent:{desktop:!0,mobile:!0,tablet:!0},arrow:a},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:r,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:e},children:t?.map(t=>jsxRuntime.jsx(CarouselItem.default,{className:`gem-slider-item gem-slider-item-${e} gp-flex gp-items-center gp-justify-center gp-px-4`,children:jsxRuntime.jsx(NextImage.default,{src:productFeaturedImage.isFeatureMedia(t?.contentType)?t?.previewImage:t?.src,width:t?.width,height:t?.height,alt:t?.alt,"content-type":t?.contentType,setting:{aspectRatio:s},className:core.cls("gp-h-full gp-w-full gp-object-contain")},t?.id)},t?.id))})})};exports.default=ProductImagesLightBox;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ProductGalleryCarousel=require("../components/ProductGalleryCarousel.js"),ProductGalleryGrid=require("../components/ProductGalleryGrid.js"),react=require("react"),common=require("../../common/common.js"),ProductFeaturedImageCarousel=require("../components/ProductFeaturedImageCarousel.js"),productGallery=require("../../common/productGallery.js");const DEVICES=["mobile","tablet","desktop"],FeatureImageWithGallery=e=>{let{setting:t,styles:o,builderProps:i,gallery:r,onHandleClickImage:s,priorityFeatureImage:a}=e,l={...t,...o},n=core.useCurrentDevice(),[u,c]=react.useState(),[p,d]=react.useState(""),[g,m]=react.useState(100),y=react.useRef(null),x=react.useMemo(()=>core.getResponsiveValueByScreen(l?.position,n),[n,l?.position]),v=react.useMemo(()=>{let e={};return DEVICES.forEach(t=>{let o=core.getResponsiveValueByScreen(l?.position,t),i=productGallery.HORIZONTAL_LAYOUT.includes(o);e={...e,[t]:i?g+"px":"auto"}}),e},[g,l?.position]),b=react.useMemo(()=>common.getStyleGridLayout({position:l.position,ratioLayout:l.ratioLayout,ratioLayoutRight:l.ratioLayoutRight,isHiddenGalleryImages:r.length<2}),[l.position,l.ratioLayout,l.ratioLayoutRight,r]),f=react.useMemo(()=>common.getStyleGridOrderForFeature({position:l.position}),[l.position]),R=react.useMemo(()=>common.getStyleGridOrderForGallery({position:l.position}),[l.position]),S=e=>{e&&setTimeout(()=>m(y?.current?.offsetHeight||200),200)};react.useEffect(()=>{let e=y?.current;if(!e)return;let t=new ResizeObserver(()=>{m(e.offsetHeight||200)});return t.observe(e),()=>{t.disconnect()}},[n]);let j=react.useMemo(()=>"inside-bottom"===x?"gp-absolute gp-bottom-0 gp-left-0 gp-w-full":"inside-left"===x||"inside-right"===x?"gp-absolute gp-top-0 ":"",[x]),I="inside-left"===x?"gp-justify-start":"gp-justify-end";return jsxRuntime.jsxs("div",{className:core.cls("gp-grid gp-w-full"),style:{...b,...core.makeStyleResponsive("gg",l?.spacing)},children:[jsxRuntime.jsx("div",{className:core.cls(`gp-flex gp-h-fit gp-product-images-feature-${i?.uid}`,"outside"===core.getResponsiveValueByScreen(l?.ftNavigationPosition,"desktop")?"gp-px-[16px]":"gp-px-0","outside"===core.getResponsiveValueByScreen(l?.ftNavigationPosition,"tablet")?"tablet:gp-px-[16px]":"tablet:gp-px-0","outside"===core.getResponsiveValueByScreen(l?.ftNavigationPosition,"mobile")?"mobile:gp-px-[16px]":"mobile:gp-px-0"),style:{...f,...core.makeStyleResponsive("jc",l?.align)},children:jsxRuntime.jsx(ProductFeaturedImageCarousel.default,{imgRef:y,productImages:r,...l,onHandleClick:(e,t)=>s(e||"",t),onHandleLoaded:e=>S(e),onHandleUpdateActiveIndex:e=>c(e),onClickArrow:e=>d(e),builderPropUID:i?.uid,builderPropsClass:`gp-product-images-feature-${i?.uid}`})}),r.length>1&&jsxRuntime.jsx("div",{className:core.cls(`gp-product-images-gallery-${i?.uid} gp-flex gp-h-fit gp-max-w-full ${j}`,"outside"===core.getResponsiveValueByScreen(l?.navigationPosition,"desktop")&&"slider"===core.getResponsiveValueByScreen(l.type,"desktop")&&["bottom-center"].includes(core.getResponsiveValueByScreen(l?.position,"desktop")||"")?"gp-px-[16px]":"gp-px-0","outside"===core.getResponsiveValueByScreen(l?.navigationPosition,"tablet")&&"slider"===core.getResponsiveValueByScreen(l.type,"tablet")&&["bottom-center"].includes(core.getResponsiveValueByScreen(l?.position,"tablet")||"")?"tablet:gp-px-[16px]":"tablet:gp-px-0","outside"===core.getResponsiveValueByScreen(l?.navigationPosition,"mobile")&&"slider"===core.getResponsiveValueByScreen(l.type,"mobile")&&["bottom-center"].includes(core.getResponsiveValueByScreen(l?.position,"mobile")||"")?"mobile:gp-px-[16px]":"mobile:gp-px-0"),style:{...core.makeStyleResponsive("h",core.makeHeight(v)),...core.makeStyleResponsive("jc",l?.align),...R},children:"slider"===common.getTypeWidthDevice(l?.type)[n]||"left"===x||"right"===x?jsxRuntime.jsx(ProductGalleryCarousel.default,{productImages:r,position:l?.position,...l,builderPropUID:i?.uid,onHandleClick:(e,t)=>s(e||"",t),activeIndexFormFeatureImage:u,priorityFeatureImage:a,onClickFeatureArrow:p,builderPropsClass:`gp-product-images-gallery-${i?.uid} ${I}`}):jsxRuntime.jsx(ProductGalleryGrid.default,{productImages:r,...l,builderPropUID:i?.uid,onHandleClick:(e,t)=>s(e||"",t),activeIndexFormFeatureImage:u})})]})};exports.default=FeatureImageWithGallery;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ProductGalleryCarousel=require("../components/ProductGalleryCarousel.js"),ProductGalleryGrid=require("../components/ProductGalleryGrid.js"),React=require("react"),common=require("../../common/common.js"),ProductFeaturedImageCarousel=require("../components/ProductFeaturedImageCarousel.js"),productGallery=require("../../common/productGallery.js");const DEVICES=["mobile","tablet","desktop"],FeatureImageWithGallery=e=>{let{setting:t,styles:o,builderProps:i,gallery:r,onHandleClickImage:s,priorityFeatureImage:a}=e,l={...t,...o},n=core.useCurrentDevice(),[u,c]=React.useState(),[p,d]=React.useState(""),[g,m]=React.useState(100),y=React.useRef(null),R=React.useMemo(()=>core.getResponsiveValueByScreen(l?.position,n),[n,l?.position]),x=React.useMemo(()=>{let e={};return DEVICES.forEach(t=>{let o=core.getResponsiveValueByScreen(l?.position,t),i=productGallery.HORIZONTAL_LAYOUT.includes(o);e={...e,[t]:i?g+"px":"auto"}}),e},[g,l?.position]),v=React.useMemo(()=>common.getStyleGridLayout({position:l.position,ratioLayout:l.ratioLayout,ratioLayoutRight:l.ratioLayoutRight,isHiddenGalleryImages:r.length<2}),[l.position,l.ratioLayout,l.ratioLayoutRight,r]),b=React.useMemo(()=>common.getStyleGridOrderForFeature({position:l.position}),[l.position]),f=React.useMemo(()=>common.getStyleGridOrderForGallery({position:l.position}),[l.position]),S=e=>{e&&setTimeout(()=>m(y?.current?.offsetHeight||200),200)};React.useEffect(()=>{let e=y?.current;if(!e)return;let t=new ResizeObserver(()=>{m(e.offsetHeight||200)});return t.observe(e),()=>{t.disconnect()}},[n]);let j=React.useMemo(()=>"inside-bottom"===R?"gp-absolute gp-bottom-0 gp-left-0 gp-w-full":"inside-left"===R||"inside-right"===R?"gp-absolute gp-top-0 ":"",[R]),I="inside-left"===R?"gp-justify-start":"gp-justify-end";return jsxRuntime.jsxs("div",{className:core.cls("gp-grid gp-w-full"),style:{...v,...core.makeStyleResponsive("gg",l?.spacing)},children:[jsxRuntime.jsx("div",{className:core.cls(`gp-flex gp-h-fit gp-product-images-feature-${i?.uid}`,"outside"===core.getResponsiveValueByScreen(l?.ftNavigationPosition,"desktop")?"gp-px-[16px]":"gp-px-0","outside"===core.getResponsiveValueByScreen(l?.ftNavigationPosition,"tablet")?"tablet:gp-px-[16px]":"tablet:gp-px-0","outside"===core.getResponsiveValueByScreen(l?.ftNavigationPosition,"mobile")?"mobile:gp-px-[16px]":"mobile:gp-px-0"),style:{...b,...core.makeStyleResponsive("jc",l?.align)},children:jsxRuntime.jsx(ProductFeaturedImageCarousel.default,{imgRef:y,productImages:r,...l,onHandleClick:(e,t)=>s(e||"",t),onHandleLoaded:e=>S(e),onHandleUpdateActiveIndex:e=>c(e),onClickArrow:e=>d(e),builderPropUID:i?.uid,builderPropsClass:`gp-product-images-feature-${i?.uid}`})}),r.length>1&&jsxRuntime.jsx("div",{className:core.cls(`gp-product-images-gallery-${i?.uid} gp-flex gp-h-fit gp-max-w-full ${j}`,"outside"===core.getResponsiveValueByScreen(l?.navigationPosition,"desktop")&&"slider"===core.getResponsiveValueByScreen(l.type,"desktop")&&["bottom-center"].includes(core.getResponsiveValueByScreen(l?.position,"desktop")||"")?"gp-px-[16px]":"gp-px-0","outside"===core.getResponsiveValueByScreen(l?.navigationPosition,"tablet")&&"slider"===core.getResponsiveValueByScreen(l.type,"tablet")&&["bottom-center"].includes(core.getResponsiveValueByScreen(l?.position,"tablet")||"")?"tablet:gp-px-[16px]":"tablet:gp-px-0","outside"===core.getResponsiveValueByScreen(l?.navigationPosition,"mobile")&&"slider"===core.getResponsiveValueByScreen(l.type,"mobile")&&["bottom-center"].includes(core.getResponsiveValueByScreen(l?.position,"mobile")||"")?"mobile:gp-px-[16px]":"mobile:gp-px-0"),style:{...core.makeStyleResponsive("h",core.makeHeight(x)),...core.makeStyleResponsive("jc",l?.align),...f},children:"slider"===common.getTypeWidthDevice(l?.type)[n]||"left"===R||"right"===R?jsxRuntime.jsx(ProductGalleryCarousel.default,{productImages:r,position:l?.position,...l,builderPropUID:i?.uid,onHandleClick:(e,t)=>s(e||"",t),activeIndexFormFeatureImage:u,priorityFeatureImage:a,onClickFeatureArrow:p,builderPropsClass:`gp-product-images-gallery-${i?.uid} ${I}`}):jsxRuntime.jsx(ProductGalleryGrid.default,{productImages:r,...l,builderPropUID:i?.uid,onHandleClick:(e,t)=>s(e||"",t),activeIndexFormFeatureImage:u})})]})};exports.default=FeatureImageWithGallery;