@anker-in/headless-ui 1.3.21 → 1.3.22-alpha.1781754422536

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 (623) hide show
  1. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.d.ts +11 -0
  2. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js +2 -0
  3. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js.map +7 -0
  4. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.d.ts +23 -0
  5. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js +2 -0
  6. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js.map +7 -0
  7. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/index.d.ts +40 -0
  8. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js +2 -0
  9. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js.map +7 -0
  10. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/types.d.ts +103 -0
  11. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js +2 -0
  12. package/dist/cjs/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js.map +7 -0
  13. package/dist/cjs/biz-components/AccessoriesShelf/components/MainProductArea/index.d.ts +27 -0
  14. package/dist/cjs/biz-components/AccessoriesShelf/components/MainProductArea/index.js +2 -0
  15. package/dist/cjs/biz-components/AccessoriesShelf/components/MainProductArea/index.js.map +7 -0
  16. package/dist/cjs/biz-components/AccessoriesShelf/components/ProductGrid/index.d.ts +11 -0
  17. package/dist/cjs/biz-components/AccessoriesShelf/components/ProductGrid/index.js +2 -0
  18. package/dist/cjs/biz-components/AccessoriesShelf/components/ProductGrid/index.js.map +7 -0
  19. package/dist/cjs/biz-components/AccessoriesShelf/components/PromoBanner/index.d.ts +10 -0
  20. package/dist/cjs/biz-components/AccessoriesShelf/components/PromoBanner/index.js +2 -0
  21. package/dist/cjs/biz-components/AccessoriesShelf/components/PromoBanner/index.js.map +7 -0
  22. package/dist/cjs/biz-components/AccessoriesShelf/components/SectionHeader/index.d.ts +9 -0
  23. package/dist/cjs/biz-components/AccessoriesShelf/components/SectionHeader/index.js +2 -0
  24. package/dist/cjs/biz-components/AccessoriesShelf/components/SectionHeader/index.js.map +7 -0
  25. package/dist/cjs/biz-components/AccessoriesShelf/index.d.ts +8 -0
  26. package/dist/cjs/biz-components/AccessoriesShelf/index.js +2 -0
  27. package/dist/cjs/biz-components/AccessoriesShelf/index.js.map +7 -0
  28. package/dist/cjs/biz-components/AccessoriesShelf/product.d.ts +280 -0
  29. package/dist/cjs/biz-components/AccessoriesShelf/product.js +2 -0
  30. package/dist/cjs/biz-components/AccessoriesShelf/product.js.map +7 -0
  31. package/dist/cjs/biz-components/AccessoriesShelf/types.d.ts +43 -0
  32. package/dist/cjs/biz-components/AccessoriesShelf/types.js +2 -0
  33. package/dist/cjs/biz-components/AccessoriesShelf/types.js.map +7 -0
  34. package/dist/cjs/biz-components/AccordionCards/index.d.ts +1 -1
  35. package/dist/cjs/biz-components/ActiveShelf/index.d.ts +1 -1
  36. package/dist/cjs/biz-components/ActivityMechanism/index.js +1 -1
  37. package/dist/cjs/biz-components/ActivityMechanism/index.js.map +3 -3
  38. package/dist/cjs/biz-components/ActivitySchedule/index.d.ts +1 -1
  39. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  40. package/dist/cjs/biz-components/ActivitySchedule/index.js.map +3 -3
  41. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +6 -0
  42. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  43. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  44. package/dist/cjs/biz-components/AnchorNavigation/index.d.ts +1 -1
  45. package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
  46. package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
  47. package/dist/cjs/biz-components/AplusDesc/index.d.ts +1 -1
  48. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -1
  49. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  50. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  51. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +1 -1
  52. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  53. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  54. package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +1 -1
  55. package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js +1 -1
  56. package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js.map +3 -3
  57. package/dist/cjs/biz-components/BuyOneGetOneShelf/context.d.ts +4 -0
  58. package/dist/cjs/biz-components/BuyOneGetOneShelf/context.js +2 -0
  59. package/dist/cjs/biz-components/BuyOneGetOneShelf/context.js.map +7 -0
  60. package/dist/cjs/biz-components/BuyOneGetOneShelf/types.d.ts +1 -1
  61. package/dist/cjs/biz-components/BuyOneGetOneShelf/types.js.map +1 -1
  62. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  63. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  64. package/dist/cjs/biz-components/Category/index.d.ts +1 -1
  65. package/dist/cjs/biz-components/Category/index.js +1 -1
  66. package/dist/cjs/biz-components/Category/index.js.map +3 -3
  67. package/dist/cjs/biz-components/CreativeModule/index.d.ts +1 -1
  68. package/dist/cjs/biz-components/DownLoad/index.d.ts +1 -1
  69. package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -1
  70. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  71. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  72. package/dist/cjs/biz-components/EventSchedule/index.d.ts +1 -1
  73. package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
  74. package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
  75. package/dist/cjs/biz-components/Faq/Faq.d.ts +1 -1
  76. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +1 -1
  77. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
  78. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  79. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -1
  80. package/dist/cjs/biz-components/FeaturedBlogPosts/index.d.ts +1 -1
  81. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +1 -1
  82. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +2 -2
  83. package/dist/cjs/biz-components/Features/index.d.ts +1 -1
  84. package/dist/cjs/biz-components/FootCharger/index.d.ts +1 -1
  85. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +1 -1
  86. package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
  87. package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
  88. package/dist/cjs/biz-components/GiftBox/index.d.ts +1 -1
  89. package/dist/cjs/biz-components/GiftShelf/index.d.ts +1 -1
  90. package/dist/cjs/biz-components/GiftShelf/index.js +1 -1
  91. package/dist/cjs/biz-components/GiftShelf/index.js.map +2 -2
  92. package/dist/cjs/biz-components/GiftTierShelf/index.d.ts +1 -1
  93. package/dist/cjs/biz-components/Graphic/index.d.ts +1 -1
  94. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  95. package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
  96. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
  97. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  98. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  99. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  100. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
  101. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
  102. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
  103. package/dist/cjs/biz-components/HeaderNavigation/MulticolDropdown.js +1 -1
  104. package/dist/cjs/biz-components/HeaderNavigation/MulticolDropdown.js.map +2 -2
  105. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
  106. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
  107. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
  108. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +1 -1
  109. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  110. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
  111. package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +11 -1
  112. package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
  113. package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
  114. package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
  115. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
  116. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  117. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +1 -1
  118. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  119. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  120. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  121. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  122. package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +1 -1
  123. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +1 -1
  124. package/dist/cjs/biz-components/ImageTextOverlay/index.d.ts +1 -1
  125. package/dist/cjs/biz-components/ImageTextOverlay/index.js +2 -2
  126. package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +3 -3
  127. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +1 -1
  128. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  129. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  130. package/dist/cjs/biz-components/Ksp/index.d.ts +1 -1
  131. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  132. package/dist/cjs/biz-components/Ksp/index.js.map +3 -3
  133. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +3 -1
  134. package/dist/cjs/biz-components/Listing/BizProductProvider.js +1 -1
  135. package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +3 -3
  136. package/dist/cjs/biz-components/Listing/components/CartActionButtons/index.d.ts +9 -1
  137. package/dist/cjs/biz-components/Listing/components/CartActionButtons/index.js +1 -1
  138. package/dist/cjs/biz-components/Listing/components/CartActionButtons/index.js.map +3 -3
  139. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +1 -1
  140. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -1
  141. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
  142. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
  143. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
  144. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
  145. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
  146. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
  147. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +1 -1
  148. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
  149. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  150. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  151. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  152. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  153. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -1
  154. package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
  155. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  156. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
  157. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  158. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  159. package/dist/cjs/biz-components/LotteryShared/types.d.ts +9 -0
  160. package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
  161. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +1 -1
  162. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +1 -1
  163. package/dist/cjs/biz-components/Media/index.js +1 -1
  164. package/dist/cjs/biz-components/Media/index.js.map +3 -3
  165. package/dist/cjs/biz-components/MediaEndorsement/index.d.ts +1 -1
  166. package/dist/cjs/biz-components/MediaEndorsement/index.js +2 -2
  167. package/dist/cjs/biz-components/MediaEndorsement/index.js.map +3 -3
  168. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +1 -1
  169. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  170. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  171. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +1 -1
  172. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  173. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
  174. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +1 -1
  175. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  176. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
  177. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -1
  178. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  179. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +3 -3
  180. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
  181. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js +1 -1
  182. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
  183. package/dist/cjs/biz-components/MediaShelf/index.d.ts +1 -1
  184. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.d.ts +1 -1
  185. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js +1 -1
  186. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +3 -3
  187. package/dist/cjs/biz-components/MemberEquity/index.d.ts +1 -1
  188. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  189. package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
  190. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  191. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  192. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  193. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js +1 -1
  194. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js.map +2 -2
  195. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -1
  196. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
  197. package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
  198. package/dist/cjs/biz-components/NotifyMeDialog/NotifyMeDialog.d.ts +7 -0
  199. package/dist/cjs/biz-components/NotifyMeDialog/NotifyMeDialog.js +2 -0
  200. package/dist/cjs/biz-components/NotifyMeDialog/NotifyMeDialog.js.map +7 -0
  201. package/dist/cjs/biz-components/NotifyMeDialog/index.d.ts +2 -0
  202. package/dist/cjs/biz-components/NotifyMeDialog/index.js +2 -0
  203. package/dist/cjs/biz-components/NotifyMeDialog/index.js.map +7 -0
  204. package/dist/cjs/biz-components/NotifyMeDialog/types.d.ts +111 -0
  205. package/dist/cjs/biz-components/NotifyMeDialog/types.js +2 -0
  206. package/dist/cjs/biz-components/NotifyMeDialog/types.js.map +7 -0
  207. package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
  208. package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
  209. package/dist/cjs/biz-components/ProductCompare/index.js.map +2 -2
  210. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +1 -1
  211. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  212. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +3 -3
  213. package/dist/cjs/biz-components/ProductLottery/types.d.ts +62 -5
  214. package/dist/cjs/biz-components/ProductLottery/types.js +1 -1
  215. package/dist/cjs/biz-components/ProductLottery/types.js.map +2 -2
  216. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +1 -1
  217. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  218. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
  219. package/dist/cjs/biz-components/PromotionalBar/index.d.ts +1 -1
  220. package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
  221. package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
  222. package/dist/cjs/biz-components/SceneShelfV2/index.d.ts +1 -1
  223. package/dist/cjs/biz-components/SceneShelfV3/index.d.ts +1 -1
  224. package/dist/cjs/biz-components/SearchPage/index.js +1 -1
  225. package/dist/cjs/biz-components/SearchPage/index.js.map +3 -3
  226. package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +1 -1
  227. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  228. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +2 -2
  229. package/dist/cjs/biz-components/SelectStore/index.d.ts +1 -1
  230. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -1
  231. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  232. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  233. package/dist/cjs/biz-components/Slogan/index.d.ts +1 -1
  234. package/dist/cjs/biz-components/Spacer/index.d.ts +1 -1
  235. package/dist/cjs/biz-components/Specs/index.d.ts +1 -1
  236. package/dist/cjs/biz-components/Specs/index.js +1 -1
  237. package/dist/cjs/biz-components/Specs/index.js.map +3 -3
  238. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -1
  239. package/dist/cjs/biz-components/Subscribe/index.js +1 -1
  240. package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
  241. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  242. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  243. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +1 -1
  244. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +1 -1
  245. package/dist/cjs/biz-components/TabsGroup/index.d.ts +1 -1
  246. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -1
  247. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
  248. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
  249. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -1
  250. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  251. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  252. package/dist/cjs/biz-components/Title/index.d.ts +1 -1
  253. package/dist/cjs/biz-components/Title/index.js +1 -1
  254. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  255. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +1 -1
  256. package/dist/cjs/biz-components/VideoModal/index.d.ts +1 -0
  257. package/dist/cjs/biz-components/VideoModal/index.js +1 -1
  258. package/dist/cjs/biz-components/VideoModal/index.js.map +3 -3
  259. package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
  260. package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
  261. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +1 -1
  262. package/dist/cjs/biz-components/index.d.ts +8 -0
  263. package/dist/cjs/biz-components/index.js +1 -1
  264. package/dist/cjs/biz-components/index.js.map +3 -3
  265. package/dist/cjs/components/Countdown.js +1 -1
  266. package/dist/cjs/components/Countdown.js.map +3 -3
  267. package/dist/cjs/components/alert.d.ts +1 -0
  268. package/dist/cjs/components/alert.js +1 -1
  269. package/dist/cjs/components/alert.js.map +2 -2
  270. package/dist/cjs/components/breadcrumb.d.ts +12 -0
  271. package/dist/cjs/components/breadcrumb.js +2 -0
  272. package/dist/cjs/components/breadcrumb.js.map +7 -0
  273. package/dist/cjs/components/checkbox.js +1 -1
  274. package/dist/cjs/components/checkbox.js.map +2 -2
  275. package/dist/cjs/components/dialog.js +1 -1
  276. package/dist/cjs/components/dialog.js.map +3 -3
  277. package/dist/cjs/components/index.d.ts +5 -0
  278. package/dist/cjs/components/index.js +1 -1
  279. package/dist/cjs/components/index.js.map +3 -3
  280. package/dist/cjs/components/input-number.d.ts +22 -0
  281. package/dist/cjs/components/input-number.js +1 -1
  282. package/dist/cjs/components/input-number.js.map +3 -3
  283. package/dist/cjs/components/link.js +1 -1
  284. package/dist/cjs/components/link.js.map +2 -2
  285. package/dist/cjs/components/otp-input.d.ts +18 -0
  286. package/dist/cjs/components/otp-input.js +2 -0
  287. package/dist/cjs/components/otp-input.js.map +7 -0
  288. package/dist/cjs/components/toast.d.ts +25 -0
  289. package/dist/cjs/components/toast.js +2 -0
  290. package/dist/cjs/components/toast.js.map +7 -0
  291. package/dist/cjs/helpers/index.d.ts +2 -2
  292. package/dist/cjs/helpers/index.js +1 -1
  293. package/dist/cjs/helpers/index.js.map +2 -2
  294. package/dist/cjs/helpers/isLexicalEmpty.d.ts +5 -0
  295. package/dist/cjs/helpers/isLexicalEmpty.js +1 -1
  296. package/dist/cjs/helpers/isLexicalEmpty.js.map +3 -3
  297. package/dist/cjs/helpers/priceFormatting.d.ts +5 -0
  298. package/dist/cjs/helpers/priceFormatting.js +1 -1
  299. package/dist/cjs/helpers/priceFormatting.js.map +3 -3
  300. package/dist/cjs/helpers/utils.d.ts +7 -1
  301. package/dist/cjs/helpers/utils.js +1 -1
  302. package/dist/cjs/helpers/utils.js.map +3 -3
  303. package/dist/cjs/hooks/useIsomorphicMediaQuery.d.ts +14 -0
  304. package/dist/cjs/hooks/useIsomorphicMediaQuery.js +2 -0
  305. package/dist/cjs/hooks/useIsomorphicMediaQuery.js.map +7 -0
  306. package/dist/cjs/hooks/useProductListTrack.d.ts +43 -0
  307. package/dist/cjs/hooks/useProductListTrack.js +2 -0
  308. package/dist/cjs/hooks/useProductListTrack.js.map +7 -0
  309. package/dist/cjs/index.d.ts +10 -0
  310. package/dist/cjs/index.js +1 -1
  311. package/dist/cjs/index.js.map +3 -3
  312. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.d.ts +11 -0
  313. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js +2 -0
  314. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoriesProductGrid/index.js.map +7 -0
  315. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.d.ts +23 -0
  316. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js +2 -0
  317. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/ProductCard.js.map +7 -0
  318. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/index.d.ts +40 -0
  319. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js +2 -0
  320. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/index.js.map +7 -0
  321. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/types.d.ts +103 -0
  322. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js +1 -0
  323. package/dist/esm/biz-components/AccessoriesShelf/components/AccessoryShelf/types.js.map +7 -0
  324. package/dist/esm/biz-components/AccessoriesShelf/components/MainProductArea/index.d.ts +27 -0
  325. package/dist/esm/biz-components/AccessoriesShelf/components/MainProductArea/index.js +2 -0
  326. package/dist/esm/biz-components/AccessoriesShelf/components/MainProductArea/index.js.map +7 -0
  327. package/dist/esm/biz-components/AccessoriesShelf/components/ProductGrid/index.d.ts +11 -0
  328. package/dist/esm/biz-components/AccessoriesShelf/components/ProductGrid/index.js +2 -0
  329. package/dist/esm/biz-components/AccessoriesShelf/components/ProductGrid/index.js.map +7 -0
  330. package/dist/esm/biz-components/AccessoriesShelf/components/PromoBanner/index.d.ts +10 -0
  331. package/dist/esm/biz-components/AccessoriesShelf/components/PromoBanner/index.js +2 -0
  332. package/dist/esm/biz-components/AccessoriesShelf/components/PromoBanner/index.js.map +7 -0
  333. package/dist/esm/biz-components/AccessoriesShelf/components/SectionHeader/index.d.ts +9 -0
  334. package/dist/esm/biz-components/AccessoriesShelf/components/SectionHeader/index.js +2 -0
  335. package/dist/esm/biz-components/AccessoriesShelf/components/SectionHeader/index.js.map +7 -0
  336. package/dist/esm/biz-components/AccessoriesShelf/index.d.ts +8 -0
  337. package/dist/esm/biz-components/AccessoriesShelf/index.js +2 -0
  338. package/dist/esm/biz-components/AccessoriesShelf/index.js.map +7 -0
  339. package/dist/esm/biz-components/AccessoriesShelf/product.d.ts +280 -0
  340. package/dist/esm/biz-components/AccessoriesShelf/product.js +1 -0
  341. package/dist/esm/biz-components/AccessoriesShelf/product.js.map +7 -0
  342. package/dist/esm/biz-components/AccessoriesShelf/types.d.ts +43 -0
  343. package/dist/esm/biz-components/AccessoriesShelf/types.js +1 -0
  344. package/dist/esm/biz-components/AccessoriesShelf/types.js.map +7 -0
  345. package/dist/esm/biz-components/AccordionCards/index.d.ts +1 -1
  346. package/dist/esm/biz-components/ActiveShelf/index.d.ts +1 -1
  347. package/dist/esm/biz-components/ActivityMechanism/index.js +1 -1
  348. package/dist/esm/biz-components/ActivityMechanism/index.js.map +3 -3
  349. package/dist/esm/biz-components/ActivitySchedule/index.d.ts +1 -1
  350. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  351. package/dist/esm/biz-components/ActivitySchedule/index.js.map +3 -3
  352. package/dist/esm/biz-components/AiuiProvider/index.d.ts +6 -0
  353. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  354. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  355. package/dist/esm/biz-components/AnchorNavigation/index.d.ts +1 -1
  356. package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
  357. package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
  358. package/dist/esm/biz-components/AplusDesc/index.d.ts +1 -1
  359. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -1
  360. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  361. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  362. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +1 -1
  363. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  364. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  365. package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +1 -1
  366. package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js +1 -1
  367. package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js.map +3 -3
  368. package/dist/esm/biz-components/BuyOneGetOneShelf/context.d.ts +4 -0
  369. package/dist/esm/biz-components/BuyOneGetOneShelf/context.js +2 -0
  370. package/dist/esm/biz-components/BuyOneGetOneShelf/context.js.map +7 -0
  371. package/dist/esm/biz-components/BuyOneGetOneShelf/types.d.ts +1 -1
  372. package/dist/esm/biz-components/BuyOneGetOneShelf/types.js.map +1 -1
  373. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  374. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  375. package/dist/esm/biz-components/Category/index.d.ts +1 -1
  376. package/dist/esm/biz-components/Category/index.js +1 -1
  377. package/dist/esm/biz-components/Category/index.js.map +3 -3
  378. package/dist/esm/biz-components/CreativeModule/index.d.ts +1 -1
  379. package/dist/esm/biz-components/DownLoad/index.d.ts +1 -1
  380. package/dist/esm/biz-components/Evaluate/index.d.ts +1 -1
  381. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  382. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  383. package/dist/esm/biz-components/EventSchedule/index.d.ts +1 -1
  384. package/dist/esm/biz-components/EventSchedule/index.js +1 -1
  385. package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
  386. package/dist/esm/biz-components/Faq/Faq.d.ts +1 -1
  387. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +1 -1
  388. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
  389. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  390. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -1
  391. package/dist/esm/biz-components/FeaturedBlogPosts/index.d.ts +1 -1
  392. package/dist/esm/biz-components/FeaturedBlogPosts/index.js +1 -1
  393. package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +2 -2
  394. package/dist/esm/biz-components/Features/index.d.ts +1 -1
  395. package/dist/esm/biz-components/FootCharger/index.d.ts +1 -1
  396. package/dist/esm/biz-components/FooterNavigation/index.d.ts +1 -1
  397. package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
  398. package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
  399. package/dist/esm/biz-components/GiftBox/index.d.ts +1 -1
  400. package/dist/esm/biz-components/GiftShelf/index.d.ts +1 -1
  401. package/dist/esm/biz-components/GiftShelf/index.js +1 -1
  402. package/dist/esm/biz-components/GiftShelf/index.js.map +2 -2
  403. package/dist/esm/biz-components/GiftTierShelf/index.d.ts +1 -1
  404. package/dist/esm/biz-components/Graphic/index.d.ts +1 -1
  405. package/dist/esm/biz-components/Graphic/index.js +1 -1
  406. package/dist/esm/biz-components/Graphic/index.js.map +3 -3
  407. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
  408. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  409. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  410. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  411. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
  412. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
  413. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
  414. package/dist/esm/biz-components/HeaderNavigation/MulticolDropdown.js +1 -1
  415. package/dist/esm/biz-components/HeaderNavigation/MulticolDropdown.js.map +2 -2
  416. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
  417. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
  418. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
  419. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +1 -1
  420. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  421. package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
  422. package/dist/esm/biz-components/HeaderNavigation/types.d.ts +11 -1
  423. package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
  424. package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
  425. package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
  426. package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
  427. package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  428. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +1 -1
  429. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  430. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  431. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  432. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  433. package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +1 -1
  434. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +1 -1
  435. package/dist/esm/biz-components/ImageTextOverlay/index.d.ts +1 -1
  436. package/dist/esm/biz-components/ImageTextOverlay/index.js +2 -2
  437. package/dist/esm/biz-components/ImageTextOverlay/index.js.map +3 -3
  438. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +1 -1
  439. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  440. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  441. package/dist/esm/biz-components/Ksp/index.d.ts +1 -1
  442. package/dist/esm/biz-components/Ksp/index.js +1 -1
  443. package/dist/esm/biz-components/Ksp/index.js.map +3 -3
  444. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +3 -1
  445. package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
  446. package/dist/esm/biz-components/Listing/BizProductProvider.js.map +3 -3
  447. package/dist/esm/biz-components/Listing/components/CartActionButtons/index.d.ts +9 -1
  448. package/dist/esm/biz-components/Listing/components/CartActionButtons/index.js +1 -1
  449. package/dist/esm/biz-components/Listing/components/CartActionButtons/index.js.map +3 -3
  450. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +1 -1
  451. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -1
  452. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
  453. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
  454. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
  455. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
  456. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
  457. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
  458. package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +1 -1
  459. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
  460. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  461. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  462. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  463. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  464. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -1
  465. package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
  466. package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  467. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
  468. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  469. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  470. package/dist/esm/biz-components/LotteryShared/types.d.ts +9 -0
  471. package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
  472. package/dist/esm/biz-components/Marquee/Marquee.d.ts +1 -1
  473. package/dist/esm/biz-components/MarqueeReview/index.d.ts +1 -1
  474. package/dist/esm/biz-components/Media/index.js +1 -1
  475. package/dist/esm/biz-components/Media/index.js.map +3 -3
  476. package/dist/esm/biz-components/MediaEndorsement/index.d.ts +1 -1
  477. package/dist/esm/biz-components/MediaEndorsement/index.js +2 -2
  478. package/dist/esm/biz-components/MediaEndorsement/index.js.map +3 -3
  479. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +1 -1
  480. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  481. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  482. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +1 -1
  483. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  484. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
  485. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +1 -1
  486. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  487. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
  488. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -1
  489. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  490. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +3 -3
  491. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
  492. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js +1 -1
  493. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
  494. package/dist/esm/biz-components/MediaShelf/index.d.ts +1 -1
  495. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.d.ts +1 -1
  496. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js +1 -1
  497. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +3 -3
  498. package/dist/esm/biz-components/MemberEquity/index.d.ts +1 -1
  499. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  500. package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
  501. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  502. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  503. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  504. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js +1 -1
  505. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js.map +2 -2
  506. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -1
  507. package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
  508. package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
  509. package/dist/esm/biz-components/NotifyMeDialog/NotifyMeDialog.d.ts +7 -0
  510. package/dist/esm/biz-components/NotifyMeDialog/NotifyMeDialog.js +2 -0
  511. package/dist/esm/biz-components/NotifyMeDialog/NotifyMeDialog.js.map +7 -0
  512. package/dist/esm/biz-components/NotifyMeDialog/index.d.ts +2 -0
  513. package/dist/esm/biz-components/NotifyMeDialog/index.js +2 -0
  514. package/dist/esm/biz-components/NotifyMeDialog/index.js.map +7 -0
  515. package/dist/esm/biz-components/NotifyMeDialog/types.d.ts +111 -0
  516. package/dist/esm/biz-components/NotifyMeDialog/types.js +1 -0
  517. package/dist/esm/biz-components/NotifyMeDialog/types.js.map +7 -0
  518. package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
  519. package/dist/esm/biz-components/ProductCompare/index.js +1 -1
  520. package/dist/esm/biz-components/ProductCompare/index.js.map +2 -2
  521. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +1 -1
  522. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  523. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +3 -3
  524. package/dist/esm/biz-components/ProductLottery/types.d.ts +62 -5
  525. package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
  526. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +1 -1
  527. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  528. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
  529. package/dist/esm/biz-components/PromotionalBar/index.d.ts +1 -1
  530. package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
  531. package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
  532. package/dist/esm/biz-components/SceneShelfV2/index.d.ts +1 -1
  533. package/dist/esm/biz-components/SceneShelfV3/index.d.ts +1 -1
  534. package/dist/esm/biz-components/SearchPage/index.js +1 -1
  535. package/dist/esm/biz-components/SearchPage/index.js.map +3 -3
  536. package/dist/esm/biz-components/SecondaryBanner/index.d.ts +1 -1
  537. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  538. package/dist/esm/biz-components/SecondaryBanner/index.js.map +2 -2
  539. package/dist/esm/biz-components/SelectStore/index.d.ts +1 -1
  540. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -1
  541. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  542. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  543. package/dist/esm/biz-components/Slogan/index.d.ts +1 -1
  544. package/dist/esm/biz-components/Spacer/index.d.ts +1 -1
  545. package/dist/esm/biz-components/Specs/index.d.ts +1 -1
  546. package/dist/esm/biz-components/Specs/index.js +1 -1
  547. package/dist/esm/biz-components/Specs/index.js.map +3 -3
  548. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -1
  549. package/dist/esm/biz-components/Subscribe/index.js +1 -1
  550. package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
  551. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  552. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  553. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +1 -1
  554. package/dist/esm/biz-components/Tabs/Tabs.d.ts +1 -1
  555. package/dist/esm/biz-components/TabsGroup/index.d.ts +1 -1
  556. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -1
  557. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
  558. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
  559. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -1
  560. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  561. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  562. package/dist/esm/biz-components/Title/index.d.ts +1 -1
  563. package/dist/esm/biz-components/Title/index.js +1 -1
  564. package/dist/esm/biz-components/Title/index.js.map +3 -3
  565. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +1 -1
  566. package/dist/esm/biz-components/VideoModal/index.d.ts +1 -0
  567. package/dist/esm/biz-components/VideoModal/index.js +1 -1
  568. package/dist/esm/biz-components/VideoModal/index.js.map +3 -3
  569. package/dist/esm/biz-components/WheelLottery/index.js +1 -1
  570. package/dist/esm/biz-components/WheelLottery/index.js.map +2 -2
  571. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +1 -1
  572. package/dist/esm/biz-components/index.d.ts +8 -0
  573. package/dist/esm/biz-components/index.js +1 -1
  574. package/dist/esm/biz-components/index.js.map +3 -3
  575. package/dist/esm/components/Countdown.js +1 -1
  576. package/dist/esm/components/Countdown.js.map +3 -3
  577. package/dist/esm/components/alert.d.ts +1 -0
  578. package/dist/esm/components/alert.js +1 -1
  579. package/dist/esm/components/alert.js.map +2 -2
  580. package/dist/esm/components/breadcrumb.d.ts +12 -0
  581. package/dist/esm/components/breadcrumb.js +2 -0
  582. package/dist/esm/components/breadcrumb.js.map +7 -0
  583. package/dist/esm/components/checkbox.js +1 -1
  584. package/dist/esm/components/checkbox.js.map +2 -2
  585. package/dist/esm/components/dialog.js +1 -1
  586. package/dist/esm/components/dialog.js.map +3 -3
  587. package/dist/esm/components/index.d.ts +5 -0
  588. package/dist/esm/components/index.js +1 -1
  589. package/dist/esm/components/index.js.map +3 -3
  590. package/dist/esm/components/input-number.d.ts +22 -0
  591. package/dist/esm/components/input-number.js +1 -1
  592. package/dist/esm/components/input-number.js.map +3 -3
  593. package/dist/esm/components/link.js +1 -1
  594. package/dist/esm/components/link.js.map +2 -2
  595. package/dist/esm/components/otp-input.d.ts +18 -0
  596. package/dist/esm/components/otp-input.js +2 -0
  597. package/dist/esm/components/otp-input.js.map +7 -0
  598. package/dist/esm/components/toast.d.ts +25 -0
  599. package/dist/esm/components/toast.js +2 -0
  600. package/dist/esm/components/toast.js.map +7 -0
  601. package/dist/esm/helpers/index.d.ts +2 -2
  602. package/dist/esm/helpers/index.js +1 -1
  603. package/dist/esm/helpers/index.js.map +3 -3
  604. package/dist/esm/helpers/isLexicalEmpty.d.ts +5 -0
  605. package/dist/esm/helpers/isLexicalEmpty.js +1 -1
  606. package/dist/esm/helpers/isLexicalEmpty.js.map +3 -3
  607. package/dist/esm/helpers/priceFormatting.d.ts +5 -0
  608. package/dist/esm/helpers/priceFormatting.js +1 -1
  609. package/dist/esm/helpers/priceFormatting.js.map +3 -3
  610. package/dist/esm/helpers/utils.d.ts +7 -1
  611. package/dist/esm/helpers/utils.js +1 -1
  612. package/dist/esm/helpers/utils.js.map +3 -3
  613. package/dist/esm/hooks/useIsomorphicMediaQuery.d.ts +14 -0
  614. package/dist/esm/hooks/useIsomorphicMediaQuery.js +2 -0
  615. package/dist/esm/hooks/useIsomorphicMediaQuery.js.map +7 -0
  616. package/dist/esm/hooks/useProductListTrack.d.ts +43 -0
  617. package/dist/esm/hooks/useProductListTrack.js +2 -0
  618. package/dist/esm/hooks/useProductListTrack.js.map +7 -0
  619. package/dist/esm/index.d.ts +10 -0
  620. package/dist/esm/index.js +1 -1
  621. package/dist/esm/index.js.map +3 -3
  622. package/package.json +1 -1
  623. package/style.css +208 -10
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var U=Object.create;var _=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var Y=(n,l)=>{for(var d in l)_(n,d,{get:l[d],enumerable:!0})},H=(n,l,d,w)=>{if(l&&typeof l=="object"||typeof l=="function")for(let h of J(l))!X.call(n,h)&&h!==d&&_(n,h,{get:()=>l[h],enumerable:!(w=G(l,h))||w.enumerable});return n};var Z=(n,l,d)=>(d=n!=null?U(K(n)):{},H(l||!n||!n.__esModule?_(d,"default",{value:n,enumerable:!0}):d,n)),$=n=>H(_({},"__esModule",{value:!0}),n);var se={};Y(se,{default:()=>ae});module.exports=$(se);var i=require("react/jsx-runtime"),s=Z(require("react")),f=require("../../components/index.js"),u=require("../../helpers/utils.js"),W=require("../../shared/Styles.js"),j=require("../../hooks/useExposure.js"),T=require("swiper/react"),k=require("swiper/modules"),I=require("framer-motion"),F=require("react-responsive");const ee="video",te="tabs_with_media",ie=[{time:2.4,point:2.4,highlightIdx:0},{time:2.5,point:4.9,highlightIdx:1},{time:2.5,point:7.4,highlightIdx:2},{time:2.8,point:10.2,highlightIdx:3},{time:2.6,point:12.8,highlightIdx:4},{time:3.2,point:16,highlightIdx:5}],P=s.default.forwardRef(({data:n,className:l},d)=>{const{title:w,poster:h,video:A,mobvideo:B,items:v=[],timeIdx:p=ie,theme:V="light"}=n,[M,q]=(0,s.useState)(null),S=(0,s.useRef)([]),E=(0,s.useRef)(null),y=(0,s.useRef)(null),N=(0,s.useRef)(null);(0,j.useExposure)(N,{componentType:ee,componentName:te,componentTitle:w}),(0,s.useImperativeHandle)(d,()=>N.current);const ne=e=>{const a=E.current,r=S.current[e];if(a&&r){const t=a.getBoundingClientRect(),c=r.getBoundingClientRect().left-t.left-a.clientWidth/2+r.clientWidth/2;a.scrollTo({left:a.scrollLeft+c,behavior:"smooth"})}},R=(0,F.useMediaQuery)({query:"(max-width: 768px)"}),[oe,L,O,x,Q]=(0,s.useMemo)(()=>{const r=v.length,t=v?.map((m,c)=>({...m,key:c,index:c}))||[],o=v?.map((m,c)=>({...m,key:c+r,index:c}))||[];return[t,t.concat(o),5,2,r]},[v,R]),[g,z]=(0,s.useState)(x),[b,C]=(0,s.useState)(L.slice(0,O)),D=(e,a,r)=>{if(e!==g&&a!==x){if(a>x){const t=a-x,o=[...b];o.splice(0,t);const m=b[b.length-1]?.key+1,c=[...L].splice(m,t);o.push(...c),C([...o])}if(a<x){const t=x-a,o=[...b];o.splice(-t);const m=b[0]?.key,c=[...L].splice(Q+m-t,t);o.unshift(...c),C([...o])}if(z(e),M?.slideTo(e),!r){let t=0;p.forEach(o=>{o.highlightIdx<e&&(t+=o.time)}),y.current&&(y.current.currentTime=t)}}};return(0,s.useEffect)(()=>{const e=y.current;if(!e)return;const a=()=>{const r=e.currentTime;for(let t=0;t<p.length;t++){const o=t===0?0:p[t-1].point;if(r>=o&&r<p[t].point){D(p[t].highlightIdx,p[t].highlightIdx,!0);break}}r>=p[p.length-1].point&&(e.currentTime=0,e.play())};return e.addEventListener("timeupdate",a),()=>{e.removeEventListener("timeupdate",a)}},[M,p]),(0,i.jsxs)("section",{ref:N,"data-ui-component-id":"TabsWithMedia",className:(0,u.cn)("tabs-with-media text-info-primary flex flex-col overflow-hidden sm:overflow-visible",{"aiui-dark":V==="dark"},l),children:[(0,i.jsx)(f.Heading,{as:"h3",size:4,html:w,className:"tabs-with-media__title text-center"}),(0,i.jsx)("div",{className:"tabs-with-media__tabs-wrapper scrollbar-hidden relative w-full overflow-x-auto sm:overflow-visible",children:(0,i.jsx)("div",{className:(0,u.cn)("tabs-with-media__tabs-inner tablet:w-fit mx-auto mt-[16px] w-full max-w-[824px]"),children:(0,i.jsx)("div",{className:(0,u.cn)("tabs-with-media__tabs-container flex translate-x-0 items-center justify-center gap-[16px] transition-all md:gap-[8px]"),ref:E,children:(0,i.jsx)(I.AnimatePresence,{mode:"popLayout",children:b?.map((e,a)=>(0,i.jsx)(I.motion.div,{layout:!0,ref:r=>{S.current[e?.index]=r},onClick:()=>{D(e?.key,a)},className:"tabs-with-media__tab-item min-w-[28px] flex-none cursor-pointer overflow-hidden sm:overflow-visible",initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeOut"},children:(0,i.jsx)("div",{className:"tabs-with-media__tab-inner flex items-center justify-between",children:(0,i.jsxs)("div",{className:(0,u.cn)("tabs-with-media__tab-content flex",{"flex items-center justify-center gap-[8px] rounded-btn bg-[#fff] p-2 md:gap-[4px] md:p-1":g===e?.key}),children:[(0,i.jsx)("div",{className:(0,u.cn)("tabs-with-media__tab-icon lg-desktop:size-[48px] flex size-[28] items-center justify-center rounded-full md:shrink-0",{"h-[28px] w-[28px] bg-[#ccc] bg-opacity-50 lg-desktop:h-[48px] lg-desktop:w-[48px]":g!==e?.index}),style:g===e?.key?{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))"}:void 0,children:(0,i.jsx)(f.Picture,{source:e?.icon?.url,alt:e?.icon?.alt,className:"tabs-with-media__tab-icon-image size-[22px] md:size-[14px]"})}),(0,i.jsx)("div",{className:"tabs-with-media__tab-text-wrapper",children:(0,i.jsx)(f.Heading,{as:"h4",size:2,html:e?.tab,className:(0,u.cn)("tabs-with-media__tab-text dynamic-width-heading xs:text-[16px] line-clamp-1 size-0 overflow-hidden whitespace-nowrap text-nowrap text-black opacity-0 transition-all duration-300 ease-linear sm:text-[18px]",{"h-auto w-[calc-size(auto,size)] px-[6px] opacity-100":g===e?.key})})})]})})},e?.key))})})})}),(0,i.jsx)("div",{className:"tabs-with-media__description-container lg-desktop:mt-[24px] mt-[16px]",children:(0,i.jsx)(T.Swiper,{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},modules:[k.Pagination,k.EffectFade],onSlideChange:e=>{const a=e.realIndex;z(a)},onSwiper:e=>q(e),className:"tabs-with-media__description-swiper",children:v.map((e,a)=>(0,i.jsx)(T.SwiperSlide,{style:{transition:"opacity 1s ease-in-out"},className:"tabs-with-media__description-slide rounded-btn",children:(0,i.jsx)("div",{className:"tabs-with-media__description-content",children:(0,i.jsx)(f.Text,{as:"p",size:2,html:e.desc,className:"tabs-with-media__description-text desktop:text-[20px] lg-desktop:text-[18px] text-center"})})},a))})}),(0,i.jsx)("div",{className:"tabs-with-media__video-wrapper rounded-box laptop:mt-[32px] desktop:mt-[40px] lg-desktop:mt-[64px] mt-[24px] overflow-hidden",children:(0,i.jsx)("video",{className:"tabs-with-media__video desktop:h-[448px] lg-desktop:h-[560px] mx-auto h-[360px] w-fit",src:R?B?.url:A?.url,poster:h?.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,ref:y})})]})});P.displayName="TabsWithMedia";var ae=(0,W.withLayout)(P);
1
+ "use strict";"use client";var U=Object.create;var _=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var Y=(n,l)=>{for(var d in l)_(n,d,{get:l[d],enumerable:!0})},H=(n,l,d,w)=>{if(l&&typeof l=="object"||typeof l=="function")for(let h of J(l))!X.call(n,h)&&h!==d&&_(n,h,{get:()=>l[h],enumerable:!(w=G(l,h))||w.enumerable});return n};var Z=(n,l,d)=>(d=n!=null?U(K(n)):{},H(l||!n||!n.__esModule?_(d,"default",{value:n,enumerable:!0}):d,n)),$=n=>H(_({},"__esModule",{value:!0}),n);var ae={};Y(ae,{default:()=>se});module.exports=$(ae);var i=require("react/jsx-runtime"),a=Z(require("react")),f=require("../../components/index.js"),u=require("../../helpers/utils.js"),W=require("../../shared/Styles.js"),j=require("../../hooks/useExposure.js"),T=require("swiper/react"),k=require("swiper/modules"),I=require("framer-motion"),F=require("../../hooks/useIsomorphicMediaQuery.js");const ee="video",te="tabs_with_media",ie=[{time:2.4,point:2.4,highlightIdx:0},{time:2.5,point:4.9,highlightIdx:1},{time:2.5,point:7.4,highlightIdx:2},{time:2.8,point:10.2,highlightIdx:3},{time:2.6,point:12.8,highlightIdx:4},{time:3.2,point:16,highlightIdx:5}],P=a.default.forwardRef(({data:n,className:l},d)=>{const{title:w,poster:h,video:A,mobvideo:B,items:v=[],timeIdx:p=ie,theme:V="light"}=n,[M,q]=(0,a.useState)(null),S=(0,a.useRef)([]),E=(0,a.useRef)(null),y=(0,a.useRef)(null),N=(0,a.useRef)(null);(0,j.useExposure)(N,{componentType:ee,componentName:te,componentTitle:w}),(0,a.useImperativeHandle)(d,()=>N.current);const ne=e=>{const s=E.current,r=S.current[e];if(s&&r){const t=s.getBoundingClientRect(),c=r.getBoundingClientRect().left-t.left-s.clientWidth/2+r.clientWidth/2;s.scrollTo({left:s.scrollLeft+c,behavior:"smooth"})}},R=(0,F.useIsomorphicMediaQuery)({query:"(max-width: 768px)"}),[oe,L,O,x,Q]=(0,a.useMemo)(()=>{const r=v.length,t=v?.map((m,c)=>({...m,key:c,index:c}))||[],o=v?.map((m,c)=>({...m,key:c+r,index:c}))||[];return[t,t.concat(o),5,2,r]},[v,R]),[g,z]=(0,a.useState)(x),[b,C]=(0,a.useState)(L.slice(0,O)),D=(e,s,r)=>{if(e!==g&&s!==x){if(s>x){const t=s-x,o=[...b];o.splice(0,t);const m=b[b.length-1]?.key+1,c=[...L].splice(m,t);o.push(...c),C([...o])}if(s<x){const t=x-s,o=[...b];o.splice(-t);const m=b[0]?.key,c=[...L].splice(Q+m-t,t);o.unshift(...c),C([...o])}if(z(e),M?.slideTo(e),!r){let t=0;p.forEach(o=>{o.highlightIdx<e&&(t+=o.time)}),y.current&&(y.current.currentTime=t)}}};return(0,a.useEffect)(()=>{const e=y.current;if(!e)return;const s=()=>{const r=e.currentTime;for(let t=0;t<p.length;t++){const o=t===0?0:p[t-1].point;if(r>=o&&r<p[t].point){D(p[t].highlightIdx,p[t].highlightIdx,!0);break}}r>=p[p.length-1].point&&(e.currentTime=0,e.play())};return e.addEventListener("timeupdate",s),()=>{e.removeEventListener("timeupdate",s)}},[M,p]),(0,i.jsxs)("section",{ref:N,"data-ui-component-id":"TabsWithMedia",className:(0,u.cn)("tabs-with-media text-info-primary flex flex-col overflow-hidden sm:overflow-visible",{"aiui-dark":V==="dark"},l),children:[(0,i.jsx)(f.Heading,{as:"h3",size:4,html:w,className:"tabs-with-media__title text-center"}),(0,i.jsx)("div",{className:"tabs-with-media__tabs-wrapper scrollbar-hidden relative w-full overflow-x-auto sm:overflow-visible",children:(0,i.jsx)("div",{className:(0,u.cn)("tabs-with-media__tabs-inner tablet:w-fit mx-auto mt-[16px] w-full max-w-[824px]"),children:(0,i.jsx)("div",{className:(0,u.cn)("tabs-with-media__tabs-container flex translate-x-0 items-center justify-center gap-[16px] transition-all md:gap-[8px]"),ref:E,children:(0,i.jsx)(I.AnimatePresence,{mode:"popLayout",children:b?.map((e,s)=>(0,i.jsx)(I.motion.div,{layout:!0,ref:r=>{S.current[e?.index]=r},onClick:()=>{D(e?.key,s)},className:"tabs-with-media__tab-item min-w-[28px] flex-none cursor-pointer overflow-hidden sm:overflow-visible",initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeOut"},children:(0,i.jsx)("div",{className:"tabs-with-media__tab-inner flex items-center justify-between",children:(0,i.jsxs)("div",{className:(0,u.cn)("tabs-with-media__tab-content flex",{"flex items-center justify-center gap-[8px] rounded-btn bg-[#fff] p-2 md:gap-[4px] md:p-1":g===e?.key}),children:[(0,i.jsx)("div",{className:(0,u.cn)("tabs-with-media__tab-icon lg-desktop:size-[48px] flex size-[28] items-center justify-center rounded-full md:shrink-0",{"h-[28px] w-[28px] bg-[#ccc] bg-opacity-50 lg-desktop:h-[48px] lg-desktop:w-[48px]":g!==e?.index}),style:g===e?.key?{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))"}:void 0,children:(0,i.jsx)(f.Picture,{source:e?.icon?.url,alt:e?.icon?.alt,className:"tabs-with-media__tab-icon-image size-[22px] md:size-[14px]"})}),(0,i.jsx)("div",{className:"tabs-with-media__tab-text-wrapper",children:(0,i.jsx)(f.Heading,{as:"h4",size:2,html:e?.tab,className:(0,u.cn)("tabs-with-media__tab-text dynamic-width-heading xs:text-[16px] line-clamp-1 size-0 overflow-hidden whitespace-nowrap text-nowrap text-black opacity-0 transition-all duration-300 ease-linear sm:text-[18px]",{"h-auto w-[calc-size(auto,size)] px-[6px] opacity-100":g===e?.key})})})]})})},e?.key))})})})}),(0,i.jsx)("div",{className:"tabs-with-media__description-container lg-desktop:mt-[24px] mt-[16px]",children:(0,i.jsx)(T.Swiper,{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},modules:[k.Pagination,k.EffectFade],onSlideChange:e=>{const s=e.realIndex;z(s)},onSwiper:e=>q(e),className:"tabs-with-media__description-swiper",children:v.map((e,s)=>(0,i.jsx)(T.SwiperSlide,{style:{transition:"opacity 1s ease-in-out"},className:"tabs-with-media__description-slide rounded-btn",children:(0,i.jsx)("div",{className:"tabs-with-media__description-content",children:(0,i.jsx)(f.Text,{as:"p",size:2,html:e.desc,className:"tabs-with-media__description-text desktop:text-[20px] lg-desktop:text-[18px] text-center"})})},s))})}),(0,i.jsx)("div",{className:"tabs-with-media__video-wrapper rounded-box laptop:mt-[32px] desktop:mt-[40px] lg-desktop:mt-[64px] mt-[24px] overflow-hidden",children:(0,i.jsx)("video",{className:"tabs-with-media__video desktop:h-[448px] lg-desktop:h-[560px] mx-auto h-[360px] w-fit",src:R?B?.url:A?.url,poster:h?.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,ref:y})})]})});P.displayName="TabsWithMedia";var se=(0,W.withLayout)(P);
2
2
  //# sourceMappingURL=TabsWithMedia.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/TabsWithMedia/TabsWithMedia.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { TabsWithMediaProps, TabItem, TimeIndex } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, EffectFade } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { useMediaQuery } from 'react-responsive'\n\nconst componentType = 'video'\nconst componentName = 'tabs_with_media'\n\n// \u9ED8\u8BA4\u65F6\u95F4\u70B9\u914D\u7F6E\nconst defaultTimeIdx: TimeIndex[] = [\n { time: 2.4, point: 2.4, highlightIdx: 0 },\n { time: 2.5, point: 4.9, highlightIdx: 1 },\n { time: 2.5, point: 7.4, highlightIdx: 2 },\n { time: 2.8, point: 10.2, highlightIdx: 3 },\n { time: 2.6, point: 12.8, highlightIdx: 4 },\n { time: 3.2, point: 16, highlightIdx: 5 },\n]\n\nconst TabsWithMedia = React.forwardRef<HTMLDivElement, TabsWithMediaProps>(({ data, className }, ref) => {\n const { title, poster, video, mobvideo, items = [], timeIdx = defaultTimeIdx, theme = 'light' } = data\n\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const tabRefs = useRef<(HTMLDivElement | null)[]>([])\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const videoRef = useRef<HTMLVideoElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n const scrollToTabCenter = (index: number) => {\n const container = scrollContainerRef.current\n const tab = tabRefs.current[index]\n\n if (container && tab) {\n const containerRect = container.getBoundingClientRect()\n const tabRect = tab.getBoundingClientRect()\n const offset = tabRect.left - containerRect.left\n const scroll = offset - container.clientWidth / 2 + tab.clientWidth / 2\n\n container.scrollTo({\n left: container.scrollLeft + scroll,\n behavior: 'smooth',\n })\n }\n }\n\n const isMob = useMediaQuery({ query: '(max-width: 768px)' })\n\n const [list, listDouble, row, center, listLength] = useMemo(() => {\n const row = 5\n const center = 2\n const listLength = items.length\n\n const list =\n items?.map((item: TabItem, index: number) => {\n return {\n ...item,\n key: index,\n index: index,\n }\n }) || []\n\n // \u4E3A\u7B2C\u4E8C\u4E2A\u5217\u8868\u7684\u5143\u7D20\u521B\u5EFA\u552F\u4E00\u7684 key,\u907F\u514D\u91CD\u590D\n const listSecond =\n items?.map((item: TabItem, index: number) => {\n return {\n ...item,\n key: index + listLength,\n index: index,\n }\n }) || []\n\n return [list, list.concat(listSecond), row, center, listLength]\n }, [items, isMob])\n\n const [idx, setIdx] = useState(center)\n\n const [cureentList, setCureentList] = useState(listDouble.slice(0, row))\n\n // \u70B9\u51FB tab \u8DF3\u8F6C\u5BF9\u5E94\u89C6\u9891\u4F4D\u7F6E\n const handleNavClick = (key: number, index: number, isAuto?: boolean) => {\n if (key === idx) return\n if (index === center) return\n if (index > center) {\n const gap = index - center\n const copy = [...cureentList]\n copy.splice(0, gap)\n const lastkey = (cureentList[cureentList.length - 1] as any)?.key + 1\n const add = [...listDouble].splice(lastkey, gap)\n copy.push(...add)\n setCureentList([...copy])\n }\n if (index < center) {\n const gap = center - index\n const copy = [...cureentList]\n copy.splice(-gap)\n const firstkey = (cureentList[0] as any)?.key\n const add = [...listDouble].splice(listLength + firstkey - gap, gap)\n copy.unshift(...add)\n setCureentList([...copy])\n }\n\n setIdx(key)\n swiper?.slideTo(key)\n\n if (!isAuto) {\n let time = 0\n timeIdx.forEach(item => {\n if (item.highlightIdx < key) {\n time += item.time\n }\n })\n if (videoRef.current) {\n videoRef.current.currentTime = time\n }\n }\n }\n\n // \u64AD\u653E\u65F6\u6839\u636E\u65F6\u95F4\u5207\u6362 Swiper + tab\n useEffect(() => {\n const video = videoRef.current\n if (!video) return\n\n const handleTimeUpdate = () => {\n const currentTime = video.currentTime\n\n // \u81EA\u52A8\u5207\u6362\u5185\u5BB9\n for (let i = 0; i < timeIdx.length; i++) {\n const prev = i === 0 ? 0 : timeIdx[i - 1].point\n if (currentTime >= prev && currentTime < timeIdx[i].point) {\n handleNavClick(timeIdx[i].highlightIdx, timeIdx[i].highlightIdx, true)\n break\n }\n }\n\n // \u4FEE\u590D\uFF1A\u64AD\u653E\u5230\u6700\u540E\u540E\u81EA\u52A8\u5F52\u96F6\u5E76\u91CD\u65B0\u64AD\u653E\n if (currentTime >= timeIdx[timeIdx.length - 1].point) {\n video.currentTime = 0\n video.play()\n }\n }\n\n video.addEventListener('timeupdate', handleTimeUpdate)\n return () => {\n video.removeEventListener('timeupdate', handleTimeUpdate)\n }\n }, [swiper, timeIdx])\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"TabsWithMedia\"\n className={cn(\n 'tabs-with-media text-info-primary flex flex-col overflow-hidden sm:overflow-visible',\n {\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n <Heading as=\"h3\" size={4} html={title} className=\"tabs-with-media__title text-center\" />\n <div className=\"tabs-with-media__tabs-wrapper scrollbar-hidden relative w-full overflow-x-auto sm:overflow-visible\">\n <div className={cn('tabs-with-media__tabs-inner tablet:w-fit mx-auto mt-[16px] w-full max-w-[824px]')}>\n <div\n className={cn(\n 'tabs-with-media__tabs-container flex translate-x-0 items-center justify-center gap-[16px] transition-all md:gap-[8px]'\n )}\n ref={scrollContainerRef}\n >\n <AnimatePresence mode=\"popLayout\">\n {cureentList?.map((item: any, index: number) => (\n <motion.div\n layout\n key={item?.key}\n ref={el => {\n tabRefs.current[item?.index] = el\n }}\n onClick={() => {\n handleNavClick(item?.key, index)\n }}\n className=\"tabs-with-media__tab-item min-w-[28px] flex-none cursor-pointer overflow-hidden sm:overflow-visible\"\n initial={{ opacity: 1 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{\n duration: 0.3,\n ease: 'easeOut',\n }}\n >\n <div className=\"tabs-with-media__tab-inner flex items-center justify-between\">\n <div\n className={cn('tabs-with-media__tab-content flex', {\n 'flex items-center justify-center gap-[8px] rounded-btn bg-[#fff] p-2 md:gap-[4px] md:p-1':\n idx === item?.key,\n })}\n >\n <div\n className={cn(\n 'tabs-with-media__tab-icon lg-desktop:size-[48px] flex size-[28] items-center justify-center rounded-full md:shrink-0',\n {\n 'h-[28px] w-[28px] bg-[#ccc] bg-opacity-50 lg-desktop:h-[48px] lg-desktop:w-[48px]':\n idx !== item?.index,\n }\n )}\n style={\n idx === item?.key\n ? {\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n }\n : undefined\n }\n >\n <Picture\n source={item?.icon?.url}\n alt={item?.icon?.alt}\n className=\"tabs-with-media__tab-icon-image size-[22px] md:size-[14px]\"\n />\n </div>\n\n <div className=\"tabs-with-media__tab-text-wrapper\">\n <Heading\n as=\"h4\"\n size={2}\n html={item?.tab}\n className={cn(\n 'tabs-with-media__tab-text dynamic-width-heading xs:text-[16px] line-clamp-1 size-0 overflow-hidden whitespace-nowrap text-nowrap text-black opacity-0 transition-all duration-300 ease-linear sm:text-[18px]',\n {\n 'h-auto w-[calc-size(auto,size)] px-[6px] opacity-100': idx === item?.key,\n }\n )}\n />\n </div>\n </div>\n </div>\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n </div>\n </div>\n <div className=\"tabs-with-media__description-container lg-desktop:mt-[24px] mt-[16px]\">\n <Swiper\n slidesPerView={1}\n effect=\"fade\"\n fadeEffect={{ crossFade: true }}\n modules={[Pagination, EffectFade]}\n onSlideChange={swiper => {\n const newIndex = swiper.realIndex\n setIdx(newIndex)\n }}\n onSwiper={swiper => setSwiper(swiper)}\n className=\"tabs-with-media__description-swiper\"\n >\n {items.map((it: TabItem, ind: number) => (\n <SwiperSlide\n key={ind}\n style={{ transition: 'opacity 1s ease-in-out' }}\n className=\"tabs-with-media__description-slide rounded-btn\"\n >\n <div className=\"tabs-with-media__description-content\">\n <Text\n as=\"p\"\n size={2}\n html={it.desc}\n className=\"tabs-with-media__description-text desktop:text-[20px] lg-desktop:text-[18px] text-center\"\n />\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n <div className=\"tabs-with-media__video-wrapper rounded-box laptop:mt-[32px] desktop:mt-[40px] lg-desktop:mt-[64px] mt-[24px] overflow-hidden\">\n <video\n className=\"tabs-with-media__video desktop:h-[448px] lg-desktop:h-[560px] mx-auto h-[360px] w-fit\"\n src={isMob ? mobvideo?.url : video?.url}\n poster={poster?.url}\n playsInline\n autoPlay\n muted\n loop\n ref={videoRef}\n />\n </div>\n </section>\n )\n})\n\nTabsWithMedia.displayName = 'TabsWithMedia'\n\nexport default withLayout(TabsWithMedia)\n"],
5
- "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,EAAAH,IA8KM,IAAAI,EAAA,6BA7KNC,EAAiF,oBACjFC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAE5BJ,EAAoC,wBACpCK,EAAuC,0BAEvCC,EAAwC,yBACxCC,EAA8B,4BAE9B,MAAMC,GAAgB,QAChBC,GAAgB,kBAGhBC,GAA8B,CAClC,CAAE,KAAM,IAAK,MAAO,IAAK,aAAc,CAAE,EACzC,CAAE,KAAM,IAAK,MAAO,IAAK,aAAc,CAAE,EACzC,CAAE,KAAM,IAAK,MAAO,IAAK,aAAc,CAAE,EACzC,CAAE,KAAM,IAAK,MAAO,KAAM,aAAc,CAAE,EAC1C,CAAE,KAAM,IAAK,MAAO,KAAM,aAAc,CAAE,EAC1C,CAAE,KAAM,IAAK,MAAO,GAAI,aAAc,CAAE,CAC1C,EAEMC,EAAgB,EAAAC,QAAM,WAA+C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACvG,KAAM,CAAE,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,SAAAC,EAAU,MAAAC,EAAQ,CAAC,EAAG,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QA,GAAM,MAAM,IACpB,IAAKA,GAAM,MAAM,IACjB,UAAU,6DACZ,EACF,KAEA,OAAC,OAAI,UAAU,oCACb,mBAAC,WACC,GAAG,KACH,KAAM,EACN,KAAMA,GAAM,IACZ,aAAW,MACT,+MACA,CACE,uDAAwDE,IAAQF,GAAM,GACxE,CACF,EACF,EACF,GACF,EACF,GA5DKA,GAAM,GA6Db,CACD,EACH,EACF,EACF,EACF,KACA,OAAC,OAAI,UAAU,wEACb,mBAAC,UACC,cAAe,EACf,OAAO,OACP,WAAY,CAAE,UAAW,EAAK,EAC9B,QAAS,CAAC,aAAY,YAAU,EAChC,cAAelB,GAAU,CACvB,MAAMsC,EAAWtC,EAAO,UACxBqB,EAAOiB,CAAQ,CACjB,EACA,SAAUtC,GAAUC,EAAUD,CAAM,EACpC,UAAU,sCAET,SAAAH,EAAM,IAAI,CAAC0C,EAAaC,OACvB,OAAC,eAEC,MAAO,CAAE,WAAY,wBAAyB,EAC9C,UAAU,iDAEV,mBAAC,OAAI,UAAU,uCACb,mBAAC,QACC,GAAG,IACH,KAAM,EACN,KAAMD,EAAG,KACT,UAAU,2FACZ,EACF,GAXKC,CAYP,CACD,EACH,EACF,KACA,OAAC,OAAI,UAAU,+HACb,mBAAC,SACC,UAAU,wFACV,IAAK5B,EAAQhB,GAAU,IAAMD,GAAO,IACpC,OAAQD,GAAQ,IAChB,YAAW,GACX,SAAQ,GACR,MAAK,GACL,KAAI,GACJ,IAAKU,EACP,EACF,GACF,CAEJ,CAAC,EAEDhB,EAAc,YAAc,gBAE5B,IAAOd,MAAQ,cAAWc,CAAa",
6
- "names": ["TabsWithMedia_exports", "__export", "TabsWithMedia_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_modules", "import_framer_motion", "import_react_responsive", "componentType", "componentName", "defaultTimeIdx", "TabsWithMedia", "React", "data", "className", "ref", "title", "poster", "video", "mobvideo", "items", "timeIdx", "theme", "swiper", "setSwiper", "tabRefs", "scrollContainerRef", "videoRef", "boxRef", "scrollToTabCenter", "index", "container", "tab", "containerRect", "scroll", "isMob", "list", "listDouble", "row", "center", "listLength", "item", "listSecond", "idx", "setIdx", "cureentList", "setCureentList", "handleNavClick", "key", "isAuto", "gap", "copy", "lastkey", "add", "firstkey", "time", "handleTimeUpdate", "currentTime", "i", "prev", "el", "newIndex", "it", "ind"]
4
+ "sourcesContent": ["'use client'\nimport React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { TabsWithMediaProps, TabItem, TimeIndex } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, EffectFade } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { useIsomorphicMediaQuery } from '../../hooks/useIsomorphicMediaQuery.js'\n\nconst componentType = 'video'\nconst componentName = 'tabs_with_media'\n\n// \u9ED8\u8BA4\u65F6\u95F4\u70B9\u914D\u7F6E\nconst defaultTimeIdx: TimeIndex[] = [\n { time: 2.4, point: 2.4, highlightIdx: 0 },\n { time: 2.5, point: 4.9, highlightIdx: 1 },\n { time: 2.5, point: 7.4, highlightIdx: 2 },\n { time: 2.8, point: 10.2, highlightIdx: 3 },\n { time: 2.6, point: 12.8, highlightIdx: 4 },\n { time: 3.2, point: 16, highlightIdx: 5 },\n]\n\nconst TabsWithMedia = React.forwardRef<HTMLDivElement, TabsWithMediaProps>(({ data, className }, ref) => {\n const { title, poster, video, mobvideo, items = [], timeIdx = defaultTimeIdx, theme = 'light' } = data\n\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const tabRefs = useRef<(HTMLDivElement | null)[]>([])\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const videoRef = useRef<HTMLVideoElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n const scrollToTabCenter = (index: number) => {\n const container = scrollContainerRef.current\n const tab = tabRefs.current[index]\n\n if (container && tab) {\n const containerRect = container.getBoundingClientRect()\n const tabRect = tab.getBoundingClientRect()\n const offset = tabRect.left - containerRect.left\n const scroll = offset - container.clientWidth / 2 + tab.clientWidth / 2\n\n container.scrollTo({\n left: container.scrollLeft + scroll,\n behavior: 'smooth',\n })\n }\n }\n\n const isMob = useIsomorphicMediaQuery({ query: '(max-width: 768px)' })\n\n const [list, listDouble, row, center, listLength] = useMemo(() => {\n const row = 5\n const center = 2\n const listLength = items.length\n\n const list =\n items?.map((item: TabItem, index: number) => {\n return {\n ...item,\n key: index,\n index: index,\n }\n }) || []\n\n // \u4E3A\u7B2C\u4E8C\u4E2A\u5217\u8868\u7684\u5143\u7D20\u521B\u5EFA\u552F\u4E00\u7684 key,\u907F\u514D\u91CD\u590D\n const listSecond =\n items?.map((item: TabItem, index: number) => {\n return {\n ...item,\n key: index + listLength,\n index: index,\n }\n }) || []\n\n return [list, list.concat(listSecond), row, center, listLength]\n }, [items, isMob])\n\n const [idx, setIdx] = useState(center)\n\n const [cureentList, setCureentList] = useState(listDouble.slice(0, row))\n\n // \u70B9\u51FB tab \u8DF3\u8F6C\u5BF9\u5E94\u89C6\u9891\u4F4D\u7F6E\n const handleNavClick = (key: number, index: number, isAuto?: boolean) => {\n if (key === idx) return\n if (index === center) return\n if (index > center) {\n const gap = index - center\n const copy = [...cureentList]\n copy.splice(0, gap)\n const lastkey = (cureentList[cureentList.length - 1] as any)?.key + 1\n const add = [...listDouble].splice(lastkey, gap)\n copy.push(...add)\n setCureentList([...copy])\n }\n if (index < center) {\n const gap = center - index\n const copy = [...cureentList]\n copy.splice(-gap)\n const firstkey = (cureentList[0] as any)?.key\n const add = [...listDouble].splice(listLength + firstkey - gap, gap)\n copy.unshift(...add)\n setCureentList([...copy])\n }\n\n setIdx(key)\n swiper?.slideTo(key)\n\n if (!isAuto) {\n let time = 0\n timeIdx.forEach(item => {\n if (item.highlightIdx < key) {\n time += item.time\n }\n })\n if (videoRef.current) {\n videoRef.current.currentTime = time\n }\n }\n }\n\n // \u64AD\u653E\u65F6\u6839\u636E\u65F6\u95F4\u5207\u6362 Swiper + tab\n useEffect(() => {\n const video = videoRef.current\n if (!video) return\n\n const handleTimeUpdate = () => {\n const currentTime = video.currentTime\n\n // \u81EA\u52A8\u5207\u6362\u5185\u5BB9\n for (let i = 0; i < timeIdx.length; i++) {\n const prev = i === 0 ? 0 : timeIdx[i - 1].point\n if (currentTime >= prev && currentTime < timeIdx[i].point) {\n handleNavClick(timeIdx[i].highlightIdx, timeIdx[i].highlightIdx, true)\n break\n }\n }\n\n // \u4FEE\u590D\uFF1A\u64AD\u653E\u5230\u6700\u540E\u540E\u81EA\u52A8\u5F52\u96F6\u5E76\u91CD\u65B0\u64AD\u653E\n if (currentTime >= timeIdx[timeIdx.length - 1].point) {\n video.currentTime = 0\n video.play()\n }\n }\n\n video.addEventListener('timeupdate', handleTimeUpdate)\n return () => {\n video.removeEventListener('timeupdate', handleTimeUpdate)\n }\n }, [swiper, timeIdx])\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"TabsWithMedia\"\n className={cn(\n 'tabs-with-media text-info-primary flex flex-col overflow-hidden sm:overflow-visible',\n {\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n <Heading as=\"h3\" size={4} html={title} className=\"tabs-with-media__title text-center\" />\n <div className=\"tabs-with-media__tabs-wrapper scrollbar-hidden relative w-full overflow-x-auto sm:overflow-visible\">\n <div className={cn('tabs-with-media__tabs-inner tablet:w-fit mx-auto mt-[16px] w-full max-w-[824px]')}>\n <div\n className={cn(\n 'tabs-with-media__tabs-container flex translate-x-0 items-center justify-center gap-[16px] transition-all md:gap-[8px]'\n )}\n ref={scrollContainerRef}\n >\n <AnimatePresence mode=\"popLayout\">\n {cureentList?.map((item: any, index: number) => (\n <motion.div\n layout\n key={item?.key}\n ref={el => {\n tabRefs.current[item?.index] = el\n }}\n onClick={() => {\n handleNavClick(item?.key, index)\n }}\n className=\"tabs-with-media__tab-item min-w-[28px] flex-none cursor-pointer overflow-hidden sm:overflow-visible\"\n initial={{ opacity: 1 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{\n duration: 0.3,\n ease: 'easeOut',\n }}\n >\n <div className=\"tabs-with-media__tab-inner flex items-center justify-between\">\n <div\n className={cn('tabs-with-media__tab-content flex', {\n 'flex items-center justify-center gap-[8px] rounded-btn bg-[#fff] p-2 md:gap-[4px] md:p-1':\n idx === item?.key,\n })}\n >\n <div\n className={cn(\n 'tabs-with-media__tab-icon lg-desktop:size-[48px] flex size-[28] items-center justify-center rounded-full md:shrink-0',\n {\n 'h-[28px] w-[28px] bg-[#ccc] bg-opacity-50 lg-desktop:h-[48px] lg-desktop:w-[48px]':\n idx !== item?.index,\n }\n )}\n style={\n idx === item?.key\n ? {\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n }\n : undefined\n }\n >\n <Picture\n source={item?.icon?.url}\n alt={item?.icon?.alt}\n className=\"tabs-with-media__tab-icon-image size-[22px] md:size-[14px]\"\n />\n </div>\n\n <div className=\"tabs-with-media__tab-text-wrapper\">\n <Heading\n as=\"h4\"\n size={2}\n html={item?.tab}\n className={cn(\n 'tabs-with-media__tab-text dynamic-width-heading xs:text-[16px] line-clamp-1 size-0 overflow-hidden whitespace-nowrap text-nowrap text-black opacity-0 transition-all duration-300 ease-linear sm:text-[18px]',\n {\n 'h-auto w-[calc-size(auto,size)] px-[6px] opacity-100': idx === item?.key,\n }\n )}\n />\n </div>\n </div>\n </div>\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n </div>\n </div>\n <div className=\"tabs-with-media__description-container lg-desktop:mt-[24px] mt-[16px]\">\n <Swiper\n slidesPerView={1}\n effect=\"fade\"\n fadeEffect={{ crossFade: true }}\n modules={[Pagination, EffectFade]}\n onSlideChange={swiper => {\n const newIndex = swiper.realIndex\n setIdx(newIndex)\n }}\n onSwiper={swiper => setSwiper(swiper)}\n className=\"tabs-with-media__description-swiper\"\n >\n {items.map((it: TabItem, ind: number) => (\n <SwiperSlide\n key={ind}\n style={{ transition: 'opacity 1s ease-in-out' }}\n className=\"tabs-with-media__description-slide rounded-btn\"\n >\n <div className=\"tabs-with-media__description-content\">\n <Text\n as=\"p\"\n size={2}\n html={it.desc}\n className=\"tabs-with-media__description-text desktop:text-[20px] lg-desktop:text-[18px] text-center\"\n />\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n <div className=\"tabs-with-media__video-wrapper rounded-box laptop:mt-[32px] desktop:mt-[40px] lg-desktop:mt-[64px] mt-[24px] overflow-hidden\">\n <video\n className=\"tabs-with-media__video desktop:h-[448px] lg-desktop:h-[560px] mx-auto h-[360px] w-fit\"\n src={isMob ? mobvideo?.url : video?.url}\n poster={poster?.url}\n playsInline\n autoPlay\n muted\n loop\n ref={videoRef}\n />\n </div>\n </section>\n )\n})\n\nTabsWithMedia.displayName = 'TabsWithMedia'\n\nexport default withLayout(TabsWithMedia)\n"],
5
+ "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,EAAAH,IA8KM,IAAAI,EAAA,6BA7KNC,EAAiF,oBACjFC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAE5BJ,EAAoC,wBACpCK,EAAuC,0BAEvCC,EAAwC,yBACxCC,EAAwC,kDAExC,MAAMC,GAAgB,QAChBC,GAAgB,kBAGhBC,GAA8B,CAClC,CAAE,KAAM,IAAK,MAAO,IAAK,aAAc,CAAE,EACzC,CAAE,KAAM,IAAK,MAAO,IAAK,aAAc,CAAE,EACzC,CAAE,KAAM,IAAK,MAAO,IAAK,aAAc,CAAE,EACzC,CAA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,IAAKU,EACP,EACF,GACF,CAEJ,CAAC,EAEDhB,EAAc,YAAc,gBAE5B,IAAOd,MAAQ,cAAWc,CAAa",
6
+ "names": ["TabsWithMedia_exports", "__export", "TabsWithMedia_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_modules", "import_framer_motion", "import_useIsomorphicMediaQuery", "componentType", "componentName", "defaultTimeIdx", "TabsWithMedia", "React", "data", "className", "ref", "title", "poster", "video", "mobvideo", "items", "timeIdx", "theme", "swiper", "setSwiper", "tabRefs", "scrollContainerRef", "videoRef", "boxRef", "scrollToTabCenter", "index", "container", "tab", "containerRect", "scroll", "isMob", "list", "listDouble", "row", "center", "listLength", "item", "listSecond", "idx", "setIdx", "cureentList", "setCureentList", "handleNavClick", "key", "isAuto", "gap", "copy", "lastkey", "add", "firstkey", "time", "handleTimeUpdate", "currentTime", "i", "prev", "el", "newIndex", "it", "ind"]
7
7
  }
@@ -4,7 +4,7 @@ import 'swiper/css';
4
4
  import 'swiper/css/navigation';
5
5
  import 'swiper/css/pagination';
6
6
  import 'swiper/css/effect-coverflow';
7
- declare const _default: React.ForwardRefExoticComponent<Omit<ThreeDCarouselProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
7
+ declare const _default: React.ForwardRefExoticComponent<Omit<ThreeDCarouselProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../index.js").ContainerProps & React.RefAttributes<unknown>> & {
8
8
  readonly $$typeof: symbol;
9
9
  };
10
10
  export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var z=Object.create;var f=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var j=(o,r)=>{for(var s in r)f(o,s,{get:r[s],enumerable:!0})},g=(o,r,s,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of D(r))!R.call(o,a)&&a!==s&&f(o,a,{get:()=>r[a],enumerable:!(u=E(r,a))||u.enumerable});return o};var B=(o,r,s)=>(s=o!=null?z(P(o)):{},g(r||!o||!o.__esModule?f(s,"default",{value:o,enumerable:!0}):s,o)),M=o=>g(f({},"__esModule",{value:!0}),o);var W={};j(W,{default:()=>V});module.exports=M(W);var e=require("react/jsx-runtime"),i=B(require("react")),l=require("../../components/index.js"),c=require("../../helpers/utils.js"),N=require("../../shared/Styles.js"),y=require("../../hooks/useExposure.js"),S=require("../AiuiProvider/index.js"),p=require("swiper/react"),h=require("swiper/modules"),q=require("swiper/css"),F=require("swiper/css/navigation"),G=require("swiper/css/pagination"),J=require("swiper/css/effect-coverflow");const H="carousel",U="three_d_carousel",I=()=>(0,e.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]",children:[(0,e.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M32 20L24 28L32 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),O=()=>(0,e.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]",children:[(0,e.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M24 20L32 28L24 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),k=i.default.forwardRef(({data:o,className:r},s)=>{const{title:u,items:a=[]}=o,w=a.length<4?[...a,...a]:a,n=(0,i.useRef)(null),v=(0,i.useRef)(null),x=(0,i.useRef)(null),[T,C]=i.default.useState(180),{locale:b="us"}=(0,S.useAiuiContext)();return(0,y.useExposure)(v,{componentType:H,componentName:U,componentTitle:u}),(0,i.useImperativeHandle)(s,()=>v.current),i.default.useEffect(()=>{const t=x.current;if(!t)return;const d=()=>{const L=t.offsetWidth,_=Math.round(L*.125);C(_),n.current?.params?.coverflowEffect&&(n.current.params.coverflowEffect.stretch=_,n.current.update())};d();const m=new ResizeObserver(d);return m.observe(t),()=>m.disconnect()},[]),(0,e.jsxs)("section",{ref:v,"data-ui-component-id":"ThreeDCarousel",className:(0,c.cn)("three-d-carousel laptop:overflow-hidden w-full overflow-visible",r),children:[(0,e.jsx)(l.Heading,{as:"h1",size:4,html:u,className:"three-d-carousel__title laptop:text-center text-left"}),(0,e.jsxs)("div",{ref:x,className:"three-d-carousel__desktop laptop:block relative mx-auto mt-[24px] hidden w-full",children:[(0,e.jsx)(p.Swiper,{onSwiper:t=>n.current=t,centeredSlides:!0,initialSlide:0,loop:!0,slidesPerView:"auto",spaceBetween:0,grabCursor:!0,modules:[h.EffectCoverflow,h.Navigation],slideToClickedSlide:!0,className:"three-d-carousel__swiper rounded-box relative aspect-[1386/502] overflow-visible",effect:"coverflow",coverflowEffect:{rotate:0,stretch:T,depth:300,modifier:1,slideShadows:!0},children:w.map((t,d)=>(0,e.jsx)(p.SwiperSlide,{className:"three-d-carousel__slide relative !w-1/2 cursor-grab overflow-hidden opacity-0 [.swiper-slide-active&]:opacity-100 [.swiper-slide-next&]:opacity-100 [.swiper-slide-prev&]:opacity-100",children:({isActive:m})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.Picture,{source:t.imageUrl?.url||"",alt:t.imageUrl?.alt||t.title,className:(0,c.cn)("three-d-carousel__image rounded-box mx-auto h-full overflow-hidden"),imgClassName:"h-full object-cover",style:{filter:m?"":"brightness(50%) contrast(120%)"}}),(0,e.jsxs)("div",{className:(0,c.cn)("three-d-carousel__image-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":t.theme==="dark","opacity-0":!m}),children:[(0,e.jsx)(l.Heading,{as:"h2",size:2,html:t.title}),(0,e.jsx)(l.Text,{as:"p",size:4,html:t.description,className:"three-d-carousel__image-description lg-desktop:text-[18px] desktop:text-[16px] text-[14px]"}),t.buttonText&&(0,e.jsx)("a",{href:(0,c.getLocalizedPath)(t.buttonLink||"",b),className:"three-d-carousel__image-link ",children:(0,e.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-button desktop:mt-6 mt-4",children:t.buttonText})})]})]})},d))}),(0,e.jsxs)("div",{className:"three-d-carousel__nav-controls laptop:px-[64px] desktop:px-[140px] lg-desktop:px-[200px] absolute left-1/2 top-1/2 z-20 flex w-full -translate-x-1/2 -translate-y-1/2 justify-between",children:[(0,e.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--prev",onClick:()=>n.current?.slidePrev(),"aria-label":"Previous slide",children:(0,e.jsx)(I,{})}),(0,e.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--next",onClick:()=>n.current?.slideNext(),"aria-label":"Next slide",children:(0,e.jsx)(O,{})})]})]}),(0,e.jsx)("div",{className:"three-d-carousel__mobile laptop:hidden mt-[24px] block w-full overflow-visible",children:(0,e.jsx)(p.Swiper,{loop:!0,loopAdditionalSlides:1,slidesPerView:"auto",spaceBetween:12,grabCursor:!0,className:"three-d-carousel__swiper-mobile relative w-full !overflow-visible",children:w.map((t,d)=>(0,e.jsxs)(p.SwiperSlide,{className:"three-d-carousel__slide-mobile relative !h-[360px] !w-[296px] cursor-grab overflow-hidden",children:[(0,e.jsx)(l.Picture,{source:t.mobImageUrl?.url||t.imageUrl?.url||"",alt:t.mobImageUrl?.alt||t.title,className:"three-d-carousel__image-mobile rounded-box mx-auto h-full overflow-hidden",imgClassName:"h-full object-cover"}),(0,e.jsxs)("div",{className:(0,c.cn)("three-d-carousel__image-mobile-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":t.theme==="dark"}),children:[(0,e.jsx)(l.Heading,{as:"h2",size:2,html:t.title}),(0,e.jsx)(l.Text,{as:"p",size:4,html:t.description,className:"three-d-carousel__image-mobile-description text-[14px]"}),t.buttonText&&(0,e.jsx)("a",{href:(0,c.getLocalizedPath)(t.buttonLink||"",b),className:"three-d-carousel__image-mobile-link ",children:(0,e.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-mobile-button mt-3",children:t.buttonText})})]})]},d))})})]})});k.displayName="ThreeDCarousel";var V=(0,N.withLayout)(k,{style:"overflow: hidden;"});
1
+ "use strict";"use client";var H=Object.create;var f=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var U=(o,r)=>{for(var s in r)f(o,s,{get:r[s],enumerable:!0})},S=(o,r,s,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of j(r))!M.call(o,a)&&a!==s&&f(o,a,{get:()=>r[a],enumerable:!(u=P(r,a))||u.enumerable});return o};var $=(o,r,s)=>(s=o!=null?H(B(o)):{},S(r||!o||!o.__esModule?f(s,"default",{value:o,enumerable:!0}):s,o)),I=o=>S(f({},"__esModule",{value:!0}),o);var A={};U(A,{default:()=>W});module.exports=I(A);var e=require("react/jsx-runtime"),i=$(require("react")),l=require("../../components/index.js"),c=require("../../helpers/utils.js"),C=require("../../shared/Styles.js"),L=require("../../hooks/useExposure.js"),z=require("../AiuiProvider/index.js"),b=require("../../shared/trackUrlRef.js"),p=require("swiper/react"),h=require("swiper/modules"),F=require("swiper/css"),G=require("swiper/css/navigation"),J=require("swiper/css/pagination"),K=require("swiper/css/effect-coverflow");const w="carousel",x="three_d_carousel",O=()=>(0,e.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]",children:[(0,e.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M32 20L24 28L32 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),V=()=>(0,e.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]",children:[(0,e.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M24 20L32 28L24 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),T=i.default.forwardRef(({data:o,className:r},s)=>{const{title:u,items:a=[]}=o,_=a.length<4?[...a,...a]:a,n=(0,i.useRef)(null),v=(0,i.useRef)(null),g=(0,i.useRef)(null),[D,E]=i.default.useState(180),{locale:k="us",trackingData:N}=(0,z.useAiuiContext)();return(0,L.useExposure)(v,{componentType:w,componentName:x,componentTitle:u}),(0,i.useImperativeHandle)(s,()=>v.current),i.default.useEffect(()=>{const t=g.current;if(!t)return;const d=()=>{const R=t.offsetWidth,y=Math.round(R*.125);E(y),n.current?.params?.coverflowEffect&&(n.current.params.coverflowEffect.stretch=y,n.current.update())};d();const m=new ResizeObserver(d);return m.observe(t),()=>m.disconnect()},[]),(0,e.jsxs)("section",{ref:v,"data-ui-component-id":"ThreeDCarousel",className:(0,c.cn)("three-d-carousel laptop:overflow-hidden w-full overflow-visible",r),children:[(0,e.jsx)(l.Heading,{as:"h1",size:4,html:u,className:"three-d-carousel__title laptop:text-center text-left"}),(0,e.jsxs)("div",{ref:g,className:"three-d-carousel__desktop laptop:block relative mx-auto mt-[24px] hidden w-full",children:[(0,e.jsx)(p.Swiper,{onSwiper:t=>n.current=t,centeredSlides:!0,initialSlide:0,loop:!0,slidesPerView:"auto",spaceBetween:0,grabCursor:!0,modules:[h.EffectCoverflow,h.Navigation],slideToClickedSlide:!0,className:"three-d-carousel__swiper rounded-box relative aspect-[1386/502] overflow-visible",effect:"coverflow",coverflowEffect:{rotate:0,stretch:D,depth:300,modifier:1,slideShadows:!0},children:_.map((t,d)=>(0,e.jsx)(p.SwiperSlide,{className:"three-d-carousel__slide relative !w-1/2 cursor-grab overflow-hidden opacity-0 [.swiper-slide-active&]:opacity-100 [.swiper-slide-next&]:opacity-100 [.swiper-slide-prev&]:opacity-100",children:({isActive:m})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l.Picture,{source:t.imageUrl?.url||"",alt:t.imageUrl?.alt||t.title,className:(0,c.cn)("three-d-carousel__image rounded-box mx-auto h-full overflow-hidden"),imgClassName:"h-full object-cover",style:{filter:m?"":"brightness(50%) contrast(120%)"}}),(0,e.jsxs)("div",{className:(0,c.cn)("three-d-carousel__image-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":t.theme==="dark","opacity-0":!m}),children:[(0,e.jsx)(l.Heading,{as:"h2",size:2,html:t.title}),(0,e.jsx)(l.Text,{as:"p",size:4,html:t.description,className:"three-d-carousel__image-description lg-desktop:text-[18px] desktop:text-[16px] text-[14px]"}),t.buttonText&&(0,e.jsx)("a",{href:(0,b.trackUrlRef)((0,c.getLocalizedPath)(t.buttonLink||"",k),`${N?.contextHandle||""}_${w}_${x}`),className:"three-d-carousel__image-link ",children:(0,e.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-button desktop:mt-6 mt-4",children:t.buttonText})})]})]})},d))}),(0,e.jsxs)("div",{className:"three-d-carousel__nav-controls laptop:px-[64px] desktop:px-[140px] lg-desktop:px-[200px] absolute left-1/2 top-1/2 z-20 flex w-full -translate-x-1/2 -translate-y-1/2 justify-between",children:[(0,e.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--prev",onClick:()=>n.current?.slidePrev(),"aria-label":"Previous slide",children:(0,e.jsx)(O,{})}),(0,e.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--next",onClick:()=>n.current?.slideNext(),"aria-label":"Next slide",children:(0,e.jsx)(V,{})})]})]}),(0,e.jsx)("div",{className:"three-d-carousel__mobile laptop:hidden mt-[24px] block w-full overflow-visible",children:(0,e.jsx)(p.Swiper,{loop:!0,loopAdditionalSlides:1,slidesPerView:"auto",spaceBetween:12,grabCursor:!0,className:"three-d-carousel__swiper-mobile relative w-full !overflow-visible",children:_.map((t,d)=>(0,e.jsxs)(p.SwiperSlide,{className:"three-d-carousel__slide-mobile relative !h-[360px] !w-[296px] cursor-grab overflow-hidden",children:[(0,e.jsx)(l.Picture,{source:t.mobImageUrl?.url||t.imageUrl?.url||"",alt:t.mobImageUrl?.alt||t.title,className:"three-d-carousel__image-mobile rounded-box mx-auto h-full overflow-hidden",imgClassName:"h-full object-cover"}),(0,e.jsxs)("div",{className:(0,c.cn)("three-d-carousel__image-mobile-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":t.theme==="dark"}),children:[(0,e.jsx)(l.Heading,{as:"h2",size:2,html:t.title}),(0,e.jsx)(l.Text,{as:"p",size:4,html:t.description,className:"three-d-carousel__image-mobile-description text-[14px]"}),t.buttonText&&(0,e.jsx)("a",{href:(0,b.trackUrlRef)((0,c.getLocalizedPath)(t.buttonLink||"",k),`${N?.contextHandle||""}_${w}_${x}`),className:"three-d-carousel__image-mobile-link ",children:(0,e.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-mobile-button mt-3",children:t.buttonText})})]})]},d))})})]})});T.displayName="ThreeDCarousel";var W=(0,C.withLayout)(T,{style:"overflow: hidden;"});
2
2
  //# sourceMappingURL=ThreeDCarousel.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ThreeDCarousel/ThreeDCarousel.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport type { ThreeDCarouselProps } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, EffectCoverflow } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\nimport 'swiper/css/effect-coverflow'\n\nconst componentType = 'carousel'\nconst componentName = 'three_d_carousel'\n\nconst ChevronLeft = () => (\n <svg\n width=\"56\"\n height=\"56\"\n viewBox=\"0 0 56 56\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]\"\n >\n <circle cx=\"28\" cy=\"28\" r=\"28\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M32 20L24 28L32 36\" stroke=\"white\" strokeWidth=\"2.66667\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg\n width=\"56\"\n height=\"56\"\n viewBox=\"0 0 56 56\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]\"\n >\n <circle cx=\"28\" cy=\"28\" r=\"28\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M24 20L32 28L24 36\" stroke=\"white\" strokeWidth=\"2.66667\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ThreeDCarousel = React.forwardRef<HTMLDivElement, ThreeDCarouselProps>(({ data, className }, ref) => {\n const { title, items = [] } = data\n const cloneItems = items.length < 4 ? [...items, ...items] : items\n const swiperRef = useRef<SwiperType | null>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n const containerRef = useRef<HTMLDivElement>(null)\n const [stretchValue, setStretchValue] = React.useState(180)\n const { locale = 'us' } = useAiuiContext()\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // \u52A8\u6001\u8BA1\u7B97 stretch \u503C\uFF0C\u8BA9\u4E09\u4E2A slide \u521A\u597D\u5360\u6EE1\u5BB9\u5668\u5BBD\u5EA6\n React.useEffect(() => {\n const container = containerRef.current\n if (!container) return\n\n const updateStretch = () => {\n const containerWidth = container.offsetWidth\n // stretch \u4E3A\u5BB9\u5668\u5BBD\u5EA6\u7684 12.5%\uFF0C\u8BA9\u4E09\u4E2A slide (50% + 2*25%) \u521A\u597D\u5360\u6EE1\n const newStretch = Math.round(containerWidth * 0.125)\n setStretchValue(newStretch)\n\n // \u66F4\u65B0 Swiper \u914D\u7F6E\n if (swiperRef.current?.params?.coverflowEffect) {\n swiperRef.current.params.coverflowEffect.stretch = newStretch\n swiperRef.current.update()\n }\n }\n\n // \u521D\u59CB\u5316\u8BA1\u7B97\n updateStretch()\n\n // \u76D1\u542C\u5BB9\u5668\u5C3A\u5BF8\u53D8\u5316\n const resizeObserver = new ResizeObserver(updateStretch)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ThreeDCarousel\"\n className={cn('three-d-carousel laptop:overflow-hidden w-full overflow-visible', className)}\n >\n <Heading as=\"h1\" size={4} html={title} className=\"three-d-carousel__title laptop:text-center text-left\" />\n\n {/* Desktop carousel with 3D effect */}\n <div\n ref={containerRef}\n className=\"three-d-carousel__desktop laptop:block relative mx-auto mt-[24px] hidden w-full\"\n >\n <Swiper\n onSwiper={swiper => (swiperRef.current = swiper)}\n centeredSlides={true}\n initialSlide={0}\n loop\n slidesPerView={'auto'}\n // loopAdditionalSlides={2}\n spaceBetween={0}\n grabCursor\n modules={[EffectCoverflow, Navigation]}\n slideToClickedSlide\n className=\"three-d-carousel__swiper rounded-box relative aspect-[1386/502] overflow-visible\"\n effect=\"coverflow\"\n coverflowEffect={{\n rotate: 0,\n stretch: stretchValue,\n depth: 300,\n modifier: 1,\n slideShadows: true,\n }}\n >\n {cloneItems.map((item, index) => (\n <SwiperSlide\n key={index}\n className=\"three-d-carousel__slide relative !w-1/2 cursor-grab overflow-hidden opacity-0 [.swiper-slide-active&]:opacity-100 [.swiper-slide-next&]:opacity-100 [.swiper-slide-prev&]:opacity-100\"\n >\n {({ isActive }) => (\n <>\n <Picture\n source={item.imageUrl?.url || ''}\n alt={item.imageUrl?.alt || item.title}\n className={cn('three-d-carousel__image rounded-box mx-auto h-full overflow-hidden')}\n imgClassName=\"h-full object-cover\"\n style={{\n filter: isActive ? '' : 'brightness(50%) contrast(120%)',\n }}\n />\n <div\n className={cn(\n 'three-d-carousel__image-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]',\n {\n 'aiui-dark': item.theme === 'dark',\n 'opacity-0': !isActive,\n }\n )}\n >\n <Heading as=\"h2\" size={2} html={item.title} />\n <Text\n as=\"p\"\n size={4}\n html={item.description}\n className=\"three-d-carousel__image-description lg-desktop:text-[18px] desktop:text-[16px] text-[14px]\"\n />\n {item.buttonText && (\n <a\n href={getLocalizedPath(item.buttonLink || '', locale)}\n className=\"three-d-carousel__image-link \"\n >\n <Button\n size=\"base\"\n variant=\"secondary\"\n className=\"three-d-carousel__image-button desktop:mt-6 mt-4\"\n >\n {item.buttonText}\n </Button>\n </a>\n )}\n </div>\n </>\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n <div className=\"three-d-carousel__nav-controls laptop:px-[64px] desktop:px-[140px] lg-desktop:px-[200px] absolute left-1/2 top-1/2 z-20 flex w-full -translate-x-1/2 -translate-y-1/2 justify-between\">\n <button\n className=\"three-d-carousel__nav-button three-d-carousel__nav-button--prev\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous slide\"\n >\n <ChevronLeft />\n </button>\n <button\n className=\"three-d-carousel__nav-button three-d-carousel__nav-button--next\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next slide\"\n >\n <ChevronRight />\n </button>\n </div>\n </div>\n\n {/* Mobile carousel */}\n <div className=\"three-d-carousel__mobile laptop:hidden mt-[24px] block w-full overflow-visible\">\n <Swiper\n loop={true}\n loopAdditionalSlides={1}\n slidesPerView={'auto'}\n spaceBetween={12}\n grabCursor\n className=\"three-d-carousel__swiper-mobile relative w-full !overflow-visible\"\n >\n {cloneItems.map((item, index) => (\n <SwiperSlide\n key={index}\n className=\"three-d-carousel__slide-mobile relative !h-[360px] !w-[296px] cursor-grab overflow-hidden\"\n >\n <Picture\n source={item.mobImageUrl?.url || item.imageUrl?.url || ''}\n alt={item.mobImageUrl?.alt || item.title}\n className=\"three-d-carousel__image-mobile rounded-box mx-auto h-full overflow-hidden\"\n imgClassName=\"h-full object-cover\"\n />\n <div\n className={cn(\n 'three-d-carousel__image-mobile-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Heading as=\"h2\" size={2} html={item.title} />\n <Text\n as=\"p\"\n size={4}\n html={item.description}\n className=\"three-d-carousel__image-mobile-description text-[14px]\"\n />\n {item.buttonText && (\n <a\n href={getLocalizedPath(item.buttonLink || '', locale)}\n className=\"three-d-carousel__image-mobile-link \"\n >\n <Button size=\"base\" variant=\"secondary\" className=\"three-d-carousel__image-mobile-button mt-3\">\n {item.buttonText}\n </Button>\n </a>\n )}\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n </section>\n )\n})\n\nThreeDCarousel.displayName = 'ThreeDCarousel'\n\nexport default withLayout(ThreeDCarousel, { style: 'overflow: hidden;' })\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqBE,IAAAI,EAAA,6BApBFC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAqC,kCACrCC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA+B,oCAE/BL,EAAoC,wBACpCM,EAA4C,0BAG5CC,EAAO,sBACPC,EAAO,iCACPC,EAAO,iCACPC,EAAO,uCAEP,MAAMC,EAAgB,WAChBC,EAAgB,mBAEhBC,EAAc,OAClB,QAAC,OACC,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,UAAU,8FAEV,oBAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAK,eAAe,YAAY,MAAM,KACrE,OAAC,QAAK,EAAE,qBAAqB,OAAO,QAAQ,YAAY,UAAU,cAAc,QAAQ,eAAe,QAAQ,GACjH,EAGIC,EAAe,OACnB,QAAC,OACC,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,UAAU,8FAEV,oBAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAK,eAAe,YAAY,MAAM,KACrE,OAAC,QAAK,EAAE,qBAAqB,OAAO,QAAQ,YAAY,UAAU,cAAc,QAAQ,eAAe,QAAQ,GACjH,EAGIC,EAAiB,EAAAC,QAAM,WAAgD,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACzG,KAAM,CAAE,MAAAC,EAAO,MAAAC,EAAQ,CAAC,CAAE,EAAIJ,EACxBK,EAAaD,EAAM,OAA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,sBACf,KACA,QAAC,OACC,aAAW,MACT,qKACA,CACE,YAAaA,EAAK,QAAU,MAC9B,CACF,EAEA,oBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,KAAMA,EAAK,MAAO,KAC5C,OAAC,QACC,GAAG,IACH,KAAM,EACN,KAAMA,EAAK,YACX,UAAU,yDACZ,EACCA,EAAK,eACJ,OAAC,KACC,QAAM,oBAAiBA,EAAK,YAAc,GAAIP,CAAM,EACpD,UAAU,uCAEV,mBAAC,UAAO,KAAK,OAAO,QAAQ,YAAY,UAAU,6CAC/C,SAAAO,EAAK,WACR,EACF,GAEJ,IAlCKC,CAmCP,CACD,EACH,EACF,GACF,CAEJ,CAAC,EAEDrB,EAAe,YAAc,iBAE7B,IAAOlB,KAAQ,cAAWkB,EAAgB,CAAE,MAAO,mBAAoB,CAAC",
6
- "names": ["ThreeDCarousel_exports", "__export", "ThreeDCarousel_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_AiuiProvider", "import_modules", "import_css", "import_navigation", "import_pagination", "import_effect_coverflow", "componentType", "componentName", "ChevronLeft", "ChevronRight", "ThreeDCarousel", "React", "data", "className", "ref", "title", "items", "cloneItems", "swiperRef", "boxRef", "containerRef", "stretchValue", "setStretchValue", "locale", "container", "updateStretch", "containerWidth", "newStretch", "resizeObserver", "swiper", "item", "index", "isActive"]
4
+ "sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { ThreeDCarouselProps } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, EffectCoverflow } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\nimport 'swiper/css/effect-coverflow'\n\nconst componentType = 'carousel'\nconst componentName = 'three_d_carousel'\n\nconst ChevronLeft = () => (\n <svg\n width=\"56\"\n height=\"56\"\n viewBox=\"0 0 56 56\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]\"\n >\n <circle cx=\"28\" cy=\"28\" r=\"28\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M32 20L24 28L32 36\" stroke=\"white\" strokeWidth=\"2.66667\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg\n width=\"56\"\n height=\"56\"\n viewBox=\"0 0 56 56\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]\"\n >\n <circle cx=\"28\" cy=\"28\" r=\"28\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M24 20L32 28L24 36\" stroke=\"white\" strokeWidth=\"2.66667\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ThreeDCarousel = React.forwardRef<HTMLDivElement, ThreeDCarouselProps>(({ data, className }, ref) => {\n const { title, items = [] } = data\n const cloneItems = items.length < 4 ? [...items, ...items] : items\n const swiperRef = useRef<SwiperType | null>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n const containerRef = useRef<HTMLDivElement>(null)\n const [stretchValue, setStretchValue] = React.useState(180)\n const { locale = 'us', trackingData } = useAiuiContext()\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // \u52A8\u6001\u8BA1\u7B97 stretch \u503C\uFF0C\u8BA9\u4E09\u4E2A slide \u521A\u597D\u5360\u6EE1\u5BB9\u5668\u5BBD\u5EA6\n React.useEffect(() => {\n const container = containerRef.current\n if (!container) return\n\n const updateStretch = () => {\n const containerWidth = container.offsetWidth\n // stretch \u4E3A\u5BB9\u5668\u5BBD\u5EA6\u7684 12.5%\uFF0C\u8BA9\u4E09\u4E2A slide (50% + 2*25%) \u521A\u597D\u5360\u6EE1\n const newStretch = Math.round(containerWidth * 0.125)\n setStretchValue(newStretch)\n\n // \u66F4\u65B0 Swiper \u914D\u7F6E\n if (swiperRef.current?.params?.coverflowEffect) {\n swiperRef.current.params.coverflowEffect.stretch = newStretch\n swiperRef.current.update()\n }\n }\n\n // \u521D\u59CB\u5316\u8BA1\u7B97\n updateStretch()\n\n // \u76D1\u542C\u5BB9\u5668\u5C3A\u5BF8\u53D8\u5316\n const resizeObserver = new ResizeObserver(updateStretch)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ThreeDCarousel\"\n className={cn('three-d-carousel laptop:overflow-hidden w-full overflow-visible', className)}\n >\n <Heading as=\"h1\" size={4} html={title} className=\"three-d-carousel__title laptop:text-center text-left\" />\n\n {/* Desktop carousel with 3D effect */}\n <div\n ref={containerRef}\n className=\"three-d-carousel__desktop laptop:block relative mx-auto mt-[24px] hidden w-full\"\n >\n <Swiper\n onSwiper={swiper => (swiperRef.current = swiper)}\n centeredSlides={true}\n initialSlide={0}\n loop\n slidesPerView={'auto'}\n // loopAdditionalSlides={2}\n spaceBetween={0}\n grabCursor\n modules={[EffectCoverflow, Navigation]}\n slideToClickedSlide\n className=\"three-d-carousel__swiper rounded-box relative aspect-[1386/502] overflow-visible\"\n effect=\"coverflow\"\n coverflowEffect={{\n rotate: 0,\n stretch: stretchValue,\n depth: 300,\n modifier: 1,\n slideShadows: true,\n }}\n >\n {cloneItems.map((item, index) => (\n <SwiperSlide\n key={index}\n className=\"three-d-carousel__slide relative !w-1/2 cursor-grab overflow-hidden opacity-0 [.swiper-slide-active&]:opacity-100 [.swiper-slide-next&]:opacity-100 [.swiper-slide-prev&]:opacity-100\"\n >\n {({ isActive }) => (\n <>\n <Picture\n source={item.imageUrl?.url || ''}\n alt={item.imageUrl?.alt || item.title}\n className={cn('three-d-carousel__image rounded-box mx-auto h-full overflow-hidden')}\n imgClassName=\"h-full object-cover\"\n style={{\n filter: isActive ? '' : 'brightness(50%) contrast(120%)',\n }}\n />\n <div\n className={cn(\n 'three-d-carousel__image-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]',\n {\n 'aiui-dark': item.theme === 'dark',\n 'opacity-0': !isActive,\n }\n )}\n >\n <Heading as=\"h2\" size={2} html={item.title} />\n <Text\n as=\"p\"\n size={4}\n html={item.description}\n className=\"three-d-carousel__image-description lg-desktop:text-[18px] desktop:text-[16px] text-[14px]\"\n />\n {item.buttonText && (\n <a\n href={trackUrlRef(\n getLocalizedPath(item.buttonLink || '', locale),\n `${trackingData?.contextHandle || ''}_${componentType}_${componentName}`\n )}\n className=\"three-d-carousel__image-link \"\n >\n <Button\n size=\"base\"\n variant=\"secondary\"\n className=\"three-d-carousel__image-button desktop:mt-6 mt-4\"\n >\n {item.buttonText}\n </Button>\n </a>\n )}\n </div>\n </>\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n <div className=\"three-d-carousel__nav-controls laptop:px-[64px] desktop:px-[140px] lg-desktop:px-[200px] absolute left-1/2 top-1/2 z-20 flex w-full -translate-x-1/2 -translate-y-1/2 justify-between\">\n <button\n className=\"three-d-carousel__nav-button three-d-carousel__nav-button--prev\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous slide\"\n >\n <ChevronLeft />\n </button>\n <button\n className=\"three-d-carousel__nav-button three-d-carousel__nav-button--next\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next slide\"\n >\n <ChevronRight />\n </button>\n </div>\n </div>\n\n {/* Mobile carousel */}\n <div className=\"three-d-carousel__mobile laptop:hidden mt-[24px] block w-full overflow-visible\">\n <Swiper\n loop={true}\n loopAdditionalSlides={1}\n slidesPerView={'auto'}\n spaceBetween={12}\n grabCursor\n className=\"three-d-carousel__swiper-mobile relative w-full !overflow-visible\"\n >\n {cloneItems.map((item, index) => (\n <SwiperSlide\n key={index}\n className=\"three-d-carousel__slide-mobile relative !h-[360px] !w-[296px] cursor-grab overflow-hidden\"\n >\n <Picture\n source={item.mobImageUrl?.url || item.imageUrl?.url || ''}\n alt={item.mobImageUrl?.alt || item.title}\n className=\"three-d-carousel__image-mobile rounded-box mx-auto h-full overflow-hidden\"\n imgClassName=\"h-full object-cover\"\n />\n <div\n className={cn(\n 'three-d-carousel__image-mobile-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Heading as=\"h2\" size={2} html={item.title} />\n <Text\n as=\"p\"\n size={4}\n html={item.description}\n className=\"three-d-carousel__image-mobile-description text-[14px]\"\n />\n {item.buttonText && (\n <a\n href={trackUrlRef(\n getLocalizedPath(item.buttonLink || '', locale),\n `${trackingData?.contextHandle || ''}_${componentType}_${componentName}`\n )}\n className=\"three-d-carousel__image-mobile-link \"\n >\n <Button size=\"base\" variant=\"secondary\" className=\"three-d-carousel__image-mobile-button mt-3\">\n {item.buttonText}\n </Button>\n </a>\n )}\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n </section>\n )\n})\n\nThreeDCarousel.displayName = 'ThreeDCarousel'\n\nexport default withLayout(ThreeDCarousel, { style: 'overflow: hidden;' })\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsBE,IAAAI,EAAA,6BArBFC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAqC,kCACrCC,EAA2B,kC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K,YAAc,GAAIR,CAAM,EAC9C,GAAGC,GAAc,eAAiB,EAAE,IAAIlB,CAAa,IAAIC,CAAa,EACxE,EACA,UAAU,uCAEV,mBAAC,UAAO,KAAK,OAAO,QAAQ,YAAY,UAAU,6CAC/C,SAAAwB,EAAK,WACR,EACF,GAEJ,IArCKC,CAsCP,CACD,EACH,EACF,GACF,CAEJ,CAAC,EAEDtB,EAAe,YAAc,iBAE7B,IAAOnB,KAAQ,cAAWmB,EAAgB,CAAE,MAAO,mBAAoB,CAAC",
6
+ "names": ["ThreeDCarousel_exports", "__export", "ThreeDCarousel_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_AiuiProvider", "import_trackUrlRef", "import_modules", "import_css", "import_navigation", "import_pagination", "import_effect_coverflow", "componentType", "componentName", "ChevronLeft", "ChevronRight", "ThreeDCarousel", "React", "data", "className", "ref", "title", "items", "cloneItems", "swiperRef", "boxRef", "containerRef", "stretchValue", "setStretchValue", "locale", "trackingData", "container", "updateStretch", "containerWidth", "newStretch", "resizeObserver", "swiper", "item", "index", "isActive"]
7
7
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { TitlePropsBase } from './types.js';
3
3
  export interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {
4
4
  }
5
- declare const _default: React.ForwardRefExoticComponent<Omit<TitleProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
5
+ declare const _default: React.ForwardRefExoticComponent<Omit<TitleProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../index.js").ContainerProps & React.RefAttributes<unknown>> & {
6
6
  readonly $$typeof: symbol;
7
7
  };
8
8
  export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var dt=Object.create;var w=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var mt=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty;var ft=(t,n)=>{for(var e in n)w(t,e,{get:n[e],enumerable:!0})},N=(t,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of ut(n))!pt.call(t,r)&&r!==e&&w(t,r,{get:()=>n[r],enumerable:!(s=ct(n,r))||s.enumerable});return t};var ht=(t,n,e)=>(e=t!=null?dt(mt(t)):{},N(n||!t||!t.__esModule?w(e,"default",{value:t,enumerable:!0}):e,t)),gt=t=>N(w({},"__esModule",{value:!0}),t);var yt={};ft(yt,{default:()=>vt});module.exports=gt(yt);var i=require("react/jsx-runtime"),a=ht(require("react")),b=require("gsap"),F=require("gsap/dist/SplitText"),H=require("gsap/dist/ScrollTrigger"),l=require("../../helpers/utils.js"),L=require("class-variance-authority"),d=require("../../components/index.js"),B=require("../../shared/Styles.js"),I=require("../../shared/trackUrlRef.js"),j=require("react-intersection-observer");const P="link",S="title";function xt(t){if(!t)return!1;if(typeof t=="string")return t.trim().length>0;const n=t?.root?.children;return!Array.isArray(n)||n.length===0?!1:n.some(e=>{const s=e?.children;return!Array.isArray(s)||s.length===0?!1:s.some(r=>typeof r?.text=="string"&&r.text.length>0)})}const wt=(0,L.cva)("",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),bt=(0,L.cva)("desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),$=({data:t,onClick:n,className:e})=>{const{theme:s="light",extensions:r,title:h,caption:v,align:g}=t;if(!r?.textLink)return null;const u=r?.link?(0,I.trackUrlRef)(r.link,`${P}_${S}`):void 0;return(0,i.jsxs)("a",{className:(0,l.cn)({"aiui-dark":s==="dark"},"hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]",{"text-[#080A0F]":s==="light"},{"text-[#F5F6F7]":s==="dark"},{"justify-center mt-4":g==="center"},{"mt-1 laptop:mt-0":g==="left"},e),...u?{href:u}:{},"data-headless-type-name":`${P}#${S}`,"data-headless-title-desc-button":`${h}#${v}`,...n?{onClick:n}:{},children:[(0,i.jsx)("div",{className:"truncate whitespace-nowrap",children:r?.textLink}),(0,i.jsx)("div",{className:"lg-desktop:size-5 size-4",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",children:(0,i.jsx)("path",{d:"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z",fill:s==="dark"?"#F5F6F7":"#080A0F",className:"transition-all duration-[0.4s]"})})})]})},_=a.default.forwardRef(({data:t,className:n,classNames:e,as:s="h2",weight:r="bold",onButtonClick:h,...v},g)=>{const{title:u,titleSize:O=4,caption:C,subtitle:D,content:M,countdown:o,showCountdown:U=!1,theme:x="light",extensions:W,align:m="left"}=t,E=(0,a.useRef)(null),p=(0,a.useRef)(null),c=(0,a.useRef)(null),f=(0,a.useRef)(null),[Z,q]=(0,a.useState)(!0),{ref:G,inView:z}=(0,j.useInView)();(0,a.useImperativeHandle)(g,()=>E.current);const J=()=>{q(!1)},K=o?.targetDateTime||o?.targetDate||"",Q=o?.targetDateTime_tz,X=o?.labels?{day:o.labels.days||"Day",hour:o.labels.hours||"Hours",minute:o.labels.minutes||"Mins",second:o.labels.seconds||"Secs"}:void 0;return(0,a.useEffect)(()=>{b.gsap.registerPlugin(F.SplitText,H.ScrollTrigger);function Y(){if(!p.current)return;const tt=p.current?.clientHeight||80;c.current&&c.current.revert(),f.current&&f.current.kill(),c.current=new F.SplitText(p.current,{type:"words",wordsClass:"word"});const y=c.current.words;b.gsap.set(y,{opacity:0}),f.current=H.ScrollTrigger.create({trigger:p.current,start:"bottom bottom-=4%",end:`bottom+=${tt*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:et=>{const nt=et.progress,R=y.length||1,rt=.5,k=1/R,V=k*(1-rt),A=(R-1)*V+k,it=Math.min(1,A>0?nt/A:0);y.forEach((st,ot)=>{const at=ot*V,lt=k;let T=(it-at)/lt;T=Math.max(0,Math.min(1,T)),b.gsap.set(st,{opacity:T})})}})}return z&&Y(),()=>{c.current&&c.current.revert(),f.current&&f.current.kill()}},[z]),(0,i.jsxs)("div",{...v,id:W?.id,className:(0,l.cn)("titleBottom title-box flex items-end justify-between gap-2 pb-6",n,e?.wrapper),ref:E,children:[(0,i.jsxs)("div",{ref:G,className:(0,l.cn)("flex-1",e?.container,{"aiui-dark":x==="dark","text-center":m==="center","text-left":m==="left"}),children:[(C||u)&&(0,i.jsx)(d.Heading,{ref:p,as:s,size:O,html:C||u,weight:r,className:(0,l.cn)(wt({theme:x}),e?.title)}),D&&(0,i.jsx)(d.Text,{html:D,as:"p",className:(0,l.cn)(bt({theme:x}),e?.subtitle)}),xt(M)&&(0,i.jsx)(d.Text,{html:M,as:"div",size:4,className:(0,l.cn)("title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]",e?.content)}),(0,i.jsx)($,{data:t,className:(0,l.cn)({"laptop:hidden":m==="left"},e?.button),onClick:h}),U&&o&&Z&&(0,i.jsx)(d.Countdown,{endDate:K,endDate_tz:Q,timeLabels:X,showDays:o?.showDays,showHours:o?.showHours,showMinutes:o?.showMinutes,showSeconds:o?.showSeconds,theme:x,onExpire:J,hideWhenExpired:!0,align:m==="center"?"center":"left",className:(0,l.cn)("mt-4",e?.countdown)})]}),(0,i.jsx)($,{data:t,className:(0,l.cn)("hidden",{"laptop:flex":m==="left"},e?.button),onClick:h})]})});_.displayName="Title";var vt=(0,B.withLayout)(_);
1
+ "use strict";"use client";var ut=Object.create;var b=Object.defineProperty;var mt=Object.getOwnPropertyDescriptor;var pt=Object.getOwnPropertyNames;var ft=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var gt=(t,n)=>{for(var e in n)b(t,e,{get:n[e],enumerable:!0})},$=(t,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of pt(n))!ht.call(t,r)&&r!==e&&b(t,r,{get:()=>n[r],enumerable:!(s=mt(n,r))||s.enumerable});return t};var xt=(t,n,e)=>(e=t!=null?ut(ft(t)):{},$(n||!t||!t.__esModule?b(e,"default",{value:t,enumerable:!0}):e,t)),wt=t=>$(b({},"__esModule",{value:!0}),t);var Tt={};gt(Tt,{default:()=>yt});module.exports=wt(Tt);var i=require("react/jsx-runtime"),l=xt(require("react")),v=require("gsap"),M=require("gsap/dist/SplitText"),z=require("gsap/dist/ScrollTrigger"),o=require("../../helpers/index.js"),R=require("class-variance-authority"),c=require("../../components/index.js"),I=require("../../shared/Styles.js"),j=require("../../hooks/useExposure.js"),O=require("../../shared/trackUrlRef.js"),U=require("../AiuiProvider/index.js"),W=require("react-intersection-observer");const D="link",E="title";function bt(t){if(!t)return!1;if(typeof t=="string")return t.trim().length>0;const n=t?.root?.children;return!Array.isArray(n)||n.length===0?!1:n.some(e=>{const s=e?.children;return!Array.isArray(s)||s.length===0?!1:s.some(r=>typeof r?.text=="string"&&r.text.length>0)})}const vt=(0,R.cva)("",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),kt=(0,R.cva)("desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),_=({data:t,onClick:n,className:e})=>{const{theme:s="light",extensions:r,title:g,caption:k,align:x}=t,{trackingData:m}=(0,U.useAiuiContext)(),y=m?.contextHandle||"";if(!r?.textLink)return null;const d=r?.link?(0,O.trackUrlRef)(r.link,`${y}_${D}_${E}`):void 0;return(0,i.jsxs)("a",{className:(0,o.cn)({"aiui-dark":s==="dark"},"hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]",{"text-[#080A0F]":s==="light"},{"text-[#F5F6F7]":s==="dark"},{"justify-center mt-4":x==="center"},{"mt-1 laptop:mt-0":x==="left"},e),...d?{href:d}:{},"data-headless-type-name":`${D}#${E}`,"data-headless-title-desc-button":`${g}#${k}`,...n?{onClick:n}:{},children:[(0,i.jsx)("div",{className:"truncate whitespace-nowrap",children:r?.textLink}),(0,i.jsx)("div",{className:"lg-desktop:size-5 size-4",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",children:(0,i.jsx)("path",{d:"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z",fill:s==="dark"?"#F5F6F7":"#080A0F",className:"transition-all duration-[0.4s]"})})})]})},B=l.default.forwardRef(({data:t,className:n,classNames:e,as:s="h2",weight:r="bold",onButtonClick:g,...k},x)=>{const{title:m,titleSize:y=4,caption:d,subtitle:T,content:A,countdown:a,showCountdown:Z=!1,theme:w="light",extensions:q,align:p="left"}=t,H=(0,l.useRef)(null),f=(0,l.useRef)(null),u=(0,l.useRef)(null),h=(0,l.useRef)(null),[G,J]=(0,l.useState)(!0),{ref:K,inView:V}=(0,W.useInView)();(0,l.useImperativeHandle)(x,()=>H.current),(0,j.useExposure)(H,{componentType:D,componentName:E,componentTitle:(0,o.extractLexicalText)(d)||(0,o.extractLexicalText)(m)||"",componentDescription:(0,o.extractLexicalText)(T)||""});const Q=()=>{J(!1)},X=a?.targetDateTime||a?.targetDate||"",Y=a?.targetDateTime_tz,tt=a?.labels?{day:a.labels.days||"Day",hour:a.labels.hours||"Hours",minute:a.labels.minutes||"Mins",second:a.labels.seconds||"Secs"}:void 0;return(0,l.useEffect)(()=>{v.gsap.registerPlugin(M.SplitText,z.ScrollTrigger);function et(){if(!f.current)return;const nt=f.current?.clientHeight||80;u.current&&u.current.revert(),h.current&&h.current.kill(),u.current=new M.SplitText(f.current,{type:"words",wordsClass:"word"});const F=u.current.words;v.gsap.set(F,{opacity:0}),h.current=z.ScrollTrigger.create({trigger:f.current,start:"bottom bottom-=4%",end:`bottom+=${nt*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:rt=>{const it=rt.progress,N=F.length||1,ot=.5,L=1/N,P=L*(1-ot),S=(N-1)*P+L,st=Math.min(1,S>0?it/S:0);F.forEach((at,lt)=>{const ct=lt*P,dt=L;let C=(st-ct)/dt;C=Math.max(0,Math.min(1,C)),v.gsap.set(at,{opacity:C})})}})}return V&&et(),()=>{u.current&&u.current.revert(),h.current&&h.current.kill()}},[V]),(0,i.jsxs)("div",{...k,id:q?.id,className:(0,o.cn)("titleBottom title-box flex items-end justify-between gap-2 pb-6",n,e?.wrapper),ref:H,children:[(0,i.jsxs)("div",{ref:K,className:(0,o.cn)("flex-1",e?.container,{"aiui-dark":w==="dark","text-center":p==="center","text-left":p==="left"}),children:[(d||m)&&(0,i.jsx)(c.Heading,{ref:f,as:s,size:y,html:d||m,weight:r,className:(0,o.cn)(vt({theme:w}),e?.title)}),T&&(0,i.jsx)(c.Text,{html:T,as:"p",className:(0,o.cn)(kt({theme:w}),e?.subtitle)}),bt(A)&&(0,i.jsx)(c.Text,{html:A,as:"div",size:4,className:(0,o.cn)("title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]",e?.content)}),(0,i.jsx)(_,{data:t,className:(0,o.cn)({"laptop:hidden":p==="left"},e?.button),onClick:g}),Z&&a&&G&&(0,i.jsx)(c.Countdown,{endDate:X,endDate_tz:Y,timeLabels:tt,showDays:a?.showDays,showHours:a?.showHours,showMinutes:a?.showMinutes,showSeconds:a?.showSeconds,theme:w,onExpire:Q,hideWhenExpired:!0,align:p==="center"?"center":"left",className:(0,o.cn)("mt-4",e?.countdown)})]}),(0,i.jsx)(_,{data:t,className:(0,o.cn)("hidden",{"laptop:flex":p==="left"},e?.button),onClick:g})]})});B.displayName="Title";var yt=(0,I.withLayout)(B);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { cva } from 'class-variance-authority'\nimport { Heading, Text, Countdown, type HeadingProps } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitlePropsBase } from './types.js'\n\nexport interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {}\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\n/**\n * \u5224\u65AD content \u5B57\u6BB5\u662F\u5426\u6709\u5B9E\u9645\u53EF\u89C1\u5185\u5BB9\u3002\n * - string\uFF1A\u53BB\u6389\u7A7A\u767D\u540E\u975E\u7A7A\u5373\u6709\u5185\u5BB9\n * - SerializedEditorState\uFF1A\u68C0\u67E5 root.children \u5185\u662F\u5426\u5B58\u5728\u975E\u7A7A\u6587\u672C\u8282\u70B9\uFF0C\n * \u907F\u514D convertLexicalToHTML \u628A\u7A7A\u6587\u6863\u8F93\u51FA\u4E3A &lt;div class=\"payload-richtext\"&gt;&lt;/div&gt;\n */\nfunction hasVisibleContent(content: string | { root?: { children?: unknown[] } } | null | undefined): boolean {\n if (!content) return false\n if (typeof content === 'string') return content.trim().length > 0\n const children = content?.root?.children\n if (!Array.isArray(children) || children.length === 0) return false\n return children.some((node: any) => {\n const nodeChildren = node?.children\n if (!Array.isArray(nodeChildren) || nodeChildren.length === 0) return false\n return nodeChildren.some((child: any) => typeof child?.text === 'string' && child.text.length > 0)\n })\n}\n\n/**\n * \u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst titleHeadingVariants = cva('', {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u526F\u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst subtitleVariants = cva(\n 'desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]',\n {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n }\n)\n\nconst TitleButton = ({\n data,\n onClick,\n className,\n}: {\n data: TitleProps['data']\n onClick?: () => void\n className?: string\n}) => {\n const { theme = 'light', extensions, title, caption, align } = data\n if (!extensions?.textLink) return null\n\n const href = extensions?.link ? trackUrlRef(extensions.link, `${componentType}_${componentName}`) : undefined\n\n return (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]',\n { 'text-[#080A0F]': theme === 'light' },\n { 'text-[#F5F6F7]': theme === 'dark' },\n { 'justify-center mt-4': align === 'center' },\n { 'mt-1 laptop:mt-0': align === 'left' },\n className\n )}\n {...(href ? { href } : {})}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n {...(onClick ? { onClick } : {})}\n >\n <div className=\"truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"lg-desktop:size-5 size-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z\"\n fill={theme === 'dark' ? '#F5F6F7' : '#080A0F'}\n className=\"transition-all duration-[0.4s]\"\n />\n </svg>\n </div>\n </a>\n )\n}\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(\n ({ data, className, classNames, as = 'h2', weight = 'bold', onButtonClick, ...rest }, ref) => {\n const {\n title,\n titleSize = 4,\n caption,\n subtitle,\n content,\n countdown,\n showCountdown = false,\n theme = 'light',\n extensions,\n align = 'left',\n } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n // \u63A7\u5236\u5012\u8BA1\u65F6\u663E\u793A\u72B6\u6001\n const [isCountdownVisible, setIsCountdownVisible] = useState(true)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u5012\u8BA1\u65F6\u7ED3\u675F\u56DE\u8C03\n const handleCountdownEnd = () => {\n setIsCountdownVisible(false)\n }\n\n // CMS field mapping: new targetDateTime > legacy targetDate\n const countdownEndDate = countdown?.targetDateTime || countdown?.targetDate || ''\n const countdownTz = countdown?.targetDateTime_tz\n // Label mapping: plural keys (Title CMS format) \u2192 atomic Countdown format\n const countdownLabels = countdown?.labels\n ? {\n day: countdown.labels.days || 'Day',\n hour: countdown.labels.hours || 'Hours',\n minute: countdown.labels.minutes || 'Mins',\n second: countdown.labels.seconds || 'Secs',\n }\n : undefined\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div\n {...rest}\n id={extensions?.id}\n className={cn(\n 'titleBottom title-box flex items-end justify-between gap-2 pb-6',\n className,\n classNames?.wrapper\n )}\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('flex-1', classNames?.container, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-left': align === 'left',\n })}\n >\n {(caption || title) && (\n <Heading\n ref={titleRef}\n as={as}\n size={titleSize as HeadingProps['size']}\n html={caption || title}\n weight={weight}\n className={cn(titleHeadingVariants({ theme }), classNames?.title)}\n />\n )}\n {subtitle && (\n <Text html={subtitle} as=\"p\" className={cn(subtitleVariants({ theme }), classNames?.subtitle)} />\n )}\n {hasVisibleContent(content) && (\n <Text\n html={content}\n as=\"div\"\n size={4}\n className={cn(\n 'title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]',\n classNames?.content\n )}\n />\n )}\n <TitleButton\n data={data}\n className={cn({ 'laptop:hidden': align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n {showCountdown && countdown && isCountdownVisible && (\n <Countdown\n endDate={countdownEndDate}\n endDate_tz={countdownTz}\n timeLabels={countdownLabels}\n showDays={countdown?.showDays}\n showHours={countdown?.showHours}\n showMinutes={countdown?.showMinutes}\n showSeconds={countdown?.showSeconds}\n theme={theme}\n onExpire={handleCountdownEnd}\n hideWhenExpired={true}\n align={align === 'center' ? 'center' : 'left'}\n className={cn('mt-4', classNames?.countdown)}\n />\n )}\n </div>\n <TitleButton\n data={data}\n className={cn('hidden', { ['laptop:flex']: align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n </div>\n )\n }\n)\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
- "mappings": "olBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAA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G,OAAQI,GAAY,SAAS,EAC7C,GAEJ,KACA,OAACZ,EAAA,CACC,KAAMC,EACN,aAAW,MAAG,SAAU,CAAG,cAAgBO,IAAU,MAAO,EAAGI,GAAY,MAAM,EACjF,QAASG,EACX,GACF,CAEJ,CACF,EAEAL,EAAM,YAAc,QAEpB,IAAOjC,MAAQ,cAAWiC,CAAK",
6
- "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_class_variance_authority", "import_components", "import_Styles", "import_trackUrlRef", "import_react_intersection_observer", "componentType", "componentName", "hasVisibleContent", "content", "children", "node", "nodeChildren", "child", "titleHeadingVariants", "subtitleVariants", "TitleButton", "data", "onClick", "className", "theme", "extensions", "title", "caption", "align", "href", "Title", "React", "classNames", "as", "weight", "onButtonClick", "rest", "ref", "titleSize", "subtitle", "countdown", "showCountdown", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "isCountdownVisible", "setIsCountdownVisible", "inViewRef", "inView", "handleCountdownEnd", "countdownEndDate", "countdownTz", "countdownLabels", "gsapResize", "height", "words", "self", "progress", "total", "overlap", "interval", "step", "lastEnd", "normalizedProgress", "word", "i", "start", "width", "opacity"]
4
+ "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn, extractLexicalText } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { Heading, Text, Countdown, type HeadingProps } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { TitlePropsBase } from './types.js'\n\nexport interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {}\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\n/**\n * \u5224\u65AD content \u5B57\u6BB5\u662F\u5426\u6709\u5B9E\u9645\u53EF\u89C1\u5185\u5BB9\u3002\n * - string\uFF1A\u53BB\u6389\u7A7A\u767D\u540E\u975E\u7A7A\u5373\u6709\u5185\u5BB9\n * - SerializedEditorState\uFF1A\u68C0\u67E5 root.children \u5185\u662F\u5426\u5B58\u5728\u975E\u7A7A\u6587\u672C\u8282\u70B9\uFF0C\n * \u907F\u514D convertLexicalToHTML \u628A\u7A7A\u6587\u6863\u8F93\u51FA\u4E3A &lt;div class=\"payload-richtext\"&gt;&lt;/div&gt;\n */\nfunction hasVisibleContent(content: string | { root?: { children?: unknown[] } } | null | undefined): boolean {\n if (!content) return false\n if (typeof content === 'string') return content.trim().length > 0\n const children = content?.root?.children\n if (!Array.isArray(children) || children.length === 0) return false\n return children.some((node: any) => {\n const nodeChildren = node?.children\n if (!Array.isArray(nodeChildren) || nodeChildren.length === 0) return false\n return nodeChildren.some((child: any) => typeof child?.text === 'string' && child.text.length > 0)\n })\n}\n\n/**\n * \u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst titleHeadingVariants = cva('', {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u526F\u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst subtitleVariants = cva(\n 'desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]',\n {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n }\n)\n\nconst TitleButton = ({\n data,\n onClick,\n className,\n}: {\n data: TitleProps['data']\n onClick?: () => void\n className?: string\n}) => {\n const { theme = 'light', extensions, title, caption, align } = data\n const { trackingData } = useAiuiContext()\n const contextHandle = trackingData?.contextHandle || ''\n if (!extensions?.textLink) return null\n\n const href = extensions?.link\n ? trackUrlRef(extensions.link, `${contextHandle}_${componentType}_${componentName}`)\n : undefined\n\n return (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]',\n { 'text-[#080A0F]': theme === 'light' },\n { 'text-[#F5F6F7]': theme === 'dark' },\n { 'justify-center mt-4': align === 'center' },\n { 'mt-1 laptop:mt-0': align === 'left' },\n className\n )}\n {...(href ? { href } : {})}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n {...(onClick ? { onClick } : {})}\n >\n <div className=\"truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"lg-desktop:size-5 size-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z\"\n fill={theme === 'dark' ? '#F5F6F7' : '#080A0F'}\n className=\"transition-all duration-[0.4s]\"\n />\n </svg>\n </div>\n </a>\n )\n}\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(\n ({ data, className, classNames, as = 'h2', weight = 'bold', onButtonClick, ...rest }, ref) => {\n const {\n title,\n titleSize = 4,\n caption,\n subtitle,\n content,\n countdown,\n showCountdown = false,\n theme = 'light',\n extensions,\n align = 'left',\n } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n // \u63A7\u5236\u5012\u8BA1\u65F6\u663E\u793A\u72B6\u6001\n const [isCountdownVisible, setIsCountdownVisible] = useState(true)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u66DD\u5149\u57CB\u70B9\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: extractLexicalText(caption) || extractLexicalText(title) || '',\n componentDescription: extractLexicalText(subtitle) || '',\n })\n\n // \u5012\u8BA1\u65F6\u7ED3\u675F\u56DE\u8C03\n const handleCountdownEnd = () => {\n setIsCountdownVisible(false)\n }\n\n // CMS field mapping: new targetDateTime > legacy targetDate\n const countdownEndDate = countdown?.targetDateTime || countdown?.targetDate || ''\n const countdownTz = countdown?.targetDateTime_tz\n // Label mapping: plural keys (Title CMS format) \u2192 atomic Countdown format\n const countdownLabels = countdown?.labels\n ? {\n day: countdown.labels.days || 'Day',\n hour: countdown.labels.hours || 'Hours',\n minute: countdown.labels.minutes || 'Mins',\n second: countdown.labels.seconds || 'Secs',\n }\n : undefined\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div\n {...rest}\n id={extensions?.id}\n className={cn(\n 'titleBottom title-box flex items-end justify-between gap-2 pb-6',\n className,\n classNames?.wrapper\n )}\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('flex-1', classNames?.container, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-left': align === 'left',\n })}\n >\n {(caption || title) && (\n <Heading\n ref={titleRef}\n as={as}\n size={titleSize as HeadingProps['size']}\n html={caption || title}\n weight={weight}\n className={cn(titleHeadingVariants({ theme }), classNames?.title)}\n />\n )}\n {subtitle && (\n <Text html={subtitle} as=\"p\" className={cn(subtitleVariants({ theme }), classNames?.subtitle)} />\n )}\n {hasVisibleContent(content) && (\n <Text\n html={content}\n as=\"div\"\n size={4}\n className={cn(\n 'title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]',\n classNames?.content\n )}\n />\n )}\n <TitleButton\n data={data}\n className={cn({ 'laptop:hidden': align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n {showCountdown && countdown && isCountdownVisible && (\n <Countdown\n endDate={countdownEndDate}\n endDate_tz={countdownTz}\n timeLabels={countdownLabels}\n showDays={countdown?.showDays}\n showHours={countdown?.showHours}\n showMinutes={countdown?.showMinutes}\n showSeconds={countdown?.showSeconds}\n theme={theme}\n onExpire={handleCountdownEnd}\n hideWhenExpired={true}\n align={align === 'center' ? 'center' : 'left'}\n className={cn('mt-4', classNames?.countdown)}\n />\n )}\n </div>\n <TitleButton\n data={data}\n className={cn('hidden', { ['laptop:flex']: align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n </div>\n )\n }\n)\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
+ "mappings": "olBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA0FI,IAAAI,EAAA,6BAzFJC,EAAwE,qBACxEC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAuC,kCACvCC,EAAoB,oCACpBC,EAA4D,qCAC5DC,EAA2B,kCAC3BC,EAA4B,sCAI5BC,EAA4B,uCAC5BC,EAA+B,oCAC/BC,EAA0B,uCAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAQtB,SAASC,GAAkBC,EAAmF,CAC5G,GAAI,CAACA,EAAS,MAAO,GACrB,GAAI,OAAOA,GAAY,SAAU,OAAOA,EAAQ,KAAK,EAAE,OAAS,EAChE,MAAMC,EAAWD,GAAS,MAAM,SAChC,MAAI,CAAC,MAAM,QAAQC,CAAQ,GAAKA,EAAS,SAAW,EAAU,GACvDA,EAAS,KAAMC,GAAc,CAClC,MAAMC,EAAeD,GAAM,SAC3B,MAAI,CAAC,MAAM,QAAQC,CAAY,GAAKA,EAAa,SAAW,EAAU,GAC/DA,EAAa,KAAMC,GAAe,OAAOA,GAAO,MAAS,UAAYA,EAAM,KAAK,OAAS,CAAC,CACnG,CAAC,CACH,CAKA,MAAMC,MAAuB,OAAI,GAAI,CACnC,SAAU,CACR,MAAO,CACL,MAAO,iBACP,KAAM,gBACR,CACF,EACA,gBAAiB,CACf,MAAO,OACT,CACF,CAAC,EAKKC,MAAmB,OACvB,oHACA,CACE,SAAU,CACR,MAAO,CACL,MAAO,iBACP,K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EAAGU,GAAY,KAAK,EAClE,EAEDO,MACC,OAAC,QAAK,KAAMA,EAAU,GAAG,IAAI,aAAW,MAAGtB,GAAiB,CAAE,MAAAK,CAAM,CAAC,EAAGU,GAAY,QAAQ,EAAG,EAEhGtB,GAAkBC,CAAO,MACxB,OAAC,QACC,KAAMA,EACN,GAAG,MACH,KAAM,EACN,aAAW,MACT,uHACAqB,GAAY,OACd,EACF,KAEF,OAACd,EAAA,CACC,KAAMC,EACN,aAAW,MAAG,CAAE,gBAAiBO,IAAU,MAAO,EAAGM,GAAY,MAAM,EACvE,QAASG,EACX,EACCM,GAAiBD,GAAaM,MAC7B,OAAC,aACC,QAASK,EACT,WAAYC,EACZ,WAAYC,GACZ,SAAUb,GAAW,SACrB,UAAWA,GAAW,UACtB,YAAaA,GAAW,YACxB,YAAaA,GAAW,YACxB,MAAOlB,EACP,SAAU4B,EACV,gBAAiB,GACjB,MAAOxB,IAAU,SAAW,SAAW,OACvC,aAAW,MAAG,OAAQM,GAAY,SAAS,EAC7C,GAEJ,KACA,OAACd,EAAA,CACC,KAAMC,EACN,aAAW,MAAG,SAAU,CAAG,cAAgBO,IAAU,MAAO,EAAGM,GAAY,MAAM,EACjF,QAASG,EACX,GACF,CAEJ,CACF,EAEAL,EAAM,YAAc,QAEpB,IAAOrC,MAAQ,cAAWqC,CAAK",
6
+ "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_helpers", "import_class_variance_authority", "import_components", "import_Styles", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "import_react_intersection_observer", "componentType", "componentName", "hasVisibleContent", "content", "children", "node", "nodeChildren", "child", "titleHeadingVariants", "subtitleVariants", "TitleButton", "data", "onClick", "className", "theme", "extensions", "title", "caption", "align", "trackingData", "contextHandle", "href", "Title", "React", "classNames", "as", "weight", "onButtonClick", "rest", "ref", "titleSize", "subtitle", "countdown", "showCountdown", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "isCountdownVisible", "setIsCountdownVisible", "inViewRef", "inView", "handleCountdownEnd", "countdownEndDate", "countdownTz", "countdownLabels", "gsapResize", "height", "words", "self", "progress", "total", "overlap", "interval", "step", "lastEnd", "normalizedProgress", "word", "i", "start", "width", "opacity"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { VideoFeatureProps } from './types.js';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<VideoFeatureProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<VideoFeatureProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../index.js").ContainerProps & React.RefAttributes<unknown>> & {
4
4
  readonly $$typeof: symbol;
5
5
  };
6
6
  export default _default;
@@ -3,6 +3,7 @@ export interface VideoModalType extends Omit<React.HTMLAttributes<HTMLDivElement
3
3
  youTubeId?: string;
4
4
  videoUrl?: string;
5
5
  onCloseModal: () => void;
6
+ videoClassName?: string;
6
7
  }
7
8
  declare const VideoModal: (props: VideoModalType) => import("react/jsx-runtime").JSX.Element;
8
9
  export { VideoModal };
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var b=(e,o)=>{for(var l in o)r(e,l,{get:o[l],enumerable:!0})},h=(e,o,l,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of p(o))!c.call(e,i)&&i!==l&&r(e,i,{get:()=>o[i],enumerable:!(n=u(o,i))||n.enumerable});return e};var g=e=>h(r({},"__esModule",{value:!0}),e);var m={};b(m,{VideoModal:()=>d});module.exports=g(m);var t=require("react/jsx-runtime"),a=require("../../components/dialog.js"),s=require("../VideoModal/YouTubePlayer.js");const d=e=>{const{visible:o,youTubeId:l,videoUrl:n,onCloseModal:i,className:v,...w}=e;return(0,t.jsx)(a.Dialog,{open:o,onOpenChange:()=>i(),children:(0,t.jsxs)(a.DialogContent,{className:"max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden",children:[l?(0,t.jsx)(s.YouTubePlayer,{youTubeId:l}):n?(0,t.jsx)("video",{className:"size-full overflow-hidden rounded-2xl object-contain",src:n,muted:!0,loop:!0,autoPlay:!0,controls:!0}):null,(0,t.jsx)("div",{onClick:()=>i(),className:"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon",className:"HomeCharger_closeWrap__Z7aBo",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})})]})})};
1
+ "use strict";var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var g=(e,o)=>{for(var a in o)r(e,a,{get:o[a],enumerable:!0})},h=(e,o,a,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of v(o))!b.call(e,i)&&i!==a&&r(e,i,{get:()=>o[i],enumerable:!(l=m(o,i))||l.enumerable});return e};var w=e=>h(r({},"__esModule",{value:!0}),e);var C={};g(C,{VideoModal:()=>p});module.exports=w(C);var t=require("react/jsx-runtime"),n=require("../../components/dialog.js"),d=require("../VideoModal/YouTubePlayer.js"),s=require("../../helpers/index.js");const p=e=>{const{visible:o,youTubeId:a,videoUrl:l,onCloseModal:i,className:u,videoClassName:c}=e;return(0,t.jsx)(n.Dialog,{open:o,onOpenChange:()=>i(),children:(0,t.jsxs)(n.DialogContent,{className:(0,s.cn)("max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden",u),children:[a?(0,t.jsx)(d.YouTubePlayer,{youTubeId:a}):l?(0,t.jsx)("video",{className:(0,s.cn)("size-full overflow-hidden rounded-2xl object-contain",c),src:l,muted:!0,loop:!0,autoPlay:!0,controls:!0}):null,(0,t.jsx)("div",{onClick:()=>i(),className:"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon",className:"HomeCharger_closeWrap__Z7aBo",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})})]})})};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/VideoModal/index.tsx"],
4
- "sourcesContent": ["import { Dialog, DialogContent } from '../../components/dialog.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\n\nexport interface VideoModalType extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n visible: boolean\n youTubeId?: string\n videoUrl?: string\n onCloseModal: () => void\n}\n\nconst VideoModal = (props: VideoModalType) => {\n const { visible, youTubeId, videoUrl, onCloseModal, className, ...rest } = props\n\n return (\n <Dialog open={visible} onOpenChange={() => onCloseModal()}>\n <DialogContent className=\"max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden\">\n {youTubeId ? (\n <YouTubePlayer youTubeId={youTubeId} />\n ) : videoUrl ? (\n <video\n className=\"size-full overflow-hidden rounded-2xl object-contain\"\n src={videoUrl}\n muted\n loop\n autoPlay\n controls\n />\n ) : null}\n <div\n onClick={() => onCloseModal()}\n className=\"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n className=\"HomeCharger_closeWrap__Z7aBo\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\"></path>\n </svg>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { VideoModal }\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAeM,IAAAI,EAAA,6BAfNC,EAAsC,sCACtCC,EAA8B,0CAS9B,MAAMJ,EAAcK,GAA0B,CAC5C,KAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,SAAAC,EAAU,aAAAC,EAAc,UAAAC,EAAW,GAAGC,CAAK,EAAIN,EAE3E,SACE,OAAC,UAAO,KAAMC,EAAS,aAAc,IAAMG,EAAa,EACtD,oBAAC,iBAAc,UAAU,wFACtB,UAAAF,KACC,OAAC,iBAAc,UAAWA,EAAW,EACnCC,KACF,OAAC,SACC,UAAU,uDACV,IAAKA,EACL,MAAK,GACL,KAAI,GACJ,SAAQ,GACR,SAAQ,GACV,EACE,QACJ,OAAC,OACC,QAAS,IAAMC,EAAa,EAC5B,UAAU,wHAEV,mBAAC,OACC,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,YAAY,MACZ,OAAO,eACP,cAAY,OACZ,YAAU,OACV,UAAU,+BAEV,mBAAC,QAAK,cAAc,QAAQ,eAAe,QAAQ,EAAE,uBAAuB,EAC9E,EACF,GACF,EACF,CAEJ",
6
- "names": ["VideoModal_exports", "__export", "VideoModal", "__toCommonJS", "import_jsx_runtime", "import_dialog", "import_YouTubePlayer", "props", "visible", "youTubeId", "videoUrl", "onCloseModal", "className", "rest"]
4
+ "sourcesContent": ["import { Dialog, DialogContent } from '../../components/dialog.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\nimport { cn } from '../../helpers/index.js'\n\nexport interface VideoModalType extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n visible: boolean\n youTubeId?: string\n videoUrl?: string\n onCloseModal: () => void\n videoClassName?: string\n}\n\nconst VideoModal = (props: VideoModalType) => {\n const { visible, youTubeId, videoUrl, onCloseModal, className, videoClassName } = props\n\n return (\n <Dialog open={visible} onOpenChange={() => onCloseModal()}>\n <DialogContent\n className={cn(\n 'max-h-3/4 h-3/4 w-4/5 max-w-[1200px] border-none bg-transparent p-0 [&_button]:hidden',\n className\n )}\n >\n {youTubeId ? (\n <YouTubePlayer youTubeId={youTubeId} />\n ) : videoUrl ? (\n <video\n className={cn('size-full overflow-hidden rounded-2xl object-contain', videoClassName)}\n src={videoUrl}\n muted\n loop\n autoPlay\n controls\n />\n ) : null}\n <div\n onClick={() => onCloseModal()}\n className=\"tablet:size-8 tablet:-right-8 tablet:-top-8 absolute -right-6 -top-6 size-6 cursor-pointer overflow-hidden text-white\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n className=\"HomeCharger_closeWrap__Z7aBo\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\"></path>\n </svg>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { VideoModal }\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAiBM,IAAAI,EAAA,6BAjBNC,EAAsC,sCACtCC,EAA8B,0CAC9BC,EAAmB,kCAUnB,MAAML,EAAcM,GAA0B,CAC5C,KAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,SAAAC,EAAU,aAAAC,EAAc,UAAAC,EAAW,eAAAC,CAAe,EAAIN,EAElF,SACE,OAAC,UAAO,KAAMC,EAAS,aAAc,IAAMG,EAAa,EACtD,oBAAC,iBACC,aAAW,MACT,wFACAC,CACF,EAEC,UAAAH,KACC,OAAC,iBAAc,UAAWA,EAAW,EACnCC,KACF,OAAC,SACC,aAAW,MAAG,uDAAwDG,CAAc,EACpF,IAAKH,EACL,MAAK,GACL,KAAI,GACJ,SAAQ,GACR,SAAQ,GACV,EACE,QACJ,OAAC,OACC,QAAS,IAAMC,EAAa,EAC5B,UAAU,wHAEV,mBAAC,OACC,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,YAAY,MACZ,OAAO,eACP,cAAY,OACZ,YAAU,OACV,UAAU,+BAEV,mBAAC,QAAK,cAAc,QAAQ,eAAe,QAAQ,EAAE,uBAAuB,EAC9E,EACF,GACF,EACF,CAEJ",
6
+ "names": ["VideoModal_exports", "__export", "VideoModal", "__toCommonJS", "import_jsx_runtime", "import_dialog", "import_YouTubePlayer", "import_helpers", "props", "visible", "youTubeId", "videoUrl", "onCloseModal", "className", "videoClassName"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var D=Object.defineProperty;var dt=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var mt=Object.prototype.hasOwnProperty;var ft=(n,o)=>{for(var p in o)D(n,p,{get:o[p],enumerable:!0})},ut=(n,o,p,w)=>{if(o&&typeof o=="object"||typeof o=="function")for(let f of ct(o))!mt.call(n,f)&&f!==p&&D(n,f,{get:()=>o[f],enumerable:!(w=dt(o,f))||w.enumerable});return n};var xt=n=>ut(D({},"__esModule",{value:!0}),n);var wt={};ft(wt,{BaseModal:()=>ce.BaseModal,ErrorModal:()=>pe.ErrorModal,MyRewardsModal:()=>le.MyRewardsModal,RulesModal:()=>ae.RulesModal,ShareModal:()=>de.ShareModal,WheelLottery:()=>B,WinnerModal:()=>ie.WinnerModal,default:()=>ht});module.exports=xt(wt);var t=require("react/jsx-runtime"),e=require("react"),u=require("../../helpers/index.js"),x=require("./types.js"),N=require("../../components/grid.js"),Z=require("./Wheel.js"),q=require("../LotteryShared/PrizePool.js"),ee=require("../LotteryShared/ChanceMethods.js"),te=require("../LotteryShared/WinnerModal.js"),oe=require("../LotteryShared/RulesModal.js"),re=require("../LotteryShared/MyRewardsModal.js"),F=require("../LotteryShared/ErrorModal.js"),ne=require("../LotteryShared/ShareModal.js"),se=require("../../shared/Styles.js"),ie=require("../LotteryShared/WinnerModal.js"),ae=require("../LotteryShared/RulesModal.js"),le=require("../LotteryShared/MyRewardsModal.js"),pe=require("../LotteryShared/ErrorModal.js"),de=require("../LotteryShared/ShareModal.js"),ce=require("../LotteryShared/BaseModal.js");const B=(0,e.forwardRef)(({prizes:n,theme:o,winningPrizeId:p,spinDuration:w=x.DEFAULT_WHEEL_CONFIG.spinDuration,wheelBackgroundImage:f,pointerImage:me,chanceMethods:U=x.DEFAULT_CHANCE_METHODS,chanceTitle:fe=x.DEFAULT_WHEEL_CONFIG.chanceTitle,chanceSubtitle:ue,chanceFooterNote:xe,chanceMethodsText:v,mechanismType:he,inputConfig:we,winningInfos:ge=[],winnerNameTemplate:ye,prizesTitle:Te,onSpinStart:I,onSpinEnd:L,onSpinError:O,winnerModalConfig:s,rulesModalConfig:be={},myRewardsModalConfig:Se={},errorModalConfig:h={},shareModalConfig:g={},userData:d,onLoginRequired:C,onCopyCode:We,opportunitiesText:j=["Number of draws remaining today:"],className:Me},Pe)=>{const{rulesData:y,rulesText:G="Rules"}=be,{rewardsData:A,myRewardsText:H="My Rewards",codeText:ze="CODE:",copyText:_="COPY",copiedText:K="COPIED",prizeText:Ee="Prize time:",emptyText:Ne,copyError:ve,availableText:Ce,usedStatusText:Re,expiredText:Ie,notFoundText:Le}=Se,Ae=v?.completedText,ke=v?.usedText,T=d?.isLoggedIn??!1,$=d?.availableChances??0,De=T&&$<=0,[i,c]=(0,e.useState)(x.INITIAL_WHEEL_STATE),[Fe,b]=(0,e.useState)(!1),[Be,S]=(0,e.useState)(!1),[Ue,W]=(0,e.useState)(!1),[Oe,M]=(0,e.useState)(!1),[je,P]=(0,e.useState)(!1),[Ge,z]=(0,e.useState)(!1),[He,V]=(0,e.useState)(""),[_e,Ke]=(0,e.useState)(),[$e,Ve]=(0,e.useState)(),[Ye,Je]=(0,e.useState)(),[Qe,Xe]=(0,e.useState)(),[Ze,qe]=(0,e.useState)(),[a,et]=(0,e.useState)(),R=(0,e.useRef)(null);(0,e.useImperativeHandle)(Pe,()=>({showError:({message:r,title:l,confirmText:E})=>{V(r),Ke(l),Ve(E),M(!0)},hideError:()=>{M(!1)},showNoWin:r=>{Je(r?.title),Xe(r?.message),qe(r?.confirmText),P(!0)},hideNoWin:()=>{P(!1)},showWinner:(r,l)=>{c(E=>({...E,winningPrize:r})),et(l),b(!0)},hideWinner:()=>{b(!1)},showRules:()=>{S(!0)},hideRules:()=>{S(!1)},showRewards:()=>{W(!0)},hideRewards:()=>{W(!1)},showShare:()=>{z(!0)},hideShare:()=>{z(!1)},hideAllModals:()=>{b(!1),S(!1),W(!1),M(!1),P(!1),z(!1)}}),[]),(0,e.useEffect)(()=>{},[n,p]),(0,e.useEffect)(()=>()=>{R.current!==null&&cancelAnimationFrame(R.current)},[]);const Y=(0,e.useCallback)(async()=>{if(!i.isSpinning){if(!d?.isLoggedIn){C?.();return}if(!(d.availableChances<=0)){c(r=>({...r,isSpinning:!0,isButtonDisabled:!0}));try{let r=p;I&&(r=await I());const l=n.find(m=>m.prizeKey===r)||n[0],E=n.findIndex(m=>m.prizeKey===l.prizeKey),nt=360/n.length,st=E*nt,J=3*360+(360-st);await new Promise(m=>setTimeout(m,1500)),c(m=>({...m,isFinished:!0,currentRotation:0}));const it=Date.now(),Q=()=>{const at=Date.now()-it,X=Math.min(at/w,1),lt=1-Math.pow(1-X,3),pt=J*lt;c(k=>({...k,currentRotation:pt})),X<1?R.current=requestAnimationFrame(Q):(c(k=>({...k,isSpinning:!1,isButtonDisabled:!0,winningPrize:l,currentRotation:J})),L?L?.(l):setTimeout(()=>{l.prizeKey==="try-again"?P(!0):b(!0)},500))};R.current=requestAnimationFrame(Q)}catch(r){c(l=>({...l,isSpinning:!1,isButtonDisabled:!1})),V(r.message||"An error occurred"),M(!0),O?.(r),console.error("\u62BD\u5956\u63A5\u53E3\u8C03\u7528\u5931\u8D25:",r)}}}},[i.isSpinning,n,p,w,I,L,O,d,C]),tt=(0,e.useCallback)(()=>{if(T){Y();return}C?.()},[Y,T,C]),ot=(0,e.useCallback)(()=>{b(!1),c(r=>({...r,isButtonDisabled:!1,isFinished:!1}))},[]),rt=(0,e.useCallback)(()=>{P(!1),c(r=>({...r,isButtonDisabled:!1,isFinished:!1}))},[]);return(0,t.jsxs)("div",{className:(0,u.cn)("wheel-lottery-container","w-full",o==="dark"?"aiui-dark":"",Me),children:[(0,t.jsxs)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:[i.isSpinning&&"\u62BD\u5956\u8FDB\u884C\u4E2D...",i.winningPrize&&!i.isSpinning&&`\u5DF2\u4E2D\u5956: ${i.winningPrize.name}`]}),(0,t.jsxs)(N.Grid,{className:(0,u.cn)("wheel-lottery-main","tablet:mb-4 mb-3"),children:[(0,t.jsx)(N.GridItem,{span:7,className:(0,u.cn)("wheel-section","relative flex w-full flex-1 items-center justify-center overflow-hidden","rounded-box","laptop:min-h-[288px] min-h-[240px]","lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[480]","desktop:aspect-w-[759] desktop:aspect-h-[384]","laptop:aspect-w-[516] laptop:aspect-h-[288]","l-tablet:col-span-12","l-tablet:mb-3",o==="dark"?"bg-[#1E2024]":"bg-[#EAEAEC]"),children:(0,t.jsxs)("div",{className:(0,u.cn)("w-full px-[16px] pt-[16px]","lg-desktop:pb-[32px] lg-desktop:px-[32px]","desktop:pt-[24px] desktop:px-[24px]","laptop:pt-[16px] laptop:px-[16px]","tablet:px-[24px]","l-tablet:absolute l-tablet:top-0 l-tablet:inset-x-0 l-tablet:z-10"),children:[(0,t.jsxs)("div",{className:"tablet:max-h-[24px] relative z-10 mb-2 flex max-h-[40px] w-full flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("div",{children:T&&(0,t.jsxs)("p",{className:"text-info-primary font-[700]",children:[j?.[0],(0,t.jsx)("span",{className:"ml-1 text-[#FF6B35]",children:$}),j?.[1]||""]})}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[y&&y.length>0&&(0,t.jsx)("button",{onClick:()=>S(!0),className:"cursor-pointer touch-manipulation",type:"button",children:(0,t.jsx)("span",{className:"text-info-primary font-[700] underline",children:G})}),d?.isLoggedIn&&A&&(0,t.jsx)("button",{onClick:()=>W(!0),className:"cursor-pointer touch-manipulation whitespace-nowrap",type:"button",children:(0,t.jsx)("span",{className:"text-info-primary font-[700] underline",children:H})})]})]}),(0,t.jsx)(Z.Wheel,{theme:o,prizes:n,rotation:i.currentRotation,isSpinning:i.isSpinning,isFinished:i.isFinished,isButtonDisabled:i.isButtonDisabled||!T||De,userData:d,onGoClick:tt,wheelBackgroundImage:f,pointerImage:me})]})}),U.length>0&&(0,t.jsx)(N.GridItem,{span:5,className:(0,u.cn)("info-section","rounded-box","relative flex flex-col overflow-hidden","lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[480]","desktop:aspect-w-[536] desktop:aspect-h-[384]","laptop:aspect-w-[364] laptop:aspect-h-[288]","l-tablet:min-h-[280px] laptop:max-h-[320px]","w-full","l-tablet:col-span-12",o==="dark"?"bg-[#1E2024]":"bg-[#EAEAEC]"),children:(0,t.jsx)(ee.ChanceMethods,{theme:o,userData:d,methods:U,title:fe,subtitle:ue,footerNote:xe,onOpenShareModal:()=>z(!0),chanceBadgeText:v?.chanceBadgeText,completedText:Ae,usedText:ke,loadingText:v?.loadingText,mechanismType:he,inputConfig:we})})]}),(0,t.jsx)("div",{className:(0,u.cn)("wheel-lottery-footer","rounded-box","flex flex-col overflow-hidden",o==="dark"?"bg-[#1E2024]":"bg-[#EAEAEC]"),children:(0,t.jsx)(q.PrizePool,{theme:o,prizes:n,title:Te,winningInfos:ge,winnerNameTemplate:ye})}),(0,t.jsx)(te.WinnerModal,{isOpen:Fe,prize:i.winningPrize,title:a?.title||s?.title,prizeTitle:a?.prizeTitle||s?.prizeTitle,prizeImage:a?.prizeImage||s?.prizeImage,prizeDescription:a?.prizeDescription||s?.prizeDescription,winnerNote:a?.winnerNote??i.winningPrize?.winnerModalConfig?.winnerNote??s?.winnerNote,learnMoreUrl:a?.learnMoreUrl||i.winningPrize?.winnerModalConfig?.learnMoreUrl||s?.learnMoreUrl,learnMoreText:a?.learnMoreText||i.winningPrize?.winnerModalConfig?.learnMoreText||s?.learnMoreText,couponCode:a?.couponCode||s?.couponCode,expiresAt:a?.expiresAt||s?.expiresAt,expiresAtLabel:a?.expiresAtLabel||s?.expiresAtLabel,couponDiscount:a?.couponDiscount||s?.couponDiscount,couponUnit:a?.couponUnit||s?.couponUnit,confirmText:a?.confirmText||i.winningPrize?.winnerModalConfig?.confirmText||s?.confirmText,confirmUrl:a?.confirmUrl||i.winningPrize?.winnerModalConfig?.confirmUrl||s?.confirmUrl,copyText:a?.copyText||s?.copyText||_,copiedText:a?.copiedText||s?.copiedText||K,onClose:ot,theme:o}),y&&y.length>0&&(0,t.jsx)(oe.RulesModal,{title:G,isOpen:Be,onClose:()=>S(!1),rules:y,theme:o}),A&&(0,t.jsx)(re.MyRewardsModal,{isOpen:Ue,onClose:()=>W(!1),rewards:A,onCopyCode:We,codeText:ze,copyText:_,copiedText:K,prizeText:Ee,emptyText:Ne,copyError:ve,availableText:Ce,usedStatusText:Re,expiredText:Ie,notFoundText:Le,theme:o,title:H}),(0,t.jsx)(F.ErrorModal,{isOpen:Oe,onClose:()=>M(!1),title:_e||h?.title,message:He||h?.message,confirmText:$e||h?.confirmText,theme:o}),(0,t.jsx)(F.ErrorModal,{isOpen:je,onClose:rt,title:Ye||h?.title,message:Qe||h?.message,confirmText:Ze||h?.confirmText,theme:o}),(0,t.jsx)(ne.ShareModal,{isOpen:Ge,onClose:()=>z(!1),title:g?.title,subtitle:g?.subtitle,note:g?.note,platforms:g?.platforms,onShareSuccess:g?.onShareSuccess,theme:o})]})});B.displayName="WheelLottery";var ht=(0,se.withLayout)(B);
1
+ "use strict";"use client";var D=Object.defineProperty;var dt=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var mt=Object.prototype.hasOwnProperty;var ft=(n,r)=>{for(var p in r)D(n,p,{get:r[p],enumerable:!0})},ut=(n,r,p,w)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of ct(r))!mt.call(n,f)&&f!==p&&D(n,f,{get:()=>r[f],enumerable:!(w=dt(r,f))||w.enumerable});return n};var xt=n=>ut(D({},"__esModule",{value:!0}),n);var wt={};ft(wt,{BaseModal:()=>ce.BaseModal,ErrorModal:()=>pe.ErrorModal,MyRewardsModal:()=>le.MyRewardsModal,RulesModal:()=>ae.RulesModal,ShareModal:()=>de.ShareModal,WheelLottery:()=>B,WinnerModal:()=>ie.WinnerModal,default:()=>ht});module.exports=xt(wt);var t=require("react/jsx-runtime"),e=require("react"),u=require("../../helpers/index.js"),x=require("./types.js"),N=require("../../components/grid.js"),Z=require("./Wheel.js"),q=require("../LotteryShared/PrizePool.js"),ee=require("../LotteryShared/ChanceMethods.js"),te=require("../LotteryShared/WinnerModal.js"),oe=require("../LotteryShared/RulesModal.js"),re=require("../LotteryShared/MyRewardsModal.js"),F=require("../LotteryShared/ErrorModal.js"),ne=require("../LotteryShared/ShareModal.js"),se=require("../../shared/Styles.js"),ie=require("../LotteryShared/WinnerModal.js"),ae=require("../LotteryShared/RulesModal.js"),le=require("../LotteryShared/MyRewardsModal.js"),pe=require("../LotteryShared/ErrorModal.js"),de=require("../LotteryShared/ShareModal.js"),ce=require("../LotteryShared/BaseModal.js");const B=(0,e.forwardRef)(({prizes:n,theme:r,winningPrizeId:p,spinDuration:w=x.DEFAULT_WHEEL_CONFIG.spinDuration,wheelBackgroundImage:f,pointerImage:me,chanceMethods:U=x.DEFAULT_CHANCE_METHODS,chanceTitle:fe=x.DEFAULT_WHEEL_CONFIG.chanceTitle,chanceSubtitle:ue,chanceFooterNote:xe,chanceMethodsText:v,mechanismType:he,inputConfig:we,winningInfos:ge=[],winnerNameTemplate:ye,prizesTitle:Te,onSpinStart:I,onSpinEnd:L,onSpinError:O,winnerModalConfig:s,rulesModalConfig:be={},myRewardsModalConfig:Se={},errorModalConfig:h={},shareModalConfig:g={},userData:d,onLoginRequired:C,onCopyCode:We,opportunitiesText:j=["Number of draws remaining today:"],className:Me},Pe)=>{const{rulesData:y,rulesText:G="Rules"}=be,{rewardsData:A,myRewardsText:H="My Rewards",codeText:ze="CODE:",copyText:_="COPY",copiedText:K="COPIED",prizeText:Ee="Prize time:",emptyText:Ne,copyError:ve,availableText:Ce,usedStatusText:Re,expiredText:Ie,notFoundText:Le}=Se,Ae=v?.completedText,ke=v?.usedText,T=d?.isLoggedIn??!1,$=d?.availableChances??0,De=T&&$<=0,[i,c]=(0,e.useState)(x.INITIAL_WHEEL_STATE),[Fe,b]=(0,e.useState)(!1),[Be,S]=(0,e.useState)(!1),[Ue,W]=(0,e.useState)(!1),[Oe,M]=(0,e.useState)(!1),[je,P]=(0,e.useState)(!1),[Ge,z]=(0,e.useState)(!1),[He,V]=(0,e.useState)(""),[_e,Ke]=(0,e.useState)(),[$e,Ve]=(0,e.useState)(),[Ye,Je]=(0,e.useState)(),[Qe,Xe]=(0,e.useState)(),[Ze,qe]=(0,e.useState)(),[a,et]=(0,e.useState)(),R=(0,e.useRef)(null);(0,e.useImperativeHandle)(Pe,()=>({showError:({message:o,title:l,confirmText:E})=>{V(o),Ke(l),Ve(E),M(!0)},hideError:()=>{M(!1)},showNoWin:o=>{Je(o?.title),Xe(o?.message),qe(o?.confirmText),P(!0)},hideNoWin:()=>{P(!1)},showWinner:(o,l)=>{c(E=>({...E,winningPrize:o})),et(l),b(!0)},hideWinner:()=>{b(!1)},showRules:()=>{S(!0)},hideRules:()=>{S(!1)},showRewards:()=>{W(!0)},hideRewards:()=>{W(!1)},showShare:()=>{z(!0)},hideShare:()=>{z(!1)},hideAllModals:()=>{b(!1),S(!1),W(!1),M(!1),P(!1),z(!1)}}),[]),(0,e.useEffect)(()=>{},[n,p]),(0,e.useEffect)(()=>()=>{R.current!==null&&cancelAnimationFrame(R.current)},[]);const Y=(0,e.useCallback)(async()=>{if(!i.isSpinning){if(!d?.isLoggedIn){C?.();return}if(!(d.availableChances<=0)){c(o=>({...o,isSpinning:!0,isButtonDisabled:!0}));try{let o=p;I&&(o=await I());const l=n.find(m=>m.prizeKey===o)||n[0],E=n.findIndex(m=>m.prizeKey===l.prizeKey),nt=360/n.length,st=E*nt,J=3*360+(360-st);await new Promise(m=>setTimeout(m,1500)),c(m=>({...m,isFinished:!0,currentRotation:0}));const it=Date.now(),Q=()=>{const at=Date.now()-it,X=Math.min(at/w,1),lt=1-Math.pow(1-X,3),pt=J*lt;c(k=>({...k,currentRotation:pt})),X<1?R.current=requestAnimationFrame(Q):(c(k=>({...k,isSpinning:!1,isButtonDisabled:!0,winningPrize:l,currentRotation:J})),L?L?.(l):setTimeout(()=>{l.prizeKey==="try-again"?P(!0):b(!0)},500))};R.current=requestAnimationFrame(Q)}catch(o){c(l=>({...l,isSpinning:!1,isButtonDisabled:!1})),V(o.message||"An error occurred"),M(!0),O?.(o),console.error("\u62BD\u5956\u63A5\u53E3\u8C03\u7528\u5931\u8D25:",o)}}}},[i.isSpinning,n,p,w,I,L,O,d,C]),tt=(0,e.useCallback)(()=>{if(T){Y();return}C?.()},[Y,T,C]),ot=(0,e.useCallback)(()=>{b(!1),c(o=>({...o,isButtonDisabled:!1,isFinished:!1}))},[]),rt=(0,e.useCallback)(()=>{P(!1),c(o=>({...o,isButtonDisabled:!1,isFinished:!1}))},[]);return(0,t.jsxs)("div",{className:(0,u.cn)("wheel-lottery-container","w-full",r==="dark"?"aiui-dark":"",Me),children:[(0,t.jsxs)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:[i.isSpinning&&"\u62BD\u5956\u8FDB\u884C\u4E2D...",i.winningPrize&&!i.isSpinning&&`\u5DF2\u4E2D\u5956: ${i.winningPrize.name}`]}),(0,t.jsxs)(N.Grid,{className:(0,u.cn)("wheel-lottery-main","tablet:mb-4 mb-3"),children:[(0,t.jsx)(N.GridItem,{span:7,className:(0,u.cn)("wheel-section","relative flex w-full flex-1 items-center justify-center overflow-hidden","rounded-box","laptop:min-h-[288px] min-h-[240px]","lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[480]","desktop:aspect-w-[759] desktop:aspect-h-[384]","laptop:aspect-w-[516] laptop:aspect-h-[288]","l-tablet:col-span-12","l-tablet:mb-3",r==="dark"?"bg-[#1E2024]":"bg-[#EAEAEC]"),children:(0,t.jsxs)("div",{className:(0,u.cn)("w-full px-[16px] pt-[16px]","lg-desktop:pb-[32px] lg-desktop:px-[32px]","desktop:pt-[24px] desktop:px-[24px]","laptop:pt-[16px] laptop:px-[16px]","tablet:px-[24px]","l-tablet:absolute l-tablet:top-0 l-tablet:inset-x-0 l-tablet:z-10"),children:[(0,t.jsxs)("div",{className:"tablet:max-h-[24px] relative z-10 mb-2 flex max-h-[40px] w-full flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("div",{children:T&&(0,t.jsxs)("p",{className:"text-info-primary font-[700]",children:[j?.[0],(0,t.jsx)("span",{className:"ml-1 text-[#FF6B35]",children:$}),j?.[1]||""]})}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[y&&y.length>0&&(0,t.jsx)("button",{onClick:o=>{o.stopPropagation(),S(!0)},className:"cursor-pointer touch-manipulation",type:"button",children:(0,t.jsx)("span",{className:"text-info-primary font-[700] underline",children:G})}),d?.isLoggedIn&&A&&(0,t.jsx)("button",{onClick:o=>{o.stopPropagation(),W(!0)},className:"cursor-pointer touch-manipulation whitespace-nowrap",type:"button",children:(0,t.jsx)("span",{className:"text-info-primary font-[700] underline",children:H})})]})]}),(0,t.jsx)(Z.Wheel,{theme:r,prizes:n,rotation:i.currentRotation,isSpinning:i.isSpinning,isFinished:i.isFinished,isButtonDisabled:i.isButtonDisabled||!T||De,userData:d,onGoClick:tt,wheelBackgroundImage:f,pointerImage:me})]})}),U.length>0&&(0,t.jsx)(N.GridItem,{span:5,className:(0,u.cn)("info-section","rounded-box","relative flex flex-col overflow-hidden","lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[480]","desktop:aspect-w-[536] desktop:aspect-h-[384]","laptop:aspect-w-[364] laptop:aspect-h-[288]","l-tablet:min-h-[280px] laptop:max-h-[320px]","w-full","l-tablet:col-span-12",r==="dark"?"bg-[#1E2024]":"bg-[#EAEAEC]"),children:(0,t.jsx)(ee.ChanceMethods,{theme:r,userData:d,methods:U,title:fe,subtitle:ue,footerNote:xe,onOpenShareModal:()=>z(!0),chanceBadgeText:v?.chanceBadgeText,completedText:Ae,usedText:ke,loadingText:v?.loadingText,mechanismType:he,inputConfig:we})})]}),(0,t.jsx)("div",{className:(0,u.cn)("wheel-lottery-footer","rounded-box","flex flex-col overflow-hidden",r==="dark"?"bg-[#1E2024]":"bg-[#EAEAEC]"),children:(0,t.jsx)(q.PrizePool,{theme:r,prizes:n,title:Te,winningInfos:ge,winnerNameTemplate:ye})}),(0,t.jsx)(te.WinnerModal,{isOpen:Fe,prize:i.winningPrize,title:a?.title||s?.title,prizeTitle:a?.prizeTitle||s?.prizeTitle,prizeImage:a?.prizeImage||s?.prizeImage,prizeDescription:a?.prizeDescription||s?.prizeDescription,winnerNote:a?.winnerNote??i.winningPrize?.winnerModalConfig?.winnerNote??s?.winnerNote,learnMoreUrl:a?.learnMoreUrl||i.winningPrize?.winnerModalConfig?.learnMoreUrl||s?.learnMoreUrl,learnMoreText:a?.learnMoreText||i.winningPrize?.winnerModalConfig?.learnMoreText||s?.learnMoreText,couponCode:a?.couponCode||s?.couponCode,expiresAt:a?.expiresAt||s?.expiresAt,expiresAtLabel:a?.expiresAtLabel||s?.expiresAtLabel,couponDiscount:a?.couponDiscount||s?.couponDiscount,couponUnit:a?.couponUnit||s?.couponUnit,confirmText:a?.confirmText||i.winningPrize?.winnerModalConfig?.confirmText||s?.confirmText,confirmUrl:a?.confirmUrl||i.winningPrize?.winnerModalConfig?.confirmUrl||s?.confirmUrl,copyText:a?.copyText||s?.copyText||_,copiedText:a?.copiedText||s?.copiedText||K,onClose:ot,theme:r}),y&&y.length>0&&(0,t.jsx)(oe.RulesModal,{title:G,isOpen:Be,onClose:()=>S(!1),rules:y,theme:r}),A&&(0,t.jsx)(re.MyRewardsModal,{isOpen:Ue,onClose:()=>W(!1),rewards:A,onCopyCode:We,codeText:ze,copyText:_,copiedText:K,prizeText:Ee,emptyText:Ne,copyError:ve,availableText:Ce,usedStatusText:Re,expiredText:Ie,notFoundText:Le,theme:r,title:H}),(0,t.jsx)(F.ErrorModal,{isOpen:Oe,onClose:()=>M(!1),title:_e||h?.title,message:He||h?.message,confirmText:$e||h?.confirmText,theme:r}),(0,t.jsx)(F.ErrorModal,{isOpen:je,onClose:rt,title:Ye||h?.title,message:Qe||h?.message,confirmText:Ze||h?.confirmText,theme:r}),(0,t.jsx)(ne.ShareModal,{isOpen:Ge,onClose:()=>z(!1),title:g?.title,subtitle:g?.subtitle,note:g?.note,platforms:g?.platforms,onShareSuccess:g?.onShareSuccess,theme:r})]})});B.displayName="WheelLottery";var ht=(0,se.withLayout)(B);
2
2
  //# sourceMappingURL=index.js.map