@gem-sdk/components 22.0.0-staging.47 → 23.0.0-dev.11

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 (138) hide show
  1. package/dist/cjs/article/components/ArticleImage.liquid.js +2 -2
  2. package/dist/cjs/article/components/ArticleList.js +1 -1
  3. package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
  4. package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
  5. package/dist/cjs/common/components/Loading.js +1 -1
  6. package/dist/cjs/common/const.js +1 -1
  7. package/dist/cjs/common/helpers.js +1 -0
  8. package/dist/cjs/common/hooks/useElementWidth.js +1 -0
  9. package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
  10. package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
  11. package/dist/cjs/grid/components/section/Section.js +1 -1
  12. package/dist/cjs/hero-banner/common/helpers.js +1 -1
  13. package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
  14. package/dist/cjs/image/common/attrs.js +1 -1
  15. package/dist/cjs/image/common/classes.js +1 -1
  16. package/dist/cjs/image/common/helpers.js +2 -2
  17. package/dist/cjs/image/common/liquidSrcset.js +1 -0
  18. package/dist/cjs/image/common/srcset.js +1 -0
  19. package/dist/cjs/image/components/AdaptiveImage.js +1 -1
  20. package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
  21. package/dist/cjs/image/components/Image.liquid.js +10 -10
  22. package/dist/cjs/image/components/NextImage.js +1 -1
  23. package/dist/cjs/image/components/NextImage.liquid.js +4 -5
  24. package/dist/cjs/image/constants.js +1 -1
  25. package/dist/cjs/image/settings/configs/settings.js +1 -1
  26. package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
  27. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
  28. package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
  29. package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
  30. package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
  31. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  32. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
  33. package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +16 -16
  34. package/dist/cjs/product/components/file-upload/common/classes.js +1 -1
  35. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  36. package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
  37. package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  38. package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
  39. package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +42 -42
  40. package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
  41. package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
  42. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  43. package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
  44. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
  45. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +39 -39
  46. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +38 -38
  47. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
  48. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
  49. package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
  50. package/dist/cjs/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
  51. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  52. package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +4 -4
  53. package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +4 -4
  54. package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
  55. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  56. package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +2 -3
  57. package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +4 -4
  58. package/dist/cjs/product/components/product-wrap/Product.js +1 -1
  59. package/dist/cjs/product/components/product-wrap/Product.liquid.js +13 -13
  60. package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
  61. package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
  62. package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  63. package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
  64. package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  65. package/dist/cjs/video/components/HTML5Embed.liquid.js +9 -9
  66. package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
  67. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
  68. package/dist/cjs/video/components/Video.liquid.js +1 -1
  69. package/dist/esm/article/components/ArticleImage.liquid.js +3 -3
  70. package/dist/esm/article/components/ArticleList.js +1 -1
  71. package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
  72. package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
  73. package/dist/esm/common/components/Loading.js +1 -1
  74. package/dist/esm/common/const.js +1 -1
  75. package/dist/esm/common/helpers.js +1 -0
  76. package/dist/esm/common/hooks/useElementWidth.js +1 -0
  77. package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
  78. package/dist/esm/grid/components/row/Row.liquid.js +10 -10
  79. package/dist/esm/grid/components/section/Section.js +1 -1
  80. package/dist/esm/hero-banner/common/helpers.js +1 -1
  81. package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +9 -9
  82. package/dist/esm/image/common/attrs.js +1 -1
  83. package/dist/esm/image/common/classes.js +1 -1
  84. package/dist/esm/image/common/helpers.js +2 -2
  85. package/dist/esm/image/common/liquidSrcset.js +1 -0
  86. package/dist/esm/image/common/srcset.js +1 -0
  87. package/dist/esm/image/components/AdaptiveImage.js +1 -1
  88. package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
  89. package/dist/esm/image/components/Image.liquid.js +3 -3
  90. package/dist/esm/image/components/NextImage.js +1 -1
  91. package/dist/esm/image/components/NextImage.liquid.js +5 -6
  92. package/dist/esm/image/constants.js +1 -1
  93. package/dist/esm/image/settings/configs/settings.js +1 -1
  94. package/dist/esm/image/settings/configs/ui-v2.js +1 -1
  95. package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
  96. package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
  97. package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
  98. package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
  99. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  100. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
  101. package/dist/esm/product/components/file-upload/UploadFile.liquid.js +19 -19
  102. package/dist/esm/product/components/file-upload/common/classes.js +1 -1
  103. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  104. package/dist/esm/product/components/product-badge/common/styles.js +1 -1
  105. package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  106. package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
  107. package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
  108. package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
  109. package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
  110. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  111. package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
  112. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
  113. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
  114. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
  115. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
  116. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
  117. package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
  118. package/dist/esm/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
  119. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  120. package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +1 -1
  121. package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +5 -5
  122. package/dist/esm/product/components/product-list/common/helpers.js +1 -1
  123. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  124. package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -7
  125. package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +5 -5
  126. package/dist/esm/product/components/product-wrap/Product.js +1 -1
  127. package/dist/esm/product/components/product-wrap/Product.liquid.js +7 -7
  128. package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
  129. package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
  130. package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  131. package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
  132. package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  133. package/dist/esm/video/components/HTML5Embed.liquid.js +9 -9
  134. package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
  135. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
  136. package/dist/esm/video/components/Video.liquid.js +1 -1
  137. package/dist/types/index.d.ts +17 -3
  138. package/package.json +5 -5
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as g}from"react/jsx-runtime";let l=()=>e("div",{className:"gp-loading-placeholder gp-relative gp-my-0.5 gp-h-3 gp-w-full gp-overflow-hidden",children:[g("div",{className:"gp-absolute gp-h-full gp-w-full gp-bg-gray-200"}),g("div",{className:"gp-absolute gp-h-full gp-bg-green-500 gp-animate-progress-bar"})]});export{l as default};
2
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useLoadingProgress as o}from"../hooks/useLoadingProgress.js";import{useElementWidth as i}from"../hooks/useElementWidth.js";import{LOADING_MIN_WIDTH as r}from"../const.js";import{getLoadingText as g}from"../helpers.js";let p="gp-loading-placeholder gp-border-loading-frame gp-flex gp-w-full gp-flex-col gp-gap-4 gp-overflow-hidden gp-border-[0.5px] gp-border-solid gp-bg-white",a="gp-text-loading-label !gp-font-g-ui !gp-text-xs !gp-font-medium !gp-leading-5 gp-px-4 gp-text-center",d=({label:d,error:t,retry:s})=>{var n,m;let c=o(),{ref:f,width:h}=i(),u=(n=r.SHOW_TEXT,void 0===h||h>n),b=(m=r.SHOW_LABEL,void 0===h||h>m);return t?e("div",{ref:f,className:p,children:l("div",{className:`${a} gp-py-4`,children:[d&&b?`${d} failed to load.`:"Failed to load.",!!s&&e("button",{type:"button",onClick:s,className:"gp-ml-1 gp-underline",children:"Retry"})]})}):l("div",{ref:f,className:p,children:[e("div",{className:"gp-h-0.5 gp-w-full gp-bg-loading-track",children:e("div",{className:"gp-bg-loading-bar gp-h-full gp-transition-[width] gp-duration-100 gp-ease-linear",style:{width:`${c}%`}})}),u&&e("div",{className:`${a} gp-pb-4`,children:g({label:d,percent:c,hasRoomForLabel:b})})]})};export{d as default};
@@ -1 +1 @@
1
- var o;let c={STICKY:999,DIALOG:100001,CART_DRAWER:100002,CART_DRAWER_CONFIRM_MODAL:100003};!function(o){o.Collection="Collection",o.PickProduct="PickProduct",o.DynamicCollection="DynamicCollection",o.RelatedProduct="RelatedProduct"}(o||(o={}));export{c as ELEMENT_Z_INDEX,o as PRODUCT_LIST_PRODUCT_SOURCE};
1
+ var e;let t={STICKY:999,DIALOG:100001,CART_DRAWER:100002,CART_DRAWER_CONFIRM_MODAL:100003};!function(e){e.Collection="Collection",e.PickProduct="PickProduct",e.DynamicCollection="DynamicCollection",e.RelatedProduct="RelatedProduct"}(e||(e={}));let c={TICK_MS:100,MILESTONES:[{atMs:0,percent:0},{atMs:500,percent:30},{atMs:1e3,percent:50},{atMs:3e3,percent:75},{atMs:5e3,percent:83},{atMs:1e4,percent:90},{atMs:2e4,percent:96}],MAX_PERCENT:99,TAIL_MS:6e4},_={SHOW_LABEL:154,SHOW_TEXT:55};export{t as ELEMENT_Z_INDEX,_ as LOADING_MIN_WIDTH,c as LOADING_PROGRESS,e as PRODUCT_LIST_PRODUCT_SOURCE};
@@ -0,0 +1 @@
1
+ let e=e=>e?.customLabel??e?.label,o=({label:e,percent:o,hasRoomForLabel:a})=>a?e?`Loading ${e}...${o}%`:`Loading ${o}%`:`${o}%`,a=({hasQuery:e,data:o,error:a,isLoading:i})=>i||e&&void 0===o&&void 0===a;export{e as getElementLabel,o as getLoadingText,a as isQueryLoading};
@@ -0,0 +1 @@
1
+ import{useIsomorphicLayoutEffect as e}from"@gem-sdk/core";import{useRef as t,useState as r}from"react";let n=()=>{let n=t(null),[i,o]=r();return e(()=>{let e=n.current;if(!e||(o(e.getBoundingClientRect().width),"undefined"==typeof ResizeObserver))return;let t=new ResizeObserver(e=>{let t=e[0];t&&o(t.contentRect.width)});return t.observe(e),()=>t.disconnect()},[]),{ref:n,width:i}};export{n as useElementWidth};
@@ -0,0 +1 @@
1
+ let e;import{useState as t,useEffect as r}from"react";import{LOADING_PROGRESS as a}from"../const.js";let{MILESTONES:l,MAX_PERCENT:o,TAIL_MS:n,TICK_MS:s}=a,u=l[l.length-1],f=({value:e,fromValue:t,toValue:r,fromResult:a,toResult:l})=>r===t?l:a+(l-a)*((e-t)/(r-t)),M=e=>{if(e>=u.atMs){let t=f({value:e,fromValue:u.atMs,toValue:u.atMs+n,fromResult:u.percent,toResult:o});return Math.floor(Math.min(t,o))}let t=l.findIndex(t=>e<t.atMs),r=l[t-1]??l[0],a=l[t];return Math.floor(f({value:e,fromValue:r.atMs,toValue:a.atMs,fromResult:r.percent,toResult:a.percent}))},i=new Map,m=()=>{let e=Date.now();i.forEach((t,r)=>r(e-t))},c=t=>(i.set(t,Date.now()),e=e??setInterval(m,s),()=>{i.delete(t),!i.size&&e&&(clearInterval(e),e=void 0)}),p=()=>{let[e,a]=t(0);return r(()=>{let e=()=>{};return e=c(t=>{let r=M(t);a(r),r>=o&&e()}),()=>e()},[]),e};export{M as getLoadingPercent,p as useLoadingProgress};
@@ -1,33 +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{getData as l,checkHasBackgroundVideo as p,isRenderHtmlVideo as m,isRenderYoutubeVideo as d}from"./common/helpers.js";import{getBackgroundTranslated as n,getSettingPreloadData as c}from"../../../helpers.js";import g from"../../../video/components/LiteYouTubeEmbed.liquid.js";import{Row as u}from"../../settings/configs/row/translate.js";import{getResponsiveSetting as f}from"../../../hero-banner/common/helpers.js";import $ from"../../../video/components/HTML5Embed.liquid.js";import{getYoutubeVideoId as y}from"../../../video/common/helpers.js";import{createClass as j,If as k}from"@gem-sdk/system";import{getRowStyle as v}from"./common/styles.js";import{getClass as b}from"./common/classes.js";import{getAttr as w}from"./common/attrs.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=n({background:L,uid:S?.uid,enableTranslate:!!u?.background?.id,pageContext:h.pageContext??{}}),{stateData:V}=l(h,T),{rowStyle:z,backgroundBoxStyle:A,embedVideoStyle:N,sectionStyle:R}=v({rowProps:h,type:"Liquid",translatedBackground:T}),{rowAttr:_}=w(h),{rowClass:G,backgroundBoxClass:I,backgroundBoxInnerClass:M,sectionClass:O,wrapperYoutubeClasses:B,iframeYoutubeClasses:H}=b(h),U=j({[G]:!0}),Y=()=>{if(!p(L))return;let e=f(L||{});if(m(L))return $({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(d(L)){let o=e?.desktop?.video??"",s=y(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`
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{getData as l,checkHasBackgroundVideo as p,isRenderHtmlVideo as m,isRenderYoutubeVideo as d}from"./common/helpers.js";import{getBackgroundTranslated as n,getSettingPreloadData as c}from"../../../helpers.js";import u from"../../../video/components/LiteYouTubeEmbed.liquid.js";import{Row as f}from"../../settings/configs/row/translate.js";import{getResponsiveSetting as g}from"../../../hero-banner/common/helpers.js";import $ from"../../../video/components/HTML5Embed.liquid.js";import{getYoutubeVideoId as y}from"../../../video/common/helpers.js";import{createClass as j,If as k}from"@gem-sdk/system";import{getRowStyle as v}from"./common/styles.js";import{getClass as b}from"./common/classes.js";import{getAttr as w}from"./common/attrs.js";let h=h=>{let{styles:C,setting:E,rawChildren:S,builderProps:q}=h,{isSection:L}=E??{},{background:P}=C??{},T=L?"section":"div",V=n({background:P,uid:q?.uid,enableTranslate:!!f?.background?.id,pageContext:h.pageContext??{}}),{stateData:x}=l(h,V),{rowStyle:z,backgroundBoxStyle:A,embedVideoStyle:N,sectionStyle:R}=v({rowProps:h,type:"Liquid",translatedBackground:V}),{rowAttr:_}=w(h),{rowClass:G,backgroundBoxClass:I,backgroundBoxInnerClass:M,sectionClass:O,wrapperYoutubeClasses:B,iframeYoutubeClasses:H}=b(h),U=j({[G]:!0}),Y=()=>{if(!p(P))return;let e=g(P||{});if(m(P))return $({uid:q?.uid,muted:!0,loop:e.desktop?.loop,controls:!1,autoplay:!0,src:"",title:"Video",className:"gp-relative",style:N});if(d(P)){let o=e?.desktop?.video??"",s=y(o)||"",r=t(o),i=`&loop=false&playlist=${s}&showinfo=0&rel=0&fs=0&enablejsapi=1`;return u({uid:q?.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})}},D=e`
2
2
  <gp-row
3
3
  ${{..._}}
4
4
  class="${U}"
5
5
  style="${z()}"
6
6
  >
7
- <script gp-data type="application/json">${V}</script>
7
+ <script gp-data type="application/json">${x}</script>
8
8
  ${k(!!Y(),e`
9
9
  <div class="${I}" style="${A}">
10
10
  <div class="${M}">${Y()}</div>
11
11
  </div>
12
12
  `)}
13
13
 
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})}))}
14
+ ${o({uid:q?.uid||"",customProps:S?.[0].customProps},S?.map(e=>{if(e)return s({...e,order:E?.order,layout:E?.layout,justifyContent:E?.verticalAlign})}))}
15
15
 
16
- ${(()=>{if(p(L))return e`
16
+ ${(()=>{if(p(P))return e`
17
17
  ${r(i,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-row-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${a}/assets-v2/gp-row-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
18
18
  `})()}
19
19
  </gp-row>
20
20
  `;return e`
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" />`)}`)}
21
+ ${r(!!C?.preloadBgImage,`${r(!!P?.desktop?.image?.src,`<link rel="preload" href="${P?.desktop?.image?.src}" as="image" />`)}${r(!!P?.tablet?.image?.src,`<link rel="preload" href="${P?.tablet?.image?.src}" as="image" />`)}${r(!!P?.mobile?.image?.src,`<link rel="preload" href="${P?.mobile?.image?.src}" as="image" />`)}`)}
22
22
 
23
- ${r(!!q,"{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}")}
23
+ ${r(!!L,"{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}")}
24
24
 
25
- ${k(q,e`
26
- <${P}
27
- class="${O} ${q?c("gps-lazy"):""}"
25
+ ${k(L,e`
26
+ <${T}
27
+ class="${O} ${L?c("gps-lazy"):""}"
28
28
  style="${R}"
29
29
  >
30
30
  ${D}
31
- </${P}>
31
+ </${T}>
32
32
  `,e`${D}`)}
33
33
  `};export{h as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as o}from"react/jsx-runtime";import"../../../common/const.js";import"@gem-sdk/core";import{useMemo as t}from"react";import e from"../../../common/components/Loading.js";import r from"../row/Row.js";let m=m=>{let i=t(()=>{let{builderProps:o}=m;return o?.builderData?.name==="SectionLoading"},[m]);return i?o(e,{}):o(r,{...m,setting:{...m.setting,as:"section",isSection:!0}})};export{m as default};
2
+ import{jsx as o}from"react/jsx-runtime";import{getElementLabel as t}from"../../../common/helpers.js";import"../../../common/const.js";import"@gem-sdk/core";import{useMemo as e}from"react";import r from"../../../common/components/Loading.js";import m from"../row/Row.js";let i=i=>{let{builderProps:n}=i,s=e(()=>n?.builderData?.name==="SectionLoading",[n]);return s?o(r,{label:t(n?.builderData)}):o(m,{...i,setting:{...i.setting,as:"section",isSection:!0}})};export{i as default};
@@ -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{DEFAULT_CLIP_PATH as p,VIDEO_IFRAME_SCALE as b}from"./const.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";import{LINK_ACTION as d}from"../../image/types.js";let c=(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},m=(e,t)=>{if(!i(u(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"},u=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},h=e=>{let t=u(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)}},y=(e,t,o,l)=>{if(!e)return"";let r=u(e),s=i(e,t),p=o?`url(${h(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()"},f=(o,l=!1,i=!1)=>{if(!o)return;let r={};return e.forEach(e=>{r={...r,[e]:y(o,e,l,i)}}),t("bgi",r)},I=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},v=(e,t,o)=>P(c(e,t,o)),k=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),w=(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}}},C=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]}),{}):{},A=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||t:void 0!==o?o:e?.shapeValue??t},j=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:l})=>{let i=A(e,t);return i?{...l,[o]:i}:l},S=(e,o)=>{let r=l(o);return["desktop","mobile","tablet"].forEach(t=>{let l=i(o,t),a=!!w(t,e);a&&(r=j({shapeByDevice:l,fallbackRatio:"auto",device:t,currentResult:r}))}),t("aspect",r)},P=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=!!w(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},x=(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}},$=(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},{}),T=(e,t)=>{let{aspectRatio:o}=x(e,t);return o},D=(e,t,o)=>{let l=$(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},V=(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)},E=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,G=(e,o)=>{let l={};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=r?.type==="image"&&o,n=E({enableParallax:a,attachment:e[t]?.attachment});l={...l,[t]:a?"150%":n?"100vh":"100%"}}),t("h",l)},z=(e,o)=>{let l={};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=r?.type==="image"&&o,n=E({enableParallax:a,attachment:e[t]?.attachment});l={...l,[t]:n?"100vw":"100%"}}),t("w",l)},M=e=>{let o={};return["desktop","mobile","tablet"].forEach(t=>{o={...o,[t]:e[t]?.attachment==="fixed"?"0px":""}}),t("top",o)},W=(e,t)=>{let o=G(e,t),l=z(e,t),i=M(e);return{...o,...l,...i}},L=(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},H=(e,t)=>{if(!t)return`${p}`;let[o,l,i,r]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:n,bbrr:s,bblr:b}=t,g=L(parseInt(a??"0")||0,o,r),d=L(parseInt(n??"0")||0,o,l),c=L(parseInt(s??"0")||0,l,i),m=L(parseInt(b??"0")||0,i,r);return[g,d,c,m].every(e=>0===e)?`${p}`:`inset(0 0 0 round ${g}px ${d}px ${c}px ${m}px)`},N=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}),O=({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=_(t),i=_(o),r={desktop:O({device:"desktop",settingLayoutRes:l,contentPosition1ColRes:i}),tablet:O({device:"tablet",settingLayoutRes:l,contentPosition1ColRes:i}),mobile:O({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=_(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}},X=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}`)},F=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1};return["desktop","mobile","tablet"].forEach(l=>{let r=i(e,l),a=!!w(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")},Y=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}},_=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 q="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",ee=e=>{let t=e?.link;return t?.type===d.GO_TO_SALES_PAGE?{type:d.GO_TO_SALES_PAGE,link:g,target:"_self"}:t},et=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",eo=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},l=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:l}},el=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},ei=(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},er=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"))},ea=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},en=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},es=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},ep=e=>{switch(e){case"top":default:return{top:"0%",transform:`translate(-50%, 0%) scale(${b})`};case"bottom":return{top:"100%",transform:`translate(-50%, -100%) scale(${b})`};case"center":return{top:"50%",transform:`translate(-50%, -50%) scale(${b})`}}},eb=(e,t)=>{if(!e)return;let o=ep(t);e.style.top=o.top,e.style.transform=o.transform},eg=({iframeEl:e,containerRatio:t,videoObjectFit:o,background:l,currentDevice:r,isYoutubeVideoMigrated:a})=>{let n,s;let p=ei(l,r),g=i(l,r);if(!e||!t)return;let d=g?.videoAlign||"top",c=ep(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(${b})`});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{x as collectAspectRatioByDevice,$ as collectYoutubeAspectRatio,Q as debounce,q as fallbackImg,et as formatHoverScale,T as getAspectRatio,I as getAttachmentDevice,f as getBackgroundImageHeroBanner,ee as getBannerLink,u as getBgImage,N as getClassAlignBanner,Y as getClassContentPosition,F as getClassForContentByFitContent,X as getClassForStretchContent,J as getClassSpaceBetween,K as getClassSpaceBetweenLeftRight,H as getClipPath,es as getContainerRatio,c as getContentPosition,w as getDataVideoHeroBannerResponsive,Z as getDisplayStyleByFitContent,m as getEnableBgImageByDevice,el as getOpacityHover,V as getPercentageVisible,_ as getResponsiveSetting,S as getStyleAspectRatioHeroBannerCustom,W as getStyleHeroBannerBg,ei as getVideoAspectRatio,C as getVisibilityStyle,R as getWidth,D as getYoutubeAspectRatio,v as horizontalAlign,h as imagePlaceholder,E as isScaleImage,P as mapContentPositionToHorizontal,eo as opacityEnabledData,er as resetVideoIframeStyle,en as resetVideoWrapperStyle,k as scrollToContentBanner,eb as setVideoIframeAlign,ea as setVideoWrapperStyle,U as showVideoType,eg 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{DEFAULT_CLIP_PATH as p,VIDEO_IFRAME_SCALE as b}from"./const.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";import{LINK_ACTION as d}from"../../image/types.js";let m=(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(u(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"},u=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},h=e=>{let t=u(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)}},y=(e,t,o,l)=>{if(!e)return"";let r=u(e),s=i(e,t),p=o?`url(${h(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()"},f=(o,l=!1,i=!1)=>{if(!o)return;let r={};return e.forEach(e=>{r={...r,[e]:y(o,e,l,i)}}),t("bgi",r)},I=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},v=(e,t,o)=>S(m(e,t,o)),k=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),w=(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}}},C=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]}),{}):{},A=({shapeByDevice:e})=>{let t=e?.shapeVideo;return"custom"===t?e?.shapeValue:void 0!==t?t:e?.shapeValue},j=(e,o)=>{let r=l(o),a={};return["desktop","mobile","tablet"].forEach(t=>{let l=i(o,t),n=!!w(t,e),s=n?A({shapeByDevice:l}):r[t];a[t]=s||"auto"}),t("aspect",a)},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},P=(e,o)=>{let l={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(t=>{let r=i(e,t),a=!!w(t,o),n=r?.shape,s=r?.height;l={...l,[t]:"original"!==n||"fit-content"===s||a?"none":"block"}}),t("d",l)},Z=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},B=(t,o)=>{let l=!1,r=e.reduce((e,r)=>{let a=i(t,r),n=i(o,r),s=Z(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}=B(e,t);return o},T=(e,t,o)=>{let l=x(e,t,o);return Object.keys(l).length?l:void 0},D=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},R=(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,E=(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)},G=(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)},z=e=>{let o={};return["desktop","mobile","tablet"].forEach(t=>{o={...o,[t]:e[t]?.attachment==="fixed"?"0px":""}}),t("top",o)},M=(e,t)=>{let o=E(e,t),l=G(e,t),i=z(e);return{...o,...l,...i}},W=(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`${p}`;let[o,l,i,r]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:n,bbrr:s,bblr:b}=t,g=W(parseInt(a??"0")||0,o,r),d=W(parseInt(n??"0")||0,o,l),m=W(parseInt(s??"0")||0,l,i),c=W(parseInt(b??"0")||0,i,r);return[g,d,m,c].every(e=>0===e)?`${p}`:`inset(0 0 0 round ${g}px ${d}px ${m}px ${c}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},O=(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},J=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}},K=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=!!w(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}},_=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 U(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let Q="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",q=e=>{let t=e?.link;return t?.type===d.GO_TO_SALES_PAGE?{type:d.GO_TO_SALES_PAGE,link:g,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(${b})`};case"bottom":return{top:"100%",transform:`translate(-50%, -100%) scale(${b})`};case"center":return{top:"50%",transform:`translate(-50%, -50%) scale(${b})`}}},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),g=i(l,r);if(!e||!t)return;let d=g?.videoAlign||"top",m=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(${b})`});return}t>=p?(n=100,s=t/p*100):(s=100,n=p/t*100),Object.assign(e.style,{position:"absolute",top:m.top,left:"50%",width:a?"500%":`${n}%`,height:a?"100%":`${s}%`,maxWidth:"none",transform:m.transform})};export{B as collectAspectRatioByDevice,x as collectYoutubeAspectRatio,U as debounce,Q as fallbackImg,ee as formatHoverScale,$ as getAspectRatio,I as getAttachmentDevice,f as getBackgroundImageHeroBanner,q as getBannerLink,u as getBgImage,H as getClassAlignBanner,F as getClassContentPosition,X as getClassForContentByFitContent,K as getClassForStretchContent,O as getClassSpaceBetween,J as getClassSpaceBetweenLeftRight,L as getClipPath,en as getContainerRatio,m as getContentPosition,w as getDataVideoHeroBannerResponsive,P as getDisplayStyleByFitContent,c as getEnableBgImageByDevice,eo as getOpacityHover,R as getPercentageVisible,Y as getResponsiveSetting,j as getStyleAspectRatioHeroBannerCustom,M as getStyleHeroBannerBg,el as getVideoAspectRatio,C as getVisibilityStyle,D as getWidth,T as getYoutubeAspectRatio,v as horizontalAlign,h as imagePlaceholder,V as isScaleImage,S as mapContentPositionToHorizontal,et as opacityEnabledData,ei as resetVideoIframeStyle,ea as resetVideoWrapperStyle,k as scrollToContentBanner,ep as setVideoIframeAlign,er as setVideoWrapperStyle,_ as showVideoType,eb as updateVideoIframeSize};
@@ -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"../../image/components/AdaptiveImage.liquid.js";import a from"../../video/components/HTML5Embed.liquid.js";import{createStyle as r,createClass as m,If as d}from"@gem-sdk/system";import n from"../../grid/components/row/Row.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{getYoutubeVideoId as M,youtubeVideoRegex as O}from"../../video/common/helpers.js";import U from"../../video/components/LiteYouTubeEmbed.liquid.js";import{isRenderHtmlVideo as W}from"../../grid/components/row/common/helpers.js";import Y from"../../image/components/NextImage.liquid.js";import{PRIORITY_LOAD_ATTRS as F}from"../../image/constants.js";import{getImageSrc as G}from"../../image/common/helpers.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=r({...p(X)}),ew=m({...$(Q,X)}),eT=r({...u(X)}),ek=m({...b(X)}),ex=r({...c(X)}),eN=m({...h(X,Q)}),eq=r({...f(X)}),eL=m({...C()}),ez=m({...I()}),eH=m({...w(ef,ej)}),eA=r({...H(P,ej,!1),...y(X,ei,"")}),eV=m({...T()}),eB=r({...g(X)}),eE=m({...k(!1)}),eR=r({...v(eb,ev)}),eS=m({...x(em)}),eD=r({...j(e$,ev,ed)}),eM=m({...N()}),eO=e=>m({...q(e)});return e`
2
- <div class="${ew}" style="${eI}">
1
+ import{template as e,getAspectRatioGlobalSize as t,DEVICES as o,getResponsiveValueByScreen as s,hasTranslatedLiquid as i}from"@gem-sdk/core";import l from"../../image/components/AdaptiveImage.liquid.js";import a from"../../video/components/HTML5Embed.liquid.js";import{createStyle as r,createClass as m,If as d}from"@gem-sdk/system";import n from"../../grid/components/row/Row.liquid.js";import{getContainerStyle as p,getOverlayStyle as u,getRowStyle as c,getAdaptiveStyle as f,getBackgroundStyle as g,getContainBackgroundStyle as v,getYoutubeIframeStyle as y,getHtml5VideoStyle as j}from"../common/styles.js";import{getContainerClasses as $,getOverlayClasses as b,getRowClasses as h,getAdaptivePictureClasses as C,getAdaptiveClasses as I,getBackgroundClasses as T,getContainBackgroundClasses as w,getHtml5VideoClasses as k,getWrapperYoutubeClasses as x,getIframeYoutubeClasses as N,getLazyBackgroundClasses as q}from"../common/classes.js";import{getAspectRatio as z,getYoutubeAspectRatio as H,getBackgroundImageHeroBanner as L,getWidth as S,horizontalAlign as A,getEnableBgImageByDevice as B,getBgImage as V,showVideoType as E,getResponsiveSetting as R,fallbackImg as D}from"../common/helpers.js";import{getYoutubeVideoId as M,youtubeVideoRegex as O}from"../../video/common/helpers.js";import U from"../../video/components/LiteYouTubeEmbed.liquid.js";import{isRenderHtmlVideo as W}from"../../grid/components/row/common/helpers.js";import Y from"../../image/components/NextImage.liquid.js";import{PRIORITY_LOAD_ATTRS as F}from"../../image/constants.js";import{getImageSrc as G}from"../../image/common/helpers.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:eg,contentPosition2Col:ev,videoObjectFit:ey}=X??{},ej=!er&&(et?.enableLazyLoadImage??!0),e$=z(eu,ed),eb=H(ed,ey,e$),eh=R(P||{}),eC=eh.desktop,eI=r({...p(X)}),eT=m({...$(Q,X)}),ew=r({...u(X)}),ek=m({...b(X)}),ex=r({...c(X)}),eN=m({...h(X,Q)}),eq=r({...f(X)}),ez=m({...C()}),eH=m({...I()}),eL=m({...T(ef,ej)}),eS=r({...L(P,ej,!1),...g(X,ei,"")}),eA=m({...w()}),eB=r({...v(X)}),eV=m({...k(!1)}),eE=r({...y(eb,ey)}),eR=m({...x(em)}),eD=r({...j(e$,ey,ed)}),eM=m({...N()}),eO=e=>m({...q(e)});return e`
2
+ <div class="${eT}" style="${eI}">
3
3
  <div
4
- class="${eV}"
4
+ class="${eA}"
5
5
  style="${eB}"
6
6
  >
7
- <div class="${eH}" style="${eA}">
8
- ${(()=>{if(!er)return o.map(e=>d(B(e,P),Y({src:G(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(W(ed))return a({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=M(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&&O.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})})()}
7
+ <div class="${eL}" style="${eS}">
8
+ ${(()=>{if(!er)return o.map(e=>d(B(e,P),Y({src:G(s(V(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}))).join("")})()}
9
+ ${(()=>{if(!E(ed))return;if(W(ed))return a({uid:_?.uid,muted:!0,loop:eC?.loop,controls:!1,autoplay:!0,src:eC?.videoHtml5||"",title:"Video",style:eD,className:eV});let e=eC?.video??"",t=M(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&&O.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:eE,wrapperClass:eR,iframeClass:eM})})()}
10
10
  </div>
11
- ${d(!!en,e`<div aria-label="Overlay" class="${ek}" style="${eT}"> </div>`)}
11
+ ${d(!!en,e`<div aria-label="Overlay" class="${ek}" style="${ew}"> </div>`)}
12
12
  </div>
13
- ${n({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
- ${l({pictureClass:eL,srcSet:E(P),className:ez,...er&&F,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})}
13
+ ${n({className:eN,style:ex,setting:{layout:eo,horizontalAlign:A(eo,eg,ev),verticalAlign:es},styles:{verticalGutter:ep,width:S(ec),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},children:Z,rawChildren:ee})}
14
+ ${l({pictureClass:ez,srcSet:V(P),className:eH,...er&&F,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,resolvedSrcSet:V(ed),sizeTarget:"HeroBanner"})}
15
15
  </div>
16
16
  `};export{K as default};
@@ -1 +1 @@
1
- import{getAspectRatio as e,getNewBackupFileKey as t,getImageSrc as a,safeStringify as r,IMAGE_PLACEHOLDER as s,NEXT_IMAGE_CONFIG as l,getSrcSet as i,createBlurDataURL as o}from"./helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";import{PRIORITY_LOAD_ATTRS as p}from"../constants.js";import{createAttr as n}from"@gem-sdk/system";let c=(e,t)=>({...e,...t&&{"data-id":t}}),u=({urlData:e,imageLink:t,title:a,isLiquid:r=!1})=>{let s=r?{...e,...t?.noFollow&&{rel:"nofollow"},title:a}:{setting:e,title:a};return t?.type!=="go-to-sales-page"?t?.link?s:{}:r?{href:g,target:"_self"}:{setting:{href:g,target:"_self"}}},d=({pageContext:e})=>({...e&&{pageContext:e}}),y=({styles:s,setting:l,isLiquid:i})=>{let{alt:o,srcSet:g,priority:n,qualityPercent:c,qualityType:u,title:d}=l??{},y=e({styles:s,setting:l}),m=g?.desktop?.backupFileKey?t(g?.desktop?.backupFileKey??"",g?.desktop?.src??""):"",L=i?a({src:g?.desktop?.src,backupFileKey:m,backupFilePath:g?.desktop?.backupFilePath,storage:g?.desktop?.storage}):g?.desktop?.src??"",A=n?{}:{"base-src":L??"","quality-type":r(u),"quality-percent":r(c)};return{pictureClass:"gp-contents",...o&&{alt:o},...d&&{title:d},...g&&{srcSet:g},...n&&p,...A,...s?.objectFit&&{layout:s.objectFit},aspectRatio:y}},m=({styles:t,setting:a})=>{let{objectFit:r}=t??{},{vw:s,alt:l,title:i,quality:o,priority:g,isNotLazyload:p,qualityType:n,qualityPercent:c}=a??{},u=e({styles:t,setting:a});return{...a?.image,...s&&{vw:s},...l&&{alt:l},...i&&{title:i},...o&&{quality:o},...g&&{priority:g},isNotLazyload:p,setting:{aspectRatio:u,layout:r,qualityType:n,qualityPercent:c}}},L=e=>{let{srcset:s,setting:g,storage:p,baseSrc:c,priority:u,customAttrs:d,width:y=2237,height:m=1678,isNotLazyload:L,backupFileKey:A,backupFilePath:b,srcIsLiquidCode:k,pageContext:F,alt:f=l.DEFAULT_ALT,title:h,src:T=l.DEFAULT_SRC,sizes:E=l.DEFAULT_SIZES}=e,_=!L&&(F?.enableLazyLoadImage??!0)&&!u;return n({...d,...(()=>{let{qualityPercent:e,qualityType:t}=g??{},a=!u&&t&&e?{"quality-type":r(t),"quality-percent":r(e)}:{"quality-type":"","quality-percent":""};return{...f&&{alt:f},...h&&{title:h},width:y,height:m,draggable:"false",...a}})(),...(()=>{let e=A?t(A??"",T):"",r=k?c:a({src:T,backupFileKey:e,backupFilePath:b,storage:p}),l=k?T:i(e??"",p??"THEME",T),g={sizes:"100vw",src:o(y,m),...r&&!u?{"base-src":r}:{},...r?{"data-src":r}:{},...l?{"data-srcset":l}:{}},n={sizes:E,src:r??"",isNotLazyload:"true",srcset:s??"",...r&&!u?{"base-src":r}:{},...u?{loading:"eager",fetchpriority:"high"}:{loading:"lazy"}};return{"data-sizes":"auto",..._?g:n}})()})},A=e=>{let{width:t=l.DEFAULT_WIDTH_PROPS,height:a=l.DEFAULT_HEIGHT_PROPS,quality:r,priority:i,isNotLazyload:o,pageContext:g,base64:p=s,alt:c=l.DEFAULT_ALT,title:u,src:d=l.DEFAULT_SRC}=e,y=!o&&(g?.enableLazyLoadImage??!0)&&!i,m=n((()=>{let e={loading:"lazy",placeholder:"blur",...p&&{blurDataURL:p}};return{...y?e:{loading:"eager",fetchpriority:"high"}}})());return{src:d,alt:c,title:u,width:t,height:a,quality:r,...m}};export{y as getAdaptiveImageAttrs,c as getContainerAttrs,d as getImageLiquidAttrs,u as getLinkWrapperAttrs,m as getNextImageAttrs,L as getNextImageLiquidAttrs,A as getNextImageReactAttrs};
1
+ import{getAspectRatio as t,IMAGE_PLACEHOLDER as e,NEXT_IMAGE_CONFIG as r,getNewBackupFileKey as a,getImageSrc as l}from"./helpers.js";import{HREF_TO_SALES_PAGE as i}from"../../constant.js";import{createAttr as g}from"@gem-sdk/system";import{getImageSrcset as s}from"./srcset.js";let o=(t,e)=>({...t,...e&&{"data-id":e}}),n=({urlData:t,imageLink:e,title:r,isLiquid:a=!1})=>{let l=a?{...t,...e?.noFollow&&{rel:"nofollow"},title:r}:{setting:t,title:r};return e?.type!=="go-to-sales-page"?e?.link?l:{}:a?{href:i,target:"_self"}:{setting:{href:i,target:"_self"}}},u=({pageContext:t})=>({...t&&{pageContext:t}}),p=t=>t?{loading:"eager",fetchpriority:"high"}:{loading:"lazy"},c=({styles:e,setting:r,sizeTarget:a,resolvedSrcSet:l})=>{let{alt:i,srcSet:g,priority:s,title:o,qualityType:n,qualityPercent:u}=r??{},p=t({styles:e,setting:r});return{pictureClass:"gp-contents",...i&&{alt:i},...o&&{title:o},...g&&{srcSet:g},...l&&{resolvedSrcSet:l},...s&&{priority:s},...a&&{sizeTarget:a},...n&&{qualityType:n},...u&&{qualityPercent:u},...e?.objectFit&&{layout:e.objectFit},aspectRatio:p}},m=({styles:e,setting:r})=>{let{objectFit:a}=e??{},{vw:l,alt:i,title:g,quality:s,priority:o,isNotLazyload:n,qualityType:u,qualityPercent:p}=r??{},c=t({styles:e,setting:r});return{...r?.image,...l&&{vw:l},...i&&{alt:i},...g&&{title:g},...s&&{quality:s},...o&&{priority:o},isNotLazyload:n,setting:{aspectRatio:c,layout:a,qualityType:u,qualityPercent:p}}},A=t=>{let{id:e,src:i=r.DEFAULT_SRC,alt:o=r.DEFAULT_ALT,title:n,sizes:u,srcset:c,storage:m,baseSrc:A,priority:y,customAttrs:L,width:d=2237,height:f=1678,setting:T,sizeTarget:h,resolvedSrc:F,backupFileKey:_,backupFilePath:b,srcIsLiquidCode:D}=t;return g({...L,...e&&{id:e},...o&&{alt:o},...n&&{title:n},width:d,height:f,draggable:"false",...(()=>{if(D)return{src:i,...c&&{srcset:c}};let t=_?a(_,i):"",e=l({src:i,backupFileKey:t,backupFilePath:b,storage:m}),r=s({src:e,resolvedSrc:F,sizeTarget:h,qualityType:T?.qualityType,qualityPercent:T?.qualityPercent});return{src:e,...r&&{srcset:r}}})(),...u&&{sizes:u},...A&&{"base-src":A},...p(y)})},y=t=>{let{width:a=r.DEFAULT_WIDTH_PROPS,height:l=r.DEFAULT_HEIGHT_PROPS,quality:i,priority:s,isNotLazyload:o,pageContext:n,base64:u=e,alt:p=r.DEFAULT_ALT,title:c,src:m=r.DEFAULT_SRC}=t,A=!o&&(n?.enableLazyLoadImage??!0)&&!s,y=g((()=>{let t={loading:"lazy",placeholder:"blur",...u&&{blurDataURL:u}};return{...A?t:{loading:"eager",fetchpriority:"high"}}})());return{src:m,alt:p,title:c,width:a,height:l,quality:i,...y}};export{c as getAdaptiveImageAttrs,o as getContainerAttrs,u as getImageLiquidAttrs,n as getLinkWrapperAttrs,p as getLoadingAttrs,m as getNextImageAttrs,A as getNextImageLiquidAttrs,y as getNextImageReactAttrs};
@@ -1 +1 @@
1
- import{handleConvertClassColor as e,getFlexGrowClassByShapeGlobalSize as l}from"@gem-sdk/core";let g=(e,g,a)=>{let t=l(a);return{"gp-group/image gp-relative":!0,[`force-publish-${new Date().getTime()}`]:!0,...t,...e&&{[e]:!0},...g&&{[g]:!0}}},a=()=>({"gp-h-full gp-w-full gp-flex pointer-events-auto":!0}),t=(l,g)=>{let a=e(g?.borderImg);return{...l&&{[l]:!0},...a&&{[a]:!0},"gp-inline-block gp-w-full gp-max-w-full":!0}},p=({className:e,hasLazyLoad:l,isOptimizePlan:g=!1})=>({...e&&{[e]:!0},gp_lazyload:l,gp_force_load:g}),r=({className:e,hasLazyLoad:l=!1,hasForceLoad:g=!1})=>({...e&&{[e]:!0},gp_lazyload:l,gp_force_load:g});export{r as getAdaptiveImageClasses,g as getContainerClasses,t as getImageClasses,p as getNextImageClasses,a as getWrapperClasses};
1
+ import{handleConvertClassColor as e,getFlexGrowClassByShapeGlobalSize as g}from"@gem-sdk/core";let l=(e,l,t)=>{let s=g(t);return{"gp-group/image gp-relative":!0,[`force-publish-${new Date().getTime()}`]:!0,...s,...e&&{[e]:!0},...l&&{[l]:!0}}},t=()=>({"gp-h-full gp-w-full gp-flex pointer-events-auto":!0}),s=(g,l)=>{let t=e(l?.borderImg);return{...g&&{[g]:!0},...t&&{[t]:!0},"gp-inline-block gp-w-full gp-max-w-full":!0}},r=({className:e})=>({...e&&{[e]:!0}}),a=({className:e})=>({...e&&{[e]:!0}});export{a as getAdaptiveImageClasses,l as getContainerClasses,s as getImageClasses,r as getNextImageClasses,t as getWrapperClasses};
@@ -1,4 +1,4 @@
1
- import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLiquid as i,makeStyleResponsive as r,DEVICES as l,getResponsiveValueByScreen as a,cloneDeep as s}from"@gem-sdk/core";import{REGEX_IS_NON_RESIZABLE_IMAGE as o,REGEX_IS_NON_RESIZABLE_IMAGE_BY_QUERY as n}from"./const.js";import{getDynamicSourceLocales as g,createSettingId as c}from"../../helpers.js";import{Image as d}from"../settings/configs/translate.js";let u=t=>{let i={...t},r=!0;return i&&Object.keys(i??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=i[e]??{};"0px"!==t&&(r=!1)}}),r?e(i):{}},m=({styles:e,setting:i})=>{let{srcSet:r,image:l}=i??{},{customAspectRadio:a,shape:s}=e??{},o={desktop:f({device:"desktop",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.desktop:l,custom:a}),tablet:f({device:"tablet",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.tablet:l,custom:a}),mobile:f({device:"mobile",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.mobile:l,custom:a})};return s?t(s):o},f=({device:e,aspect:t,custom:i,auto:r})=>{let l=t?.[e];return"auto"===l?r?.height?`${r.width}/${r.height}`:void 0:"custom"===l?i?.[e]?.height?`${i?.[e]?.width}/${i?.[e]?.height}`:void 0:l},p=({layout:e,isDisableObjectFit:t})=>t?{}:r("objf",e),h=({isDisableAspectStyle:e,aspectRatio:t,objectFits:i,width:r,height:a})=>{if(e)return{};let s={};return l.forEach(e=>{let l=`--objf${"desktop"!==e?`-${e}`:""}`,o=i?.[l]||i?.["--objf"];if(t?.[e]==="auto"&&"contain"===o){s[e]="auto";return}s[e]=t?.[e]!=="auto"&&t?.[e]?t[e]:`${r}/${a}`}),s},b=e=>JSON.stringify(e||{}).replace(/"/g,"&quot;"),A=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
1
+ import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,makeStyleResponsive as i,DEVICES as r,hasTranslatedLiquid as l,getResponsiveValueByScreen as a,cloneDeep as o}from"@gem-sdk/core";import{REGEX_IS_NON_RESIZABLE_IMAGE_BY_QUERY as s,REGEX_IS_NON_RESIZABLE_IMAGE as n}from"./const.js";import{getDynamicSourceLocales as g,createSettingId as d}from"../../helpers.js";import{Image as c}from"../settings/configs/translate.js";let u=t=>{let i={...t},r=!0;return i&&Object.keys(i??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=i[e]??{};"0px"!==t&&(r=!1)}}),r?e(i):{}},m=({styles:e,setting:i})=>{let{srcSet:r,image:l}=i??{},{customAspectRadio:a,shape:o}=e??{},s={desktop:f({device:"desktop",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.desktop:l,custom:a}),tablet:f({device:"tablet",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.tablet:l,custom:a}),mobile:f({device:"mobile",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.mobile:l,custom:a})};return o?t(o):s},f=({device:e,aspect:t,custom:i,auto:r})=>{let l=t?.[e];return"auto"===l?r?.height?`${r.width}/${r.height}`:void 0:"custom"===l?i?.[e]?.height?`${i?.[e]?.width}/${i?.[e]?.height}`:void 0:l},p=({layout:e,isDisableObjectFit:t})=>t?{}:i("objf",e),h=({isDisableAspectStyle:e,aspectRatio:t,objectFits:i,width:l,height:a})=>{if(e)return{};let o={};return r.forEach(e=>{let r=`--objf${"desktop"!==e?`-${e}`:""}`,s=i?.[r]||i?.["--objf"];if(t?.[e]==="auto"&&"contain"===s){o[e]="auto";return}o[e]=t?.[e]!=="auto"&&t?.[e]?t[e]:`${l}/${a}`}),o},b=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
2
  <defs>
3
3
  <linearGradient id="g-${e}-${t}">
4
4
  <stop stop-color="rgba(51, 51, 51, 0)" offset="20%" />
@@ -9,4 +9,4 @@ import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLi
9
9
  <rect width="${e}" height="${t}" fill="rgba(51, 51, 51, 0)" />
10
10
  <rect id="r" width="${e}" height="${t}" fill="url(#g-${e}-${t})" />
11
11
  <animate xlink:href="#r" attributeName="x" from="-${e}" to="${e}" dur="1s" repeatCount="indefinite" />
12
- </svg>`,w=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),$=(e,t)=>`data:image/svg+xml;base64,${w(A(e,t))}`,_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",S="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",E={DEFAULT_SIZES:"100vw",DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH_PROPS:800,DEFAULT_HEIGHT_PROPS:533},x=e=>{let{srcSet:t,fallbackImg:i}=e;return{getDeviceSource:e=>{let{isLiquid:r}=e??{},l=R(t?.desktop,"desktop",!r)||i||S,a=R(t?.tablet,"tablet",!r)||R(t?.desktop,"tablet",!r)||i||S,s=R(t?.mobile,"mobile",!r)||R(t?.tablet,"mobile",!r)||R(t?.desktop,"mobile",!r)||i||S;return{srcTablet:a,srcMobile:s,srcDesktop:l}}}},I=({setting:e,uid:t,pageContext:i})=>{if(!e||!d)return{};let r=s(e);for(let e in r.srcSet){let l=r.srcSet[e];if(l&&l.src){let r=g({val:l.src,uid:t,settingId:d?.srcSet?.id?`${d.srcSet.id}_${e}_src`:"",pageContext:i??{}});l.src=String(r)}}let l=g({val:r.alt,uid:t,settingId:c({id:d?.alt?.id}),pageContext:i??{}});r.alt=String(l);let a=g({val:r.title,uid:t,settingId:c({id:d?.title?.id}),pageContext:i??{}});return r.title=String(a),r},k=(e,t,i)=>e?C(e,t):F(i),v=e=>o.test(e),y=e=>n.test(e),C=(e,t)=>{let i=T(e);return v(e)?"FILE_CONTENT"==t?`{{ '${i}' | file_url }} 768w, {{ '${i}' | file_url }} 1024w, {{ '${i}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${i}' | file_img_url: '768x' }} 768w, {{ '${i}' | file_img_url: '1024x' }} 1024w, {{ '${i}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x' }} 768w, {{ '${e}' | asset_img_url: '1024x' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},F=e=>e,R=(e,t,r)=>{if(e?.metafieldDefinitionKey)return N(e?.metafieldDefinitionKey);let l=e?.backupFilePath??e?.src??"";if(r)l=e?.src||"";else{let t=e?.src??"";if(i(t))return t;if(e?.backupFileKey){let t=j(e.backupFileKey,e?.src??"");"THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(l=`{{ "${T(t)}" | file_url }}`):l=`{{ "${t}" | asset_url }}`}}if(t&&l?.includes("cdn.shopify")&&!y(l))switch(t){case"tablet":l=l?.includes("?")?`${l}&width=1024`:`${l}?width=1024`;break;case"mobile":l=l?.includes("?")?`${l}&width=768`:`${l}?width=768`}return l},N=e=>`{{${e} | file_url}}`,T=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),j=(e,t)=>{let i=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return i&&i!=e?i:e};function L(e,t){let i=D({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(v(i))return i;let r=D({str:i,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return r}let D=e=>{let t=e.str,i=e.str.match(e.reg)?.length;if(i){let r,l=1;for(;null!==(r=e.reg.exec(e.str));){if(l===i){let i=e.reg.lastIndex,l=i-r[0].length;e.isAdd&&(e.newString="_"+e.newString+r),t=t.slice(0,l)+e.newString+t.slice(i,t.length)}l++}}return t},W=(e,t)=>{let i=z(),r=t?.[i]||"auto";if("auto"===r||r.includes("%"))return e;let l=Number(r.replace("px",""));return l>e?e:Number(r.replace("px",""))},O=e=>{let{itemWidthParam:t,imageWidthSetting:i,qualityType:r,qualityPercent:l}=e,s=z(),o=W(t,i),n=a(r,s,"finest"),g=a(l,s,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*o)||1;case"medium":return Math.round(o)||1;case"custom":return Math.round(o*(Number(g)/100))||1}},B=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},K=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return l.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},P=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},U=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},G=e=>{let{shapeByLayout:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),s=K(t),o=P(l);a.forEach(e=>{q({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},M=e=>{let{ftShape:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),s=B(t),o=U(l);a.forEach(e=>{q({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},q=e=>{let{item:t,settingWidth:i,width:r,qualityType:l,qualityPercent:a}=e,s=z(),o=t.querySelector("img");if(o){let e=O({itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}),t=o.getAttribute("base-src");if(!t)return;let n=H(e,t),g=Q(t,n,s);o.setAttribute("srcset",g)}},H=(e,t)=>"auto"===e?t:L(t,`${e}x`),Q=(e,t,i)=>`${"mobile"===i&&e!==t?t:L(e,"768x")} 767w, ${"tablet"===i&&e!==t?t:L(e,"1024x")} 1023w, ${"desktop"===i&&e!==t?t:L(e,"1920x")} 1440w`,z=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";export{S as FALLBACK_IMAGE,_ as IMAGE_PLACEHOLDER,E as NEXT_IMAGE_CONFIG,f as composeAspectRatio,$ as createBlurDataURL,x as getAdaptiveImageData,m as getAspectRatio,h as getAspectRatioNextImage,z as getCurrentDevice,R as getImageSrc,O as getImageWidthFollowByQuality,j as getNewBackupFileKey,p as getResponsiveObjectFit,I as getSettingTranslatedImageAndSeo,k as getSrcSet,M as handleSetSrcForFeatureProductImage,G as handleSetSrcForProductImageList,v as isCannotResizeImage,y as isCannotResizeImageByQuery,u as overwriteDefaultRadius,T as replaceBackupFileKeyFileContent,L as resizeImage,b as safeStringify,A as shimmer,w as toBase64};
12
+ </svg>`,A=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),w=(e,t)=>`data:image/svg+xml;base64,${A(b(e,t))}`,$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",S="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",E={DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH_PROPS:800,DEFAULT_HEIGHT_PROPS:533},k=e=>{let{srcSet:t,fallbackImg:i}=e;return{getDeviceSource:e=>{let{isLiquid:r}=e??{},l=y(t?.desktop,"desktop",!r)||i||S,a=y(t?.tablet,"tablet",!r)||y(t?.desktop,"tablet",!r)||i||S,o=y(t?.mobile,"mobile",!r)||y(t?.tablet,"mobile",!r)||y(t?.desktop,"mobile",!r)||i||S;return{srcTablet:a,srcMobile:o,srcDesktop:l}}}},v=({setting:e,uid:t,pageContext:i})=>{if(!e||!c)return{};let r=o(e);for(let e in r.srcSet){let l=r.srcSet[e];if(l&&l.src){let r=g({val:l.src,uid:t,settingId:c?.srcSet?.id?`${c.srcSet.id}_${e}_src`:"",pageContext:i??{}});l.src=String(r)}}let l=g({val:r.alt,uid:t,settingId:d({id:c?.alt?.id}),pageContext:i??{}});r.alt=String(l);let a=g({val:r.title,uid:t,settingId:d({id:c?.title?.id}),pageContext:i??{}});return r.title=String(a),r},x=e=>n.test(e),I=e=>s.test(e),y=(e,t,i)=>{if(e?.metafieldDefinitionKey)return C(e?.metafieldDefinitionKey);let r=e?.backupFilePath??e?.src??"";if(i)r=e?.src||"";else{let t=e?.src??"";if(l(t))return t;if(e?.backupFileKey){let t=F(e.backupFileKey,e?.src??"");"THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(r=`{{ "${_(t)}" | file_url }}`):r=`{{ "${t}" | asset_url }}`}}if(t&&r?.includes("cdn.shopify")&&!I(r))switch(t){case"tablet":r=r?.includes("?")?`${r}&width=1024`:`${r}?width=1024`;break;case"mobile":r=r?.includes("?")?`${r}&width=768`:`${r}?width=768`}return r},C=e=>`{{${e} | file_url}}`,_=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),F=(e,t)=>{let i=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return i&&i!=e?i:e};function R(e,t){let i=j({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(x(i))return i;let r=j({str:i,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return r}let j=e=>{let t=e.str,i=e.str.match(e.reg)?.length;if(i){let r,l=1;for(;null!==(r=e.reg.exec(e.str));){if(l===i){let i=e.reg.lastIndex,l=i-r[0].length;e.isAdd&&(e.newString="_"+e.newString+r),t=t.slice(0,l)+e.newString+t.slice(i,t.length)}l++}}return t},D=(e,t)=>{let i=M(),r=t?.[i]||"auto";if("auto"===r||r.includes("%"))return e;let l=Number(r.replace("px",""));return l>e?e:Number(r.replace("px",""))},W=e=>{let{itemWidthParam:t,imageWidthSetting:i,qualityType:r,qualityPercent:l}=e,o=M(),s=D(t,i),n=a(r,o,"finest"),g=a(l,o,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*s)||1;case"medium":return Math.round(s)||1;case"custom":return Math.round(s*(Number(g)/100))||1}},L=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return r.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},N=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return r.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},T=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},B=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},K=e=>{let{shapeByLayout:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),o=N(t),s=T(l);a.forEach(e=>{P({item:e,settingWidth:o,width:s,qualityType:i,qualityPercent:r})})},O=e=>{let{ftShape:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),o=L(t),s=B(l);a.forEach(e=>{P({item:e,settingWidth:o,width:s,qualityType:i,qualityPercent:r})})},P=e=>{let{item:t,settingWidth:i,width:r,qualityType:l,qualityPercent:a}=e,o=M(),s=t.querySelector("img");if(s){let e=W({itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}),t=s.getAttribute("base-src");if(!t)return;let n=G(e,t),g=U(t,n,o);s.setAttribute("srcset",g)}},G=(e,t)=>"auto"===e?t:R(t,`${e}x`),U=(e,t,i)=>`${"mobile"===i&&e!==t?t:R(e,"768x")} 767w, ${"tablet"===i&&e!==t?t:R(e,"1024x")} 1023w, ${"desktop"===i&&e!==t?t:R(e,"1920x")} 1440w`,M=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";export{S as FALLBACK_IMAGE,$ as IMAGE_PLACEHOLDER,E as NEXT_IMAGE_CONFIG,f as composeAspectRatio,w as createBlurDataURL,k as getAdaptiveImageData,m as getAspectRatio,h as getAspectRatioNextImage,M as getCurrentDevice,y as getImageSrc,W as getImageWidthFollowByQuality,F as getNewBackupFileKey,p as getResponsiveObjectFit,v as getSettingTranslatedImageAndSeo,O as handleSetSrcForFeatureProductImage,K as handleSetSrcForProductImageList,x as isCannotResizeImage,I as isCannotResizeImageByQuery,u as overwriteDefaultRadius,_ as replaceBackupFileKeyFileContent,R as resizeImage,b as shimmer,A as toBase64};
@@ -0,0 +1 @@
1
+ import{getSrcsetCandidates as t,isEveryCandidateOriginal as e,ORIGINAL_QUALITY as r,SRCSET_DEVICE_DESCRIPTORS as i}from"./srcset.js";let m=5760,o=({liquidSrc:t,width:e,descriptor:i})=>`{{ ${t} | image_url: width: ${Math.min(e===r?m:e,m)} }} ${i}w`,a=({liquidSrc:m,sizeTarget:a="ProductFeatureImage",qualityType:d,qualityPercent:s})=>{let p=t({sizeTarget:a,qualityType:d,qualityPercent:s});return e(p)?o({liquidSrc:m,width:r,descriptor:i.desktop}):p.map(t=>o({liquidSrc:m,...t})).join(", ")};export{m as SHOPIFY_IMAGE_URL_MAX_WIDTH,a as getLiquidImageSrcset};
@@ -0,0 +1 @@
1
+ import{DEVICES as e,hasTranslatedLiquid as t,getResponsiveValueByScreen as r}from"@gem-sdk/core";import{isCannotResizeImageByQuery as i}from"./helpers.js";let l={mobile:768,tablet:1024,desktop:1440},a={Image:{desktop:1280,tablet:1024,mobile:768},HeroBanner:{desktop:1920,tablet:1280,mobile:768},ImageComparison:{desktop:1280,tablet:1024,mobile:480},ProductFeatureImage:{desktop:1440,tablet:1280,mobile:768},GalleryList:{desktop:256,tablet:256,mobile:128},ArticleImage:{desktop:1024,tablet:768,mobile:480}},o="high",s={high:100,medium:70},n=["GalleryList"],d="original",m=/\s*%\s*$/,p=e=>{if("number"==typeof e)return e;let t=Number.parseFloat(String(e??"").replace(m,""));return Number.isFinite(t)?t:100},u=/^\{\{\s*([\s\S]*?)\s*\}\}$/,c=/\{\{|\{%/,b=e=>!!e&&e.includes("cdn.shopify")&&!i(e),f=({qualityType:t,qualityPercent:i})=>{if(!t&&!i)return;let l={};for(let a of e){let e=r(t,a,o)??o;if("finest"===e){l[a]=d;continue}let n="custom"===e?p(r(i,a,100)):s[e]??100;l[a]=(n>0?n:100)/100}return l},g=(e,t)=>{let r=e.match(u);return r?`{{ ${r[1]} | append: '?width=${t}' | replace: '?', '&' | replace_first: '&', '?' }}`:`${e}${e.includes("?")?"&":"?"}width=${t}`},h=({sizeTarget:t="Image",qualityType:i,qualityPercent:o})=>{let s=f({qualityType:i,qualityPercent:o}),m=a[t]??a.Image,p=!n.includes(t),u=e=>{let t=r(s,e,1)??1;return t===d?p?d:m[e]:Math.round(m[e]*t)};return e.map(e=>({device:e,width:u(e),descriptor:l[e]})).sort((e,t)=>e.descriptor-t.descriptor)},I=e=>e.every(e=>e.width===d),S=({src:e,resolvedSrc:r,sizeTarget:i,qualityType:l,qualityPercent:a})=>{if(!e)return;let o=u.test(e);if(!o&&c.test(e))return;let s=o?t(e)?r:void 0:e;if(!b(s))return;let n=h({sizeTarget:i,qualityType:l,qualityPercent:a});if(!I(n))return n.map(({width:t,descriptor:r})=>{let i=t===d?e:g(e,t);return`${i} ${r}w`}).join(", ")};export{d as ORIGINAL_QUALITY,l as SRCSET_DEVICE_DESCRIPTORS,a as SRCSET_TARGET_WIDTHS,g as appendWidthParam,b as canResizeByShopifyCdn,S as getImageSrcset,f as getQualityMultiplier,h as getSrcsetCandidates,I as isEveryCandidateOriginal};
@@ -1,2 +1,2 @@
1
1
  'use client';
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{getAdaptivePictureStyles as i,getAdaptiveImageStyles as p}from"../common/styles.js";import{getAdaptiveImageClasses as n}from"../common/classes.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({...i()}),P=d({...p({layout:u,aspectRatio:z,borderRadius:b}),...f}),q=c({...n({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};
2
+ import{jsx as e,Fragment as a,jsxs as r}from"react/jsx-runtime";import{FALLBACK_IMAGE as t,getAdaptiveImageData as s,IMAGE_PLACEHOLDER as m}from"../common/helpers.js";import{createAttr as o,createStyleReact as l,createStyle as c,createClass as i}from"@gem-sdk/system";import{getAdaptivePictureStyles as d,getAdaptiveImageStyles as p}from"../common/styles.js";import{getAdaptiveImageClasses as n}from"../common/classes.js";let g=g=>{let{alt:y,style:u,srcSet:f,layout:h,priority:x,className:b,aspectRatio:j,borderRadius:k,pictureClass:z,pageContext:I,fallbackImg:L,sizeTarget:S,qualityType:v,qualityPercent:w,resolvedSrcSet:q,...N}=g,{getDeviceSource:P}=s(g),{srcTablet:T,srcMobile:A}=P(),B=o({loading:x?"eager":"lazy",src:f?.desktop?.src||t}),C=l({...d()}),D=c({...p({layout:h,aspectRatio:j,borderRadius:k}),...u}),E=i({...n({className:b})});return e(a,{children:r("picture",{style:C,className:z,children:[r(a,{children:[A&&e("source",{media:"(max-width: 767px)",srcSet:I?.enableLazyLoadImage?m:A}),T&&e("source",{media:"(max-width: 1024px)",srcSet:I?.enableLazyLoadImage?m:T})]}),e("img",{...N,...B,alt:y,width:"100%",style:D,className:E,draggable:"false"})]})})};g.defaultProps={layout:{desktop:"cover"}};export{g as default};
@@ -1,18 +1,16 @@
1
- import{getAdaptivePictureStyles as e,getAdaptiveImageStyles as t}from"../common/styles.js";import{createAttr as a,createStyle as s,createClass as o}from"@gem-sdk/system";import{getAdaptiveImageClasses as i}from"../common/classes.js";import{createBlurDataURL as m,getAdaptiveImageData as d}from"../common/helpers.js";import{template as r}from"@gem-sdk/core";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}=d(h),{srcDesktop:f,srcTablet:z,srcMobile:x}=u({isLiquid:!0}),I=a({src:n?.enableLazyLoadImage&&!g?m($?.desktop?.width??0,$?.desktop?.height??0):f,"data-src":f}),j=s({...e()}),S=s({...t({layout:c,aspectRatio:b,borderRadius:y}),...p}),q=o({...i({className:L,hasLazyLoad:!g&&n?.enableLazyLoadImage,hasForceLoad:n?.isOptimizePlan})});return r`
2
- <picture style="${j}" class="${w}">
3
- ${r`
4
- ${x?`<source media="(max-width: 767px)" data-srcSet="${x}" srcset="${n?.enableLazyLoadImage&&!g?m($?.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?m($?.tablet?.width??$?.desktop?.width??0,$?.tablet?.height??$?.desktop?.height??0):z}" />`:""}
6
- `}
7
- ${r`
1
+ import{getAdaptivePictureStyles as t,getAdaptiveImageStyles as e}from"../common/styles.js";import{createAttr as r,createStyle as s,createClass as m}from"@gem-sdk/system";import{getImageSrc as o,FALLBACK_IMAGE as i}from"../common/helpers.js";import{getAdaptiveImageClasses as l}from"../common/classes.js";import{getImageSrcset as c}from"../common/srcset.js";import{getLoadingAttrs as p}from"../common/attrs.js";import{template as a}from"@gem-sdk/core";let n={mobile:"(max-width: 767px)",tablet:"(max-width: 1024px)"},$=$=>{let{alt:d,style:f,layout:u,srcSet:j,priority:b,className:x,aspectRatio:g,pictureClass:h,borderRadius:k,fallbackImg:y,sizeTarget:w,qualityType:v,qualityPercent:O,resolvedSrcSet:A,pageContext:C,...E}=$,I=(t,e)=>c({src:t,resolvedSrc:A?.[e]?.src,sizeTarget:w,qualityType:v,qualityPercent:O}),S=o(j?.desktop)||y||i,q=I(S,"desktop"),z=Object.fromEntries(Object.entries(E).filter(([,t])=>null!=t)),B=r({src:S,...q&&{srcset:q},...p(b)}),D=s({...t()}),F=s({...e({layout:u,aspectRatio:g,borderRadius:k}),...f}),G=m({...l({className:x})}),H=t=>{let e=o(j?.[t]);if(!e)return"";let r=I(e,t)??e;return`<source media="${n[t]}" srcset="${r}" />`};return a`
2
+ <picture style="${D}" class="${h}">
3
+ ${H("mobile")}
4
+ ${H("tablet")}
5
+ ${a`
8
6
  <img
9
- ${{...k}}
10
- ${{...I}}
11
- alt="${l}"
7
+ ${{...z}}
8
+ ${{...B}}
9
+ alt="${d}"
12
10
  width="100%"
13
- style="${S}"
14
- class="${q}"
11
+ style="${F}"
12
+ class="${G}"
15
13
  />
16
14
  `}
17
15
  </picture>
18
- `};export{h as default};
16
+ `};export{$ as default};
@@ -1,4 +1,4 @@
1
- import{createStyle as s,createClass as e,createAttr as t,If as i}from"@gem-sdk/system";import m from"./AdaptiveImage.liquid.js";import{getLinkData as o}from"../../helpers.js";import r from"./NextImage.liquid.js";import{template as l}from"@gem-sdk/core";import{getWrapperStyles as a,getImageStyles as p,getContainerStyles as d}from"../common/styles.js";import{getWrapperClasses as u,getImageClasses as c,getContainerClasses as f}from"../common/classes.js";import{getContainerAttrs as n,getAdaptiveImageAttrs as $,getNextImageAttrs as g,getLinkWrapperAttrs as j,getImageLiquidAttrs as y}from"../common/attrs.js";import{getSettingTranslatedImageAndSeo as q}from"../common/helpers.js";let v=({style:v,styles:h,setting:I,advanced:L,className:N,pageContext:k,builderAttrs:x,builderProps:W})=>{let A=q({setting:I,uid:W?.uid,pageContext:k}),{imageLink:C,isAdaptive:b,enableImageLink:w}=A??{},{Wrapper:z,urlData:B}=o({defaultWrap:"div",setting:C,enableImageLink:w,isLiquid:!0}),D=s(a(h)),E=s(p(h,W)),F=s(d(v,h)),G=e(u()),H=e(c(N,h)),J=e(f(W?.uid,L?.cssClass,h?.shape)),K=t(n(x,W?.uid)),M=j({urlData:B,imageLink:C,title:A?.title,isLiquid:!0}),O=$({styles:h,setting:A,isLiquid:!0}),P=g({styles:h,setting:A}),Q=y({pageContext:k});return l`
1
+ import{createStyle as s,createClass as e,createAttr as t,If as r}from"@gem-sdk/system";import m from"./AdaptiveImage.liquid.js";import{getLinkData as i}from"../../helpers.js";import o from"./NextImage.liquid.js";import{template as l}from"@gem-sdk/core";import{getWrapperStyles as a,getImageStyles as d,getContainerStyles as p}from"../common/styles.js";import{getWrapperClasses as c,getImageClasses as f,getContainerClasses as u}from"../common/classes.js";import{getContainerAttrs as n,getAdaptiveImageAttrs as g,getNextImageAttrs as $,getLinkWrapperAttrs as j,getImageLiquidAttrs as v}from"../common/attrs.js";import{getSettingTranslatedImageAndSeo as y}from"../common/helpers.js";let q=({style:q,styles:S,setting:h,advanced:I,className:N,sizeTarget:k,pageContext:x,builderAttrs:L,builderProps:W})=>{let A=y({setting:h,uid:W?.uid,pageContext:x}),{imageLink:C,isAdaptive:b,enableImageLink:w}=A??{},{Wrapper:z,urlData:B}=i({defaultWrap:"div",setting:C,enableImageLink:w,isLiquid:!0}),D=s(a(S)),E=s(d(S,W)),F=s(p(q,S)),G=e(c()),H=e(f(N,S)),J=e(u(W?.uid,I?.cssClass,S?.shape)),K=t(n(L,W?.uid)),M=j({urlData:B,imageLink:C,title:A?.title,isLiquid:!0}),O=g({styles:S,setting:A,resolvedSrcSet:h?.srcSet,sizeTarget:k}),P={...$({styles:S,setting:A}),resolvedSrc:h?.image?.src,sizeTarget:k},Q=v({pageContext:x});return l`
2
2
  <div
3
3
  role="presentation"
4
4
  ${{...K}}
@@ -10,7 +10,7 @@ import{createStyle as s,createClass as e,createAttr as t,If as i}from"@gem-sdk/s
10
10
  style="${D}"
11
11
  class="${G}"
12
12
  >
13
- ${i(b,m({...Q,...O,style:E,className:H}),r({...Q,...P,style:E,className:H}))}
13
+ ${r(b,m({...Q,...O,style:E,className:H}),o({...Q,...P,style:E,className:H}))}
14
14
  </${z}>
15
15
  </div>
16
- `};export{v as default};
16
+ `};export{q as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as m}from"react/jsx-runtime";import e from"next/image";import{createStyle as t,createClass as o}from"@gem-sdk/system";import{getNextImageReactAttrs as r}from"../common/attrs.js";import{getNextImageClasses as s}from"../common/classes.js";import{getNextImageStyles as a}from"../common/styles.js";let i=i=>{let{style:l,imgRef:f,setting:c,priority:n,className:p,width:j,height:g,isNotLazyload:x,isDisableAspectStyle:y,pageContext:b}=i,d=!x&&(b?.enableLazyLoadImage??!0)&&!n,u=t({...l,...a({width:j,height:g,setting:c,isDisableAspectStyle:y,isDisableObjectFit:!1})}),I=o({...s({className:p,hasLazyLoad:d})}),L=r(i);return m(e,{ref:f,...L,style:u,className:I})};export{i as default};
2
+ import{jsx as m}from"react/jsx-runtime";import t from"next/image";import{createStyle as e,createClass as o}from"@gem-sdk/system";import{getNextImageReactAttrs as r}from"../common/attrs.js";import{getNextImageClasses as s}from"../common/classes.js";import{getNextImageStyles as i}from"../common/styles.js";let a=a=>{let{style:f,imgRef:l,setting:c,className:p,width:n,height:j,isDisableAspectStyle:x}=a,g=e({...f,...i({width:n,height:j,setting:c,isDisableAspectStyle:x,isDisableObjectFit:!1})}),u=o({...s({className:p})}),y=r(a);return m(t,{ref:l,...y,style:g,className:u})};export{a as default};
@@ -1,7 +1,6 @@
1
- import{createStyle as m,createClass as e}from"@gem-sdk/system";import{getNextImageLiquidAttrs as o}from"../common/attrs.js";import{getNextImageClasses as s}from"../common/classes.js";import{getNextImageStyles as t}from"../common/styles.js";import{template as r}from"@gem-sdk/core";let i=i=>{let{style:a,setting:l,priority:p,className:n,pageContext:c,width:d,height:f,customLazyload:g,isDisableObjectFit:y,isDisableAspectStyle:$}=i,j=!g&&(c?.enableLazyLoadImage??!0)&&!p,z=m({...a,...t({width:d,height:f,setting:l,isDisableObjectFit:y,isDisableAspectStyle:$})}),k=e({...s({className:n,hasLazyLoad:j,isOptimizePlan:c?.isOptimizePlan})}),u=o(i);return r`
1
+ import{createStyle as m,createClass as o}from"@gem-sdk/system";import{getNextImageLiquidAttrs as s}from"../common/attrs.js";import{getNextImageClasses as t}from"../common/classes.js";import{getNextImageStyles as r}from"../common/styles.js";import{template as e}from"@gem-sdk/core";let l=l=>{let{style:a,setting:c,className:f,width:i,height:p,isDisableObjectFit:g,isDisableAspectStyle:n}=l,d=m({...a,...r({width:i,height:p,setting:c,isDisableObjectFit:g,isDisableAspectStyle:n})}),j=o({...t({className:f})}),y=s(l);return e`
2
2
  <img
3
- ${u}
4
- id="${i?.id}"
5
- style="${z}"
6
- class="${k}"
7
- />`};export{i as default};
3
+ ${y}
4
+ style="${d}"
5
+ class="${j}"
6
+ />`};export{l as default};
@@ -1 +1 @@
1
- let i={loading:"eager",fetchpriority:"high",priority:!0};export{i as PRIORITY_LOAD_ATTRS};
1
+ let r={priority:!0};export{r as PRIORITY_LOAD_ATTRS};
@@ -1 +1 @@
1
- let e=[{id:"setting",controls:[{id:"imageStyle",label:"Style",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,popoverLabel:"Style",itemPerRow:2,itemSpacing:"large",options:[{label:"Rectangle",value:"rectangle",iconName:"gp-image-rectangle-style"},{label:"Circle",value:"circle",iconName:"gp-image-circle-style"}],default:"rectangle"},{id:"image-info",label:"Image",type:"group",controls:[{id:"image",type:"image-select",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237,height:1678}},{id:"srcSet",type:"image-select",hide:!0,dynamicSource:!0,devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237,height:1678}}}},{id:"isAdaptive",type:"toggle",label:"Adaptive",default:!0,hideOnMode:{mobileOnly:!0}}]},{id:"enableImageLink",type:"toggle",default:!1,compoDefaultValue:!1},{id:"imageLink",type:"pick-link",label:"Pick Link",default:{type:"open-page",link:"",target:"_self"},hiddenOptions:{"stay-on-page":!0}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"optimize",type:"group",label:"Optimize",hiddenWithGemPages:!0,controls:[{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],showDefaultUnit:!0,min:100,max:400,step:50,useOnlyUnitInit:!0,isNumber:!0,devices:{desktop:{default:100}}},{id:"priority",type:"toggle",label:"Preload",default:!1}]},{id:"isNotLazyload",type:"toggle",default:!1}]},{id:"style",controls:[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",shapeLinked:!0,width:"1200px"}}},settingConfig:{width:{displayOptions:["full"]},height:{displayOptions:["full"],units:["px","%"]}},hiddenSettings:["padding","gap"]},{id:"objectFit",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:{desktop:{default:"cover"}}},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"center"}}},{id:"behavior-state",type:"behavior-state",label:"Behavior State",controls:[{id:"borderImg",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",width:"1px 1px 1px 1px",borderWidth:"1px",color:"#000000",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"opacity",label:"Overlay Opacity",type:"input:slider",min:0,max:100,step:1,units:["%"],useOnlyUnitInit:!0,default:{normal:0},state:{normal:!0,hover:!0}},{id:"opacityColor",label:"Overlay Color",type:"colorpicker",default:{normal:"#242424"},state:{normal:!0,hover:!0}},{id:"hasBoxShadowImg",type:"toggle",label:"Enable Image Shadow",default:{normal:!1},state:{normal:!0,hover:!0}},{id:"boxShadowImg",type:"boxShadow",label:"Image Shadow",hideOnState:{normal:!0,hover:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}},state:{normal:!0,hover:!0}}]},{id:"wrapperBorder",type:"border",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#000000",isCustom:!0}},{id:"borderRadius",type:"radius-preset",label:"Corner",default:{radiusType:"none"},compoDefaultValue:{bblr:"20px",btrr:"20px",bbrr:"20px",btlr:"20px",radiusType:"rounded"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadow",type:"shadow-v2",label:"Button Shadow",default:{type:"none",distance:"10px",blur:"12px",spread:"10px",color:"rgba(18, 18, 18, 0.77)",angle:40}}]}];export{e as ImageSettings};
1
+ let e=[{id:"setting",controls:[{id:"imageStyle",label:"Style",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,popoverLabel:"Style",itemPerRow:2,itemSpacing:"large",options:[{label:"Rectangle",value:"rectangle",iconName:"gp-image-rectangle-style"},{label:"Circle",value:"circle",iconName:"gp-image-circle-style"}],default:"rectangle"},{id:"image-info",label:"Image",type:"group",controls:[{id:"image",type:"image-select",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237,height:1678}},{id:"srcSet",type:"image-select",hide:!0,dynamicSource:!0,devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237,height:1678}}}},{id:"isAdaptive",type:"toggle",label:"Adaptive",default:!0,hideOnMode:{mobileOnly:!0}}]},{id:"enableImageLink",type:"toggle",default:!1,compoDefaultValue:!1},{id:"imageLink",type:"pick-link",label:"Pick Link",default:{type:"open-page",link:"",target:"_self"},hiddenOptions:{"stay-on-page":!0}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"optimize",type:"group",label:"Optimize",hiddenWithGemPages:!0,controls:[{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],showDefaultUnit:!0,min:20,max:400,step:20,useOnlyUnitInit:!0,isNumber:!0,devices:{desktop:{default:100}}},{id:"priority",type:"toggle",label:"Preload",default:!1}]},{id:"isNotLazyload",type:"toggle",default:!1}]},{id:"style",controls:[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",shapeLinked:!0,width:"1200px"}}},settingConfig:{width:{displayOptions:["full"]},height:{displayOptions:["full"],units:["px","%"]}},hiddenSettings:["padding","gap"]},{id:"objectFit",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:{desktop:{default:"cover"}}},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"center"}}},{id:"behavior-state",type:"behavior-state",label:"Behavior State",controls:[{id:"borderImg",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",width:"1px 1px 1px 1px",borderWidth:"1px",color:"#000000",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"opacity",label:"Overlay Opacity",type:"input:slider",min:0,max:100,step:1,units:["%"],useOnlyUnitInit:!0,default:{normal:0},state:{normal:!0,hover:!0}},{id:"opacityColor",label:"Overlay Color",type:"colorpicker",default:{normal:"#242424"},state:{normal:!0,hover:!0}},{id:"hasBoxShadowImg",type:"toggle",label:"Enable Image Shadow",default:{normal:!1},state:{normal:!0,hover:!0}},{id:"boxShadowImg",type:"boxShadow",label:"Image Shadow",hideOnState:{normal:!0,hover:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}},state:{normal:!0,hover:!0}}]},{id:"wrapperBorder",type:"border",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#000000",isCustom:!0}},{id:"borderRadius",type:"radius-preset",label:"Corner",default:{radiusType:"none"},compoDefaultValue:{bblr:"20px",btrr:"20px",bbrr:"20px",btlr:"20px",radiusType:"rounded"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadow",type:"shadow-v2",label:"Button Shadow",default:{type:"none",distance:"10px",blur:"12px",spread:"10px",color:"rgba(18, 18, 18, 0.77)",angle:40}}]}];export{e as ImageSettings};
@@ -1 +1 @@
1
- let e=[{label:"Style",controls:[{setting:{id:"imageStyle"},layout:"vertical",controlChangeTrigger:{settings:[{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"square",shapeValue:"1/1",shapeLinked:!0,width:"80px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"9999px",btrr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"original",shapeValue:"",width:"100%"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"0px",btrr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:"Source",controls:[{conditionDisplay:"isAdaptive === false",setting:{id:"image"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{conditionDisplay:"isAdaptive === true",setting:{id:"srcSet"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"objectFit"},conditionDisplay:'shape.shape !== "original"'}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"shape"},layout:"vertical"}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border",type:"border-v2",linkWithSetting:{name:"wrapperBorder"}}},{label:"Corner",controlConfig:{id:"corner",type:"corner-v2",linkWithSetting:{name:"borderRadius"}}},{label:"Shadow",setting:{id:"shadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadow.enable === true",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!0}},{condition:"shadow.enable === false",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:"Link",setting:{id:"enableImageLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableImageLink == true'},{setting:{id:"imageLink"},conditionDisplay:"enableImageLink === true",layout:"vertical"}]},{label:"SEO",hiddenOnMobile:!0,controls:[{type:"combo",label:"Alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",isHideClear:!0,compoDefaultValue:"Title",controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"priority"}},{label:"Quality",setting:{id:"qualityType"},options:{disableMessage:"This setting only works with images uploaded to Shopify"},conditionEnable:"(activeScreenId === \"desktop\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"tablet\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"mobile\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com'))",conditionDisplay:"priority === false"},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && priority === false && ((activeScreenId === "desktop" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "tablet" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "mobile" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")))',setting:{id:"qualityPercent"}}]},{controls:[{label:"Align",hiddenOnMobile:!0,setting:{id:"align"},conditionEnable:'!(shape.width === "default" || (parseInt(shape.width) >= 100 && shape.width?.includes("%")))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{e as SettingUIV2};
1
+ let e=[{label:"Style",controls:[{setting:{id:"imageStyle"},layout:"vertical",controlChangeTrigger:{settings:[{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"square",shapeValue:"1/1",shapeLinked:!0,width:"80px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"9999px",btrr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"original",shapeValue:"",width:"100%"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"0px",btrr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:"Source",controls:[{conditionDisplay:"isAdaptive === false",setting:{id:"image"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{conditionDisplay:"isAdaptive === true",setting:{id:"srcSet"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"objectFit"},conditionDisplay:'shape.shape !== "original"'}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"shape"},layout:"vertical"}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border",type:"border-v2",linkWithSetting:{name:"wrapperBorder"}}},{label:"Corner",controlConfig:{id:"corner",type:"corner-v2",linkWithSetting:{name:"borderRadius"}}},{label:"Shadow",setting:{id:"shadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadow.enable === true",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!0}},{condition:"shadow.enable === false",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:"Link",setting:{id:"enableImageLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableImageLink == true'},{setting:{id:"imageLink"},conditionDisplay:"enableImageLink === true",layout:"vertical"}]},{label:"SEO",hiddenOnMobile:!0,controls:[{type:"combo",label:"Alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",isHideClear:!0,compoDefaultValue:"Title",controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"priority"}},{label:"Quality",setting:{id:"qualityType"},options:{disableMessage:"This setting only works with images uploaded to Shopify"},conditionEnable:"(activeScreenId === \"desktop\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"tablet\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"mobile\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com'))"},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && ((activeScreenId === "desktop" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "tablet" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "mobile" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")))',setting:{id:"qualityPercent"}}]},{controls:[{label:"Align",hiddenOnMobile:!0,setting:{id:"align"},conditionEnable:'!(shape.width === "default" || (parseInt(shape.width) >= 100 && shape.width?.includes("%")))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{e as SettingUIV2};
@@ -1,26 +1,26 @@
1
- import{createStyle as t,createClass as i,createAttr as e,createStateOrContext as s,If as a}from"@gem-sdk/system";import{template as r,isLocalEnv as l,baseAssetURL as o}from"@gem-sdk/core";import m from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as p}from"../../helpers.js";import{getOuterWrapperStyles as d,getWrapperWidth as c,getContainerStyles as n,getLazyPlaceholderStyle as g,getImageStyles as y,getLabelStyles as h,getArrowStyles as f,getLineStyles as $,getHandleStyles as b,getHandleCustomStyles as j,getSliderStyles as S}from"../common/styles.js";import{getOuterWrapperClasses as u,getLabelClasses as I,getLabelContainerClasses as L}from"../common/classes.js";import{getImageLiquidAttrs as v,getImagePlaceholderAttrs as w,getLabelLiquidAttrs as A,getLabelAttrs as C}from"../common/attrs.js";import{getData as q}from"../common/helpers.js";import N from"./SlideHandle.liquid.js";import k from"./Label.liquid.js";let D=D=>{let{leftImage:E,rightImage:O,advanced:x,builderData:z,pageContext:F,preload:G=!1,onSliderPositionChange:H}=D,{hover:W,styles:_,handle:J,handleSize:M,leftImageAlt:P,leftImageTitle:R,leftImageCss:T,leftImageLabel:V,rightImageAlt:B,rightImageTitle:K,rightImageCss:Q,rightImageLabel:U,sliderLineWidth:X,sliderLineColor:Y,sliderPositionPercentage:Z,vertical:tt,componentUid:ti,tempImage:te,aspectRatio:ts,defaultRatio:ta,isHorizontal:tr,hasLeftLabel:tl,hasRightLabel:to,qualityType:tm,qualityPercent:tp,getLeftImageSrc:td,getRightImageSrc:tc}=q(D),tn=td({isLiquid:!0}),tg=tc({isLiquid:!0}),ty=t({...d(_)}),th=t({...c({width:_?.width,leftImageWidth:E?.width,rightImageWidth:O?.width})}),tf=t({...n({aspectRatio:ts,builderData:z})}),t$=t({...g(ts)}),tb=t({...y({type:"right",props:D})}),tj=t({...y({type:"left",props:D})}),tS=t({...h({styles:_,type:"left",isHorizontal:tr})}),tu=t({...h({styles:_,type:"right",isHorizontal:tr})}),tI=t({...f({type:"left"})}),tL=t({...f({type:"right"})}),tv=t({...$({isHorizontal:tr,sliderLineColor:Y,sliderLineWidth:X})}),tw=t({...b({handleSize:M,isHorizontal:tr,sliderLineColor:Y,sliderLineWidth:X})}),tA=t({...j()}),tC=t({...S({hover:W,handleSize:M,isHorizontal:tr})}),tq=i({...u(x?.cssClass)}),tN=i({...I(_)}),tk=i({...L()}),tD=C({componentUid:ti,positionId:"left",label:V??""}),tE=C({componentUid:ti,positionId:"right",label:U??""}),tO=e({...v({priority:G,src:tg,title:K,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`right-image-${ti}`})}),tx=e({...v({priority:G,src:tn,title:R,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`left-image-${ti}`})}),tz=A({pageContext:F,translateLabel:"leftImageLabel"}),tF=A({pageContext:F,translateLabel:"rightImageLabel"}),tG=e({...w({width:te?.width,height:te?.height})}),tH=s({hover:W,handle:J,vertical:tt,leftImage:E,rightImage:O,handleSize:M,aspectRatio:ts,defaultRatio:ta,componentUid:ti,leftImageCss:T,rightImageCss:Q,sliderLineColor:Y,sliderLineWidth:X,sliderPositionPercentage:Z,onSliderPositionChange:H});return r`
1
+ import{createStyle as t,createClass as e,createAttr as i,createStateOrContext as s,If as r}from"@gem-sdk/system";import{template as a,isLocalEnv as l,baseAssetURL as o}from"@gem-sdk/core";import m from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as p}from"../../helpers.js";import{getOuterWrapperStyles as d,getWrapperWidth as c,getContainerStyles as g,getLazyPlaceholderStyle as n,getImageStyles as h,getLabelStyles as y,getArrowStyles as f,getLineStyles as $,getHandleStyles as S,getHandleCustomStyles as b,getSliderStyles as j}from"../common/styles.js";import{getOuterWrapperClasses as u,getLabelClasses as I,getLabelContainerClasses as v}from"../common/classes.js";import{getImageLiquidAttrs as C,getImagePlaceholderAttrs as w,getLabelLiquidAttrs as L,getLabelAttrs as A}from"../common/attrs.js";import{getData as q}from"../common/helpers.js";import k from"./SlideHandle.liquid.js";import D from"./Label.liquid.js";let E=E=>{let{leftImage:O,rightImage:N,leftImageResolvedSrc:T,rightImageResolvedSrc:x,advanced:z,builderData:F,pageContext:G,preload:H=!1,onSliderPositionChange:W}=E,{hover:_,styles:J,handle:M,handleSize:P,leftImageAlt:R,leftImageTitle:V,leftImageCss:B,leftImageLabel:K,rightImageAlt:Q,rightImageTitle:U,rightImageCss:X,rightImageLabel:Y,sliderLineWidth:Z,sliderLineColor:tt,sliderPositionPercentage:te,vertical:ti,componentUid:ts,tempImage:tr,aspectRatio:ta,defaultRatio:tl,isHorizontal:to,hasLeftLabel:tm,hasRightLabel:tp,qualityType:td,qualityPercent:tc,getLeftImageSrc:tg,getRightImageSrc:tn}=q(E),th=tg({isLiquid:!0}),ty=tn({isLiquid:!0}),tf=t({...d(J)}),t$=t({...c({width:J?.width,leftImageWidth:O?.width,rightImageWidth:N?.width})}),tS=t({...g({aspectRatio:ta,builderData:F})}),tb=t({...n(ta)}),tj=t({...h({type:"right",props:E})}),tu=t({...h({type:"left",props:E})}),tI=t({...y({styles:J,type:"left",isHorizontal:to})}),tv=t({...y({styles:J,type:"right",isHorizontal:to})}),tC=t({...f({type:"left"})}),tw=t({...f({type:"right"})}),tL=t({...$({isHorizontal:to,sliderLineColor:tt,sliderLineWidth:Z})}),tA=t({...S({handleSize:P,isHorizontal:to,sliderLineColor:tt,sliderLineWidth:Z})}),tq=t({...b()}),tk=t({...j({hover:_,handleSize:P,isHorizontal:to})}),tD=e({...u(z?.cssClass)}),tE=e({...I(J)}),tO=e({...v()}),tN=A({componentUid:ts,positionId:"left",label:K??""}),tT=A({componentUid:ts,positionId:"right",label:Y??""}),tx=i({...C({priority:H,src:ty,title:U,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`right-image-${ts}`})}),tz=i({...C({priority:H,src:th,title:V,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`left-image-${ts}`})}),tF=L({pageContext:G,translateLabel:"leftImageLabel"}),tG=L({pageContext:G,translateLabel:"rightImageLabel"}),tH=i({...w({width:tr?.width,height:tr?.height})}),tW=s({hover:_,handle:M,vertical:ti,leftImage:O,rightImage:N,handleSize:P,aspectRatio:ta,defaultRatio:tl,componentUid:ts,leftImageCss:B,rightImageCss:X,sliderLineColor:tt,sliderLineWidth:Z,sliderPositionPercentage:te,onSliderPositionChange:W});return a`
2
2
  <gp-image-comparison
3
- data-id="${ti}"
4
- style="${ty}"
5
- class="${tq}"
3
+ data-id="${ts}"
4
+ style="${tf}"
5
+ class="${tD}"
6
6
  >
7
- <script gp-data type="application/json">${JSON.stringify(tH)}</script>
8
- <div id="img-comparison-wrapper-${ti}" style="${th}">
7
+ <script gp-data type="application/json">${JSON.stringify(tW)}</script>
8
+ <div id="img-comparison-wrapper-${ts}" style="${t$}">
9
9
  <div
10
- id="img-comparison-container-${ti}"
10
+ id="img-comparison-container-${ts}"
11
11
  data-testid="container"
12
- style="${tf}"
12
+ style="${tS}"
13
13
  >
14
- ${r`
15
- <img alt="" ${tG} style="${t$}" />
14
+ ${a`
15
+ <img alt="" ${tH} style="${tb}" />
16
16
  `}
17
- ${m({...tO,alt:B,style:tb,setting:{qualityType:tm,qualityPercent:tp},pageContext:F,isNotLazyload:G,customAttrs:{"data-testid":"right-image"}})}
18
- ${m({...tx,alt:P,style:tj,setting:{qualityType:tm,qualityPercent:tp},pageContext:F,isNotLazyload:G,customAttrs:{"data-testid":"left-image"}})}
19
- ${N({componentUid:ti,customHandle:J,lineStyles:tv,sliderStyles:tC,handleStyles:tw,customHandleStyles:tA,leftArrowStyles:tI,rightArrowStyles:tL})}
20
- ${a(tl,k({...tD,...tz,styles:_,childrenClass:tN,childrenStyle:tS,containerClass:tk,containerStyle:{}}),"")}
21
- ${a(to,k({...tE,...tF,styles:_,childrenClass:tN,childrenStyle:tu,containerClass:tk,containerStyle:{}}),"")}
17
+ ${m({...tx,alt:Q,style:tj,setting:{qualityType:td,qualityPercent:tc},resolvedSrc:x??N?.src,sizeTarget:"ImageComparison",customAttrs:{"data-testid":"right-image"}})}
18
+ ${m({...tz,alt:R,style:tu,setting:{qualityType:td,qualityPercent:tc},resolvedSrc:T??O?.src,sizeTarget:"ImageComparison",customAttrs:{"data-testid":"left-image"}})}
19
+ ${k({componentUid:ts,customHandle:M,lineStyles:tL,sliderStyles:tk,handleStyles:tA,customHandleStyles:tq,leftArrowStyles:tC,rightArrowStyles:tw})}
20
+ ${r(tm,D({...tN,...tF,styles:J,childrenClass:tE,childrenStyle:tI,containerClass:tO,containerStyle:{}}),"")}
21
+ ${r(tp,D({...tT,...tG,styles:J,childrenClass:tE,childrenStyle:tv,containerClass:tO,containerStyle:{}}),"")}
22
22
  </div>
23
23
  </div>
24
24
  </gp-image-comparison>
25
- ${`${a(l,`<script ${p('class="gps-link" delay',"src")}="{{ 'gp-image-comparison-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${p('class="gps-link" delay',"src")}="${o}/assets-v2/gp-image-comparison-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`}
26
- `};export{D as default};
25
+ ${`${r(l,`<script ${p('class="gps-link" delay',"src")}="{{ 'gp-image-comparison-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${p('class="gps-link" delay',"src")}="${o}/assets-v2/gp-image-comparison-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`}
26
+ `};export{E as default};