@anker-in/headless-ui 1.1.4 → 1.1.6

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 (344) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
  2. package/dist/cjs/biz-components/AplusDesc/index.js +1 -1
  3. package/dist/cjs/biz-components/AplusDesc/index.js.map +2 -2
  4. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  5. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  6. package/dist/cjs/biz-components/Category/index.js +1 -1
  7. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  8. package/dist/cjs/biz-components/CreativeModule/index.js +1 -1
  9. package/dist/cjs/biz-components/CreativeModule/index.js.map +2 -2
  10. package/dist/cjs/biz-components/DownLoad/index.js +1 -1
  11. package/dist/cjs/biz-components/DownLoad/index.js.map +1 -1
  12. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  13. package/dist/cjs/biz-components/Evaluate/index.js.map +1 -1
  14. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  15. package/dist/cjs/biz-components/Features/index.js +1 -1
  16. package/dist/cjs/biz-components/Features/index.js.map +2 -2
  17. package/dist/cjs/biz-components/FootCharger/index.js +1 -1
  18. package/dist/cjs/biz-components/FootCharger/index.js.map +2 -2
  19. package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
  20. package/dist/cjs/biz-components/FooterNavigation/index.js.map +2 -2
  21. package/dist/cjs/biz-components/GiftBox/index.js +1 -1
  22. package/dist/cjs/biz-components/GiftBox/index.js.map +1 -1
  23. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  24. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  25. package/dist/cjs/biz-components/GraphicMore/index.js +1 -1
  26. package/dist/cjs/biz-components/GraphicMore/index.js.map +2 -2
  27. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +1 -1
  28. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +2 -2
  29. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js.map +1 -1
  30. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  31. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +2 -2
  32. package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
  33. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +2 -2
  34. package/dist/cjs/biz-components/HeroBanner/Countdown.js +1 -1
  35. package/dist/cjs/biz-components/HeroBanner/Countdown.js.map +1 -1
  36. package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +2 -2
  37. package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js +1 -1
  38. package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js.map +1 -1
  39. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  40. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
  41. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  42. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +3 -3
  43. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js +1 -1
  44. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js.map +2 -2
  45. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +5 -6
  46. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +2 -2
  47. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +1 -1
  48. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +2 -2
  49. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +1 -1
  50. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +1 -1
  51. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  52. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +2 -2
  53. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  54. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +2 -2
  55. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  56. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  57. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  58. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
  59. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +1 -1
  60. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +2 -2
  61. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +1 -1
  62. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +2 -2
  63. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  64. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +3 -3
  65. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +1 -1
  66. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +2 -2
  67. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +1 -1
  68. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +2 -2
  69. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
  70. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +3 -3
  71. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  72. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  73. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +1 -1
  74. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +2 -2
  75. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  76. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +2 -2
  77. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +1 -1
  78. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +2 -2
  79. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  80. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  81. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +1 -1
  82. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +2 -2
  83. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  84. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +2 -2
  85. package/dist/cjs/biz-components/Listing/components/index.js.map +1 -1
  86. package/dist/cjs/biz-components/Listing/const.js.map +1 -1
  87. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.d.ts +1 -1
  88. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +1 -1
  89. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +2 -2
  90. package/dist/cjs/biz-components/Listing/hooks/use-variant.js +1 -1
  91. package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +2 -2
  92. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
  93. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +2 -2
  94. package/dist/cjs/biz-components/Listing/hooks/useDiscountEnable.js.map +2 -2
  95. package/dist/cjs/biz-components/Listing/index.js +1 -1
  96. package/dist/cjs/biz-components/Listing/index.js.map +1 -1
  97. package/dist/cjs/biz-components/Listing/types/product.d.ts +1 -1
  98. package/dist/cjs/biz-components/Listing/types/product.js +1 -1
  99. package/dist/cjs/biz-components/Listing/types/product.js.map +1 -1
  100. package/dist/cjs/biz-components/Listing/types.js.map +1 -1
  101. package/dist/cjs/biz-components/Listing/utils/helper.js +1 -1
  102. package/dist/cjs/biz-components/Listing/utils/helper.js.map +2 -2
  103. package/dist/cjs/biz-components/Listing/utils/index.js +1 -1
  104. package/dist/cjs/biz-components/Listing/utils/index.js.map +2 -2
  105. package/dist/cjs/biz-components/Listing/utils/textFormat.js.map +2 -2
  106. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  107. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
  108. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  109. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  110. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
  111. package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
  112. package/dist/cjs/biz-components/NavigationSearch/types.js.map +1 -1
  113. package/dist/cjs/biz-components/SearchPage/index.js +1 -1
  114. package/dist/cjs/biz-components/SearchPage/index.js.map +2 -2
  115. package/dist/cjs/biz-components/SearchPage/types.js.map +2 -2
  116. package/dist/cjs/biz-components/SelectStore/index.js +1 -1
  117. package/dist/cjs/biz-components/SelectStore/index.js.map +1 -1
  118. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
  119. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +1 -1
  120. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
  121. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  122. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +1 -1
  123. package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
  124. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  125. package/dist/cjs/biz-components/Spacer/index.js.map +3 -3
  126. package/dist/cjs/biz-components/Specs/dropdown.js +1 -1
  127. package/dist/cjs/biz-components/Specs/dropdown.js.map +1 -1
  128. package/dist/cjs/biz-components/Specs/index.js +1 -1
  129. package/dist/cjs/biz-components/Specs/index.js.map +2 -2
  130. package/dist/cjs/biz-components/Subscribe/index.js +1 -1
  131. package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
  132. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  133. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  134. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  135. package/dist/cjs/biz-components/Tabs/Tabs.js.map +2 -2
  136. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  137. package/dist/cjs/biz-components/TextModal/index.js +1 -1
  138. package/dist/cjs/biz-components/TextModal/index.js.map +1 -1
  139. package/dist/cjs/biz-components/Title/index.js +1 -1
  140. package/dist/cjs/biz-components/Title/index.js.map +2 -2
  141. package/dist/cjs/biz-components/VideoModal/index.js +1 -1
  142. package/dist/cjs/biz-components/VideoModal/index.js.map +2 -2
  143. package/dist/cjs/biz-components/index.d.ts +1 -1
  144. package/dist/cjs/biz-components/index.js +1 -1
  145. package/dist/cjs/biz-components/index.js.map +2 -2
  146. package/dist/cjs/components/ExposureDetector.js.map +1 -1
  147. package/dist/cjs/components/board.js +1 -1
  148. package/dist/cjs/components/board.js.map +3 -3
  149. package/dist/cjs/components/button.js.map +2 -2
  150. package/dist/cjs/components/checkbox.js.map +2 -2
  151. package/dist/cjs/components/dialog.js +1 -1
  152. package/dist/cjs/components/dialog.js.map +1 -1
  153. package/dist/cjs/components/loadingDots.js +1 -1
  154. package/dist/cjs/components/loadingDots.js.map +2 -2
  155. package/dist/cjs/components/picture.js +1 -1
  156. package/dist/cjs/components/picture.js.map +2 -2
  157. package/dist/cjs/cpn-components/CpnNavigation/index.js +1 -1
  158. package/dist/cjs/cpn-components/CpnNavigation/index.js.map +3 -3
  159. package/dist/cjs/cpn-components/CpnNavigation/types.d.ts +1 -0
  160. package/dist/cjs/cpn-components/CpnNavigation/types.js +1 -1
  161. package/dist/cjs/cpn-components/CpnNavigation/types.js.map +3 -3
  162. package/dist/cjs/cpn-components/CpnProductCard/types.d.ts +1 -1
  163. package/dist/cjs/cpn-components/CpnProductCard/types.js.map +1 -1
  164. package/dist/cjs/helpers/utils.js.map +1 -1
  165. package/dist/cjs/hooks/useExposure.js.map +2 -2
  166. package/dist/cjs/hooks/useExposureDetection.js +1 -1
  167. package/dist/cjs/hooks/useExposureDetection.js.map +2 -2
  168. package/dist/cjs/hooks/useIntersectionObserver.js.map +2 -2
  169. package/dist/cjs/hooks/useRollout.js.map +2 -2
  170. package/dist/cjs/stories/board.stories.d.ts +1 -1
  171. package/dist/cjs/stories/board.stories.js +1 -1
  172. package/dist/cjs/stories/board.stories.js.map +2 -2
  173. package/dist/cjs/stories/specs.stories.js.map +2 -2
  174. package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
  175. package/dist/esm/biz-components/AplusDesc/index.js +1 -1
  176. package/dist/esm/biz-components/AplusDesc/index.js.map +2 -2
  177. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  178. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  179. package/dist/esm/biz-components/Category/index.js +1 -1
  180. package/dist/esm/biz-components/Category/index.js.map +2 -2
  181. package/dist/esm/biz-components/CreativeModule/index.js +1 -1
  182. package/dist/esm/biz-components/CreativeModule/index.js.map +2 -2
  183. package/dist/esm/biz-components/DownLoad/index.js +1 -1
  184. package/dist/esm/biz-components/DownLoad/index.js.map +1 -1
  185. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  186. package/dist/esm/biz-components/Evaluate/index.js.map +1 -1
  187. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  188. package/dist/esm/biz-components/Features/index.js +1 -1
  189. package/dist/esm/biz-components/Features/index.js.map +2 -2
  190. package/dist/esm/biz-components/FootCharger/index.js +1 -1
  191. package/dist/esm/biz-components/FootCharger/index.js.map +2 -2
  192. package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
  193. package/dist/esm/biz-components/FooterNavigation/index.js.map +2 -2
  194. package/dist/esm/biz-components/GiftBox/index.js +1 -1
  195. package/dist/esm/biz-components/GiftBox/index.js.map +1 -1
  196. package/dist/esm/biz-components/Graphic/index.js +1 -1
  197. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  198. package/dist/esm/biz-components/GraphicMore/index.js +1 -1
  199. package/dist/esm/biz-components/GraphicMore/index.js.map +2 -2
  200. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +1 -1
  201. package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +2 -2
  202. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js.map +1 -1
  203. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  204. package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
  205. package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
  206. package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +2 -2
  207. package/dist/esm/biz-components/HeroBanner/Countdown.js +1 -1
  208. package/dist/esm/biz-components/HeroBanner/Countdown.js.map +1 -1
  209. package/dist/esm/biz-components/Listing/BizProductProvider.js.map +2 -2
  210. package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js +1 -1
  211. package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js.map +1 -1
  212. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  213. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
  214. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  215. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  216. package/dist/esm/biz-components/Listing/components/PaidShipping/index.js +1 -1
  217. package/dist/esm/biz-components/Listing/components/PaidShipping/index.js.map +2 -2
  218. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +5 -6
  219. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +2 -2
  220. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +1 -1
  221. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +2 -2
  222. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +1 -1
  223. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +1 -1
  224. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  225. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +2 -2
  226. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  227. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +2 -2
  228. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  229. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  230. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  231. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
  232. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +1 -1
  233. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +2 -2
  234. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +1 -1
  235. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +2 -2
  236. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  237. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +3 -3
  238. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +1 -1
  239. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +2 -2
  240. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +1 -1
  241. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +2 -2
  242. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
  243. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +3 -3
  244. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  245. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  246. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +1 -1
  247. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +2 -2
  248. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  249. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +2 -2
  250. package/dist/esm/biz-components/Listing/components/ProductCard/index.js +1 -1
  251. package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +2 -2
  252. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  253. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  254. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +1 -1
  255. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +2 -2
  256. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  257. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +2 -2
  258. package/dist/esm/biz-components/Listing/components/index.js.map +1 -1
  259. package/dist/esm/biz-components/Listing/const.js.map +1 -1
  260. package/dist/esm/biz-components/Listing/hooks/use-variant-media.d.ts +1 -1
  261. package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +1 -1
  262. package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +2 -2
  263. package/dist/esm/biz-components/Listing/hooks/use-variant.js +1 -1
  264. package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +2 -2
  265. package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
  266. package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +2 -2
  267. package/dist/esm/biz-components/Listing/hooks/useDiscountEnable.js.map +2 -2
  268. package/dist/esm/biz-components/Listing/index.js +1 -1
  269. package/dist/esm/biz-components/Listing/index.js.map +1 -1
  270. package/dist/esm/biz-components/Listing/types/product.d.ts +1 -1
  271. package/dist/esm/biz-components/Listing/types/product.js +1 -1
  272. package/dist/esm/biz-components/Listing/types/product.js.map +1 -1
  273. package/dist/esm/biz-components/Listing/utils/helper.js +1 -1
  274. package/dist/esm/biz-components/Listing/utils/helper.js.map +2 -2
  275. package/dist/esm/biz-components/Listing/utils/index.js +1 -1
  276. package/dist/esm/biz-components/Listing/utils/index.js.map +2 -2
  277. package/dist/esm/biz-components/Listing/utils/textFormat.js.map +2 -2
  278. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  279. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
  280. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  281. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  282. package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
  283. package/dist/esm/biz-components/NavigationSearch/index.js.map +2 -2
  284. package/dist/esm/biz-components/NavigationSearch/types.js.map +1 -1
  285. package/dist/esm/biz-components/SearchPage/index.js +1 -1
  286. package/dist/esm/biz-components/SearchPage/index.js.map +2 -2
  287. package/dist/esm/biz-components/SearchPage/types.js.map +2 -2
  288. package/dist/esm/biz-components/SelectStore/index.js +1 -1
  289. package/dist/esm/biz-components/SelectStore/index.js.map +1 -1
  290. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
  291. package/dist/esm/biz-components/ShelfDisplay/index.js.map +1 -1
  292. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
  293. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  294. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +1 -1
  295. package/dist/esm/biz-components/Slogan/index.js.map +2 -2
  296. package/dist/esm/biz-components/Spacer/index.js +1 -1
  297. package/dist/esm/biz-components/Spacer/index.js.map +3 -3
  298. package/dist/esm/biz-components/Specs/dropdown.js +1 -1
  299. package/dist/esm/biz-components/Specs/dropdown.js.map +1 -1
  300. package/dist/esm/biz-components/Specs/index.js +1 -1
  301. package/dist/esm/biz-components/Specs/index.js.map +2 -2
  302. package/dist/esm/biz-components/Subscribe/index.js +1 -1
  303. package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
  304. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  305. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  306. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  307. package/dist/esm/biz-components/Tabs/Tabs.js.map +2 -2
  308. package/dist/esm/biz-components/TextModal/index.js +1 -1
  309. package/dist/esm/biz-components/TextModal/index.js.map +1 -1
  310. package/dist/esm/biz-components/Title/index.js +1 -1
  311. package/dist/esm/biz-components/Title/index.js.map +2 -2
  312. package/dist/esm/biz-components/VideoModal/index.js +1 -1
  313. package/dist/esm/biz-components/VideoModal/index.js.map +2 -2
  314. package/dist/esm/biz-components/index.d.ts +1 -1
  315. package/dist/esm/biz-components/index.js +1 -1
  316. package/dist/esm/biz-components/index.js.map +2 -2
  317. package/dist/esm/components/ExposureDetector.js.map +1 -1
  318. package/dist/esm/components/board.js +1 -1
  319. package/dist/esm/components/board.js.map +2 -2
  320. package/dist/esm/components/button.js.map +2 -2
  321. package/dist/esm/components/checkbox.js.map +2 -2
  322. package/dist/esm/components/dialog.js +1 -1
  323. package/dist/esm/components/dialog.js.map +1 -1
  324. package/dist/esm/components/loadingDots.js +1 -1
  325. package/dist/esm/components/loadingDots.js.map +2 -2
  326. package/dist/esm/components/picture.js +1 -1
  327. package/dist/esm/components/picture.js.map +2 -2
  328. package/dist/esm/cpn-components/CpnNavigation/index.js +1 -1
  329. package/dist/esm/cpn-components/CpnNavigation/index.js.map +2 -2
  330. package/dist/esm/cpn-components/CpnNavigation/types.d.ts +1 -0
  331. package/dist/esm/cpn-components/CpnNavigation/types.js +1 -0
  332. package/dist/esm/cpn-components/CpnNavigation/types.js.map +3 -3
  333. package/dist/esm/cpn-components/CpnProductCard/types.d.ts +1 -1
  334. package/dist/esm/helpers/utils.js.map +1 -1
  335. package/dist/esm/hooks/useExposure.js.map +2 -2
  336. package/dist/esm/hooks/useExposureDetection.js +1 -1
  337. package/dist/esm/hooks/useExposureDetection.js.map +2 -2
  338. package/dist/esm/hooks/useIntersectionObserver.js.map +2 -2
  339. package/dist/esm/hooks/useRollout.js.map +2 -2
  340. package/dist/esm/stories/board.stories.d.ts +1 -1
  341. package/dist/esm/stories/board.stories.js +1 -1
  342. package/dist/esm/stories/board.stories.js.map +2 -2
  343. package/dist/esm/stories/specs.stories.js.map +2 -2
  344. package/package.json +6 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/biz-components/Listing/utils/helper.ts"],
4
- "sourcesContent": ["// \u6539\u7EC4\u4EF6\u5BA2\u6237\u7AEF\u6267\u884C\n// import { SchemaVariant } from '@projectTypes/template'\nimport type { Product, ProductMedia, ProductVariant } from '../types/product'\nimport { CouponChannel } from '../const'\n// import Cookies from 'js-cookie'\n// import { Attribute, HasMetafieldsIdentifier } from 'lib/shopify/gql'\n// import { HasMetafieldQueryRoot } from 'lib/shopify/types/fetcher'\n// import { useEffect, useState } from 'react'\n\n// import { PartialRecord } from './type-helper'\n\nexport type SchemaVariant = {\n variant: {\n handle: string\n sku: string\n }\n}\n\n// \u5224\u65AD\u5BF9\u8C61\u662F\u5426\u4E3A\u7A7A\nexport function isObjEmpty(obj?: Record<string, any>) {\n if (!obj) return true\n else {\n return Object.keys(obj).length === 0\n }\n}\n\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\n\nexport function btoaID(id: string, type: 'ProductVariant' | 'Product' = 'ProductVariant') {\n return `gid://shopify/${type}/${id}`\n}\n\n// \u76AE\u80A4\u7AD9\u4E09\u7EA7\u57DF\u540D\nexport const getThemeLocale = (locale: string) => {\n if (locale === 'eu-de') return 'de'\n if (locale === 'eu-en') return 'eu'\n if (locale === 'au') return 'au'\n return locale\n}\n\n/**\n * \u751F\u6210 metafieldIdentifiers \u67E5\u8BE2\u53C2\u6570\n */\n// export function constructMetafieldIdentifiersQueryParams<T extends HasMetafieldQueryRoot>(\n// metafieldIdentifiers: PartialRecord<T, HasMetafieldsIdentifier[]> = {},\n// ): PartialRecord<`${T}MetafieldIdentifiers`, HasMetafieldsIdentifier[]> {\n// const identifiers = Object.entries(metafieldIdentifiers).reduce(\n// (queryInput, [key, value]) => {\n// const metafieldIdentifiers = value as HasMetafieldsIdentifier[]\n// queryInput[`${key}MetafieldIdentifiers`] = metafieldIdentifiers\n// .filter((item) => !item.namespace.startsWith(metafieldNamespacePrefix))\n// .map((item) => ({\n// namespace: `${metafieldNamespacePrefix}combo`,\n// key: item.namespace,\n// }))\n// .concat(metafieldIdentifiers)\n// return queryInput\n// },\n// {} as PartialRecord<`${T}MetafieldIdentifiers`, HasMetafieldsIdentifier[]>,\n// )\n// return identifiers\n// }\n\n// export function cleanShopKey(shop: Shop) {\n// const { privacyPolicy, refundPolicy, shippingPolicy, termsOfService, subscriptionPolicy, ...otherShop } = shop\n// return otherShop\n// }\n\n// export const delHtmlTag = (str?: string) => {\n// return str ? String(str).replace(/<[^>]+>/g, '') : ''\n// }\n\nexport const getNormalCoupon = ({ variant }: { variant?: ProductVariant }) => {\n return variant?.coupons?.find(coupon => coupon.discount_type !== CouponChannel.WSCH)\n}\n\n// export const setCartSecretCookie = ({ cart }) => {\n// const key = cart.id.split('?key=')[1]\n// const id = cart.id.split('?key=')[0].split('gid://shopify/Cart/')[1]\n// Cookies.set(id, key, {\n// Domain: window.location.hostname.split('.').reverse().slice(0, 2).reverse().join('.'),\n// })\n// }\n\n// export const languageCode = (locale: string) =>\n// ({\n// us: 'US',\n// uk: 'GB',\n// ca: 'CA',\n// fr: 'FR',\n// au: 'AU',\n// my: 'MY',\n// vn: 'VN',\n// it: 'IT',\n// de: 'DE',\n// cl: 'CL',\n// })[locale] || 'US'\n\n// shopify \u7684\u7279\u6B8A\u6587\u4EF6\u8F6C\u6362\u89C4\u5219\nconst umlautMap = {\n '\\u00dc': 'U',\n '\\u00c4': 'A',\n '\\u00d6': 'O',\n '\\u00fc': 'u',\n '\\u00e4': 'a',\n '\\u00f6': 'o',\n '\\u00df': 'ss',\n '\\u00E8': 'e',\n}\n\n// \u66FF\u6362\u5B57\u7B26\u4E32\u4E2D\u7684\u7279\u6B8A\u5B57\u7B26\nexport function replaceUmlaut(str: string) {\n return str\n .replace(/[\\u00dc|\\u00c4|\\u00d6][a-z]/g, a => {\n const big = umlautMap[a.slice(0, 1) as keyof typeof umlautMap]\n return big.charAt(0) + big.charAt(1).toLowerCase() + a.slice(1)\n })\n .replace(new RegExp('[' + Object.keys(umlautMap).join('|') + ']', 'g'), a => umlautMap[a as keyof typeof umlautMap])\n}\n\n// \u5C06\u5B57\u7B26\u4E32\u8F6C\u6362\u4E3A slug\nexport function handle(str: string) {\n return replaceUmlaut(str)\n .replace(/ /g, '-')\n .replace(/[^a-zA-Z0-9-]/g, '')\n .toLowerCase()\n}\n\n// get variant image index\nexport function getVariantImageIndex({\n mediaList,\n variant,\n}: {\n variant: ProductVariant\n mediaList: ProductMedia[]\n}): null | number {\n const src = variant?.image?.url\n return src ? mediaList.map(media => media.image?.url).findIndex(imageSrc => imageSrc == src) : null\n}\n\n// get images belong to variant\nexport function getVariantMediaList({ product, variant }: { variant: ProductVariant; product: Product }) {\n const currentVariantImageIndex = getVariantImageIndex({ mediaList: product.media, variant })\n\n if (currentVariantImageIndex !== null) {\n const nextVariantImageIndex =\n product.variants\n .filter(v => variant.id !== v.id)\n .map(v => getVariantImageIndex({ mediaList: product.media, variant: v }))\n .find(index => index !== null && index > currentVariantImageIndex) || -1\n\n // current variant images, if no next variant found, return images from current index to the end\n return product.media.slice(\n currentVariantImageIndex,\n nextVariantImageIndex === -1 ? product.media.length : nextVariantImageIndex\n )\n } else {\n // if no variant image found, return all images\n return product.media\n }\n}\n\n// // \u901A\u8FC7\u9009\u62E9 option \u83B7\u53D6 variant\n// export function getVariantFromSelectedOptions({\n// product,\n// selectedOptions,\n// }: {\n// product: Product\n// selectedOptions: Record<string, string>\n// }) {\n// return product.variants.find((variant) => {\n// return Object.entries(selectedOptions).every(([key, value]) =>\n// variant.options.find((option) => {\n// if (option.__typename === 'MultipleChoiceOption' && option.name === key) {\n// return option.values.find((v) => v.label === value)\n// }\n// }),\n// )\n// })\n// }\n\n// export const getURLParameter = (name, url = window.location.href) => {\n// name = name.replace(/[\\[\\]]/g, '\\\\$&') // \u5C06\u65B9\u62EC\u53F7\u8F6C\u4E49\uFF0C\u4EE5\u4FBF\u5728\u6B63\u5219\u8868\u8FBE\u5F0F\u4E2D\u4F7F\u7528\n// var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)') // \u521B\u5EFA\u5339\u914D\u53C2\u6570\u7684\u6B63\u5219\u8868\u8FBE\u5F0F\n// var results = regex.exec(url) // \u5728URL\u4E2D\u67E5\u627E\u5339\u914D\u7684\u53C2\u6570\n// if (!results) return null // \u5982\u679C\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u53C2\u6570\uFF0C\u5219\u8FD4\u56DEnull\n// if (!results[2]) return '' // \u5982\u679C\u53C2\u6570\u7684\u503C\u4E3A\u7A7A\uFF0C\u5219\u8FD4\u56DE\u7A7A\u5B57\u7B26\u4E32\n// return decodeURIComponent(results[2]) // \u8FD4\u56DE\u89E3\u7801\u540E\u7684\u53C2\u6570\u503C\n// }\n\nexport const checkItemAvailableForProduct = ({\n product,\n item,\n variant,\n}: {\n product: Product\n variant: ProductVariant\n item?: {\n includeTags?: string[]\n includeProducts?: SchemaVariant[]\n excludeProducts?: SchemaVariant[]\n }\n}) => {\n if (item) {\n if (Number(item?.includeTags?.length) > 0) {\n return product.tags?.find((tag) => item?.includeTags?.includes(tag))\n } else if (Number(item?.includeProducts?.length) > 0) {\n return item.includeProducts?.find((p) => p?.variant?.handle === product.handle && p?.variant?.sku === variant.sku)\n } else if (Number(item?.excludeProducts?.length) > 0) {\n return !item.excludeProducts?.find(\n (p) => p?.variant?.handle === product.handle && p?.variant?.sku === variant.sku,\n )\n } else {\n return true\n }\n } else {\n return false\n }\n}\n// export const getReferralAttributes = () => {\n// const inviteCode = Cookies.get('invite_code')\n// const playModeId = Cookies.get('playModeId')\n// const popup = Cookies.get('_popup')\n// if (inviteCode && playModeId) {\n// return popup\n// ? [\n// { key: '_invite_code', value: inviteCode ? inviteCode : '' },\n// { key: '_play_mode_id', value: playModeId ? playModeId : '' },\n// { key: '_popup', value: popup },\n// ]\n// : [\n// { key: '_invite_code', value: inviteCode ? inviteCode : '' },\n// { key: '_play_mode_id', value: playModeId ? playModeId : '' },\n// ]\n// }\n// return []\n// }\n\n// export function useH2Toc(htmlContent: string) {\n// const [toc, setToc] = useState<{ updatedHtmlContent: string; dataList: { url: string; text: string }[] }>({\n// updatedHtmlContent: htmlContent,\n// dataList: [],\n// })\n\n// useEffect(() => {\n// if (typeof window === 'undefined' || typeof document === 'undefined') return\n// const div = document.createElement('div')\n// div.innerHTML = htmlContent\n// const h2s = div.querySelectorAll('h2')\n// const dataList: { url: string; text: string }[] = []\n// h2s.forEach((h2, idx) => {\n// const text = (h2.textContent || '').trim()\n// if (!text) return\n// const id = encodeURIComponent(text).replace(/'/g, '&#39;')\n// h2.setAttribute('id', id)\n// dataList.push({ url: id, text })\n// })\n// setToc({ updatedHtmlContent: div.innerHTML, dataList })\n// }, [htmlContent])\n\n// return toc\n// }\n\n// export const isAttributesEqual = (oldAttributes: Attribute[], newAttributes: Attribute[]) => {\n// // \u6BD4\u5BF9\u4E24\u4E2A\u6570\u636E\u662F\u5426\u5B8C\u5168\u76F8\u540C\n// // \u68C0\u67E5\u6570\u7EC4\u957F\u5EA6\u662F\u5426\u76F8\u540C\n// if (oldAttributes?.length !== newAttributes?.length) {\n// return false\n// }\n\n// // \u5C06\u6570\u7EC4\u8F6C\u6362\u4E3A Map \u4EE5\u4FBF\u5FEB\u901F\u67E5\u627E\n// const oldMap = new Map(oldAttributes.map((attr) => [attr.key, attr.value]))\n// const newMap = new Map(newAttributes.map((attr) => [attr.key, attr.value]))\n\n// // \u68C0\u67E5\u6240\u6709 key \u662F\u5426\u90FD\u5B58\u5728\u4E14\u503C\u76F8\u540C\n// for (const [key, value] of newMap) {\n// if (!oldMap.has(key) || oldMap.get(key) !== value) {\n// return false\n// }\n// }\n\n// return true\n// }\n\n// // \u68C0\u67E5\u8F93\u5165\u6846\u4E2D\u7684\u7279\u6B8A\u7B26\u53F7\n// export function validateSpecialCharacters(input: string): { isValid: boolean; invalidChars: string[] } {\n// // \u5B9A\u4E49\u4E0D\u5141\u8BB8\u7684\u7279\u6B8A\u7B26\u53F7\n// const invalidSpecialChars = /[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?`~]/g\n\n// const matches = input.match(invalidSpecialChars)\n// const invalidChars = matches ? [...new Set(matches)] : []\n\n// return {\n// isValid: invalidChars.length === 0,\n// invalidChars,\n// }\n// }\n\n// // \u83B7\u53D6\u7279\u6B8A\u7B26\u53F7\u7684\u9519\u8BEF\u63D0\u793A\u4FE1\u606F\n// export function getSpecialCharErrorMessage(invalidChars: string[]): string {\n// if (invalidChars.length === 0) return ''\n\n// const uniqueChars = [...new Set(invalidChars)]\n// if (uniqueChars.length === 1) {\n// return `\u4E0D\u5141\u8BB8\u4F7F\u7528\u7279\u6B8A\u7B26\u53F7: ${uniqueChars[0]}`\n// } else {\n// return `\u4E0D\u5141\u8BB8\u4F7F\u7528\u4EE5\u4E0B\u7279\u6B8A\u7B26\u53F7: ${uniqueChars.join(', ')}`\n// }\n// }"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,WAAAC,EAAA,iCAAAC,EAAA,oBAAAC,EAAA,mBAAAC,EAAA,yBAAAC,EAAA,wBAAAC,EAAA,WAAAC,EAAA,eAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAGA,IAAAa,EAA8B,oBAgBvB,SAASH,EAAWI,EAA2B,CACpD,OAAKA,EAEI,OAAO,KAAKA,CAAG,EAAE,SAAW,EAFpB,EAInB,CAEO,SAASZ,EAAOa,EAAY,CACjC,OAAIA,GAAM,OAAOA,GAAO,UAAYA,EAAG,SAAS,GAAG,EAC1CA,EAAG,MAAM,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,GAAG,MAAM,EAEvCA,CAEX,CAEO,SAASZ,EAAOY,EAAYC,EAAqC,iBAAkB,CACxF,MAAO,iBAAiBA,CAAI,IAAID,CAAE,EACpC,CAGO,MAAMT,EAAkBW,GACzBA,IAAW,QAAgB,KAC3BA,IAAW,QAAgB,KAC3BA,IAAW,KAAa,KACrBA,EAmCIZ,EAAkB,CAAC,CAAE,QAAAa,CAAQ,IACjCA,GAAS,SAAS,KAAKC,GAAUA,EAAO,gBAAkB,gBAAc,IAAI,EA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ASE,CACxD,CACF,KAEE,QAAOF,EAAQ,KAEnB,CA8BO,MAAMxB,EAA+B,CAAC,CAC3C,QAAAwB,EACA,KAAAK,EACA,QAAAf,CACF,IASMe,EACE,OAAOA,GAAM,aAAa,MAAM,EAAI,EAC/BL,EAAQ,MAAM,KAAMM,GAAQD,GAAM,aAAa,SAASC,CAAG,CAAC,EAC1D,OAAOD,GAAM,iBAAiB,MAAM,EAAI,EAC1CA,EAAK,iBAAiB,KAAME,GAAMA,GAAG,SAAS,SAAWP,EAAQ,QAAUO,GAAG,SAAS,MAAQjB,EAAQ,GAAG,EACxG,OAAOe,GAAM,iBAAiB,MAAM,EAAI,EAC1C,CAACA,EAAK,iBAAiB,KAC3BE,GAAMA,GAAG,SAAS,SAAWP,EAAQ,QAAUO,GAAG,SAAS,MAAQjB,EAAQ,GAC9E,EAEO,GAGF",
4
+ "sourcesContent": ["// \u6539\u7EC4\u4EF6\u5BA2\u6237\u7AEF\u6267\u884C\n// import { SchemaVariant } from '@projectTypes/template'\nimport type { Product, ProductMedia, ProductVariant } from '../types/product'\nimport { CouponChannel } from '../const.js'\n// import Cookies from 'js-cookie'\n// import { Attribute, HasMetafieldsIdentifier } from 'lib/shopify/gql'\n// import { HasMetafieldQueryRoot } from 'lib/shopify/types/fetcher'\n// import { useEffect, useState } from 'react'\n\n// import { PartialRecord } from './type-helper'\n\nexport type SchemaVariant = {\n variant: {\n handle: string\n sku: string\n }\n}\n\n// \u5224\u65AD\u5BF9\u8C61\u662F\u5426\u4E3A\u7A7A\nexport function isObjEmpty(obj?: Record<string, any>) {\n if (!obj) return true\n else {\n return Object.keys(obj).length === 0\n }\n}\n\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\n\nexport function btoaID(id: string, type: 'ProductVariant' | 'Product' = 'ProductVariant') {\n return `gid://shopify/${type}/${id}`\n}\n\n// \u76AE\u80A4\u7AD9\u4E09\u7EA7\u57DF\u540D\nexport const getThemeLocale = (locale: string) => {\n if (locale === 'eu-de') return 'de'\n if (locale === 'eu-en') return 'eu'\n if (locale === 'au') return 'au'\n return locale\n}\n\n/**\n * \u751F\u6210 metafieldIdentifiers \u67E5\u8BE2\u53C2\u6570\n */\n// export function constructMetafieldIdentifiersQueryParams<T extends HasMetafieldQueryRoot>(\n// metafieldIdentifiers: PartialRecord<T, HasMetafieldsIdentifier[]> = {},\n// ): PartialRecord<`${T}MetafieldIdentifiers`, HasMetafieldsIdentifier[]> {\n// const identifiers = Object.entries(metafieldIdentifiers).reduce(\n// (queryInput, [key, value]) => {\n// const metafieldIdentifiers = value as HasMetafieldsIdentifier[]\n// queryInput[`${key}MetafieldIdentifiers`] = metafieldIdentifiers\n// .filter((item) => !item.namespace.startsWith(metafieldNamespacePrefix))\n// .map((item) => ({\n// namespace: `${metafieldNamespacePrefix}combo`,\n// key: item.namespace,\n// }))\n// .concat(metafieldIdentifiers)\n// return queryInput\n// },\n// {} as PartialRecord<`${T}MetafieldIdentifiers`, HasMetafieldsIdentifier[]>,\n// )\n// return identifiers\n// }\n\n// export function cleanShopKey(shop: Shop) {\n// const { privacyPolicy, refundPolicy, shippingPolicy, termsOfService, subscriptionPolicy, ...otherShop } = shop\n// return otherShop\n// }\n\n// export const delHtmlTag = (str?: string) => {\n// return str ? String(str).replace(/<[^>]+>/g, '') : ''\n// }\n\nexport const getNormalCoupon = ({ variant }: { variant?: ProductVariant }) => {\n return variant?.coupons?.find(coupon => coupon.discount_type !== CouponChannel.WSCH)\n}\n\n// export const setCartSecretCookie = ({ cart }) => {\n// const key = cart.id.split('?key=')[1]\n// const id = cart.id.split('?key=')[0].split('gid://shopify/Cart/')[1]\n// Cookies.set(id, key, {\n// Domain: window.location.hostname.split('.').reverse().slice(0, 2).reverse().join('.'),\n// })\n// }\n\n// export const languageCode = (locale: string) =>\n// ({\n// us: 'US',\n// uk: 'GB',\n// ca: 'CA',\n// fr: 'FR',\n// au: 'AU',\n// my: 'MY',\n// vn: 'VN',\n// it: 'IT',\n// de: 'DE',\n// cl: 'CL',\n// })[locale] || 'US'\n\n// shopify \u7684\u7279\u6B8A\u6587\u4EF6\u8F6C\u6362\u89C4\u5219\nconst umlautMap = {\n '\\u00dc': 'U',\n '\\u00c4': 'A',\n '\\u00d6': 'O',\n '\\u00fc': 'u',\n '\\u00e4': 'a',\n '\\u00f6': 'o',\n '\\u00df': 'ss',\n '\\u00E8': 'e',\n}\n\n// \u66FF\u6362\u5B57\u7B26\u4E32\u4E2D\u7684\u7279\u6B8A\u5B57\u7B26\nexport function replaceUmlaut(str: string) {\n return str\n .replace(/[\\u00dc|\\u00c4|\\u00d6][a-z]/g, a => {\n const big = umlautMap[a.slice(0, 1) as keyof typeof umlautMap]\n return big.charAt(0) + big.charAt(1).toLowerCase() + a.slice(1)\n })\n .replace(new RegExp('[' + Object.keys(umlautMap).join('|') + ']', 'g'), a => umlautMap[a as keyof typeof umlautMap])\n}\n\n// \u5C06\u5B57\u7B26\u4E32\u8F6C\u6362\u4E3A slug\nexport function handle(str: string) {\n return replaceUmlaut(str)\n .replace(/ /g, '-')\n .replace(/[^a-zA-Z0-9-]/g, '')\n .toLowerCase()\n}\n\n// get variant image index\nexport function getVariantImageIndex({\n mediaList,\n variant,\n}: {\n variant: ProductVariant\n mediaList: ProductMedia[]\n}): null | number {\n const src = variant?.image?.url\n return src ? mediaList.map(media => media.image?.url).findIndex(imageSrc => imageSrc == src) : null\n}\n\n// get images belong to variant\nexport function getVariantMediaList({ product, variant }: { variant: ProductVariant; product: Product }) {\n const currentVariantImageIndex = getVariantImageIndex({ mediaList: product.media, variant })\n\n if (currentVariantImageIndex !== null) {\n const nextVariantImageIndex =\n product.variants\n .filter(v => variant.id !== v.id)\n .map(v => getVariantImageIndex({ mediaList: product.media, variant: v }))\n .find(index => index !== null && index > currentVariantImageIndex) || -1\n\n // current variant images, if no next variant found, return images from current index to the end\n return product.media.slice(\n currentVariantImageIndex,\n nextVariantImageIndex === -1 ? product.media.length : nextVariantImageIndex\n )\n } else {\n // if no variant image found, return all images\n return product.media\n }\n}\n\n// // \u901A\u8FC7\u9009\u62E9 option \u83B7\u53D6 variant\n// export function getVariantFromSelectedOptions({\n// product,\n// selectedOptions,\n// }: {\n// product: Product\n// selectedOptions: Record<string, string>\n// }) {\n// return product.variants.find((variant) => {\n// return Object.entries(selectedOptions).every(([key, value]) =>\n// variant.options.find((option) => {\n// if (option.__typename === 'MultipleChoiceOption' && option.name === key) {\n// return option.values.find((v) => v.label === value)\n// }\n// }),\n// )\n// })\n// }\n\n// export const getURLParameter = (name, url = window.location.href) => {\n// name = name.replace(/[\\[\\]]/g, '\\\\$&') // \u5C06\u65B9\u62EC\u53F7\u8F6C\u4E49\uFF0C\u4EE5\u4FBF\u5728\u6B63\u5219\u8868\u8FBE\u5F0F\u4E2D\u4F7F\u7528\n// var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)') // \u521B\u5EFA\u5339\u914D\u53C2\u6570\u7684\u6B63\u5219\u8868\u8FBE\u5F0F\n// var results = regex.exec(url) // \u5728URL\u4E2D\u67E5\u627E\u5339\u914D\u7684\u53C2\u6570\n// if (!results) return null // \u5982\u679C\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u53C2\u6570\uFF0C\u5219\u8FD4\u56DEnull\n// if (!results[2]) return '' // \u5982\u679C\u53C2\u6570\u7684\u503C\u4E3A\u7A7A\uFF0C\u5219\u8FD4\u56DE\u7A7A\u5B57\u7B26\u4E32\n// return decodeURIComponent(results[2]) // \u8FD4\u56DE\u89E3\u7801\u540E\u7684\u53C2\u6570\u503C\n// }\n\nexport const checkItemAvailableForProduct = ({\n product,\n item,\n variant,\n}: {\n product: Product\n variant: ProductVariant\n item?: {\n includeTags?: string[]\n includeProducts?: SchemaVariant[]\n excludeProducts?: SchemaVariant[]\n }\n}) => {\n if (item) {\n if (Number(item?.includeTags?.length) > 0) {\n return product.tags?.find(tag => item?.includeTags?.includes(tag))\n } else if (Number(item?.includeProducts?.length) > 0) {\n return item.includeProducts?.find(p => p?.variant?.handle === product.handle && p?.variant?.sku === variant.sku)\n } else if (Number(item?.excludeProducts?.length) > 0) {\n return !item.excludeProducts?.find(p => p?.variant?.handle === product.handle && p?.variant?.sku === variant.sku)\n } else {\n return true\n }\n } else {\n return false\n }\n}\n// export const getReferralAttributes = () => {\n// const inviteCode = Cookies.get('invite_code')\n// const playModeId = Cookies.get('playModeId')\n// const popup = Cookies.get('_popup')\n// if (inviteCode && playModeId) {\n// return popup\n// ? [\n// { key: '_invite_code', value: inviteCode ? inviteCode : '' },\n// { key: '_play_mode_id', value: playModeId ? playModeId : '' },\n// { key: '_popup', value: popup },\n// ]\n// : [\n// { key: '_invite_code', value: inviteCode ? inviteCode : '' },\n// { key: '_play_mode_id', value: playModeId ? playModeId : '' },\n// ]\n// }\n// return []\n// }\n\n// export function useH2Toc(htmlContent: string) {\n// const [toc, setToc] = useState<{ updatedHtmlContent: string; dataList: { url: string; text: string }[] }>({\n// updatedHtmlContent: htmlContent,\n// dataList: [],\n// })\n\n// useEffect(() => {\n// if (typeof window === 'undefined' || typeof document === 'undefined') return\n// const div = document.createElement('div')\n// div.innerHTML = htmlContent\n// const h2s = div.querySelectorAll('h2')\n// const dataList: { url: string; text: string }[] = []\n// h2s.forEach((h2, idx) => {\n// const text = (h2.textContent || '').trim()\n// if (!text) return\n// const id = encodeURIComponent(text).replace(/'/g, '&#39;')\n// h2.setAttribute('id', id)\n// dataList.push({ url: id, text })\n// })\n// setToc({ updatedHtmlContent: div.innerHTML, dataList })\n// }, [htmlContent])\n\n// return toc\n// }\n\n// export const isAttributesEqual = (oldAttributes: Attribute[], newAttributes: Attribute[]) => {\n// // \u6BD4\u5BF9\u4E24\u4E2A\u6570\u636E\u662F\u5426\u5B8C\u5168\u76F8\u540C\n// // \u68C0\u67E5\u6570\u7EC4\u957F\u5EA6\u662F\u5426\u76F8\u540C\n// if (oldAttributes?.length !== newAttributes?.length) {\n// return false\n// }\n\n// // \u5C06\u6570\u7EC4\u8F6C\u6362\u4E3A Map \u4EE5\u4FBF\u5FEB\u901F\u67E5\u627E\n// const oldMap = new Map(oldAttributes.map((attr) => [attr.key, attr.value]))\n// const newMap = new Map(newAttributes.map((attr) => [attr.key, attr.value]))\n\n// // \u68C0\u67E5\u6240\u6709 key \u662F\u5426\u90FD\u5B58\u5728\u4E14\u503C\u76F8\u540C\n// for (const [key, value] of newMap) {\n// if (!oldMap.has(key) || oldMap.get(key) !== value) {\n// return false\n// }\n// }\n\n// return true\n// }\n\n// // \u68C0\u67E5\u8F93\u5165\u6846\u4E2D\u7684\u7279\u6B8A\u7B26\u53F7\n// export function validateSpecialCharacters(input: string): { isValid: boolean; invalidChars: string[] } {\n// // \u5B9A\u4E49\u4E0D\u5141\u8BB8\u7684\u7279\u6B8A\u7B26\u53F7\n// const invalidSpecialChars = /[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?`~]/g\n\n// const matches = input.match(invalidSpecialChars)\n// const invalidChars = matches ? [...new Set(matches)] : []\n\n// return {\n// isValid: invalidChars.length === 0,\n// invalidChars,\n// }\n// }\n\n// // \u83B7\u53D6\u7279\u6B8A\u7B26\u53F7\u7684\u9519\u8BEF\u63D0\u793A\u4FE1\u606F\n// export function getSpecialCharErrorMessage(invalidChars: string[]): string {\n// if (invalidChars.length === 0) return ''\n\n// const uniqueChars = [...new Set(invalidChars)]\n// if (uniqueChars.length === 1) {\n// return `\u4E0D\u5141\u8BB8\u4F7F\u7528\u7279\u6B8A\u7B26\u53F7: ${uniqueChars[0]}`\n// } else {\n// return `\u4E0D\u5141\u8BB8\u4F7F\u7528\u4EE5\u4E0B\u7279\u6B8A\u7B26\u53F7: ${uniqueChars.join(', ')}`\n// }\n// }\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,WAAAC,EAAA,iCAAAC,EAAA,oBAAAC,EAAA,mBAAAC,EAAA,yBAAAC,EAAA,w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oupon", "getThemeLocale", "getVariantImageIndex", "getVariantMediaList", "handle", "isObjEmpty", "replaceUmlaut", "__toCommonJS", "import_const", "obj", "id", "type", "locale", "variant", "coupon", "umlautMap", "str", "a", "big", "mediaList", "src", "media", "imageSrc", "product", "currentVariantImageIndex", "nextVariantImageIndex", "v", "index", "item", "tag", "p"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var n in e)c(r,n,{get:e[n],enumerable:!0})},O=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of b(e))!P.call(r,i)&&i!==n&&c(r,i,{get:()=>e[i],enumerable:!(t=y(e,i))||t.enumerable});return r};var C=r=>O(c({},"__esModule",{value:!0}),r);var $={};v($,{formatPrice:()=>d,formatVariantPrice:()=>x,getFirstAvailableVariant:()=>S,getVariantBySku:()=>k,getVariantFromSelectedOptions:()=>V,languageTerritory:()=>f,optionsConstructor:()=>F});module.exports=C($);var u=require("../const");function F(r){return r.reduce((e,n)=>(e[n.name]=n.values[0].label,e),{})}const S=r=>r.variants.find(e=>e.availableForSale)||r.variants[0],k=(r,e)=>r.variants.find(n=>n.sku===e),f=r=>({us:"en-us",uk:"en-gb",ca:"en-ca",au:"en-au",eu:"en-eu",pl:"pl-pl",fr:"fr-fr",de:"de-de",vn:"vi-vn",sg:"en-sg","ae-en":"en-ae",plus:"en-us",cl:"es-cl",es:"es-es",se:"en-se",dk:"en-dk",is:"en-is",no:"en-no",fi:"en-fi"})[r]||"";function d({amount:r,currencyCode:e,locale:n,maximumFractionDigits:t,minimumFractionDigits:i,removeTrailingZeros:a=!1}){let o=new Intl.NumberFormat(f(n),{style:"currency",currency:e||"USD",minimumFractionDigits:t===0?0:i,maximumFractionDigits:t}).format(r);return["eu-de","eu-en","de","eu"].includes(n)&&(o=o?.toString()?.replace(/[\s]/g,"")),a&&(o=o.replace(/(\.\d*?[1-9])0+\b/,"$1").replace(/\.0+\b/,"").replace(/(\,\d*?[1-9])0+\b/,"$1").replace(/\,0+\b/,"")),o}function x({amount:r,baseAmount:e,currencyCode:n,locale:t,maximumFractionDigits:i,minimumFractionDigits:a,removeTrailingZeros:s}){if(typeof Intl>"u")return{price:`${u.PRICE_SYMBOL[t]}${r}`,basePrice:`${u.PRICE_SYMBOL[t]}${e}`,discount:`${u.PRICE_SYMBOL[t]}${e-r||0}`};const o=e>r,p=new Intl.NumberFormat(f(t),{style:"percent"}),m=o?p.format((e-r)/e):null,l=d({amount:r,currencyCode:n,locale:t,removeTrailingZeros:s}),g=o?d({amount:e,currencyCode:n,locale:t,maximumFractionDigits:i,minimumFractionDigits:a,removeTrailingZeros:s}):void 0;return{price:l,basePrice:g,discount:m}}function V({product:r,selectedOptions:e}){return r.variants.find(n=>Object.entries(e).every(([t,i])=>n.options.find(a=>{if(a.__typename==="MultipleChoiceOption"&&a.name===t)return a.values.find(s=>s.label===i)})))}
1
+ "use strict";var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var n in e)c(r,n,{get:e[n],enumerable:!0})},O=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of b(e))!P.call(r,i)&&i!==n&&c(r,i,{get:()=>e[i],enumerable:!(t=y(e,i))||t.enumerable});return r};var C=r=>O(c({},"__esModule",{value:!0}),r);var $={};v($,{formatPrice:()=>d,formatVariantPrice:()=>x,getFirstAvailableVariant:()=>S,getVariantBySku:()=>k,getVariantFromSelectedOptions:()=>V,languageTerritory:()=>f,optionsConstructor:()=>F});module.exports=C($);var u=require("../const.js");function F(r){return r.reduce((e,n)=>(e[n.name]=n.values[0].label,e),{})}const S=r=>r.variants.find(e=>e.availableForSale)||r.variants[0],k=(r,e)=>r.variants.find(n=>n.sku===e),f=r=>({us:"en-us",uk:"en-gb",ca:"en-ca",au:"en-au",eu:"en-eu",pl:"pl-pl",fr:"fr-fr",de:"de-de",vn:"vi-vn",sg:"en-sg","ae-en":"en-ae",plus:"en-us",cl:"es-cl",es:"es-es",se:"en-se",dk:"en-dk",is:"en-is",no:"en-no",fi:"en-fi"})[r]||"";function d({amount:r,currencyCode:e,locale:n,maximumFractionDigits:t,minimumFractionDigits:i,removeTrailingZeros:a=!1}){let o=new Intl.NumberFormat(f(n),{style:"currency",currency:e||"USD",minimumFractionDigits:t===0?0:i,maximumFractionDigits:t}).format(r);return["eu-de","eu-en","de","eu"].includes(n)&&(o=o?.toString()?.replace(/[\s]/g,"")),a&&(o=o.replace(/(\.\d*?[1-9])0+\b/,"$1").replace(/\.0+\b/,"").replace(/(\,\d*?[1-9])0+\b/,"$1").replace(/\,0+\b/,"")),o}function x({amount:r,baseAmount:e,currencyCode:n,locale:t,maximumFractionDigits:i,minimumFractionDigits:a,removeTrailingZeros:s}){if(typeof Intl>"u")return{price:`${u.PRICE_SYMBOL[t]}${r}`,basePrice:`${u.PRICE_SYMBOL[t]}${e}`,discount:`${u.PRICE_SYMBOL[t]}${e-r||0}`};const o=e>r,p=new Intl.NumberFormat(f(t),{style:"percent"}),m=o?p.format((e-r)/e):null,l=d({amount:r,currencyCode:n,locale:t,removeTrailingZeros:s}),g=o?d({amount:e,currencyCode:n,locale:t,maximumFractionDigits:i,minimumFractionDigits:a,removeTrailingZeros:s}):void 0;return{price:l,basePrice:g,discount:m}}function V({product:r,selectedOptions:e}){return r.variants.find(n=>Object.entries(e).every(([t,i])=>n.options.find(a=>{if(a.__typename==="MultipleChoiceOption"&&a.name===t)return a.values.find(s=>s.label===i)})))}
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/biz-components/Listing/utils/index.ts"],
4
- "sourcesContent": ["import { PRICE_SYMBOL } from '../const'\nimport type { Options, Product, ProductOption, ProductVariant } from '../types/product'\n\nexport function optionsConstructor(options: ProductOption[]): Options {\n return options.reduce((pre: any, cur: any) => {\n pre[cur.name] = cur.values[0].label\n return pre\n }, {})\n}\n\n/**\n * Returns the first available variant of a product.\n * If no variant is available, it returns the first variant in the list.\n *\n * @param product - The product object.\n * @returns The first available variant of the product.\n */\nexport const getFirstAvailableVariant = (product: Product) =>\n product.variants.find((variant: ProductVariant) => variant.availableForSale) || product.variants[0]\n\nexport const getVariantBySku = (product: Product, sku: string) =>\n product.variants.find((variant: ProductVariant) => variant.sku === sku)\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n eu: 'en-eu',\n pl: 'pl-pl',\n fr: 'fr-fr',\n de: 'de-de',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'en-ae',\n plus: 'en-us',\n cl: 'es-cl',\n es: 'es-es',\n // Nordic countries\n se: 'en-se',\n dk: 'en-dk',\n is: 'en-is',\n no: 'en-no',\n fi: 'en-fi',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const formatCurrency = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'currency',\n currency: currencyCode || 'USD',\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency.format(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n // Adjust the regex to match comma as decimal separator\n formattedValue = formattedValue\n .replace(/(\\.\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\.0+\\b/, '')\n .replace(/(\\,\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n const formatDiscount = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'percent',\n })\n const discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount }\n}\n\nexport function getVariantFromSelectedOptions({\n product,\n selectedOptions,\n}: {\n product: Product\n selectedOptions: Record<string, string>\n}) {\n return product.variants.find(variant => {\n return Object.entries(selectedOptions).every(([key, value]) =>\n variant.options.find(option => {\n if (option.__typename === 'MultipleChoiceOption' && option.name === key) {\n return option.values.find(v => v.label === value)\n }\n })\n )\n })\n}"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,uBAAAC,EAAA,6BAAAC,EAAA,oBAAAC,EAAA,kCAAAC,EAAA,sBAAAC,EAAA,uBAAAC,IAAA,eAAAC,EAAAT,GAAA,IAAAU,EAA6B,oBAGtB,SAASF,EAAmBG,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AAAC,EACA,oBAAAC,CACF,EAQG,CACD,GAAI,OAAO,KAAS,IAClB,MAAO,CACL,MAAO,GAAG,eAAaL,CAAmC,CAAC,GAAGC,CAAM,GACpE,UAAW,GAAG,eAAaD,CAAmC,CAAC,GAAGO,CAAU,GAC5E,SAAU,GAAG,eAAaP,CAAmC,CAAC,GAAGO,EAAaN,GAAU,CAAC,EAC3F,EAGF,MAAMO,EAAcD,EAAaN,EAC3BQ,EAAiB,IAAI,KAAK,aAAanB,EAAkBU,CAAM,EAAG,CACtE,MAAO,SACT,CAAC,EACKU,EAAWF,EAAcC,EAAe,QAAQF,EAAaN,GAAUM,CAAU,EAAI,KAErFI,EAAQ1B,EAAY,CAAE,OAAAgB,EAAQ,aAAAC,EAAc,OAAAF,EAAQ,oBAAAK,CAAoB,CAAC,EACzEO,EAAYJ,EACdvB,EAAY,CACV,OAAQsB,EACR,aAAAL,EACA,OAAAF,EACA,sBAAAG,EACA,sBAAAC,EACA,oBAAAC,CACF,CAAC,EACD,OAEJ,MAAO,CAAE,MAAAM,EAAO,UAAAC,EAAW,SAAAF,CAAS,CACtC,CAEO,SAASrB,EAA8B,CAC5C,QAAAQ,EACA,gBAAAgB,CACF,EAGG,CACD,OAAOhB,EAAQ,SAAS,KAAKC,GACpB,OAAO,QAAQe,CAAe,EAAE,MAAM,CAAC,CAACC,EAAKC,CAAK,IACvDjB,EAAQ,QAAQ,KAAKkB,GAAU,CAC7B,GAAIA,EAAO,aAAe,wBAA0BA,EAAO,OAASF,EAClE,OAAOE,EAAO,OAAO,KAAKC,GAAKA,EAAE,QAAUF,CAAK,CAEpD,CAAC,CACH,CACD,CACH",
4
+ "sourcesContent": ["import { PRICE_SYMBOL } from '../const.js'\nimport type { Options, Product, ProductOption, ProductVariant } from '../types/product'\n\nexport function optionsConstructor(options: ProductOption[]): Options {\n return options.reduce((pre: any, cur: any) => {\n pre[cur.name] = cur.values[0].label\n return pre\n }, {})\n}\n\n/**\n * Returns the first available variant of a product.\n * If no variant is available, it returns the first variant in the list.\n *\n * @param product - The product object.\n * @returns The first available variant of the product.\n */\nexport const getFirstAvailableVariant = (product: Product) =>\n product.variants.find((variant: ProductVariant) => variant.availableForSale) || product.variants[0]\n\nexport const getVariantBySku = (product: Product, sku: string) =>\n product.variants.find((variant: ProductVariant) => variant.sku === sku)\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n eu: 'en-eu',\n pl: 'pl-pl',\n fr: 'fr-fr',\n de: 'de-de',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'en-ae',\n plus: 'en-us',\n cl: 'es-cl',\n es: 'es-es',\n // Nordic countries\n se: 'en-se',\n dk: 'en-dk',\n is: 'en-is',\n no: 'en-no',\n fi: 'en-fi',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const formatCurrency = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'currency',\n currency: currencyCode || 'USD',\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency.format(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n // Adjust the regex to match comma as decimal separator\n formattedValue = formattedValue\n .replace(/(\\.\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\.0+\\b/, '')\n // eslint-disable-next-line no-useless-escape\n .replace(/(\\,\\d*?[1-9])0+\\b/, '$1')\n // eslint-disable-next-line no-useless-escape\n .replace(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale as keyof typeof PRICE_SYMBOL]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n const formatDiscount = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'percent',\n })\n const discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount }\n}\n\nexport function getVariantFromSelectedOptions({\n product,\n selectedOptions,\n}: {\n product: Product\n selectedOptions: Record<string, string>\n}) {\n return product.variants.find(variant => {\n return Object.entries(selectedOptions).every(([key, value]) =>\n variant.options.find(option => {\n if (option.__typename === 'MultipleChoiceOption' && option.name === key) {\n return option.values.find(v => v.label === value)\n }\n })\n )\n })\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,uBAAAC,EAAA,6BAAAC,EAAA,oBAAAC,EAAA,kCAAAC,EAAA,sBAAAC,EAAA,uBAAAC,IAAA,eAAAC,EAAAT,GAAA,IAAAU,EAA6B,uBAGtB,SAASF,EAAmBG,EAAmC,CACpE,OAAOA,EAAQ,OAAO,CAACC,EAAUC,KAC/BD,EAAIC,EAA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,CACL,MAAO,GAAG,eAAaL,CAAmC,CAAC,GAAGC,CAAM,GACpE,UAAW,GAAG,eAAaD,CAAmC,CAAC,GAAGO,CAAU,GAC5E,SAAU,GAAG,eAAaP,CAAmC,CAAC,GAAGO,EAAaN,GAAU,CAAC,EAC3F,EAGF,MAAMO,EAAcD,EAAaN,EAC3BQ,EAAiB,IAAI,KAAK,aAAanB,EAAkBU,CAAM,EAAG,CACtE,MAAO,SACT,CAAC,EACKU,EAAWF,EAAcC,EAAe,QAAQF,EAAaN,GAAUM,CAAU,EAAI,KAErFI,EAAQ1B,EAAY,CAAE,OAAAgB,EAAQ,aAAAC,EAAc,OAAAF,EAAQ,oBAAAK,CAAoB,CAAC,EACzEO,EAAYJ,EACdvB,EAAY,CACV,OAAQsB,EACR,aAAAL,EACA,OAAAF,EACA,sBAAAG,EACA,sBAAAC,EACA,oBAAAC,CACF,CAAC,EACD,OAEJ,MAAO,CAAE,MAAAM,EAAO,UAAAC,EAAW,SAAAF,CAAS,CACtC,CAEO,SAASrB,EAA8B,CAC5C,QAAAQ,EACA,gBAAAgB,CACF,EAGG,CACD,OAAOhB,EAAQ,SAAS,KAAKC,GACpB,OAAO,QAAQe,CAAe,EAAE,MAAM,CAAC,CAACC,EAAKC,CAAK,IACvDjB,EAAQ,QAAQ,KAAKkB,GAAU,CAC7B,GAAIA,EAAO,aAAe,wBAA0BA,EAAO,OAASF,EAClE,OAAOE,EAAO,OAAO,KAAKC,GAAKA,EAAE,QAAUF,CAAK,CAEpD,CAAC,CACH,CACD,CACH",
6
6
  "names": ["utils_exports", "__export", "formatPrice", "formatVariantPrice", "getFirstAvailableVariant", "getVariantBySku", "getVariantFromSelectedOptions", "languageTerritory", "optionsConstructor", "__toCommonJS", "import_const", "options", "pre", "cur", "product", "variant", "sku", "locale", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "formattedValue", "baseAmount", "hasDiscount", "formatDiscount", "discount", "price", "basePrice", "selectedOptions", "key", "value", "option", "v"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/biz-components/Listing/utils/textFormat.ts"],
4
- "sourcesContent": ["/**\n * \u5B57\u7B26\u4E32\u6A21\u677F\u66FF\u6362\u5DE5\u5177\u51FD\u6570\n * \u4F7F\u7528\u5355\u6B21\u904D\u5386\u548C\u6B63\u5219\u8868\u8FBE\u5F0F\u7F13\u5B58\u6765\u63D0\u9AD8\u6027\u80FD\n */\n\ntype ReplacementMap = Record<string, string>\n\n// \u7F13\u5B58\u6B63\u5219\u8868\u8FBE\u5F0F\u4EE5\u63D0\u9AD8\u6027\u80FD\nconst regexCache = new Map<string, RegExp>()\n\n/**\n * \u8F6C\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F\u7279\u6B8A\u5B57\u7B26\n * @param str \u9700\u8981\u8F6C\u4E49\u7684\u5B57\u7B26\u4E32\n * @returns \u8F6C\u4E49\u540E\u7684\u5B57\u7B26\u4E32\n */\nfunction escapeRegExp(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\n/**\n * \u83B7\u53D6\u6216\u521B\u5EFA\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08\u5E26\u7F13\u5B58\uFF09\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u5982 \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u5982 \"}\"\n * @returns \u7F16\u8BD1\u540E\u7684\u6B63\u5219\u8868\u8FBE\u5F0F\n */\nfunction getRegex(beginSeg: string, endSeg: string): RegExp {\n const cacheKey = `${beginSeg}|${endSeg}`\n\n if (regexCache.has(cacheKey)) {\n return regexCache.get(cacheKey)!\n }\n\n // \u8F6C\u4E49\u7279\u6B8A\u5B57\u7B26\uFF0C\u6784\u5EFA\u6B63\u5219\u8868\u8FBE\u5F0F\n // \u5339\u914D beginSeg + key + endSeg\uFF0Ckey \u53EF\u4EE5\u662F\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u8FDE\u5B57\u7B26\n const escapedBegin = escapeRegExp(beginSeg)\n const escapedEnd = escapeRegExp(endSeg)\n const regex = new RegExp(`${escapedBegin}([a-zA-Z0-9_-]+)${escapedEnd}`, 'g')\n\n regexCache.set(cacheKey, regex)\n return regex\n}\n\n/**\n * \u5B57\u7B26\u4E32\u6A21\u677F\u66FF\u6362\u51FD\u6570\n * @param template \u6A21\u677F\u5B57\u7B26\u4E32\uFF0C\u5982 \"Hello {name}, you have {count} messages\"\n * @param replacements \u66FF\u6362\u5BF9\u8C61\uFF0C\u5982 { name: \"John\", count: \"5\" }\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"}\"\n * @returns \u66FF\u6362\u540E\u7684\u5B57\u7B26\u4E32\n *\n * @example\n * ```ts\n * replaceTemplate(\"Hello {name}!\", { name: \"World\" })\n * // => \"Hello World!\"\n *\n * replaceTemplate(\"Price: {{amount}}\", { amount: \"$100\" }, \"{{\", \"}}\")\n * // => \"Price: $100\"\n *\n * replaceTemplate(\"You have {count} items\", { count: \"5\", unused: \"test\" })\n * // => \"You have 5 items\" (unused \u952E\u4F1A\u88AB\u5FFD\u7565)\n *\n * replaceTemplate(\"Hello ${name}!\", { name: \"World\" }, \"${\", \"}\")\n * // => \"Hello World!\"\n * ```\n */\nexport function replaceTemplate(\n template: string,\n replacements: ReplacementMap,\n beginSeg: string = '{',\n endSeg: string = '}',\n): string {\n if (!template) return template\n if (!replacements || Object.keys(replacements).length === 0) return template\n\n const regex = getRegex(beginSeg, endSeg)\n\n // \u4F7F\u7528 replace \u65B9\u6CD5\u8FDB\u884C\u66FF\u6362\uFF0C\u6027\u80FD\u4F18\u4E8E\u624B\u52A8\u904D\u5386\n return template.replace(regex, (match, key) => {\n // \u5982\u679C key \u5B58\u5728\u4E8E replacements \u4E2D\uFF0C\u5219\u8FD4\u56DE\u5BF9\u5E94\u7684\u503C\n // \u5426\u5219\u4FDD\u6301\u539F\u6837\uFF08\u8FD4\u56DE\u6574\u4E2A\u5339\u914D\u5185\u5BB9\uFF09\n return replacements[key] !== undefined ? replacements[key] : match\n })\n}\n\n/**\n * \u6279\u91CF\u5B57\u7B26\u4E32\u6A21\u677F\u66FF\u6362\u51FD\u6570\uFF08\u7528\u4E8E\u4E00\u6B21\u6027\u66FF\u6362\u591A\u4E2A\u6A21\u677F\uFF09\n * @param templates \u6A21\u677F\u5B57\u7B26\u4E32\u6570\u7EC4\n * @param replacements \u66FF\u6362\u5BF9\u8C61\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"}\"\n * @returns \u66FF\u6362\u540E\u7684\u5B57\u7B26\u4E32\u6570\u7EC4\n *\n * @example\n * ```ts\n * replaceTemplates(\n * [\"Hello {name}!\", \"You have {count} items\"],\n * { name: \"John\", count: \"5\" }\n * )\n * // => [\"Hello John!\", \"You have 5 items\"]\n *\n * replaceTemplates(\n * [\"Hello {{name}}!\", \"Price: {{amount}}\"],\n * { name: \"John\", amount: \"$100\" },\n * \"{{\",\n * \"}}\"\n * )\n * // => [\"Hello John!\", \"Price: $100\"]\n * ```\n */\nexport function replaceTemplates(\n templates: string[],\n replacements: ReplacementMap,\n beginSeg: string = '{',\n endSeg: string = '}',\n): string[] {\n return templates.map((template) => replaceTemplate(template, replacements, beginSeg, endSeg))\n}\n\n/**\n * \u4ECE\u6A21\u677F\u5B57\u7B26\u4E32\u4E2D\u63D0\u53D6\u6240\u6709\u5360\u4F4D\u7B26\u952E\u540D\n * @param template \u6A21\u677F\u5B57\u7B26\u4E32\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"}\"\n * @returns \u5360\u4F4D\u7B26\u952E\u540D\u6570\u7EC4\uFF08\u53BB\u91CD\uFF09\n *\n * @example\n * ```ts\n * extractPlaceholders(\"Hello {name}, you have {count} new {count} messages\")\n * // => [\"name\", \"count\"]\n *\n * extractPlaceholders(\"Hello {{name}}, price is {{amount}}\", \"{{\", \"}}\")\n * // => [\"name\", \"amount\"]\n * ```\n */\nexport function extractPlaceholders(template: string, beginSeg: string = '{', endSeg: string = '}'): string[] {\n if (!template) return []\n\n const regex = getRegex(beginSeg, endSeg)\n const keys = new Set<string>()\n let match: RegExpExecArray | null\n\n // \u4F7F\u7528 exec \u5FAA\u73AF\u66FF\u4EE3 matchAll \u4EE5\u4FDD\u8BC1\u517C\u5BB9\u6027\n while ((match = regex.exec(template)) !== null) {\n keys.add(match[1])\n }\n\n return Array.from(keys)\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,oBAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAAL,GAQA,MAAMM,EAAa,IAAI,IAOvB,SAASC,EAAaC,EAAqB,CACzC,OAAOA,EAAI,QAAQ,sBAAuB,MAAM,CAClD,CAQA,SAASC,EAASC,EAAkBC,EAAwB,CAC1D,MAAMC,EAAW,GAAGF,CAAQ,IAAIC,CAAM,GAEtC,GAAIL,EAAW,IAAIM,CAAQ,EACzB,OAAON,EAAW,IAAIM,CAAQ,EAKhC,MAAMC,EAAeN,EAAaG,CAAQ,EACpCI,EAAaP,EAAaI,CAAM,EAChCI,EAAQ,IAAI,OAAO,GAAGF,CAAY,mBAAmBC,CAAU,GAAI,GAAG,EAE5E,OAAAR,EAAW,IAAIM,EAAUG,CAAK,EACvBA,CACT,CAyBO,SAASZ,EACda,EACAC,EACAP,EAAmB,IACnBC,EAAiB,IACT,CAER,GADI,CAACK,GACD,CAACC,GAAgB,OAAO,KAAKA,CAAY,EAAE,SAAW,EAAG,OAAOD,EAEpE,MAAMD,EAAQN,EAASC,EAAUC,CAAM,EAGvC,OAAOK,EAAS,QAAQD,EAAO,CAACG,EAAOC,IAG9BF,EAAaE,CAAG,IAAM,OAAYF,EAAaE,CAAG,EAAID,CAC9D,CACH,CA2BO,SAASd,EACdgB,EACAH,EACAP,EAAmB,IACnBC,EAAiB,IACP,CACV,OAAOS,EAAU,IAAKJ,GAAab,EAAgBa,EAAUC,EAAcP,EAAUC,CAAM,CAAC,CAC9F,CAkBO,SAAST,EAAoBc,EAAkBN,EAAmB,IAAKC,EAAiB,IAAe,CAC5G,GAAI,CAACK,EAAU,MAAO,CAAC,EAEvB,MAAMD,EAAQN,EAASC,EAAUC,CAAM,EACjCU,EAAO,IAAI,IACjB,IAAIH,EAGJ,MAAQA,EAAQH,EAAM,KAAKC,CAAQ,KAAO,MACxCK,EAAK,IAAIH,EAAM,CAAC,CAAC,EAGnB,OAAO,MAAM,KAAKG,CAAI,CACxB",
4
+ "sourcesContent": ["/**\n * \u5B57\u7B26\u4E32\u6A21\u677F\u66FF\u6362\u5DE5\u5177\u51FD\u6570\n * \u4F7F\u7528\u5355\u6B21\u904D\u5386\u548C\u6B63\u5219\u8868\u8FBE\u5F0F\u7F13\u5B58\u6765\u63D0\u9AD8\u6027\u80FD\n */\n\ntype ReplacementMap = Record<string, string>\n\n// \u7F13\u5B58\u6B63\u5219\u8868\u8FBE\u5F0F\u4EE5\u63D0\u9AD8\u6027\u80FD\nconst regexCache = new Map<string, RegExp>()\n\n/**\n * \u8F6C\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F\u7279\u6B8A\u5B57\u7B26\n * @param str \u9700\u8981\u8F6C\u4E49\u7684\u5B57\u7B26\u4E32\n * @returns \u8F6C\u4E49\u540E\u7684\u5B57\u7B26\u4E32\n */\nfunction escapeRegExp(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\n/**\n * \u83B7\u53D6\u6216\u521B\u5EFA\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08\u5E26\u7F13\u5B58\uFF09\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u5982 \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u5982 \"}\"\n * @returns \u7F16\u8BD1\u540E\u7684\u6B63\u5219\u8868\u8FBE\u5F0F\n */\nfunction getRegex(beginSeg: string, endSeg: string): RegExp {\n const cacheKey = `${beginSeg}|${endSeg}`\n\n if (regexCache.has(cacheKey)) {\n return regexCache.get(cacheKey)!\n }\n\n // \u8F6C\u4E49\u7279\u6B8A\u5B57\u7B26\uFF0C\u6784\u5EFA\u6B63\u5219\u8868\u8FBE\u5F0F\n // \u5339\u914D beginSeg + key + endSeg\uFF0Ckey \u53EF\u4EE5\u662F\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u8FDE\u5B57\u7B26\n const escapedBegin = escapeRegExp(beginSeg)\n const escapedEnd = escapeRegExp(endSeg)\n const regex = new RegExp(`${escapedBegin}([a-zA-Z0-9_-]+)${escapedEnd}`, 'g')\n\n regexCache.set(cacheKey, regex)\n return regex\n}\n\n/**\n * \u5B57\u7B26\u4E32\u6A21\u677F\u66FF\u6362\u51FD\u6570\n * @param template \u6A21\u677F\u5B57\u7B26\u4E32\uFF0C\u5982 \"Hello {name}, you have {count} messages\"\n * @param replacements \u66FF\u6362\u5BF9\u8C61\uFF0C\u5982 { name: \"John\", count: \"5\" }\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"}\"\n * @returns \u66FF\u6362\u540E\u7684\u5B57\u7B26\u4E32\n *\n * @example\n * ```ts\n * replaceTemplate(\"Hello {name}!\", { name: \"World\" })\n * // => \"Hello World!\"\n *\n * replaceTemplate(\"Price: {{amount}}\", { amount: \"$100\" }, \"{{\", \"}}\")\n * // => \"Price: $100\"\n *\n * replaceTemplate(\"You have {count} items\", { count: \"5\", unused: \"test\" })\n * // => \"You have 5 items\" (unused \u952E\u4F1A\u88AB\u5FFD\u7565)\n *\n * replaceTemplate(\"Hello ${name}!\", { name: \"World\" }, \"${\", \"}\")\n * // => \"Hello World!\"\n * ```\n */\nexport function replaceTemplate(\n template: string,\n replacements: ReplacementMap,\n beginSeg: string = '{',\n endSeg: string = '}'\n): string {\n if (!template) return template\n if (!replacements || Object.keys(replacements).length === 0) return template\n\n const regex = getRegex(beginSeg, endSeg)\n\n // \u4F7F\u7528 replace \u65B9\u6CD5\u8FDB\u884C\u66FF\u6362\uFF0C\u6027\u80FD\u4F18\u4E8E\u624B\u52A8\u904D\u5386\n return template.replace(regex, (match, key) => {\n // \u5982\u679C key \u5B58\u5728\u4E8E replacements \u4E2D\uFF0C\u5219\u8FD4\u56DE\u5BF9\u5E94\u7684\u503C\n // \u5426\u5219\u4FDD\u6301\u539F\u6837\uFF08\u8FD4\u56DE\u6574\u4E2A\u5339\u914D\u5185\u5BB9\uFF09\n return replacements[key] !== undefined ? replacements[key] : match\n })\n}\n\n/**\n * \u6279\u91CF\u5B57\u7B26\u4E32\u6A21\u677F\u66FF\u6362\u51FD\u6570\uFF08\u7528\u4E8E\u4E00\u6B21\u6027\u66FF\u6362\u591A\u4E2A\u6A21\u677F\uFF09\n * @param templates \u6A21\u677F\u5B57\u7B26\u4E32\u6570\u7EC4\n * @param replacements \u66FF\u6362\u5BF9\u8C61\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"}\"\n * @returns \u66FF\u6362\u540E\u7684\u5B57\u7B26\u4E32\u6570\u7EC4\n *\n * @example\n * ```ts\n * replaceTemplates(\n * [\"Hello {name}!\", \"You have {count} items\"],\n * { name: \"John\", count: \"5\" }\n * )\n * // => [\"Hello John!\", \"You have 5 items\"]\n *\n * replaceTemplates(\n * [\"Hello {{name}}!\", \"Price: {{amount}}\"],\n * { name: \"John\", amount: \"$100\" },\n * \"{{\",\n * \"}}\"\n * )\n * // => [\"Hello John!\", \"Price: $100\"]\n * ```\n */\nexport function replaceTemplates(\n templates: string[],\n replacements: ReplacementMap,\n beginSeg: string = '{',\n endSeg: string = '}'\n): string[] {\n return templates.map(template => replaceTemplate(template, replacements, beginSeg, endSeg))\n}\n\n/**\n * \u4ECE\u6A21\u677F\u5B57\u7B26\u4E32\u4E2D\u63D0\u53D6\u6240\u6709\u5360\u4F4D\u7B26\u952E\u540D\n * @param template \u6A21\u677F\u5B57\u7B26\u4E32\n * @param beginSeg \u5360\u4F4D\u7B26\u5F00\u59CB\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"{\"\n * @param endSeg \u5360\u4F4D\u7B26\u7ED3\u675F\u7B26\u53F7\uFF0C\u9ED8\u8BA4\u4E3A \"}\"\n * @returns \u5360\u4F4D\u7B26\u952E\u540D\u6570\u7EC4\uFF08\u53BB\u91CD\uFF09\n *\n * @example\n * ```ts\n * extractPlaceholders(\"Hello {name}, you have {count} new {count} messages\")\n * // => [\"name\", \"count\"]\n *\n * extractPlaceholders(\"Hello {{name}}, price is {{amount}}\", \"{{\", \"}}\")\n * // => [\"name\", \"amount\"]\n * ```\n */\nexport function extractPlaceholders(template: string, beginSeg: string = '{', endSeg: string = '}'): string[] {\n if (!template) return []\n\n const regex = getRegex(beginSeg, endSeg)\n const keys = new Set<string>()\n let match: RegExpExecArray | null\n\n // \u4F7F\u7528 exec \u5FAA\u73AF\u66FF\u4EE3 matchAll \u4EE5\u4FDD\u8BC1\u517C\u5BB9\u6027\n while ((match = regex.exec(template)) !== null) {\n keys.add(match[1])\n }\n\n return Array.from(keys)\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,oBAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAAL,GAQA,MAAMM,EAAa,IAAI,IAOvB,SAASC,EAAaC,EAAqB,CACzC,OAAOA,EAAI,QAAQ,sBAAuB,MAAM,CAClD,CAQA,SAASC,EAASC,EAAkBC,EAAwB,CAC1D,MAAMC,EAAW,GAAGF,CAAQ,IAAIC,CAAM,GAEtC,GAAIL,EAAW,IAAIM,CAAQ,EACzB,OAAON,EAAW,IAAIM,CAAQ,EAKhC,MAAMC,EAAeN,EAAaG,CAAQ,EACpCI,EAAaP,EAAaI,CAAM,EAChCI,EAAQ,IAAI,OAAO,GAAGF,CAAY,mBAAmBC,CAAU,GAAI,GAAG,EAE5E,OAAAR,EAAW,IAAIM,EAAUG,CAAK,EACvBA,CACT,CAyBO,SAASZ,EACda,EACAC,EACAP,EAAmB,IACnBC,EAAiB,IACT,CAER,GADI,CAACK,GACD,CAACC,GAAgB,OAAO,KAAKA,CAAY,EAAE,SAAW,EAAG,OAAOD,EAEpE,MAAMD,EAAQN,EAASC,EAAUC,CAAM,EAGvC,OAAOK,EAAS,QAAQD,EAAO,CAACG,EAAOC,IAG9BF,EAAaE,CAAG,IAAM,OAAYF,EAAaE,CAAG,EAAID,CAC9D,CACH,CA2BO,SAASd,EACdgB,EACAH,EACAP,EAAmB,IACnBC,EAAiB,IACP,CACV,OAAOS,EAAU,IAAIJ,GAAYb,EAAgBa,EAAUC,EAAcP,EAAUC,CAAM,CAAC,CAC5F,CAkBO,SAAST,EAAoBc,EAAkBN,EAAmB,IAAKC,EAAiB,IAAe,CAC5G,GAAI,CAACK,EAAU,MAAO,CAAC,EAEvB,MAAMD,EAAQN,EAASC,EAAUC,CAAM,EACjCU,EAAO,IAAI,IACjB,IAAIH,EAGJ,MAAQA,EAAQH,EAAM,KAAKC,CAAQ,KAAO,MACxCK,EAAK,IAAIH,EAAM,CAAC,CAAC,EAGnB,OAAO,MAAM,KAAKG,CAAI,CACxB",
6
6
  "names": ["textFormat_exports", "__export", "extractPlaceholders", "replaceTemplate", "replaceTemplates", "__toCommonJS", "regexCache", "escapeRegExp", "str", "getRegex", "beginSeg", "endSeg", "cacheKey", "escapedBegin", "escapedEnd", "regex", "template", "replacements", "match", "key", "templates", "keys"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var oe=Object.create;var y=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var le=Object.getPrototypeOf,ce=Object.prototype.hasOwnProperty;var de=(r,s)=>{for(var t in s)y(r,t,{get:s[t],enumerable:!0})},S=(r,s,t,n)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of ie(s))!ce.call(r,o)&&o!==t&&y(r,o,{get:()=>s[o],enumerable:!(n=ne(s,o))||n.enumerable});return r};var i=(r,s,t)=>(t=r!=null?oe(le(r)):{},S(s||!r||!r.__esModule?y(t,"default",{value:r,enumerable:!0}):t,r)),pe=r=>S(y({},"__esModule",{value:!0}),r);var ye={};de(ye,{default:()=>fe});module.exports=pe(ye);var e=require("react/jsx-runtime"),a=i(require("react")),L=require("es-toolkit"),P=require("react-intersection-observer"),m=require("../../helpers/utils.js"),$=require("../../shared/Styles.js"),B=i(require("../Slogan/index.js")),Y=require("../VideoModal/YouTubePlayer.js"),c=require("../../components/gird.js"),q=require("../../components/container.js"),F=i(require("../BrandEquity/index.js")),I=i(require("../MemberEquity/index.js")),j=i(require("../Spacer/index.js")),G=i(require("gsap")),x=require("@payloadcms/richtext-lexical/html"),N=require("react-responsive"),V=i(require("../../helpers/ScrollLoadVideo.js"));const T=({defaultConverters:r})=>({...r,text:s=>{const{node:t}=s;return t.$&&t.$.color?`<span class="lexical-${t.$.color}">${t.text}</span>`:t.text}}),h=({children:r,spaceY:s,className:t})=>{const n=(0,N.useMediaQuery)({query:"(max-width: 768px)"});return(0,e.jsx)(q.Container,{spaceY:s,className:(0,m.cn)("!bg-transparent",t),children:(0,e.jsxs)(c.Grid,{children:[!n&&(0,e.jsx)(c.GridItem,{span:1}),(0,e.jsx)(c.GridItem,{span:n?12:10,children:r}),!n&&(0,e.jsx)(c.GridItem,{span:1})]})})},me=a.default.forwardRef(({children:r,id:s,components:t})=>{const n=(0,a.useRef)(null);return(0,e.jsxs)("div",{ref:n,className:"relative z-10",children:[(0,e.jsx)(e.Fragment,{children:r}),(0,e.jsx)(e.Fragment,{children:t?.map(o=>{switch(o.blockType){case"ipc-brand-equity":return(0,e.jsx)("div",{className:"relative z-20 bg-transparent",children:(0,e.jsx)(h,{spaceY:"none",children:(0,e.jsx)(F.default,{data:o,style:o?.style})})});case"ipc-member-equity":return(0,e.jsx)("div",{className:"relative z-20 w-full bg-transparent",children:(0,e.jsx)(h,{spaceY:"none",children:(0,e.jsx)(I.default,{data:o,className:"w-full",style:o?.style})})});case"ipc-spacer":return(0,e.jsx)(j.default,{data:o,style:o?.style,className:"!bg-transparent"});default:return null}})})]})}),ue=(0,a.forwardRef)(({className:r="",wrapperClassName:s="",id:t,data:{title:n,videoTitle:o,mobVideo:k,mobImg:u,img:f,isYouTube:Q,youtubePcId:M,youtubeMobileId:O,video:v,theme:R,shape:W,components:_}})=>{const H=(0,a.useRef)(null),b=(0,a.useRef)(null),{ref:A,inView:d}=(0,P.useInView)(),[ve,J]=(0,a.useState)(0),[z,K]=(0,a.useState)(!1),[U,X]=(0,a.useState)(!1),Z=(0,a.useRef)(null),D=typeof n=="string"?n:n&&(0,x.convertLexicalToHTML)({data:n,converters:T});typeof o=="string"||o&&(0,x.convertLexicalToHTML)({data:o,converters:T});const[ee,te]=(0,a.useState)(0),[l,re]=(0,a.useState)(!1),C=(0,N.useMediaQuery)({query:"(max-width: 768px)"});(0,a.useEffect)(()=>{re(C)},[C]);const w=(0,L.debounce)(()=>{if(b.current){const g=b.current.getBoundingClientRect(),p=l?window.screen.height:window.innerHeight,ae=window.scrollY||window.pageYOffset,se=g.bottom+ae,E=document.documentElement.scrollHeight-se;te(E>p?p:E),J(p)}},2e3);return(0,a.useEffect)(()=>{d&&!z&&(H.current?.play(),K(!0))},[d,z]),(0,a.useEffect)(()=>(w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}),[]),(0,a.useEffect)(()=>{function g(){const p=l?window.screen.height:window.innerHeight;G.default.timeline({scrollTrigger:{trigger:`#${t}`,start:"top top",end:`top+=${p*1.8}px bottom`,scrub:.5}}).from(`#${t} .media-content`,{top:"50%",transform:"translate(-50%, -50%)"}).to(`.${t} .sticky-cover`,{backdropFilter:"blur(8px)",duration:.4}).to(`#${t} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")}d&&g()},[d]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{id:t,className:(0,m.cn)("relative z-20 h-screen w-full",r,{"aiui-dark":R==="dark","rounded-box":W==="rounded"}),ref:Z,children:(0,e.jsx)("div",{ref:A,className:"media-content translate-z-0 absolute left-1/2 top-1/2 z-10 w-full -translate-x-1/2 -translate-y-1/2 antialiased",style:{willChange:"transform",contain:"paint"},children:(0,e.jsx)(h,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:(0,e.jsx)(B.default,{className:"sticky-title antialiased",data:{title:D||"",theme:R}})})})}),(0,e.jsxs)("div",{ref:b,style:{marginBottom:`-${ee}px`,zIndex:d?2:1},className:(0,m.cn)(t,"relative mt-[-200vh]",s),children:[(0,e.jsx)("div",{className:"sticky top-0 ",children:(0,e.jsxs)("div",{className:(0,m.cn)("media-cover","relative h-screen w-full"),children:[Q?(0,e.jsx)(Y.YouTubePlayer,{youTubeId:l&&O||M}):v?.url&&(0,e.jsx)(V.default,{videoRef:H,poster:l&&u?.url?u?.url:f?.url,src:l&&k?.url?k?.url:v?.url,className:"lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]",videoClassName:" object-cover object-[82%]",muted:!0,loop:!1,playsInline:!0,onEnded:()=>{X(!0)}}),f?.url&&(!v?.url||U)&&(0,e.jsx)("img",{src:l&&u?.url?u?.url:f?.url,alt:f?.alt,className:"z-1 absolute left-0 top-0 size-full object-cover object-[82%]"}),(0,e.jsx)("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full",style:{backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)",willChange:"backdrop-filter"}})]})}),(0,e.jsx)("div",{className:"relative h-screen w-full"}),(0,e.jsx)(me,{components:_}),(0,e.jsx)("div",{className:"relative h-screen w-full"})]})]})});var fe=(0,$.withLayout)(ue);
1
+ "use strict";"use client";var oe=Object.create;var v=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var le=Object.getPrototypeOf,ce=Object.prototype.hasOwnProperty;var de=(r,s)=>{for(var t in s)v(r,t,{get:s[t],enumerable:!0})},S=(r,s,t,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of ie(s))!ce.call(r,n)&&n!==t&&v(r,n,{get:()=>s[n],enumerable:!(o=ne(s,n))||o.enumerable});return r};var l=(r,s,t)=>(t=r!=null?oe(le(r)):{},S(s||!r||!r.__esModule?v(t,"default",{value:r,enumerable:!0}):t,r)),pe=r=>S(v({},"__esModule",{value:!0}),r);var ye={};de(ye,{default:()=>fe});module.exports=pe(ye);var e=require("react/jsx-runtime"),a=l(require("react")),L=require("es-toolkit"),P=require("react-intersection-observer"),u=require("../../helpers/utils.js"),$=require("../../shared/Styles.js"),B=l(require("../Slogan/index.js")),Y=require("../VideoModal/YouTubePlayer.js"),d=require("../../components/gird.js"),q=require("../../components/container.js"),F=l(require("../BrandEquity/index.js")),I=l(require("../MemberEquity/index.js")),j=l(require("../Spacer/index.js")),G=l(require("gsap")),N=require("@payloadcms/richtext-lexical/html"),k=require("react-responsive"),V=l(require("../../helpers/ScrollLoadVideo.js"));const T=({defaultConverters:r})=>({...r,text:s=>{const{node:t}=s;return t.$&&t.$.color?`<span class="lexical-${t.$.color}">${t.text}</span>`:t.text}}),x=({children:r,spaceY:s,className:t})=>{const o=(0,k.useMediaQuery)({query:"(max-width: 768px)"});return(0,e.jsx)(q.Container,{spaceY:s,className:(0,u.cn)("!bg-transparent",t),children:(0,e.jsxs)(d.Grid,{children:[!o&&(0,e.jsx)(d.GridItem,{span:1}),(0,e.jsx)(d.GridItem,{span:o?12:10,children:r}),!o&&(0,e.jsx)(d.GridItem,{span:1})]})})},me=a.default.forwardRef(({children:r,id:s,components:t},o)=>{const n=(0,a.useRef)(null);return(0,e.jsxs)("div",{ref:n,className:"relative z-10",children:[(0,e.jsx)(e.Fragment,{children:r}),(0,e.jsx)(e.Fragment,{children:t?.map(i=>{switch(i.blockType){case"ipc-brand-equity":return(0,e.jsx)("div",{className:"relative z-20 bg-transparent",children:(0,e.jsx)(x,{spaceY:"none",children:(0,e.jsx)(F.default,{data:i,style:i?.style})})});case"ipc-member-equity":return(0,e.jsx)("div",{className:"relative z-20 w-full bg-transparent",children:(0,e.jsx)(x,{spaceY:"none",children:(0,e.jsx)(I.default,{data:i,className:"w-full",style:i?.style})})});case"ipc-spacer":return(0,e.jsx)(j.default,{data:i,style:i?.style,className:"!bg-transparent"});default:return null}})})]})}),ue=(0,a.forwardRef)(({className:r="",wrapperClassName:s="",id:t,data:{title:o,videoTitle:n,mobVideo:i,mobImg:f,img:y,isYouTube:Q,youtubePcId:M,youtubeMobileId:O,video:b,theme:R,shape:W,components:_}},ve)=>{const H=(0,a.useRef)(null),w=(0,a.useRef)(null),{ref:A,inView:p}=(0,P.useInView)(),[be,J]=(0,a.useState)(0),[z,K]=(0,a.useState)(!1),[U,X]=(0,a.useState)(!1),Z=(0,a.useRef)(null),D=typeof o=="string"?o:o&&(0,N.convertLexicalToHTML)({data:o,converters:T});typeof n=="string"||n&&(0,N.convertLexicalToHTML)({data:n,converters:T});const[ee,te]=(0,a.useState)(0),[c,re]=(0,a.useState)(!1),C=(0,k.useMediaQuery)({query:"(max-width: 768px)"});(0,a.useEffect)(()=>{re(C)},[C]);const g=(0,L.debounce)(()=>{if(w.current){const h=w.current.getBoundingClientRect(),m=c?window.screen.height:window.innerHeight,ae=window.scrollY||window.pageYOffset,se=h.bottom+ae,E=document.documentElement.scrollHeight-se;te(E>m?m:E),J(m)}},2e3);return(0,a.useEffect)(()=>{p&&!z&&(H.current?.play(),K(!0))},[p,z]),(0,a.useEffect)(()=>(g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}),[]),(0,a.useEffect)(()=>{function h(){const m=c?window.screen.height:window.innerHeight;G.default.timeline({scrollTrigger:{trigger:`#${t}`,start:"top top",end:`top+=${m*1.8}px bottom`,scrub:.5}}).from(`#${t} .media-content`,{top:"50%",transform:"translate(-50%, -50%)"}).to(`.${t} .sticky-cover`,{backdropFilter:"blur(8px)",duration:.4}).to(`#${t} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")}p&&h()},[p]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{id:t,className:(0,u.cn)("relative z-20 h-screen w-full",r,{"aiui-dark":R==="dark","rounded-box":W==="rounded"}),ref:Z,children:(0,e.jsx)("div",{ref:A,className:"media-content translate-z-0 absolute left-1/2 top-1/2 z-10 w-full -translate-x-1/2 -translate-y-1/2 antialiased",style:{willChange:"transform",contain:"paint"},children:(0,e.jsx)(x,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:(0,e.jsx)(B.default,{className:"sticky-title antialiased",data:{title:D||"",theme:R}})})})}),(0,e.jsxs)("div",{ref:w,style:{marginBottom:`-${ee}px`,zIndex:p?2:1},className:(0,u.cn)(t,"relative mt-[-200vh]",s),children:[(0,e.jsx)("div",{className:"sticky top-0 ",children:(0,e.jsxs)("div",{className:(0,u.cn)("media-cover","relative h-screen w-full"),children:[Q?(0,e.jsx)(Y.YouTubePlayer,{youTubeId:c&&O||M}):b?.url&&(0,e.jsx)(V.default,{videoRef:H,poster:c&&f?.url?f?.url:y?.url,src:c&&i?.url?i?.url:b?.url,className:"lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]",videoClassName:" object-cover object-[82%]",muted:!0,loop:!1,playsInline:!0,onEnded:()=>{X(!0)}}),y?.url&&(!b?.url||U)&&(0,e.jsx)("img",{src:c&&f?.url?f?.url:y?.url,alt:y?.alt,className:"z-1 absolute left-0 top-0 size-full object-cover object-[82%]"}),(0,e.jsx)("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full",style:{backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)",willChange:"backdrop-filter"}})]})}),(0,e.jsx)("div",{className:"relative h-screen w-full"}),(0,e.jsx)(me,{components:_}),(0,e.jsx)("div",{className:"relative h-screen w-full"})]})]})});var fe=(0,$.withLayout)(ue);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaPlayerSticky/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect, forwardRef } from 'react'\nimport { debounce } from 'es-toolkit'\nimport { useInView } from 'react-intersection-observer'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\n\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\n\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst SubContainer = ({\n children,\n spaceY,\n className,\n}: {\n children: React.ReactNode\n spaceY?: string\n className?: string\n}) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY} className={cn('!bg-transparent', className)}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst SubBox = React.forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n {\n children?: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n }\n>(({ children, id, components }) => {\n const mediaPlayerStickyRef = useRef<HTMLDivElement>(null)\n\n return (\n <div ref={mediaPlayerStickyRef} className=\"relative z-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"none\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"none\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} className=\"!bg-transparent\" />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n})\n\nconst MediaPlayerSticky = forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n MediaPlayerBaseProps\n>(\n ({\n className = '',\n wrapperClassName = '',\n id,\n data: {\n title,\n videoTitle,\n mobVideo,\n mobImg,\n img,\n isYouTube,\n youtubePcId,\n youtubeMobileId,\n video,\n theme,\n shape,\n components,\n },\n }) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n const { ref: inViewRef, inView } = useInView()\n const [screenHeight, setScreenHeight] = useState(0)\n const [isPlaying, setIsPlaying] = useState(false)\n const [isEntered, setIsEntered] = useState(false)\n const wrapperRef = useRef<HTMLDivElement>(null)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n const [btb, setbtb] = useState(0)\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const debouncedHandleResize = debounce(() => {\n if (boxRef.current) {\n const rect = boxRef.current.getBoundingClientRect()\n const screenHeight = isMobile ? window.screen.height : window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n setScreenHeight(screenHeight)\n }\n }, 2000)\n\n useEffect(() => {\n if (inView && !isPlaying) {\n videoRef.current?.play()\n setIsPlaying(true)\n }\n }, [inView, isPlaying])\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n const height = isMobile ? window.screen.height : window.innerHeight\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0.5,\n },\n })\n .from(`#${id} .media-content`, { top: '50%', transform: 'translate(-50%, -50%)' })\n .to(`.${id} .sticky-cover`, {\n backdropFilter: 'blur(8px)',\n duration: 0.4,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }\n if (inView) {\n gsapResize()\n }\n }, [inView])\n\n return (\n <>\n <div\n id={id}\n className={cn('relative z-20 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n ref={wrapperRef}\n >\n <div\n ref={inViewRef}\n className=\"media-content translate-z-0 absolute left-1/2 top-1/2 z-10 w-full -translate-x-1/2 -translate-y-1/2 antialiased\"\n style={{ willChange: 'transform', contain: 'paint' }}\n >\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title antialiased\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n\n <div\n ref={boxRef}\n style={{ marginBottom: `-${btb}px`, zIndex: inView ? 2 : 1 }}\n className={cn(id, 'relative mt-[-200vh]', wrapperClassName)}\n >\n <div className=\"sticky top-0 \">\n <div className={cn('media-cover', 'relative h-screen w-full')}>\n {isYouTube ? (\n <YouTubePlayer youTubeId={isMobile ? youtubeMobileId || youtubePcId : youtubePcId} />\n ) : (\n video?.url && (\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={isMobile && mobImg?.url ? mobImg?.url : img?.url}\n src={isMobile && mobVideo?.url ? mobVideo?.url : video?.url}\n className=\"lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]\"\n videoClassName=\" object-cover object-[82%]\"\n muted\n loop={false}\n playsInline\n onEnded={() => {\n setIsEntered(true)\n }}\n />\n )\n )}\n {img?.url && (!video?.url || isEntered) && (\n <img\n src={isMobile && mobImg?.url ? mobImg?.url : img?.url}\n alt={img?.alt}\n className=\"z-1 absolute left-0 top-0 size-full object-cover object-[82%]\"\n />\n )}\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full\"\n style={{\n backdropFilter: 'blur(0px)',\n WebkitBackdropFilter: 'blur(0px)',\n willChange: 'backdrop-filter',\n }}\n />\n </div>\n </div>\n\n <div className=\"relative h-screen w-full\" />\n <SubBox components={components}></SubBox>\n <div className=\"relative h-screen w-full\" />\n </div>\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerSticky)\n"],
5
- "mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA+CM,IAAAI,EAAA,6BA9CNC,EAA+D,oBAC/DC,EAAyB,sBACzBC,EAA0B,uCAC1BC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAmB,iCACnBC,EAA8B,0CAC9BC,EAA+B,oCAC/BC,EAA0B,yCAC1BC,EAAwB,sCACxBC,EAAyB,uCACzBC,EAAmB,iCACnBC,EAAiB,mBACjBC,EAAqC,6CAIrCC,EAA8B,4BAE9BC,EAA4B,+CAE5B,MAAMC,EAAyC,CAAC,CAAE,kBAAAC,CAAkB,KAAO,CACzE,GAAGA,EACH,KAAMC,GAAQ,CACZ,KAAM,CAAE,KAAAC,CAAK,EAAID,EAGjB,OAAIC,EAAK,GAAKA,EAAK,EAAE,MACZ,wBAAw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,aAAW,MAAG,cAAe,0BAA0B,EACzD,UAAAM,KACC,OAAC,iBAAc,UAAWjB,GAAWmB,GAAmBD,EAA2B,EAEnFE,GAAO,QACL,OAAC,EAAA4B,QAAA,CACC,SAAUzB,EACV,OAAQvB,GAAYe,GAAQ,IAAMA,GAAQ,IAAMC,GAAK,IACrD,IAAKhB,GAAYc,GAAU,IAAMA,GAAU,IAAMM,GAAO,IACxD,UAAU,qNACV,eAAe,6BACf,MAAK,GACL,KAAM,GACN,YAAW,GACX,QAAS,IAAM,CACbY,EAAa,EAAI,CACnB,EACF,EAGHhB,GAAK,MAAQ,CAACI,GAAO,KAAOW,OAC3B,OAAC,OACC,IAAK/B,GAAYe,GAAQ,IAAMA,GAAQ,IAAMC,GAAK,IAClD,IAAKA,GAAK,IACV,UAAU,iEACZ,KAEF,OAAC,OACC,UAAU,oDACV,MAAO,CACL,eAAgB,YAChB,qBAAsB,YACtB,WAAY,iBACd,EACF,GACF,EACF,KAEA,OAAC,OAAI,UAAU,2BAA2B,KAC1C,OAACf,GAAA,CAAO,WAAYG,EAAY,KAChC,OAAC,OAAI,UAAU,2BAA2B,GAC5C,GACF,CAEJ,CACF,EAEA,IAAO/B,MAAQ,cAAWqC,EAAiB",
6
- "names": ["MediaPlayerSticky_exports", "__export", "MediaPlayerSticky_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_es_toolkit", "import_react_intersection_observer", "import_utils", "import_Styles", "import_Slogan", "import_YouTubePlayer", "import_gird", "import_container", "import_BrandEquity", "import_MemberEquity", "import_Spacer", "import_gsap", "import_html", "import_react_responsive", "import_ScrollLoadVideo", "htmlConverters", "defaultConverters", "args", "node", "SubContainer", "children", "spaceY", "className", "isMobile", "SubBox", "React", "id", "components", "mediaPlayerStickyRef", "componentData", "BrandEquity", "MemberEquity", "Spacer", "MediaPlayerSticky", "wrapperClassName", "title", "videoTitle", "mobVideo", "mobImg", "img", "isYouTube", "youtubePcId", "youtubeMobileId", "video", "theme", "shape", "videoRef", "boxRef", "inViewRef", "inView", "screenHeight", "setScreenHeight", "isPlaying", "setIsPlaying", "isEntered", "setIsEntered", "wrapperRef", "title_html", "btb", "setbtb", "setIsMobile", "mediaQuery", "debouncedHandleResize", "rect", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "gsap", "Slogan", "ScrollLoadVideo"]
4
+ "sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect, forwardRef } from 'react'\nimport { debounce } from 'es-toolkit'\nimport { useInView } from 'react-intersection-observer'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\n\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\n\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst SubContainer = ({\n children,\n spaceY,\n className,\n}: {\n children: React.ReactNode\n spaceY?: string\n className?: string\n}) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY} className={cn('!bg-transparent', className)}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst SubBox = React.forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n {\n children?: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n }\n>(({ children, id, components }, ref) => {\n const mediaPlayerStickyRef = useRef<HTMLDivElement>(null)\n\n return (\n <div ref={mediaPlayerStickyRef} className=\"relative z-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"none\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"none\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} className=\"!bg-transparent\" />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n})\n\nconst MediaPlayerSticky = forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n MediaPlayerBaseProps\n>(\n (\n {\n className = '',\n wrapperClassName = '',\n id,\n data: {\n title,\n videoTitle,\n mobVideo,\n mobImg,\n img,\n isYouTube,\n youtubePcId,\n youtubeMobileId,\n video,\n theme,\n shape,\n components,\n },\n },\n ref\n ) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n const { ref: inViewRef, inView } = useInView()\n const [screenHeight, setScreenHeight] = useState(0)\n const [isPlaying, setIsPlaying] = useState(false)\n const [isEntered, setIsEntered] = useState(false)\n const wrapperRef = useRef<HTMLDivElement>(null)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n const [btb, setbtb] = useState(0)\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const debouncedHandleResize = debounce(() => {\n if (boxRef.current) {\n const rect = boxRef.current.getBoundingClientRect()\n const screenHeight = isMobile ? window.screen.height : window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n setScreenHeight(screenHeight)\n }\n }, 2000)\n\n useEffect(() => {\n if (inView && !isPlaying) {\n videoRef.current?.play()\n setIsPlaying(true)\n }\n }, [inView, isPlaying])\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n const height = isMobile ? window.screen.height : window.innerHeight\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0.5,\n },\n })\n .from(`#${id} .media-content`, { top: '50%', transform: 'translate(-50%, -50%)' })\n .to(`.${id} .sticky-cover`, {\n backdropFilter: 'blur(8px)',\n duration: 0.4,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }\n if (inView) {\n gsapResize()\n }\n }, [inView])\n\n return (\n <>\n <div\n id={id}\n className={cn('relative z-20 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n ref={wrapperRef}\n >\n <div\n ref={inViewRef}\n className=\"media-content translate-z-0 absolute left-1/2 top-1/2 z-10 w-full -translate-x-1/2 -translate-y-1/2 antialiased\"\n style={{ willChange: 'transform', contain: 'paint' }}\n >\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title antialiased\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n\n <div\n ref={boxRef}\n style={{ marginBottom: `-${btb}px`, zIndex: inView ? 2 : 1 }}\n className={cn(id, 'relative mt-[-200vh]', wrapperClassName)}\n >\n <div className=\"sticky top-0 \">\n <div className={cn('media-cover', 'relative h-screen w-full')}>\n {isYouTube ? (\n <YouTubePlayer youTubeId={isMobile ? youtubeMobileId || youtubePcId : youtubePcId} />\n ) : (\n video?.url && (\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={isMobile && mobImg?.url ? mobImg?.url : img?.url}\n src={isMobile && mobVideo?.url ? mobVideo?.url : video?.url}\n className=\"lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]\"\n videoClassName=\" object-cover object-[82%]\"\n muted\n loop={false}\n playsInline\n onEnded={() => {\n setIsEntered(true)\n }}\n />\n )\n )}\n {img?.url && (!video?.url || isEntered) && (\n <img\n src={isMobile && mobImg?.url ? mobImg?.url : img?.url}\n alt={img?.alt}\n className=\"z-1 absolute left-0 top-0 size-full object-cover object-[82%]\"\n />\n )}\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full\"\n style={{\n backdropFilter: 'blur(0px)',\n WebkitBackdropFilter: 'blur(0px)',\n willChange: 'backdrop-filter',\n }}\n />\n </div>\n </div>\n\n <div className=\"relative h-screen w-full\" />\n <SubBox components={components}></SubBox>\n <div className=\"relative h-screen w-full\" />\n </div>\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerSticky)\n"],
5
+ "mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,a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IAAO/B,MAAQ,cAAWsC,EAAiB",
6
+ "names": ["MediaPlayerSticky_exports", "__export", "MediaPlayerSticky_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_es_toolkit", "import_react_intersection_observer", "import_utils", "import_Styles", "import_Slogan", "import_YouTubePlayer", "import_gird", "import_container", "import_BrandEquity", "import_MemberEquity", "import_Spacer", "import_gsap", "import_html", "import_react_responsive", "import_ScrollLoadVideo", "htmlConverters", "defaultConverters", "args", "node", "SubContainer", "children", "spaceY", "className", "isMobile", "SubBox", "React", "id", "components", "ref", "mediaPlayerStickyRef", "componentData", "BrandEquity", "MemberEquity", "Spacer", "MediaPlayerSticky", "wrapperClassName", "title", "videoTitle", "mobVideo", "mobImg", "img", "isYouTube", "youtubePcId", "youtubeMobileId", "video", "theme", "shape", "videoRef", "boxRef", "inViewRef", "inView", "screenHeight", "setScreenHeight", "isPlaying", "setIsPlaying", "isEntered", "setIsEntered", "wrapperRef", "title_html", "btb", "setbtb", "setIsMobile", "mediaQuery", "debouncedHandleResize", "rect", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "gsap", "Slogan", "ScrollLoadVideo"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var Z=Object.create;var V=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var X=(a,l)=>{for(var o in l)V(a,o,{get:l[o],enumerable:!0})},H=(a,l,o,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let i of J(l))!W.call(a,i)&&i!==o&&V(a,i,{get:()=>l[i],enumerable:!(c=F(l,i))||c.enumerable});return a};var P=(a,l,o)=>(o=a!=null?Z(K(a)):{},H(l||!a||!a.__esModule?V(o,"default",{value:a,enumerable:!0}):o,a)),ee=a=>H(V({},"__esModule",{value:!0}),a);var ae={};X(ae,{default:()=>te});module.exports=ee(ae);var e=require("react/jsx-runtime"),r=P(require("react")),D=require("react-responsive"),Q=require("../../shared/Styles.js"),S=P(require("../../components/picture.js")),z=P(require("../../components/button.js")),R=require("../../components/heading.js"),Y=require("../VideoModal/index.js"),N=require("../../components/gird.js"),q=P(require("../Title/index.js")),m=require("../../helpers/utils.js"),C=P(require("../SwiperBox/index.js")),U=require("../../shared/mimeType.js"),g=require("../../components/tabs.js"),A=require("../../hooks/useExposure.js"),L=require("../../shared/trackUrlRef.js"),O=require("../../shared/track.js");const w="image",b="p1_banner",$=({data:a,configuration:l,jIndex:o,spanType:c,title:i,onSecondaryButtonClick:d,onPrimaryButtonClick:x})=>{const[B,k]=(0,r.useState)(!1),T=(0,D.useMediaQuery)({query:"(max-width: 768px)"}),M=(0,r.useRef)(null),I=()=>{if(c)switch(c){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case"one-third":return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(l?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,A.useExposure)(M,{componentType:w,componentName:b,position:o,componentTitle:a.title,componentDescription:a.description,navigation:l?.activeTab}),(0,r.useEffect)(()=>{k(T)},[T]);const{theme:G="light",title:h,description:f,imageUrl:n,primaryButton:u,secondaryButton:p,imageMobileUrl:y,blockLink:v,video:t,youtubeId:s,isYouTube:_}=a,E="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,m.cn)("item-wrapper cursor-pointer","text-info-primary group relative box-border w-full overflow-hidden",I(),{"rounded-2xl":l?.shape==="rounded","aiui-dark":G==="dark","h-[400px]":B},"text-info-primary"),ref:M,children:[(v||p.link)&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,L.trackUrlRef)(v||p.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${h}#${f}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,"aria-hidden":"true",tabIndex:-1}),(0,e.jsxs)("div",{className:"absolute inset-0",children:[(0,U.isVideo)(n?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden overflow-hidden w-full h-full object-cover",children:(0,e.jsx)("source",{src:n?.url,type:"video/mp4"})}):(0,e.jsx)(S.default,{source:n?.url,alt:n?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${n?.width}/${n?.height}`}}),(0,U.isVideo)(y?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block overflow-hidden w-full h-full object-cover",children:(0,e.jsx)("source",{src:y?.url,type:"video/mp4"})}):(0,e.jsx)(S.default,{source:y?.url||n?.url,alt:y?.alt||n?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,e.jsxs)("div",{className:(0,m.cn)("absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":a?.width==="full"}),children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(R.Heading,{size:3,as:"h3",className:"item-title",html:h}),(0,e.jsx)(R.Heading,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:f})]}),(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[p&&p.text&&(0,e.jsxs)(z.default,{"aria-label":h??f,className:(0,m.cn)(E,"link-left"),variant:"secondary",as:"a",onClick:()=>{d?.(a)},href:(0,L.trackUrlRef)(p.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${h}#${f}#${p.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:[p.text,(0,e.jsx)("span",{className:"sr-only",children:h??f})]}),u&&u.text&&(0,e.jsx)(z.default,{"aria-label":h??f,className:(0,m.cn)(E,"link-right"),variant:"primary",as:"a",onClick:()=>{x?.(a)},href:(0,L.trackUrlRef)(u.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${h}#${f}#${u.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:u.text})]})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20",children:(t?.url||s)&&(0,e.jsx)("button",{onClick:()=>{l?.onVideoPlayBtnClick?.(t?.url||s,_)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,e.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},j=r.default.forwardRef((a,l)=>{const{onSecondaryButtonClick:o,onPrimaryButtonClick:c}=a,{shape:i,sectionTitle:d,groupByTab:x=!1,items:B=[],carousel:k}=a.data,[T,M]=(0,r.useState)(!1),[I,G]=(0,r.useState)(""),[h,f]=(0,r.useState)(""),n=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},u=B.map(t=>t.tabName).filter(Boolean).filter((t,s,_)=>_.indexOf(t)===s),p=(t,s)=>{M(!0),s?f?.(t||""):G?.(t||"")},y=(t,s)=>{switch(t){case 1:return 1;case 2:return 2;default:return s?2.3:3}},v=u.map(t=>({tabName:t,items:B.filter(s=>s.tabName===t)})).reduce((t,s)=>(t[s.tabName]=s.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:l,className:(0,m.cn)("multiLayoutGraphicBlock","text-info-primary",a.className),children:[d&&(0,e.jsx)(q.default,{data:{title:d},className:"section-title"}),x?(0,e.jsxs)(g.Tabs,{shape:i,align:"left",defaultValue:(0,m.spaceToHyphen)(u[0]),children:[(0,e.jsx)(g.TabsList,{children:u.map((t,s)=>(0,e.jsx)(g.TabsTrigger,{value:(0,m.spaceToHyphen)(t),onClick:()=>{(0,O.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:w,component_name:b,component_title:d,component_position:1,navigation:t,button_name:t}})},children:t},s))}),u.map((t,s)=>(0,e.jsx)(g.TabsContent,{value:(0,m.spaceToHyphen)(t),className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:v?.[t]||[],configuration:{shape:i,isTab:x,activeTab:t,title:d,num:v?.[t]?.length||0,onVideoPlayBtnClick:p,onSecondaryButtonClick:o,onPrimaryButtonClick:c}},Slide:$,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:y(v?.[t]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:y(v?.[t]?.length||0)}}}),k&&k?.items.length>0?(0,e.jsx)(C.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:k?.items||[],configuration:{shape:i,isTab:x,onVideoPlayBtnClick:p,title:d,onSecondaryButtonClick:o,onPrimaryButtonClick:c}},Slide:$,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},s))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(N.Grid,{className:"w-full",children:[B.map((t,s)=>(0,e.jsx)(N.GridItem,{span:n(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)($,{data:t,configuration:{shape:i,onVideoPlayBtnClick:p,title:d},jIndex:s,spanType:t.width,onSecondaryButtonClick:o,onPrimaryButtonClick:c})},`${t?.title||""}${s}`)),B.map((t,s)=>(0,e.jsx)(N.GridItem,{span:n("full"),className:"laptop:hidden block",children:(0,e.jsx)($,{data:t,configuration:{shape:i,onVideoPlayBtnClick:p,title:d},jIndex:s,spanType:"full"})},`${t?.title||""}${s}`))]}),k&&k?.items.length>0?(0,e.jsx)(C.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:k?.items||[],configuration:{shape:i,onVideoPlayBtnClick:p,title:d,onSecondaryButtonClick:o,onPrimaryButtonClick:c}},Slide:$,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]}),T&&(0,e.jsx)(Y.VideoModal,{visible:T,youTubeId:h,videoUrl:I,onCloseModal:()=>M(!1)})]})});j.displayName="MultiLayoutGraphicBlock";var te=(0,Q.withLayout)(j);
1
+ "use strict";var Z=Object.create;var V=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var X=(a,l)=>{for(var o in l)V(a,o,{get:l[o],enumerable:!0})},H=(a,l,o,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let i of J(l))!W.call(a,i)&&i!==o&&V(a,i,{get:()=>l[i],enumerable:!(c=F(l,i))||c.enumerable});return a};var P=(a,l,o)=>(o=a!=null?Z(K(a)):{},H(l||!a||!a.__esModule?V(o,"default",{value:a,enumerable:!0}):o,a)),ee=a=>H(V({},"__esModule",{value:!0}),a);var ae={};X(ae,{default:()=>te});module.exports=ee(ae);var e=require("react/jsx-runtime"),r=P(require("react")),D=require("react-responsive"),Q=require("../../shared/Styles.js"),S=P(require("../../components/picture.js")),z=P(require("../../components/button.js")),R=require("../../components/heading.js"),Y=require("../VideoModal/index.js"),N=require("../../components/gird.js"),q=P(require("../Title/index.js")),m=require("../../helpers/utils.js"),C=P(require("../SwiperBox/index.js")),U=require("../../shared/mimeType.js"),g=require("../../components/tabs.js"),A=require("../../hooks/useExposure.js"),L=require("../../shared/trackUrlRef.js"),O=require("../../shared/track.js");const b="image",w="p1_banner",$=({data:a,configuration:l,jIndex:o,spanType:c,title:i,onSecondaryButtonClick:d,onPrimaryButtonClick:x})=>{const[B,k]=(0,r.useState)(!1),T=(0,D.useMediaQuery)({query:"(max-width: 768px)"}),M=(0,r.useRef)(null),I=()=>{if(c)switch(c){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case"one-third":return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(l?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,A.useExposure)(M,{componentType:b,componentName:w,position:o,componentTitle:a.title,componentDescription:a.description,navigation:l?.activeTab}),(0,r.useEffect)(()=>{k(T)},[T]);const{theme:G="light",title:h,description:f,imageUrl:n,primaryButton:u,secondaryButton:p,imageMobileUrl:y,blockLink:v,video:t,youtubeId:s,isYouTube:_}=a,E="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,m.cn)("item-wrapper cursor-pointer","text-info-primary group relative box-border w-full overflow-hidden",I(),{"rounded-2xl":l?.shape==="rounded","aiui-dark":G==="dark","h-[400px]":B},"text-info-primary"),ref:M,children:[(v||p.link)&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,L.trackUrlRef)(v||p.link,`${b}_${w}`),"data-headless-type-name":`${b}#${w}`,"data-headless-title-desc-button":`${h}#${f}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,"aria-hidden":"true",tabIndex:-1}),(0,e.jsxs)("div",{className:"absolute inset-0",children:[(0,U.isVideo)(n?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden size-full overflow-hidden object-cover",children:(0,e.jsx)("source",{src:n?.url,type:"video/mp4"})}):(0,e.jsx)(S.default,{source:n?.url,alt:n?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${n?.width}/${n?.height}`}}),(0,U.isVideo)(y?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block size-full overflow-hidden object-cover",children:(0,e.jsx)("source",{src:y?.url,type:"video/mp4"})}):(0,e.jsx)(S.default,{source:y?.url||n?.url,alt:y?.alt||n?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,e.jsxs)("div",{className:(0,m.cn)("absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":a?.width==="full"}),children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(R.Heading,{size:3,as:"h3",className:"item-title",html:h}),(0,e.jsx)(R.Heading,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:f})]}),(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[p&&p.text&&(0,e.jsxs)(z.default,{"aria-label":h??f,className:(0,m.cn)(E,"link-left"),variant:"secondary",as:"a",onClick:()=>{d?.(a)},href:(0,L.trackUrlRef)(p.link,`${b}_${w}`),"data-headless-type-name":`${b}#${w}`,"data-headless-title-desc-button":`${h}#${f}#${p.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:[p.text,(0,e.jsx)("span",{className:"sr-only",children:h??f})]}),u&&u.text&&(0,e.jsx)(z.default,{"aria-label":h??f,className:(0,m.cn)(E,"link-right"),variant:"primary",as:"a",onClick:()=>{x?.(a)},href:(0,L.trackUrlRef)(u.link,`${b}_${w}`),"data-headless-type-name":`${b}#${w}`,"data-headless-title-desc-button":`${h}#${f}#${u.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:u.text})]})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20",children:(t?.url||s)&&(0,e.jsx)("button",{onClick:()=>{l?.onVideoPlayBtnClick?.(t?.url||s,_)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,e.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},j=r.default.forwardRef((a,l)=>{const{onSecondaryButtonClick:o,onPrimaryButtonClick:c}=a,{shape:i,sectionTitle:d,groupByTab:x=!1,items:B=[],carousel:k}=a.data,[T,M]=(0,r.useState)(!1),[I,G]=(0,r.useState)(""),[h,f]=(0,r.useState)(""),n=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},u=B.map(t=>t.tabName).filter(Boolean).filter((t,s,_)=>_.indexOf(t)===s),p=(t,s)=>{M(!0),s?f?.(t||""):G?.(t||"")},y=(t,s)=>{switch(t){case 1:return 1;case 2:return 2;default:return s?2.3:3}},v=u.map(t=>({tabName:t,items:B.filter(s=>s.tabName===t)})).reduce((t,s)=>(t[s.tabName]=s.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:l,className:(0,m.cn)("multiLayoutGraphicBlock","text-info-primary",a.className),children:[d&&(0,e.jsx)(q.default,{data:{title:d},className:"section-title"}),x?(0,e.jsxs)(g.Tabs,{shape:i,align:"left",defaultValue:(0,m.spaceToHyphen)(u[0]),children:[(0,e.jsx)(g.TabsList,{children:u.map((t,s)=>(0,e.jsx)(g.TabsTrigger,{value:(0,m.spaceToHyphen)(t),onClick:()=>{(0,O.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:b,component_name:w,component_title:d,component_position:1,navigation:t,button_name:t}})},children:t},s))}),u.map((t,s)=>(0,e.jsx)(g.TabsContent,{value:(0,m.spaceToHyphen)(t),className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(C.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:v?.[t]||[],configuration:{shape:i,isTab:x,activeTab:t,title:d,num:v?.[t]?.length||0,onVideoPlayBtnClick:p,onSecondaryButtonClick:o,onPrimaryButtonClick:c}},Slide:$,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:y(v?.[t]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:y(v?.[t]?.length||0)}}}),k&&k?.items.length>0?(0,e.jsx)(C.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:k?.items||[],configuration:{shape:i,isTab:x,onVideoPlayBtnClick:p,title:d,onSecondaryButtonClick:o,onPrimaryButtonClick:c}},Slide:$,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},s))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(N.Grid,{className:"w-full",children:[B.map((t,s)=>(0,e.jsx)(N.GridItem,{span:n(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)($,{data:t,configuration:{shape:i,onVideoPlayBtnClick:p,title:d},jIndex:s,spanType:t.width,onSecondaryButtonClick:o,onPrimaryButtonClick:c})},`${t?.title||""}${s}`)),B.map((t,s)=>(0,e.jsx)(N.GridItem,{span:n("full"),className:"laptop:hidden block",children:(0,e.jsx)($,{data:t,configuration:{shape:i,onVideoPlayBtnClick:p,title:d},jIndex:s,spanType:"full"})},`${t?.title||""}${s}`))]}),k&&k?.items.length>0?(0,e.jsx)(C.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:k?.items||[],configuration:{shape:i,onVideoPlayBtnClick:p,title:d,onSecondaryButtonClick:o,onPrimaryButtonClick:c}},Slide:$,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]}),T&&(0,e.jsx)(Y.VideoModal,{visible:T,youTubeId:h,videoUrl:I,onCloseModal:()=>M(!1)})]})});j.displayName="MultiLayoutGraphicBlock";var te=(0,Q.withLayout)(j);
2
2
  //# sourceMappingURL=MultiLayoutGraphicBlock.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
4
- "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport { cn, spaceToHyphen } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n title: titleProp,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n title?: string\n onSecondaryButtonClick?: (data: Item) => void\n onPrimaryButtonClick?: (data: Item) => void\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 'one-third':\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper cursor-pointer',\n 'text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {(blockLink || secondaryButton.link) && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(blockLink || secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video\n autoPlay\n muted\n playsInline\n loop\n className=\"tablet:block hidden overflow-hidden w-full h-full object-cover\"\n >\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video\n autoPlay\n muted\n playsInline\n loop\n className=\"tablet:hidden block overflow-hidden w-full h-full object-cover\"\n >\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n onClick={() => {\n onSecondaryButtonClick?.(item)\n }}\n href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n as=\"a\"\n onClick={() => {\n onPrimaryButtonClick?.(item)\n }}\n href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { onSecondaryButtonClick, onPrimaryButtonClick } = props\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section\n data-ui-component-id=\"MultiLayoutGraphicBlock\"\n ref={ref}\n className={cn('multiLayoutGraphicBlock', 'text-info-primary', props.className)}\n >\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={spaceToHyphen(tabNames[0]!)}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={spaceToHyphen(tabName!)}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={spaceToHyphen(tabName!)} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n title: sectionTitle,\n num: tabItemsMaps?.[tabName]?.length || 0,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={item.width}\n onSecondaryButtonClick={onSecondaryButtonClick}\n onPrimaryButtonClick={onPrimaryButtonClick}\n />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={'full'}\n />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nMultiLayoutGraphicBlock.displayName = 'MultiLayoutGraphicBlock'\n\nexport default withLayout(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
- "mappings": "2jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAiHQ,IAAAI,EAAA,6BAjHRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EAAkB,gCAClBC,EAAkC,kCAClCC,EAAsB,oCACtBC,EAAwB,oCACxBC,EAAyD,oCACzDC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAAwB,iCAExB,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,EACA,SAAAC,EACA,MAAOC,EACP,uBAAAC,EACA,qBAAAC,CACF,IAQM,CACJ,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAkB,EAAK,EACjDC,KAAa,iBAAc,CAAE,M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Q,cAAWgD,CAAuB",
4
+ "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport { cn, spaceToHyphen } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n title: titleProp,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n title?: string\n onSecondaryButtonClick?: (data: Item) => void\n onPrimaryButtonClick?: (data: Item) => void\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 'one-third':\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper cursor-pointer',\n 'text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {(blockLink || secondaryButton.link) && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(blockLink || secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden size-full overflow-hidden object-cover\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block size-full overflow-hidden object-cover\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n onClick={() => {\n onSecondaryButtonClick?.(item)\n }}\n href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n as=\"a\"\n onClick={() => {\n onPrimaryButtonClick?.(item)\n }}\n href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { onSecondaryButtonClick, onPrimaryButtonClick } = props\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section\n data-ui-component-id=\"MultiLayoutGraphicBlock\"\n ref={ref}\n className={cn('multiLayoutGraphicBlock', 'text-info-primary', props.className)}\n >\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={spaceToHyphen(tabNames[0]!)}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={spaceToHyphen(tabName!)}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={spaceToHyphen(tabName!)} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n title: sectionTitle,\n num: tabItemsMaps?.[tabName]?.length || 0,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={item.width}\n onSecondaryButtonClick={onSecondaryButtonClick}\n onPrimaryButtonClick={onPrimaryButtonClick}\n />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={'full'}\n />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nMultiLayoutGraphicBlock.displayName = 'MultiLayoutGraphicBlock'\n\nexport default withLayout(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
+ "mappings": "2jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAiHQ,IAAAI,EAAA,6BAjHRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EAAkB,gCAClBC,EAAkC,kCAClCC,EAAsB,oCACtBC,EAAwB,oCACxBC,EAAyD,oCACzDC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAAwB,iCAExB,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,EACA,SAAAC,EACA,MAAOC,EACP,uBAAAC,EACA,qBAAAC,CACF,IAQM,CACJ,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAkB,EAAK,EACjDC,KAAa,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAE1DC,KAAM,UAAuB,IAAI,EAEjCC,EAAe,IAAM,CACzB,GAAIR,EACF,OAAQA,EAAU,CAChB,IAAK,OACH,MAAO,8LACT,IAAK,OACH,MAAO,4LACT,IAAK,YACH,MAAO,4LACT,QACE,MAAO,2LACX,KAEA,QAAQF,GAAe,IAAK,CAC1B,IAAK,GACH,MAAO,8LACT,IAAK,GACH,MAAO,4LACT,IAAK,GACH,MAAO,4LACT,QACE,MAAO,2LACX,CAEJ,KAEA,eAAYS,EAAK,CACf,cAAeb,EACf,cAAeC,EACf,SAAUI,EACV,eAAgBF,EAAK,MACrB,qBAAsBA,EAAK,YAC3B,WAAYC,GAAe,SAC7B,CAAC,KAED,aAAU,IAAM,CACdO,EAAYC,CAAU,CACxB,EAAG,CAACA,CA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,EACR,SAAU,OACZ,GANa,GAAG3C,GAAM,OAAS,EAAE,GAAG2C,CAAK,EAO3C,CACD,GACH,EACCV,GAAYA,GAAU,MAAM,OAAS,KACpC,OAAC,EAAAsB,QAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CACJ,KAAMtB,GAAU,OAAS,CAAC,EAC1B,cAAe,CACb,MAAOJ,EACP,oBAAqBgB,EACrB,MAAOf,EACP,uBAAAzB,EACA,qBAAAC,CACF,CACF,EACA,MAAOP,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACE,MACN,EAEDmC,MACC,OAAC,cACC,QAASA,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CAAC,EAEDT,EAAwB,YAAc,0BAEtC,IAAOhD,MAAQ,cAAWgD,CAAuB",
6
6
  "names": ["MultiLayoutGraphicBlock_exports", "__export", "MultiLayoutGraphicBlock_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_responsive", "import_Styles", "import_picture", "import_button", "import_heading", "import_VideoModal", "import_gird", "import_Title", "import_utils", "import_SwiperBox", "import_mimeType", "import_tabs", "import_useExposure", "import_trackUrlRef", "import_track", "componentType", "componentName", "ItemBlock", "item", "configuration", "jIndex", "spanType", "titleProp", "onSecondaryButtonClick", "onPrimaryButtonClick", "isMobile", "setIsMobile", "mediaQuery", "ref", "handleAspect", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "imageMobileUrl", "blockLink", "video", "youtubeId", "isYouTube", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "shape", "sectionTitle", "groupByTab", "items", "carousel", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "getSpan", "width", "tabNames", "index", "arr", "handleVideoPlayBtnClick", "url", "handleTabNumber", "num", "flag", "tabItemsMaps", "tabName", "acc", "cur", "Title", "SwiperBox"]
7
7
  }