@gem-sdk/components 19.0.0-staging.8 → 19.1.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/accordion/components/Accordion.liquid.js +4 -5
- package/dist/cjs/builder.js +1 -1
- package/dist/cjs/button/components/Button.liquid.js +15 -15
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +5 -4
- package/dist/cjs/carousel-v3/common/selectors.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/cjs/carousel-v3/components/root/common/attrs.js +1 -1
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel-v3/index.js +1 -1
- package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/cjs/collection/components/collection-description/CollectionDescription.liquid.js +7 -8
- package/dist/cjs/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/cjs/collection/components/collection-toolbar/CollectionToolbar.liquid.js +1 -1
- package/dist/cjs/countdown-timer/components/Countdown.liquid.js +16 -15
- package/dist/cjs/estimate-delivery/common/helpers.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +16 -11
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +11 -11
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +2 -2
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +11 -11
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +1 -1
- package/dist/cjs/marquee/components/Marquee.liquid.js +21 -21
- package/dist/cjs/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/cjs/product/components/ProductImages.liquid.js +9 -9
- package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +9 -9
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +2 -3
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +15 -15
- package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +7 -5
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +4 -3
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +8 -7
- package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +3 -4
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +19 -19
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/ProductImageV3.js +2 -2
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +19 -19
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/getBorderActiveCss.js +2 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -2
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +29 -29
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +7 -8
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +6 -4
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +6 -6
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +6 -4
- package/dist/cjs/product/components/product-price/ProductPrice.liquid.js +4 -4
- package/dist/cjs/product/components/product-sku/Sku.liquid.js +4 -3
- package/dist/cjs/product/components/product-title/ProductTitle.liquid.js +7 -8
- package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +27 -27
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +7 -4
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/sticky/components/Sticky.liquid.js +4 -5
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/tab/components/Tabs.liquid.js +7 -6
- package/dist/cjs/text/components/Text.liquid.js +3 -3
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/cjs/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/cjs/third-party/index.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -10
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +14 -13
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/accordion/components/Accordion.liquid.js +8 -9
- package/dist/esm/builder.js +1 -1
- package/dist/esm/button/components/Button.liquid.js +22 -22
- package/dist/esm/carousel/components/root/Carousel.liquid.js +4 -3
- package/dist/esm/carousel-v3/common/selectors.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/esm/carousel-v3/components/root/common/attrs.js +1 -1
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel-v3/index.js +1 -1
- package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js +6 -7
- package/dist/esm/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/esm/collection/components/collection-toolbar/CollectionToolbar.liquid.js +3 -3
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +21 -20
- package/dist/esm/estimate-delivery/common/helpers.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +16 -11
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +12 -12
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +3 -3
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
- package/dist/esm/image/components/Image.liquid.js +10 -10
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +12 -12
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/marquee/components/Marquee.liquid.js +21 -21
- package/dist/esm/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/esm/product/components/ProductImages.liquid.js +12 -12
- package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +14 -14
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +3 -4
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
- package/dist/esm/product/components/product-badge/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +8 -7
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +7 -6
- package/dist/esm/product/components/product-button/common/helpers.js +1 -1
- package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +5 -6
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +8 -8
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +21 -21
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/ProductImageV3.js +2 -2
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +22 -22
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/esm/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/getBorderActiveCss.js +2 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -2
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +45 -45
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/esm/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +7 -8
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +9 -7
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +9 -9
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +9 -7
- package/dist/esm/product/components/product-price/ProductPrice.liquid.js +3 -3
- package/dist/esm/product/components/product-sku/Sku.liquid.js +6 -5
- package/dist/esm/product/components/product-title/ProductTitle.liquid.js +5 -6
- package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +44 -44
- package/dist/esm/product/components/product-wrap/Product.liquid.js +18 -15
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/sticky/components/Sticky.liquid.js +11 -12
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/tab/components/Tabs.liquid.js +12 -11
- package/dist/esm/text/components/Text.liquid.js +3 -3
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/esm/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/esm/third-party/index.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +16 -15
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +11 -10
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +39 -13
- package/package.json +5 -5
package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeLineClamp as
|
|
1
|
+
import{makeStyleResponsive as e,makeLineClamp as i,template as s,baseAssetURL as t,isLocalEnv as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../../helpers.js";import{getDefaultStyleCollectionDes as n,getStyleDefaultViewMore as p,getStaticCss as c}from"./common/styles.js";import{createClass as r,createStyle as a,createAttr as m,createStateOrContext as $,If as d,Liquid as g,LiquidUnless as v,LiquidIf as f}from"@gem-sdk/system";import{getClassContainerCollectionDes as y,getClassButtonViewMore as u,getDescriptionClasses as w,getShowMoreIconClasses as C,getShowMoreTextClasses as b,getClassPreBuilt as j}from"./common/classes.js";import{getViewLessText as S,getViewMoreText as h,ICON_SVG as x}from"./common/helpers.js";let M=({setting:M,advanced:k,builderProps:E,pageContext:I})=>{let L=r(y({setting:M})),P=r(u({setting:M})),V=r(w({advanced:k})),A=r(C()),T=r(b()),q=r(j()),G=a({...n({setting:M}),...e("line-clamp",i(M?.lineClamp,M?.hasLineClamp))}),N=a({...p(M)}),O=S({setting:M,builderProps:E,pageContext:I,type:"liquid"}),_=h({setting:M,builderProps:E,pageContext:I,type:"liquid"}),D=m({"data-id":`${E?.uid}`,"view-more-text":`${I?.isPreviewing?_:`{{${_}}}`}`,"view-less-text":`${I?.isPreviewing?O:`{{${O}}}`}`}),J=m({"data-gp-text":""}),{gpDescriptionCss:R,textDescriptionCss:z}=c(),B=$({setting:{lineClamp:M?.lineClamp,hasLineClamp:M?.hasLineClamp,viewMoreText:_,viewLessText:O,enableViewMoreIcon:M?.enableViewMoreIcon},textStyle:G});return d(!1,"",g(s`
|
|
2
2
|
<gp-collection-description
|
|
3
3
|
${D}
|
|
4
4
|
class="${V}"
|
|
5
|
-
gp-data='${JSON.stringify(B).replaceAll("'","'")}'
|
|
6
5
|
>
|
|
7
|
-
<
|
|
8
|
-
<style>${R}</style>
|
|
6
|
+
<script gp-data type="application/json">${JSON.stringify(B).replaceAll("'","'")}</script>
|
|
7
|
+
<style>${z}${R}</style>
|
|
9
8
|
<div class="${q}" ></div>
|
|
10
|
-
${v("collection","<p>Collection not found</p>",
|
|
9
|
+
${v("collection","<p>Collection not found</p>",s`<div ${J} class="${L}" style="${G}">
|
|
11
10
|
{{collection.description}}
|
|
12
11
|
</div>
|
|
13
|
-
${
|
|
12
|
+
${f("collection.description != blank",s`<button type="button" class="${P}" style="${N}">
|
|
14
13
|
<span class="${T}">
|
|
15
14
|
${d(I?.isPreviewing,_?.toString()||"",`{{${_}}}`)}
|
|
16
15
|
</span>
|
|
17
|
-
${d(M?.enableViewMoreIcon,
|
|
16
|
+
${d(M?.enableViewMoreIcon,s`<span class="${A}">${x}</span>`," ")}
|
|
18
17
|
</button>`)}`)}
|
|
19
18
|
</gp-collection-description>
|
|
20
19
|
${(()=>{let e=l?"{{ 'gp-collection-description-v7-5.js' | asset_url }}":`${t}/assets-v2/gp-collection-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${o('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`})()}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import{composeTypographyStyle as s,getGlobalColorCSSProp as
|
|
2
|
-
<gp-collection-paginator
|
|
1
|
+
import{composeTypographyStyle as s,getGlobalColorCSSProp as t,getGlobalColorClass as o,makeStyleResponsive as e,RenderIf as l,isLocalEnv as r,baseAssetURL as i,template as a}from"@gem-sdk/core";import{getSettingPreloadData as c}from"../../../helpers.js";import{renderPaginatorItem as p}from"./common/helpers.js";import{customClass as m,getPaginatorWrapperClass as d,getPaginatorClass as n}from"./common/classes.js";import{createStyle as g,createClass as f,createStateOrContext as v}from"@gem-sdk/system";let y=({setting:y,builderProps:S,pageContext:$})=>{let{typographyPaginator:u,activeColor:C,align:j,typo:k,normalColor:E}=y??{},h=g({...s(k,u)}),x=g({normalColorClass:o("text",E),activeColorClass:o("text",C),normalColorStyle:t(E)??"",activeColorStyle:t(C)??""}),A=f({...m("",void 0,y)}),G={...x,customStyle:h,addedClass:A},N=p({setting:y,builderProps:S,pageContext:$},"liquid"),O=f({...d()}),P=f({...n()}),_=g({...e("ta",j),...G.customStyle}),q=v({setting:y,styleSetting:G,uid:S?.uid});return a`
|
|
2
|
+
<gp-collection-paginator id="${S?.uid}">
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(q).replaceAll("'","'")}</script>
|
|
3
4
|
<div class="${P}" style="${_}">
|
|
4
5
|
<div class="${O}">${N}</div>
|
|
5
6
|
</div>
|
|
6
7
|
</gp-collection-paginator>
|
|
7
8
|
${l(r,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-collection-paginator-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${i}/assets-v2/gp-collection-paginator-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
8
|
-
`};export{
|
|
9
|
+
`};export{y as default};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{template as o,RenderIf as s,isLocalEnv as t,baseAssetURL as e}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../../helpers.js";import{createClass as l,createStyle as n,createStateOrContext as r,LiquidIf as c}from"@gem-sdk/system";import{getClassContainer as
|
|
1
|
+
import{template as o,RenderIf as s,isLocalEnv as t,baseAssetURL as e}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../../helpers.js";import{createClass as l,createStyle as n,createStateOrContext as r,LiquidIf as c}from"@gem-sdk/system";import{getClassContainer as p,getClassToolbarWrapper as a,getClassToolbarSortWrapper as d,getClassSelect as m,getClassToolbarWrapperQuantity as u}from"./common/classes.js";import{getStyleCollectionToolbar as f,getStyleToolbarWrapper as y,getStyleSelect as $,getStyleToolbarWrapperQuantity as g}from"./common/styles.js";import{getSortingTextDisplayVal as v,getQuantityTextDisplayVal as b}from"./common/helpers.js";let _=({setting:_,builderProps:j,pageContext:S})=>{let{displayQuantity:k}=_??{},q=l({...p()}),E=l({...a()}),T=l({...d()}),h=l({...m(_)}),C=l({...u(_)}),x=l({"gp-flex-1":!0}),A=n({...f(_)}),G=n({...y(_)}),N=n({...$(_)}),O=n({...g(_)}),I=v({setting:_,builderProps:j,pageContext:S},"liquid"),J=b({setting:_,builderProps:j,pageContext:S},"liquid"),M=r({uid:j?.uid});return o`
|
|
2
2
|
<gp-collection-toolbar
|
|
3
3
|
class="${q}"
|
|
4
4
|
style="${A}"
|
|
5
|
-
id="${
|
|
6
|
-
gp-data='${JSON.stringify(M)}'
|
|
5
|
+
id="${j?.uid}"
|
|
7
6
|
>
|
|
7
|
+
<script gp-data type="application/json">${JSON.stringify(M)}</script>
|
|
8
8
|
<div class="${E}" style="${G}" >
|
|
9
9
|
<div class="${T}">
|
|
10
10
|
<select id="sorting" class="${h}" style="${N}" >
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import{template as
|
|
1
|
+
import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import r from"../../text/components/Text.liquid.js";import{getInsertLinkData as o,getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as a,createStyle as d,createClass as n,createAttr as c,If as p}from"@gem-sdk/system";import{getAttr as u,getAttrHref as m}from"../common/attrs.js";import{getDateStyle as $,getTextFrontStyle as y,getTextBackStyle as f,getWrapperStyle as g,getContainStyle as x}from"../common/styles.js";import{getTextFrontClasses as w,getWrapperClasses as b,getContentClasses as h,getLinkClasses as j,getDateClasses as v,getTextBackClasses as k}from"../common/classes.js";import{Countdown as S}from"../settings/configs/translate.js";let L=L=>{let{setting:A,styles:C,builderProps:E,advanced:N,pageContext:F}=L,{labelTypo:I,numTypo:P,numTypography:q,labelTypography:G,enableLabelTextStyle:O}=C??{},{weekLabel:T,dayLabel:V,hourLabel:_,minuteLabel:J,secondLabel:M,enableWeek:R,enableDay:z,enableHour:B,enableMinute:D,enableSecond:H,redirectUrl:K,autoHideWhenTimeout:Q}=A??{},U=!!K?.link,{urlData:W}=o("",K),X=a({...A,...E}),Y=d({...$(C)}),Z=t=>n({...v(t)}),tt=n({...w(C)}),te=d({...y(C)}),ts=d({...f(C)}),ti=t=>n({...k(C,t)}),tr=c({...u({uid:E?.uid||""})}),to=c({...m({uid:W.href||""})}),tl=d({...g(C)}),ta=n({...b(N?.cssClass)}),td=n({...h({isLiquid:!0,autoHideWhenTimeout:Q})}),tn=d({...x(C)}),tc=(e,s,i)=>{let o=i&&i in S?S[i]?.id:void 0;return t`
|
|
2
2
|
<div style="${Y}" class="${Z(s)}">
|
|
3
|
-
${r({styles:{typography:q,typo:P},setting:{...A,text:"00",excludeFlex:!0,isForceValue:!0},style:
|
|
4
|
-
${
|
|
5
|
-
${r({styles:{typography:G,typo:I},setting:{...A,text:s,excludeFlex:!0},translateSetting:o,style:
|
|
3
|
+
${r({styles:{typography:q,typo:P},setting:{...A,text:"00",excludeFlex:!0,isForceValue:!0},style:te,className:tt,builderAttrs:{id:e},builderProps:{...E,uid:E?.uid,uidInteraction:`${E?.uid}-text`}})}
|
|
4
|
+
${p(!!O,t`
|
|
5
|
+
${r({styles:{typography:G,typo:I},setting:{...A,text:s,excludeFlex:!0},translateSetting:o,style:ts,className:ti(s),builderProps:{...E,uid:E?.uid,uidInteraction:`${E?.uid}-text`},pageContext:F})}
|
|
6
6
|
`)}
|
|
7
7
|
</div>
|
|
8
|
-
`},
|
|
8
|
+
`},tp=n({...j()});return t`
|
|
9
9
|
<gp-countdown-timer
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
${{...tr}}
|
|
11
|
+
${{...to}}
|
|
12
|
+
class="${ta}"
|
|
13
|
+
style="${tl}"
|
|
14
|
+
>
|
|
15
|
+
<script gp-data type="application/json">${JSON.stringify(X).replaceAll("'","'")}</script>
|
|
16
|
+
<div id="section-countdown" class="${td}" style="${tn}">
|
|
17
|
+
${p(U,`<a
|
|
17
18
|
href="${W.href}"
|
|
18
19
|
target="${W?.target}"
|
|
19
20
|
aria-label="Countdown link"
|
|
20
|
-
class="${
|
|
21
|
+
class="${tp}"
|
|
21
22
|
> </a>`)}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
${p(R,tc("week",T,"weekLabel"))}
|
|
24
|
+
${p(z,tc("day",V,"dayLabel"))}
|
|
25
|
+
${p(B,tc("hour",_,"hourLabel"))}
|
|
26
|
+
${p(D,tc("minute",J,"minuteLabel"))}
|
|
27
|
+
${p(H,tc("second",M,"secondLabel"))}
|
|
27
28
|
</div>
|
|
28
|
-
|
|
29
|
-
${
|
|
29
|
+
</gp-countdown-timer>
|
|
30
|
+
${e(s,`<script ${l('class="gps-link" delay',"src")}="{{ 'gp-countdown-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l('class="gps-link" delay',"src")}="${i}/assets-v2/gp-countdown-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
30
31
|
`};export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../../text/components/TextInline.js";import{getDynamicSourceLocales as t,createSettingId as a}from"../../helpers.js";import{createClass as r}from"@gem-sdk/system";import{getStyleEstimateDate as u}from"./styles.js";import{EstimateDate as l}from"../settings/configs/translate.js";let
|
|
1
|
+
import e from"../../text/components/TextInline.js";import{getDynamicSourceLocales as t,createSettingId as a}from"../../helpers.js";import{createClass as r}from"@gem-sdk/system";import{getStyleEstimateDate as u}from"./styles.js";import{EstimateDate as l}from"../settings/configs/translate.js";let s=e=>e?"number"==typeof e?e:Number(e.split("days")[0]):0,n=e=>{let t=new Date(Date.now()),a=s(e?.estimateTime),r=s(e?.minEstimate),u=s(e?.maxEstimate),l=e?.typeFormat==="Custom"?e?.customFormat:e?.typeFormat;if(!l)return"";if(e?.typeEstimate===d.SPECIFIC){let e=`${p(g(a),l)}`;return e}p(t);let n=`${p(g(r),l)} - ${p(g(u),l)}`;return n},i=e=>{switch(e?.htmlTag){case 1:return"h1";case 2:return"h2";case 3:return"h3";case 4:return"h4";case 5:return"h5";case 6:return"h6";default:return"div"}},o=({type:e,styles:t,setting:a,builderProps:r,pageContext:u})=>{let l="React"===e,s=m({type:e,styles:t,setting:a,builderProps:r,pageContext:u});return{text:s,htmlTag:i(a),globalSize:a?.globalSize,background:a?.background,...!l&&{isForceValue:!0}}},m=({type:s,styles:i,setting:o,builderProps:m,pageContext:y})=>{let d="React"===s,p=r({"estimate-date-main":!0}),g=d||y?.isPreviewing?o?.customText:t({val:o?.customText,uid:m?.uid,settingId:a({id:l?.customText?.id}),pageContext:y??{},isCapitalize:i?.typo?.attrs?.transform==="capitalize"}).toString();return`${o?.enableCustomText===!1?"":e({styles:u(i,"typoCustom"),setting:{text:g},elementAttrs:{debugText:JSON.stringify({pageContext:y,setting:o,isReact:d,builderProps:m,textWithTranslate:g}).replaceAll("'","'")}})} ${e({styles:u(i,"typoDate"),setting:{text:n(o)},className:p})}`},y={SHOW:"show",HIDE:"hide"},d={SPECIFIC:"specific",RANGE:"range"},p=(e,t="%B %d, %Y")=>{let a=e.getMonth()+1,r=e.getDate(),u=e.getFullYear(),l=[{type:"%a",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.getDay()]},{type:"%A",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]},{type:"%d",value:r.toString().padStart(2,"0")},{type:"%b",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][a-1]},{type:"%B",value:["January","February","March","April","May","June","July","August","September","October","November","December"][a-1]},{type:"%m",value:a.toString().padStart(2,"0")},{type:"%y",value:u.toString().slice(-2)},{type:"%Y",value:u},{type:"%sf",value:function(e){let t=Math.floor(e/10)%10,a=e%10;return 1===a&&1!==t?"st":2===a&&1!==t?"nd":3===a&&1!==t?"rd":"th"}(r)}];return l.forEach(e=>{t=t.replaceAll(e?.type,e?.value?.toString()||"")}),t},g=e=>{let t=new Date,a=new Date(t);return a.setDate(t.getDate()+Number(e)),a},c=()=>{let e=new Date(Date.now());return{FORMAT_1:{Label:p(e,"%b %d"),value:"%b %d"},FORMAT_2:{Label:p(e,"%b %d, %Y"),value:"%b %d, %Y"},FORMAT_3:{Label:p(e,"%a, %b %d"),value:"%a, %b %d"},FORMAT_4:{Label:p(e,"%d/%m/%Y"),value:"%d/%m/%Y"},FORMAT_5:{Label:p(e,"%Y/%m/%d"),value:"%Y/%m/%d"},FORMAT_6:{Label:"Custom"}}};export{d as ESTIMATE_DAYS,y as OUT_OF_STOCK,p as getDayFormat,g as getFutureDay,o as getNewSetting,c as listFormatDate};
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import{template as e,WrapRenderChildren as o,RenderChildren as s,RenderIf as r,hasTranslatedLiquid as t,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getBackgroundTranslated as l,getSettingPreloadData as
|
|
2
|
-
<gp-row
|
|
1
|
+
import{template as e,WrapRenderChildren as o,RenderChildren as s,RenderIf as r,hasTranslatedLiquid as t,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getBackgroundTranslated as l,getSettingPreloadData as p}from"../../../helpers.js";import m from"../../../video/components/HTML5Embed.liquid.js";import{createClass as d,If as n}from"@gem-sdk/system";import{getYoutubeVideoId as c}from"../../../video/common/helpers.js";import g from"../../../video/components/LiteYouTubeEmbed.liquid.js";import{getAttr as u}from"./common/attrs.js";import{Row as f}from"../../settings/configs/row/translate.js";import{getClass as $}from"./common/classes.js";import{getRowStyle as y}from"./common/styles.js";import{getData as j,checkHasBackgroundVideo as k,isRenderHtmlVideo as v,isRenderYoutubeVideo as b}from"./common/helpers.js";import{getResponsiveSetting as w}from"../../../hero-banner/common/helpers.js";let h=h=>{let{styles:C,setting:x,rawChildren:E,builderProps:S}=h,{isSection:q}=x??{},{background:L}=C??{},P=q?"section":"div",T=l({background:L,uid:S?.uid,enableTranslate:!!f?.background?.id,pageContext:h.pageContext??{}}),{stateData:V}=j(h,T),{rowStyle:z,backgroundBoxStyle:A,embedVideoStyle:N,sectionStyle:R}=y({rowProps:h,type:"Liquid",translatedBackground:T}),{rowAttr:_}=u(h),{rowClass:G,backgroundBoxClass:I,backgroundBoxInnerClass:M,sectionClass:O,wrapperYoutubeClasses:B,iframeYoutubeClasses:H}=$(h),U=d({[G]:!0}),Y=()=>{if(!k(L))return;let e=w(L||{});if(v(L))return m({uid:S?.uid,muted:!0,loop:e.desktop?.loop,controls:!1,autoplay:!0,src:"",title:"Video",className:"gp-relative",style:N,pageContext:h.pageContext});if(b(L)){let o=e?.desktop?.video??"",s=c(o)||"",r=t(o),i=`&loop=false&playlist=${s}&showinfo=0&rel=0&fs=0&enablejsapi=1`;return g({uid:S?.uid,id:s,autoplay:!0,title:"Video",translatedVideoUrl:r?o:"",controls:!1,params:i,adNetwork:!1,noCookie:!0,muted:!0,lazy:e?.desktop?.lazyLoad??!0,style:N,wrapperClass:B,iframeClass:H,pageContext:h.pageContext})}},D=e`
|
|
2
|
+
<gp-row
|
|
3
|
+
${{..._}}
|
|
4
|
+
class="${U}"
|
|
5
|
+
style="${z()}"
|
|
6
|
+
>
|
|
7
|
+
<script gp-data type="application/json">${V}</script>
|
|
3
8
|
${n(!!Y(),e`
|
|
4
9
|
<div class="${I}" style="${A}">
|
|
5
10
|
<div class="${M}">${Y()}</div>
|
|
6
11
|
</div>
|
|
7
12
|
`)}
|
|
8
13
|
|
|
9
|
-
${o({uid:
|
|
14
|
+
${o({uid:S?.uid||"",customProps:E?.[0].customProps},E?.map(e=>{if(e)return s({...e,order:x?.order,layout:x?.layout,justifyContent:x?.verticalAlign})}))}
|
|
10
15
|
|
|
11
|
-
${(()=>{if(
|
|
12
|
-
${r(i,`<script ${
|
|
16
|
+
${(()=>{if(k(L))return e`
|
|
17
|
+
${r(i,`<script ${p('class="gps-link" delay',"src")}="{{ 'gp-row-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${p('class="gps-link" delay',"src")}="${a}/assets-v2/gp-row-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
13
18
|
`})()}
|
|
14
19
|
</gp-row>
|
|
15
20
|
`;return e`
|
|
16
|
-
${r(!!C?.preloadBgImage,`${r(!!
|
|
21
|
+
${r(!!C?.preloadBgImage,`${r(!!L?.desktop?.image?.src,`<link rel="preload" href="${L?.desktop?.image?.src}" as="image" />`)}${r(!!L?.tablet?.image?.src,`<link rel="preload" href="${L?.tablet?.image?.src}" as="image" />`)}${r(!!L?.mobile?.image?.src,`<link rel="preload" href="${L?.mobile?.image?.src}" as="image" />`)}`)}
|
|
17
22
|
|
|
18
|
-
${r(!!
|
|
23
|
+
${r(!!q,"{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}")}
|
|
19
24
|
|
|
20
|
-
${n(
|
|
21
|
-
<${
|
|
22
|
-
class="${O} ${
|
|
25
|
+
${n(q,e`
|
|
26
|
+
<${P}
|
|
27
|
+
class="${O} ${q?p("gps-lazy"):""}"
|
|
23
28
|
style="${R}"
|
|
24
29
|
>
|
|
25
30
|
${D}
|
|
26
|
-
</${
|
|
31
|
+
</${P}>
|
|
27
32
|
`,e`${D}`)}
|
|
28
33
|
`};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getGlobalColorStateClass as e}from"@gem-sdk/core";import{getClassAlignBanner as r,getClassContentPosition as
|
|
1
|
+
import{getGlobalColorStateClass as e}from"@gem-sdk/core";import{getClassAlignBanner as r,getClassContentPosition as t,getContentPosition as g,getClassForContentByFitContent as l,getClassForStretchContent as o,getClassSpaceBetween as p,getOpacityHover as n,opacityEnabledData as a,getClassSpaceBetweenLeftRight as s,getResponsiveSetting as i}from"./helpers.js";function u(e){return e.split(" ").reduce((e,r)=>(e[r]=!0,e),{})}let b=({setting:e,builderProps:t,advancedCssClass:g})=>{let l="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return g&&(l+=` ${g}`),{...t?.uid&&{[t.uid]:!0},...u(l),...r(i(e?.alignBanner||{}))}},f=()=>({...u("gp-cursor-pointer gp-h-full")}),h=(e,r)=>({...u("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...t(g(e?.layout,r?.contentPosition1Col,r?.contentPosition2Col)||{})}),v=e=>{let{overlayColor:r}=e??{},t=r?.hover||r?.normal;return t&&"transparent"!==t&&"0%"!=n(e)},c=r=>{let{overlayColor:t,hoverEffect:g}=r??{},{disableOpacity:l}=a(r),o="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)]";return v(r)&&(o+=" gp-transition-all gp-duration-300"),g&&(o+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),e("bg",t,l,!g)&&(o+=` ${e("bg",t,l,!g)}`),u(o)},d=(e,r)=>{let{sizeSetting:t,background:g}=e??{},{verticalAlign:n}=r??{},a=l(t,g),i=o(n),b=p(r?.layout||{},e?.contentPosition1Col||{}),f=s(r?.layout||{}),h=`gp-hero-banner-row ${a} ${i}`;return{...u(h),...b,...f}},C=()=>u("adaptive-hero-banner"),m=()=>u("gp-w-full gp-invisible -gp-z-1"),w=(e,r)=>{let t="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return r&&(t+=" gp_lazybg"),e&&(t+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),u(t)},y=()=>u("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),x=(e=!1)=>{let r="gp-relative gp-h-full";return e&&(r+=" gp-hidden"),u(r)},_=e=>{let r="gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none";return e&&(r+=" gp-pb-[56.25%]"),u(r)},k=()=>u("gp-inset-0 gp-w-full gp-bg-black gp-h-full !gp-max-w-none"),z=e=>{let r="gp-absolute gp-top-0 gp-invisible gp-w-full gp-h-full gp_lazyforbg";return"tablet"===e&&(r+=" gp_lazybg_tl"),"mobile"===e&&(r+=" gp_lazybg_mb"),u(r)};export{v as enableTransitionHover,C as getAdaptiveClasses,m as getAdaptivePictureClasses,w as getBackgroundClasses,b as getClasses,y as getContainBackgroundClasses,h as getContainerClasses,x as getHtml5VideoClasses,k as getIframeYoutubeClasses,z as getLazyBackgroundClasses,f as getLinkClasses,c as getOverlayClasses,d as getRowClasses,_ as getWrapperYoutubeClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEVICES as e,makeStyleResponsive as t,getValueByDevice as o,getAspectRatioGlobalSize as l,getResponsiveValueByScreen as i,cls as r,GRADIENT_BGR_KEY as a}from"@gem-sdk/core";import{getImageSrc as n,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as p}from"../../constant.js";import{DEFAULT_CLIP_PATH as b,VIDEO_IFRAME_SCALE as g}from"./const.js";let d=(t,o,l)=>{let r={};return e.map(e=>{let a=i(t,e),n=i(o,e),s=i(l,e);r={...r,[e]:1>=(a?.cols?.length||1)?n:s}}),r},c=(e,t)=>{if(!i(m(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},m=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},u=e=>{let t=m(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},h=(e,t,o,l)=>{if(!e)return"";let r=m(e),s=i(e,t),p=o?`url(${u(e)[t]})`:`url(${n(i(r,t),t,l)})`,b=s?.color?`, ${s.color}`:"";return s?.color?.includes(a)&&s?.type==="image"?`${p}${b}`:s?.color?.includes(a)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?p:"url()"},y=(o,l=!1,i=!1)=>{if(!o)return;let r={};return e.forEach(e=>{r={...r,[e]:h(o,e,l,i)}}),t("bgi",r)},f=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},I=(e,t,o)=>S(d(e,t,o)),v=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),k=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},w=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},C=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||t:void 0!==o?o:e?.shapeValue??t},A=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:l})=>{let i=C(e,t);return i?{...l,[o]:i}:l},j=(e,o)=>{let r=l(o);return["desktop","mobile","tablet"].forEach(t=>{let l=i(o,t),a=!!k(t,e);a&&(r=A({shapeByDevice:l,fallbackRatio:"auto",device:t,currentResult:r}))}),t("aspect",r)},S=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},Z=(e,o)=>{let l={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=!!k(t,o),n=r?.shape,s=r?.height;l={...l,[t]:"original"!==n||"fit-content"===s||a?"none":"block"}}),t("d",l)},B=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},P=(t,o)=>{let l=!1,r=e.reduce((e,r)=>{let a=i(t,r),n=i(o,r),s=B(a,n?.type==="video");return s&&(e[r]=s,l=!0),e},{});return{aspectRatio:l?r:void 0}},x=(t,l,i)=>e.reduce((e,r)=>{let a=o(t,r),n=a?.type==="video"?a?.videoType:void 0,s=o(l,r),p=i?.[r];return p&&"youtube"===n&&"cover"!==s&&(e[r]=p),e},{}),$=(e,t)=>{let{aspectRatio:o}=P(e,t);return o},D=(e,t,o)=>{let l=x(e,t,o);return Object.keys(l).length?l:void 0},R=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},T=(e,t)=>{let{top:o,height:l}=e,i=-l;return o<i?0:o>t?100:Math.min(Math.max((o-i)/(t-i)*100,0),100)},V=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,z=(e,o)=>{let l={};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=r?.type==="image"&&o,n=V({enableParallax:a,attachment:e[t]?.attachment});l={...l,[t]:a?"150%":n?"100vh":"100%"}}),t("h",l)},M=(e,o)=>{let l={};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=r?.type==="image"&&o,n=V({enableParallax:a,attachment:e[t]?.attachment});l={...l,[t]:n?"100vw":"100%"}}),t("w",l)},W=e=>{let o={};return["desktop","mobile","tablet"].forEach(t=>{o={...o,[t]:e[t]?.attachment==="fixed"?"0px":""}}),t("top",o)},E=(e,t)=>{let o=z(e,t),l=M(e,t),i=W(e);return{...o,...l,...i}},G=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let r=e-i;return r>0?r:0},L=(e,t)=>{if(!t)return`${b}`;let[o,l,i,r]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:n,bbrr:s,bblr:p}=t,g=G(parseInt(a??"0")||0,o,r),d=G(parseInt(n??"0")||0,o,l),c=G(parseInt(s??"0")||0,l,i),m=G(parseInt(p??"0")||0,i,r);return[g,d,c,m].every(e=>0===e)?`${b}`:`inset(0 0 0 round ${g}px ${d}px ${c}px ${m}px)`},H=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),N=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let l=t[e]?.cols??[],i=l.length<=1,r=o[e];if(i&&r)return["space-between","top","center","bottom"].includes(r)?r:void 0},J=(t,o)=>{let l=Y(t),i=Y(o),r={desktop:N({device:"desktop",settingLayoutRes:l,contentPosition1ColRes:i}),tablet:N({device:"tablet",settingLayoutRes:l,contentPosition1ColRes:i}),mobile:N({device:"mobile",settingLayoutRes:l,contentPosition1ColRes:i})},a={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},n={};return e.forEach(e=>{let t=r[e],o=a?.[t]?.[e];n[o]=!0}),n},K=e=>{let t=Y(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},O=e=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(o=>{let l=i(e,o);t={...t,[o]:l}}),r("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},X=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1};return["desktop","mobile","tablet"].forEach(l=>{let r=i(e,l),a=!!k(l,t),n=r?.shape,s=r?.height;o={...o,[l]:"original"===n&&"fit-content"!==s&&!a}}),r(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},F=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o]}`]:!0,[`tablet:gp-justify-${t[l]}`]:!0,[`mobile:gp-justify-${t[i]}`]:!0}},Y=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},U=t=>e.some(e=>{let l=o(t,e);return l?.type!=="color"&&l?.type!=="image"&&!!l&&(l?.videoType==="html5"&&l?.videoHtml5||l?.videoType==="youtube"&&l?.video)});function Q(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let _="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",q=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:p,target:"_self"}:t},ee=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",et=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},l=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:l}},eo=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,l="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||l},el=(e,t)=>{if(!e||!t)return 16/9;let o=i(e,t),l=o?.videoCustomRatio;if(l?.width&&l?.height){let e=Number(l.width),t=Number(l.height);if(e>0&&t>0)return e/t}return 16/9},ei=e=>{e&&(e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("transform"),e.style.removeProperty("position"))},er=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},ea=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},en=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},es=e=>{switch(e){case"top":default:return{top:"0%",transform:`translate(-50%, 0%) scale(${g})`};case"bottom":return{top:"100%",transform:`translate(-50%, -100%) scale(${g})`};case"center":return{top:"50%",transform:`translate(-50%, -50%) scale(${g})`}}},ep=(e,t)=>{if(!e)return;let o=es(t);e.style.top=o.top,e.style.transform=o.transform},eb=({iframeEl:e,containerRatio:t,videoObjectFit:o,background:l,currentDevice:r,isYoutubeVideoMigrated:a})=>{let n,s;let p=el(l,r),b=i(l,r);if(!e||!t)return;let d=b?.videoAlign||"top",c=es(d);if("contain"===o){Object.assign(e.style,{position:"absolute",top:"50%",left:"50%",width:"100%",height:"100%",maxWidth:"none",transform:`translate(-50%, -50%) scale(${g})`});return}t>=p?(n=100,s=t/p*100):(s=100,n=p/t*100),Object.assign(e.style,{position:"absolute",top:c.top,left:"50%",width:a?"500%":`${n}%`,height:a?"100%":`${s}%`,maxWidth:"none",transform:c.transform})};export{P as collectAspectRatioByDevice,x as collectYoutubeAspectRatio,Q as debounce,_ as fallbackImg,ee as formatHoverScale,$ as getAspectRatio,f as getAttachmentDevice,y as getBackgroundImageHeroBanner,q as getBannerLink,m as getBgImage,H as getClassAlignBanner,F as getClassContentPosition,X as getClassForContentByFitContent,O as getClassForStretchContent,J as getClassSpaceBetween,K as getClassSpaceBetweenLeftRight,L as getClipPath,en as getContainerRatio,d as getContentPosition,k as getDataVideoHeroBannerResponsive,Z as getDisplayStyleByFitContent,c as getEnableBgImageByDevice,eo as getOpacityHover,T as getPercentageVisible,Y as getResponsiveSetting,j as getStyleAspectRatioHeroBannerCustom,E as getStyleHeroBannerBg,el as getVideoAspectRatio,w as getVisibilityStyle,R as getWidth,D as getYoutubeAspectRatio,I as horizontalAlign,u as imagePlaceholder,V as isScaleImage,S as mapContentPositionToHorizontal,et as opacityEnabledData,ei as resetVideoIframeStyle,ea as resetVideoWrapperStyle,v as scrollToContentBanner,ep as setVideoIframeAlign,er as setVideoWrapperStyle,U as showVideoType,eb as updateVideoIframeSize};
|
|
1
|
+
import{DEVICES as e,makeStyleResponsive as t,getValueByDevice as o,getAspectRatioGlobalSize as l,getResponsiveValueByScreen as i,cls as r,GRADIENT_BGR_KEY as a}from"@gem-sdk/core";import{getImageSrc as n,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as p}from"../../constant.js";import{DEFAULT_CLIP_PATH as b,VIDEO_IFRAME_SCALE as g}from"./const.js";let d=(t,o,l)=>{let r={};return e.map(e=>{let a=i(t,e),n=i(o,e),s=i(l,e);r={...r,[e]:1>=(a?.cols?.length||1)?n:s}}),r},c=(e,t)=>{if(!i(m(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},m=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},u=e=>{let t=m(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},h=(e,t,o,l)=>{if(!e)return"";let r=m(e),s=i(e,t),p=o?`url(${u(e)[t]})`:`url(${n(i(r,t),t,l)})`,b=s?.color?`, ${s.color}`:"";return s?.color?.includes(a)&&s?.type==="image"?`${p}${b}`:s?.color?.includes(a)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?p:"url()"},y=(o,l=!1,i=!1)=>{if(!o)return;let r={};return e.forEach(e=>{r={...r,[e]:h(o,e,l,i)}}),t("bgi",r)},f=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},I=(e,t,o)=>S(d(e,t,o)),v=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),k=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},w=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},C=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||t:void 0!==o?o:e?.shapeValue??t},A=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:l})=>{let i=C(e,t);return i?{...l,[o]:i}:l},j=(e,o)=>{let r=l(o);return["desktop","mobile","tablet"].forEach(t=>{let l=i(o,t),a=!!k(t,e);a&&(r=A({shapeByDevice:l,fallbackRatio:"auto",device:t,currentResult:r}))}),t("aspect",r)},S=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},Z=(e,o)=>{let l={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=!!k(t,o),n=r?.shape,s=r?.height;l={...l,[t]:"original"!==n||"fit-content"===s||a?"none":"block"}}),t("d",l)},B=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},P=(t,o)=>{let l=!1,r=e.reduce((e,r)=>{let a=i(t,r),n=i(o,r),s=B(a,n?.type==="video");return s&&(e[r]=s,l=!0),e},{});return{aspectRatio:l?r:void 0}},x=(t,l,i)=>e.reduce((e,r)=>{let a=o(t,r),n=a?.type==="video"?a?.videoType:void 0,s=o(l,r),p=i?.[r];return p&&"youtube"===n&&"cover"!==s&&(e[r]=p),e},{}),$=(e,t)=>{let{aspectRatio:o}=P(e,t);return o},D=(e,t,o)=>{let l=x(e,t,o);return Object.keys(l).length?l:void 0},R=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},T=(e,t)=>{let{top:o,height:l}=e,i=-l;return o<i?0:o>t?100:Math.min(Math.max((o-i)/(t-i)*100,0),100)},V=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,z=(e,o)=>{let l={};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=r?.type==="image"&&o,n=V({enableParallax:a,attachment:e[t]?.attachment});l={...l,[t]:a?"150%":n?"100vh":"100%"}}),t("h",l)},M=(e,o)=>{let l={};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=r?.type==="image"&&o,n=V({enableParallax:a,attachment:e[t]?.attachment});l={...l,[t]:n?"100vw":"100%"}}),t("w",l)},W=e=>{let o={};return["desktop","mobile","tablet"].forEach(t=>{o={...o,[t]:e[t]?.attachment==="fixed"?"0px":""}}),t("top",o)},E=(e,t)=>{let o=z(e,t),l=M(e,t),i=W(e);return{...o,...l,...i}},G=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let r=e-i;return r>0?r:0},L=(e,t)=>{if(!t)return`${b}`;let[o,l,i,r]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:n,bbrr:s,bblr:p}=t,g=G(parseInt(a??"0")||0,o,r),d=G(parseInt(n??"0")||0,o,l),c=G(parseInt(s??"0")||0,l,i),m=G(parseInt(p??"0")||0,i,r);return[g,d,c,m].every(e=>0===e)?`${b}`:`inset(0 0 0 round ${g}px ${d}px ${c}px ${m}px)`},H=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),N=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let l=t[e]?.cols??[],i=l.length<=1,r=o[e];if(i&&r)return["space-between","top","center","bottom"].includes(r)?r:void 0},J=(t,o)=>{let l=Y(t),i=Y(o),r={desktop:N({device:"desktop",settingLayoutRes:l,contentPosition1ColRes:i}),tablet:N({device:"tablet",settingLayoutRes:l,contentPosition1ColRes:i}),mobile:N({device:"mobile",settingLayoutRes:l,contentPosition1ColRes:i})},a={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(3)]:gp-absolute [&>*:nth-child(3)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(3)]:gp-absolute tablet:[&>*:nth-child(3)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(3)]:gp-absolute mobile:[&>*:nth-child(3)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},n={};return e.forEach(e=>{let t=r[e],o=a?.[t]?.[e];n[o]=!0}),n},K=e=>{let t=Y(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},O=e=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(o=>{let l=i(e,o);t={...t,[o]:l}}),r("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},X=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1};return["desktop","mobile","tablet"].forEach(l=>{let r=i(e,l),a=!!k(l,t),n=r?.shape,s=r?.height;o={...o,[l]:"original"===n&&"fit-content"!==s&&!a}}),r(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},F=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o]}`]:!0,[`tablet:gp-justify-${t[l]}`]:!0,[`mobile:gp-justify-${t[i]}`]:!0}},Y=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},U=t=>e.some(e=>{let l=o(t,e);return l?.type!=="color"&&l?.type!=="image"&&!!l&&(l?.videoType==="html5"&&l?.videoHtml5||l?.videoType==="youtube"&&l?.video)});function Q(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let _="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",q=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:p,target:"_self"}:t},ee=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",et=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},l=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:l}},eo=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,l="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||l},el=(e,t)=>{if(!e||!t)return 16/9;let o=i(e,t),l=o?.videoCustomRatio;if(l?.width&&l?.height){let e=Number(l.width),t=Number(l.height);if(e>0&&t>0)return e/t}return 16/9},ei=e=>{e&&(e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("transform"),e.style.removeProperty("position"))},er=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},ea=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},en=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},es=e=>{switch(e){case"top":default:return{top:"0%",transform:`translate(-50%, 0%) scale(${g})`};case"bottom":return{top:"100%",transform:`translate(-50%, -100%) scale(${g})`};case"center":return{top:"50%",transform:`translate(-50%, -50%) scale(${g})`}}},ep=(e,t)=>{if(!e)return;let o=es(t);e.style.top=o.top,e.style.transform=o.transform},eb=({iframeEl:e,containerRatio:t,videoObjectFit:o,background:l,currentDevice:r,isYoutubeVideoMigrated:a})=>{let n,s;let p=el(l,r),b=i(l,r);if(!e||!t)return;let d=b?.videoAlign||"top",c=es(d);if("contain"===o){Object.assign(e.style,{position:"absolute",top:"50%",left:"50%",width:"100%",height:"100%",maxWidth:"none",transform:`translate(-50%, -50%) scale(${g})`});return}t>=p?(n=100,s=t/p*100):(s=100,n=p/t*100),Object.assign(e.style,{position:"absolute",top:c.top,left:"50%",width:a?"500%":`${n}%`,height:a?"100%":`${s}%`,maxWidth:"none",transform:c.transform})};export{P as collectAspectRatioByDevice,x as collectYoutubeAspectRatio,Q as debounce,_ as fallbackImg,ee as formatHoverScale,$ as getAspectRatio,f as getAttachmentDevice,y as getBackgroundImageHeroBanner,q as getBannerLink,m as getBgImage,H as getClassAlignBanner,F as getClassContentPosition,X as getClassForContentByFitContent,O as getClassForStretchContent,J as getClassSpaceBetween,K as getClassSpaceBetweenLeftRight,L as getClipPath,en as getContainerRatio,d as getContentPosition,k as getDataVideoHeroBannerResponsive,Z as getDisplayStyleByFitContent,c as getEnableBgImageByDevice,eo as getOpacityHover,T as getPercentageVisible,Y as getResponsiveSetting,j as getStyleAspectRatioHeroBannerCustom,E as getStyleHeroBannerBg,el as getVideoAspectRatio,w as getVisibilityStyle,R as getWidth,D as getYoutubeAspectRatio,I as horizontalAlign,u as imagePlaceholder,V as isScaleImage,S as mapContentPositionToHorizontal,et as opacityEnabledData,ei as resetVideoIframeStyle,ea as resetVideoWrapperStyle,v as scrollToContentBanner,ep as setVideoIframeAlign,er as setVideoWrapperStyle,U as showVideoType,eb as updateVideoIframeSize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"./HeroBannerItem.js";import{getAttr as s,getAttrLink as m}from"../common/attrs.js";import{getStyle as t}from"../common/styles.js";import{getClasses as n,getLinkClasses as
|
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"./HeroBannerItem.js";import{getAttr as s,getAttrLink as m}from"../common/attrs.js";import{getStyle as t}from"../common/styles.js";import{getClasses as n,getLinkClasses as i}from"../common/classes.js";import{createAttr as a,createStyle as l,createClass as d,If as p}from"@gem-sdk/system";import{useRenderMode as f,useCurrentDevice as c,filterToolbarPreview as u}from"@gem-sdk/core";import{getBannerLink as h}from"../common/helpers.js";import j from"../hooks/useHeroBanner.js";import{useRef as C}from"react";let g=g=>{let{builderAttrs:k,builderProps:v,setting:y,styles:B,style:H,children:R,advanced:w,pageContext:x}=g,{isEditMode:b,isPreviewSharePageMode:M}=f(),{enableLink:N}=y??{},V=h(y),{cssClass:E}=w??{},I=c(),{elementRef:L,transform:P,onMouseEnterParallax:S,onMouseLeaveParallax:W,dataVideo:q,bgRef:z,isShowVideoHtml5:A,openLinkBanner:D,layoutResponsive:F}=j(B,y,I),G=C(null),J=!!V?.link&&N&&!b&&!M,K=a({...s({uid:v?.uid||""})}),O=a({...m()}),Q=l({...t(B,y,H)}),T=d({...n({setting:y,builderProps:v,advancedCssClass:E})}),U=d({...i()}),X=()=>r(o,{setting:y,styles:B,children:R,rawChildren:g.rawChildren,builderProps:v,pageContext:x,elementRef:L,transform:P,dataVideo:q,layoutResponsive:F,bgRef:z,isShowVideoHtml5:A,heroBannerWrapperRef:G});return e("div",{ref:G,...k,...K,className:T,style:Q,onMouseEnter:S,onMouseLeave:W,children:[p(!J,X()),p(J,r("div",{...O,"aria-hidden":"true",onClick:D,className:U,children:X()})),u(R,!0)]})};export{g as default};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as t}from"../common/attrs.js";import{getStyle as o}from"../common/styles.js";import{getClasses as s,getLinkClasses as a}from"../common/classes.js";import{createStateOrContext as i,createAttr as n,createStyle as l,createClass as d,If as c}from"@gem-sdk/system";import{dataStringify as
|
|
1
|
+
import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as t}from"../common/attrs.js";import{getStyle as o}from"../common/styles.js";import{getClasses as s,getLinkClasses as a}from"../common/classes.js";import{createStateOrContext as i,createAttr as n,createStyle as l,createClass as d,If as c}from"@gem-sdk/system";import{dataStringify as p,template as m,RenderIf as f,isLocalEnv as u,baseAssetURL as g}from"@gem-sdk/core";import{getBackgroundTranslated as h,getInsertLinkData as v,getSettingPreloadData as b}from"../../helpers.js";import{getResponsiveSetting as $,getBannerLink as j}from"../common/helpers.js";import{HeroBanner as k}from"../settings/configs/translate.js";let y=y=>{let{builderAttrs:E,builderProps:C,setting:P,styles:S,style:x,children:B,advanced:T,pageContext:V}=y,{enableLink:H,enableParallax:M}=P??{},N=h({background:S?.background,uid:C?.uid,enableTranslate:!!k?.background?.id,pageContext:V??{},isTranslateVideo:!0}),O=j(P),{cssClass:R}=T??{},{urlData:_}=v("",O),w=i({background:$(N||{}),uid:C?.uid,enableParallax:M&&Number(P?.speedParallax||0)>0,speedParallax:Number(P?.speedParallax)||0,hoverEffect:S?.hoverEffect,hoverEffectScale:S?.hoverEffectScale,layout:P?.layout,contentPosition1Col:S?.contentPosition1Col,contentPosition2Col:S?.contentPosition2Col,aspectRatio:P?.aspectRatio,sizeSetting:$(S?.sizeSetting||{}),videoObjectFit:$(S?.videoObjectFit||{}),target:O?.target??"_self",href:_?.href??"",linkType:O?.type??"",hoverEffectDuration:S?.hoverEffectDuration,isYoutubeVideoMigrated:P?.isYoutubeVideoMigrated}),z=!!O?.link&&H,A=n({...r({uid:C?.uid||""})}),D=n(t()),F=l({...o(S,P,x)}),G=d({...s({setting:P,builderProps:C,advancedCssClass:R})}),I=d({...a()}),Y=()=>e({setting:P,translatedBackground:N,styles:S,children:B,rawChildren:y.rawChildren,builderProps:C,pageContext:V});return m`
|
|
2
2
|
<gp-hero-banner
|
|
3
|
-
${{...
|
|
4
|
-
${{...
|
|
5
|
-
class="${
|
|
6
|
-
style="${
|
|
7
|
-
gp-data='${m(z)}'
|
|
3
|
+
${{...E}}
|
|
4
|
+
${{...A}}
|
|
5
|
+
class="${G}"
|
|
6
|
+
style="${F}"
|
|
8
7
|
>
|
|
9
|
-
|
|
10
|
-
${c(
|
|
8
|
+
<script gp-data type="application/json">${p(w)}</script>
|
|
9
|
+
${c(!z,Y())}
|
|
10
|
+
${c(z,m`
|
|
11
11
|
<div
|
|
12
|
-
${{...
|
|
12
|
+
${{...D}}
|
|
13
13
|
aria-hidden="true"
|
|
14
|
-
class="${
|
|
14
|
+
class="${I}"
|
|
15
15
|
>
|
|
16
|
-
${
|
|
16
|
+
${Y()}
|
|
17
17
|
</div>`)}
|
|
18
18
|
</gp-hero-banner>
|
|
19
19
|
${f(u,`<script ${b('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v2-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${b('class="gps-link" delay',"src")}="${g}/assets-v2/gp-hero-banner-v2-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
20
20
|
`)}
|
|
21
|
-
`};export{
|
|
21
|
+
`};export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useMemo as t}from"react";import{useEditorMode as s,filterToolbarPreview as i,getAspectRatioGlobalSize as r}from"@gem-sdk/core";import l from"../../grid/components/row/Row.js";import{createStyle as m,createClass as a}from"@gem-sdk/system";import d from"../../image/components/AdaptiveImage.js";import p from"../../video/components/HTML5Embed.js";import{getContainerStyle as n,getOverlayStyle as c,getRowStyle as
|
|
2
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useMemo as t}from"react";import{useEditorMode as s,filterToolbarPreview as i,getAspectRatioGlobalSize as r}from"@gem-sdk/core";import l from"../../grid/components/row/Row.js";import{createStyle as m,createClass as a}from"@gem-sdk/system";import d from"../../image/components/AdaptiveImage.js";import p from"../../video/components/HTML5Embed.js";import{getContainerStyle as n,getOverlayStyle as c,getRowStyle as u,getAdaptiveStyle as y,getBackgroundStyle as f,getContainBackgroundStyle as v,getYoutubeIframeStyle as h,getHtml5VideoStyle as b}from"../common/styles.js";import{getContainerClasses as g,getOverlayClasses as j,getRowClasses as N,getAdaptivePictureClasses as T,getAdaptiveClasses as k,getBackgroundClasses as H,getContainBackgroundClasses as w,getHtml5VideoClasses as C,getWrapperYoutubeClasses as V,getIframeYoutubeClasses as B}from"../common/classes.js";import{getBackgroundImageHeroBanner as I,showVideoType as M,scrollToContentBanner as Y,getWidth as z,horizontalAlign as E,fallbackImg as L,getBgImage as x}from"../common/helpers.js";import A from"../../video/components/LiteYouTubeEmbed.js";import{getYoutubeVideoId as R,youtubeVideoRegex as $}from"../../video/common/helpers.js";import O from"../hooks/useHeroBannerItem.js";import{getYoutubeContentClasses as S}from"../../video/common/classes.js";let W=W=>{s();let{setting:q,styles:D,children:F,elementRef:G,transform:J,dataVideo:K,bgRef:P,isShowVideoHtml5:Q,layoutResponsive:U,heroBannerWrapperRef:X}=W,{layout:Z,verticalAlign:_,enableParallax:ee,alt:eo,title:et}=q??{},{background:es,overlayColor:ei,verticalGutter:er,sizeSetting:el,contentWidth:em,hoverEffect:ea,contentPosition1Col:ed,contentPosition2Col:ep,videoObjectFit:en}=D??{},ec=m({...n(D)}),eu=a({...g(q,D)}),ey=m({...c(D)}),ef=a({...j(D)}),ev=m({...u(D)}),eh=a({...N(D,q)}),eb=m({...y(D)}),eg=a({...T()}),ej=a({...k()}),eN=a({...H(ea,!1)}),eT=m({...I(es,!1,!0),...f(D,ee,J)}),ek=a({...w()}),eH=m({...v(D)}),ew=a({...C(!Q)}),{youtubeIframeWrapperRef:eC,resolvedAspectRatio:eV,youtubeAspectRatio:eB}=O({videoType:K?.videoType,sizeSetting:el,background:es,videoObjectFit:en,heroBannerWrapperRef:X,isYoutubeVideoMigrated:q?.isYoutubeVideoMigrated}),eI=m({...h(eB,en)}),eM=m({...b(eV,en,es)}),eY=a({...V(q?.isYoutubeVideoMigrated)}),ez=a({...B()}),eE=a({...S()}),eL=t(()=>{if(!M(es))return;if(K?.videoType==="html5"&&!K.videoHtml5||K?.videoType==="youtube"&&!K.video)return null;if(K?.type==="video"&&K?.videoType==="html5"&&K?.videoHtml5)return e(p,{muted:!0,loop:K?.loop,controls:!1,autoplay:!0,src:K?.videoHtml5||"",title:"Video",style:eM,className:ew});let o=K?.video??"",t=R(o),s=K?.loop?1:0,i=`&loop=${s}&playlist=${t}&showinfo=0&rel=0&fs=0&enablejsapi=1`;if(K?.type==="video"&&K?.videoType==="youtube"&&t&&$.test(o))return e("div",{className:eE,ref:eC,children:e(A,{id:t,isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:i,adNetwork:!1,noCookie:!0,muted:!0,lazy:K?.lazyLoad??!0,style:eI,wrapperClass:eY,iframeClass:ez})})},[K,es,ew,ez,eY,eI,eM,eC]);return o("div",{className:eu,style:ec,children:[o("div",{ref:G,className:ek,style:eH,children:[e("div",{ref:P,className:eN,style:eT,children:eL}),!!ei&&e("div",{"aria-label":"Overlay",className:ef,style:ey})]}),e(l,{className:eh,style:ev,setting:{layout:Z,horizontalAlign:E(Z,ed,ep),verticalAlign:_},styles:{verticalGutter:er,width:z(em),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},hiddenEmptyCol:U?.cols?.length===1,onBlur:e=>Y(e),children:i(F)}),e(d,{pictureClass:eg,srcSet:x(es),className:ej,aspectRatio:r(el),style:eb,alt:eo,title:et,fallbackImg:L})]})};export{W as default};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{template as e,getAspectRatioGlobalSize as t,DEVICES as o,getResponsiveValueByScreen as s,hasTranslatedLiquid as i}from"@gem-sdk/core";import l from"../../grid/components/row/Row.liquid.js";import{createStyle as a,createClass as r,If as m}from"@gem-sdk/system";import d from"../../image/components/AdaptiveImage.liquid.js";import n from"../../video/components/HTML5Embed.liquid.js";import{getContainerStyle as p,getOverlayStyle as u,getRowStyle as c,getAdaptiveStyle as f,getBackgroundStyle as
|
|
2
|
-
<div class="${
|
|
1
|
+
import{template as e,getAspectRatioGlobalSize as t,DEVICES as o,getResponsiveValueByScreen as s,hasTranslatedLiquid as i}from"@gem-sdk/core";import l from"../../grid/components/row/Row.liquid.js";import{createStyle as a,createClass as r,If as m}from"@gem-sdk/system";import d from"../../image/components/AdaptiveImage.liquid.js";import n from"../../video/components/HTML5Embed.liquid.js";import{getContainerStyle as p,getOverlayStyle as u,getRowStyle as c,getAdaptiveStyle as f,getBackgroundStyle as y,getContainBackgroundStyle as g,getYoutubeIframeStyle as v,getHtml5VideoStyle as j}from"../common/styles.js";import{getContainerClasses as $,getOverlayClasses as b,getRowClasses as h,getAdaptivePictureClasses as C,getAdaptiveClasses as I,getBackgroundClasses as w,getContainBackgroundClasses as T,getHtml5VideoClasses as k,getWrapperYoutubeClasses as x,getIframeYoutubeClasses as N,getLazyBackgroundClasses as q}from"../common/classes.js";import{getAspectRatio as L,getYoutubeAspectRatio as z,getBackgroundImageHeroBanner as H,getWidth as A,horizontalAlign as V,getEnableBgImageByDevice as B,getBgImage as E,showVideoType as R,getResponsiveSetting as S,fallbackImg as D}from"../common/helpers.js";import{getImageSrc as M}from"../../image/common/helpers.js";import O from"../../image/components/NextImage.liquid.js";import U from"../../video/components/LiteYouTubeEmbed.liquid.js";import{getYoutubeVideoId as W,youtubeVideoRegex as Y}from"../../video/common/helpers.js";import{isRenderHtmlVideo as F}from"../../grid/components/row/common/helpers.js";import{PRIORITY_LOAD_ATTRS as G}from"../../image/constants.js";import{getSeoTranslated as J}from"../../helpers.js";let K=K=>{let{translatedBackground:P,setting:Q,styles:X,children:Z,builderProps:_,rawChildren:ee,pageContext:et}=K,{layout:eo,verticalAlign:es,enableParallax:ei,alt:el,title:ea,preload:er,isYoutubeVideoMigrated:em}=Q??{},{background:ed,overlayColor:en,verticalGutter:ep,sizeSetting:eu,contentWidth:ec,hoverEffect:ef,contentPosition1Col:ey,contentPosition2Col:eg,videoObjectFit:ev}=X??{},ej=!er&&(et?.enableLazyLoadImage??!0),e$=L(eu,ed),eb=z(ed,ev,e$),eh=S(P||{}),eC=eh.desktop,eI=a({...p(X)}),ew=r({...$(Q,X)}),eT=a({...u(X)}),ek=r({...b(X)}),ex=a({...c(X)}),eN=r({...h(X,Q)}),eq=a({...f(X)}),eL=r({...C()}),ez=r({...I()}),eH=r({...w(ef,ej)}),eA=a({...H(P,ej,!1),...y(X,ei,"")}),eV=r({...T()}),eB=a({...g(X)}),eE=r({...k(!1)}),eR=a({...v(eb,ev)}),eS=r({...x(em)}),eD=a({...j(e$,ev,ed)}),eM=r({...N()}),eO=e=>r({...q(e)});return e`
|
|
2
|
+
<div class="${ew}" style="${eI}">
|
|
3
3
|
<div
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
4
|
+
class="${eV}"
|
|
5
|
+
style="${eB}"
|
|
6
6
|
>
|
|
7
|
-
<div class="${
|
|
8
|
-
${(()=>{if(!
|
|
9
|
-
${(()=>{if(!R(
|
|
7
|
+
<div class="${eH}" style="${eA}">
|
|
8
|
+
${(()=>{if(!er)return o.map(e=>m(B(e,P),O({src:M(s(E(P),e),e),alt:J({valueTranslate:el,uid:_?.uid,settingId:"alt",pageContext:et??{}}),title:J({valueTranslate:ea,uid:_?.uid,settingId:"title",pageContext:et??{}}),className:eO(e),isDisableAspectStyle:!0,pageContext:et}))).join("")})()}
|
|
9
|
+
${(()=>{if(!R(ed))return;if(F(ed))return n({uid:_?.uid,muted:!0,loop:eC?.loop,controls:!1,autoplay:!0,src:eC?.videoHtml5||"",title:"Video",style:eD,className:eE,pageContext:et});let e=eC?.video??"",t=W(e),o=`&loop=false&playlist=${t}&showinfo=0&rel=0&fs=0&enablejsapi=1`,s=i(e);if(eC?.type==="video"&&eC?.videoType==="youtube"&&t&&Y.test(e)||s)return U({uid:_?.uid,id:t??"",translatedVideoUrl:s?e:"",isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:o,adNetwork:!1,noCookie:!0,muted:!0,lazy:eC?.lazyLoad??!0,style:eR,wrapperClass:eS,iframeClass:eM,pageContext:et})})()}
|
|
10
10
|
</div>
|
|
11
|
-
${m(!!
|
|
11
|
+
${m(!!en,e`<div aria-label="Overlay" class="${ek}" style="${eT}"> </div>`)}
|
|
12
12
|
</div>
|
|
13
|
-
${l({className:
|
|
14
|
-
${d({pictureClass:
|
|
13
|
+
${l({className:eN,style:ex,setting:{layout:eo,horizontalAlign:V(eo,ey,eg),verticalAlign:es},styles:{verticalGutter:ep,width:A(ec),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},children:Z,rawChildren:ee})}
|
|
14
|
+
${d({pictureClass:eL,srcSet:E(P),className:ez,...er&&G,aspectRatio:t(eu),style:eq,alt:J({valueTranslate:el,uid:_?.uid,settingId:"alt",pageContext:et??{}}),title:J({valueTranslate:ea,uid:_?.uid,settingId:"title",pageContext:et??{}}),pageContext:et,fallbackImg:D})}
|
|
15
15
|
</div>
|
|
16
16
|
`};export{K as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dataStringify as s,template as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as
|
|
1
|
+
import{dataStringify as s,template as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as p,createStyle as a,createAttr as d,If as c}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as m,getClassWrapItemIcon as $,getClassWrapIcon as u,getClassIcon as g,getClassTextItem as v}from"../common/classes.js";import{getStyleContainerIconlistMain as y,getStyleWraplistIcon as f,getStyleColListIcon as j,getStyleWrapIcon as h,getStyleWrapItemIcon as q,getStyleIcon as x,getStyleTypoText as S}from"../common/styles.js";import{getvalueMap as k,getTextIconTranslations as E,getTextIconNotFound as A}from"../common/helpers.js";let N=N=>{let{builderProps:T,builderAttrs:V,style:_,setting:w,styles:C,pageContext:G}=N,I=T?.builderData?.advanced,L=p({[T?.uid??""]:!0}),O=p(n()),W=p(m()),b=p($({builderProps:T})),D=p(u()),F=p(g()),M=p(v({setting:w})),P=a(y({styles:C,style:_,type:"liquid",advanced:I})),R=a(f({styles:C,uid:T?.uid??"",pageContext:G,type:"Liquid"})),z=a(j({styles:C})),B=a(h({styles:C,setting:w})),H=a(q({styles:C})),J=a(x({styles:C,setting:w})),K=S({setting:w}),Q=d({...V}),U=A("liquid"),X=k({setting:w});return i`
|
|
2
2
|
{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
|
|
3
3
|
<gp-icon-list
|
|
4
4
|
${{...Q}}
|
|
@@ -6,9 +6,9 @@ import{dataStringify as s,template as i,RenderIf as t,isLocalEnv as e,baseAssetU
|
|
|
6
6
|
data-id="${T?.uid}"
|
|
7
7
|
style="${P}"
|
|
8
8
|
className="${L}"
|
|
9
|
-
gp-data='${s({position:C?.position,iconWidth:w?.iconWidth}).replaceAll("'","'")}'
|
|
10
9
|
>
|
|
11
|
-
|
|
10
|
+
<script gp-data type="application/json">${s({position:C?.position,iconWidth:w?.iconWidth}).replaceAll("'","'")}</script>
|
|
11
|
+
${c(!X||!X.length,i`<div>${U}</div>`,i`
|
|
12
12
|
<div class="${O}" style="${R}">
|
|
13
13
|
<div class="${W}" style="${z}">
|
|
14
14
|
${X?.map((s,t)=>{let e=E({setting:w,builderProps:T,pageContext:G,key:t,type:"liquid"});return i`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HREF_TO_SALES_PAGE as
|
|
1
|
+
import{HREF_TO_SALES_PAGE as e}from"../../constant.js";import{getAspectRatio as t,getNewBackupFileKey as r,getImageSrc as a,safeStringify as s,IMAGE_PLACEHOLDER as l,NEXT_IMAGE_CONFIG as i,getSrcSet as o,createBlurDataURL as g}from"./helpers.js";import{createAttr as p}from"@gem-sdk/system";import{handleClickLink as n}from"../../helpers.js";import{PRIORITY_LOAD_ATTRS as c}from"../constants.js";let u=(e,t)=>({...e,...t&&{"data-id":t}}),d=({urlData:t,imageLink:r,title:a,isLiquid:s=!1})=>{let l=s?{...t,...r?.noFollow&&{rel:"nofollow"},title:a}:{setting:t,title:a};return r?.type!=="go-to-sales-page"?r?.link?l:{}:s?{href:e,target:"_self"}:{setting:{href:e,target:"_self"}}},y=({pageContext:e})=>({...e&&{pageContext:e}}),m=({styles:e,setting:l,mode:i,isLiquid:o})=>{let{alt:g,srcSet:p,priority:u,qualityPercent:d,qualityType:y,title:m}=l??{},L=t({styles:e,setting:l}),k=p?.desktop?.backupFileKey?r(p?.desktop?.backupFileKey??"",p?.desktop?.src??""):"",A=o?a({src:p?.desktop?.src,backupFileKey:k,backupFilePath:p?.desktop?.backupFilePath,storage:p?.desktop?.storage}):p?.desktop?.src??"",b=u?{}:{"base-src":A??"","quality-type":s(y),"quality-percent":s(d)};return{pictureClass:"gp-contents",...g&&{alt:g},...m&&{title:m},...p&&{srcSet:p},...u&&c,...b,...e?.objectFit&&{layout:e.objectFit},onClick:()=>{n(l?.imageLink,i)},aspectRatio:L}},L=({styles:e,setting:r})=>{let{objectFit:a}=e??{},{vw:s,alt:l,title:i,quality:o,priority:g,isNotLazyload:p,qualityType:n,qualityPercent:c}=r??{},u=t({styles:e,setting:r});return{...r?.image,...s&&{vw:s},...l&&{alt:l},...i&&{title:i},...o&&{quality:o},...g&&{priority:g},isNotLazyload:p,setting:{aspectRatio:u,layout:a,qualityType:n,qualityPercent:c}}},k=e=>{let{srcset:t,setting:l,storage:n,baseSrc:c,priority:u,customAttrs:d,width:y=2237,height:m=1678,isNotLazyload:L,backupFileKey:k,backupFilePath:A,srcIsLiquidCode:b,pageContext:F,alt:f=i.DEFAULT_ALT,title:h,src:T=i.DEFAULT_SRC,sizes:E=i.DEFAULT_SIZES}=e,_=!L&&(F?.enableLazyLoadImage??!0)&&!u;return p({...d,...(()=>{let{qualityPercent:e,qualityType:t}=l??{},r=!u&&t&&e?{"quality-type":s(t),"quality-percent":s(e)}:{"quality-type":"","quality-percent":""};return{...f&&{alt:f},...h&&{title:h},width:y,height:m,draggable:"false",...r}})(),...(()=>{let e=k?r(k??"",T):"",s=b?c:a({src:T,backupFileKey:e,backupFilePath:A,storage:n}),l=b?T:o(e??"",n??"THEME",T),i={sizes:"100vw",src:g(y,m),...s&&!u?{"base-src":s}:{},...s?{"data-src":s}:{},...l?{"data-srcset":l}:{}},p={sizes:E,src:s??"",isNotLazyload:"true",srcset:t??"",...s&&!u?{"base-src":s}:{},...u?{loading:"eager",fetchpriority:"high"}:{loading:"lazy"}};return{"data-sizes":"auto",..._?i:p}})()})},A=e=>{let{width:t=i.DEFAULT_WIDTH_PROPS,height:r=i.DEFAULT_HEIGHT_PROPS,quality:a,priority:s,isNotLazyload:o,pageContext:g,base64:n=l,alt:c=i.DEFAULT_ALT,title:u,src:d=i.DEFAULT_SRC}=e,y=!o&&(g?.enableLazyLoadImage??!0)&&!s,m=p((()=>{let e={loading:"lazy",placeholder:"blur",...n&&{blurDataURL:n}};return{...y?e:{loading:"eager",fetchpriority:"high"}}})());return{src:d,alt:c,title:u,width:t,height:r,quality:a,...m}};export{m as getAdaptiveImageAttrs,u as getContainerAttrs,y as getImageLiquidAttrs,d as getLinkWrapperAttrs,L as getNextImageAttrs,k as getNextImageLiquidAttrs,A as getNextImageReactAttrs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as
|
|
2
|
+
import{jsx as e,Fragment as a,jsxs as s}from"react/jsx-runtime";import{FALLBACK_IMAGE as m,getAdaptiveImageData as r,IMAGE_PLACEHOLDER as o}from"../common/helpers.js";import{createAttr as t,createStyleReact as l,createStyle as d,createClass as c}from"@gem-sdk/system";import{getAdaptiveImageClasses as i}from"../common/classes.js";import{getAdaptivePictureStyles as p,getAdaptiveImageStyles as n}from"../common/styles.js";let g=g=>{let{alt:y,style:f,srcSet:h,layout:u,priority:L,className:x,aspectRatio:z,borderRadius:b,pictureClass:j,pageContext:I,...k}=g,{getDeviceSource:w}=r(g),{srcTablet:v,srcMobile:N}=w(),S=t({loading:L?"eager":"lazy",src:h?.desktop?.src||m}),A=l({...p()}),P=d({...n({layout:u,aspectRatio:z,borderRadius:b}),...f}),q=c({...i({className:x,hasLazyLoad:!L&&I?.enableLazyLoadImage})});return e(a,{children:s("picture",{style:A,className:j,children:[s(a,{children:[N&&e("source",{media:"(max-width: 767px)",srcSet:I?.enableLazyLoadImage?o:N}),v&&e("source",{media:"(max-width: 1024px)",srcSet:I?.enableLazyLoadImage?o:v})]}),e("img",{...k,...S,alt:y,width:"100%",style:P,className:q,draggable:"false"})]})})};g.defaultProps={layout:{desktop:"cover"}};export{g as default};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{template as
|
|
2
|
-
<picture style="${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
1
|
+
import{template as e}from"@gem-sdk/core";import{createAttr as t,createStyle as a,createClass as s}from"@gem-sdk/system";import{getAdaptiveImageClasses as o}from"../common/classes.js";import{createBlurDataURL as i,getAdaptiveImageData as m}from"../common/helpers.js";import{getAdaptivePictureStyles as d,getAdaptiveImageStyles as r}from"../common/styles.js";let h=h=>{let{alt:l,style:p,layout:c,srcSet:$,priority:g,className:L,aspectRatio:b,pageContext:n,pictureClass:w,borderRadius:y,...k}=h,{getDeviceSource:u}=m(h),{srcDesktop:f,srcTablet:z,srcMobile:x}=u({isLiquid:!0}),I=t({src:n?.enableLazyLoadImage&&!g?i($?.desktop?.width??0,$?.desktop?.height??0):f,"data-src":f}),j=a({...d()}),S=a({...r({layout:c,aspectRatio:b,borderRadius:y}),...p}),q=s({...o({className:L,hasLazyLoad:!g&&n?.enableLazyLoadImage,hasForceLoad:n?.isOptimizePlan})});return e`
|
|
2
|
+
<picture style="${j}" class="${w}">
|
|
3
|
+
${e`
|
|
4
|
+
${x?`<source media="(max-width: 767px)" data-srcSet="${x}" srcset="${n?.enableLazyLoadImage&&!g?i($?.mobile?.width??$?.tablet?.width??$?.desktop?.width??0,$?.mobile?.height??$?.tablet?.height??$?.desktop?.height??0):x}" />`:""}
|
|
5
|
+
${z?`<source media="(max-width: 1024px)" data-srcSet="${z}" srcset="${n?.enableLazyLoadImage&&!g?i($?.tablet?.width??$?.desktop?.width??0,$?.tablet?.height??$?.desktop?.height??0):z}" />`:""}
|
|
6
6
|
`}
|
|
7
|
-
${
|
|
7
|
+
${e`
|
|
8
8
|
<img
|
|
9
|
-
${{...
|
|
10
|
-
${{...
|
|
11
|
-
alt="${
|
|
9
|
+
${{...k}}
|
|
10
|
+
${{...I}}
|
|
11
|
+
alt="${l}"
|
|
12
12
|
width="100%"
|
|
13
|
-
style="${
|
|
14
|
-
class="${
|
|
13
|
+
style="${S}"
|
|
14
|
+
class="${q}"
|
|
15
15
|
/>
|
|
16
16
|
`}
|
|
17
17
|
</picture>
|