@anker-in/headless-ui 1.3.0 → 1.3.2

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 (37) hide show
  1. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +1 -1
  2. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  3. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  4. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.d.ts +1 -0
  5. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  6. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  7. package/dist/cjs/biz-components/HeroBanner/types.d.ts +15 -0
  8. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  9. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  10. package/dist/cjs/biz-components/WebPushPopup/index.d.ts +44 -0
  11. package/dist/cjs/biz-components/WebPushPopup/index.js +2 -0
  12. package/dist/cjs/biz-components/WebPushPopup/index.js.map +7 -0
  13. package/dist/cjs/biz-components/index.d.ts +4 -0
  14. package/dist/cjs/biz-components/index.js +1 -1
  15. package/dist/cjs/biz-components/index.js.map +3 -3
  16. package/dist/cjs/hooks/useEmarsysWebPush.d.ts +111 -0
  17. package/dist/cjs/hooks/useEmarsysWebPush.js +2 -0
  18. package/dist/cjs/hooks/useEmarsysWebPush.js.map +7 -0
  19. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +1 -1
  20. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  21. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  22. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.d.ts +1 -0
  23. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  24. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  25. package/dist/esm/biz-components/HeroBanner/types.d.ts +15 -0
  26. package/dist/esm/biz-components/WebPushPopup/index.d.ts +44 -0
  27. package/dist/esm/biz-components/WebPushPopup/index.js +2 -0
  28. package/dist/esm/biz-components/WebPushPopup/index.js.map +7 -0
  29. package/dist/esm/biz-components/index.d.ts +4 -0
  30. package/dist/esm/biz-components/index.js +1 -1
  31. package/dist/esm/biz-components/index.js.map +3 -3
  32. package/dist/esm/hooks/useEmarsysWebPush.d.ts +111 -0
  33. package/dist/esm/hooks/useEmarsysWebPush.js +2 -0
  34. package/dist/esm/hooks/useEmarsysWebPush.js.map +7 -0
  35. package/package.json +4 -2
  36. package/static/emarsys-service-worker.js +31 -0
  37. package/style.css +62 -0
@@ -15,7 +15,7 @@ export interface JumpOptions {
15
15
  /** 是否考虑 a11y @default false */
16
16
  a11y?: boolean;
17
17
  }
18
- export type HeroBannerSemanticName = 'root' | 'title' | 'subtitle' | 'buttonGroup' | 'primaryButton' | 'secondaryButton' | 'captionGroup';
18
+ export type HeroBannerSemanticName = 'root' | 'title' | 'subtitle' | 'buttonGroup' | 'primaryButton' | 'secondaryButton' | 'tertiaryButton' | 'captionGroup';
19
19
  declare const _default: React.ForwardRefExoticComponent<Omit<HeroBannerProps & {
20
20
  classNames?: Partial<Record<HeroBannerSemanticName, string>>;
21
21
  /**
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var He=Object.create;var T=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var Pe=(t,n)=>{for(var o in n)T(t,o,{get:n[o],enumerable:!0})},te=(t,n,o,h)=>{if(n&&typeof n=="object"||typeof n=="function")for(let d of ze(n))!Le.call(t,d)&&d!==o&&T(t,d,{get:()=>n[d],enumerable:!(h=Te(n,d))||h.enumerable});return t};var $=(t,n,o)=>(o=t!=null?He(Ce(t)):{},te(n||!t||!t.__esModule?T(o,"default",{value:t,enumerable:!0}):o,t)),Ie=t=>te(T({},"__esModule",{value:!0}),t);var Ae={};Pe(Ae,{default:()=>je});module.exports=Ie(Ae);var e=require("react/jsx-runtime"),i=$(require("react")),B=$(require("gsap")),N=require("gsap/dist/ScrollTrigger"),E=$(require("jump.js")),D=require("react-responsive"),re=require("react-intersection-observer"),oe=$(require("../../helpers/ScrollLoadVideo.js")),l=require("../../components/index.js"),c=require("../../helpers/index.js"),V=require("class-variance-authority"),ne=require("../../shared/Styles.js"),le=require("../../hooks/useExposure.js"),z=require("../../shared/trackUrlRef.js"),se=require("../../helpers/utils.js"),ie=require("../AiuiProvider/index.js"),pe=require("../../components/button.js"),ue=require("../VideoModal/index.js"),ce=$(require("./HeroBannerCarousel.js"));const f="image",g="hero_banner",Se=(0,V.cva)("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Me=(0,V.cva)("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),Re=(0,V.cva)("hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Ee=(0,V.cva)("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),De=({size:t="base"})=>{const{width:n,height:o}=pe.sizeMap[t];return(0,e.jsx)("svg",{width:n,height:o,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},ae=i.default.forwardRef(({data:t,className:n,classNames:o={},onSecondaryClick:h,onPrimaryClick:d,jumpOptions:me={},...j},A)=>{const{locale:_}=(0,ie.useAiuiContext)(),O={...{duration:500,offset:0},...me},C=r=>!r||!_?r:(0,se.getLocalizedPath)(r,_),{label:U,title:u,subtitle:s,endDate:G,endDate_tz:de,dateFormat:fe,pcImage:x,padImage:J,mobileImage:H,pcVideo:ge,padVideo:be,mobileVideo:q,isShowVideo:xe,isVideoLoop:he=!0,primaryButton:p,secondaryButton:a,theme:ye="light",size:L="default",titleSize:P,caption:F=[],blockLink:W,iconArray:Y,align:y="left",enableParallax:Q=!0}=t,I=Array.isArray(F)?F:[],ve=Array.isArray(Y)?Y:void 0,ke=(0,D.useMediaQuery)({query:"(max-width: 768px)"}),we=(0,D.useMediaQuery)({query:"(max-width: 1024px)"}),[Z,K]=(0,i.useState)(!1),{ref:$e,inView:X}=(0,re.useInView)(),S=(0,i.useRef)(null),M=(0,i.useRef)(null),R=(0,i.useRef)(null),v=(0,i.useRef)(null),b=(0,i.useRef)(null),Be=u?.trim()||s?.trim()||x?.alt?.trim()||void 0,Ne=u!==void 0?u?.trim()||s?.trim()||x?.alt?.trim()||void 0:s&&s.trim()||"",Ve=s&&s.trim()||"";return(0,le.useExposure)(b,{componentType:f,componentName:g,componentTitle:Ne,componentDescription:Ve}),(0,i.useImperativeHandle)(A,()=>b.current),(0,i.useEffect)(()=>{if(t.items&&t.items.length>0||!Q)return;B.default.registerPlugin(N.ScrollTrigger);function r(){if(!v.current)return;const m=b.current?.clientHeight||100;window.innerHeight<=m?S.current=N.ScrollTrigger.create({trigger:b.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:k=>{const w=k.progress*40-20;B.default.set(v.current,{yPercent:w})}}):(R.current=N.ScrollTrigger.create({trigger:b.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:k=>{const w=k.progress*20-20;B.default.set(v.current,{yPercent:w})}}),M.current=N.ScrollTrigger.create({trigger:b.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:k=>{const w=k.progress*20;B.default.set(v.current,{yPercent:w})}}))}return X&&r(),()=>{S.current&&S.current.kill(),R.current&&R.current.kill(),M.current&&M.current.kill()}},[X,t.items,Q]),t.items&&t.items.length>0?(0,e.jsx)(ce.default,{data:t,className:n,classNames:o,onPrimaryClick:d,onSecondaryClick:h,ref:A,...j}):(0,e.jsx)("div",{...j,ref:$e,"data-ui-component-id":"HeroBanner",children:(0,e.jsxs)("div",{ref:b,className:(0,c.cn)(ye==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":L==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":L==="sm"},n),children:[W&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,z.trackUrlRef)(C(W),`${f}_${g}`),"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${u}#${s}`,tabIndex:-1,"aria-hidden":"true","aria-label":Be}),(0,e.jsx)("div",{ref:v,className:(0,c.cn)("absolute left-0 top-0 size-full"),children:xe?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{"data-video-poster":"true",className:"laptop:w-full absolute inset-0 h-full transition-opacity duration-500",children:(0,e.jsx)(l.Picture,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:x?.alt||"",source:`${x?.url||""} , ${J?.url??(H?.url||"")} 1024, ${H?.url||""} 767`})}),(0,e.jsx)(oe.default,{poster:void 0,src:ke?q?.url:we?be?.url||q?.url:ge?.url,className:"laptop:w-full absolute inset-0 h-full",videoClassName:"h-full object-cover",muted:!0,loop:he,playsInline:!0,onPlaying:r=>{r.currentTarget.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")}})]}):(0,e.jsx)(l.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:x?.alt||"",source:`${x?.url||""} , ${J?.url??(H?.url||"")} 1024, ${H?.url||""} 767`})}),(0,e.jsxs)("div",{className:Se({align:y}),children:[(0,e.jsxs)("div",{className:Me({align:y}),children:[U&&(0,e.jsx)(l.Text,{size:2,as:"p",className:(0,c.cn)("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:U}),u&&(0,e.jsx)(l.Heading,{as:P==="4"?"h1":"h2",html:u,className:(0,c.cn)("hero-banner-title",o.title),size:P?Number(P||"5"):L==="sm"?4:5}),s&&(0,e.jsx)(l.Text,{as:"p",size:2,className:(0,c.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",o.subtitle),html:s}),G&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(l.Countdown,{endDate:G,endDate_tz:de,dateFormat:fe,variant:"spacious",align:y})})]}),(0,e.jsxs)("div",{className:(0,c.cn)(Re({align:y}),o.buttonGroup),children:[a?.isShowPlayVideoButton&&a?.playVideoButtonText?(0,e.jsxs)(l.Button,{onClick:()=>K(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${u}#${s}#${a?.playVideoButtonText}`,children:[a?.playVideoButtonText," ",(0,e.jsx)(De,{size:"lg"})]}):a?.text?(0,e.jsxs)(l.Button,{"aria-label":u??s,size:"lg",variant:"secondary",className:(0,c.cn)("hero-banner-secondary-button",o.secondaryButton),as:a?.isCustomSecondaryButton?"button":"a",href:(0,z.trackUrlRef)(C(a?.link),`${f}_${g}`),target:a?.target,rel:a?.target==="_blank"?a?.rel??"noopener noreferrer":a?.rel,onClick:r=>{if(a.link?.startsWith("#")){r.preventDefault();const m=document.querySelector(a.link);m&&(0,E.default)(m,O)}a?.isCustomSecondaryButton&&h?.(t,r,a?.customSecondaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${u}#${s}#${a?.text}`,children:[a?.text,(0,e.jsx)("span",{className:"sr-only",children:u??s})]}):null,p&&p.text&&(0,e.jsx)(l.Button,{"aria-label":u??s,size:"lg",variant:"primary",className:(0,c.cn)("hero-banner-primary-button",o.primaryButton),as:p?.isCustomPrimaryButton?"button":"a",href:(0,z.trackUrlRef)(C(p.link),`${f}_${g}`),target:p?.target,rel:p?.target==="_blank"?p?.rel??"noopener noreferrer":p?.rel,onClick:r=>{if(p.link?.startsWith("#")){r.preventDefault();const m=document.querySelector(p.link);m&&(0,E.default)(m,O)}p?.isCustomPrimaryButton&&d?.(t,r,p?.customPrimaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${u}#${s}#${p?.text}`,children:p.text})]}),(0,e.jsx)("div",{className:Ee({align:y}),children:ve?.map(r=>(0,e.jsx)("div",{className:"h-12",children:(0,e.jsx)(l.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:r?.pcImage?.alt||"",source:r?.pcImage?.url})},r?.pcImage?.url||r?.pcImage?.alt))})]}),I.length>0&&(0,e.jsx)("div",{className:(0,c.cn)("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",o.captionGroup),children:I.map((r,m)=>(0,e.jsxs)(i.default.Fragment,{children:[(0,e.jsx)(l.Text,{size:2,className:(0,c.cn)("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:r.title}),m<I.length-1&&(0,e.jsx)("div",{className:(0,c.cn)("bg-info-primary w-px")})]},r.title))}),Z&&(0,e.jsx)(ue.VideoModal,{visible:Z,videoUrl:a?.isYoutubeVideo?void 0:a?.videoUrl?.url,youTubeId:a?.isYoutubeVideo?a?.youtubeId:void 0,onCloseModal:()=>K(!1)})]})})});ae.displayName="HeroBanner";var je=(0,ne.withLayout)(ae);
1
+ "use strict";"use client";var ze=Object.create;var L=Object.defineProperty;var Ce=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Ie=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Se=(t,s)=>{for(var o in s)L(t,o,{get:s[o],enumerable:!0})},re=(t,s,o,h)=>{if(s&&typeof s=="object"||typeof s=="function")for(let b of Le(s))!Pe.call(t,b)&&b!==o&&L(t,b,{get:()=>s[b],enumerable:!(h=Ce(s,b))||h.enumerable});return t};var B=(t,s,o)=>(o=t!=null?ze(Ie(t)):{},re(s||!t||!t.__esModule?L(o,"default",{value:t,enumerable:!0}):o,t)),Ee=t=>re(L({},"__esModule",{value:!0}),t);var Oe={};Se(Oe,{default:()=>Ae});module.exports=Ee(Oe);var e=require("react/jsx-runtime"),p=B(require("react")),N=B(require("gsap")),T=require("gsap/dist/ScrollTrigger"),I=B(require("jump.js")),_=require("react-responsive"),ne=require("react-intersection-observer"),le=B(require("../../helpers/ScrollLoadVideo.js")),l=require("../../components/index.js"),d=require("../../helpers/index.js"),V=require("class-variance-authority"),se=require("../../shared/Styles.js"),ie=require("../../hooks/useExposure.js"),H=require("../../shared/trackUrlRef.js"),pe=require("../../helpers/utils.js"),ue=require("../AiuiProvider/index.js"),ce=require("../../components/button.js"),me=require("../VideoModal/index.js"),de=B(require("./HeroBannerCarousel.js"));const f="image",g="hero_banner",Me=(0,V.cva)("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Re=(0,V.cva)("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),De=(0,V.cva)("hero-banner-button-group lg-desktop:gap-x-3 flex flex-wrap items-center gap-x-2 gap-y-3",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),je=(0,V.cva)("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),_e=({size:t="base"})=>{const{width:s,height:o}=ce.sizeMap[t];return(0,e.jsx)("svg",{width:s,height:o,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},oe=p.default.forwardRef(({data:t,className:s,classNames:o={},onSecondaryClick:h,onPrimaryClick:b,onTertiaryClick:A,jumpOptions:fe={},...O},U)=>{const{locale:q}=(0,ue.useAiuiContext)(),P={...{duration:500,offset:0},...fe},z=a=>!a||!q?a:(0,pe.getLocalizedPath)(a,q),{label:G,title:i,subtitle:n,endDate:J,endDate_tz:ge,dateFormat:be,pcImage:y,padImage:F,mobileImage:C,pcVideo:xe,padVideo:ye,mobileVideo:W,isShowVideo:he,isVideoLoop:ve=!0,primaryButton:u,secondaryButton:r,tertiaryButton:c,theme:ke="light",size:S="default",titleSize:E,caption:Y=[],blockLink:Q,iconArray:Z,align:v="left",enableParallax:K=!0}=t,M=Array.isArray(Y)?Y:[],we=Array.isArray(Z)?Z:void 0,$e=(0,_.useMediaQuery)({query:"(max-width: 768px)"}),Be=(0,_.useMediaQuery)({query:"(max-width: 1024px)"}),[X,ee]=(0,p.useState)(!1),{ref:Ne,inView:te}=(0,ne.useInView)(),R=(0,p.useRef)(null),D=(0,p.useRef)(null),j=(0,p.useRef)(null),k=(0,p.useRef)(null),x=(0,p.useRef)(null),Te=i?.trim()||n?.trim()||y?.alt?.trim()||void 0,Ve=i!==void 0?i?.trim()||n?.trim()||y?.alt?.trim()||void 0:n&&n.trim()||"",He=n&&n.trim()||"";return(0,ie.useExposure)(x,{componentType:f,componentName:g,componentTitle:Ve,componentDescription:He}),(0,p.useImperativeHandle)(U,()=>x.current),(0,p.useEffect)(()=>{if(t.items&&t.items.length>0||!K)return;N.default.registerPlugin(T.ScrollTrigger);function a(){if(!k.current)return;const m=x.current?.clientHeight||100;window.innerHeight<=m?R.current=T.ScrollTrigger.create({trigger:x.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:w=>{const $=w.progress*40-20;N.default.set(k.current,{yPercent:$})}}):(j.current=T.ScrollTrigger.create({trigger:x.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:w=>{const $=w.progress*20-20;N.default.set(k.current,{yPercent:$})}}),D.current=T.ScrollTrigger.create({trigger:x.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:w=>{const $=w.progress*20;N.default.set(k.current,{yPercent:$})}}))}return te&&a(),()=>{R.current&&R.current.kill(),j.current&&j.current.kill(),D.current&&D.current.kill()}},[te,t.items,K]),t.items&&t.items.length>0?(0,e.jsx)(de.default,{data:t,className:s,classNames:o,onPrimaryClick:b,onSecondaryClick:h,onTertiaryClick:A,ref:U,...O}):(0,e.jsx)("div",{...O,ref:Ne,"data-ui-component-id":"HeroBanner",children:(0,e.jsxs)("div",{ref:x,className:(0,d.cn)(ke==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":S==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":S==="sm"},s),children:[Q&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,H.trackUrlRef)(z(Q),`${f}_${g}`),"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${i}#${n}`,tabIndex:-1,"aria-hidden":"true","aria-label":Te}),(0,e.jsx)("div",{ref:k,className:(0,d.cn)("absolute left-0 top-0 size-full"),children:he?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{"data-video-poster":"true",className:"laptop:w-full absolute inset-0 h-full transition-opacity duration-500",children:(0,e.jsx)(l.Picture,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:y?.alt||"",source:`${y?.url||""} , ${F?.url??(C?.url||"")} 1024, ${C?.url||""} 767`})}),(0,e.jsx)(le.default,{poster:void 0,src:$e?W?.url:Be?ye?.url||W?.url:xe?.url,className:"laptop:w-full absolute inset-0 h-full",videoClassName:"h-full object-cover",muted:!0,loop:ve,playsInline:!0,onPlaying:a=>{a.currentTarget.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")}})]}):(0,e.jsx)(l.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:y?.alt||"",source:`${y?.url||""} , ${F?.url??(C?.url||"")} 1024, ${C?.url||""} 767`})}),(0,e.jsxs)("div",{className:Me({align:v}),children:[(0,e.jsxs)("div",{className:Re({align:v}),children:[G&&(0,e.jsx)(l.Text,{size:2,as:"p",className:(0,d.cn)("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:G}),i&&(0,e.jsx)(l.Heading,{as:E==="4"?"h1":"h2",html:i,className:(0,d.cn)("hero-banner-title",o.title),size:E?Number(E||"5"):S==="sm"?4:5}),n&&(0,e.jsx)(l.Text,{as:"p",size:2,className:(0,d.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",o.subtitle),html:n}),J&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(l.Countdown,{endDate:J,endDate_tz:ge,dateFormat:be,variant:"spacious",align:v})})]}),(0,e.jsxs)("div",{className:(0,d.cn)(De({align:v}),o.buttonGroup),children:[(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex items-center gap-2",children:[r?.isShowPlayVideoButton&&r?.playVideoButtonText?(0,e.jsxs)(l.Button,{onClick:()=>ee(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${i}#${n}#${r?.playVideoButtonText}`,children:[r?.playVideoButtonText," ",(0,e.jsx)(_e,{size:"lg"})]}):r?.text?(0,e.jsxs)(l.Button,{"aria-label":i??n,size:"lg",variant:"secondary",className:(0,d.cn)("hero-banner-secondary-button",o.secondaryButton),as:r?.isCustomSecondaryButton?"button":"a",href:(0,H.trackUrlRef)(z(r?.link),`${f}_${g}`),target:r?.target,rel:r?.target==="_blank"?r?.rel??"noopener noreferrer":r?.rel,onClick:a=>{if(r.link?.startsWith("#")){a.preventDefault();const m=document.querySelector(r.link);m&&(0,I.default)(m,P)}r?.isCustomSecondaryButton&&h?.(t,a,r?.customSecondaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${i}#${n}#${r?.text}`,children:[r?.text,(0,e.jsx)("span",{className:"sr-only",children:i??n})]}):null,u&&u.text&&(0,e.jsx)(l.Button,{"aria-label":i??n,size:"lg",variant:"primary",className:(0,d.cn)("hero-banner-primary-button",o.primaryButton),as:u?.isCustomPrimaryButton?"button":"a",href:(0,H.trackUrlRef)(z(u.link),`${f}_${g}`),target:u?.target,rel:u?.target==="_blank"?u?.rel??"noopener noreferrer":u?.rel,onClick:a=>{if(u.link?.startsWith("#")){a.preventDefault();const m=document.querySelector(u.link);m&&(0,I.default)(m,P)}u?.isCustomPrimaryButton&&b?.(t,a,u?.customPrimaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${i}#${n}#${u?.text}`,children:u.text})]}),c&&c.text&&(0,e.jsxs)(l.Button,{"aria-label":i??n,size:"lg",variant:"link",className:(0,d.cn)("hero-banner-tertiary-button w-auto p-0",o.tertiaryButton),as:c?.isCustomTertiaryButton?"button":"a",href:(0,H.trackUrlRef)(z(c.link),`${f}_${g}`),target:c?.target,rel:c?.target==="_blank"?c?.rel??"noopener noreferrer":c?.rel,onClick:a=>{if(c.link?.startsWith("#")){a.preventDefault();const m=document.querySelector(c.link);m&&(0,I.default)(m,P)}c?.isCustomTertiaryButton&&A?.(t,a,c?.customTertiaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${i}#${n}#${c?.text}`,children:[c.text,(0,e.jsx)("span",{className:"sr-only",children:i??n})]})]}),(0,e.jsx)("div",{className:je({align:v}),children:we?.map(a=>(0,e.jsx)("div",{className:"h-12",children:(0,e.jsx)(l.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:a?.pcImage?.alt||"",source:a?.pcImage?.url})},a?.pcImage?.url||a?.pcImage?.alt))})]}),M.length>0&&(0,e.jsx)("div",{className:(0,d.cn)("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",o.captionGroup),children:M.map((a,m)=>(0,e.jsxs)(p.default.Fragment,{children:[(0,e.jsx)(l.Text,{size:2,className:(0,d.cn)("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:a.title}),m<M.length-1&&(0,e.jsx)("div",{className:(0,d.cn)("bg-info-primary w-px")})]},a.title))}),X&&(0,e.jsx)(me.VideoModal,{visible:X,videoUrl:r?.isYoutubeVideo?void 0:r?.videoUrl?.url,youTubeId:r?.isYoutubeVideo?r?.youtubeId:void 0,onCloseModal:()=>ee(!1)})]})})});oe.displayName="HeroBanner";var Ae=(0,se.withLayout)(oe);
2
2
  //# sourceMappingURL=HeroBanner.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport jump from 'jump.js'\nimport type { HeroBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text, Countdown } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getLocalizedPath } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n// Task 18: import carousel implementation for early-return delegation (DECISION-A002)\nimport HeroBannerCarousel from './HeroBannerCarousel.js'\n\n/**\n * jump.js \u914D\u7F6E\u9009\u9879\n */\nexport interface JumpOptions {\n /** \u52A8\u753B\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 @default 500 */\n duration?: number\n /** \u504F\u79FB\u91CF\uFF08\u50CF\u7D20\uFF09 @default 0 */\n offset?: number\n /** \u52A8\u753B\u5B8C\u6210\u56DE\u8C03 */\n callback?: () => void\n /** \u7F13\u52A8\u51FD\u6570 */\n easing?: (t: number, b: number, c: number, d: number) => number\n /** \u662F\u5426\u8003\u8651 a11y @default false */\n a11y?: boolean\n}\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\n// CVA variants for align\nconst contentVariants = cva(\n 'hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n {\n variants: {\n align: {\n left: 'tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]',\n center:\n 'tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst textVariants = cva(\n 'hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]',\n {\n variants: {\n align: {\n left: 'laptop:text-left',\n center: 'text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst buttonGroupVariants = cva('hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2', {\n variants: {\n align: {\n left: 'laptop:justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nconst iconGroupVariants = cva('hero-banner-icon-group flex items-center gap-2', {\n variants: {\n align: {\n left: 'justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nexport type HeroBannerSemanticName =\n | 'root'\n | 'title'\n | 'subtitle'\n | 'buttonGroup'\n | 'primaryButton'\n | 'secondaryButton'\n | 'captionGroup'\n\nconst PlayButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z\"\n fill=\"currentcolor\"\n />\n </svg>\n )\n}\n\nconst HeroBanner = React.forwardRef<\n HTMLDivElement,\n HeroBannerProps & {\n classNames?: Partial<Record<HeroBannerSemanticName, string>>\n /**\n * \u951A\u70B9\u8DF3\u8F6C\u914D\u7F6E\uFF08\u7528\u4E8E # \u5F00\u5934\u7684\u94FE\u63A5\uFF09\n * @default { duration: 500, offset: 0 }\n */\n jumpOptions?: JumpOptions\n }\n>(({ data, className, classNames = {}, onSecondaryClick, onPrimaryClick, jumpOptions = {}, ...rest }, ref) => {\n const { locale } = useAiuiContext()\n\n // \u9ED8\u8BA4 jump \u914D\u7F6E\n const defaultJumpOptions: JumpOptions = { duration: 500, offset: 0 }\n const mergedJumpOptions = { ...defaultJumpOptions, ...jumpOptions }\n\n // \u5305\u88C5\u94FE\u63A5\uFF0C\u81EA\u52A8\u6DFB\u52A0 locale \u524D\u7F00\n const localizeUrl = (url?: string) => {\n if (!url || !locale) return url\n return getLocalizedPath(url, locale)\n }\n\n const {\n label,\n title,\n subtitle,\n endDate,\n endDate_tz,\n dateFormat,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n isVideoLoop = true,\n primaryButton,\n secondaryButton,\n theme = 'light',\n size = 'default',\n titleSize,\n caption = [],\n blockLink,\n iconArray,\n align = 'left',\n enableParallax = true,\n } = data\n\n const safeCaption = Array.isArray(caption) ? caption : []\n const safeIconArray = Array.isArray(iconArray) ? iconArray : undefined\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const [visible, setVisible] = useState<boolean>(false)\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n // Task 7: Compute accessibility / tracking fallback values (Rule 2/3/4 \u2014 DECISION-T3)\n // blockLink aria-label: title \u2192 subtitle \u2192 pcImage.alt \u2192 undefined (absent attr)\n const blockLinkLabel = title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n // componentTitle: title=undefined \u2192 coerce '' via subtitle only (no pcImage.alt for undefined title);\n // title='' (intentional) \u2192 cascade: subtitle \u2192 pcImage.alt \u2192 undefined\n const resolvedComponentTitle =\n title !== undefined\n ? title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n : (subtitle && subtitle.trim()) || ''\n // componentDescription: subtitle with undefined guard\n const resolvedComponentDescription = (subtitle && subtitle.trim()) || ''\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: resolvedComponentTitle,\n componentDescription: resolvedComponentDescription,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n // Task 18: GSAP bypass \u2014 skip ALL GSAP setup in carousel mode (DECISION-A002/DECISION-009)\n if (data.items && data.items.length > 0) return\n if (!enableParallax) return\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView, data.items, enableParallax])\n\n // Task 18: Carousel mode early return (DECISION-A002 / DECISION-011)\n // All hooks above have already run. Delegate entirely to HeroBannerCarousel\n // when data.items is non-empty; GSAP was already bypassed in the useEffect above.\n if (data.items && data.items.length > 0) {\n return (\n <HeroBannerCarousel\n data={data}\n className={className}\n classNames={classNames}\n onPrimaryClick={onPrimaryClick}\n onSecondaryClick={onSecondaryClick}\n ref={ref as React.Ref<HTMLDivElement>}\n {...rest}\n />\n )\n }\n return (\n <div {...rest} ref={inViewRef} data-ui-component-id=\"HeroBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n {\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]':\n size === 'default',\n 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]':\n size === 'sm',\n },\n className\n )}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(localizeUrl(blockLink), `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}`}\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={blockLinkLabel}\n ></a>\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <>\n {/* Poster cover layer: eager + high priority, decoupled from JS lazy-load, participates in LCP */}\n {/* Wrap in div so data-video-poster + transition-opacity are on the container, not the <img> */}\n <div\n data-video-poster=\"true\"\n className=\"laptop:w-full absolute inset-0 h-full transition-opacity duration-500\"\n >\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order (both z-auto, video is after Picture) */}\n <ScrollLoadVideo\n poster={undefined}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full absolute inset-0 h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const banner = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBanner\"]')\n banner?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className={contentVariants({ align })}>\n <div className={textVariants({ align })}>\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n className={cn('hero-banner-title', classNames.title)}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm',\n classNames.subtitle\n )}\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={cn(buttonGroupVariants({ align }), classNames.buttonGroup)}>\n {secondaryButton?.isShowPlayVideoButton && secondaryButton?.playVideoButtonText ? (\n <Button\n onClick={() => setVisible(true)}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-play-video-button\"\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.playVideoButtonText}`}\n >\n {secondaryButton?.playVideoButtonText} <PlayButtonAppendIcon size=\"lg\" />\n </Button>\n ) : secondaryButton?.text ? (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"secondary\"\n className={cn('hero-banner-secondary-button', classNames.secondaryButton)}\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(secondaryButton?.link), `${componentType}_${componentName}`)}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e => {\n if (secondaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(secondaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.text}`}\n >\n {secondaryButton?.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n ) : null}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"primary\"\n className={cn('hero-banner-primary-button', classNames.primaryButton)}\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(primaryButton.link), `${componentType}_${componentName}`)}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e => {\n if (primaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(primaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${primaryButton?.text}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n <div className={iconGroupVariants({ align })}>\n {safeIconArray?.map(icon => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n </div>\n\n {safeCaption.length > 0 && (\n <div\n className={cn(\n 'hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]',\n classNames.captionGroup\n )}\n >\n {safeCaption.map((c, index) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className={cn(\n 'hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]'\n )}\n html={c.title}\n />\n {index < safeCaption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n\n {/* \u89C6\u9891\u5F39\u7A97 */}\n {visible && (\n <VideoModal\n visible={visible}\n videoUrl={secondaryButton?.isYoutubeVideo ? undefined : secondaryButton?.videoUrl?.url}\n youTubeId={secondaryButton?.isYoutubeVideo ? secondaryButton?.youtubeId : undefined}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withLayout(HeroBanner)\n"],
5
- "mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA8GM,IAAAI,EAAA,6BA7GNC,EAAwE,oBACxEC,EAAiB,mBACjBC,EAA8B,mCAC9BC,EAAiB,sBAEjBC,EAA8B,4BAC9BC,GAA0B,uCAC1BC,GAA4B,+CAC5BC,EAA0D,qCAC1DC,EAAmB,kCACnBC,EAAoB,oCACpBC,GAA2B,kCAC3BC,GAA4B,sCAC5BC,EAA4B,uCAC5BC,GAAiC,kCACjCC,GAA+B,oCAC/BC,GAAwB,sCACxBC,GAA2B,kCAE3BC,GAA+B,sCAkB/B,MAAMC,EAAgB,QAChBC,EAAgB,cAGhBC,MAAkB,OACtB,iGACA,CACE,SAAU,CACR,MAAO,CACL,KAAM,4HACN,OACE,4JACJ,CACF,EACA,gBAAiB,CACf,MAAO,MACT,CACF,CACF,EAEMC,MAAe,OACnB,+HACA,CACE,SAAU,CACR,MAAO,CACL,KAAM,mBACN,OAAQ,aACV,CACF,EACA,gBAAiB,CACf,MAAO,MACT,CACF,CACF,EAEMC,MAAsB,OAAI,oEAA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B,QAAC,EAAAhE,QAAM,SAAN,CACC,oBAAC,QACC,KAAM,EACN,aAAW,MACT,yIACF,EACA,KAAM+D,EAAE,MACV,EACCC,EAAQ5B,EAAY,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IAR5D2B,EAAE,KASvB,CACD,EACH,EAIDvB,MACC,OAAC,eACC,QAASA,EACT,SAAUZ,GAAiB,eAAiB,OAAYA,GAAiB,UAAU,IACnF,UAAWA,GAAiB,eAAiBA,GAAiB,UAAY,OAC1E,aAAc,IAAMa,EAAW,EAAK,EACtC,GAEJ,EACF,CAEJ,CAAC,EAED1C,GAAW,YAAc,aAEzB,IAAO/B,MAAQ,eAAW+B,EAAU",
6
- "names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_ScrollTrigger", "import_jump", "import_react_responsive", "import_react_intersection_observer", "import_ScrollLoadVideo", "import_components", "import_helpers", "import_class_variance_authority", "import_Styles", "import_useExposure", "import_trackUrlRef", "import_utils", "import_AiuiProvider", "import_button", "import_VideoModal", "import_HeroBannerCarousel", "componentType", "componentName", "contentVariants", "textVariants", "buttonGroupVariants", "iconGroupVariants", "PlayButtonAppendIcon", "size", "width", "height", "HeroBanner", "React", "data", "className", "classNames", "onSecondaryClick", "onPrimaryClick", "jumpOptions", "rest", "ref", "locale", "mergedJumpOptions", "localizeUrl", "url", "label", "title", "subtitle", "endDate", "endDate_tz", "dateFormat", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "isVideoLoop", "primaryButton", "secondaryButton", "theme", "titleSize", "caption", "blockLink", "iconArray", "align", "enableParallax", "safeCaption", "safeIconArray", "isMobile", "isPad", "visible", "setVisible", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "blockLinkLabel", "resolvedComponentTitle", "resolvedComponentDescription", "gsap", "gsapResize", "clientHeight", "self", "value", "HeroBannerCarousel", "ScrollLoadVideo", "e", "element", "jump", "icon", "c", "index"]
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport jump from 'jump.js'\nimport type { HeroBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text, Countdown } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getLocalizedPath } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n// Task 18: import carousel implementation for early-return delegation (DECISION-A002)\nimport HeroBannerCarousel from './HeroBannerCarousel.js'\n\n/**\n * jump.js \u914D\u7F6E\u9009\u9879\n */\nexport interface JumpOptions {\n /** \u52A8\u753B\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 @default 500 */\n duration?: number\n /** \u504F\u79FB\u91CF\uFF08\u50CF\u7D20\uFF09 @default 0 */\n offset?: number\n /** \u52A8\u753B\u5B8C\u6210\u56DE\u8C03 */\n callback?: () => void\n /** \u7F13\u52A8\u51FD\u6570 */\n easing?: (t: number, b: number, c: number, d: number) => number\n /** \u662F\u5426\u8003\u8651 a11y @default false */\n a11y?: boolean\n}\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\n// CVA variants for align\nconst contentVariants = cva(\n 'hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n {\n variants: {\n align: {\n left: 'tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]',\n center:\n 'tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst textVariants = cva(\n 'hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]',\n {\n variants: {\n align: {\n left: 'laptop:text-left',\n center: 'text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst buttonGroupVariants = cva(\n 'hero-banner-button-group lg-desktop:gap-x-3 flex flex-wrap items-center gap-x-2 gap-y-3',\n {\n variants: {\n align: {\n left: 'laptop:justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst iconGroupVariants = cva('hero-banner-icon-group flex items-center gap-2', {\n variants: {\n align: {\n left: 'justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nexport type HeroBannerSemanticName =\n | 'root'\n | 'title'\n | 'subtitle'\n | 'buttonGroup'\n | 'primaryButton'\n | 'secondaryButton'\n | 'tertiaryButton'\n | 'captionGroup'\n\nconst PlayButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z\"\n fill=\"currentcolor\"\n />\n </svg>\n )\n}\n\nconst HeroBanner = React.forwardRef<\n HTMLDivElement,\n HeroBannerProps & {\n classNames?: Partial<Record<HeroBannerSemanticName, string>>\n /**\n * \u951A\u70B9\u8DF3\u8F6C\u914D\u7F6E\uFF08\u7528\u4E8E # \u5F00\u5934\u7684\u94FE\u63A5\uFF09\n * @default { duration: 500, offset: 0 }\n */\n jumpOptions?: JumpOptions\n }\n>(\n (\n { data, className, classNames = {}, onSecondaryClick, onPrimaryClick, onTertiaryClick, jumpOptions = {}, ...rest },\n ref\n ) => {\n const { locale } = useAiuiContext()\n\n // \u9ED8\u8BA4 jump \u914D\u7F6E\n const defaultJumpOptions: JumpOptions = { duration: 500, offset: 0 }\n const mergedJumpOptions = { ...defaultJumpOptions, ...jumpOptions }\n\n // \u5305\u88C5\u94FE\u63A5\uFF0C\u81EA\u52A8\u6DFB\u52A0 locale \u524D\u7F00\n const localizeUrl = (url?: string) => {\n if (!url || !locale) return url\n return getLocalizedPath(url, locale)\n }\n\n const {\n label,\n title,\n subtitle,\n endDate,\n endDate_tz,\n dateFormat,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n isVideoLoop = true,\n primaryButton,\n secondaryButton,\n tertiaryButton,\n theme = 'light',\n size = 'default',\n titleSize,\n caption = [],\n blockLink,\n iconArray,\n align = 'left',\n enableParallax = true,\n } = data\n\n const safeCaption = Array.isArray(caption) ? caption : []\n const safeIconArray = Array.isArray(iconArray) ? iconArray : undefined\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const [visible, setVisible] = useState<boolean>(false)\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n // Task 7: Compute accessibility / tracking fallback values (Rule 2/3/4 \u2014 DECISION-T3)\n // blockLink aria-label: title \u2192 subtitle \u2192 pcImage.alt \u2192 undefined (absent attr)\n const blockLinkLabel = title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n // componentTitle: title=undefined \u2192 coerce '' via subtitle only (no pcImage.alt for undefined title);\n // title='' (intentional) \u2192 cascade: subtitle \u2192 pcImage.alt \u2192 undefined\n const resolvedComponentTitle =\n title !== undefined\n ? title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n : (subtitle && subtitle.trim()) || ''\n // componentDescription: subtitle with undefined guard\n const resolvedComponentDescription = (subtitle && subtitle.trim()) || ''\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: resolvedComponentTitle,\n componentDescription: resolvedComponentDescription,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n // Task 18: GSAP bypass \u2014 skip ALL GSAP setup in carousel mode (DECISION-A002/DECISION-009)\n if (data.items && data.items.length > 0) return\n if (!enableParallax) return\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView, data.items, enableParallax])\n\n // Task 18: Carousel mode early return (DECISION-A002 / DECISION-011)\n // All hooks above have already run. Delegate entirely to HeroBannerCarousel\n // when data.items is non-empty; GSAP was already bypassed in the useEffect above.\n if (data.items && data.items.length > 0) {\n return (\n <HeroBannerCarousel\n data={data}\n className={className}\n classNames={classNames}\n onPrimaryClick={onPrimaryClick}\n onSecondaryClick={onSecondaryClick}\n onTertiaryClick={onTertiaryClick}\n ref={ref as React.Ref<HTMLDivElement>}\n {...rest}\n />\n )\n }\n return (\n <div {...rest} ref={inViewRef} data-ui-component-id=\"HeroBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n {\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]':\n size === 'default',\n 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]':\n size === 'sm',\n },\n className\n )}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(localizeUrl(blockLink), `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}`}\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={blockLinkLabel}\n ></a>\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <>\n {/* Poster cover layer: eager + high priority, decoupled from JS lazy-load, participates in LCP */}\n {/* Wrap in div so data-video-poster + transition-opacity are on the container, not the <img> */}\n <div\n data-video-poster=\"true\"\n className=\"laptop:w-full absolute inset-0 h-full transition-opacity duration-500\"\n >\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order (both z-auto, video is after Picture) */}\n <ScrollLoadVideo\n poster={undefined}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full absolute inset-0 h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const banner = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBanner\"]')\n banner?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className={contentVariants({ align })}>\n <div className={textVariants({ align })}>\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n className={cn('hero-banner-title', classNames.title)}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm',\n classNames.subtitle\n )}\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={cn(buttonGroupVariants({ align }), classNames.buttonGroup)}>\n {/* secondary + primary \u59CB\u7EC8\u540C\u884C */}\n <div className=\"lg-desktop:gap-3 flex items-center gap-2\">\n {secondaryButton?.isShowPlayVideoButton && secondaryButton?.playVideoButtonText ? (\n <Button\n onClick={() => setVisible(true)}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-play-video-button\"\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.playVideoButtonText}`}\n >\n {secondaryButton?.playVideoButtonText} <PlayButtonAppendIcon size=\"lg\" />\n </Button>\n ) : secondaryButton?.text ? (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"secondary\"\n className={cn('hero-banner-secondary-button', classNames.secondaryButton)}\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(secondaryButton?.link), `${componentType}_${componentName}`)}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e => {\n if (secondaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(secondaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.text}`}\n >\n {secondaryButton?.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n ) : null}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"primary\"\n className={cn('hero-banner-primary-button', classNames.primaryButton)}\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(primaryButton.link), `${componentType}_${componentName}`)}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e => {\n if (primaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(primaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n primaryButton?.isCustomPrimaryButton &&\n onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${primaryButton?.text}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n {tertiaryButton && tertiaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"link\"\n className={cn('hero-banner-tertiary-button w-auto p-0', classNames.tertiaryButton)}\n as={tertiaryButton?.isCustomTertiaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(tertiaryButton.link), `${componentType}_${componentName}`)}\n target={tertiaryButton?.target}\n rel={\n tertiaryButton?.target === '_blank'\n ? (tertiaryButton?.rel ?? 'noopener noreferrer')\n : tertiaryButton?.rel\n }\n onClick={e => {\n if (tertiaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(tertiaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n tertiaryButton?.isCustomTertiaryButton &&\n onTertiaryClick?.(data, e, tertiaryButton?.customTertiaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${tertiaryButton?.text}`}\n >\n {tertiaryButton.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n )}\n </div>\n <div className={iconGroupVariants({ align })}>\n {safeIconArray?.map(icon => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n </div>\n\n {safeCaption.length > 0 && (\n <div\n className={cn(\n 'hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]',\n classNames.captionGroup\n )}\n >\n {safeCaption.map((c, index) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className={cn(\n 'hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]'\n )}\n html={c.title}\n />\n {index < safeCaption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n\n {/* \u89C6\u9891\u5F39\u7A97 */}\n {visible && (\n <VideoModal\n visible={visible}\n videoUrl={secondaryButton?.isYoutubeVideo ? undefined : secondaryButton?.videoUrl?.url}\n youTubeId={secondaryButton?.isYoutubeVideo ? secondaryButton?.youtubeId : undefined}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n </div>\n )\n }\n)\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withLayout(HeroBanner)\n"],
5
+ "mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAkHM,IAAAI,EAAA,6BAjHNC,EAAwE,oBACxEC,EAAiB,mBACjBC,EAA8B,mCAC9BC,EAAiB,sBAEjBC,EAA8B,4BAC9BC,GAA0B,uCAC1BC,GAA4B,+CAC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iMACAnC,EAAW,YACb,EAEC,SAAAmC,EAAY,IAAI,CAAC2B,EAAGC,OACnB,QAAC,EAAAlE,QAAM,SAAN,CACC,oBAAC,QACC,KAAM,EACN,aAAW,MACT,yIACF,EACA,KAAMiE,EAAE,MACV,EACCC,EAAQ5B,EAAY,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IAR5D2B,EAAE,KASvB,CACD,EACH,EAIDvB,MACC,OAAC,eACC,QAASA,EACT,SAAUb,GAAiB,eAAiB,OAAYA,GAAiB,UAAU,IACnF,UAAWA,GAAiB,eAAiBA,GAAiB,UAAY,OAC1E,aAAc,IAAMc,GAAW,EAAK,EACtC,GAEJ,EACF,CAEJ,CACF,EAEA5C,GAAW,YAAc,aAEzB,IAAO/B,MAAQ,eAAW+B,EAAU",
6
+ "names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_ScrollTrigger", "import_jump", "import_react_responsive", "import_react_intersection_observer", "import_ScrollLoadVideo", "import_components", "import_helpers", "import_class_variance_authority", "import_Styles", "import_useExposure", "import_trackUrlRef", "import_utils", "import_AiuiProvider", "import_button", "import_VideoModal", "import_HeroBannerCarousel", "componentType", "componentName", "contentVariants", "textVariants", "buttonGroupVariants", "iconGroupVariants", "PlayButtonAppendIcon", "size", "width", "height", "HeroBanner", "React", "data", "className", "classNames", "onSecondaryClick", "onPrimaryClick", "onTertiaryClick", "jumpOptions", "rest", "ref", "locale", "mergedJumpOptions", "localizeUrl", "url", "label", "title", "subtitle", "endDate", "endDate_tz", "dateFormat", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "isVideoLoop", "primaryButton", "secondaryButton", "tertiaryButton", "theme", "titleSize", "caption", "blockLink", "iconArray", "align", "enableParallax", "safeCaption", "safeIconArray", "isMobile", "isPad", "visible", "setVisible", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "blockLinkLabel", "resolvedComponentTitle", "resolvedComponentDescription", "gsap", "gsapResize", "clientHeight", "self", "value", "HeroBannerCarousel", "ScrollLoadVideo", "e", "element", "jump", "icon", "c", "index"]
7
7
  }
@@ -8,6 +8,7 @@ interface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {
8
8
  classNames?: Record<string, string>;
9
9
  onPrimaryClick?: (data: any, e: any, id?: string) => void;
10
10
  onSecondaryClick?: (data: any, e: any, id?: string) => void;
11
+ onTertiaryClick?: (data: any, e: any, id?: string) => void;
11
12
  }
12
13
  /**
13
14
  * HeroBannerCarousel — arrows-only Navigation Swiper wrapping HeroBannerSlide units.
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var Q=Object.create;var T=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var X=(a,i)=>{for(var p in i)T(a,p,{get:i[p],enumerable:!0})},V=(a,i,p,b)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of J(i))!U.call(a,d)&&d!==p&&T(a,d,{get:()=>i[d],enumerable:!(b=G(i,d))||b.enumerable});return a};var A=(a,i,p)=>(p=a!=null?Q(K(a)):{},V(i||!a||!a.__esModule?T(p,"default",{value:a,enumerable:!0}):p,a)),Y=a=>V(T({},"__esModule",{value:!0}),a);var oe={};X(oe,{default:()=>ae});module.exports=Y(oe);var e=require("react/jsx-runtime"),o=A(require("react")),_=require("swiper/react"),f=require("swiper/modules"),R=require("react-responsive"),O=A(require("../../helpers/ScrollLoadVideo.js")),m=require("../../helpers/index.js"),r=require("../../components/index.js"),ie=require("swiper/css"),ne=require("swiper/css/navigation"),se=require("swiper/css/pagination");const Z=()=>(0,e.jsxs)("svg",{className:"lg-desktop:size-14 size-10",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M23 13L16 20L23 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),ee=()=>(0,e.jsxs)("svg",{className:"lg-desktop:size-14 size-10",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M17 13L24 20L17 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),te=({data:a,isActive:i,videoRef:p,slideIndex:b,onPrimaryClick:d,onSecondaryClick:E})=>{const{pcVideo:C,padVideo:x,mobileVideo:v,pcImage:k,padImage:y,mobileImage:h,isVideoLoop:I=!0,isShowVideo:S,title:z,subtitle:M,label:B,endDate:w,endDate_tz:j,dateFormat:H,iconArray:u,caption:N,blockLink:P,primaryButton:n,secondaryButton:t,theme:s="light",align:c="left",titleSize:g,size:L="default"}=a,q=(0,R.useMediaQuery)({query:"(max-width: 768px)"}),F=(0,R.useMediaQuery)({query:"(max-width: 1024px)"}),W=q?v?.url||C?.url||"":F?x?.url||C?.url||v?.url||"":C?.url||v?.url||"";return(0,e.jsxs)("div",{"data-ui-component-id":"HeroBannerSlide",className:(0,m.cn)("text-info-primary relative w-full overflow-hidden",s==="dark"?"aiui-dark":"",L==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[P&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:P,tabIndex:-1,"aria-hidden":"true"}),S?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{"data-video-poster":"true",className:"absolute inset-0 size-full transition-opacity duration-500",children:(0,e.jsx)(r.Picture,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:b===0?"eager":"lazy",fetchPriority:b===0?"high":"auto",alt:k?.alt||"",source:`${k?.url||""} , ${y?.url??(h?.url||"")} 1024, ${h?.url||""} 767`})}),(0,e.jsx)(O.default,{videoRef:p,src:W,poster:void 0,className:"absolute inset-0 size-full",videoClassName:"size-full object-cover",muted:!0,loop:I,playsInline:!0,onPlaying:l=>{l.currentTarget.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")}})]}):(0,e.jsx)(r.Picture,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:k?.alt||"",source:`${k?.url||""} , ${y?.url??(h?.url||"")} 1024, ${h?.url||""} 767`}),(0,e.jsxs)("div",{className:(0,m.cn)("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",c==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]"),children:[(0,e.jsxs)("div",{className:(0,m.cn)("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]",c==="center"?"text-center":"laptop:text-left"),children:[B&&(0,e.jsx)(r.Text,{size:2,as:"p",className:(0,m.cn)("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:B}),z&&(0,e.jsx)(r.Heading,{as:g==="4"?"h1":"h2",html:z,size:g?Number(g||"5"):L==="sm"?4:5}),M&&(0,e.jsx)(r.Text,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:M}),w&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(r.Countdown,{endDate:w,endDate_tz:j,dateFormat:H,variant:"spacious",align:c})})]}),(n?.text||t?.text)&&(0,e.jsxs)("div",{className:(0,m.cn)("lg-desktop:gap-3 flex items-center gap-2",c==="center"?"justify-center":"laptop:justify-start"),children:[t?.text&&(0,e.jsx)(r.Button,{size:"lg",variant:"secondary",as:t?.isCustomSecondaryButton?"button":"a",href:t.link,target:t?.target,rel:t?.target==="_blank"?t?.rel??"noopener noreferrer":t?.rel,onClick:l=>t?.isCustomSecondaryButton&&E?.(a,l,t?.customSecondaryEventId),children:t.text}),n?.text&&(0,e.jsx)(r.Button,{size:"lg",variant:"primary",as:n?.isCustomPrimaryButton?"button":"a",href:n.link,target:n?.target,rel:n?.target==="_blank"?n?.rel??"noopener noreferrer":n?.rel,onClick:l=>n?.isCustomPrimaryButton&&d?.(a,l,n?.customPrimaryEventId),children:n.text})]}),u&&u.length>0&&(0,e.jsx)("div",{className:(0,m.cn)("flex items-center gap-2",c==="center"?"justify-center":"justify-start"),children:u.map(l=>(0,e.jsx)("div",{className:"h-12",children:(0,e.jsx)(r.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:l?.pcImage?.alt||"",source:l?.pcImage?.url})},l?.pcImage?.url||l?.pcImage?.alt))})]}),N&&N.length>0&&(0,e.jsx)("div",{className:"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:N.map((l,D)=>(0,e.jsxs)(o.default.Fragment,{children:[(0,e.jsx)(r.Text,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:l.title}),D<N.length-1&&(0,e.jsx)("div",{className:"bg-info-primary w-px"})]},l.title))})]})},$=o.default.forwardRef(({data:a,className:i,classNames:p={},onPrimaryClick:b,onSecondaryClick:d,...E},C)=>{const x=a.items||[],v=a.carousel,k=a.size??"default",y=(0,o.useRef)(null),[h,I]=(0,o.useState)(0),[S,z]=(0,o.useState)(null),B=(x[h]?.theme??"light")==="dark";(0,o.useEffect)(()=>{const t=y.current;!t||!S||t.pagination&&(t.pagination.el=S,t.pagination.init(),t.pagination.render(),t.pagination.update())},[S]);const w=(0,o.useRef)(x.map(()=>o.default.createRef())),j=(v?.showArrows??!0)&&x.length>1,H=v?.showDots??!0,u=v?.autoplaySeconds,N=u!==void 0&&u>0?[f.Navigation,f.Pagination,f.Autoplay]:[f.Navigation,f.Pagination],P=u!==void 0&&u>0?{delay:Math.max(u*1e3,3e3),disableOnInteraction:!1}:!1;(0,o.useEffect)(()=>{w.current.forEach((t,s)=>{s!==0&&t.current&&(t.current.pause(),t.current.currentTime=0)})},[]);const n=(0,o.useCallback)(t=>{const s=t.realIndex;w.current.forEach((g,L)=>{L!==s&&g.current&&(g.current.pause(),g.current.currentTime=0)});const c=w.current[s];c?.current&&c.current.paused&&c.current.play()?.catch(()=>{}),I(s)},[]);return(0,e.jsxs)("div",{ref:C,className:(0,m.cn)("hero-banner-carousel group relative w-full overflow-hidden",k==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",{"aiui-dark":x[h]?.theme==="dark"},i),...E,children:[(0,e.jsx)(_.Swiper,{onSwiper:t=>y.current=t,onSlideChange:n,modules:N,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,autoplay:P,pagination:H?{clickable:!0,el:S,renderBullet:(t,s)=>`<span class="${s} banner-dot"></span>`}:!1,children:x.map((t,s)=>(0,e.jsx)(_.SwiperSlide,{children:({isActive:c})=>(0,e.jsx)(te,{data:t,isActive:c,slideIndex:s,videoRef:w.current[s],onPrimaryClick:b,onSecondaryClick:d})},s))}),j&&(0,e.jsxs)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4",children:[(0,e.jsx)("button",{type:"button",className:"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100",onClick:()=>y.current?.slidePrev(),"aria-label":"Previous banner",children:(0,e.jsx)(Z,{})}),(0,e.jsx)("button",{type:"button",className:"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100",onClick:()=>y.current?.slideNext(),"aria-label":"Next banner",children:(0,e.jsx)(ee,{})})]}),H&&(0,e.jsx)("div",{ref:z,style:{"--swiper-pagination-bottom":"0px"},className:(0,m.cn)("hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100",{"aiui-dark":B})})]})});$.displayName="HeroBannerCarousel";var ae=$;
1
+ "use strict";"use client";var J=Object.create;var L=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var Z=(a,s)=>{for(var p in s)L(a,p,{get:s[p],enumerable:!0})},$=(a,s,p,f)=>{if(s&&typeof s=="object"||typeof s=="function")for(let d of U(s))!Y.call(a,d)&&d!==p&&L(a,d,{get:()=>s[d],enumerable:!(f=K(s,d))||f.enumerable});return a};var O=(a,s,p)=>(p=a!=null?J(X(a)):{},$(s||!a||!a.__esModule?L(p,"default",{value:a,enumerable:!0}):p,a)),ee=a=>$(L({},"__esModule",{value:!0}),a);var oe={};Z(oe,{default:()=>ie});module.exports=ee(oe);var e=require("react/jsx-runtime"),n=O(require("react")),_=require("swiper/react"),g=require("swiper/modules"),D=require("react-responsive"),F=O(require("../../helpers/ScrollLoadVideo.js")),m=require("../../helpers/index.js"),i=require("../../components/index.js"),se=require("swiper/css"),le=require("swiper/css/navigation"),pe=require("swiper/css/pagination");const te=()=>(0,e.jsxs)("svg",{className:"lg-desktop:size-14 size-10",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M23 13L16 20L23 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),ae=()=>(0,e.jsxs)("svg",{className:"lg-desktop:size-14 size-10",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M17 13L24 20L17 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),re=({data:a,isActive:s,videoRef:p,slideIndex:f,onPrimaryClick:d,onSecondaryClick:E,onTertiaryClick:I})=>{const{pcVideo:N,padVideo:b,mobileVideo:y,pcImage:w,padImage:x,mobileImage:v,isVideoLoop:M=!0,isShowVideo:C,title:B,subtitle:j,label:T,endDate:h,endDate_tz:R,dateFormat:H,iconArray:u,caption:S,blockLink:P,primaryButton:l,secondaryButton:t,tertiaryButton:r,theme:k="light",align:c="left",titleSize:z,size:V="default"}=a,W=(0,D.useMediaQuery)({query:"(max-width: 768px)"}),Q=(0,D.useMediaQuery)({query:"(max-width: 1024px)"}),G=W?y?.url||N?.url||"":Q?b?.url||N?.url||y?.url||"":N?.url||y?.url||"";return(0,e.jsxs)("div",{"data-ui-component-id":"HeroBannerSlide",className:(0,m.cn)("text-info-primary relative w-full overflow-hidden",k==="dark"?"aiui-dark":"",V==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[P&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:P,tabIndex:-1,"aria-hidden":"true"}),C?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{"data-video-poster":"true",className:"absolute inset-0 size-full transition-opacity duration-500",children:(0,e.jsx)(i.Picture,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:f===0?"eager":"lazy",fetchPriority:f===0?"high":"auto",alt:w?.alt||"",source:`${w?.url||""} , ${x?.url??(v?.url||"")} 1024, ${v?.url||""} 767`})}),(0,e.jsx)(F.default,{videoRef:p,src:G,poster:void 0,className:"absolute inset-0 size-full",videoClassName:"size-full object-cover",muted:!0,loop:M,playsInline:!0,onPlaying:o=>{o.currentTarget.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")}})]}):(0,e.jsx)(i.Picture,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:w?.alt||"",source:`${w?.url||""} , ${x?.url??(v?.url||"")} 1024, ${v?.url||""} 767`}),(0,e.jsxs)("div",{className:(0,m.cn)("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",c==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]"),children:[(0,e.jsxs)("div",{className:(0,m.cn)("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]",c==="center"?"text-center":"laptop:text-left"),children:[T&&(0,e.jsx)(i.Text,{size:2,as:"p",className:(0,m.cn)("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:T}),B&&(0,e.jsx)(i.Heading,{as:z==="4"?"h1":"h2",html:B,size:z?Number(z||"5"):V==="sm"?4:5}),j&&(0,e.jsx)(i.Text,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:j}),h&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(i.Countdown,{endDate:h,endDate_tz:R,dateFormat:H,variant:"spacious",align:c})})]}),(l?.text||t?.text||r?.text)&&(0,e.jsxs)("div",{className:(0,m.cn)("lg-desktop:gap-3 flex flex-wrap items-center gap-2",c==="center"?"justify-center":"laptop:justify-start"),children:[t?.text&&(0,e.jsx)(i.Button,{size:"lg",variant:"secondary",as:t?.isCustomSecondaryButton?"button":"a",href:t.link,target:t?.target,rel:t?.target==="_blank"?t?.rel??"noopener noreferrer":t?.rel,onClick:o=>t?.isCustomSecondaryButton&&E?.(a,o,t?.customSecondaryEventId),children:t.text}),l?.text&&(0,e.jsx)(i.Button,{size:"lg",variant:"primary",as:l?.isCustomPrimaryButton?"button":"a",href:l.link,target:l?.target,rel:l?.target==="_blank"?l?.rel??"noopener noreferrer":l?.rel,onClick:o=>l?.isCustomPrimaryButton&&d?.(a,o,l?.customPrimaryEventId),children:l.text}),r?.text&&(0,e.jsx)(i.Button,{size:"lg",variant:"link",className:"tablet:basis-auto basis-full",as:r?.isCustomTertiaryButton?"button":"a",href:r.link,target:r?.target,rel:r?.target==="_blank"?r?.rel??"noopener noreferrer":r?.rel,onClick:o=>r?.isCustomTertiaryButton&&I?.(a,o,r?.customTertiaryEventId),children:r.text})]}),u&&u.length>0&&(0,e.jsx)("div",{className:(0,m.cn)("flex items-center gap-2",c==="center"?"justify-center":"justify-start"),children:u.map(o=>(0,e.jsx)("div",{className:"h-12",children:(0,e.jsx)(i.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:o?.pcImage?.alt||"",source:o?.pcImage?.url})},o?.pcImage?.url||o?.pcImage?.alt))})]}),S&&S.length>0&&(0,e.jsx)("div",{className:"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:S.map((o,A)=>(0,e.jsxs)(n.default.Fragment,{children:[(0,e.jsx)(i.Text,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:o.title}),A<S.length-1&&(0,e.jsx)("div",{className:"bg-info-primary w-px"})]},o.title))})]})},q=n.default.forwardRef(({data:a,className:s,classNames:p={},onPrimaryClick:f,onSecondaryClick:d,onTertiaryClick:E,...I},N)=>{const b=a.items||[],y=a.carousel,w=a.size??"default",x=(0,n.useRef)(null),[v,M]=(0,n.useState)(0),[C,B]=(0,n.useState)(null),T=(b[v]?.theme??"light")==="dark";(0,n.useEffect)(()=>{const t=x.current;!t||!C||t.pagination&&(t.pagination.el=C,t.pagination.init(),t.pagination.render(),t.pagination.update())},[C]);const h=(0,n.useRef)(b.map(()=>n.default.createRef())),R=(y?.showArrows??!0)&&b.length>1,H=y?.showDots??!0,u=y?.autoplaySeconds,S=u!==void 0&&u>0?[g.Navigation,g.Pagination,g.Autoplay]:[g.Navigation,g.Pagination],P=u!==void 0&&u>0?{delay:Math.max(u*1e3,3e3),disableOnInteraction:!1}:!1;(0,n.useEffect)(()=>{h.current.forEach((t,r)=>{r!==0&&t.current&&(t.current.pause(),t.current.currentTime=0)})},[]);const l=(0,n.useCallback)(t=>{const r=t.realIndex;h.current.forEach((c,z)=>{z!==r&&c.current&&(c.current.pause(),c.current.currentTime=0)});const k=h.current[r];k?.current&&k.current.paused&&k.current.play()?.catch(()=>{}),M(r)},[]);return(0,e.jsxs)("div",{ref:N,className:(0,m.cn)("hero-banner-carousel group relative w-full overflow-hidden",w==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",{"aiui-dark":b[v]?.theme==="dark"},s),...I,children:[(0,e.jsx)(_.Swiper,{onSwiper:t=>x.current=t,onSlideChange:l,modules:S,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,autoplay:P,pagination:H?{clickable:!0,el:C,renderBullet:(t,r)=>`<span class="${r} banner-dot"></span>`}:!1,children:b.map((t,r)=>(0,e.jsx)(_.SwiperSlide,{children:({isActive:k})=>(0,e.jsx)(re,{data:t,isActive:k,slideIndex:r,videoRef:h.current[r],onPrimaryClick:f,onSecondaryClick:d,onTertiaryClick:E})},r))}),R&&(0,e.jsxs)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4",children:[(0,e.jsx)("button",{type:"button",className:"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100",onClick:()=>x.current?.slidePrev(),"aria-label":"Previous banner",children:(0,e.jsx)(te,{})}),(0,e.jsx)("button",{type:"button",className:"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100",onClick:()=>x.current?.slideNext(),"aria-label":"Next banner",children:(0,e.jsx)(ae,{})})]}),H&&(0,e.jsx)("div",{ref:B,style:{"--swiper-pagination-bottom":"0px"},className:(0,m.cn)("hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100",{"aiui-dark":T})})]})});q.displayName="HeroBannerCarousel";var ie=q;
2
2
  //# sourceMappingURL=HeroBannerCarousel.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/HeroBannerCarousel.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useRef, useEffect, useCallback, useState } from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, Pagination, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { useMediaQuery } from 'react-responsive'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { cn } from '../../helpers/index.js'\nimport type { HeroBannerProps, HeroBannerSlideData } from './types.js'\nimport { Button, Heading, Text, Countdown, Picture } from '../../components/index.js'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\n\n// \u2500\u2500 Arrow icons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst ChevronLeft = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M23 13L16 20L23 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M17 13L24 20L17 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\n// \u2500\u2500 HeroBannerSlide \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Minimal per-slide content unit. No GSAP, no withLayout, no useExposure.\n// videoRef is the imperative pause/play channel (DECISION-A003).\n\ninterface HeroBannerSlideProps {\n data: HeroBannerSlideData\n isActive: boolean\n videoRef: React.RefObject<HTMLVideoElement>\n slideIndex: number\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n}\n\nconst HeroBannerSlide = ({\n data,\n isActive: _isActive,\n videoRef,\n slideIndex,\n onPrimaryClick,\n onSecondaryClick,\n}: HeroBannerSlideProps) => {\n const {\n pcVideo,\n padVideo,\n mobileVideo,\n pcImage,\n padImage,\n mobileImage,\n isVideoLoop = true,\n isShowVideo,\n title,\n subtitle,\n label,\n endDate,\n endDate_tz,\n dateFormat,\n iconArray,\n caption,\n blockLink,\n primaryButton,\n secondaryButton,\n theme = 'light',\n align = 'left',\n titleSize,\n size = 'default',\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const videoSrc = isMobile\n ? mobileVideo?.url || pcVideo?.url || ''\n : isPad\n ? padVideo?.url || pcVideo?.url || mobileVideo?.url || ''\n : pcVideo?.url || mobileVideo?.url || ''\n\n return (\n <div\n data-ui-component-id=\"HeroBannerSlide\"\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n theme === 'dark' ? 'aiui-dark' : '',\n size === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]'\n )}\n >\n {blockLink && <a className=\"absolute inset-0 z-10\" href={blockLink} tabIndex={-1} aria-hidden=\"true\"></a>}\n {isShowVideo ? (\n <>\n {/* Poster cover layer: slide 0 = eager+high, others = lazy+auto */}\n <div data-video-poster=\"true\" className=\"absolute inset-0 size-full transition-opacity duration-500\">\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading={slideIndex === 0 ? 'eager' : 'lazy'}\n fetchPriority={slideIndex === 0 ? 'high' : 'auto'}\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order */}\n <ScrollLoadVideo\n videoRef={videoRef}\n src={videoSrc}\n poster={undefined}\n className=\"absolute inset-0 size-full\"\n videoClassName=\"size-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const slide = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBannerSlide\"]')\n slide?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n\n {/* Content Overlay */}\n <div\n className={cn(\n 'laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n align === 'center'\n ? 'left-1/2 -translate-x-1/2 items-center text-center'\n : 'tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]'\n )}\n >\n <div\n className={cn(\n 'tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]',\n align === 'center' ? 'text-center' : 'laptop:text-left'\n )}\n >\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className=\"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm\"\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n\n {(primaryButton?.text || secondaryButton?.text) && (\n <div\n className={cn(\n 'lg-desktop:gap-3 flex items-center gap-2',\n align === 'center' ? 'justify-center' : 'laptop:justify-start'\n )}\n >\n {secondaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"secondary\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={secondaryButton.link}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e =>\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }\n >\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"primary\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={primaryButton.link}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e =>\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n )}\n {iconArray && iconArray.length > 0 && (\n <div className={cn('flex items-center gap-2', align === 'center' ? 'justify-center' : 'justify-start')}>\n {iconArray.map((icon: any) => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n )}\n </div>\n\n {caption && caption.length > 0 && (\n <div className=\"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c: { title: string }, index: number) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className=\"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]\"\n html={c.title}\n />\n {index < caption.length - 1 && <div className=\"bg-info-primary w-px\" />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 HeroBannerCarousel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {\n data: HeroBannerProps['data']\n classNames?: Record<string, string>\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n}\n\n/**\n * HeroBannerCarousel \u2014 arrows-only Navigation Swiper wrapping HeroBannerSlide units.\n *\n * Architecture:\n * - DECISION-A007: Navigation only, loop=false, slidesPerView=1\n * - DECISION-A003: ScrollLoadVideo videoRef as imperative pause channel\n * - DECISION-A010: initial activeIndex=0; useEffect pauses slides 1..N on mount\n * - DECISION-A006: arrow buttons at z-[20], above blockLink overlay z-10\n * - ISSUE-017: post-mount pause wins over IO rootMargin='200px' race\n */\nconst HeroBannerCarousel = React.forwardRef<HTMLDivElement, HeroBannerCarouselProps>(\n (\n {\n data,\n className,\n classNames: _classNames = {},\n onPrimaryClick: _onPrimaryClick,\n onSecondaryClick: _onSecondaryClick,\n ...rest\n },\n ref\n ) => {\n const items = data.items || []\n const carousel = data.carousel\n const containerSize = data.size ?? 'default'\n\n const swiperRef = useRef<SwiperType | null>(null)\n const [activeIndex, setActiveIndex] = useState(0)\n const [paginationEl, setPaginationEl] = useState<HTMLDivElement | null>(null)\n\n const activeTheme = items[activeIndex]?.theme ?? 'light'\n const isDark = activeTheme === 'dark'\n\n useEffect(() => {\n const swiper = swiperRef.current\n if (!swiper || !paginationEl) return\n if (swiper.pagination) {\n swiper.pagination.el = paginationEl\n swiper.pagination.init()\n swiper.pagination.render()\n swiper.pagination.update()\n }\n }, [paginationEl])\n\n const videoRefs = useRef<React.RefObject<HTMLVideoElement>[]>(items.map(() => React.createRef<HTMLVideoElement>()))\n\n const showArrowControls = (carousel?.showArrows ?? true) && items.length > 1\n const showDots = carousel?.showDots ?? true\n\n const autoplaySeconds = carousel?.autoplaySeconds\n const swiperModules =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? [Navigation, Pagination, Autoplay]\n : [Navigation, Pagination]\n const autoplayConfig =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? { delay: Math.max(autoplaySeconds * 1000, 3000), disableOnInteraction: false }\n : false\n\n useEffect(() => {\n videoRefs.current.forEach((vRef, i) => {\n if (i !== 0 && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n }, [])\n\n const handleSlideChange = useCallback((swiper: SwiperType) => {\n const newIndex = swiper.realIndex\n videoRefs.current.forEach((vRef, i) => {\n if (i !== newIndex && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n const incoming = videoRefs.current[newIndex]\n if (incoming?.current && incoming.current.paused) {\n const p = incoming.current.play()\n p?.catch(() => {})\n }\n setActiveIndex(newIndex)\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'hero-banner-carousel group relative w-full overflow-hidden',\n containerSize === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]',\n { 'aiui-dark': items[activeIndex]?.theme === 'dark' },\n className\n )}\n {...rest}\n >\n <Swiper\n onSwiper={s => (swiperRef.current = s)}\n onSlideChange={handleSlideChange}\n modules={swiperModules}\n slidesPerView={1}\n loop={true}\n initialSlide={0}\n allowTouchMove={true}\n autoplay={autoplayConfig}\n pagination={\n showDots\n ? {\n clickable: true,\n el: paginationEl,\n renderBullet: (_index: number, className: string) => `<span class=\"${className} banner-dot\"></span>`,\n }\n : false\n }\n >\n {items.map((slideData, index) => (\n <SwiperSlide key={index}>\n {({ isActive }) => (\n <HeroBannerSlide\n data={slideData}\n isActive={isActive}\n slideIndex={index}\n videoRef={videoRefs.current[index]}\n onPrimaryClick={_onPrimaryClick}\n onSecondaryClick={_onSecondaryClick}\n />\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n\n {showArrowControls && (\n <div className=\"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4\">\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous banner\"\n >\n <ChevronLeft />\n </button>\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next banner\"\n >\n <ChevronRight />\n </button>\n </div>\n )}\n\n {showDots && (\n <div\n ref={setPaginationEl}\n style={{ '--swiper-pagination-bottom': '0px' } as React.CSSProperties}\n className={cn(\n 'hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100',\n { 'aiui-dark': isDark }\n )}\n />\n )}\n </div>\n )\n }\n)\n\nHeroBannerCarousel.displayName = 'HeroBannerCarousel'\n\nexport default HeroBannerCarousel\n"],
5
- "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,EAAAH,IAkBE,IAAAI,EAAA,6BAjBFC,EAAgE,oBAChEA,EAAoC,wBACpCC,EAAiD,0BAEjDC,EAA8B,4BAC9BC,EAA4B,+CAC5BC,EAAmB,kCAEnBC,EAA0D,qCAE1DC,GAAO,sBACPC,GAAO,iCACPC,GAAO,iCAIP,MAAMC,EAAc,OAClB,QAAC,OACC,UAAU,6BACV,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,cAAY,OAEZ,oBAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAK,eAAe,YAAY,MAAM,KACrE,OAAC,QAAK,EAAE,qBAAqB,OAAO,QAAQ,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,GAC3G,EAGIC,GAAe,OACnB,QAAC,OAC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T,uqBACA,CAAE,YAAaC,CAAO,CACxB,EACF,GAEJ,CAEJ,CACF,EAEAf,EAAmB,YAAc,qBAEjC,IAAOrD,GAAQqD",
6
- "names": ["HeroBannerCarousel_exports", "__export", "HeroBannerCarousel_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_react_responsive", "import_ScrollLoadVideo", "import_helpers", "import_components", "import_css", "import_navigation", "import_pagination", "ChevronLeft", "ChevronRight", "HeroBannerSlide", "data", "_isActive", "videoRef", "slideIndex", "onPrimaryClick", "onSecondaryClick", "pcVideo", "padVideo", "mobileVideo", "pcImage", "padImage", "mobileImage", "isVideoLoop", "isShowVideo", "title", "subtitle", "label", "endDate", "endDate_tz", "dateFormat", "iconArray", "caption", "blockLink", "primaryButton", "secondaryButton", "theme", "align", "titleSize", "size", "isMobile", "isPad", "videoSrc", "ScrollLoadVideo", "e", "icon", "c", "index", "React", "HeroBannerCarousel", "className", "_classNames", "_onPrimaryClick", "_onSecondaryClick", "rest", "ref", "items", "carousel", "containerSize", "swiperRef", "activeIndex", "setActiveIndex", "paginationEl", "setPaginationEl", "isDark", "swiper", "videoRefs", "showArrowControls", "showDots", "autoplaySeconds", "swiperModules", "autoplayConfig", "vRef", "i", "handleSlideChange", "newIndex", "incoming", "s", "_index", "slideData", "isActive"]
4
+ "sourcesContent": ["'use client'\nimport React, { useRef, useEffect, useCallback, useState } from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, Pagination, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { useMediaQuery } from 'react-responsive'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { cn } from '../../helpers/index.js'\nimport type { HeroBannerProps, HeroBannerSlideData } from './types.js'\nimport { Button, Heading, Text, Countdown, Picture } from '../../components/index.js'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\n\n// \u2500\u2500 Arrow icons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst ChevronLeft = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M23 13L16 20L23 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M17 13L24 20L17 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\n// \u2500\u2500 HeroBannerSlide \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Minimal per-slide content unit. No GSAP, no withLayout, no useExposure.\n// videoRef is the imperative pause/play channel (DECISION-A003).\n\ninterface HeroBannerSlideProps {\n data: HeroBannerSlideData\n isActive: boolean\n videoRef: React.RefObject<HTMLVideoElement>\n slideIndex: number\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n onTertiaryClick?: (data: any, e: any, id?: string) => void\n}\n\nconst HeroBannerSlide = ({\n data,\n isActive: _isActive,\n videoRef,\n slideIndex,\n onPrimaryClick,\n onSecondaryClick,\n onTertiaryClick,\n}: HeroBannerSlideProps) => {\n const {\n pcVideo,\n padVideo,\n mobileVideo,\n pcImage,\n padImage,\n mobileImage,\n isVideoLoop = true,\n isShowVideo,\n title,\n subtitle,\n label,\n endDate,\n endDate_tz,\n dateFormat,\n iconArray,\n caption,\n blockLink,\n primaryButton,\n secondaryButton,\n tertiaryButton,\n theme = 'light',\n align = 'left',\n titleSize,\n size = 'default',\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const videoSrc = isMobile\n ? mobileVideo?.url || pcVideo?.url || ''\n : isPad\n ? padVideo?.url || pcVideo?.url || mobileVideo?.url || ''\n : pcVideo?.url || mobileVideo?.url || ''\n\n return (\n <div\n data-ui-component-id=\"HeroBannerSlide\"\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n theme === 'dark' ? 'aiui-dark' : '',\n size === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]'\n )}\n >\n {blockLink && <a className=\"absolute inset-0 z-10\" href={blockLink} tabIndex={-1} aria-hidden=\"true\"></a>}\n {isShowVideo ? (\n <>\n {/* Poster cover layer: slide 0 = eager+high, others = lazy+auto */}\n <div data-video-poster=\"true\" className=\"absolute inset-0 size-full transition-opacity duration-500\">\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading={slideIndex === 0 ? 'eager' : 'lazy'}\n fetchPriority={slideIndex === 0 ? 'high' : 'auto'}\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order */}\n <ScrollLoadVideo\n videoRef={videoRef}\n src={videoSrc}\n poster={undefined}\n className=\"absolute inset-0 size-full\"\n videoClassName=\"size-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const slide = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBannerSlide\"]')\n slide?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n\n {/* Content Overlay */}\n <div\n className={cn(\n 'laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n align === 'center'\n ? 'left-1/2 -translate-x-1/2 items-center text-center'\n : 'tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]'\n )}\n >\n <div\n className={cn(\n 'tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]',\n align === 'center' ? 'text-center' : 'laptop:text-left'\n )}\n >\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className=\"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm\"\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n\n {(primaryButton?.text || secondaryButton?.text || tertiaryButton?.text) && (\n <div\n className={cn(\n 'lg-desktop:gap-3 flex flex-wrap items-center gap-2',\n align === 'center' ? 'justify-center' : 'laptop:justify-start'\n )}\n >\n {secondaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"secondary\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={secondaryButton.link}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e =>\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }\n >\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"primary\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={primaryButton.link}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e =>\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }\n >\n {primaryButton.text}\n </Button>\n )}\n {tertiaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"link\"\n className=\"tablet:basis-auto basis-full\"\n as={tertiaryButton?.isCustomTertiaryButton ? 'button' : 'a'}\n href={tertiaryButton.link}\n target={tertiaryButton?.target}\n rel={\n tertiaryButton?.target === '_blank'\n ? (tertiaryButton?.rel ?? 'noopener noreferrer')\n : tertiaryButton?.rel\n }\n onClick={e =>\n tertiaryButton?.isCustomTertiaryButton &&\n onTertiaryClick?.(data, e, tertiaryButton?.customTertiaryEventId)\n }\n >\n {tertiaryButton.text}\n </Button>\n )}\n </div>\n )}\n {iconArray && iconArray.length > 0 && (\n <div className={cn('flex items-center gap-2', align === 'center' ? 'justify-center' : 'justify-start')}>\n {iconArray.map((icon: any) => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n )}\n </div>\n\n {caption && caption.length > 0 && (\n <div className=\"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c: { title: string }, index: number) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className=\"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]\"\n html={c.title}\n />\n {index < caption.length - 1 && <div className=\"bg-info-primary w-px\" />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 HeroBannerCarousel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {\n data: HeroBannerProps['data']\n classNames?: Record<string, string>\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n onTertiaryClick?: (data: any, e: any, id?: string) => void\n}\n\n/**\n * HeroBannerCarousel \u2014 arrows-only Navigation Swiper wrapping HeroBannerSlide units.\n *\n * Architecture:\n * - DECISION-A007: Navigation only, loop=false, slidesPerView=1\n * - DECISION-A003: ScrollLoadVideo videoRef as imperative pause channel\n * - DECISION-A010: initial activeIndex=0; useEffect pauses slides 1..N on mount\n * - DECISION-A006: arrow buttons at z-[20], above blockLink overlay z-10\n * - ISSUE-017: post-mount pause wins over IO rootMargin='200px' race\n */\nconst HeroBannerCarousel = React.forwardRef<HTMLDivElement, HeroBannerCarouselProps>(\n (\n {\n data,\n className,\n classNames: _classNames = {},\n onPrimaryClick: _onPrimaryClick,\n onSecondaryClick: _onSecondaryClick,\n onTertiaryClick: _onTertiaryClick,\n ...rest\n },\n ref\n ) => {\n const items = data.items || []\n const carousel = data.carousel\n const containerSize = data.size ?? 'default'\n\n const swiperRef = useRef<SwiperType | null>(null)\n const [activeIndex, setActiveIndex] = useState(0)\n const [paginationEl, setPaginationEl] = useState<HTMLDivElement | null>(null)\n\n const activeTheme = items[activeIndex]?.theme ?? 'light'\n const isDark = activeTheme === 'dark'\n\n useEffect(() => {\n const swiper = swiperRef.current\n if (!swiper || !paginationEl) return\n if (swiper.pagination) {\n swiper.pagination.el = paginationEl\n swiper.pagination.init()\n swiper.pagination.render()\n swiper.pagination.update()\n }\n }, [paginationEl])\n\n const videoRefs = useRef<React.RefObject<HTMLVideoElement>[]>(items.map(() => React.createRef<HTMLVideoElement>()))\n\n const showArrowControls = (carousel?.showArrows ?? true) && items.length > 1\n const showDots = carousel?.showDots ?? true\n\n const autoplaySeconds = carousel?.autoplaySeconds\n const swiperModules =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? [Navigation, Pagination, Autoplay]\n : [Navigation, Pagination]\n const autoplayConfig =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? { delay: Math.max(autoplaySeconds * 1000, 3000), disableOnInteraction: false }\n : false\n\n useEffect(() => {\n videoRefs.current.forEach((vRef, i) => {\n if (i !== 0 && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n }, [])\n\n const handleSlideChange = useCallback((swiper: SwiperType) => {\n const newIndex = swiper.realIndex\n videoRefs.current.forEach((vRef, i) => {\n if (i !== newIndex && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n const incoming = videoRefs.current[newIndex]\n if (incoming?.current && incoming.current.paused) {\n const p = incoming.current.play()\n p?.catch(() => {})\n }\n setActiveIndex(newIndex)\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'hero-banner-carousel group relative w-full overflow-hidden',\n containerSize === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]',\n { 'aiui-dark': items[activeIndex]?.theme === 'dark' },\n className\n )}\n {...rest}\n >\n <Swiper\n onSwiper={s => (swiperRef.current = s)}\n onSlideChange={handleSlideChange}\n modules={swiperModules}\n slidesPerView={1}\n loop={true}\n initialSlide={0}\n allowTouchMove={true}\n autoplay={autoplayConfig}\n pagination={\n showDots\n ? {\n clickable: true,\n el: paginationEl,\n renderBullet: (_index: number, className: string) => `<span class=\"${className} banner-dot\"></span>`,\n }\n : false\n }\n >\n {items.map((slideData, index) => (\n <SwiperSlide key={index}>\n {({ isActive }) => (\n <HeroBannerSlide\n data={slideData}\n isActive={isActive}\n slideIndex={index}\n videoRef={videoRefs.current[index]}\n onPrimaryClick={_onPrimaryClick}\n onSecondaryClick={_onSecondaryClick}\n onTertiaryClick={_onTertiaryClick}\n />\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n\n {showArrowControls && (\n <div className=\"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4\">\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous banner\"\n >\n <ChevronLeft />\n </button>\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next banner\"\n >\n <ChevronRight />\n </button>\n </div>\n )}\n\n {showDots && (\n <div\n ref={setPaginationEl}\n style={{ '--swiper-pagination-bottom': '0px' } as React.CSSProperties}\n className={cn(\n 'hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100',\n { 'aiui-dark': isDark }\n )}\n />\n )}\n </div>\n )\n }\n)\n\nHeroBannerCarousel.displayName = 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ACC,IAAKpB,EACL,aAAW,MACT,6DACAG,IAAkB,UACd,2HACA,2HACJ,CAAE,YAAaF,EAAMI,CAAW,GAAG,QAAU,MAAO,EACpDX,CACF,EACC,GAAGK,EAEJ,oBAAC,UACC,SAAUuB,GAAMlB,EAAU,QAAUkB,EACpC,cAAeH,EACf,QAASJ,EACT,cAAe,EACf,KAAM,GACN,aAAc,EACd,eAAgB,GAChB,SAAUC,EACV,WACEH,EACI,CACE,UAAW,GACX,GAAIN,EACJ,aAAc,CAACgB,EAAgB7B,IAAsB,gBAAgBA,CAAS,sBAChF,EACA,GAGL,SAAAO,EAAM,IAAI,CAACuB,EAAWjC,OACrB,OAAC,eACE,UAAC,CAAE,SAAAkC,CAAS,OACX,OAACzE,GAAA,CACC,KAAMwE,EACN,SAAUC,EACV,WAAYlC,EACZ,SAAUoB,EAAU,QAAQpB,CAAK,EACjC,eAAgBK,EAChB,iBAAkBC,EAClB,gBAAiBC,EACnB,GAVcP,CAYlB,CACD,EACH,EAECqB,MACC,QAAC,OAAI,UAAU,mFACb,oBAAC,UACC,KAAK,SACL,UAAU,+QACV,QAAS,IAAMR,EAAU,SAAS,UAAU,EAC5C,aAAW,kBAEX,mBAACtD,GAAA,EAAY,EACf,KACA,OAAC,UACC,KAAK,SACL,UAAU,+QACV,QAAS,IAAMsD,EAAU,SAAS,UAAU,EAC5C,aAAW,cAEX,mBAACrD,GAAA,EAAa,EAChB,GACF,EAGD8D,MACC,OAAC,OACC,IAAKL,EACL,MAAO,CAAE,6BAA8B,KAAM,EAC7C,aAAW,MACT,uqBACA,CAAE,YAAaC,CAAO,CACxB,EACF,GAEJ,CAEJ,CACF,EAEAhB,EAAmB,YAAc,qBAEjC,IAAOvD,GAAQuD",
6
+ "names": ["HeroBannerCarousel_exports", "__export", "HeroBannerCarousel_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_react_responsive", "import_ScrollLoadVideo", "import_helpers", "import_components", "import_css", "import_navigation", "import_pagination", "ChevronLeft", "ChevronRight", "HeroBannerSlide", "data", "_isActive", "videoRef", "slideIndex", "onPrimaryClick", "onSecondaryClick", "onTertiaryClick", "pcVideo", "padVideo", "mobileVideo", "pcImage", "padImage", "mobileImage", "isVideoLoop", "isShowVideo", "title", "subtitle", "label", "endDate", "endDate_tz", "dateFormat", "iconArray", "caption", "blockLink", "primaryButton", "secondaryButton", "tertiaryButton", "theme", "align", "titleSize", "size", "isMobile", "isPad", "videoSrc", "ScrollLoadVideo", "e", "icon", "c", "index", "React", "HeroBannerCarousel", "className", "_classNames", "_onPrimaryClick", "_onSecondaryClick", "_onTertiaryClick", "rest", "ref", "items", "carousel", "containerSize", "swiperRef", "activeIndex", "setActiveIndex", "paginationEl", "setPaginationEl", "isDark", "swiper", "videoRefs", "showArrowControls", "showDots", "autoplaySeconds", "swiperModules", "autoplayConfig", "vRef", "i", "handleSlideChange", "newIndex", "incoming", "s", "_index", "slideData", "isActive"]
7
7
  }
@@ -55,6 +55,12 @@ export interface HeroBannerSlideData {
55
55
  isCustomSecondaryButton?: boolean;
56
56
  customSecondaryEventId?: string;
57
57
  } & Omit<ButtonProps, 'children'>;
58
+ tertiaryButton?: {
59
+ text: string;
60
+ link?: string;
61
+ isCustomTertiaryButton?: boolean;
62
+ customTertiaryEventId?: string;
63
+ } & Omit<ButtonProps, 'children'>;
58
64
  theme?: Theme;
59
65
  size?: 'default' | 'sm';
60
66
  titleSize?: TitleSizeType;
@@ -111,6 +117,14 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
111
117
  /** 自定义事件ID,传递给 onSecondaryClick */
112
118
  customSecondaryEventId?: string;
113
119
  } & Omit<ButtonProps, 'children'>;
120
+ /** 第三按钮文本和配置 */
121
+ tertiaryButton?: {
122
+ text: string;
123
+ link?: string;
124
+ isCustomTertiaryButton?: boolean;
125
+ /** 自定义事件ID,传递给 onTertiaryClick */
126
+ customTertiaryEventId?: string;
127
+ } & Omit<ButtonProps, 'children'>;
114
128
  /** 主题 */
115
129
  theme?: Theme;
116
130
  /** 大小, 默认default,单banner, 可选sm, 用于多banner场景 */
@@ -141,5 +155,6 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
141
155
  };
142
156
  onSecondaryClick?: (data: any, e: any, customPrimaryEventId?: string) => void;
143
157
  onPrimaryClick?: (data: any, e: any, customSecondaryEventId?: string) => void;
158
+ onTertiaryClick?: (data: any, e: any, customTertiaryEventId?: string) => void;
144
159
  }
145
160
  export {};
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of s(e))!l.call(t,o)&&o!==a&&n(t,o,{get:()=>e[o],enumerable:!(i=r(e,o))||i.enumerable});return t};var m=t=>d(n({},"__esModule",{value:!0}),t);var u={};module.exports=m(u);
1
+ "use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of s(t))!l.call(e,o)&&o!==r&&n(e,o,{get:()=>t[o],enumerable:!(i=a(t,o))||i.enumerable});return e};var m=e=>d(n({},"__esModule",{value:!0}),e);var u={};module.exports=m(u);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/types.ts"],
4
- "sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Media, Theme } from '../../types/props.js'\n\ntype TitleSizeType = '5' | '4' | '3' | '2' | '1'\n\n/**\n * Carousel navigation configuration for HeroBanner. v1: arrows only.\n * autoplay, dots, and progress are intentionally EXCLUDED from v1.\n */\nexport interface HeroBannerCarouselConfig {\n /**\n * Show prev/next arrow navigation controls.\n * Only used when data.items has 2+ slides.\n * @default true\n */\n showArrows?: boolean\n showDots?: boolean\n loop?: boolean\n autoplaySeconds?: number\n}\n\n/**\n * Per-slide data for HeroBanner carousel mode.\n * Mirrors the single-banner data shape; no nested carousels allowed in v1.\n */\nexport interface HeroBannerSlideData {\n // \u2500\u2500 Required (same constraints as single-banner) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n title: string\n subtitle: string\n pcImage: Media\n mobileImage: Media\n\n // \u2500\u2500 Optional (all existing HeroBannerData optionals carried over) \u2500\u2500\u2500\u2500\u2500\n label?: string\n endDate?: string\n endDate_tz?: string\n dateFormat?: string\n iconArray?: Array<any>\n padImage?: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n isVideoLoop?: boolean\n blockLink?: string\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n theme?: Theme\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n align?: 'left' | 'center'\n caption?: Array<{ title: string }>\n}\n\nexport interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n data: {\n /** \u6807\u7B7E */\n label?: string\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n /** \u7ED3\u675F\u65F6\u95F4\uFF08ISO \u5B57\u7B26\u4E32\uFF09 */\n endDate?: string\n /** \u7ED3\u675F\u65F6\u95F4\u65F6\u533A\uFF08\u5982: America/Los_Angeles\uFF09 */\n endDate_tz?: string\n dateFormat?: string\n /** \u56FE\u6807\u5217\u8868 */\n iconArray?: Array<any>\n pcImage: Media\n padImage?: Media\n mobileImage: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n /** \u89C6\u9891\u662F\u5426\u5FAA\u73AF\u64AD\u653E */\n isVideoLoop?: boolean\n blockLink?: string\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onPrimaryClick */\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n /** \u662F\u5426\u4E3AYouTube\u89C6\u9891\uFF0Ctrue\u65F6\u64AD\u653EYouTube\u89C6\u9891\uFF08\u9700\u8981youtubeId\uFF09\uFF0Cfalse\u65F6\u64AD\u653E\u539F\u751Fvideo\uFF08\u9700\u8981isShowPlayVideoButton\u4E3Atrue\u4E14videoUrl.url\u5B58\u5728\uFF09 */\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onSecondaryClick */\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5927\u5C0F, \u9ED8\u8BA4default,\u5355banner, \u53EF\u9009sm, \u7528\u4E8E\u591Abanner\u573A\u666F */\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n /** \u5185\u5BB9\u5BF9\u9F50\u65B9\u5F0F */\n align?: 'left' | 'center'\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n caption?: Array<{\n title: string\n }>\n /**\n * Carousel slide items. When present and non-empty, activates carousel mode.\n * Single-banner mode is used when this field is absent or empty.\n * DECISION-002: items absence = legacy single-banner path.\n */\n items?: HeroBannerSlideData[]\n /**\n * Carousel navigation configuration.\n * Only meaningful when data.items is present and has 2+ items.\n */\n carousel?: HeroBannerCarouselConfig\n /**\n * Enable parallax scrolling animation.\n * @default true\n */\n enableParallax?: boolean\n }\n onSecondaryClick?: (data: any, e: any, customPrimaryEventId?: string) => void\n onPrimaryClick?: (data: any, e: any, customSecondaryEventId?: string) => void\n}\n"],
4
+ "sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Media, Theme } from '../../types/props.js'\n\ntype TitleSizeType = '5' | '4' | '3' | '2' | '1'\n\n/**\n * Carousel navigation configuration for HeroBanner. v1: arrows only.\n * autoplay, dots, and progress are intentionally EXCLUDED from v1.\n */\nexport interface HeroBannerCarouselConfig {\n /**\n * Show prev/next arrow navigation controls.\n * Only used when data.items has 2+ slides.\n * @default true\n */\n showArrows?: boolean\n showDots?: boolean\n loop?: boolean\n autoplaySeconds?: number\n}\n\n/**\n * Per-slide data for HeroBanner carousel mode.\n * Mirrors the single-banner data shape; no nested carousels allowed in v1.\n */\nexport interface HeroBannerSlideData {\n // \u2500\u2500 Required (same constraints as single-banner) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n title: string\n subtitle: string\n pcImage: Media\n mobileImage: Media\n\n // \u2500\u2500 Optional (all existing HeroBannerData optionals carried over) \u2500\u2500\u2500\u2500\u2500\n label?: string\n endDate?: string\n endDate_tz?: string\n dateFormat?: string\n iconArray?: Array<any>\n padImage?: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n isVideoLoop?: boolean\n blockLink?: string\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n tertiaryButton?: {\n text: string\n link?: string\n isCustomTertiaryButton?: boolean\n customTertiaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n theme?: Theme\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n align?: 'left' | 'center'\n caption?: Array<{ title: string }>\n}\n\nexport interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n data: {\n /** \u6807\u7B7E */\n label?: string\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n /** \u7ED3\u675F\u65F6\u95F4\uFF08ISO \u5B57\u7B26\u4E32\uFF09 */\n endDate?: string\n /** \u7ED3\u675F\u65F6\u95F4\u65F6\u533A\uFF08\u5982: America/Los_Angeles\uFF09 */\n endDate_tz?: string\n dateFormat?: string\n /** \u56FE\u6807\u5217\u8868 */\n iconArray?: Array<any>\n pcImage: Media\n padImage?: Media\n mobileImage: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n /** \u89C6\u9891\u662F\u5426\u5FAA\u73AF\u64AD\u653E */\n isVideoLoop?: boolean\n blockLink?: string\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onPrimaryClick */\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n /** \u662F\u5426\u4E3AYouTube\u89C6\u9891\uFF0Ctrue\u65F6\u64AD\u653EYouTube\u89C6\u9891\uFF08\u9700\u8981youtubeId\uFF09\uFF0Cfalse\u65F6\u64AD\u653E\u539F\u751Fvideo\uFF08\u9700\u8981isShowPlayVideoButton\u4E3Atrue\u4E14videoUrl.url\u5B58\u5728\uFF09 */\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onSecondaryClick */\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u7B2C\u4E09\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n tertiaryButton?: {\n text: string\n link?: string\n isCustomTertiaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onTertiaryClick */\n customTertiaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5927\u5C0F, \u9ED8\u8BA4default,\u5355banner, \u53EF\u9009sm, \u7528\u4E8E\u591Abanner\u573A\u666F */\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n /** \u5185\u5BB9\u5BF9\u9F50\u65B9\u5F0F */\n align?: 'left' | 'center'\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n caption?: Array<{\n title: string\n }>\n /**\n * Carousel slide items. When present and non-empty, activates carousel mode.\n * Single-banner mode is used when this field is absent or empty.\n * DECISION-002: items absence = legacy single-banner path.\n */\n items?: HeroBannerSlideData[]\n /**\n * Carousel navigation configuration.\n * Only meaningful when data.items is present and has 2+ items.\n */\n carousel?: HeroBannerCarouselConfig\n /**\n * Enable parallax scrolling animation.\n * @default true\n */\n enableParallax?: boolean\n }\n onSecondaryClick?: (data: any, e: any, customPrimaryEventId?: string) => void\n onPrimaryClick?: (data: any, e: any, customSecondaryEventId?: string) => void\n onTertiaryClick?: (data: any, e: any, customTertiaryEventId?: string) => void\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }