@anker-in/headless-ui 1.1.83 → 1.1.84-alpha.1776249522021

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 (379) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  2. package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
  3. package/dist/cjs/biz-components/ActiveShelf/index.d.ts +2 -2
  4. package/dist/cjs/biz-components/ActiveShelf/index.js +1 -1
  5. package/dist/cjs/biz-components/ActiveShelf/index.js.map +3 -3
  6. package/dist/cjs/biz-components/ActivityMechanism/index.js +1 -1
  7. package/dist/cjs/biz-components/ActivityMechanism/index.js.map +3 -3
  8. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  9. package/dist/cjs/biz-components/ActivitySchedule/index.js.map +3 -3
  10. package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
  11. package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
  12. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  13. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  14. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  15. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  16. package/dist/cjs/biz-components/Category/index.js +1 -1
  17. package/dist/cjs/biz-components/Category/index.js.map +3 -3
  18. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  19. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  20. package/dist/cjs/biz-components/EventSchedule/index.d.ts +2 -7
  21. package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
  22. package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
  23. package/dist/cjs/biz-components/Faq/Faq.js +1 -1
  24. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  25. package/dist/cjs/biz-components/Faq/types.d.ts +1 -0
  26. package/dist/cjs/biz-components/Faq/types.js +1 -1
  27. package/dist/cjs/biz-components/Faq/types.js.map +1 -1
  28. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
  29. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  30. package/dist/cjs/biz-components/FeaturedBlogPosts/index.d.ts +1 -6
  31. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +1 -1
  32. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +3 -3
  33. package/dist/cjs/biz-components/GiftBox/index.js +1 -1
  34. package/dist/cjs/biz-components/GiftBox/index.js.map +2 -2
  35. package/dist/cjs/biz-components/GiftShelf/index.js +1 -1
  36. package/dist/cjs/biz-components/GiftShelf/index.js.map +3 -3
  37. package/dist/cjs/biz-components/GiftTierShelf/index.js +1 -1
  38. package/dist/cjs/biz-components/GiftTierShelf/index.js.map +3 -3
  39. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  40. package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
  41. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  42. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  43. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  44. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  45. package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +3 -3
  46. package/dist/cjs/biz-components/ImageOverlayShelf/index.js +1 -1
  47. package/dist/cjs/biz-components/ImageOverlayShelf/index.js.map +3 -3
  48. package/dist/cjs/biz-components/ImageTextOverlay/index.d.ts +4 -0
  49. package/dist/cjs/biz-components/ImageTextOverlay/index.js +2 -0
  50. package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +7 -0
  51. package/dist/cjs/biz-components/ImageTextOverlay/types.d.ts +58 -0
  52. package/dist/cjs/biz-components/ImageTextOverlay/types.js +2 -0
  53. package/dist/cjs/biz-components/ImageTextOverlay/types.js.map +7 -0
  54. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  55. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  56. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  57. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  58. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  59. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  60. package/dist/cjs/biz-components/LotteryShared/BaseModal.d.ts +61 -0
  61. package/dist/cjs/biz-components/LotteryShared/BaseModal.js +2 -0
  62. package/dist/cjs/biz-components/LotteryShared/BaseModal.js.map +7 -0
  63. package/dist/cjs/biz-components/LotteryShared/ChanceMethods.d.ts +25 -0
  64. package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js +2 -0
  65. package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js.map +7 -0
  66. package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +47 -0
  67. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js +2 -0
  68. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +7 -0
  69. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +101 -0
  70. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +2 -0
  71. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +7 -0
  72. package/dist/cjs/biz-components/LotteryShared/PrizePool.d.ts +29 -0
  73. package/dist/cjs/biz-components/LotteryShared/PrizePool.js +2 -0
  74. package/dist/cjs/biz-components/LotteryShared/PrizePool.js.map +7 -0
  75. package/dist/cjs/biz-components/LotteryShared/RulesModal.d.ts +56 -0
  76. package/dist/cjs/biz-components/LotteryShared/RulesModal.js +2 -0
  77. package/dist/cjs/biz-components/LotteryShared/RulesModal.js.map +7 -0
  78. package/dist/cjs/biz-components/LotteryShared/ShareModal.d.ts +79 -0
  79. package/dist/cjs/biz-components/LotteryShared/ShareModal.js +2 -0
  80. package/dist/cjs/biz-components/LotteryShared/ShareModal.js.map +7 -0
  81. package/dist/cjs/biz-components/LotteryShared/WinnerModal.d.ts +27 -0
  82. package/dist/cjs/biz-components/LotteryShared/WinnerModal.js +2 -0
  83. package/dist/cjs/biz-components/LotteryShared/WinnerModal.js.map +7 -0
  84. package/dist/cjs/biz-components/LotteryShared/index.d.ts +23 -0
  85. package/dist/cjs/biz-components/LotteryShared/index.js +2 -0
  86. package/dist/cjs/biz-components/LotteryShared/index.js.map +7 -0
  87. package/dist/cjs/biz-components/LotteryShared/types.d.ts +760 -0
  88. package/dist/cjs/biz-components/LotteryShared/types.js +2 -0
  89. package/dist/cjs/biz-components/LotteryShared/types.js.map +7 -0
  90. package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
  91. package/dist/cjs/biz-components/Marquee/Marquee.js.map +3 -3
  92. package/dist/cjs/biz-components/Marquee/type.d.ts +5 -2
  93. package/dist/cjs/biz-components/Marquee/type.js.map +1 -1
  94. package/dist/cjs/biz-components/Media/index.d.ts +15 -3
  95. package/dist/cjs/biz-components/Media/index.js +1 -1
  96. package/dist/cjs/biz-components/Media/index.js.map +3 -3
  97. package/dist/cjs/biz-components/MediaEndorsement/index.js +2 -2
  98. package/dist/cjs/biz-components/MediaEndorsement/index.js.map +2 -2
  99. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  100. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
  101. package/dist/cjs/biz-components/MediaShelf/index.d.ts +2 -2
  102. package/dist/cjs/biz-components/MediaShelf/index.js +1 -1
  103. package/dist/cjs/biz-components/MediaShelf/index.js.map +3 -3
  104. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  105. package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
  106. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  107. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  108. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
  109. package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
  110. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  111. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +3 -3
  112. package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.d.ts +4 -0
  113. package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js +2 -0
  114. package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js.map +7 -0
  115. package/dist/cjs/biz-components/ProductLottery/index.d.ts +17 -0
  116. package/dist/cjs/biz-components/ProductLottery/index.js +2 -0
  117. package/dist/cjs/biz-components/ProductLottery/index.js.map +7 -0
  118. package/dist/cjs/biz-components/ProductLottery/types.d.ts +363 -0
  119. package/dist/cjs/biz-components/ProductLottery/types.js +2 -0
  120. package/dist/cjs/biz-components/ProductLottery/types.js.map +7 -0
  121. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  122. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
  123. package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
  124. package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
  125. package/dist/cjs/biz-components/SceneShelfV2/index.d.ts +88 -0
  126. package/dist/cjs/biz-components/SceneShelfV2/index.js +2 -0
  127. package/dist/cjs/biz-components/SceneShelfV2/index.js.map +7 -0
  128. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.d.ts +80 -0
  129. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js +2 -0
  130. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js.map +7 -0
  131. package/dist/cjs/biz-components/SceneShelfV3/index.d.ts +76 -0
  132. package/dist/cjs/biz-components/SceneShelfV3/index.js +2 -0
  133. package/dist/cjs/biz-components/SceneShelfV3/index.js.map +7 -0
  134. package/dist/cjs/biz-components/SceneShelfV3/types.d.ts +19 -0
  135. package/dist/cjs/biz-components/SceneShelfV3/types.js +2 -0
  136. package/dist/cjs/biz-components/SceneShelfV3/types.js.map +7 -0
  137. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  138. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
  139. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  140. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  141. package/dist/cjs/biz-components/Specs/index.js +1 -1
  142. package/dist/cjs/biz-components/Specs/index.js.map +3 -3
  143. package/dist/cjs/biz-components/Subscribe/index.js +1 -1
  144. package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
  145. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  146. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  147. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  148. package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
  149. package/dist/cjs/biz-components/Tabs/types.d.ts +3 -0
  150. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  151. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  152. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  153. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  154. package/dist/cjs/biz-components/Title/index.js +1 -1
  155. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  156. package/dist/cjs/biz-components/Title/types.d.ts +48 -1
  157. package/dist/cjs/biz-components/Title/types.js +1 -1
  158. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  159. package/dist/cjs/biz-components/WebPushPopup/index.d.ts +44 -0
  160. package/dist/cjs/biz-components/WebPushPopup/index.js +2 -0
  161. package/dist/cjs/biz-components/WebPushPopup/index.js.map +7 -0
  162. package/dist/cjs/biz-components/WheelLottery/index.d.ts +11 -11
  163. package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
  164. package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
  165. package/dist/cjs/biz-components/WheelLottery/types.d.ts +17 -723
  166. package/dist/cjs/biz-components/WheelLottery/types.js +1 -1
  167. package/dist/cjs/biz-components/WheelLottery/types.js.map +3 -3
  168. package/dist/cjs/biz-components/index.d.ts +13 -0
  169. package/dist/cjs/biz-components/index.js +1 -1
  170. package/dist/cjs/biz-components/index.js.map +3 -3
  171. package/dist/cjs/components/Countdown.js +1 -1
  172. package/dist/cjs/components/Countdown.js.map +3 -3
  173. package/dist/cjs/components/link.js +1 -1
  174. package/dist/cjs/components/link.js.map +2 -2
  175. package/dist/cjs/helpers/index.d.ts +1 -1
  176. package/dist/cjs/helpers/index.js +1 -1
  177. package/dist/cjs/helpers/index.js.map +2 -2
  178. package/dist/cjs/helpers/isLexicalEmpty.d.ts +5 -0
  179. package/dist/cjs/helpers/isLexicalEmpty.js +1 -1
  180. package/dist/cjs/helpers/isLexicalEmpty.js.map +3 -3
  181. package/dist/cjs/hooks/useEmarsysWebPush.d.ts +111 -0
  182. package/dist/cjs/hooks/useEmarsysWebPush.js +2 -0
  183. package/dist/cjs/hooks/useEmarsysWebPush.js.map +7 -0
  184. package/dist/cjs/hooks/useGridRowCount.d.ts +16 -0
  185. package/dist/cjs/hooks/useGridRowCount.js +2 -0
  186. package/dist/cjs/hooks/useGridRowCount.js.map +7 -0
  187. package/dist/cjs/hooks/useProductListTrack.d.ts +43 -0
  188. package/dist/cjs/hooks/useProductListTrack.js +2 -0
  189. package/dist/cjs/hooks/useProductListTrack.js.map +7 -0
  190. package/dist/cjs/types/props.d.ts +16 -0
  191. package/dist/cjs/types/props.js +1 -1
  192. package/dist/cjs/types/props.js.map +1 -1
  193. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  194. package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
  195. package/dist/esm/biz-components/ActiveShelf/index.d.ts +2 -2
  196. package/dist/esm/biz-components/ActiveShelf/index.js +1 -1
  197. package/dist/esm/biz-components/ActiveShelf/index.js.map +3 -3
  198. package/dist/esm/biz-components/ActivityMechanism/index.js +1 -1
  199. package/dist/esm/biz-components/ActivityMechanism/index.js.map +3 -3
  200. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  201. package/dist/esm/biz-components/ActivitySchedule/index.js.map +3 -3
  202. package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
  203. package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
  204. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  205. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  206. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  207. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  208. package/dist/esm/biz-components/Category/index.js +1 -1
  209. package/dist/esm/biz-components/Category/index.js.map +3 -3
  210. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  211. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  212. package/dist/esm/biz-components/EventSchedule/index.d.ts +2 -7
  213. package/dist/esm/biz-components/EventSchedule/index.js +1 -1
  214. package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
  215. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  216. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  217. package/dist/esm/biz-components/Faq/types.d.ts +1 -0
  218. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
  219. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  220. package/dist/esm/biz-components/FeaturedBlogPosts/index.d.ts +1 -6
  221. package/dist/esm/biz-components/FeaturedBlogPosts/index.js +1 -1
  222. package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +3 -3
  223. package/dist/esm/biz-components/GiftBox/index.js +1 -1
  224. package/dist/esm/biz-components/GiftBox/index.js.map +2 -2
  225. package/dist/esm/biz-components/GiftShelf/index.js +1 -1
  226. package/dist/esm/biz-components/GiftShelf/index.js.map +3 -3
  227. package/dist/esm/biz-components/GiftTierShelf/index.js +1 -1
  228. package/dist/esm/biz-components/GiftTierShelf/index.js.map +3 -3
  229. package/dist/esm/biz-components/Graphic/index.js +1 -1
  230. package/dist/esm/biz-components/Graphic/index.js.map +3 -3
  231. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  232. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  233. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  234. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  235. package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +3 -3
  236. package/dist/esm/biz-components/ImageOverlayShelf/index.js +1 -1
  237. package/dist/esm/biz-components/ImageOverlayShelf/index.js.map +3 -3
  238. package/dist/esm/biz-components/ImageTextOverlay/index.d.ts +4 -0
  239. package/dist/esm/biz-components/ImageTextOverlay/index.js +2 -0
  240. package/dist/esm/biz-components/ImageTextOverlay/index.js.map +7 -0
  241. package/dist/esm/biz-components/ImageTextOverlay/types.d.ts +58 -0
  242. package/dist/esm/biz-components/ImageTextOverlay/types.js +1 -0
  243. package/dist/esm/biz-components/ImageTextOverlay/types.js.map +7 -0
  244. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  245. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  246. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  247. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  248. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  249. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  250. package/dist/esm/biz-components/LotteryShared/BaseModal.d.ts +61 -0
  251. package/dist/esm/biz-components/LotteryShared/BaseModal.js +2 -0
  252. package/dist/esm/biz-components/LotteryShared/BaseModal.js.map +7 -0
  253. package/dist/esm/biz-components/LotteryShared/ChanceMethods.d.ts +25 -0
  254. package/dist/esm/biz-components/LotteryShared/ChanceMethods.js +2 -0
  255. package/dist/esm/biz-components/LotteryShared/ChanceMethods.js.map +7 -0
  256. package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +47 -0
  257. package/dist/esm/biz-components/LotteryShared/ErrorModal.js +2 -0
  258. package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +7 -0
  259. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +101 -0
  260. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +2 -0
  261. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +7 -0
  262. package/dist/esm/biz-components/LotteryShared/PrizePool.d.ts +29 -0
  263. package/dist/esm/biz-components/LotteryShared/PrizePool.js +2 -0
  264. package/dist/esm/biz-components/LotteryShared/PrizePool.js.map +7 -0
  265. package/dist/esm/biz-components/LotteryShared/RulesModal.d.ts +56 -0
  266. package/dist/esm/biz-components/LotteryShared/RulesModal.js +2 -0
  267. package/dist/esm/biz-components/LotteryShared/RulesModal.js.map +7 -0
  268. package/dist/esm/biz-components/LotteryShared/ShareModal.d.ts +79 -0
  269. package/dist/esm/biz-components/LotteryShared/ShareModal.js +2 -0
  270. package/dist/esm/biz-components/LotteryShared/ShareModal.js.map +7 -0
  271. package/dist/esm/biz-components/LotteryShared/WinnerModal.d.ts +27 -0
  272. package/dist/esm/biz-components/LotteryShared/WinnerModal.js +2 -0
  273. package/dist/esm/biz-components/LotteryShared/WinnerModal.js.map +7 -0
  274. package/dist/esm/biz-components/LotteryShared/index.d.ts +23 -0
  275. package/dist/esm/biz-components/LotteryShared/index.js +2 -0
  276. package/dist/esm/biz-components/LotteryShared/index.js.map +7 -0
  277. package/dist/esm/biz-components/LotteryShared/types.d.ts +760 -0
  278. package/dist/esm/biz-components/LotteryShared/types.js +2 -0
  279. package/dist/esm/biz-components/LotteryShared/types.js.map +7 -0
  280. package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
  281. package/dist/esm/biz-components/Marquee/Marquee.js.map +3 -3
  282. package/dist/esm/biz-components/Marquee/type.d.ts +5 -2
  283. package/dist/esm/biz-components/Media/index.d.ts +15 -3
  284. package/dist/esm/biz-components/Media/index.js +1 -1
  285. package/dist/esm/biz-components/Media/index.js.map +3 -3
  286. package/dist/esm/biz-components/MediaEndorsement/index.js +2 -2
  287. package/dist/esm/biz-components/MediaEndorsement/index.js.map +3 -3
  288. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  289. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
  290. package/dist/esm/biz-components/MediaShelf/index.d.ts +2 -2
  291. package/dist/esm/biz-components/MediaShelf/index.js +1 -1
  292. package/dist/esm/biz-components/MediaShelf/index.js.map +3 -3
  293. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  294. package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
  295. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  296. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  297. package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
  298. package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
  299. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  300. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +3 -3
  301. package/dist/esm/biz-components/ProductLottery/MediaDrawArea.d.ts +4 -0
  302. package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js +2 -0
  303. package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js.map +7 -0
  304. package/dist/esm/biz-components/ProductLottery/index.d.ts +17 -0
  305. package/dist/esm/biz-components/ProductLottery/index.js +2 -0
  306. package/dist/esm/biz-components/ProductLottery/index.js.map +7 -0
  307. package/dist/esm/biz-components/ProductLottery/types.d.ts +363 -0
  308. package/dist/esm/biz-components/ProductLottery/types.js +2 -0
  309. package/dist/esm/biz-components/ProductLottery/types.js.map +7 -0
  310. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  311. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
  312. package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
  313. package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
  314. package/dist/esm/biz-components/SceneShelfV2/index.d.ts +88 -0
  315. package/dist/esm/biz-components/SceneShelfV2/index.js +2 -0
  316. package/dist/esm/biz-components/SceneShelfV2/index.js.map +7 -0
  317. package/dist/esm/biz-components/SceneShelfV3/ProductCard.d.ts +80 -0
  318. package/dist/esm/biz-components/SceneShelfV3/ProductCard.js +2 -0
  319. package/dist/esm/biz-components/SceneShelfV3/ProductCard.js.map +7 -0
  320. package/dist/esm/biz-components/SceneShelfV3/index.d.ts +76 -0
  321. package/dist/esm/biz-components/SceneShelfV3/index.js +2 -0
  322. package/dist/esm/biz-components/SceneShelfV3/index.js.map +7 -0
  323. package/dist/esm/biz-components/SceneShelfV3/types.d.ts +19 -0
  324. package/dist/esm/biz-components/SceneShelfV3/types.js +1 -0
  325. package/dist/esm/biz-components/SceneShelfV3/types.js.map +7 -0
  326. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  327. package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
  328. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  329. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  330. package/dist/esm/biz-components/Specs/index.js +1 -1
  331. package/dist/esm/biz-components/Specs/index.js.map +3 -3
  332. package/dist/esm/biz-components/Subscribe/index.js +1 -1
  333. package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
  334. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  335. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  336. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  337. package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
  338. package/dist/esm/biz-components/Tabs/types.d.ts +3 -0
  339. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  340. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  341. package/dist/esm/biz-components/Title/index.js +1 -1
  342. package/dist/esm/biz-components/Title/index.js.map +3 -3
  343. package/dist/esm/biz-components/Title/types.d.ts +48 -1
  344. package/dist/esm/biz-components/WebPushPopup/index.d.ts +44 -0
  345. package/dist/esm/biz-components/WebPushPopup/index.js +2 -0
  346. package/dist/esm/biz-components/WebPushPopup/index.js.map +7 -0
  347. package/dist/esm/biz-components/WheelLottery/index.d.ts +11 -11
  348. package/dist/esm/biz-components/WheelLottery/index.js +1 -1
  349. package/dist/esm/biz-components/WheelLottery/index.js.map +3 -3
  350. package/dist/esm/biz-components/WheelLottery/types.d.ts +17 -723
  351. package/dist/esm/biz-components/WheelLottery/types.js +1 -1
  352. package/dist/esm/biz-components/WheelLottery/types.js.map +3 -3
  353. package/dist/esm/biz-components/index.d.ts +13 -0
  354. package/dist/esm/biz-components/index.js +1 -1
  355. package/dist/esm/biz-components/index.js.map +3 -3
  356. package/dist/esm/components/Countdown.js +1 -1
  357. package/dist/esm/components/Countdown.js.map +3 -3
  358. package/dist/esm/components/link.js +1 -1
  359. package/dist/esm/components/link.js.map +2 -2
  360. package/dist/esm/helpers/index.d.ts +1 -1
  361. package/dist/esm/helpers/index.js +1 -1
  362. package/dist/esm/helpers/index.js.map +3 -3
  363. package/dist/esm/helpers/isLexicalEmpty.d.ts +5 -0
  364. package/dist/esm/helpers/isLexicalEmpty.js +1 -1
  365. package/dist/esm/helpers/isLexicalEmpty.js.map +3 -3
  366. package/dist/esm/hooks/useEmarsysWebPush.d.ts +111 -0
  367. package/dist/esm/hooks/useEmarsysWebPush.js +2 -0
  368. package/dist/esm/hooks/useEmarsysWebPush.js.map +7 -0
  369. package/dist/esm/hooks/useGridRowCount.d.ts +16 -0
  370. package/dist/esm/hooks/useGridRowCount.js +2 -0
  371. package/dist/esm/hooks/useGridRowCount.js.map +7 -0
  372. package/dist/esm/hooks/useProductListTrack.d.ts +43 -0
  373. package/dist/esm/hooks/useProductListTrack.js +2 -0
  374. package/dist/esm/hooks/useProductListTrack.js.map +7 -0
  375. package/dist/esm/types/props.d.ts +16 -0
  376. package/package.json +4 -2
  377. package/static/emarsys-service-worker.js +31 -0
  378. package/style.css +208 -5
  379. package/tailwind.config.js +11 -1
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var B=Object.create;var d=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var q=(t,e)=>{for(var r in e)d(t,r,{get:e[r],enumerable:!0})},R=(t,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of z(e))!P.call(t,l)&&l!==r&&d(t,l,{get:()=>e[l],enumerable:!(c=V(e,l))||c.enumerable});return t};var x=(t,e,r)=>(r=t!=null?B(M(t)):{},R(e||!t||!t.__esModule?d(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>R(d({},"__esModule",{value:!0}),t);var Y={};q(Y,{default:()=>K});module.exports=F(Y);var g=require("react/jsx-runtime"),i=x(require("react")),m=require("../../helpers/utils.js"),v=require("class-variance-authority"),w=x(require("./useAnchorPosition.js")),L=require("../../components/container.js"),S=require("../../shared/Styles.js");const j=(0,v.cva)("anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden",{variants:{alignment:{start:"tablet:justify-start",center:"tablet:justify-center",end:"tablet:justify-end"},size:{small:"gap-3",large:"gap-6"}},defaultVariants:{alignment:"start",size:"small"}}),U=(0,v.cva)("anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300",{variants:{size:{small:"py-3",large:"py-4"}},defaultVariants:{size:"small"}}),W=(0,v.cva)("!sticky top-0 !z-40 w-full",{variants:{theme:{light:"bg-white",dark:"bg-[#1E2024]"}},defaultVariants:{theme:"light"}}),_={defaultColor:"text-[#4A4C56]",activeColor:"text-[#080A0F]",activeIndicatorColor:"after:bg-brand-0"},G={defaultColor:"text-[#8A8D92]",activeColor:"text-white",activeIndicatorColor:"after:bg-brand-0"},T=i.forwardRef(({classNames:t={},data:e,onItemClick:r,buttonStyle:c,className:l,...D},E)=>{const{alignment:H="start",theme:b="light",size:y="small"}=e,f=(0,w.default)(e.sectionIds?.map(o=>o.targetId)||[]),u=i.useRef(null),h=i.useRef(null),N=i.useRef([]);i.useImperativeHandle(E,()=>u.current);const p=b==="dark"?G:_,I={defaultColor:c?.defaultColor??p.defaultColor,activeColor:c?.activeColor??p.activeColor,activeIndicatorColor:c?.activeIndicatorColor??p.activeIndicatorColor},C=i.useCallback(o=>{const n=N.current[o];if(n&&h.current){const s=h.current,a=n,A=a.offsetLeft-s.offsetWidth/2+a.offsetWidth/2;typeof s.scrollTo=="function"&&s.scrollTo({left:A,behavior:"smooth"})}},[]);return i.useEffect(()=>{if(!f)return;const o=e.sectionIds?.findIndex(n=>n.targetId===f);o!==void 0&&o!==-1&&C(o)},[f,e.sectionIds,C]),(0,g.jsx)(L.Container,{ref:u,className:(0,m.cn)(W({theme:b}),t?.root),...D,children:(0,g.jsx)("div",{ref:h,className:(0,m.cn)(j({alignment:H,size:y}),"relative",t?.content),children:e.sectionIds?.map((o,n)=>{const s=f===o.targetId;return(0,g.jsx)("button",{ref:a=>{a&&(N.current[n]=a)},"aria-current":s?!0:void 0,onClick:()=>{if(C(n),r){r(o,n);return}const a=document.getElementById(o.targetId);if(a&&u.current){const A=u.current.offsetHeight,k=a.getBoundingClientRect().top+window.scrollY-A;window.scrollTo({top:k,behavior:"smooth"})}},className:(0,m.cn)(U({size:y}),s?[I.activeColor,I.activeIndicatorColor,"after:w-full after:opacity-100"]:I.defaultColor,t?.item),children:o.label},o.targetId)})})})});T.displayName="AnchorNavigation";var K=(0,S.withLayout)(T);
1
+ "use strict";"use client";var M=Object.create;var u=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var _=(t,e)=>{for(var n in e)u(t,n,{get:e[n],enumerable:!0})},R=(t,e,n,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of $(e))!F.call(t,l)&&l!==n&&u(t,l,{get:()=>e[l],enumerable:!(c=P(e,l))||c.enumerable});return t};var T=(t,e,n)=>(n=t!=null?M(q(t)):{},R(e||!t||!t.__esModule?u(n,"default",{value:t,enumerable:!0}):n,t)),j=t=>R(u({},"__esModule",{value:!0}),t);var O={};_(O,{default:()=>J});module.exports=j(O);var g=require("react/jsx-runtime"),i=T(require("react")),m=require("../../helpers/utils.js"),v=require("class-variance-authority"),E=T(require("./useAnchorPosition.js")),L=require("../../components/container.js"),S=require("../../shared/Styles.js"),H=require("../../hooks/useExposure.js");const x="copy",w="anchor_navigation",U=(0,v.cva)("anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden",{variants:{alignment:{start:"tablet:justify-start",center:"tablet:justify-center",end:"tablet:justify-end"},size:{small:"gap-3",large:"gap-6"}},defaultVariants:{alignment:"start",size:"small"}}),W=(0,v.cva)("anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300",{variants:{size:{small:"py-3",large:"py-4"}},defaultVariants:{size:"small"}}),G=(0,v.cva)("!sticky top-0 !z-40 w-full",{variants:{theme:{light:"bg-white",dark:"bg-[#1E2024]"}},defaultVariants:{theme:"light"}}),K={defaultColor:"text-[#4A4C56]",activeColor:"text-[#080A0F]",activeIndicatorColor:"after:bg-brand-0"},Y={defaultColor:"text-[#8A8D92]",activeColor:"text-white",activeIndicatorColor:"after:bg-brand-0"},D=i.forwardRef(({classNames:t={},data:e,onItemClick:n,buttonStyle:c,className:l,...k},B)=>{const{alignment:V="start",theme:A="light",size:y="small"}=e,d=(0,E.default)(e.sectionIds?.map(o=>o.targetId)||[]),f=i.useRef(null),h=i.useRef(null),N=i.useRef([]);i.useImperativeHandle(B,()=>f.current),(0,H.useExposure)(f,{componentType:x,componentName:w,componentTitle:"",componentDescription:""});const p=A==="dark"?Y:K,I={defaultColor:c?.defaultColor??p.defaultColor,activeColor:c?.activeColor??p.activeColor,activeIndicatorColor:c?.activeIndicatorColor??p.activeIndicatorColor},b=i.useCallback(o=>{const a=N.current[o];if(a&&h.current){const s=h.current,r=a,C=r.offsetLeft-s.offsetWidth/2+r.offsetWidth/2;typeof s.scrollTo=="function"&&s.scrollTo({left:C,behavior:"smooth"})}},[]);return i.useEffect(()=>{if(!d)return;const o=e.sectionIds?.findIndex(a=>a.targetId===d);o!==void 0&&o!==-1&&b(o)},[d,e.sectionIds,b]),(0,g.jsx)(L.Container,{ref:f,className:(0,m.cn)(G({theme:A}),t?.root),...k,children:(0,g.jsx)("div",{ref:h,className:(0,m.cn)(U({alignment:V,size:y}),"relative",t?.content),children:e.sectionIds?.map((o,a)=>{const s=d===o.targetId;return(0,g.jsx)("button",{ref:r=>{r&&(N.current[a]=r)},"data-headless-type-name":`${x}#${w}`,"data-headless-title-desc-button":`##${o.label}`,"data-headless-nav-position":`${o.label}#${a+1}`,"aria-current":s?!0:void 0,onClick:()=>{if(b(a),n){n(o,a);return}const r=document.getElementById(o.targetId);if(r&&f.current){const C=f.current.offsetHeight,z=r.getBoundingClientRect().top+window.scrollY-C;window.scrollTo({top:z,behavior:"smooth"})}},className:(0,m.cn)(W({size:y}),s?[I.activeColor,I.activeIndicatorColor,"after:w-full after:opacity-100"]:I.defaultColor,t?.item),children:o.label},o.targetId)})})})});D.displayName="AnchorNavigation";var J=(0,S.withLayout)(D);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/AnchorNavigation/index.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport useAnchorPosition from './useAnchorPosition.js'\nimport { Container } from '../../components/container.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nexport interface AnchorNavigationSemanticName {\n root: 'root'\n content: 'content'\n item: 'item'\n}\n\n/**\n * \u5BFC\u822A\u9879\u5BF9\u9F50\u65B9\u5411\u6837\u5F0F\u53D8\u4F53\n */\nconst anchorNavigationVariants = cva(\n 'anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden',\n {\n variants: {\n alignment: {\n start: 'tablet:justify-start',\n center: 'tablet:justify-center',\n end: 'tablet:justify-end',\n },\n size: {\n small: 'gap-3',\n large: 'gap-6',\n },\n },\n defaultVariants: {\n alignment: 'start',\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BFC\u822A\u9879\u6837\u5F0F\u53D8\u4F53\uFF08\u4E0D\u542B\u989C\u8272\uFF0C\u989C\u8272\u7531 buttonStyle \u63A7\u5236\uFF09\n */\nconst anchorItemVariants = cva(\n 'anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300',\n {\n variants: {\n size: {\n small: 'py-3',\n large: 'py-4',\n },\n },\n defaultVariants: {\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BB9\u5668\u4E3B\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst containerVariants = cva('!sticky top-0 !z-40 w-full', {\n variants: {\n theme: {\n light: 'bg-white',\n dark: 'bg-[#1E2024]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u5141\u8BB8\u6309 theme \u5206\u522B\u8986\u76D6\u9ED8\u8BA4\u8272\u3001\u6FC0\u6D3B\u6587\u5B57\u8272\u3001\u6FC0\u6D3B\u6307\u793A\u5668\u8272\n */\nexport interface AnchorButtonStyle {\n /** \u9ED8\u8BA4\uFF08\u672A\u6FC0\u6D3B\uFF09\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-secondary' */\n defaultColor?: string\n /** \u6FC0\u6D3B\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-primary' */\n activeColor?: string\n /** \u6FC0\u6D3B\u6307\u793A\u5668\uFF08\u4E0B\u5212\u7EBF\uFF09\u80CC\u666F\u8272\uFF0CTailwind class\uFF0C\u5982 'after:bg-brand-0' */\n activeIndicatorColor?: string\n}\n\n/**\n * \u951A\u70B9\u9879\u63A5\u53E3\n */\nexport interface AnchorSectionItem {\n targetId: string\n label: string\n}\n\n/**\n * AnchorNavigation \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface AnchorNavigationData {\n /** \u951A\u70B9\u5217\u8868 */\n sectionIds: AnchorSectionItem[]\n /** \u5BFC\u822A\u9879\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F */\n alignment?: 'start' | 'center' | 'end'\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u5BFC\u822A\u5927\u5C0F */\n size?: 'small' | 'large'\n}\n\nexport interface AnchorNavigationProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof anchorNavigationVariants> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: AnchorNavigationData\n /** \u8BED\u4E49\u5316\u7C7B\u540D */\n classNames?: Partial<Record<keyof AnchorNavigationSemanticName, string>>\n /** \u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F20\u5165\u65F6\u4F1A\u66FF\u4EE3\u9ED8\u8BA4\u7684\u6EDA\u52A8\u884C\u4E3A */\n onItemClick?: (item: AnchorSectionItem, index: number) => void\n /**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u8986\u76D6 light/dark \u4E3B\u9898\u4E0B\u7684\u9ED8\u8BA4\u989C\u8272\u3002\n * \u672A\u4F20\u65F6\u6309\u4E3B\u9898\u4F7F\u7528\u5185\u7F6E\u9ED8\u8BA4\u503C\u3002\n *\n * @example\n * // \u81EA\u5B9A\u4E49\u989C\u8272\n * buttonStyle={{ defaultColor: 'text-info-secondary', activeColor: 'text-info-primary', activeIndicatorColor: 'after:bg-brand-3' }}\n */\n buttonStyle?: AnchorButtonStyle\n}\n\n/** light \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst LIGHT_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#4A4C56]',\n activeColor: 'text-[#080A0F]',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/** dark \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst DARK_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#8A8D92]',\n activeColor: 'text-white',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/**\n * AnchorNavigation - \u951A\u70B9\u5BFC\u822A\n *\n * @description \u951A\u70B9\u5BFC\u822A\n */\nconst AnchorNavigation = React.forwardRef<HTMLDivElement, AnchorNavigationProps>(\n ({ classNames = {}, data, onItemClick, buttonStyle, className, ...rest }, ref) => {\n const { alignment = 'start', theme = 'light', size = 'small' } = data\n const activeId = useAnchorPosition(data.sectionIds?.map(item => item.targetId) || [])\n const rootRef = React.useRef<HTMLDivElement>(null)\n const containerRef = React.useRef<HTMLDivElement>(null)\n const sectionRefs = React.useRef<HTMLButtonElement[]>([])\n\n // \u66B4\u9732 rootRef \u7ED9\u5916\u90E8 ref\n React.useImperativeHandle(ref, () => rootRef.current as HTMLDivElement)\n\n // \u5408\u5E76\u4E3B\u9898\u9ED8\u8BA4\u503C\u4E0E\u5916\u90E8\u4F20\u5165\u7684 buttonStyle\n const themeDefaults = theme === 'dark' ? DARK_DEFAULTS : LIGHT_DEFAULTS\n const resolvedButtonStyle: Required<AnchorButtonStyle> = {\n defaultColor: buttonStyle?.defaultColor ?? themeDefaults.defaultColor,\n activeColor: buttonStyle?.activeColor ?? themeDefaults.activeColor,\n activeIndicatorColor: buttonStyle?.activeIndicatorColor ?? themeDefaults.activeIndicatorColor,\n }\n\n const autoScrollToActiveItem = React.useCallback((activeIdIndex: number) => {\n const curRef = sectionRefs.current[activeIdIndex]\n\n if (curRef && containerRef.current) {\n const container = containerRef.current\n const button = curRef\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n\n // \u68C0\u67E5 scrollTo \u65B9\u6CD5\u662F\u5426\u5B58\u5728\uFF08\u517C\u5BB9\u6D4B\u8BD5\u73AF\u5883\u548C\u65E7\u6D4F\u89C8\u5668\uFF09\n if (typeof container.scrollTo === 'function') {\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n }, [])\n\n // \u5F53\u5C4F\u5E55\u6EDA\u52A8\u5BFC\u81F4 activeId \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5BFC\u822A\u680F\u5230\u5BF9\u5E94\u9879\n React.useEffect(() => {\n if (!activeId) return\n\n const activeIndex = data.sectionIds?.findIndex(item => item.targetId === activeId)\n if (activeIndex !== undefined && activeIndex !== -1) {\n autoScrollToActiveItem(activeIndex)\n }\n }, [activeId, data.sectionIds, autoScrollToActiveItem])\n\n return (\n <Container ref={rootRef} className={cn(containerVariants({ theme }), classNames?.root)} {...rest}>\n <div\n ref={containerRef}\n className={cn(anchorNavigationVariants({ alignment, size }), 'relative', classNames?.content)}\n >\n {data.sectionIds?.map((item, index) => {\n const isActive = activeId === item.targetId\n\n return (\n <button\n key={item.targetId}\n ref={el => {\n if (el) {\n sectionRefs.current[index] = el\n }\n }}\n aria-current={isActive ? true : undefined}\n onClick={() => {\n // \u9ED8\u8BA4\u884C\u4E3A\uFF1A\u6EDA\u52A8\u5230\u5BF9\u5E94\u951A\u70B9\n autoScrollToActiveItem(index)\n\n // \u5982\u679C\u6709\u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F7F\u7528\u81EA\u5B9A\u4E49\u4E8B\u4EF6\n if (onItemClick) {\n onItemClick(item, index)\n return\n }\n\n // \u624B\u52A8\u8BA1\u7B97\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u8003\u8651\u5BFC\u822A\u680F\u9AD8\u5EA6\n const targetElement = document.getElementById(item.targetId)\n if (targetElement && rootRef.current) {\n const navHeight = rootRef.current.offsetHeight\n const targetPosition = targetElement.getBoundingClientRect().top + window.scrollY - navHeight\n\n window.scrollTo({\n top: targetPosition,\n behavior: 'smooth',\n })\n }\n }}\n className={cn(\n anchorItemVariants({ size }),\n isActive\n ? [\n resolvedButtonStyle.activeColor,\n resolvedButtonStyle.activeIndicatorColor,\n 'after:w-full after:opacity-100',\n ]\n : resolvedButtonStyle.defaultColor,\n classNames?.item\n )}\n >\n {item.label}\n </button>\n )\n })}\n </div>\n </Container>\n )\n }\n)\n\nAnchorNavigation.displayName = 'AnchorNavigation'\nexport default withLayout(AnchorNavigation)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyMc,IAAAI,EAAA,6BAvMdC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAAuC,oCACvCC,EAA8B,qCAC9BC,EAA0B,yCAC1BC,EAA2B,kCAW3B,MAAMC,KAA2B,OAC/B,4FACA,CACE,SAAU,CACR,UAAW,CACT,MAAO,uBACP,OAAQ,wBACR,IAAK,oBACP,EACA,KAAM,CACJ,MAAO,QACP,MAAO,OACT,CACF,EACA,gBAAiB,CACf,UAAW,QACX,KAAM,OACR,CACF,CACF,EAKMC,KAAqB,OACzB,oLACA,CACE,SAAU,CACR,KAAM,CACJ,MAAO,OACP,MAAO,MACT,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CACF,EAKMC,KAAoB,OAAI,6BAA8B,CAC1D,SAAU,CACR,MAAO,CACL,MAAO,WACP,KAAM,cACR,CACF,EACA,gBA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time", "React", "import_utils", "import_class_variance_authority", "import_useAnchorPosition", "import_container", "import_Styles", "anchorNavigationVariants", "anchorItemVariants", "containerVariants", "LIGHT_DEFAULTS", "DARK_DEFAULTS", "AnchorNavigation", "classNames", "data", "onItemClick", "buttonStyle", "className", "rest", "ref", "alignment", "theme", "size", "activeId", "useAnchorPosition", "item", "rootRef", "containerRef", "sectionRefs", "themeDefaults", "resolvedButtonStyle", "autoScrollToActiveItem", "activeIdIndex", "curRef", "container", "button", "scrollLeft", "activeIndex", "index", "isActive", "el", "targetElement", "navHeight", "targetPosition"]
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport useAnchorPosition from './useAnchorPosition.js'\nimport { Container } from '../../components/container.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'copy'\nconst componentName = 'anchor_navigation'\n\nexport interface AnchorNavigationSemanticName {\n root: 'root'\n content: 'content'\n item: 'item'\n}\n\n/**\n * \u5BFC\u822A\u9879\u5BF9\u9F50\u65B9\u5411\u6837\u5F0F\u53D8\u4F53\n */\nconst anchorNavigationVariants = cva(\n 'anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden',\n {\n variants: {\n alignment: {\n start: 'tablet:justify-start',\n center: 'tablet:justify-center',\n end: 'tablet:justify-end',\n },\n size: {\n small: 'gap-3',\n large: 'gap-6',\n },\n },\n defaultVariants: {\n alignment: 'start',\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BFC\u822A\u9879\u6837\u5F0F\u53D8\u4F53\uFF08\u4E0D\u542B\u989C\u8272\uFF0C\u989C\u8272\u7531 buttonStyle \u63A7\u5236\uFF09\n */\nconst anchorItemVariants = cva(\n 'anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300',\n {\n variants: {\n size: {\n small: 'py-3',\n large: 'py-4',\n },\n },\n defaultVariants: {\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BB9\u5668\u4E3B\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst containerVariants = cva('!sticky top-0 !z-40 w-full', {\n variants: {\n theme: {\n light: 'bg-white',\n dark: 'bg-[#1E2024]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u5141\u8BB8\u6309 theme \u5206\u522B\u8986\u76D6\u9ED8\u8BA4\u8272\u3001\u6FC0\u6D3B\u6587\u5B57\u8272\u3001\u6FC0\u6D3B\u6307\u793A\u5668\u8272\n */\nexport interface AnchorButtonStyle {\n /** \u9ED8\u8BA4\uFF08\u672A\u6FC0\u6D3B\uFF09\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-secondary' */\n defaultColor?: string\n /** \u6FC0\u6D3B\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-primary' */\n activeColor?: string\n /** \u6FC0\u6D3B\u6307\u793A\u5668\uFF08\u4E0B\u5212\u7EBF\uFF09\u80CC\u666F\u8272\uFF0CTailwind class\uFF0C\u5982 'after:bg-brand-0' */\n activeIndicatorColor?: string\n}\n\n/**\n * \u951A\u70B9\u9879\u63A5\u53E3\n */\nexport interface AnchorSectionItem {\n targetId: string\n label: string\n}\n\n/**\n * AnchorNavigation \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface AnchorNavigationData {\n /** \u951A\u70B9\u5217\u8868 */\n sectionIds: AnchorSectionItem[]\n /** \u5BFC\u822A\u9879\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F */\n alignment?: 'start' | 'center' | 'end'\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u5BFC\u822A\u5927\u5C0F */\n size?: 'small' | 'large'\n}\n\nexport interface AnchorNavigationProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof anchorNavigationVariants> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: AnchorNavigationData\n /** \u8BED\u4E49\u5316\u7C7B\u540D */\n classNames?: Partial<Record<keyof AnchorNavigationSemanticName, string>>\n /** \u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F20\u5165\u65F6\u4F1A\u66FF\u4EE3\u9ED8\u8BA4\u7684\u6EDA\u52A8\u884C\u4E3A */\n onItemClick?: (item: AnchorSectionItem, index: number) => void\n /**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u8986\u76D6 light/dark \u4E3B\u9898\u4E0B\u7684\u9ED8\u8BA4\u989C\u8272\u3002\n * \u672A\u4F20\u65F6\u6309\u4E3B\u9898\u4F7F\u7528\u5185\u7F6E\u9ED8\u8BA4\u503C\u3002\n *\n * @example\n * // \u81EA\u5B9A\u4E49\u989C\u8272\n * buttonStyle={{ defaultColor: 'text-info-secondary', activeColor: 'text-info-primary', activeIndicatorColor: 'after:bg-brand-3' }}\n */\n buttonStyle?: AnchorButtonStyle\n}\n\n/** light \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst LIGHT_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#4A4C56]',\n activeColor: 'text-[#080A0F]',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/** dark \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst DARK_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#8A8D92]',\n activeColor: 'text-white',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/**\n * AnchorNavigation - \u951A\u70B9\u5BFC\u822A\n *\n * @description \u951A\u70B9\u5BFC\u822A\n */\nconst AnchorNavigation = React.forwardRef<HTMLDivElement, AnchorNavigationProps>(\n ({ classNames = {}, data, onItemClick, buttonStyle, className, ...rest }, ref) => {\n const { alignment = 'start', theme = 'light', size = 'small' } = data\n const activeId = useAnchorPosition(data.sectionIds?.map(item => item.targetId) || [])\n const rootRef = React.useRef<HTMLDivElement>(null)\n const containerRef = React.useRef<HTMLDivElement>(null)\n const sectionRefs = React.useRef<HTMLButtonElement[]>([])\n\n // \u66B4\u9732 rootRef \u7ED9\u5916\u90E8 ref\n React.useImperativeHandle(ref, () => rootRef.current as HTMLDivElement)\n\n // \u66DD\u5149\u57CB\u70B9\n useExposure(rootRef, {\n componentType,\n componentName,\n componentTitle: '',\n componentDescription: '',\n })\n\n // \u5408\u5E76\u4E3B\u9898\u9ED8\u8BA4\u503C\u4E0E\u5916\u90E8\u4F20\u5165\u7684 buttonStyle\n const themeDefaults = theme === 'dark' ? DARK_DEFAULTS : LIGHT_DEFAULTS\n const resolvedButtonStyle: Required<AnchorButtonStyle> = {\n defaultColor: buttonStyle?.defaultColor ?? themeDefaults.defaultColor,\n activeColor: buttonStyle?.activeColor ?? themeDefaults.activeColor,\n activeIndicatorColor: buttonStyle?.activeIndicatorColor ?? themeDefaults.activeIndicatorColor,\n }\n\n const autoScrollToActiveItem = React.useCallback((activeIdIndex: number) => {\n const curRef = sectionRefs.current[activeIdIndex]\n\n if (curRef && containerRef.current) {\n const container = containerRef.current\n const button = curRef\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n\n // \u68C0\u67E5 scrollTo \u65B9\u6CD5\u662F\u5426\u5B58\u5728\uFF08\u517C\u5BB9\u6D4B\u8BD5\u73AF\u5883\u548C\u65E7\u6D4F\u89C8\u5668\uFF09\n if (typeof container.scrollTo === 'function') {\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n }, [])\n\n // \u5F53\u5C4F\u5E55\u6EDA\u52A8\u5BFC\u81F4 activeId \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5BFC\u822A\u680F\u5230\u5BF9\u5E94\u9879\n React.useEffect(() => {\n if (!activeId) return\n\n const activeIndex = data.sectionIds?.findIndex(item => item.targetId === activeId)\n if (activeIndex !== undefined && activeIndex !== -1) {\n autoScrollToActiveItem(activeIndex)\n }\n }, [activeId, data.sectionIds, autoScrollToActiveItem])\n\n return (\n <Container ref={rootRef} className={cn(containerVariants({ theme }), classNames?.root)} {...rest}>\n <div\n ref={containerRef}\n className={cn(anchorNavigationVariants({ alignment, size }), 'relative', classNames?.content)}\n >\n {data.sectionIds?.map((item, index) => {\n const isActive = activeId === item.targetId\n\n return (\n <button\n key={item.targetId}\n ref={el => {\n if (el) {\n sectionRefs.current[index] = el\n }\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`##${item.label}`}\n data-headless-nav-position={`${item.label}#${index + 1}`}\n aria-current={isActive ? true : undefined}\n onClick={() => {\n // \u9ED8\u8BA4\u884C\u4E3A\uFF1A\u6EDA\u52A8\u5230\u5BF9\u5E94\u951A\u70B9\n autoScrollToActiveItem(index)\n\n // \u5982\u679C\u6709\u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F7F\u7528\u81EA\u5B9A\u4E49\u4E8B\u4EF6\n if (onItemClick) {\n onItemClick(item, index)\n return\n }\n\n // \u624B\u52A8\u8BA1\u7B97\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u8003\u8651\u5BFC\u822A\u680F\u9AD8\u5EA6\n const targetElement = document.getElementById(item.targetId)\n if (targetElement && rootRef.current) {\n const navHeight = rootRef.current.offsetHeight\n const targetPosition = targetElement.getBoundingClientRect().top + window.scrollY - navHeight\n\n window.scrollTo({\n top: targetPosition,\n behavior: 'smooth',\n })\n }\n }}\n className={cn(\n anchorItemVariants({ size }),\n isActive\n ? [\n resolvedButtonStyle.activeColor,\n resolvedButtonStyle.activeIndicatorColor,\n 'after:w-full after:opacity-100',\n ]\n : resolvedButtonStyle.defaultColor,\n classNames?.item\n )}\n >\n {item.label}\n </button>\n )\n })}\n </div>\n </Container>\n )\n }\n)\n\nAnchorNavigation.displayName = 'AnchorNavigation'\nexport default withLayout(AnchorNavigation)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqNc,IAAAI,EAAA,6BAnNdC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAAuC,oCACvCC,EAA8B,qCAC9BC,EAA0B,yCAC1BC,EAA2B,kCAC3BC,EAA4B,sCAE5B,MAAMC,EAAgB,OAChBC,EAAgB,oBAWhBC,KAA2B,OAC/B,4FACA,CACE,SAAU,CACR,UAAW,CACT,MAAO,uBACP,OAAQ,wBACR,IAAK,oBACP,EACA,KAAM,CACJ,MAAO,QACP,MAAO,OACT,CACF,EACA,gBAAiB,CACf,UAAW,QACX,KAAM,OACR,CACF,CACF,EAKMC,KAAqB,OACzB,oLACA,CACE,SAAU,CACR,KAAM,CACJ,MAAO,OACP,MAAO,MACT,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CACF,EAKMC,KAAoB,OAAI,6BAA8B,CAC1D,SAAU,CACR,MAAO,CACL,MAAO,WACP,KAAM,cACR,CACF,EACA,gBAAiB,CACf,MAAO,OACT,CACF,CAAC,EAwDKC,EAA8C,CAClD,aAAc,iBACd,YAAa,iBACb,qBAAsB,kBACxB,EAGMC,EAA6C,CACjD,aAAc,iBACd,YAAa,aACb,qBAAsB,kBACxB,EAOMC,EAAmBd,EAAM,WAC7B,CAAC,CAAE,WAAAe,EAAa,CAAC,EAAG,KAAAC,EAAM,YAAAC,EAAa,YAAAC,EAAa,UAAAC,EAAW,GAAGC,CAAK,EAAGC,IAAQ,CAChF,KAAM,CAAE,UAAAC,EAAY,QAAS,MAAAC,EAAQ,QAAS,KAAAC,EAAO,OAAQ,EAAIR,EAC3DS,KAAW,EAAAC,SAAkBV,EAAK,YAAY,IAAIW,GAAQA,EAAK,QAAQ,GAAK,CAAC,CAAC,EAC9EC,EAAU5B,EAAM,OAAuB,IAAI,EAC3C6B,EAAe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EAAK,SAEnC,SACE,OAAC,UAEC,IAAKe,GAAM,CACLA,IACFZ,EAAY,QAAQU,CAAK,EAAIE,EAEjC,EACA,0BAAyB,GAAGnC,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,KAAKmB,EAAK,KAAK,GAChD,6BAA4B,GAAGA,EAAK,KAAK,IAAIa,EAAQ,CAAC,GACtD,eAAcC,EAAW,GAAO,OAChC,QAAS,IAAM,CAKb,GAHAR,EAAuBO,CAAK,EAGxBvB,EAAa,CACfA,EAAYU,EAAMa,CAAK,EACvB,MACF,CAGA,MAAMG,EAAgB,SAAS,eAAehB,EAAK,QAAQ,EAC3D,GAAIgB,GAAiBf,EAAQ,QAAS,CACpC,MAAMgB,EAAYhB,EAAQ,QAAQ,aAC5BiB,EAAiBF,EAAc,sBAAsB,EAAE,IAAM,OAAO,QAAUC,EAEpF,OAAO,SAAS,CACd,IAAKC,EACL,SAAU,QACZ,CAAC,CACH,CACF,EACA,aAAW,MACTnC,EAAmB,CAAE,KAAAc,CAAK,CAAC,EAC3BiB,EACI,CACET,EAAoB,YACpBA,EAAoB,qBACpB,gCACF,EACAA,EAAoB,aACxBjB,GAAY,IACd,EAEC,SAAAY,EAAK,OA5CDA,EAAK,QA6CZ,CAEJ,CAAC,EACH,EACF,CAEJ,CACF,EAEAb,EAAiB,YAAc,mBAC/B,IAAOjB,KAAQ,cAAWiB,CAAgB",
6
+ "names": ["AnchorNavigation_exports", "__export", "AnchorNavigation_default", "__toCommonJS", "import_jsx_runtime", "React", "import_utils", "import_class_variance_authority", "import_useAnchorPosition", "import_container", "import_Styles", "import_useExposure", "componentType", "componentName", "anchorNavigationVariants", "anchorItemVariants", "containerVariants", "LIGHT_DEFAULTS", "DARK_DEFAULTS", "AnchorNavigation", "classNames", "data", "onItemClick", "buttonStyle", "className", "rest", "ref", "alignment", "theme", "size", "activeId", "useAnchorPosition", "item", "rootRef", "containerRef", "sectionRefs", "themeDefaults", "resolvedButtonStyle", "autoScrollToActiveItem", "activeIdIndex", "curRef", "container", "button", "scrollLeft", "activeIndex", "index", "isActive", "el", "targetElement", "navHeight", "targetPosition"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var T=Object.create;var m=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var H=(e,i)=>{for(var r in i)m(e,r,{get:i[r],enumerable:!0})},v=(e,i,r,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of I(i))!D.call(e,n)&&n!==r&&m(e,n,{get:()=>i[n],enumerable:!(o=E(i,n))||o.enumerable});return e};var h=(e,i,r)=>(r=e!=null?T(j(e)):{},v(i||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),q=e=>v(m({},"__esModule",{value:!0}),e);var W={};H(W,{default:()=>Q});module.exports=q(W);var t=require("react/jsx-runtime"),s=require("react"),l=require("../../helpers/utils.js"),y=h(require("../../components/picture.js")),L=require("../../shared/Styles.js"),N=require("react-responsive"),C=require("../../hooks/useExposure.js"),M=require("../AiuiProvider/index.js"),c=require("swiper/react"),a=require("swiper/modules"),G=require("../Title/index.js"),S=h(require("../../components/link.js"));const z="copy",R="store_benefits",F=(e,i)=>{const r=[];for(let o=0;o<e.length;o+=i)r.push(e.slice(o,o+i));return r},w=(0,s.forwardRef)(({data:{items:e=[],itemShape:i},className:r},o)=>{const[n,B]=(0,s.useState)(!1),f=(0,N.useMediaQuery)({query:"(max-width: 768px)"}),x=(0,s.useRef)(null),u=(0,s.useRef)(null),{locale:k="us"}=(0,M.useAiuiContext)();(0,s.useImperativeHandle)(o,()=>u.current),(0,C.useExposure)(u,{componentType:z,componentName:R}),(0,s.useEffect)(()=>{B(f)},[f]);const A=n?F(e,3):e;return(0,t.jsx)("div",{ref:u,className:(0,l.cn)("brand-equity-wrapper w-full",r),children:n?(0,t.jsxs)(c.Swiper,{className:(0,l.cn)(r),modules:[a.FreeMode,a.Mousewheel,a.Pagination],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:x.current},breakpoints:{0:{spaceBetween:12}},children:[A?.map((p,d)=>(0,t.jsx)(c.SwiperSlide,{className:"!flex flex-col gap-3",children:Array.isArray(p)&&p?.map((P,g)=>(0,t.jsx)(b,{data:P,itemShape:i,index:g,locale:k},g))},"SwiperSlide"+d)),(0,t.jsx)("div",{ref:x,className:"mt-3 flex justify-center"})]}):(0,t.jsx)("div",{className:(0,l.cn)("laptop:gap-4 tablet:grid-cols-2 laptop:grid-cols-4 grid grid-cols-1 gap-3"),children:e.map((p,d)=>(0,t.jsx)(b,{data:p,itemShape:i,index:d,locale:k},d))})})}),b=({data:e,itemShape:i,index:r,locale:o})=>(0,t.jsxs)("div",{className:(0,l.cn)("brand-equity-item","lg-desktop:p-8 desktop:p-6 p-4","box-border flex w-full flex-col justify-between overflow-hidden bg-[#DAE7F2]",i==="round"?"rounded-box":"rounded-none"),children:[(0,t.jsxs)("div",{className:"lg-desktop:h-[50px] flex h-10 items-center justify-between gap-3",children:[(0,t.jsx)("h3",{className:"link-item-title lg-desktop:text-[18px] desktop:text-[16px] line-clamp-2 flex-1 text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#080A0F]",children:e.title}),(0,t.jsx)("div",{className:"link-item-img lg-desktop:size-[36px] size-[30px] shrink-0",children:(0,t.jsx)(y.default,{className:"size-full object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})})]}),(0,t.jsxs)("div",{className:"box-border overflow-hidden",children:[(0,t.jsx)("p",{title:e.description||"",className:"link-item-description lg-desktop:text-[24px] line-clamp-4 text-[20px] font-semibold leading-[1.2] tracking-[-0.04em] text-[#767880]",children:e.description||""}),(0,t.jsxs)(S.default,{href:(0,l.getLocalizedPath)(e?.link||"",o),asChild:!e?.link,className:"desktop:mt-4 mt-2 flex items-center gap-0.5 no-underline hover:underline",children:[(0,t.jsx)("span",{className:"link-item-text laptop:text-base text-sm",children:e?.linkText}),(0,t.jsx)("div",{className:"size-6",children:(0,t.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,t.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777",strokeWidth:"1.5",strokeLinecap:"round"})})})]})]})]});w.displayName="BrandCardLink";var Q=(0,L.withLayout)(w);
1
+ "use strict";"use client";var I=Object.create;var m=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var z=(e,i)=>{for(var r in i)m(e,r,{get:i[r],enumerable:!0})},h=(e,i,r,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of H(i))!q.call(e,n)&&n!==r&&m(e,n,{get:()=>i[n],enumerable:!(o=j(i,n))||o.enumerable});return e};var w=(e,i,r)=>(r=e!=null?I(R(e)):{},h(i||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),F=e=>h(m({},"__esModule",{value:!0}),e);var Q={};z(Q,{default:()=>$});module.exports=F(Q);var t=require("react/jsx-runtime"),s=require("react"),a=require("../../helpers/utils.js"),C=w(require("../../components/picture.js")),M=require("../../shared/Styles.js"),S=require("react-responsive"),B=require("../../hooks/useExposure.js"),f=require("../AiuiProvider/index.js"),A=require("../../shared/trackUrlRef.js"),c=require("swiper/react"),l=require("swiper/modules"),G=require("../Title/index.js"),P=w(require("../../components/link.js"));const b="copy",y="store_benefits",_=(e,i)=>{const r=[];for(let o=0;o<e.length;o+=i)r.push(e.slice(o,o+i));return r},L=(0,s.forwardRef)(({data:{items:e=[],itemShape:i},className:r},o)=>{const[n,T]=(0,s.useState)(!1),k=(0,S.useMediaQuery)({query:"(max-width: 768px)"}),x=(0,s.useRef)(null),u=(0,s.useRef)(null),{locale:g="us",trackingData:U}=(0,f.useAiuiContext)();(0,s.useImperativeHandle)(o,()=>u.current),(0,B.useExposure)(u,{componentType:b,componentName:y}),(0,s.useEffect)(()=>{T(k)},[k]);const D=n?_(e,3):e;return(0,t.jsx)("div",{ref:u,className:(0,a.cn)("brand-equity-wrapper w-full",r),children:n?(0,t.jsxs)(c.Swiper,{className:(0,a.cn)(r),modules:[l.FreeMode,l.Mousewheel,l.Pagination],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:x.current},breakpoints:{0:{spaceBetween:12}},children:[D?.map((p,d)=>(0,t.jsx)(c.SwiperSlide,{className:"!flex flex-col gap-3",children:Array.isArray(p)&&p?.map((E,v)=>(0,t.jsx)(N,{data:E,itemShape:i,index:v,locale:g},v))},"SwiperSlide"+d)),(0,t.jsx)("div",{ref:x,className:"mt-3 flex justify-center"})]}):(0,t.jsx)("div",{className:(0,a.cn)("laptop:gap-4 tablet:grid-cols-2 laptop:grid-cols-4 grid grid-cols-1 gap-3"),children:e.map((p,d)=>(0,t.jsx)(N,{data:p,itemShape:i,index:d,locale:g},d))})})}),N=({data:e,itemShape:i,index:r,locale:o})=>{const{trackingData:n}=(0,f.useAiuiContext)();return(0,t.jsxs)("div",{className:(0,a.cn)("brand-equity-item","lg-desktop:p-8 desktop:p-6 p-4","box-border flex w-full flex-col justify-between overflow-hidden bg-[#DAE7F2]",i==="round"?"rounded-box":"rounded-none"),children:[(0,t.jsxs)("div",{className:"lg-desktop:h-[50px] flex h-10 items-center justify-between gap-3",children:[(0,t.jsx)("h3",{className:"link-item-title lg-desktop:text-[18px] desktop:text-[16px] line-clamp-2 flex-1 text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#080A0F]",children:e.title}),(0,t.jsx)("div",{className:"link-item-img lg-desktop:size-[36px] size-[30px] shrink-0",children:(0,t.jsx)(C.default,{className:"size-full object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})})]}),(0,t.jsxs)("div",{className:"box-border overflow-hidden",children:[(0,t.jsx)("p",{title:e.description||"",className:"link-item-description lg-desktop:text-[24px] line-clamp-4 text-[20px] font-semibold leading-[1.2] tracking-[-0.04em] text-[#767880]",children:e.description||""}),(0,t.jsxs)(P.default,{href:(0,A.trackUrlRef)((0,a.getLocalizedPath)(e?.link||"",o),`${n?.contextHandle||""}_${b}_${y}`),asChild:!e?.link,className:"desktop:mt-4 mt-2 flex items-center gap-0.5 no-underline hover:underline",children:[(0,t.jsx)("span",{className:"link-item-text laptop:text-base text-sm",children:e?.linkText}),(0,t.jsx)("div",{className:"size-6",children:(0,t.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,t.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777",strokeWidth:"1.5",strokeLinecap:"round"})})})]})]})]})};L.displayName="BrandCardLink";var $=(0,M.withLayout)(L);
2
2
  //# sourceMappingURL=BrandCardLink.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/BrandCardLink/BrandCardLink.tsx"],
4
- "sourcesContent": ["'use client'\nimport { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'\n\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { BrandCardLinkProps, BrandCardLinkItemProps } from './types.js'\n\nimport type { Img } from '../../types/props.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport Title from '../Title/index.js'\nimport Link from '../../components/link.js'\n\nconst componentType = 'copy'\nconst componentName = 'store_benefits'\n\nconst chunkArray = (arr: BrandCardLinkItemProps[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst BrandCardLink = forwardRef<HTMLDivElement, BrandCardLinkProps>(\n ({ data: { items = [], itemShape }, className }, ref) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n const paginationRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef<HTMLDivElement>(null)\n const { locale = 'us' } = useAiuiContext()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const itemsArray = isMobile ? chunkArray(items, 3) : items\n return (\n <div ref={innerRef} className={cn('brand-equity-wrapper w-full', className)}>\n {isMobile ? (\n <Swiper\n className={cn(className)}\n modules={[FreeMode, Mousewheel, Pagination]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n },\n }}\n >\n {itemsArray?.map((item, jIndex) => (\n <SwiperSlide key={'SwiperSlide' + jIndex} className=\"!flex flex-col gap-3\">\n {Array.isArray(item) &&\n item?.map((item, index) => (\n <BrandCardLinkItem key={index} data={item} itemShape={itemShape} index={index} locale={locale} />\n ))}\n </SwiperSlide>\n ))}\n <div ref={paginationRef} className=\"mt-3 flex justify-center\"></div>\n </Swiper>\n ) : (\n <div className={cn('laptop:gap-4 tablet:grid-cols-2 laptop:grid-cols-4 grid grid-cols-1 gap-3')}>\n {items.map((item, index) => (\n <BrandCardLinkItem key={index} data={item} itemShape={itemShape} index={index} locale={locale} />\n ))}\n </div>\n )}\n </div>\n )\n }\n)\n\nconst BrandCardLinkItem = ({\n data,\n itemShape,\n index,\n locale,\n}: {\n data: BrandCardLinkItemProps\n itemShape?: 'round' | 'square'\n index: number\n locale: string\n}) => {\n return (\n <div\n className={cn(\n 'brand-equity-item',\n 'lg-desktop:p-8 desktop:p-6 p-4',\n // 'laptop:h-[192px] lg-desktop:h-[240px] h-[160px]',\n 'box-border flex w-full flex-col justify-between overflow-hidden bg-[#DAE7F2]',\n itemShape === 'round' ? 'rounded-box' : 'rounded-none'\n )}\n >\n <div className=\"lg-desktop:h-[50px] flex h-10 items-center justify-between gap-3\">\n <h3 className=\"link-item-title lg-desktop:text-[18px] desktop:text-[16px] line-clamp-2 flex-1 text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#080A0F]\">\n {data.title}\n </h3>\n <div className=\"link-item-img lg-desktop:size-[36px] size-[30px] shrink-0\">\n <Picture\n className=\"size-full object-cover\"\n source={data.icon?.url}\n alt={data.icon?.alt}\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n </div>\n <div className=\"box-border overflow-hidden\">\n <p\n title={data.description || ''}\n className=\"link-item-description lg-desktop:text-[24px] line-clamp-4 text-[20px] font-semibold leading-[1.2] tracking-[-0.04em] text-[#767880]\"\n >\n {data.description || ''}\n </p>\n <Link\n href={getLocalizedPath(data?.link || '', locale)}\n asChild={!data?.link}\n className=\"desktop:mt-4 mt-2 flex items-center gap-0.5 no-underline hover:underline\"\n >\n <span className=\"link-item-text laptop:text-base text-sm\">{data?.linkText}</span>\n <div className=\"size-6\">\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n ></path>\n </svg>\n </div>\n </Link>\n </div>\n </div>\n )\n}\n\nBrandCardLink.displayName = 'BrandCardLink'\n\nexport default withLayout(BrandCardLink)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDU,IAAAI,EAAA,6BAlDVC,E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V,EAAE,0BACF,OAAO,OACP,YAAY,MACZ,cAAc,QACf,EACH,EACF,GACF,GACF,GACF,EAIJhB,EAAc,YAAc,gBAE5B,IAAOpB,KAAQ,cAAWoB,CAAa",
6
- "names": ["BrandCardLink_exports", "__export", "BrandCardLink_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_react_responsive", "import_useExposure", "import_AiuiProvider", "import_modules", "import_Title", "import_link", "componentType", "componentName", "chunkArray", "arr", "size", "chunks", "i", "BrandCardLink", "items", "itemShape", "className", "ref", "isMobile", "setIsMobile", "mediaQuery", "paginationRef", "innerRef", "locale", "itemsArray", "item", "jIndex", "index", "BrandCardLinkItem", "data", "Picture", "Link"]
4
+ "sourcesContent": ["'use client'\nimport { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'\n\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { BrandCardLinkProps, BrandCardLinkItemProps } from './types.js'\n\nimport type { Img } from '../../types/props.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport Title from '../Title/index.js'\nimport Link from '../../components/link.js'\n\nconst componentType = 'copy'\nconst componentName = 'store_benefits'\n\nconst chunkArray = (arr: BrandCardLinkItemProps[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst BrandCardLink = forwardRef<HTMLDivElement, BrandCardLinkProps>(\n ({ data: { items = [], itemShape }, className }, ref) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n const paginationRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef<HTMLDivElement>(null)\n const { locale = 'us', trackingData } = useAiuiContext()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const itemsArray = isMobile ? chunkArray(items, 3) : items\n return (\n <div ref={innerRef} className={cn('brand-equity-wrapper w-full', className)}>\n {isMobile ? (\n <Swiper\n className={cn(className)}\n modules={[FreeMode, Mousewheel, Pagination]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n },\n }}\n >\n {itemsArray?.map((item, jIndex) => (\n <SwiperSlide key={'SwiperSlide' + jIndex} className=\"!flex flex-col gap-3\">\n {Array.isArray(item) &&\n item?.map((item, index) => (\n <BrandCardLinkItem key={index} data={item} itemShape={itemShape} index={index} locale={locale} />\n ))}\n </SwiperSlide>\n ))}\n <div ref={paginationRef} className=\"mt-3 flex justify-center\"></div>\n </Swiper>\n ) : (\n <div className={cn('laptop:gap-4 tablet:grid-cols-2 laptop:grid-cols-4 grid grid-cols-1 gap-3')}>\n {items.map((item, index) => (\n <BrandCardLinkItem key={index} data={item} itemShape={itemShape} index={index} locale={locale} />\n ))}\n </div>\n )}\n </div>\n )\n }\n)\n\nconst BrandCardLinkItem = ({\n data,\n itemShape,\n index,\n locale,\n}: {\n data: BrandCardLinkItemProps\n itemShape?: 'round' | 'square'\n index: number\n locale: string\n}) => {\n const { trackingData } = useAiuiContext()\n return (\n <div\n className={cn(\n 'brand-equity-item',\n 'lg-desktop:p-8 desktop:p-6 p-4',\n // 'laptop:h-[192px] lg-desktop:h-[240px] h-[160px]',\n 'box-border flex w-full flex-col justify-between overflow-hidden bg-[#DAE7F2]',\n itemShape === 'round' ? 'rounded-box' : 'rounded-none'\n )}\n >\n <div className=\"lg-desktop:h-[50px] flex h-10 items-center justify-between gap-3\">\n <h3 className=\"link-item-title lg-desktop:text-[18px] desktop:text-[16px] line-clamp-2 flex-1 text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#080A0F]\">\n {data.title}\n </h3>\n <div className=\"link-item-img lg-desktop:size-[36px] size-[30px] shrink-0\">\n <Picture\n className=\"size-full object-cover\"\n source={data.icon?.url}\n alt={data.icon?.alt}\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n </div>\n <div className=\"box-border overflow-hidden\">\n <p\n title={data.description || ''}\n className=\"link-item-description lg-desktop:text-[24px] line-clamp-4 text-[20px] font-semibold leading-[1.2] tracking-[-0.04em] text-[#767880]\"\n >\n {data.description || ''}\n </p>\n <Link\n href={trackUrlRef(\n getLocalizedPath(data?.link || '', locale),\n `${trackingData?.contextHandle || ''}_${componentType}_${componentName}`\n )}\n asChild={!data?.link}\n className=\"desktop:mt-4 mt-2 flex items-center gap-0.5 no-underline hover:underline\"\n >\n <span className=\"link-item-text laptop:text-base text-sm\">{data?.linkText}</span>\n <div className=\"size-6\">\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n ></path>\n </svg>\n </div>\n </Link>\n </div>\n </div>\n )\n}\n\nBrandCardLink.displayName = 'BrandCardLink'\n\nexport default withLayout(BrandCardLink)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoDU,IAAAI,EAAA,6BAnDVC,EAA6E,iBAE7EC,EAAqC,kCACrCC,EAAoB,0CACpBC,EAA2B,kCAI3BC,EAA8B,4BAC9BC,EAA4B,sCAC5BC,EAA+B,oCAC/BC,EAA4B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,KAAK,OAEL,mBAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,YAAY,MACZ,cAAc,QACf,EACH,EACF,GACF,GACF,GACF,CAEJ,EAEAjB,EAAc,YAAc,gBAE5B,IAAOrB,KAAQ,cAAWqB,CAAa",
6
+ "names": ["BrandCardLink_exports", "__export", "BrandCardLink_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_react_responsive", "import_useExposure", "import_AiuiProvider", "import_trackUrlRef", "import_modules", "import_Title", "import_link", "componentType", "componentName", "chunkArray", "arr", "size", "chunks", "i", "BrandCardLink", "items", "itemShape", "className", "ref", "isMobile", "setIsMobile", "mediaQuery", "paginationRef", "innerRef", "locale", "trackingData", "itemsArray", "item", "jIndex", "index", "BrandCardLinkItem", "data", "Picture", "Link"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var m=Object.create;var t=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var M=(e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})},d=(e,i,r,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of g(i))!P.call(e,s)&&s!==r&&t(e,s,{get:()=>i[s],enumerable:!(n=u(i,s))||n.enumerable});return e};var B=(e,i,r)=>(r=e!=null?m(S(e)):{},d(i||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),y=e=>d(t({},"__esModule",{value:!0}),e);var h={};M(h,{default:()=>b});module.exports=y(h);var o=require("react/jsx-runtime"),w=B(require("react")),l=require("swiper/react"),a=require("swiper/modules"),k=require("swiper/css"),v=require("swiper/css/pagination");const f=w.default.forwardRef(({data:e,Slide:i,id:r,isHalf:n,paginationClassName:s},x)=>(0,o.jsxs)(l.Swiper,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1,el:`.swiper-pagination-${r}`},className:`!overflow-visible ${s||""}`,modules:[a.FreeMode,a.Mousewheel,a.Pagination],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:n?2:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:n?2:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:[e?.list?.map((c,p)=>(0,o.jsx)(l.SwiperSlide,{className:"!h-[unset]",children:(0,o.jsx)(i,{data:c,configuration:{...e?.configuration,index:p}})},r+"SwiperSlide"+p)),(0,o.jsx)("div",{className:`swiper-pagination-${r} swiper-pagination`})]}));f.displayName="SwiperBox";var b=f;
1
+ "use strict";"use client";var S=Object.create;var l=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var b=(e,i)=>{for(var s in i)l(e,s,{get:i[s],enumerable:!0})},d=(e,i,s,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of P(i))!y.call(e,r)&&r!==s&&l(e,r,{get:()=>i[r],enumerable:!(n=M(i,r))||n.enumerable});return e};var h=(e,i,s)=>(s=e!=null?S(B(e)):{},d(i||!e||!e.__esModule?l(s,"default",{value:e,enumerable:!0}):s,e)),v=e=>d(l({},"__esModule",{value:!0}),e);var N={};b(N,{default:()=>x});module.exports=v(N);var o=require("react/jsx-runtime"),t=h(require("react")),p=require("swiper/react"),a=require("swiper/modules"),k=require("swiper/css"),G=require("swiper/css/pagination");const c=t.default.forwardRef(({data:e,Slide:i,id:s,isHalf:n,paginationClassName:r},u)=>{const[w,m]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{m(!0)},[]),w?(0,o.jsxs)(p.Swiper,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1,el:`.swiper-pagination-${s}`},className:`!overflow-visible ${r||""}`,modules:[a.FreeMode,a.Mousewheel,a.Pagination],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:n?2:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:n?2:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:[e?.list?.map((g,f)=>(0,o.jsx)(p.SwiperSlide,{className:"!h-[unset]",children:(0,o.jsx)(i,{data:g,configuration:{...e?.configuration,index:f}})},s+"SwiperSlide"+f)),(0,o.jsx)("div",{className:`swiper-pagination-${s} swiper-pagination`})]}):(0,o.jsx)("div",{ref:u})});c.displayName="SwiperBox";var x=c;
2
2
  //# sourceMappingURL=SwiperCategory.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/SwiperCategory.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n id: string\n className?: string\n isHalf?: boolean\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n /** \u81EA\u5B9A\u4E49 pagination \u6837\u5F0F\u7C7B\u540D */\n paginationClassName?: string\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(\n ({ data, Slide, id, isHalf, paginationClassName }, ref) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n el: `.swiper-pagination-${id}`,\n }}\n className={`!overflow-visible ${paginationClassName || ''}`}\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isHalf ? 2 : 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isHalf ? 2 : 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{ ...data?.configuration, index: jIndex }} />\n </SwiperSlide>\n ))}\n <div className={`swiper-pagination-${id} swiper-pagination`} />\n </Swiper>\n )\n }\n)\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwBM,IAAAI,EAAA,6BAvBNC,EAAkB,oBAClBA,EAAoC,wBACpCC,EAAiD,0BACjDC,EAAO,sBACPC,EAAO,iCAgBP,MAAMC,EAAY,EAAAC,QAAM,WACtB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAAC,EAAI,OAAAC,EAAQ,oBAAAC,CAAoB,EAAGC,OAE/C,QAAC,UACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,GAChB,GAAI,sBAAsBH,CAAE,EAC9B,EACA,UAAW,qBAAqBE,GAAuB,EAAE,GACzD,QAAS,CAAC,WAAU,aAAY,YAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAeD,EAAS,EAAI,EAC5B,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAS,EAAI,EAC5B,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGH,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,UAAAA,GAAM,MAAM,IAAI,CAACM,EAAMC,OACtB,OAAC,eAA8C,UAAU,aACvD,mBAACN,EAAA,CAAM,KAAMK,EAAM,cAAe,CAAE,GAAGN,GAAM,cAAe,MAAOO,CAAO,EAAG,GAD7DL,EAAK,cAAgBK,CAEvC,CACD,KACD,OAAC,OAAI,UAAW,qBAAqBL,CAAE,qBAAsB,GAC/D,CAGN,EAEAJ,EAAU,YAAc,YAExB,IAAOP,EAAQO",
6
- "names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_css", "import_pagination", "SwiperBox", "React", "data", "Slide", "id", "isHalf", "paginationClassName", "ref", "item", "jIndex"]
4
+ "sourcesContent": ["'use client'\nimport React, { useState, useEffect } from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n id: string\n className?: string\n isHalf?: boolean\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n /** \u81EA\u5B9A\u4E49 pagination \u6837\u5F0F\u7C7B\u540D */\n paginationClassName?: string\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(\n ({ data, Slide, id, isHalf, paginationClassName }, ref) => {\n const [isMounted, setIsMounted] = useState(false)\n\n useEffect(() => {\n setIsMounted(true)\n }, [])\n\n if (!isMounted) {\n return <div ref={ref as React.Ref<HTMLDivElement>} />\n }\n\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n el: `.swiper-pagination-${id}`,\n }}\n className={`!overflow-visible ${paginationClassName || ''}`}\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isHalf ? 2 : 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isHalf ? 2 : 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{ ...data?.configuration, index: jIndex }} />\n </SwiperSlide>\n ))}\n <div className={`swiper-pagination-${id} swiper-pagination`} />\n </Swiper>\n )\n }\n)\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8Ba,IAAAI,EAAA,6BA7BbC,EAA2C,oBAC3CA,EAAoC,wBACpCC,EAAiD,0BACjDC,EAAO,sBACPC,EAAO,iCAgBP,MAAMC,EAAY,EAAAC,QAAM,WACtB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAAC,EAAI,OAAAC,EAAQ,oBAAAC,CAAoB,EAAGC,IAAQ,CACzD,KAAM,CAACC,EAAWC,CAAY,KAAI,YAAS,EAAK,EAMhD,SAJA,aAAU,IAAM,CACdA,EAAa,EAAI,CACnB,EAAG,CAAC,CAAC,EAEAD,KAKH,QAAC,UACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,GAChB,GAAI,sBAAsBJ,CAAE,EAC9B,EACA,UAAW,qBAAqBE,GAAuB,EAAE,GACzD,QAAS,CAAC,WAAU,aAAY,YAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAeD,EAAS,EAAI,EAC5B,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAS,EAAI,EAC5B,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGH,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,UAAAA,GAAM,MAAM,IAAI,CAACQ,EAAMC,OACtB,OAAC,eAA8C,UAAU,aACvD,mBAACR,EAAA,CAAM,KAAMO,EAAM,cAAe,CAAE,GAAGR,GAAM,cAAe,MAAOS,CAAO,EAAG,GAD7DP,EAAK,cAAgBO,CAEvC,CACD,KACD,OAAC,OAAI,UAAW,qBAAqBP,CAAE,qBAAsB,GAC/D,KAjDO,OAAC,OAAI,IAAKG,EAAkC,CAmDvD,CACF,EAEAP,EAAU,YAAc,YAExB,IAAOP,EAAQO",
6
+ "names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_css", "import_pagination", "SwiperBox", "React", "data", "Slide", "id", "isHalf", "paginationClassName", "ref", "isMounted", "setIsMounted", "item", "jIndex"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var L=Object.create;var d=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var a in t)d(e,a,{get:t[a],enumerable:!0})},k=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!S.call(e,n)&&n!==a&&d(e,n,{get:()=>t[n],enumerable:!(i=T(t,n))||i.enumerable});return e};var u=(e,t,a)=>(a=e!=null?L(M(e)):{},k(t||!e||!e.__esModule?d(a,"default",{value:e,enumerable:!0}):a,e)),j=e=>k(d({},"__esModule",{value:!0}),e);var F={};D(F,{default:()=>z});module.exports=j(F);var o=require("react/jsx-runtime"),l=u(require("react")),r=require("../../helpers/utils.js"),h=u(require("../../components/picture.js")),N=require("../../shared/Styles.js"),_=u(require("../Title/index.js")),f=u(require("./SwiperCategory.js")),x=require("../../hooks/useExposure.js"),v=require("../../shared/trackUrlRef.js");const p="image",m="category_banner",g=5,H=3,P=(e,t)=>{const a=[];for(let i=0;i<e.length;i+=t)a.push(e.slice(i,i+t));return a},A=({data:e,configuration:t})=>{const a=(0,l.useRef)(null);return(0,x.useExposure)(a,{componentType:p,componentName:m,componentTitle:e?.name,position:t?.index+1}),(0,o.jsx)("div",{className:(0,r.cn)("relative max-h-[240px] overflow-hidden"),children:(0,o.jsx)("div",{className:(0,r.cn)("aspect-w-[167] aspect-h-[120]","tablet:aspect-w-[404] tablet:aspect-h-[240]","laptop:aspect-w-[212] laptop:aspect-h-[144]","desktop:aspect-w-[205] desktop:aspect-h-[192]","lg-desktop:aspect-w-[264] lg-desktop:aspect-h-[240]"),children:(0,o.jsxs)("div",{ref:a,className:(0,r.cn)("tablet:p-3 laptop:p-4 desktop:p-6 absolute inset-0 max-h-[240px] justify-between","bg-container-primary hover:bg-info-white group box-border flex cursor-pointer flex-col overflow-hidden duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,o.jsx)("div",{className:"flex items-center justify-center transition-all duration-300 group-hover:scale-110",children:(0,o.jsx)("a",{"aria-label":e?.name,href:(0,v.trackUrlRef)(e?.link,`${p}_${m}`),"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.name}`,onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,o.jsx)(h.default,{alt:e?.image?.alt||"",source:e?.image?.url||"",className:"laptop:size-1/2 tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,o.jsx)("p",{className:"lg-desktop:text-lg lg-desktop:!leading-6 text-info-primary box-border line-clamp-2 text-center text-sm font-bold leading-4",children:e?.name})]})})})},B=({data:e,configuration:t,index:a,isFirstItemLarger:i})=>{const n=(0,l.useRef)(null);(0,x.useExposure)(n,{componentType:p,componentName:m,componentTitle:e?.name,position:t?.index+1});const s=a===0;return(0,o.jsxs)("div",{ref:n,className:(0,r.cn)("bg-container-primary box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer duration-300",i?(0,r.cn)("p-4",s?"aspect-h-[252] row-span-2":"aspect-h-[120]"):"max-h-[126px] px-3 py-4",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,o.jsx)("a",{href:(0,v.trackUrlRef)(e?.link,`${p}_${m}`),"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.name}`,"data-headless-nav-position":`''#${t?.index+1}`,onClick:()=>t?.event?.primaryButton(e,t?.index+1),children:(0,o.jsx)(h.default,{source:e?.image?.url||"",alt:e?.image?.alt||"",className:(0,r.cn)("m-auto mb-2 flex justify-center object-contain [&_img]:h-full [&_img]:w-auto [&_img]:object-contain",i?(0,r.cn)(s?"size-full max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]"):"size-[72px]")})}),(0,o.jsx)("p",{className:(0,r.cn)("text-info-primary w-full text-center text-sm font-bold",i?"line-clamp-2":"shrink-0 truncate"),children:e?.name})]})},R=({data:e,configuration:t})=>{const i=(t?.totalCategories??0)<=g;return(0,o.jsx)("div",{className:`gap-3 ${i?"grid grid-cols-2":"flex h-full flex-col"}`,children:e?.map((n,s)=>(0,o.jsx)(B,{index:s,data:n,configuration:t,isFirstItemLarger:i},s))})},C=l.default.forwardRef((e,t)=>{const{data:a,className:i="",key:n,event:s,...I}=e,c=(a?.isShowSelect?a?.products:a?.productData)||[],y=c.length>g,b=c.length,$=P(c,y?H:g),w=(0,l.useRef)(null);return(0,l.useImperativeHandle)(t,()=>w.current),(0,o.jsxs)("div",{...I,ref:w,className:(0,r.cn)("w-full overflow-hidden",i,{"aiui-dark":a?.theme==="dark"}),children:[a?.title&&(0,o.jsx)(_.default,{data:{title:a?.title},className:"text-4xl"}),(0,o.jsx)("div",{className:"tablet:block hidden",children:(0,o.jsx)(f.default,{id:`Category${n}`,Slide:A,data:{list:c,configuration:{shape:a?.shape,event:s,title:a?.title,totalCategories:b}},paginationClassName:"[&_.swiper-pagination]:!-bottom-6"})}),(0,o.jsx)("div",{className:"tablet:hidden block",children:(0,o.jsx)(f.default,{id:`Category1${n}`,Slide:R,data:{list:$,configuration:{shape:a?.shape,event:s,title:a?.title,totalCategories:b}},isHalf:y,paginationClassName:"[&_.swiper-pagination]:!-bottom-6"})}),(0,o.jsx)("div",{className:"h-7"})]})});C.displayName="Category";var z=(0,N.withLayout)(C);
1
+ "use strict";"use client";var L=Object.create;var d=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var a in t)d(e,a,{get:t[a],enumerable:!0})},_=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of D(t))!M.call(e,i)&&i!==a&&d(e,i,{get:()=>t[i],enumerable:!(n=T(t,i))||n.enumerable});return e};var u=(e,t,a)=>(a=e!=null?L(E(e)):{},_(t||!e||!e.__esModule?d(a,"default",{value:e,enumerable:!0}):a,e)),j=e=>_(d({},"__esModule",{value:!0}),e);var O={};S(O,{default:()=>F});module.exports=j(O);var o=require("react/jsx-runtime"),s=u(require("react")),r=require("../../helpers/utils.js"),h=u(require("../../components/picture.js")),I=require("../../shared/Styles.js"),$=u(require("../Title/index.js")),x=u(require("./SwiperCategory.js")),v=require("../../hooks/useExposure.js"),y=require("../../shared/trackUrlRef.js"),b=require("../AiuiProvider/index.js");const p="image",m="category_banner",f=5,A=3,P=(e,t)=>{const a=[];for(let n=0;n<e.length;n+=t)a.push(e.slice(n,n+t));return a},B=({data:e,configuration:t})=>{const a=(0,s.useRef)(null),{trackingData:n}=(0,b.useAiuiContext)(),i=n?.contextHandle||"";return(0,v.useExposure)(a,{componentType:p,componentName:m,componentTitle:e?.name,position:t?.index+1}),(0,o.jsx)("div",{className:(0,r.cn)("relative max-h-[240px] overflow-hidden"),children:(0,o.jsx)("div",{className:(0,r.cn)("aspect-w-[167] aspect-h-[120]","tablet:aspect-w-[404] tablet:aspect-h-[240]","laptop:aspect-w-[212] laptop:aspect-h-[144]","desktop:aspect-w-[205] desktop:aspect-h-[192]","lg-desktop:aspect-w-[264] lg-desktop:aspect-h-[240]"),children:(0,o.jsxs)("div",{ref:a,className:(0,r.cn)("tablet:p-3 laptop:p-4 desktop:p-6 absolute inset-0 max-h-[240px] justify-between","bg-container-primary hover:bg-info-white group box-border flex cursor-pointer flex-col overflow-hidden duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,o.jsx)("div",{className:"flex items-center justify-center transition-all duration-300 group-hover:scale-110",children:(0,o.jsx)("a",{"aria-label":e?.name,href:(0,y.trackUrlRef)(e?.link,`${i}_${p}_${m}`),"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.name}`,onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,o.jsx)(h.default,{alt:e?.image?.alt||"",source:e?.image?.url||"",className:"laptop:size-1/2 tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,o.jsx)("p",{className:"lg-desktop:text-lg lg-desktop:!leading-6 text-info-primary box-border line-clamp-2 text-center text-sm font-bold leading-4",children:e?.name})]})})})},R=({data:e,configuration:t,index:a,isFirstItemLarger:n})=>{const i=(0,s.useRef)(null),{trackingData:l}=(0,b.useAiuiContext)(),g=l?.contextHandle||"";(0,v.useExposure)(i,{componentType:p,componentName:m,componentTitle:e?.name,position:t?.index+1});const c=a===0;return(0,o.jsxs)("div",{ref:i,className:(0,r.cn)("bg-container-primary box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer duration-300",n?(0,r.cn)("p-4",c?"aspect-h-[252] row-span-2":"aspect-h-[120]"):"max-h-[126px] px-3 py-4",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,o.jsx)("a",{href:(0,y.trackUrlRef)(e?.link,`${g}_${p}_${m}`),"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.name}`,"data-headless-nav-position":`''#${t?.index+1}`,onClick:()=>t?.event?.primaryButton(e,t?.index+1),children:(0,o.jsx)(h.default,{source:e?.image?.url||"",alt:e?.image?.alt||"",className:(0,r.cn)("m-auto mb-2 flex justify-center object-contain [&_img]:h-full [&_img]:w-auto [&_img]:object-contain",n?(0,r.cn)(c?"size-full max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]"):"size-[72px]")})}),(0,o.jsx)("p",{className:(0,r.cn)("text-info-primary w-full text-center text-sm font-bold",n?"line-clamp-2":"shrink-0 truncate"),children:e?.name})]})},z=({data:e,configuration:t})=>{const n=(t?.totalCategories??0)<=f;return(0,o.jsx)("div",{className:`gap-3 ${n?"grid grid-cols-2":"flex h-full flex-col"}`,children:e?.map((i,l)=>(0,o.jsx)(R,{index:l,data:i,configuration:t,isFirstItemLarger:n},l))})},N=s.default.forwardRef((e,t)=>{const{data:a,className:n="",key:i,event:l,...g}=e,c=(a?.isShowSelect?a?.products:a?.productData)||[],k=c.length>f,w=c.length,H=P(c,k?A:f),C=(0,s.useRef)(null);return(0,s.useImperativeHandle)(t,()=>C.current),(0,o.jsxs)("div",{...g,ref:C,className:(0,r.cn)("w-full overflow-hidden",n,{"aiui-dark":a?.theme==="dark"}),children:[a?.title&&(0,o.jsx)($.default,{data:{title:a?.title},className:"text-4xl"}),(0,o.jsx)("div",{className:"tablet:block hidden",children:(0,o.jsx)(x.default,{id:`Category${i}`,Slide:B,data:{list:c,configuration:{shape:a?.shape,event:l,title:a?.title,totalCategories:w}},paginationClassName:"[&_.swiper-pagination]:!-bottom-6"})}),(0,o.jsx)("div",{className:"tablet:hidden block",children:(0,o.jsx)(x.default,{id:`Category1${i}`,Slide:z,data:{list:H,configuration:{shape:a?.shape,event:l,title:a?.title,totalCategories:w}},isHalf:k,paginationClassName:"[&_.swiper-pagination]:!-bottom-6"})}),(0,o.jsx)("div",{className:"h-7"})]})});N.displayName="Category";var F=(0,I.withLayout)(N);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'category_banner'\nconst MOBILE_FULL_PAGE_CAPACITY = 5\nconst MOBILE_COMPACT_PAGE_SIZE = 3\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: Img\n name: string\n link?: string\n}\n\nexport interface CategoryProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.name,\n position: configuration?.index + 1,\n })\n\n return (\n <div className={cn('relative max-h-[240px] overflow-hidden')}>\n <div\n className={cn(\n 'aspect-w-[167] aspect-h-[120]',\n 'tablet:aspect-w-[404] tablet:aspect-h-[240]',\n 'laptop:aspect-w-[212] laptop:aspect-h-[144]',\n 'desktop:aspect-w-[205] desktop:aspect-h-[192]',\n 'lg-desktop:aspect-w-[264] lg-desktop:aspect-h-[240]'\n )}\n >\n <div\n ref={ref}\n className={cn(\n 'tablet:p-3 laptop:p-4 desktop:p-6 absolute inset-0 max-h-[240px] justify-between',\n 'bg-container-primary hover:bg-info-white group box-border flex cursor-pointer flex-col overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"flex items-center justify-center transition-all duration-300 group-hover:scale-110\">\n <a\n aria-label={data?.name}\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n source={data?.image?.url || ''}\n className=\"laptop:size-1/2 tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </a>\n </div>\n <p className=\"lg-desktop:text-lg lg-desktop:!leading-6 text-info-primary box-border line-clamp-2 text-center text-sm font-bold leading-4\">\n {data?.name}\n </p>\n </div>\n </div>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\u54C1\u7C7B\u5C55\u793A\u7EC4\u4EF6\nconst SingleMobileItem = ({\n data,\n configuration,\n index,\n isFirstItemLarger,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n isFirstItemLarger: boolean\n}) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.name,\n position: configuration?.index + 1,\n })\n\n const isFirstItem = index === 0\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-primary box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer duration-300',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u6837\u5F0F\n isFirstItemLarger\n ? cn('p-4', isFirstItem ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]')\n : 'max-h-[126px] px-3 py-4',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n data-headless-nav-position={`''#${configuration?.index + 1}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index + 1)}\n >\n <Picture\n source={data?.image?.url || ''}\n alt={data?.image?.alt || ''}\n className={cn(\n 'm-auto mb-2 flex justify-center object-contain [&_img]:h-full [&_img]:w-auto [&_img]:object-contain',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u56FE\u7247\u5C3A\u5BF8\n isFirstItemLarger\n ? cn(isFirstItem ? 'size-full max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]')\n : 'size-[72px]'\n )}\n />\n </a>\n <p\n className={cn(\n 'text-info-primary w-full text-center text-sm font-bold',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u6587\u5B57\u663E\u793A\n isFirstItemLarger ? 'line-clamp-2' : 'shrink-0 truncate'\n )}\n >\n {data?.name}\n </p>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\u54C1\u7C7B\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n const totalCategories = configuration?.totalCategories ?? 0\n // \u5F53\u6570\u91CF\u5C11\u4E8E\u5BB9\u5668\u65F6\uFF0C\u7B2C\u4E00\u4E2A\u9879\u76EE\u4F1A\u5360\u636E\u66F4\u5927\u7A7A\u95F4\n const isFirstItemLarger = totalCategories <= MOBILE_FULL_PAGE_CAPACITY\n return (\n <div className={`gap-3 ${isFirstItemLarger ? 'grid grid-cols-2' : 'flex h-full flex-col'}`}>\n {data?.map((item, index) => (\n <SingleMobileItem\n key={index}\n index={index}\n data={item}\n configuration={configuration}\n isFirstItemLarger={isFirstItemLarger}\n />\n ))}\n </div>\n )\n}\n\nconst Category = React.forwardRef<HTMLDivElement, CategoryProps>((props, ref) => {\n const { data, className = '', key, event, ...rest } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = (data?.isShowSelect ? data?.products : data?.productData) || []\n const isCardShow = currentData.length > MOBILE_FULL_PAGE_CAPACITY\n const totalCategories = currentData.length\n const mobileSlides = chunkArray(currentData, isCardShow ? MOBILE_COMPACT_PAGE_SIZE : MOBILE_FULL_PAGE_CAPACITY)\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div\n {...rest}\n ref={innerRef}\n className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}\n >\n {data?.title && <Title data={{ title: data?.title }} className=\"text-4xl\" />}\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{\n list: currentData,\n configuration: { shape: data?.shape, event: event, title: data?.title, totalCategories },\n }}\n paginationClassName=\"[&_.swiper-pagination]:!-bottom-6\"\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{\n list: mobileSlides,\n configuration: { shape: data?.shape, event: event, title: data?.title, totalCategories },\n }}\n isHalf={isCardShow}\n paginationClassName=\"[&_.swiper-pagination]:!-bottom-6\"\n />\n </div>\n <div className=\"h-7\" />\n </div>\n )\n})\n\nCategory.displayName = 'Category'\n\nexport default withLayout(Category)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA0EQ,IAAAI,EAAA,6BAzERC,EAAmD,oBACnDC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAC3BC,EAAkB,gCAClBC,EAAsB,kCACtBC,EAA4B,sCAC5BC,EAA4B,uCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,kBAChBC,EAA4B,EAC5BC,EAA2B,EA+B3BC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAAS,EAAI,EAAG,EAAIF,EAAI,OAAQ,GAAKC,EACnCC,EAAO,KAAKF,EAAI,MAAM,EAAG,EAAIC,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEMC,EAAiB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAAmD,CAC/F,MAAMC,KAAM,UAAuB,IAAI,EAEvC,wBAAYA,EAAK,CACf,cAAAX,EACA,cAAAC,EACA,eAAgBQ,GAAM,KACtB,SA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AM,EAAG,UAAU,WAAW,KAC1E,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAuB,QAAA,CACC,GAAI,WAAWT,CAAG,GAClB,MAAOf,EACP,KAAM,CACJ,KAAMkB,EACN,cAAe,CAAE,MAAOjB,GAAM,MAAO,MAAOe,EAAO,MAAOf,GAAM,MAAO,gBAAAmB,CAAgB,CACzF,EACA,oBAAoB,oCACtB,EACF,KACA,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAI,QAAA,CACC,GAAI,YAAYT,CAAG,GACnB,MAAON,EACP,KAAM,CACJ,KAAMY,EACN,cAAe,CAAE,MAAOpB,GAAM,MAAO,MAAOe,EAAO,MAAOf,GAAM,MAAO,gBAAAmB,CAAgB,CACzF,EACA,OAAQD,EACR,oBAAoB,oCACtB,EACF,KACA,OAAC,OAAI,UAAU,MAAM,GACvB,CAEJ,CAAC,EAEDR,EAAS,YAAc,WAEvB,IAAO9B,KAAQ,cAAW8B,CAAQ",
6
- "names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "MOBILE_FULL_PAGE_CAPACITY", "MOBILE_COMPACT_PAGE_SIZE", "chunkArray", "arr", "size", "chunks", "CategoryPcItem", "data", "configuration", "ref", "Picture", "SingleMobileItem", "index", "isFirstItemLarger", "isFirstItem", "CategoryMobileItem", "item", "Category", "React", "props", "className", "key", "event", "rest", "currentData", "isCardShow", "totalCategories", "mobileSlides", "innerRef", "Title", "SwiperBox"]
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'category_banner'\nconst MOBILE_FULL_PAGE_CAPACITY = 5\nconst MOBILE_COMPACT_PAGE_SIZE = 3\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: Img\n name: string\n link?: string\n}\n\nexport interface CategoryProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n const { trackingData } = useAiuiContext()\n const contextHandle = trackingData?.contextHandle || ''\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.name,\n position: configuration?.index + 1,\n })\n\n return (\n <div className={cn('relative max-h-[240px] overflow-hidden')}>\n <div\n className={cn(\n 'aspect-w-[167] aspect-h-[120]',\n 'tablet:aspect-w-[404] tablet:aspect-h-[240]',\n 'laptop:aspect-w-[212] laptop:aspect-h-[144]',\n 'desktop:aspect-w-[205] desktop:aspect-h-[192]',\n 'lg-desktop:aspect-w-[264] lg-desktop:aspect-h-[240]'\n )}\n >\n <div\n ref={ref}\n className={cn(\n 'tablet:p-3 laptop:p-4 desktop:p-6 absolute inset-0 max-h-[240px] justify-between',\n 'bg-container-primary hover:bg-info-white group box-border flex cursor-pointer flex-col overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"flex items-center justify-center transition-all duration-300 group-hover:scale-110\">\n <a\n aria-label={data?.name}\n href={trackUrlRef(data?.link, `${contextHandle}_${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n source={data?.image?.url || ''}\n className=\"laptop:size-1/2 tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </a>\n </div>\n <p className=\"lg-desktop:text-lg lg-desktop:!leading-6 text-info-primary box-border line-clamp-2 text-center text-sm font-bold leading-4\">\n {data?.name}\n </p>\n </div>\n </div>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\u54C1\u7C7B\u5C55\u793A\u7EC4\u4EF6\nconst SingleMobileItem = ({\n data,\n configuration,\n index,\n isFirstItemLarger,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n isFirstItemLarger: boolean\n}) => {\n const ref = useRef<HTMLDivElement>(null)\n\n const { trackingData } = useAiuiContext()\n const contextHandle = trackingData?.contextHandle || ''\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.name,\n position: configuration?.index + 1,\n })\n\n const isFirstItem = index === 0\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-primary box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer duration-300',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u6837\u5F0F\n isFirstItemLarger\n ? cn('p-4', isFirstItem ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]')\n : 'max-h-[126px] px-3 py-4',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a\n href={trackUrlRef(data?.link, `${contextHandle}_${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n data-headless-nav-position={`''#${configuration?.index + 1}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index + 1)}\n >\n <Picture\n source={data?.image?.url || ''}\n alt={data?.image?.alt || ''}\n className={cn(\n 'm-auto mb-2 flex justify-center object-contain [&_img]:h-full [&_img]:w-auto [&_img]:object-contain',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u56FE\u7247\u5C3A\u5BF8\n isFirstItemLarger\n ? cn(isFirstItem ? 'size-full max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]')\n : 'size-[72px]'\n )}\n />\n </a>\n <p\n className={cn(\n 'text-info-primary w-full text-center text-sm font-bold',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u6587\u5B57\u663E\u793A\n isFirstItemLarger ? 'line-clamp-2' : 'shrink-0 truncate'\n )}\n >\n {data?.name}\n </p>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\u54C1\u7C7B\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n const totalCategories = configuration?.totalCategories ?? 0\n // \u5F53\u6570\u91CF\u5C11\u4E8E\u5BB9\u5668\u65F6\uFF0C\u7B2C\u4E00\u4E2A\u9879\u76EE\u4F1A\u5360\u636E\u66F4\u5927\u7A7A\u95F4\n const isFirstItemLarger = totalCategories <= MOBILE_FULL_PAGE_CAPACITY\n return (\n <div className={`gap-3 ${isFirstItemLarger ? 'grid grid-cols-2' : 'flex h-full flex-col'}`}>\n {data?.map((item, index) => (\n <SingleMobileItem\n key={index}\n index={index}\n data={item}\n configuration={configuration}\n isFirstItemLarger={isFirstItemLarger}\n />\n ))}\n </div>\n )\n}\n\nconst Category = React.forwardRef<HTMLDivElement, CategoryProps>((props, ref) => {\n const { data, className = '', key, event, ...rest } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = (data?.isShowSelect ? data?.products : data?.productData) || []\n const isCardShow = currentData.length > MOBILE_FULL_PAGE_CAPACITY\n const totalCategories = currentData.length\n const mobileSlides = chunkArray(currentData, isCardShow ? MOBILE_COMPACT_PAGE_SIZE : MOBILE_FULL_PAGE_CAPACITY)\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div\n {...rest}\n ref={innerRef}\n className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}\n >\n {data?.title && <Title data={{ title: data?.title }} className=\"text-4xl\" />}\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{\n list: currentData,\n configuration: { shape: data?.shape, event: event, title: data?.title, totalCategories },\n }}\n paginationClassName=\"[&_.swiper-pagination]:!-bottom-6\"\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{\n list: mobileSlides,\n configuration: { shape: data?.shape, event: event, title: data?.title, totalCategories },\n }}\n isHalf={isCardShow}\n paginationClassName=\"[&_.swiper-pagination]:!-bottom-6\"\n />\n </div>\n <div className=\"h-7\" />\n </div>\n )\n})\n\nCategory.displayName = 'Category'\n\nexport default withLayout(Category)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8EQ,IAAAI,EAAA,6BA7ERC,EAAmD,oBACnDC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2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EAAS,YAAc,WAEvB,IAAOlC,KAAQ,cAAWkC,CAAQ",
6
+ "names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "componentType", "componentName", "MOBILE_FULL_PAGE_CAPACITY", "MOBILE_COMPACT_PAGE_SIZE", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "ref", "trackingData", "contextHandle", "Picture", "SingleMobileItem", "index", "isFirstItemLarger", "isFirstItem", "CategoryMobileItem", "item", "Category", "React", "props", "className", "key", "event", "rest", "currentData", "isCardShow", "totalCategories", "mobileSlides", "innerRef", "Title", "SwiperBox"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var A=Object.create;var c=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var F=(e,i)=>{for(var s in i)c(e,s,{get:i[s],enumerable:!0})},h=(e,i,s,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of $(i))!R.call(e,o)&&o!==s&&c(e,o,{get:()=>i[o],enumerable:!(l=B(i,o))||l.enumerable});return e};var v=(e,i,s)=>(s=e!=null?A(I(e)):{},h(i||!e||!e.__esModule?c(s,"default",{value:e,enumerable:!0}):s,e)),H=e=>h(c({},"__esModule",{value:!0}),e);var _={};F(_,{default:()=>V});module.exports=H(_);var t=require("react/jsx-runtime"),a=v(require("react")),k=require("react-dom"),y=v(require("../Title/index.js")),n=require("../../helpers/utils.js"),N=v(require("../../components/picture.js")),M=v(require("../SwiperBox/index.js")),L=require("../../shared/Styles.js"),d=require("../../components/avatar.js"),T=require("../../components/container.js"),C=require("../../components/text.js"),E=require("../../hooks/useExposure.js"),P=require("../../shared/trackUrlRef.js"),z=require("../AiuiProvider/index.js");const b="copy",w="product_review",D=({data:e,configuration:i})=>{const s=(0,a.useRef)(null),[l,o]=(0,a.useState)({visible:!1,x:0,y:0,text:""}),u=r=>{const p=Number(r),x=Number.isFinite(p)?Math.max(0,Math.floor(p)):0;return Array.from({length:x})||[]},m=r=>{e?.description&&o({visible:!0,x:r.clientX,y:r.clientY,text:e.description})},f=()=>{o(r=>({...r,visible:!1}))};return(0,E.useExposure)(s,{componentType:b,componentName:w,componentTitle:e?.title,componentDescription:e?.description,position:i?.index+1}),(0,t.jsx)("div",{ref:s,className:(0,n.cn)("bg-background tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300",i?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:(0,t.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[(0,t.jsxs)("div",{className:(0,n.cn)("lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between"),children:[(0,t.jsxs)("div",{className:"flex-1",children:[e?.title?(0,t.jsx)("h4",{className:"laptop:text-lg text-sm font-bold",children:e?.title}):null,(0,t.jsx)("div",{className:"mt-1 flex items-center",children:u(e?.rating)?.map?.((r,p)=>(0,t.jsx)("div",{className:"mr-1",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})})},p))})]}),(0,t.jsx)("div",{className:"desktop:size-12 size-10 overflow-hidden",children:e?.avatar?.url?(0,t.jsxs)(d.Avatar,{className:"size-full",isAdaptation:!e?.avatar?.url,children:[(0,t.jsx)(d.AvatarImage,{src:e?.avatar?.url}),(0,t.jsx)(d.AvatarFallback,{children:e?.title})]}):null})]}),(0,t.jsxs)("div",{className:"flex-1",onMouseMove:m,onMouseLeave:f,children:[(0,t.jsx)(C.Text,{className:(0,n.cn)("lg-desktop:text-2xl text-info-primary evaluate-description line-clamp-5 break-words text-xl font-bold leading-[1.2]"),children:e?.description||""}),typeof window<"u"&&l.visible&&(0,k.createPortal)((0,t.jsx)("div",{className:"pointer-events-none fixed z-[9999] max-w-xs rounded-lg bg-black/60 px-3 py-2 text-sm text-white shadow-lg backdrop-blur-sm transition-opacity duration-200",style:{left:`${l.x+16}px`,top:`${l.y+16}px`},children:l.text}),document.body)]}),(0,t.jsx)("a",{href:(0,P.trackUrlRef)((0,n.getLocalizedPath)(e?.link||"",i?.locale||"us"),`${b}_${w}`),onClick:()=>{i?.event?.primaryButton(e,i?.index+1)},"data-headless-type-name":`${b}#${w}`,"data-headless-title-desc-button":`${e?.title}#${e?.description||e?.subTitle}`,"data-headless-nav-position":`''#${i?.index+1}`,children:(0,t.jsxs)("div",{className:(0,n.cn)("mt-3 flex cursor-pointer items-center overflow-hidden bg-[#F7F8F9] p-3",i?.shape==="round"?"rounded-lg":"rounded-none"),children:[(0,t.jsx)("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:(0,t.jsx)(N.default,{className:"w-full object-cover",source:e?.img?.url,alt:e?.img?.alt||""})}),(0,t.jsx)("p",{className:"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]",children:e?.subTitle||""})]})})]})})},g=a.default.forwardRef(({className:e="",data:i,key:s,...l},o)=>{const{products:u,title:m,theme:f,...r}=i,p=(0,a.useRef)(null),{locale:x="us"}=(0,z.useAiuiContext)();return(0,a.useImperativeHandle)(o,()=>p.current),(0,t.jsx)("div",{...l,ref:p,className:e,children:(0,t.jsx)("div",{className:"evaluate-box relative z-10",children:(0,t.jsx)(T.Container,{...i?.containerProps||{},className:"overflow-hidden",children:(0,t.jsxs)("div",{ref:o,className:(0,n.cn)("w-full",e,{"aiui-dark":f==="dark"}),children:[m&&(0,t.jsx)(y.default,{data:{title:m}}),(0,t.jsx)(M.default,{className:"!overflow-visible",id:"Evaluate"+s,data:{list:u,configuration:{...r,title:m,locale:x}},Slide:D,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},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})})})})});g.displayName="Evaluate";var V=(0,L.withLayout)(g);
1
+ "use strict";"use client";var A=Object.create;var v=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var R=(e,i)=>{for(var s in i)v(e,s,{get:i[s],enumerable:!0})},k=(e,i,s,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of D(i))!I.call(e,o)&&o!==s&&v(e,o,{get:()=>i[o],enumerable:!(n=B(i,o))||n.enumerable});return e};var u=(e,i,s)=>(s=e!=null?A(H(e)):{},k(i||!e||!e.__esModule?v(s,"default",{value:e,enumerable:!0}):s,e)),F=e=>k(v({},"__esModule",{value:!0}),e);var j={};R(j,{default:()=>V});module.exports=F(j);var t=require("react/jsx-runtime"),l=u(require("react")),N=require("react-dom"),M=u(require("../Title/index.js")),a=require("../../helpers/utils.js"),L=u(require("../../components/picture.js")),T=u(require("../SwiperBox/index.js")),C=require("../../shared/Styles.js"),d=require("../../components/avatar.js"),E=require("../../components/container.js"),P=require("../../components/text.js"),$=require("../../hooks/useExposure.js"),z=require("../../shared/trackUrlRef.js"),h=require("../AiuiProvider/index.js");const b="copy",w="product_review",_=({data:e,configuration:i})=>{const s=(0,l.useRef)(null),{trackingData:n}=(0,h.useAiuiContext)(),[o,c]=(0,l.useState)({visible:!1,x:0,y:0,text:""}),m=r=>{const p=Number(r),g=Number.isFinite(p)?Math.max(0,Math.floor(p)):0;return Array.from({length:g})||[]},f=r=>{e?.description&&c({visible:!0,x:r.clientX,y:r.clientY,text:e.description})},x=()=>{c(r=>({...r,visible:!1}))};return(0,$.useExposure)(s,{componentType:b,componentName:w,componentTitle:e?.title,componentDescription:e?.description,position:i?.index+1}),(0,t.jsx)("div",{ref:s,className:(0,a.cn)("bg-background tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300",i?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:(0,t.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[(0,t.jsxs)("div",{className:(0,a.cn)("lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between"),children:[(0,t.jsxs)("div",{className:"flex-1",children:[e?.title?(0,t.jsx)("h4",{className:"laptop:text-lg text-sm font-bold",children:e?.title}):null,(0,t.jsx)("div",{className:"mt-1 flex items-center",children:m(e?.rating)?.map?.((r,p)=>(0,t.jsx)("div",{className:"mr-1",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})})},p))})]}),(0,t.jsx)("div",{className:"desktop:size-12 size-10 overflow-hidden",children:e?.avatar?.url?(0,t.jsxs)(d.Avatar,{className:"size-full",isAdaptation:!e?.avatar?.url,children:[(0,t.jsx)(d.AvatarImage,{src:e?.avatar?.url}),(0,t.jsx)(d.AvatarFallback,{children:e?.title})]}):null})]}),(0,t.jsxs)("div",{className:"flex-1",onMouseMove:f,onMouseLeave:x,children:[(0,t.jsx)(P.Text,{className:(0,a.cn)("lg-desktop:text-2xl text-info-primary evaluate-description line-clamp-5 break-words text-xl font-bold leading-[1.2]"),children:e?.description||""}),typeof window<"u"&&o.visible&&(0,N.createPortal)((0,t.jsx)("div",{className:"pointer-events-none fixed z-[9999] max-w-xs rounded-lg bg-black/60 px-3 py-2 text-sm text-white shadow-lg backdrop-blur-sm transition-opacity duration-200",style:{left:`${o.x+16}px`,top:`${o.y+16}px`},children:o.text}),document.body)]}),(0,t.jsx)("a",{href:(0,z.trackUrlRef)((0,a.getLocalizedPath)(e?.link||"",i?.locale||"us"),`${n?.contextHandle||""}_${b}_${w}`),onClick:()=>{i?.event?.primaryButton(e,i?.index+1)},"data-headless-type-name":`${b}#${w}`,"data-headless-title-desc-button":`${e?.title}#${e?.description||e?.subTitle}`,"data-headless-nav-position":`''#${i?.index+1}`,children:(0,t.jsxs)("div",{className:(0,a.cn)("mt-3 flex cursor-pointer items-center overflow-hidden bg-[#F7F8F9] p-3",i?.shape==="round"?"rounded-lg":"rounded-none"),children:[(0,t.jsx)("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:(0,t.jsx)(L.default,{className:"w-full object-cover",source:e?.img?.url,alt:e?.img?.alt||""})}),(0,t.jsx)("p",{className:"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]",children:e?.subTitle||""})]})})]})})},y=l.default.forwardRef(({className:e="",data:i,key:s,...n},o)=>{const{products:c,title:m,theme:f,...x}=i,r=(0,l.useRef)(null),{locale:p="us",trackingData:g}=(0,h.useAiuiContext)();return(0,l.useImperativeHandle)(o,()=>r.current),(0,t.jsx)("div",{...n,ref:r,className:e,children:(0,t.jsx)("div",{className:"evaluate-box relative z-10",children:(0,t.jsx)(E.Container,{...i?.containerProps||{},className:"overflow-hidden",children:(0,t.jsxs)("div",{ref:o,className:(0,a.cn)("w-full",e,{"aiui-dark":f==="dark"}),children:[m&&(0,t.jsx)(M.default,{data:{title:m}}),(0,t.jsx)(T.default,{className:"!overflow-visible",id:"Evaluate"+s,data:{list:c,configuration:{...x,title:m,locale:p}},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},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})})})})});y.displayName="Evaluate";var V=(0,C.withLayout)(y);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Evaluate/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport Title from '../Title/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps extends React.HTMLAttributes<HTMLDivElement> {\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const [tooltip, setTooltip] = useState<{ visible: boolean; x: number; y: number; text: string }>({\n visible: false,\n x: 0,\n y: 0,\n text: '',\n })\n\n const handleRating = (num: number) => {\n const raw = Number(num)\n const count = Number.isFinite(raw) ? Math.max(0, Math.floor(raw)) : 0\n return Array.from({ length: count }) || []\n }\n\n const handleMouseMove = (e: React.MouseEvent) => {\n if (data?.description) {\n setTooltip({\n visible: true,\n x: e.clientX,\n y: e.clientY,\n text: data.description,\n })\n }\n }\n\n const handleMouseLeave = () => {\n setTooltip(prev => ({ ...prev, visible: false }))\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-background tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div className={cn('lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n {data?.title ? <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4> : null}\n <div className=\"mt-1 flex items-center\">\n {handleRating(data?.rating)?.map?.((_, index) => {\n return (\n <div key={index} className=\"mr-1\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"desktop:size-12 size-10 overflow-hidden\">\n {data?.avatar?.url ? (\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </div>\n <div className=\"flex-1\" onMouseMove={handleMouseMove} onMouseLeave={handleMouseLeave}>\n <Text\n className={cn(\n 'lg-desktop:text-2xl text-info-primary evaluate-description line-clamp-5 break-words text-xl font-bold leading-[1.2]'\n )}\n >\n {data?.description || ''}\n </Text>\n {typeof window !== 'undefined' &&\n tooltip.visible &&\n createPortal(\n <div\n className=\"pointer-events-none fixed z-[9999] max-w-xs rounded-lg bg-black/60 px-3 py-2 text-sm text-white shadow-lg backdrop-blur-sm transition-opacity duration-200\"\n style={{\n left: `${tooltip.x + 16}px`,\n top: `${tooltip.y + 16}px`,\n }}\n >\n {tooltip.text}\n </div>,\n document.body\n )}\n </div>\n <a\n href={trackUrlRef(\n getLocalizedPath(data?.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n configuration?.event?.primaryButton(data, configuration?.index + 1)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description || data?.subTitle}`}\n data-headless-nav-position={`''#${configuration?.index + 1}`}\n >\n <div\n className={cn(\n 'mt-3 flex cursor-pointer items-center overflow-hidden bg-[#F7F8F9] p-3',\n configuration?.shape === 'round' ? 'rounded-lg' : 'rounded-none'\n )}\n >\n <div className=\"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center\">\n <Picture className=\"w-full object-cover\" source={data?.img?.url} alt={data?.img?.alt || ''} />\n </div>\n <p className=\"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]\">\n {data?.subTitle || ''}\n </p>\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Evaluate = React.forwardRef<HTMLDivElement, EvaluateProps>(({ className = '', data, key, ...rest }, ref) => {\n const { products, title, theme, ...other } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const { locale = 'us' } = useAiuiContext()\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div {...rest} ref={innerRef} className={className}>\n <div className=\"evaluate-box relative z-10\">\n <Container {...(data?.containerProps || {})} className=\"overflow-hidden\">\n <div ref={ref} className={cn('w-full', className, { 'aiui-dark': theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Evaluate' + key}\n data={{ list: products, configuration: { ...other, title: title, locale } }}\n Slide={EvaluateItem}\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,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </Container>\n </div>\n </div>\n )\n})\n\nEvaluate.displayName = 'Evaluate'\n\nexport default withLayout(Evaluate)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqGU,IAAAI,EAAA,6BApGVC,EAA6D,oBAC7DC,EAA6B,qBAC7BC,EAAkB,gCAClBC,EAAqC,kCACrCC,EAAoB,0CACpBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAoD,sCACpDC,EAA0B,yCAC1BC,EAAqB,oCAErBC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAA+B,oCAG/B,MAAMC,EAAgB,OACh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WAA0C,CAAC,CAAE,UAAAC,EAAY,GAAI,KAAAlB,EAAM,IAAAmB,EAAK,GAAGC,CAAK,EAAGlB,IAAQ,CAChH,KAAM,CAAE,SAAAmB,EAAU,MAAAC,EAAO,MAAAC,EAAO,GAAGC,CAAM,EAAIxB,EACvCyB,KAAW,UAAuB,IAAI,EACtC,CAAE,OAAAC,EAAS,IAAK,KAAI,kBAAe,EACzC,gCAAoBxB,EAAK,IAAMuB,EAAS,OAAyB,KAG/D,OAAC,OAAK,GAAGL,EAAM,IAAKK,EAAU,UAAWP,EACvC,mBAAC,OAAI,UAAU,6BACb,mBAAC,aAAW,GAAIlB,GAAM,gBAAkB,CAAC,EAAI,UAAU,kBACrD,oBAAC,OAAI,IAAKE,EAAK,aAAW,MAAG,SAAUgB,EAAW,CAAE,YAAaK,IAAU,MAAO,CAAC,EAChF,UAAAD,MAAS,OAAC,EAAAK,QAAA,CAAM,KAAM,CAAE,MAAOL,CAAM,EAAG,KACzC,OAAC,EAAAM,QAAA,CACC,UAAU,oBACV,GAAI,WAAaT,EACjB,KAAM,CAAE,KAAME,EAAU,cAAe,CAAE,GAAGG,EAAO,MAAOF,EAAO,OAAAI,CAAO,CAAE,EAC1E,MAAO3B,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,CACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,EACF,EACF,CAEJ,CAAC,EAEDiB,EAAS,YAAc,WAEvB,IAAOnC,KAAQ,cAAWmC,CAAQ",
6
- "names": ["Evaluate_exports", "__export", "Evaluate_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_dom", "import_Title", "import_utils", "import_picture", "import_SwiperBox", "import_Styles", "import_avatar", "import_container", "import_text", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "tooltip", "setTooltip", "handleRating", "num", "raw", "count", "handleMouseMove", "e", "handleMouseLeave", "prev", "_", "index", "Picture", "Evaluate", "React", "className", "key", "rest", "products", "title", "theme", "other", "innerRef", "locale", "Title", "SwiperBox"]
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport Title from '../Title/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps extends React.HTMLAttributes<HTMLDivElement> {\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const { trackingData } = useAiuiContext()\n const [tooltip, setTooltip] = useState<{ visible: boolean; x: number; y: number; text: string }>({\n visible: false,\n x: 0,\n y: 0,\n text: '',\n })\n\n const handleRating = (num: number) => {\n const raw = Number(num)\n const count = Number.isFinite(raw) ? Math.max(0, Math.floor(raw)) : 0\n return Array.from({ length: count }) || []\n }\n\n const handleMouseMove = (e: React.MouseEvent) => {\n if (data?.description) {\n setTooltip({\n visible: true,\n x: e.clientX,\n y: e.clientY,\n text: data.description,\n })\n }\n }\n\n const handleMouseLeave = () => {\n setTooltip(prev => ({ ...prev, visible: false }))\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-background tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div className={cn('lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n {data?.title ? <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4> : null}\n <div className=\"mt-1 flex items-center\">\n {handleRating(data?.rating)?.map?.((_, index) => {\n return (\n <div key={index} className=\"mr-1\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"desktop:size-12 size-10 overflow-hidden\">\n {data?.avatar?.url ? (\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </div>\n <div className=\"flex-1\" onMouseMove={handleMouseMove} onMouseLeave={handleMouseLeave}>\n <Text\n className={cn(\n 'lg-desktop:text-2xl text-info-primary evaluate-description line-clamp-5 break-words text-xl font-bold leading-[1.2]'\n )}\n >\n {data?.description || ''}\n </Text>\n {typeof window !== 'undefined' &&\n tooltip.visible &&\n createPortal(\n <div\n className=\"pointer-events-none fixed z-[9999] max-w-xs rounded-lg bg-black/60 px-3 py-2 text-sm text-white shadow-lg backdrop-blur-sm transition-opacity duration-200\"\n style={{\n left: `${tooltip.x + 16}px`,\n top: `${tooltip.y + 16}px`,\n }}\n >\n {tooltip.text}\n </div>,\n document.body\n )}\n </div>\n <a\n href={trackUrlRef(\n getLocalizedPath(data?.link || '', configuration?.locale || 'us'),\n `${trackingData?.contextHandle || ''}_${componentType}_${componentName}`\n )}\n onClick={() => {\n configuration?.event?.primaryButton(data, configuration?.index + 1)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description || data?.subTitle}`}\n data-headless-nav-position={`''#${configuration?.index + 1}`}\n >\n <div\n className={cn(\n 'mt-3 flex cursor-pointer items-center overflow-hidden bg-[#F7F8F9] p-3',\n configuration?.shape === 'round' ? 'rounded-lg' : 'rounded-none'\n )}\n >\n <div className=\"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center\">\n <Picture className=\"w-full object-cover\" source={data?.img?.url} alt={data?.img?.alt || ''} />\n </div>\n <p className=\"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]\">\n {data?.subTitle || ''}\n </p>\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Evaluate = React.forwardRef<HTMLDivElement, EvaluateProps>(({ className = '', data, key, ...rest }, ref) => {\n const { products, title, theme, ...other } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const { locale = 'us', trackingData } = useAiuiContext()\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div {...rest} ref={innerRef} className={className}>\n <div className=\"evaluate-box relative z-10\">\n <Container {...(data?.containerProps || {})} className=\"overflow-hidden\">\n <div ref={ref} className={cn('w-full', className, { 'aiui-dark': theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Evaluate' + key}\n data={{ list: products, configuration: { ...other, title: title, locale } }}\n Slide={EvaluateItem}\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,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </Container>\n </div>\n </div>\n )\n})\n\nEvaluate.displayName = 'Evaluate'\n\nexport default withLayout(Evaluate)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eA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aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,EACF,EACF,CAEJ,CAAC,EAEDkB,EAAS,YAAc,WAEvB,IAAOpC,KAAQ,cAAWoC,CAAQ",
6
+ "names": ["Evaluate_exports", "__export", "Evaluate_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_dom", "import_Title", "import_utils", "import_picture", "import_SwiperBox", "import_Styles", "import_avatar", "import_container", "import_text", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "trackingData", "tooltip", "setTooltip", "handleRating", "num", "raw", "count", "handleMouseMove", "e", "handleMouseLeave", "prev", "_", "index", "Picture", "Evaluate", "React", "className", "key", "rest", "products", "title", "theme", "other", "innerRef", "locale", "Title", "SwiperBox"]
7
7
  }
@@ -60,10 +60,5 @@ export interface EventScheduleProps extends React.HTMLAttributes<HTMLDivElement>
60
60
  data: EventScheduleData;
61
61
  classNames?: Partial<Record<EventScheduleSemanticName, string>>;
62
62
  }
63
- /**
64
- * EventSchedule - 活动日程组件
65
- *
66
- * @description 显示活动日程时间轴和活动卡片列表
67
- */
68
- declare const EventSchedule: React.ForwardRefExoticComponent<EventScheduleProps & React.RefAttributes<HTMLDivElement>>;
69
- export default EventSchedule;
63
+ declare const _default: any;
64
+ export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var z=Object.create;var x=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var q=(t,e)=>{for(var i in e)x(t,i,{get:e[i],enumerable:!0})},L=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of H(e))!O.call(t,n)&&n!==i&&x(t,n,{get:()=>e[n],enumerable:!(o=j(e,n))||o.enumerable});return t};var V=(t,e,i)=>(i=t!=null?z($(t)):{},L(e||!t||!t.__esModule?x(i,"default",{value:t,enumerable:!0}):i,t)),G=t=>L(x({},"__esModule",{value:!0}),t);var Z={};q(Z,{default:()=>Y});module.exports=G(Z);var s=require("react/jsx-runtime"),a=V(require("react")),g=require("../../helpers/index.js"),u=require("../../components/index.js"),f=require("swiper/react"),k=V(require("dayjs")),S=require("class-variance-authority");const E=(t,e)=>{const i=(0,k.default)(),o=(0,k.default)(t).startOf("day"),n=(0,k.default)(e).endOf("day");return i.isAfter(n)?"completed":i.isBefore(o)?"not-started":"in-progress"},J=(0,S.cva)("h-1 w-full overflow-hidden",{variants:{state:{"in-progress-light":"bg-[#F6CD4E]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F6CD4E]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),K=(0,S.cva)("size-4 rounded-full transition-colors",{variants:{state:{"in-progress-light":"bg-[#F6CD4E]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F6CD4E]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),T=(0,S.cva)("font-bold leading-[1.2]",{variants:{state:{"in-progress-light":"text-[#080A0F]","in-progress-dark":"text-white","not-started-light":"text-[#080A0F]","not-started-dark":"text-[#F5F6F7]","completed-light":"text-[#4A4C56]/60","completed-dark":"text-[#F5F6F7]/60"}},defaultVariants:{state:"not-started-light"}}),Q=(0,S.cva)("laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden",{variants:{state:{"in-progress-light":"bg-[#F4E8BC]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F4E8BC]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),U=({timeStatus:t,theme:e="light",className:i,index:o,nodeLength:n})=>{const p=`${t}-${e}`,l=o===0,d=o===n-1;return(0,s.jsxs)("div",{className:"relative my-2 flex h-1 w-full items-center justify-center",children:[(0,s.jsx)("div",{className:(0,g.cn)(J({state:p}),l&&"rounded-l-full",d&&"rounded-r-full",i)}),(0,s.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)("div",{className:K({state:p})})})]})},W=(t,e)=>{if(t)return e==="in-progress"?t.active:e==="completed"&&t.completed||t.inactive},X=({timeStatus:t,item:e,theme:i="light",className:o,scheduleCount:n})=>{const p=a.useMemo(()=>W(e.icon,t),[e.icon,t]),l=`${t}-${i}`;return(0,s.jsxs)("div",{className:(0,g.cn)(Q({state:l}),o),children:[p&&(0,s.jsx)("div",{className:"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]",children:(0,s.jsx)(u.Picture,{source:p.url,alt:p.alt,className:"aspect-square"})}),(0,s.jsxs)("div",{className:"tablet:px-4 tablet:py-3 desktop:pl-6 desktop:pr-16 relative z-20 flex h-full flex-col justify-between p-4 pr-8",children:[(0,s.jsx)(u.Heading,{html:e.title,className:(0,g.cn)(n>=4?"desktop:text-[24px]":"desktop:text-[32px]","laptop:text-[24px] line-clamp-1 text-[20px]",T({state:l}))}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:e.items.map((d,c)=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[d.icon&&(0,s.jsx)(u.Text,{className:(0,g.cn)("desktop:size-6 size-5 shrink-0",T({state:l})),html:d.icon}),(0,s.jsx)(u.Text,{html:d.label,className:(0,g.cn)("lg-desktop:text-[18px] desktop:text-[16px] line-clamp-1 flex-1 text-[14px] leading-[1.4]",T({state:l}))})]},c))})]})]})},A=a.forwardRef(({classNames:t={},data:e,className:i,...o},n)=>{const p=e.theme||"light",l=a.useRef(null),d=a.useRef(null),c=a.useRef(!1),v=a.useMemo(()=>e?.scheduleList?.length||2,[e?.scheduleList]),b=a.useMemo(()=>e.scheduleList.findIndex(r=>E(r.startDate,r.endDate)==="in-progress"),[e.scheduleList]),w=a.useCallback((r,h=!1)=>{const m=R=>{switch(R){case"mobile":return{slidesPerView:1.17};case"tablet":return r===2?{slidesPerView:2}:{slidesPerView:2.4};case"laptop":return r===2?{}:r===4?{slidesPerView:3.2}:{slidesPerView:r};case"desktop":return r===2?{slidesPerView:2}:{slidesPerView:r}}},N=m("mobile"),y=m("tablet"),D=m("laptop"),F=m("desktop");return h?{0:{...N,spaceBetween:12},768:{...y,spaceBetween:12},1024:{...D,spaceBetween:16},1440:{...F,spaceBetween:16}}:{0:N,768:y,1024:D,1440:F}},[]),I=a.useMemo(()=>w(v,!0),[v,w]),M=a.useMemo(()=>w(v,!1),[v,w]),C=e.showTimeline!==!1,B=a.useCallback(r=>{c.current||!d.current||(c.current=!0,d.current.slideTo(r.activeIndex,r.params.speed),setTimeout(()=>{c.current=!1},50))},[]),P=a.useCallback(r=>{c.current||!l.current||(c.current=!0,l.current.slideTo(r.activeIndex,r.params.speed),setTimeout(()=>{c.current=!1},50))},[]);return a.useEffect(()=>{l.current&&d.current&&b>=0&&setTimeout(()=>{c.current=!0,l.current?.slideTo(b,500),d.current?.slideTo(b,500),setTimeout(()=>{c.current=!1},600)},100)},[b]),(0,s.jsxs)(u.Container,{...o,ref:n,className:(0,g.cn)("overflow-hidden",t?.root,i),children:[C&&(0,s.jsx)(f.Swiper,{breakpoints:M,className:"h-4 w-full !overflow-visible",onSwiper:r=>{d.current=r},onSlideChange:P,children:e.scheduleList.map((r,h)=>{const m=E(r.startDate,r.endDate);return(0,s.jsx)(f.SwiperSlide,{className:"",children:(0,s.jsx)(U,{className:t?.timeline,timeStatus:m,theme:p,index:h,nodeLength:e.scheduleList.length})},"timelineNode"+h)})}),(0,s.jsx)(f.Swiper,{breakpoints:I,className:"w-full !overflow-visible",onSwiper:r=>{l.current=r},onSlideChange:B,children:e.scheduleList.map((r,h)=>{const m=E(r.startDate,r.endDate);return(0,s.jsx)(f.SwiperSlide,{children:(0,s.jsx)(X,{timeStatus:m,className:(0,g.cn)(C?"laptop:mt-4 mt-2":"",t?.eventScheduleCard),item:r,theme:p,scheduleCount:e.scheduleList.length})},"SwiperSlideItem"+h)})})]})});A.displayName="EventSchedule";var Y=A;
1
+ "use strict";"use client";var $=Object.create;var k=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var J=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})},M=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of q(e))!G.call(t,a)&&a!==n&&k(t,a,{get:()=>e[a],enumerable:!(l=O(e,a))||l.enumerable});return t};var V=(t,e,n)=>(n=t!=null?$(_(t)):{},M(e||!t||!t.__esModule?k(n,"default",{value:t,enumerable:!0}):n,t)),K=t=>M(k({},"__esModule",{value:!0}),t);var se={};J(se,{default:()=>re});module.exports=K(se);var s=require("react/jsx-runtime"),i=V(require("react")),A=require("../../shared/Styles.js"),c=require("../../helpers/index.js"),u=require("../../components/index.js"),v=require("swiper/react"),T=V(require("dayjs")),S=require("class-variance-authority"),B=require("../../hooks/useExposure.js");const Q="image",U="event_schedule",E=(t,e)=>{const n=(0,T.default)(),l=(0,T.default)(t).startOf("day"),a=(0,T.default)(e).endOf("day");return n.isAfter(a)?"completed":n.isBefore(l)?"not-started":"in-progress"},W=(0,S.cva)("h-1 w-full overflow-hidden",{variants:{state:{"in-progress-light":"bg-[#F6CD4E]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F6CD4E]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),X=(0,S.cva)("size-4 rounded-full transition-colors",{variants:{state:{"in-progress-light":"bg-[#F6CD4E]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F6CD4E]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),C=(0,S.cva)("font-bold leading-[1.2]",{variants:{state:{"in-progress-light":"text-[#080A0F]","in-progress-dark":"text-white","not-started-light":"text-[#080A0F]","not-started-dark":"text-[#F5F6F7]","completed-light":"text-[#4A4C56]/60","completed-dark":"text-[#F5F6F7]/60"}},defaultVariants:{state:"not-started-light"}}),Y=(0,S.cva)("laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden",{variants:{state:{"in-progress-light":"bg-[#F4E8BC]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F4E8BC]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),Z=({timeStatus:t,theme:e="light",className:n,index:l,nodeLength:a})=>{const d=`${t}-${e}`,p=l===0,o=l===a-1;return(0,s.jsxs)("div",{className:"relative my-2 flex h-1 w-full items-center justify-center",children:[(0,s.jsx)("div",{className:(0,c.cn)(W({state:d}),p&&"rounded-l-full",o&&"rounded-r-full",n)}),(0,s.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)("div",{className:X({state:d})})})]})},ee=(t,e)=>{if(t)return e==="in-progress"?t.active:e==="completed"&&t.completed||t.inactive},te=({timeStatus:t,item:e,theme:n="light",className:l,scheduleCount:a})=>{const d=i.useMemo(()=>ee(e.icon,t),[e.icon,t]),p=`${t}-${n}`;return(0,s.jsxs)("div",{className:(0,c.cn)(Y({state:p}),l),children:[d&&(0,s.jsx)("div",{className:"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]",children:(0,s.jsx)(u.Picture,{source:d.url,alt:d.alt,className:"aspect-square"})}),(0,s.jsxs)("div",{className:"tablet:px-4 tablet:py-3 desktop:pl-6 desktop:pr-16 relative z-20 flex h-full flex-col justify-between p-4 pr-8",children:[(0,s.jsx)(u.Heading,{html:e.title,className:(0,c.cn)(a>=4?"desktop:text-[24px]":"desktop:text-[32px]","laptop:text-[24px] line-clamp-1 text-[20px]",C({state:p}))}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:e.items.map((o,h)=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[o.icon&&(0,s.jsx)(u.Text,{className:(0,c.cn)("desktop:size-6 size-5 shrink-0",C({state:p})),html:o.icon}),(0,s.jsx)(u.Text,{html:o.label,className:(0,c.cn)("lg-desktop:text-[18px] desktop:text-[16px] line-clamp-1 flex-1 text-[14px] leading-[1.4]",C({state:p}))})]},h))})]})]})},I=i.forwardRef(({classNames:t={},data:e,className:n,...l},a)=>{const d=i.useRef(null);i.useImperativeHandle(a,()=>d.current),(0,B.useExposure)(d,{componentType:Q,componentName:U,componentTitle:(0,c.extractLexicalText)(e.scheduleList?.[0]?.title),componentDescription:""});const p=e.theme||"light",o=i.useRef(null),h=i.useRef(null),m=i.useRef(!1),x=i.useMemo(()=>e?.scheduleList?.length||2,[e?.scheduleList]),b=i.useMemo(()=>e.scheduleList.findIndex(r=>E(r.startDate,r.endDate)==="in-progress"),[e.scheduleList]),w=i.useCallback((r,f=!1)=>{const g=j=>{switch(j){case"mobile":return{slidesPerView:1.17};case"tablet":return r===2?{slidesPerView:2}:{slidesPerView:2.4};case"laptop":return r===2?{}:r===4?{slidesPerView:3.2}:{slidesPerView:r};case"desktop":return r===2?{slidesPerView:2}:{slidesPerView:r}}},y=g("mobile"),D=g("tablet"),L=g("laptop"),F=g("desktop");return f?{0:{...y,spaceBetween:12},768:{...D,spaceBetween:12},1024:{...L,spaceBetween:16},1440:{...F,spaceBetween:16}}:{0:y,768:D,1024:L,1440:F}},[]),P=i.useMemo(()=>w(x,!0),[x,w]),R=i.useMemo(()=>w(x,!1),[x,w]),N=e.showTimeline!==!1,H=i.useCallback(r=>{m.current||!h.current||(m.current=!0,h.current.slideTo(r.activeIndex,r.params.speed),setTimeout(()=>{m.current=!1},50))},[]),z=i.useCallback(r=>{m.current||!o.current||(m.current=!0,o.current.slideTo(r.activeIndex,r.params.speed),setTimeout(()=>{m.current=!1},50))},[]);return i.useEffect(()=>{o.current&&h.current&&b>=0&&setTimeout(()=>{m.current=!0,o.current?.slideTo(b,500),h.current?.slideTo(b,500),setTimeout(()=>{m.current=!1},600)},100)},[b]),(0,s.jsxs)(u.Container,{...l,ref:d,className:(0,c.cn)("overflow-hidden",t?.root,n),children:[N&&(0,s.jsx)(v.Swiper,{breakpoints:R,className:"h-4 w-full !overflow-visible",onSwiper:r=>{h.current=r},onSlideChange:z,children:e.scheduleList.map((r,f)=>{const g=E(r.startDate,r.endDate);return(0,s.jsx)(v.SwiperSlide,{className:"",children:(0,s.jsx)(Z,{className:t?.timeline,timeStatus:g,theme:p,index:f,nodeLength:e.scheduleList.length})},"timelineNode"+f)})}),(0,s.jsx)(v.Swiper,{breakpoints:P,className:"w-full !overflow-visible",onSwiper:r=>{o.current=r},onSlideChange:H,children:e.scheduleList.map((r,f)=>{const g=E(r.startDate,r.endDate);return(0,s.jsx)(v.SwiperSlide,{children:(0,s.jsx)(te,{timeStatus:g,className:(0,c.cn)(N?"laptop:mt-4 mt-2":"",t?.eventScheduleCard),item:r,theme:p,scheduleCount:e.scheduleList.length})},"SwiperSlideItem"+f)})})]})});I.displayName="EventSchedule";var re=(0,A.withLayout)(I);
2
2
  //# sourceMappingURL=index.js.map