@anker-in/headless-ui 1.3.49 → 1.3.50

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 (69) hide show
  1. package/dist/cjs/biz-components/Faq/Faq.js +2 -2
  2. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  3. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
  4. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  5. package/dist/cjs/biz-components/FeatureCards/types.d.ts +2 -0
  6. package/dist/cjs/biz-components/FeatureCards/types.js +1 -1
  7. package/dist/cjs/biz-components/FeatureCards/types.js.map +1 -1
  8. package/dist/cjs/biz-components/IPRedirect/RegionBanner.d.ts +3 -1
  9. package/dist/cjs/biz-components/IPRedirect/RegionBanner.js +3 -3
  10. package/dist/cjs/biz-components/IPRedirect/RegionBanner.js.map +3 -3
  11. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  12. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  13. package/dist/cjs/biz-components/ImageWithText/types.d.ts +2 -0
  14. package/dist/cjs/biz-components/ImageWithText/types.js.map +1 -1
  15. package/dist/cjs/biz-components/Ksp/index.d.ts +2 -0
  16. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  17. package/dist/cjs/biz-components/Ksp/index.js.map +3 -3
  18. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +2 -0
  19. package/dist/cjs/biz-components/MarqueeReview/index.js +1 -1
  20. package/dist/cjs/biz-components/MarqueeReview/index.js.map +3 -3
  21. package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +3 -3
  22. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  23. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +1 -1
  24. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  25. package/dist/cjs/biz-components/Slogan/index.js.map +1 -1
  26. package/dist/cjs/biz-components/Slogan/types.d.ts +4 -0
  27. package/dist/cjs/biz-components/Slogan/types.js.map +1 -1
  28. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +1 -1
  29. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +3 -3
  30. package/dist/cjs/biz-components/TabWithImage/types.d.ts +2 -0
  31. package/dist/cjs/biz-components/TabWithImage/types.js +1 -1
  32. package/dist/cjs/biz-components/TabWithImage/types.js.map +1 -1
  33. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  34. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  35. package/dist/cjs/biz-components/ThreeDCarousel/types.d.ts +2 -0
  36. package/dist/cjs/biz-components/ThreeDCarousel/types.js +1 -1
  37. package/dist/cjs/biz-components/ThreeDCarousel/types.js.map +1 -1
  38. package/dist/esm/biz-components/Faq/Faq.js +2 -2
  39. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  40. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
  41. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  42. package/dist/esm/biz-components/FeatureCards/types.d.ts +2 -0
  43. package/dist/esm/biz-components/IPRedirect/RegionBanner.d.ts +3 -1
  44. package/dist/esm/biz-components/IPRedirect/RegionBanner.js +3 -3
  45. package/dist/esm/biz-components/IPRedirect/RegionBanner.js.map +3 -3
  46. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  47. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  48. package/dist/esm/biz-components/ImageWithText/types.d.ts +2 -0
  49. package/dist/esm/biz-components/ImageWithText/types.js.map +1 -1
  50. package/dist/esm/biz-components/Ksp/index.d.ts +2 -0
  51. package/dist/esm/biz-components/Ksp/index.js +1 -1
  52. package/dist/esm/biz-components/Ksp/index.js.map +3 -3
  53. package/dist/esm/biz-components/MarqueeReview/index.d.ts +2 -0
  54. package/dist/esm/biz-components/MarqueeReview/index.js +1 -1
  55. package/dist/esm/biz-components/MarqueeReview/index.js.map +3 -3
  56. package/dist/esm/biz-components/SecondaryBanner/index.d.ts +3 -3
  57. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  58. package/dist/esm/biz-components/SecondaryBanner/index.js.map +1 -1
  59. package/dist/esm/biz-components/Slogan/index.js +1 -1
  60. package/dist/esm/biz-components/Slogan/index.js.map +1 -1
  61. package/dist/esm/biz-components/Slogan/types.d.ts +4 -0
  62. package/dist/esm/biz-components/TabWithImage/TabWithImage.js +1 -1
  63. package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +3 -3
  64. package/dist/esm/biz-components/TabWithImage/types.d.ts +2 -0
  65. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  66. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  67. package/dist/esm/biz-components/ThreeDCarousel/types.d.ts +2 -0
  68. package/package.json +1 -1
  69. package/style.css +6 -0
@@ -1,4 +1,4 @@
1
- "use strict";"use client";var q=Object.create;var d=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var A=(e,o)=>{for(var t in o)d(e,t,{get:o[t],enumerable:!0})},u=(e,o,t,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of w(o))!N.call(e,i)&&i!==t&&d(e,i,{get:()=>o[i],enumerable:!(s=b(o,i))||s.enumerable});return e};var y=(e,o,t)=>(t=e!=null?q(F(e)):{},u(o||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>u(d({},"__esModule",{value:!0}),e);var k={};A(k,{FaqItem:()=>l,default:()=>C});module.exports=I(k);var a=require("react/jsx-runtime"),n=y(require("react")),m=y(require("@radix-ui/react-accordion")),c=require("../../components/index.js"),r=require("../../helpers/index.js"),x=require("../../shared/Styles.js");const h=n.default.forwardRef(({data:e,className:o,defaultOpenIndex:t,classNames:s={}},i)=>{const f=(0,n.useRef)(null);(0,n.useImperativeHandle)(i,()=>f.current);const v=(Array.isArray(t)?t:t!==void 0?[t]:e?.openFirst??!0?[0]:[]).map(p=>`item-${p}`);return(0,a.jsxs)("div",{ref:f,className:(0,r.cn)(o,s.root),children:[(0,a.jsx)("style",{children:`
1
+ "use strict";"use client";var q=Object.create;var d=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var A=(e,o)=>{for(var t in o)d(e,t,{get:o[t],enumerable:!0})},u=(e,o,t,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of w(o))!N.call(e,i)&&i!==t&&d(e,i,{get:()=>o[i],enumerable:!(s=b(o,i))||s.enumerable});return e};var y=(e,o,t)=>(t=e!=null?q(F(e)):{},u(o||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>u(d({},"__esModule",{value:!0}),e);var k={};A(k,{FaqItem:()=>c,default:()=>C});module.exports=I(k);var a=require("react/jsx-runtime"),n=y(require("react")),m=y(require("@radix-ui/react-accordion")),l=require("../../components/index.js"),r=require("../../helpers/index.js"),x=require("../../shared/Styles.js");const h=n.default.forwardRef(({data:e,className:o,defaultOpenIndex:t,classNames:s={}},i)=>{const f=(0,n.useRef)(null);(0,n.useImperativeHandle)(i,()=>f.current);const v=(Array.isArray(t)?t:t!==void 0?[t]:e?.openFirst??!0?[0]:[]).map(p=>`item-${p}`);return(0,a.jsxs)("div",{ref:f,className:(0,r.cn)(o,s.root),children:[(0,a.jsx)("style",{children:`
2
2
  @keyframes faq-slide-down {
3
3
  from { height: 0; opacity: 0; }
4
4
  to { height: var(--radix-accordion-content-height); opacity: 1; }
@@ -7,5 +7,5 @@
7
7
  from { height: var(--radix-accordion-content-height); opacity: 1; }
8
8
  to { height: 0; opacity: 0; }
9
9
  }
10
- `}),(0,a.jsx)(m.Root,{type:"multiple",defaultValue:v,children:e?.productData?.map((p,g)=>(0,a.jsx)(l,{data:p,index:g,classNames:s},g))})]})});h.displayName="Faq";const l=({data:e,index:o,classNames:t={}})=>(0,a.jsxs)(m.Item,{value:`item-${o}`,className:(0,r.cn)("tablet:py-6 border-b border-[#E4E5E6] py-4",t.item),children:[(0,a.jsx)(m.Header,{className:"flex",children:(0,a.jsxs)(m.Trigger,{className:(0,r.cn)("tablet:gap-[128px] group flex flex-1 !cursor-pointer items-center justify-between gap-4 text-left",t.itemHeader),children:[(0,a.jsx)(c.Heading,{as:"h3",html:e?.title,className:(0,r.cn)("desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]",t.title)}),(0,a.jsx)("div",{className:(0,r.cn)("transition-transform duration-300 group-data-[state=open]:rotate-180",t.icon),children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-[20px]",width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",children:(0,a.jsx)("path",{d:"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z",fill:"#1D1D1F"})})})]})}),(0,a.jsx)(m.Content,{className:(0,r.cn)("overflow-hidden text-[#4A4C56]","data-[state=open]:animate-[faq-slide-down_300ms_ease-out]","data-[state=closed]:animate-[faq-slide-up_300ms_ease-out]",t.content),children:(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(c.Text,{html:e?.richDesc??e?.desc,className:(0,r.cn)("desktop:text-base lg-desktop:text-lg [&_a]:text-brand-0 text-sm font-bold leading-[1.4] [&_a]:underline",t.description)})})})]});l.displayName="FaqItem";var C=(0,x.withLayout)(h);
10
+ `}),(0,a.jsx)(m.Root,{type:"multiple",defaultValue:v,children:e?.productData?.map((p,g)=>(0,a.jsx)(c,{data:p,index:g,classNames:s},g))})]})});h.displayName="Faq";const c=({data:e,index:o,classNames:t={}})=>(0,a.jsxs)(m.Item,{value:`item-${o}`,className:(0,r.cn)("tablet:py-6 border-b border-[#E4E5E6] py-4",t.item),children:[(0,a.jsx)(m.Header,{className:"flex",children:(0,a.jsxs)(m.Trigger,{className:(0,r.cn)("tablet:gap-[128px] group flex flex-1 !cursor-pointer items-center justify-between gap-4 text-left",t.itemHeader),children:[(0,a.jsx)(l.Heading,{as:"h3",html:e?.title,className:(0,r.cn)("desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]",t.title)}),(0,a.jsx)("div",{className:(0,r.cn)("transition-transform duration-300 group-data-[state=open]:rotate-180",t.icon),children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-[20px]",width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",children:(0,a.jsx)("path",{d:"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z",fill:"#1D1D1F"})})})]})}),(0,a.jsx)(m.Content,{forceMount:!0,className:(0,r.cn)("overflow-hidden text-[#4A4C56]","data-[state=closed]:h-0 data-[state=closed]:opacity-0","data-[state=open]:animate-[faq-slide-down_300ms_ease-out]","data-[state=closed]:animate-[faq-slide-up_300ms_ease-out]",t.content),children:(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(l.Text,{html:e?.richDesc??e?.desc,className:(0,r.cn)("desktop:text-base lg-desktop:text-lg [&_a]:text-brand-0 text-sm font-bold leading-[1.4] [&_a]:underline",t.description)})})})]});c.displayName="FaqItem";var C=(0,x.withLayout)(h);
11
11
  //# sourceMappingURL=Faq.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Faq/Faq.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport * as Accordion from '@radix-ui/react-accordion'\nimport type { FaqProps, FaqItem as ItemType, FaqSemanticName } from './types.js'\nimport { Text, Heading } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(\n ({ data, className, defaultOpenIndex, classNames = {} }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n const openIndexes = Array.isArray(defaultOpenIndex)\n ? defaultOpenIndex\n : defaultOpenIndex !== undefined\n ? [defaultOpenIndex]\n : (data?.openFirst ?? true)\n ? [0]\n : []\n\n const defaultValue = openIndexes.map(index => `item-${index}`)\n\n return (\n <div ref={innerRef} className={cn(className, classNames.root)}>\n <style>{`\n @keyframes faq-slide-down {\n from { height: 0; opacity: 0; }\n to { height: var(--radix-accordion-content-height); opacity: 1; }\n }\n @keyframes faq-slide-up {\n from { height: var(--radix-accordion-content-height); opacity: 1; }\n to { height: 0; opacity: 0; }\n }\n `}</style>\n <Accordion.Root type=\"multiple\" defaultValue={defaultValue}>\n {data?.productData?.map((item: any, index: number) => (\n <FaqItem key={index} data={item} index={index} classNames={classNames} />\n ))}\n </Accordion.Root>\n </div>\n )\n }\n)\n\nFaq.displayName = 'Faq'\n\ninterface FaqItemProps {\n data: ItemType\n index: number\n classNames?: Partial<Record<FaqSemanticName, string>>\n}\n\nconst FaqItem = ({ data, index, classNames = {} }: FaqItemProps) => {\n return (\n <Accordion.Item\n value={`item-${index}`}\n className={cn('tablet:py-6 border-b border-[#E4E5E6] py-4', classNames.item)}\n >\n <Accordion.Header className=\"flex\">\n <Accordion.Trigger\n className={cn(\n 'tablet:gap-[128px] group flex flex-1 !cursor-pointer items-center justify-between gap-4 text-left',\n classNames.itemHeader\n )}\n >\n <Heading\n as=\"h3\"\n html={data?.title}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]',\n classNames.title\n )}\n />\n <div className={cn('transition-transform duration-300 group-data-[state=open]:rotate-180', classNames.icon)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"w-[20px]\"\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n >\n <path\n d=\"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n </Accordion.Trigger>\n </Accordion.Header>\n\n <Accordion.Content\n className={cn(\n 'overflow-hidden text-[#4A4C56]',\n 'data-[state=open]:animate-[faq-slide-down_300ms_ease-out]',\n 'data-[state=closed]:animate-[faq-slide-up_300ms_ease-out]',\n classNames.content\n )}\n >\n <div className=\"mt-2\">\n <Text\n html={data?.richDesc ?? data?.desc}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg [&_a]:text-brand-0 text-sm font-bold leading-[1.4] [&_a]:underline',\n classNames.description\n )}\n />\n </div>\n </Accordion.Content>\n </Accordion.Item>\n )\n}\n\nFaqItem.displayName = 'FaqItem'\n\nexport default withLayout(Faq)\nexport { FaqItem }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAwBM,IAAAK,EAAA,6BAvBNC,EAAmD,oBACnDC,EAA2B,wCAE3BC,EAA8B,qCAC9BC,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N,OAAO,KACP,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,EAAE,kUACF,KAAK,UACP,EACF,EACF,GACF,EACF,KAEA,OAACT,EAAU,QAAV,CACC,aAAW,MACT,iCACA,4DACA,4DACAS,EAAW,OACb,EAEA,mBAAC,OAAI,UAAU,OACb,mBAAC,QACC,KAAMH,GAAM,UAAYA,GAAM,KAC9B,aAAW,MACT,0GACAG,EAAW,WACb,EACF,EACF,EACF,GACF,EAIJd,EAAQ,YAAc,UAEtB,IAAOC,KAAQ,cAAWQ,CAAG",
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport * as Accordion from '@radix-ui/react-accordion'\nimport type { FaqProps, FaqItem as ItemType, FaqSemanticName } from './types.js'\nimport { Text, Heading } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(\n ({ data, className, defaultOpenIndex, classNames = {} }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n const openIndexes = Array.isArray(defaultOpenIndex)\n ? defaultOpenIndex\n : defaultOpenIndex !== undefined\n ? [defaultOpenIndex]\n : (data?.openFirst ?? true)\n ? [0]\n : []\n\n const defaultValue = openIndexes.map(index => `item-${index}`)\n\n return (\n <div ref={innerRef} className={cn(className, classNames.root)}>\n <style>{`\n @keyframes faq-slide-down {\n from { height: 0; opacity: 0; }\n to { height: var(--radix-accordion-content-height); opacity: 1; }\n }\n @keyframes faq-slide-up {\n from { height: var(--radix-accordion-content-height); opacity: 1; }\n to { height: 0; opacity: 0; }\n }\n `}</style>\n <Accordion.Root type=\"multiple\" defaultValue={defaultValue}>\n {data?.productData?.map((item: any, index: number) => (\n <FaqItem key={index} data={item} index={index} classNames={classNames} />\n ))}\n </Accordion.Root>\n </div>\n )\n }\n)\n\nFaq.displayName = 'Faq'\n\ninterface FaqItemProps {\n data: ItemType\n index: number\n classNames?: Partial<Record<FaqSemanticName, string>>\n}\n\nconst FaqItem = ({ data, index, classNames = {} }: FaqItemProps) => {\n return (\n <Accordion.Item\n value={`item-${index}`}\n className={cn('tablet:py-6 border-b border-[#E4E5E6] py-4', classNames.item)}\n >\n <Accordion.Header className=\"flex\">\n <Accordion.Trigger\n className={cn(\n 'tablet:gap-[128px] group flex flex-1 !cursor-pointer items-center justify-between gap-4 text-left',\n classNames.itemHeader\n )}\n >\n <Heading\n as=\"h3\"\n html={data?.title}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]',\n classNames.title\n )}\n />\n <div className={cn('transition-transform duration-300 group-data-[state=open]:rotate-180', classNames.icon)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"w-[20px]\"\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n >\n <path\n d=\"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n </Accordion.Trigger>\n </Accordion.Header>\n\n <Accordion.Content\n forceMount\n className={cn(\n 'overflow-hidden text-[#4A4C56]',\n 'data-[state=closed]:h-0 data-[state=closed]:opacity-0',\n 'data-[state=open]:animate-[faq-slide-down_300ms_ease-out]',\n 'data-[state=closed]:animate-[faq-slide-up_300ms_ease-out]',\n classNames.content\n )}\n >\n <div className=\"mt-2\">\n <Text\n html={data?.richDesc ?? data?.desc}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg [&_a]:text-brand-0 text-sm font-bold leading-[1.4] [&_a]:underline',\n classNames.description\n )}\n />\n </div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,oBAACT,EAAU,OAAV,CAAiB,UAAU,OAC1B,oBAACA,EAAU,QAAV,CACC,aAAW,MACT,oGACAS,EAAW,UACb,EAEA,oBAAC,WACC,GAAG,KACH,KAAMH,GAAM,MACZ,aAAW,MACT,yFACAG,EAAW,KACb,EACF,KACA,OAAC,OAAI,aAAW,MAAG,uEAAwEA,EAAW,IAAI,EACxG,mBAAC,OACC,MAAM,6BACN,UAAU,WACV,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,EAAE,kUACF,KAAK,UACP,EACF,EACF,GACF,EACF,KAEA,OAACT,EAAU,QAAV,CACC,WAAU,GACV,aAAW,MACT,iCACA,wDACA,4DACA,4DACAS,EAAW,OACb,EAEA,mBAAC,OAAI,UAAU,OACb,mBAAC,QACC,KAAMH,GAAM,UAAYA,GAAM,KAC9B,aAAW,MACT,0GACAG,EAAW,WACb,EACF,EACF,EACF,GACF,EAIJd,EAAQ,YAAc,UAEtB,IAAOC,KAAQ,cAAWQ,CAAG",
6
6
  "names": ["Faq_exports", "__export", "FaqItem", "Faq_default", "__toCommonJS", "import_jsx_runtime", "import_react", "Accordion", "import_components", "import_helpers", "import_Styles", "Faq", "React", "data", "className", "defaultOpenIndex", "classNames", "ref", "innerRef", "defaultValue", "index", "item"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var H=Object.create;var c=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var L=(e,r)=>{for(var s in r)c(e,s,{get:r[s],enumerable:!0})},b=(e,r,s,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of $(r))!j.call(e,p)&&p!==s&&c(e,p,{get:()=>r[p],enumerable:!(i=R(r,p))||i.enumerable});return e};var D=(e,r,s)=>(s=e!=null?H(S(e)):{},b(r||!e||!e.__esModule?c(s,"default",{value:e,enumerable:!0}):s,e)),E=e=>b(c({},"__esModule",{value:!0}),e);var B={};L(B,{default:()=>M});module.exports=E(B);var t=require("react/jsx-runtime"),o=D(require("react")),l=require("../../components/index.js"),f=require("../../helpers/utils.js"),N=require("../../shared/Styles.js"),w=require("../../hooks/useExposure.js"),y=require("../../shared/trackUrlRef.js"),n=require("swiper/react");const m="image",h="feature_cards",P=(e,r)=>r===2?e===0?"laptop:flex-[2]":"laptop:flex-[3]":r===3?"laptop:flex-[1]":r===4?e===0?"laptop:flex-[2]":e===1||e===2?"laptop:flex-[3]":"laptop:flex-[2]":r===5?e<3?"laptop:flex-[1]":e===3?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]",I=(e,r)=>r===4&&e===1||r===5&&e===2,k=o.default.forwardRef(({data:e,className:r},s)=>{const{title:i,subtitle:p,items:u=[],theme:C="light"}=e,x=(0,o.useRef)(null);(0,w.useExposure)(x,{componentType:m,componentName:h,componentTitle:i,componentDescription:p}),(0,o.useImperativeHandle)(s,()=>x.current);const _="rounded-box",F=(a,d)=>{const g=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Picture,{source:a.image?.url,alt:a.image?.alt||a.title,className:"feature-cards__card-image absolute inset-0 !h-full",imgClassName:"!h-full object-cover"}),(0,t.jsxs)("div",{className:"feature-cards__card-content z-10",children:[(0,t.jsx)(l.Heading,{size:3,as:"h2",className:"feature-cards__card-title laptop:text-[20px] desktop:text-[32px] lg-desktop:text-[32px]",children:a.title}),(0,t.jsx)(l.Text,{size:4,as:"p",className:"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] text-[14px]",children:a.subtitle})]})]}),T="feature-cards__card relative flex h-[360px] max-h-[560px] flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px] text-info-primary tablet:h-[336px] laptop:h-[336px] laptop:px-[16px] laptop:py-[16px] desktop:h-[448px] desktop:px-[32px] desktop:py-[24px] lg-desktop:h-[560px]",z=d!==void 0?P(d,u.length):"flex-1",v=(0,f.cn)(T,_,z,{"aiui-dark":a.theme==="dark","aiui-light":a.theme==="light"});return a.link?(0,t.jsx)("a",{href:(0,y.trackUrlRef)(a.link,`${m}_${h}`),className:v,"data-headless-type-name":`${m}#${h}`,"data-headless-title-desc-button":`${i}#${a.title}#${a.subtitle}`,children:g}):(0,t.jsx)("div",{className:v,children:g})};return(0,t.jsxs)("section",{ref:x,"data-ui-component-id":"FeatureCards",className:(0,f.cn)("feature-cards text-info-primary flex w-full flex-col justify-center",{"aiui-dark":C==="dark"},r),children:[(0,t.jsxs)("div",{className:"feature-cards__header",children:[(0,t.jsx)(l.Heading,{size:4,as:"h1",className:"feature-cards__title laptop:text-center text-left",children:i}),p&&(0,t.jsx)(l.Text,{size:2,as:"p",className:"feature-cards__subtitle laptop:text-center desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-left text-[14px]",children:p})]}),(0,t.jsx)("div",{className:"feature-cards__grid laptop:mt-[32px] laptop:flex desktop:mt-[40px] lg-desktop:mt-[24px] mt-[24px] hidden w-full flex-wrap gap-[16px]",children:u.map((a,d)=>(0,t.jsxs)(o.default.Fragment,{children:[F(a,d),I(d,u.length)&&(0,t.jsx)("div",{className:"laptop:basis-full laptop:h-0"})]},a.title))}),(0,t.jsx)("div",{className:"feature-cards__swiper-container laptop:hidden mt-[24px] w-full",children:(0,t.jsx)(n.Swiper,{spaceBetween:12,slidesPerView:"auto",grabCursor:!0,className:"feature-cards__swiper relative w-full !overflow-visible",children:u.map(a=>(0,t.jsx)(n.SwiperSlide,{className:"feature-cards__swiper-slide relative !h-[360px] !w-[296px]",children:(0,t.jsxs)("div",{className:(0,f.cn)("feature-cards__card feature-cards__card--mobile text-info-primary absolute inset-0 flex flex-1 flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px]",_,{"aiui-dark":a.theme==="dark","aiui-light":a.theme==="light"}),children:[(0,t.jsx)(l.Picture,{source:a.image?.url,alt:a.image?.alt||a.title,className:"feature-cards__card-image absolute inset-0 !h-full",imgClassName:"!h-full object-cover"}),(0,t.jsxs)("div",{className:"feature-cards__card-content z-10",children:[(0,t.jsx)(l.Heading,{size:3,as:"h2",className:"feature-cards__card-title",children:a.title}),(0,t.jsx)(l.Text,{size:4,as:"p",className:"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] overflow-visible text-[14px]",children:a.subtitle})]})]},a.title)},a.title))})})]})});k.displayName="FeatureCards";var M=(0,N.withLayout)(k,{style:"overflow: hidden;"});
1
+ "use strict";"use client";var R=Object.create;var c=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var D=(e,r)=>{for(var s in r)c(e,s,{get:r[s],enumerable:!0})},b=(e,r,s,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of S(r))!L.call(e,p)&&p!==s&&c(e,p,{get:()=>r[p],enumerable:!(i=$(r,p))||i.enumerable});return e};var E=(e,r,s)=>(s=e!=null?R(j(e)):{},b(r||!e||!e.__esModule?c(s,"default",{value:e,enumerable:!0}):s,e)),P=e=>b(c({},"__esModule",{value:!0}),e);var U={};D(U,{default:()=>B});module.exports=P(U);var t=require("react/jsx-runtime"),o=E(require("react")),l=require("../../components/index.js"),f=require("../../helpers/utils.js"),N=require("../../shared/Styles.js"),w=require("../../hooks/useExposure.js"),y=require("../../shared/trackUrlRef.js"),n=require("swiper/react");const m="image",h="feature_cards",I=(e,r)=>r===2?e===0?"laptop:flex-[2]":"laptop:flex-[3]":r===3?"laptop:flex-[1]":r===4?e===0?"laptop:flex-[2]":e===1||e===2?"laptop:flex-[3]":"laptop:flex-[2]":r===5?e<3?"laptop:flex-[1]":e===3?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]",M=(e,r)=>r===4&&e===1||r===5&&e===2,k=o.default.forwardRef(({data:e,className:r},s)=>{const{title:i,subtitle:p,items:u=[],theme:C="light",titleTag:T}=e,x=(0,o.useRef)(null);(0,w.useExposure)(x,{componentType:m,componentName:h,componentTitle:i,componentDescription:p}),(0,o.useImperativeHandle)(s,()=>x.current);const g="rounded-box",F=(a,d)=>{const _=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Picture,{source:a.image?.url,alt:a.image?.alt||a.title,className:"feature-cards__card-image absolute inset-0 !h-full",imgClassName:"!h-full object-cover"}),(0,t.jsxs)("div",{className:"feature-cards__card-content z-10",children:[(0,t.jsx)(l.Heading,{size:3,as:"h2",className:"feature-cards__card-title laptop:text-[20px] desktop:text-[32px] lg-desktop:text-[32px]",children:a.title}),(0,t.jsx)(l.Text,{size:4,as:"p",className:"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] text-[14px]",children:a.subtitle})]})]}),z="feature-cards__card relative flex h-[360px] max-h-[560px] flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px] text-info-primary tablet:h-[336px] laptop:h-[336px] laptop:px-[16px] laptop:py-[16px] desktop:h-[448px] desktop:px-[32px] desktop:py-[24px] lg-desktop:h-[560px]",H=d!==void 0?I(d,u.length):"flex-1",v=(0,f.cn)(z,g,H,{"aiui-dark":a.theme==="dark","aiui-light":a.theme==="light"});return a.link?(0,t.jsx)("a",{href:(0,y.trackUrlRef)(a.link,`${m}_${h}`),className:v,"data-headless-type-name":`${m}#${h}`,"data-headless-title-desc-button":`${i}#${a.title}#${a.subtitle}`,children:_}):(0,t.jsx)("div",{className:v,children:_})};return(0,t.jsxs)("section",{ref:x,"data-ui-component-id":"FeatureCards",className:(0,f.cn)("feature-cards text-info-primary flex w-full flex-col justify-center",{"aiui-dark":C==="dark"},r),children:[(0,t.jsxs)("div",{className:"feature-cards__header",children:[(0,t.jsx)(l.Heading,{size:4,as:T??"h2",className:"feature-cards__title laptop:text-center text-left",children:i}),p&&(0,t.jsx)(l.Text,{size:2,as:"p",className:"feature-cards__subtitle laptop:text-center desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-left text-[14px]",children:p})]}),(0,t.jsx)("div",{className:"feature-cards__grid laptop:mt-[32px] laptop:flex desktop:mt-[40px] lg-desktop:mt-[24px] mt-[24px] hidden w-full flex-wrap gap-[16px]",children:u.map((a,d)=>(0,t.jsxs)(o.default.Fragment,{children:[F(a,d),M(d,u.length)&&(0,t.jsx)("div",{className:"laptop:basis-full laptop:h-0"})]},a.title))}),(0,t.jsx)("div",{className:"feature-cards__swiper-container laptop:hidden mt-[24px] w-full",children:(0,t.jsx)(n.Swiper,{spaceBetween:12,slidesPerView:"auto",grabCursor:!0,className:"feature-cards__swiper relative w-full !overflow-visible",children:u.map(a=>(0,t.jsx)(n.SwiperSlide,{className:"feature-cards__swiper-slide relative !h-[360px] !w-[296px]",children:(0,t.jsxs)("div",{className:(0,f.cn)("feature-cards__card feature-cards__card--mobile text-info-primary absolute inset-0 flex flex-1 flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px]",g,{"aiui-dark":a.theme==="dark","aiui-light":a.theme==="light"}),children:[(0,t.jsx)(l.Picture,{source:a.image?.url,alt:a.image?.alt||a.title,className:"feature-cards__card-image absolute inset-0 !h-full",imgClassName:"!h-full object-cover"}),(0,t.jsxs)("div",{className:"feature-cards__card-content z-10",children:[(0,t.jsx)(l.Heading,{size:3,as:"h2",className:"feature-cards__card-title",children:a.title}),(0,t.jsx)(l.Text,{size:4,as:"p",className:"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] overflow-visible text-[14px]",children:a.subtitle})]})]},a.title)},a.title))})})]})});k.displayName="FeatureCards";var B=(0,N.withLayout)(k,{style:"overflow: hidden;"});
2
2
  //# sourceMappingURL=FeatureCards.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/FeatureCards/FeatureCards.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { FeatureCardsProps, FeatureCardItem } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\n\nconst componentType = 'image'\nconst componentName = 'feature_cards'\n\n/**\n * \u6839\u636E\u5361\u7247\u6570\u91CF\u83B7\u53D6\u684C\u9762\u7AEF\uFF08laptop+\uFF09\u7684\u7F51\u683C\u5E03\u5C40\u7C7B\u540D\n * - 2\u5F20\u5361\u7247: 2:3\n * - 3\u5F20\u5361\u7247: 1:1:1\n * - 4\u5F20\u5361\u7247: \u7B2C\u4E00\u884C 2:3\uFF0C\u7B2C\u4E8C\u884C 3:2\n * - 5\u5F20\u5361\u7247: \u7B2C\u4E00\u884C 1:1:1\uFF0C\u7B2C\u4E8C\u884C 2:3\n */\nconst getCardLayoutClasses = (index: number, totalCards: number): string => {\n if (totalCards === 2) {\n // 2:3 \u6BD4\u4F8B\n return index === 0 ? 'laptop:flex-[2]' : 'laptop:flex-[3]'\n }\n\n if (totalCards === 3) {\n // 1:1:1 \u6BD4\u4F8B\n return 'laptop:flex-[1]'\n }\n\n if (totalCards === 4) {\n // \u7B2C\u4E00\u884C 2:3\uFF0C\u7B2C\u4E8C\u884C 3:2\n if (index === 0) return 'laptop:flex-[2]'\n if (index === 1) return 'laptop:flex-[3]'\n if (index === 2) return 'laptop:flex-[3]'\n return 'laptop:flex-[2]'\n }\n\n if (totalCards === 5) {\n // \u7B2C\u4E00\u884C 1:1:1\uFF0C\u7B2C\u4E8C\u884C 2:3\n if (index < 3) return 'laptop:flex-[1]'\n if (index === 3) return 'laptop:flex-[2]'\n return 'laptop:flex-[3]'\n }\n\n // \u9ED8\u8BA4\u7B49\u5BBD\n return 'laptop:flex-[1]'\n}\n\n/**\n * \u6839\u636E\u5361\u7247\u6570\u91CF\u786E\u5B9A\u662F\u5426\u9700\u8981\u6362\u884C\n * - 4\u5F20\u5361\u7247: \u7B2C\u4E00\u884C2\u5F20\uFF0C\u7B2C\u4E8C\u884C2\u5F20\n * - 5\u5F20\u5361\u7247: \u7B2C\u4E00\u884C3\u5F20\uFF0C\u7B2C\u4E8C\u884C2\u5F20\n */\nconst shouldBreakRow = (index: number, totalCards: number): boolean => {\n if (totalCards === 4 && index === 1) return true\n if (totalCards === 5 && index === 2) return true\n return false\n}\n\nconst FeatureCards = React.forwardRef<HTMLDivElement, FeatureCardsProps>(({ data, className }, ref) => {\n const { title, subtitle, items = [], theme = 'light' } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // \u7EDF\u4E00\u4F7F\u7528 rounded-box\n const roundedClasses = 'rounded-box'\n\n const renderCard = (item: FeatureCardItem, index?: number) => {\n const cardContent = (\n <>\n <Picture\n source={item.image?.url}\n alt={item.image?.alt || item.title}\n className=\"feature-cards__card-image absolute inset-0 !h-full\"\n imgClassName=\"!h-full object-cover\"\n />\n <div className=\"feature-cards__card-content z-10\">\n <Heading\n size={3}\n as=\"h2\"\n className=\"feature-cards__card-title laptop:text-[20px] desktop:text-[32px] lg-desktop:text-[32px]\"\n >\n {item.title}\n </Heading>\n <Text\n size={4}\n as=\"p\"\n className=\"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] text-[14px]\"\n >\n {item.subtitle}\n </Text>\n </div>\n </>\n )\n\n // \u57FA\u7840\u6837\u5F0F\uFF08\u79FB\u9664\u539F\u6709\u7684 rounded \u7C7B\uFF09\n const baseClasses =\n 'feature-cards__card relative flex h-[360px] max-h-[560px] flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px] text-info-primary tablet:h-[336px] laptop:h-[336px] laptop:px-[16px] laptop:py-[16px] desktop:h-[448px] desktop:px-[32px] desktop:py-[24px] lg-desktop:h-[560px]'\n\n // \u83B7\u53D6\u54CD\u5E94\u5F0F\u5E03\u5C40\u7C7B\u540D\uFF08\u4EC5\u7528\u4E8E\u684C\u9762\u7AEF\uFF09\n const layoutClasses = index !== undefined ? getCardLayoutClasses(index, items.length) : 'flex-1'\n\n const cardClasses = cn(baseClasses, roundedClasses, layoutClasses, {\n 'aiui-dark': item.theme === 'dark',\n 'aiui-light': item.theme === 'light',\n })\n\n if (item.link) {\n return (\n <a\n href={trackUrlRef(item.link, `${componentType}_${componentName}`)}\n className={cardClasses}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${item.title}#${item.subtitle}`}\n >\n {cardContent}\n </a>\n )\n }\n\n return <div className={cardClasses}>{cardContent}</div>\n }\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"FeatureCards\"\n className={cn(\n 'feature-cards text-info-primary flex w-full flex-col justify-center',\n {\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n <div className=\"feature-cards__header\">\n <Heading size={4} as=\"h1\" className=\"feature-cards__title laptop:text-center text-left\">\n {title}\n </Heading>\n {subtitle && (\n <Text\n size={2}\n as=\"p\"\n className=\"feature-cards__subtitle laptop:text-center desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-left text-[14px]\"\n >\n {subtitle}\n </Text>\n )}\n </div>\n\n {/* \u684C\u9762\u7AEF\u7F51\u683C\u5E03\u5C40 */}\n <div className=\"feature-cards__grid laptop:mt-[32px] laptop:flex desktop:mt-[40px] lg-desktop:mt-[24px] mt-[24px] hidden w-full flex-wrap gap-[16px]\">\n {items.map((item, index) => (\n <React.Fragment key={item.title}>\n {renderCard(item, index)}\n {/* \u5728\u7279\u5B9A\u4F4D\u7F6E\u63D2\u5165\u6362\u884C */}\n {shouldBreakRow(index, items.length) && <div className=\"laptop:basis-full laptop:h-0\" />}\n </React.Fragment>\n ))}\n </div>\n\n {/* \u79FB\u52A8\u7AEF Swiper \u5E03\u5C40 */}\n <div className=\"feature-cards__swiper-container laptop:hidden mt-[24px] w-full\">\n <Swiper\n spaceBetween={12}\n slidesPerView=\"auto\"\n grabCursor\n className=\"feature-cards__swiper relative w-full !overflow-visible\"\n >\n {items.map(item => (\n <SwiperSlide key={item.title} className=\"feature-cards__swiper-slide relative !h-[360px] !w-[296px]\">\n <div\n key={item.title}\n className={cn(\n 'feature-cards__card feature-cards__card--mobile text-info-primary absolute inset-0 flex flex-1 flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px]',\n roundedClasses,\n {\n 'aiui-dark': item.theme === 'dark',\n 'aiui-light': item.theme === 'light',\n }\n )}\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.alt || item.title}\n className=\"feature-cards__card-image absolute inset-0 !h-full\"\n imgClassName=\"!h-full object-cover\"\n />\n <div className=\"feature-cards__card-content z-10\">\n <Heading size={3} as=\"h2\" className=\"feature-cards__card-title\">\n {item.title}\n </Heading>\n <Text\n size={4}\n as=\"p\"\n className=\"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] overflow-visible text-[14px]\"\n >\n {item.subtitle}\n </Text>\n </div>\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n </section>\n )\n})\n\nFeatureCards.displayName = 'FeatureCards'\n\nexport default withLayout(FeatureCards, { style: 'overflow: hidden;' })\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgFM,IAAAI,EAAA,6BA/ENC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA4B,uCAE5BL,EAAoC,wBA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,KACA,OAAC,QACC,KAAM,EACN,GAAG,IACH,UAAU,sJAET,SAAAA,EAAK,SACR,GACF,IA3BKA,EAAK,KA4BZ,GA9BgBA,EAAK,KA+BvB,CACD,EACH,EACF,GACF,CAEJ,CAAC,EAEDZ,EAAa,YAAc,eAE3B,IAAOf,KAAQ,cAAWe,EAAc,CAAE,MAAO,mBAAoB,CAAC",
6
- "names": ["FeatureCards_exports", "__export", "FeatureCards_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "getCardLayoutClasses", "index", "totalCards", "shouldBreakRow", "FeatureCards", "React", "data", "className", "ref", "title", "subtitle", "items", "theme", "boxRef", "roundedClasses", "renderCard", "item", "cardContent", "baseClasses", "layoutClasses", "cardClasses"]
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { FeatureCardsProps, FeatureCardItem } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\n\nconst componentType = 'image'\nconst componentName = 'feature_cards'\n\n/**\n * \u6839\u636E\u5361\u7247\u6570\u91CF\u83B7\u53D6\u684C\u9762\u7AEF\uFF08laptop+\uFF09\u7684\u7F51\u683C\u5E03\u5C40\u7C7B\u540D\n * - 2\u5F20\u5361\u7247: 2:3\n * - 3\u5F20\u5361\u7247: 1:1:1\n * - 4\u5F20\u5361\u7247: \u7B2C\u4E00\u884C 2:3\uFF0C\u7B2C\u4E8C\u884C 3:2\n * - 5\u5F20\u5361\u7247: \u7B2C\u4E00\u884C 1:1:1\uFF0C\u7B2C\u4E8C\u884C 2:3\n */\nconst getCardLayoutClasses = (index: number, totalCards: number): string => {\n if (totalCards === 2) {\n // 2:3 \u6BD4\u4F8B\n return index === 0 ? 'laptop:flex-[2]' : 'laptop:flex-[3]'\n }\n\n if (totalCards === 3) {\n // 1:1:1 \u6BD4\u4F8B\n return 'laptop:flex-[1]'\n }\n\n if (totalCards === 4) {\n // \u7B2C\u4E00\u884C 2:3\uFF0C\u7B2C\u4E8C\u884C 3:2\n if (index === 0) return 'laptop:flex-[2]'\n if (index === 1) return 'laptop:flex-[3]'\n if (index === 2) return 'laptop:flex-[3]'\n return 'laptop:flex-[2]'\n }\n\n if (totalCards === 5) {\n // \u7B2C\u4E00\u884C 1:1:1\uFF0C\u7B2C\u4E8C\u884C 2:3\n if (index < 3) return 'laptop:flex-[1]'\n if (index === 3) return 'laptop:flex-[2]'\n return 'laptop:flex-[3]'\n }\n\n // \u9ED8\u8BA4\u7B49\u5BBD\n return 'laptop:flex-[1]'\n}\n\n/**\n * \u6839\u636E\u5361\u7247\u6570\u91CF\u786E\u5B9A\u662F\u5426\u9700\u8981\u6362\u884C\n * - 4\u5F20\u5361\u7247: \u7B2C\u4E00\u884C2\u5F20\uFF0C\u7B2C\u4E8C\u884C2\u5F20\n * - 5\u5F20\u5361\u7247: \u7B2C\u4E00\u884C3\u5F20\uFF0C\u7B2C\u4E8C\u884C2\u5F20\n */\nconst shouldBreakRow = (index: number, totalCards: number): boolean => {\n if (totalCards === 4 && index === 1) return true\n if (totalCards === 5 && index === 2) return true\n return false\n}\n\nconst FeatureCards = React.forwardRef<HTMLDivElement, FeatureCardsProps>(({ data, className }, ref) => {\n const { title, subtitle, items = [], theme = 'light', titleTag } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // \u7EDF\u4E00\u4F7F\u7528 rounded-box\n const roundedClasses = 'rounded-box'\n\n const renderCard = (item: FeatureCardItem, index?: number) => {\n const cardContent = (\n <>\n <Picture\n source={item.image?.url}\n alt={item.image?.alt || item.title}\n className=\"feature-cards__card-image absolute inset-0 !h-full\"\n imgClassName=\"!h-full object-cover\"\n />\n <div className=\"feature-cards__card-content z-10\">\n <Heading\n size={3}\n as=\"h2\"\n className=\"feature-cards__card-title laptop:text-[20px] desktop:text-[32px] lg-desktop:text-[32px]\"\n >\n {item.title}\n </Heading>\n <Text\n size={4}\n as=\"p\"\n className=\"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] text-[14px]\"\n >\n {item.subtitle}\n </Text>\n </div>\n </>\n )\n\n // \u57FA\u7840\u6837\u5F0F\uFF08\u79FB\u9664\u539F\u6709\u7684 rounded \u7C7B\uFF09\n const baseClasses =\n 'feature-cards__card relative flex h-[360px] max-h-[560px] flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px] text-info-primary tablet:h-[336px] laptop:h-[336px] laptop:px-[16px] laptop:py-[16px] desktop:h-[448px] desktop:px-[32px] desktop:py-[24px] lg-desktop:h-[560px]'\n\n // \u83B7\u53D6\u54CD\u5E94\u5F0F\u5E03\u5C40\u7C7B\u540D\uFF08\u4EC5\u7528\u4E8E\u684C\u9762\u7AEF\uFF09\n const layoutClasses = index !== undefined ? getCardLayoutClasses(index, items.length) : 'flex-1'\n\n const cardClasses = cn(baseClasses, roundedClasses, layoutClasses, {\n 'aiui-dark': item.theme === 'dark',\n 'aiui-light': item.theme === 'light',\n })\n\n if (item.link) {\n return (\n <a\n href={trackUrlRef(item.link, `${componentType}_${componentName}`)}\n className={cardClasses}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${item.title}#${item.subtitle}`}\n >\n {cardContent}\n </a>\n )\n }\n\n return <div className={cardClasses}>{cardContent}</div>\n }\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"FeatureCards\"\n className={cn(\n 'feature-cards text-info-primary flex w-full flex-col justify-center',\n {\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n <div className=\"feature-cards__header\">\n <Heading size={4} as={titleTag ?? 'h2'} className=\"feature-cards__title laptop:text-center text-left\">\n {title}\n </Heading>\n {subtitle && (\n <Text\n size={2}\n as=\"p\"\n className=\"feature-cards__subtitle laptop:text-center desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-left text-[14px]\"\n >\n {subtitle}\n </Text>\n )}\n </div>\n\n {/* \u684C\u9762\u7AEF\u7F51\u683C\u5E03\u5C40 */}\n <div className=\"feature-cards__grid laptop:mt-[32px] laptop:flex desktop:mt-[40px] lg-desktop:mt-[24px] mt-[24px] hidden w-full flex-wrap gap-[16px]\">\n {items.map((item, index) => (\n <React.Fragment key={item.title}>\n {renderCard(item, index)}\n {/* \u5728\u7279\u5B9A\u4F4D\u7F6E\u63D2\u5165\u6362\u884C */}\n {shouldBreakRow(index, items.length) && <div className=\"laptop:basis-full laptop:h-0\" />}\n </React.Fragment>\n ))}\n </div>\n\n {/* \u79FB\u52A8\u7AEF Swiper \u5E03\u5C40 */}\n <div className=\"feature-cards__swiper-container laptop:hidden mt-[24px] w-full\">\n <Swiper\n spaceBetween={12}\n slidesPerView=\"auto\"\n grabCursor\n className=\"feature-cards__swiper relative w-full !overflow-visible\"\n >\n {items.map(item => (\n <SwiperSlide key={item.title} className=\"feature-cards__swiper-slide relative !h-[360px] !w-[296px]\">\n <div\n key={item.title}\n className={cn(\n 'feature-cards__card feature-cards__card--mobile text-info-primary absolute inset-0 flex flex-1 flex-col justify-end gap-[16px] overflow-hidden px-[16px] py-[12px]',\n roundedClasses,\n {\n 'aiui-dark': item.theme === 'dark',\n 'aiui-light': item.theme === 'light',\n }\n )}\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.alt || item.title}\n className=\"feature-cards__card-image absolute inset-0 !h-full\"\n imgClassName=\"!h-full object-cover\"\n />\n <div className=\"feature-cards__card-content z-10\">\n <Heading size={3} as=\"h2\" className=\"feature-cards__card-title\">\n {item.title}\n </Heading>\n <Text\n size={4}\n as=\"p\"\n className=\"feature-cards__card-subtitle laptop:h-[42px] lg-desktop:h-[54px] lg-desktop:text-[18px] mt-[4px] line-clamp-2 h-[42px] overflow-visible text-[14px]\"\n >\n {item.subtitle}\n </Text>\n </div>\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n </section>\n )\n})\n\nFeatureCards.displayName = 'FeatureCards'\n\nexport default withLayout(FeatureCards, { style: 'overflow: hidden;' })\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgFM,IAAAI,EAAA,6BA/ENC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA4B,uCAE5BL,EAAoC,wBAEpC,MAAMM,EAAgB,QAChBC,EAAgB,gBAShBC,EAAuB,CAACC,EAAeC,IACvCA,IAAe,EAEVD,IAAU,EAAI,kBAAoB,kBAGvCC,IAAe,EAEV,kBAGLA,IAAe,EAEbD,IAAU,EAAU,kBACpBA,IAAU,GACVA,IAAU,EAAU,kBACjB,kBAGLC,IAAe,EAEbD,EAAQ,EAAU,kBAClBA,IAAU,EAAU,kBACjB,kBAIF,kBAQHE,EAAiB,CAACF,EAAeC,IACjCA,IAAe,GAAKD,IAAU,GAC9BC,IAAe,GAAKD,IAAU,EAI9BG,EAAe,EAAAC,QAAM,WAA8C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACrG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,MAAAC,EAAQ,CAAC,EAAG,MAAAC,EAAQ,QAAS,SAAAC,CAAS,EAAIP,EAE7DQ,KAAS,UAAuB,IAAI,KAE1C,eAAYA,EAAQ,CAClB,cAAAhB,EACA,cAAAC,EACA,eAAgBU,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMM,EAAO,OAAy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AAMhB,CAAK,EAEtBE,EAAeF,EAAOU,EAAM,MAAM,MAAK,OAAC,OAAI,UAAU,+BAA+B,IAHnEM,EAAK,KAI1B,CACD,EACH,KAGA,OAAC,OAAI,UAAU,iEACb,mBAAC,UACC,aAAc,GACd,cAAc,OACd,WAAU,GACV,UAAU,0DAET,SAAAN,EAAM,IAAIM,MACT,OAAC,eAA6B,UAAU,6DACtC,oBAAC,OAEC,aAAW,MACT,qKACAF,EACA,CACE,YAAaE,EAAK,QAAU,OAC5B,aAAcA,EAAK,QAAU,OAC/B,CACF,EAEA,oBAAC,WACC,OAAQA,EAAK,OAAO,IACpB,IAAKA,EAAK,OAAO,KAAOA,EAAK,MAC7B,UAAU,qDACV,aAAa,uBACf,KACA,QAAC,OAAI,UAAU,mCACb,oBAAC,WAAQ,KAAM,EAAG,GAAG,KAAK,UAAU,4BACjC,SAAAA,EAAK,MACR,KACA,OAAC,QACC,KAAM,EACN,GAAG,IACH,UAAU,sJAET,SAAAA,EAAK,SACR,GACF,IA3BKA,EAAK,KA4BZ,GA9BgBA,EAAK,KA+BvB,CACD,EACH,EACF,GACF,CAEJ,CAAC,EAEDb,EAAa,YAAc,eAE3B,IAAOf,KAAQ,cAAWe,EAAc,CAAE,MAAO,mBAAoB,CAAC",
6
+ "names": ["FeatureCards_exports", "__export", "FeatureCards_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "getCardLayoutClasses", "index", "totalCards", "shouldBreakRow", "FeatureCards", "React", "data", "className", "ref", "title", "subtitle", "items", "theme", "titleTag", "boxRef", "roundedClasses", "renderCard", "item", "cardContent", "baseClasses", "layoutClasses", "cardClasses"]
7
7
  }
@@ -15,6 +15,8 @@ export interface FeatureCardsProps {
15
15
  data: {
16
16
  /** 主标题 */
17
17
  title: string;
18
+ /** 标题标签层级 @default 'h2' */
19
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
18
20
  /** 副标题/描述 */
19
21
  subtitle?: string;
20
22
  /** 卡片列表 */
@@ -1,2 +1,2 @@
1
- "use strict";var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!p.call(t,r)&&r!==a&&s(t,r,{get:()=>e[r],enumerable:!(i=m(e,r))||i.enumerable});return t};var d=t=>g(s({},"__esModule",{value:!0}),t);var l={};module.exports=d(l);
1
+ "use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var g=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!n.call(t,r)&&r!==s&&a(t,r,{get:()=>e[r],enumerable:!(i=m(e,r))||i.enumerable});return t};var p=t=>g(a({},"__esModule",{value:!0}),t);var l={};module.exports=p(l);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/FeatureCards/types.ts"],
4
- "sourcesContent": ["import type { Media, Theme } from '../../types/props.js'\n\nexport interface FeatureCardItem {\n /** \u5361\u7247\u6807\u9898 */\n title: string\n /** \u5361\u7247\u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle: string\n /** \u80CC\u666F\u56FE\u7247 URL */\n image: Media\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n /** \u94FE\u63A5\u5730\u5740 */\n link?: string\n}\n\nexport interface FeatureCardsProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle?: string\n /** \u5361\u7247\u5217\u8868 */\n items: FeatureCardItem[]\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { Media, Theme } from '../../types/props.js'\n\nexport interface FeatureCardItem {\n /** \u5361\u7247\u6807\u9898 */\n title: string\n /** \u5361\u7247\u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle: string\n /** \u80CC\u666F\u56FE\u7247 URL */\n image: Media\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n /** \u94FE\u63A5\u5730\u5740 */\n link?: string\n}\n\nexport interface FeatureCardsProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u6807\u9898\u6807\u7B7E\u5C42\u7EA7 @default 'h2' */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n /** \u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle?: string\n /** \u5361\u7247\u5217\u8868 */\n items: FeatureCardItem[]\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -35,5 +35,7 @@ export type RegionBannerProps = {
35
35
  currentRegion?: RegionConfig;
36
36
  /** 自定义类名 */
37
37
  className?: string;
38
+ /** 标题标签类型,默认 h2 */
39
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
38
40
  };
39
- export declare function RegionBanner({ visible, onVisibleChange, copy, onStayHere, onSwitchSite, styles: customStyles, currentRegion, className, }: RegionBannerProps): import("react/jsx-runtime").JSX.Element | null;
41
+ export declare function RegionBanner({ visible, onVisibleChange, copy, onStayHere, onSwitchSite, styles: customStyles, currentRegion, className, titleTag, }: RegionBannerProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- "use strict";"use client";var l=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var u=(o,t)=>{for(var i in t)l(o,i,{get:t[i],enumerable:!0})},C=(o,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of h(t))!b.call(o,r)&&r!==i&&l(o,r,{get:()=>t[r],enumerable:!(a=x(t,r))||a.enumerable});return o};var f=o=>C(l({},"__esModule",{value:!0}),o);var y={};u(y,{RegionBanner:()=>m});module.exports=f(y);var e=require("react/jsx-runtime");const w={backgroundColor:"#fff",buttonBorderRadius:"9999px",fontSize:"14px",stayButtonBgColor:"#000",stayButtonTextColor:"#fff",switchButtonBorderColor:"#000",switchButtonTextColor:"#000",maxWidth:"1664px"};function m({visible:o,onVisibleChange:t,copy:i,onStayHere:a,onSwitchSite:r,styles:d,currentRegion:s,className:g}){const n={...w,...d};if(!o)return null;const p=()=>{a(),t(!1)},c=()=>{a(),t(!1)};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("style",{children:`
1
+ "use strict";"use client";var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var f=(o,t)=>{for(var i in t)l(o,i,{get:t[i],enumerable:!0})},w=(o,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!C.call(o,r)&&r!==i&&l(o,r,{get:()=>t[r],enumerable:!(a=b(t,r))||a.enumerable});return o};var m=o=>w(l({},"__esModule",{value:!0}),o);var v={};f(v,{RegionBanner:()=>B});module.exports=m(v);var e=require("react/jsx-runtime"),d=require("../../components/index.js");const y={backgroundColor:"#fff",buttonBorderRadius:"9999px",fontSize:"14px",stayButtonBgColor:"#000",stayButtonTextColor:"#fff",switchButtonBorderColor:"#000",switchButtonTextColor:"#000",maxWidth:"1664px"};function B({visible:o,onVisibleChange:t,copy:i,onStayHere:a,onSwitchSite:r,styles:g,currentRegion:s,className:p,titleTag:c="h2"}){const n={...y,...g};if(!o)return null;const x=()=>{a(),t(!1)},h=()=>{a(),t(!1)};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("style",{children:`
2
2
  .region-banner-wrapper {
3
3
  height: auto;
4
4
  min-height: 74px;
@@ -22,7 +22,7 @@
22
22
  height: auto;
23
23
  margin-top: 8px;
24
24
  }
25
- .region-banner-content h1 {
25
+ .region-banner-content .region-banner-title {
26
26
  flex: 1;
27
27
  min-width: 0;
28
28
  }
@@ -64,5 +64,5 @@
64
64
  max-width: 623px;
65
65
  }
66
66
  }
67
- `}),(0,e.jsx)("div",{className:`region-banner-wrapper relative left-0 top-0 w-full ${g||""}`,style:{backgroundColor:n.backgroundColor,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",zIndex:1e3},children:(0,e.jsxs)("div",{className:"region-banner-content flex h-full justify-between text-black",children:[(0,e.jsxs)("div",{className:"region-banner-title-row",children:[(0,e.jsx)("h1",{className:"region-banner-title font-bold",style:{fontSize:n.fontSize,color:"#1F2021"},children:i.message}),(0,e.jsx)("button",{onClick:c,className:"region-banner-close-btn inline-flex size-[28px] items-center justify-center rounded-full hover:bg-[#f5f5f5] focus:outline-none",style:{color:"#767880"},"aria-label":"Close",children:(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,e.jsxs)("div",{className:"l-tablet:ml-0 l-tablet:mb-[8px] ml-4 flex gap-3",children:[(0,e.jsxs)("button",{onClick:p,className:"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80",style:{backgroundColor:n.stayButtonBgColor,color:n.stayButtonTextColor,fontWeight:"700",fontSize:n.fontSize,borderRadius:n.buttonBorderRadius,border:"none"},children:[s?.icon&&(0,e.jsx)("img",{src:s.icon,alt:"",style:{width:"16px",height:"16px",borderRadius:"100%"}}),i.stayButtonText]}),(0,e.jsxs)("button",{onClick:r,className:"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80",style:{backgroundColor:"transparent",color:n.switchButtonTextColor,border:`1.6px solid ${n.switchButtonBorderColor}`,fontWeight:"700",fontSize:n.fontSize,borderRadius:n.buttonBorderRadius},children:[(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M8.29883 1.2041C12.216 1.20425 15.3923 4.37181 15.3926 8.28027C15.3926 12.189 12.2162 15.3563 8.29883 15.3564C4.38145 15.3563 1.2041 12.189 1.2041 8.28027C1.20439 4.37183 4.38163 1.20428 8.29883 1.2041ZM3.58105 11.4795C4.31053 12.5471 5.39411 13.3542 6.66406 13.7324C6.21155 13.0301 5.86128 12.2699 5.60938 11.4795H3.58105ZM11.0166 11.4795C10.7696 12.2779 10.4256 13.0347 9.98438 13.7178C11.2325 13.3333 12.2971 12.5331 13.0166 11.4795H11.0166ZM7.0791 11.4795C7.3755 12.2654 7.78717 12.9997 8.31445 13.6455C8.83791 13.0305 9.25428 12.2929 9.55273 11.4795H7.0791ZM2.85645 6.56738C2.6854 7.10801 2.59283 7.68338 2.59277 8.28027C2.59277 8.91383 2.69891 9.52251 2.89063 10.0918H5.27148C5.15636 9.42693 5.10277 8.75388 5.11133 8.08789C5.11789 7.57837 5.1619 7.06931 5.23926 6.56738L2.85645 6.56738ZM11.3447 6.56738C11.4483 7.20036 11.4944 7.84036 11.4863 8.47363C11.4793 9.01629 11.4291 9.55828 11.3418 10.0918H13.707C13.8986 9.52259 14.0039 8.91374 14.0039 8.28027C14.0039 7.68337 13.9112 7.10802 13.7402 6.56738H11.3447ZM6.64648 6.56738C6.55761 7.06802 6.50673 7.58339 6.5 8.10547C6.49143 8.7725 6.55341 9.44067 6.68359 10.0918L9.93457 10.0918C10.0348 9.56074 10.0905 9.01207 10.0977 8.45605C10.1058 7.82231 10.0497 7.18763 9.93262 6.56738L6.64648 6.56738ZM6.6123 2.84277C5.32602 3.23909 4.23535 4.07819 3.51563 5.17969L5.5498 5.17969C5.79857 4.34514 6.15294 3.55384 6.6123 2.84277ZM9.93262 2.8291C10.4039 3.56047 10.7656 4.35407 11.0195 5.17969H13.0811C12.3519 4.06343 11.2413 3.21866 9.93262 2.8291ZM8.28223 2.91504C7.73775 3.55467 7.30932 4.32752 7.00879 5.17969L9.55566 5.17969C9.25672 4.35642 8.83179 3.58782 8.28223 2.91504Z",fill:"currentColor"})}),i.switchButtonText]})]})]})})]})}
67
+ `}),(0,e.jsx)("div",{className:`region-banner-wrapper relative left-0 top-0 w-full ${p||""}`,style:{backgroundColor:n.backgroundColor,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",zIndex:1e3},children:(0,e.jsxs)("div",{className:"region-banner-content flex h-full justify-between text-black",children:[(0,e.jsxs)("div",{className:"region-banner-title-row",children:[(0,e.jsx)(d.Heading,{as:c,size:2,className:"region-banner-title font-bold",style:{fontSize:n.fontSize,color:"#1F2021"},children:i.message}),(0,e.jsx)("button",{onClick:h,className:"region-banner-close-btn inline-flex size-[28px] items-center justify-center rounded-full hover:bg-[#f5f5f5] focus:outline-none",style:{color:"#767880"},"aria-label":"Close",children:(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,e.jsxs)("div",{className:"l-tablet:ml-0 l-tablet:mb-[8px] ml-4 flex gap-3",children:[(0,e.jsxs)("button",{onClick:x,className:"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80",style:{backgroundColor:n.stayButtonBgColor,color:n.stayButtonTextColor,fontWeight:"700",fontSize:n.fontSize,borderRadius:n.buttonBorderRadius,border:"none"},children:[s?.icon&&(0,e.jsx)("img",{src:s.icon,alt:"",style:{width:"16px",height:"16px",borderRadius:"100%"}}),i.stayButtonText]}),(0,e.jsxs)("button",{onClick:r,className:"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80",style:{backgroundColor:"transparent",color:n.switchButtonTextColor,border:`1.6px solid ${n.switchButtonBorderColor}`,fontWeight:"700",fontSize:n.fontSize,borderRadius:n.buttonBorderRadius},children:[(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M8.29883 1.2041C12.216 1.20425 15.3923 4.37181 15.3926 8.28027C15.3926 12.189 12.2162 15.3563 8.29883 15.3564C4.38145 15.3563 1.2041 12.189 1.2041 8.28027C1.20439 4.37183 4.38163 1.20428 8.29883 1.2041ZM3.58105 11.4795C4.31053 12.5471 5.39411 13.3542 6.66406 13.7324C6.21155 13.0301 5.86128 12.2699 5.60938 11.4795H3.58105ZM11.0166 11.4795C10.7696 12.2779 10.4256 13.0347 9.98438 13.7178C11.2325 13.3333 12.2971 12.5331 13.0166 11.4795H11.0166ZM7.0791 11.4795C7.3755 12.2654 7.78717 12.9997 8.31445 13.6455C8.83791 13.0305 9.25428 12.2929 9.55273 11.4795H7.0791ZM2.85645 6.56738C2.6854 7.10801 2.59283 7.68338 2.59277 8.28027C2.59277 8.91383 2.69891 9.52251 2.89063 10.0918H5.27148C5.15636 9.42693 5.10277 8.75388 5.11133 8.08789C5.11789 7.57837 5.1619 7.06931 5.23926 6.56738L2.85645 6.56738ZM11.3447 6.56738C11.4483 7.20036 11.4944 7.84036 11.4863 8.47363C11.4793 9.01629 11.4291 9.55828 11.3418 10.0918H13.707C13.8986 9.52259 14.0039 8.91374 14.0039 8.28027C14.0039 7.68337 13.9112 7.10802 13.7402 6.56738H11.3447ZM6.64648 6.56738C6.55761 7.06802 6.50673 7.58339 6.5 8.10547C6.49143 8.7725 6.55341 9.44067 6.68359 10.0918L9.93457 10.0918C10.0348 9.56074 10.0905 9.01207 10.0977 8.45605C10.1058 7.82231 10.0497 7.18763 9.93262 6.56738L6.64648 6.56738ZM6.6123 2.84277C5.32602 3.23909 4.23535 4.07819 3.51563 5.17969L5.5498 5.17969C5.79857 4.34514 6.15294 3.55384 6.6123 2.84277ZM9.93262 2.8291C10.4039 3.56047 10.7656 4.35407 11.0195 5.17969H13.0811C12.3519 4.06343 11.2413 3.21866 9.93262 2.8291ZM8.28223 2.91504C7.73775 3.55467 7.30932 4.32752 7.00879 5.17969L9.55566 5.17969C9.25672 4.35642 8.83179 3.58782 8.28223 2.91504Z",fill:"currentColor"})}),i.switchButtonText]})]})]})})]})}
68
68
  //# sourceMappingURL=RegionBanner.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/IPRedirect/RegionBanner.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport type { RegionConfig, IPRedirectBannerCopy } from './type.js'\n\n/** \u6A2A\u5E45\u6837\u5F0F\u914D\u7F6E */\nexport type RegionBannerStyles = {\n /** \u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #fff */\n backgroundColor?: string\n /** \u6309\u94AE\u5706\u89D2\uFF0C\u9ED8\u8BA4 9999px */\n buttonBorderRadius?: string\n /** \u6587\u6848\u5B57\u53F7\uFF0C\u9ED8\u8BA4 14px */\n fontSize?: string\n /** Stay Here \u6309\u94AE\u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #000 */\n stayButtonBgColor?: string\n /** Stay Here \u6309\u94AE\u6587\u5B57\u989C\u8272\uFF0C\u9ED8\u8BA4 #fff */\n stayButtonTextColor?: string\n /** Switch Site \u6309\u94AE\u8FB9\u6846\u989C\u8272\uFF0C\u9ED8\u8BA4 #000 */\n switchButtonBorderColor?: string\n /** Switch Site \u6309\u94AE\u6587\u5B57\u989C\u8272\uFF0C\u9ED8\u8BA4 #000 */\n switchButtonTextColor?: string\n /** \u5927\u5C4F\u5E55\uFF08\u22651920px\uFF09\u6700\u5927\u5BBD\u5EA6\uFF0C\u9ED8\u8BA4 1664px */\n maxWidth?: string\n}\n\nexport type RegionBannerProps = {\n /** \u63A7\u5236\u6A2A\u5E45\u663E\u793A/\u9690\u85CF */\n visible: boolean\n /** \u6A2A\u5E45\u72B6\u6001\u53D8\u5316\u56DE\u8C03 */\n onVisibleChange: (visible: boolean) => void\n /** \u6587\u6848\u914D\u7F6E */\n copy: IPRedirectBannerCopy\n /** \u70B9\u51FB Stay Here \u6309\u94AE\u7684\u56DE\u8C03 */\n onStayHere: () => void\n /** \u70B9\u51FB Switch Site \u6309\u94AE\u7684\u56DE\u8C03 */\n onSwitchSite: () => void\n /** \u6837\u5F0F\u914D\u7F6E */\n styles?: RegionBannerStyles\n /** \u5F53\u524D\u7AD9\u70B9\u5730\u533A\u914D\u7F6E\uFF08\u7528\u4E8E\u663E\u793A\u56FD\u65D7\u56FE\u6807\uFF09 */\n currentRegion?: RegionConfig\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n\n// \u9ED8\u8BA4\u6837\u5F0F\nconst defaultStyles: Required<RegionBannerStyles> = {\n backgroundColor: '#fff',\n buttonBorderRadius: '9999px',\n fontSize: '14px',\n stayButtonBgColor: '#000',\n stayButtonTextColor: '#fff',\n switchButtonBorderColor: '#000',\n switchButtonTextColor: '#000',\n maxWidth: '1664px',\n}\n\nexport function RegionBanner({\n visible,\n onVisibleChange,\n copy,\n onStayHere,\n onSwitchSite,\n styles: customStyles,\n currentRegion,\n className,\n}: RegionBannerProps) {\n // \u5408\u5E76\u6837\u5F0F\n const styles = { ...defaultStyles, ...customStyles }\n\n if (!visible) return null\n\n const handleStayHere = () => {\n onStayHere()\n onVisibleChange(false)\n }\n\n const handleClose = () => {\n // \u5173\u95ED\u6309\u94AE\u548C Stay Here \u6309\u94AE\u884C\u4E3A\u4E00\u81F4\n onStayHere()\n onVisibleChange(false)\n }\n\n return (\n <>\n <style>{`\n .region-banner-wrapper {\n height: auto;\n min-height: 74px;\n }\n @media (min-width: 1024px) {\n .region-banner-wrapper {\n height: 54px;\n }\n }\n .region-banner-content {\n padding: 0 12px;\n flex-direction: column;\n gap: 8px;\n align-items: flex-start;\n }\n .region-banner-title-row {\n display: flex;\n align-items: center;\n width: 100%;\n gap: 8px;\n height: auto;\n margin-top: 8px;\n }\n .region-banner-content h1 {\n flex: 1;\n min-width: 0;\n }\n .region-banner-close-btn {\n position: static;\n flex-shrink: 0;\n }\n @media (min-width: 1024px) {\n .region-banner-content {\n padding: 0 64px;\n flex-direction: row;\n align-items: center;\n }\n .region-banner-title-row {\n flex: 1;\n height: 20px;\n }\n .region-banner-close-btn {\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translateY(-50%);\n }\n }\n @media (min-width: 1920px) {\n .region-banner-wrapper {\n display: flex;\n justify-content: center;\n }\n .region-banner-content {\n max-width: ${styles.maxWidth};\n width: 100%;\n position: relative;\n padding-left: 0px;\n }\n }\n @media (min-width: 1025px) and (max-width: 1440px) {\n .region-banner-title {\n max-width: 623px;\n }\n }\n `}</style>\n\n <div\n className={`region-banner-wrapper relative left-0 top-0 w-full ${className || ''}`}\n style={{ backgroundColor: styles.backgroundColor, boxShadow: '0 2px 8px rgba(0,0,0,0.1)', zIndex: 1000 }}\n >\n <div className=\"region-banner-content flex h-full justify-between text-black\">\n <div className=\"region-banner-title-row\">\n <h1 className=\"region-banner-title font-bold\" style={{ fontSize: styles.fontSize, color: '#1F2021' }}>\n {copy.message}\n </h1>\n\n {/* \u5173\u95ED\u6309\u94AE */}\n <button\n onClick={handleClose}\n className=\"region-banner-close-btn inline-flex size-[28px] items-center justify-center rounded-full hover:bg-[#f5f5f5] focus:outline-none\"\n style={{ color: '#767880' }}\n aria-label=\"Close\"\n >\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n\n <div className=\"l-tablet:ml-0 l-tablet:mb-[8px] ml-4 flex gap-3\">\n {/* Stay Here \u6309\u94AE */}\n <button\n onClick={handleStayHere}\n className=\"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80\"\n style={{\n backgroundColor: styles.stayButtonBgColor,\n color: styles.stayButtonTextColor,\n fontWeight: '700',\n fontSize: styles.fontSize,\n borderRadius: styles.buttonBorderRadius,\n border: 'none',\n }}\n >\n {currentRegion?.icon && (\n <img src={currentRegion.icon} alt=\"\" style={{ width: '16px', height: '16px', borderRadius: '100%' }} />\n )}\n {copy.stayButtonText}\n </button>\n\n {/* Switch Site \u6309\u94AE */}\n <button\n onClick={onSwitchSite}\n className=\"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80\"\n style={{\n backgroundColor: 'transparent',\n color: styles.switchButtonTextColor,\n border: `1.6px solid ${styles.switchButtonBorderColor}`,\n fontWeight: '700',\n fontSize: styles.fontSize,\n borderRadius: styles.buttonBorderRadius,\n }}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.29883 1.2041C12.216 1.20425 15.3923 4.37181 15.3926 8.28027C15.3926 12.189 12.2162 15.3563 8.29883 15.3564C4.38145 15.3563 1.2041 12.189 1.2041 8.28027C1.20439 4.37183 4.38163 1.20428 8.29883 1.2041ZM3.58105 11.4795C4.31053 12.5471 5.39411 13.3542 6.66406 13.7324C6.21155 13.0301 5.86128 12.2699 5.60938 11.4795H3.58105ZM11.0166 11.4795C10.7696 12.2779 10.4256 13.0347 9.98438 13.7178C11.2325 13.3333 12.2971 12.5331 13.0166 11.4795H11.0166ZM7.0791 11.4795C7.3755 12.2654 7.78717 12.9997 8.31445 13.6455C8.83791 13.0305 9.25428 12.2929 9.55273 11.4795H7.0791ZM2.85645 6.56738C2.6854 7.10801 2.59283 7.68338 2.59277 8.28027C2.59277 8.91383 2.69891 9.52251 2.89063 10.0918H5.27148C5.15636 9.42693 5.10277 8.75388 5.11133 8.08789C5.11789 7.57837 5.1619 7.06931 5.23926 6.56738L2.85645 6.56738ZM11.3447 6.56738C11.4483 7.20036 11.4944 7.84036 11.4863 8.47363C11.4793 9.01629 11.4291 9.55828 11.3418 10.0918H13.707C13.8986 9.52259 14.0039 8.91374 14.0039 8.28027C14.0039 7.68337 13.9112 7.10802 13.7402 6.56738H11.3447ZM6.64648 6.56738C6.55761 7.06802 6.50673 7.58339 6.5 8.10547C6.49143 8.7725 6.55341 9.44067 6.68359 10.0918L9.93457 10.0918C10.0348 9.56074 10.0905 9.01207 10.0977 8.45605C10.1058 7.82231 10.0497 7.18763 9.93262 6.56738L6.64648 6.56738ZM6.6123 2.84277C5.32602 3.23909 4.23535 4.07819 3.51563 5.17969L5.5498 5.17969C5.79857 4.34514 6.15294 3.55384 6.6123 2.84277ZM9.93262 2.8291C10.4039 3.56047 10.7656 4.35407 11.0195 5.17969H13.0811C12.3519 4.06343 11.2413 3.21866 9.93262 2.8291ZM8.28223 2.91504C7.73775 3.55467 7.30932 4.32752 7.00879 5.17969L9.55566 5.17969C9.25672 4.35642 8.83179 3.58782 8.28223 2.91504Z\"\n fill=\"currentColor\"\n />\n </svg>\n {copy.switchButtonText}\n </button>\n </div>\n </div>\n </div>\n </>\n )\n}\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAkFI,IAAAI,EAAA,6BAtCJ,MAAMC,EAA8C,CAClD,gBAAiB,OACjB,mBAAoB,SACpB,SAAU,OACV,kBAAmB,OACnB,oBAAqB,OACrB,wBAAyB,OACzB,sBAAuB,OAC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BAChE,mBAAC,QACC,EAAE,uCACF,OAAO,eACP,YAAY,MACZ,cAAc,QACd,eAAe,QACjB,EACF,EACF,GACF,KAEA,QAAC,OAAI,UAAU,kDAEb,qBAAC,UACC,QAASD,EACT,UAAU,2FACV,MAAO,CACL,gBAAiBD,EAAO,kBACxB,MAAOA,EAAO,oBACd,WAAY,MACZ,SAAUA,EAAO,SACjB,aAAcA,EAAO,mBACrB,OAAQ,MACV,EAEC,UAAAF,GAAe,SACd,OAAC,OAAI,IAAKA,EAAc,KAAM,IAAI,GAAG,MAAO,CAAE,MAAO,OAAQ,OAAQ,OAAQ,aAAc,MAAO,EAAG,EAEtGJ,EAAK,gBACR,KAGA,QAAC,UACC,QAASE,EACT,UAAU,2FACV,MAAO,CACL,gBAAiB,cACjB,MAAOI,EAAO,sBACd,OAAQ,eAAeA,EAAO,uBAAuB,GACrD,WAAY,MACZ,SAAUA,EAAO,SACjB,aAAcA,EAAO,kBACvB,EAEA,oBAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,mBAAC,QACC,EAAE,8lDACF,KAAK,eACP,EACF,EACCN,EAAK,kBACR,GACF,GACF,EACF,GACF,CAEJ",
6
- "names": ["RegionBanner_exports", "__export", "RegionBanner", "__toCommonJS", "import_jsx_runtime", "defaultStyles", "visible", "onVisibleChange", "copy", "onStayHere", "onSwitchSite", "customStyles", "currentRegion", "className", "styles", "handleStayHere", "handleClose"]
4
+ "sourcesContent": ["'use client'\n\nimport type { RegionConfig, IPRedirectBannerCopy } from './type.js'\nimport { Heading } from '../../components/index.js'\n\n/** \u6A2A\u5E45\u6837\u5F0F\u914D\u7F6E */\nexport type RegionBannerStyles = {\n /** \u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #fff */\n backgroundColor?: string\n /** \u6309\u94AE\u5706\u89D2\uFF0C\u9ED8\u8BA4 9999px */\n buttonBorderRadius?: string\n /** \u6587\u6848\u5B57\u53F7\uFF0C\u9ED8\u8BA4 14px */\n fontSize?: string\n /** Stay Here \u6309\u94AE\u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #000 */\n stayButtonBgColor?: string\n /** Stay Here \u6309\u94AE\u6587\u5B57\u989C\u8272\uFF0C\u9ED8\u8BA4 #fff */\n stayButtonTextColor?: string\n /** Switch Site \u6309\u94AE\u8FB9\u6846\u989C\u8272\uFF0C\u9ED8\u8BA4 #000 */\n switchButtonBorderColor?: string\n /** Switch Site \u6309\u94AE\u6587\u5B57\u989C\u8272\uFF0C\u9ED8\u8BA4 #000 */\n switchButtonTextColor?: string\n /** \u5927\u5C4F\u5E55\uFF08\u22651920px\uFF09\u6700\u5927\u5BBD\u5EA6\uFF0C\u9ED8\u8BA4 1664px */\n maxWidth?: string\n}\n\nexport type RegionBannerProps = {\n /** \u63A7\u5236\u6A2A\u5E45\u663E\u793A/\u9690\u85CF */\n visible: boolean\n /** \u6A2A\u5E45\u72B6\u6001\u53D8\u5316\u56DE\u8C03 */\n onVisibleChange: (visible: boolean) => void\n /** \u6587\u6848\u914D\u7F6E */\n copy: IPRedirectBannerCopy\n /** \u70B9\u51FB Stay Here \u6309\u94AE\u7684\u56DE\u8C03 */\n onStayHere: () => void\n /** \u70B9\u51FB Switch Site \u6309\u94AE\u7684\u56DE\u8C03 */\n onSwitchSite: () => void\n /** \u6837\u5F0F\u914D\u7F6E */\n styles?: RegionBannerStyles\n /** \u5F53\u524D\u7AD9\u70B9\u5730\u533A\u914D\u7F6E\uFF08\u7528\u4E8E\u663E\u793A\u56FD\u65D7\u56FE\u6807\uFF09 */\n currentRegion?: RegionConfig\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u6807\u9898\u6807\u7B7E\u7C7B\u578B\uFF0C\u9ED8\u8BA4 h2 */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\n// \u9ED8\u8BA4\u6837\u5F0F\nconst defaultStyles: Required<RegionBannerStyles> = {\n backgroundColor: '#fff',\n buttonBorderRadius: '9999px',\n fontSize: '14px',\n stayButtonBgColor: '#000',\n stayButtonTextColor: '#fff',\n switchButtonBorderColor: '#000',\n switchButtonTextColor: '#000',\n maxWidth: '1664px',\n}\n\nexport function RegionBanner({\n visible,\n onVisibleChange,\n copy,\n onStayHere,\n onSwitchSite,\n styles: customStyles,\n currentRegion,\n className,\n titleTag = 'h2',\n}: RegionBannerProps) {\n // \u5408\u5E76\u6837\u5F0F\n const styles = { ...defaultStyles, ...customStyles }\n\n if (!visible) return null\n\n const handleStayHere = () => {\n onStayHere()\n onVisibleChange(false)\n }\n\n const handleClose = () => {\n // \u5173\u95ED\u6309\u94AE\u548C Stay Here \u6309\u94AE\u884C\u4E3A\u4E00\u81F4\n onStayHere()\n onVisibleChange(false)\n }\n\n return (\n <>\n <style>{`\n .region-banner-wrapper {\n height: auto;\n min-height: 74px;\n }\n @media (min-width: 1024px) {\n .region-banner-wrapper {\n height: 54px;\n }\n }\n .region-banner-content {\n padding: 0 12px;\n flex-direction: column;\n gap: 8px;\n align-items: flex-start;\n }\n .region-banner-title-row {\n display: flex;\n align-items: center;\n width: 100%;\n gap: 8px;\n height: auto;\n margin-top: 8px;\n }\n .region-banner-content .region-banner-title {\n flex: 1;\n min-width: 0;\n }\n .region-banner-close-btn {\n position: static;\n flex-shrink: 0;\n }\n @media (min-width: 1024px) {\n .region-banner-content {\n padding: 0 64px;\n flex-direction: row;\n align-items: center;\n }\n .region-banner-title-row {\n flex: 1;\n height: 20px;\n }\n .region-banner-close-btn {\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translateY(-50%);\n }\n }\n @media (min-width: 1920px) {\n .region-banner-wrapper {\n display: flex;\n justify-content: center;\n }\n .region-banner-content {\n max-width: ${styles.maxWidth};\n width: 100%;\n position: relative;\n padding-left: 0px;\n }\n }\n @media (min-width: 1025px) and (max-width: 1440px) {\n .region-banner-title {\n max-width: 623px;\n }\n }\n `}</style>\n\n <div\n className={`region-banner-wrapper relative left-0 top-0 w-full ${className || ''}`}\n style={{ backgroundColor: styles.backgroundColor, boxShadow: '0 2px 8px rgba(0,0,0,0.1)', zIndex: 1000 }}\n >\n <div className=\"region-banner-content flex h-full justify-between text-black\">\n <div className=\"region-banner-title-row\">\n <Heading\n as={titleTag}\n size={2}\n className=\"region-banner-title font-bold\"\n style={{ fontSize: styles.fontSize, color: '#1F2021' }}\n >\n {copy.message}\n </Heading>\n\n {/* \u5173\u95ED\u6309\u94AE */}\n <button\n onClick={handleClose}\n className=\"region-banner-close-btn inline-flex size-[28px] items-center justify-center rounded-full hover:bg-[#f5f5f5] focus:outline-none\"\n style={{ color: '#767880' }}\n aria-label=\"Close\"\n >\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n\n <div className=\"l-tablet:ml-0 l-tablet:mb-[8px] ml-4 flex gap-3\">\n {/* Stay Here \u6309\u94AE */}\n <button\n onClick={handleStayHere}\n className=\"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80\"\n style={{\n backgroundColor: styles.stayButtonBgColor,\n color: styles.stayButtonTextColor,\n fontWeight: '700',\n fontSize: styles.fontSize,\n borderRadius: styles.buttonBorderRadius,\n border: 'none',\n }}\n >\n {currentRegion?.icon && (\n <img src={currentRegion.icon} alt=\"\" style={{ width: '16px', height: '16px', borderRadius: '100%' }} />\n )}\n {copy.stayButtonText}\n </button>\n\n {/* Switch Site \u6309\u94AE */}\n <button\n onClick={onSwitchSite}\n className=\"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80\"\n style={{\n backgroundColor: 'transparent',\n color: styles.switchButtonTextColor,\n border: `1.6px solid ${styles.switchButtonBorderColor}`,\n fontWeight: '700',\n fontSize: styles.fontSize,\n borderRadius: styles.buttonBorderRadius,\n }}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.29883 1.2041C12.216 1.20425 15.3923 4.37181 15.3926 8.28027C15.3926 12.189 12.2162 15.3563 8.29883 15.3564C4.38145 15.3563 1.2041 12.189 1.2041 8.28027C1.20439 4.37183 4.38163 1.20428 8.29883 1.2041ZM3.58105 11.4795C4.31053 12.5471 5.39411 13.3542 6.66406 13.7324C6.21155 13.0301 5.86128 12.2699 5.60938 11.4795H3.58105ZM11.0166 11.4795C10.7696 12.2779 10.4256 13.0347 9.98438 13.7178C11.2325 13.3333 12.2971 12.5331 13.0166 11.4795H11.0166ZM7.0791 11.4795C7.3755 12.2654 7.78717 12.9997 8.31445 13.6455C8.83791 13.0305 9.25428 12.2929 9.55273 11.4795H7.0791ZM2.85645 6.56738C2.6854 7.10801 2.59283 7.68338 2.59277 8.28027C2.59277 8.91383 2.69891 9.52251 2.89063 10.0918H5.27148C5.15636 9.42693 5.10277 8.75388 5.11133 8.08789C5.11789 7.57837 5.1619 7.06931 5.23926 6.56738L2.85645 6.56738ZM11.3447 6.56738C11.4483 7.20036 11.4944 7.84036 11.4863 8.47363C11.4793 9.01629 11.4291 9.55828 11.3418 10.0918H13.707C13.8986 9.52259 14.0039 8.91374 14.0039 8.28027C14.0039 7.68337 13.9112 7.10802 13.7402 6.56738H11.3447ZM6.64648 6.56738C6.55761 7.06802 6.50673 7.58339 6.5 8.10547C6.49143 8.7725 6.55341 9.44067 6.68359 10.0918L9.93457 10.0918C10.0348 9.56074 10.0905 9.01207 10.0977 8.45605C10.1058 7.82231 10.0497 7.18763 9.93262 6.56738L6.64648 6.56738ZM6.6123 2.84277C5.32602 3.23909 4.23535 4.07819 3.51563 5.17969L5.5498 5.17969C5.79857 4.34514 6.15294 3.55384 6.6123 2.84277ZM9.93262 2.8291C10.4039 3.56047 10.7656 4.35407 11.0195 5.17969H13.0811C12.3519 4.06343 11.2413 3.21866 9.93262 2.8291ZM8.28223 2.91504C7.73775 3.55467 7.30932 4.32752 7.00879 5.17969L9.55566 5.17969C9.25672 4.35642 8.83179 3.58782 8.28223 2.91504Z\"\n fill=\"currentColor\"\n />\n </svg>\n {copy.switchButtonText}\n </button>\n </div>\n </div>\n </div>\n </>\n )\n}\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAsFI,IAAAI,EAAA,6BAnFJC,EAAwB,qCA4CxB,MAAMC,EAA8C,CAClD,gBAAiB,OACjB,mBAAoB,SACpB,SAAU,OACV,kBAAmB,OACnB,oBAAqB,OACrB,wBAAyB,OACzB,sBAAuB,OACvB,SAAU,QACZ,EAEO,SAASJ,EAAa,CAC3B,QAAAK,EACA,gBAAAC,EACA,KAAAC,EACA,WAAAC,EACA,aAAAC,EACA,OAAQC,EACR,cAAAC,EACA,UAAAC,EACA,SAAAC,EAAW,IACb,EAAsB,CAEpB,MAAMC,EAAS,CAAE,GAAGV,EAAe,GAAGM,CAAa,EAEnD,GAAI,CAACL,EAAS,OAAO,KAErB,MAAMU,EAAiB,IAAM,CAC3BP,EAAW,EACXF,EAAgB,EAAK,CACvB,EAEMU,EAAc,IAAM,CAExBR,EAAW,EACXF,EAAgB,EAAK,CACvB,EAEA,SACE,oBACE,oBAAC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AC,QACC,EAAE,8lDACF,KAAK,eACP,EACF,EACCP,EAAK,kBACR,GACF,GACF,EACF,GACF,CAEJ",
6
+ "names": ["RegionBanner_exports", "__export", "RegionBanner", "__toCommonJS", "import_jsx_runtime", "import_components", "defaultStyles", "visible", "onVisibleChange", "copy", "onStayHere", "onSwitchSite", "customStyles", "currentRegion", "className", "titleTag", "styles", "handleStayHere", "handleClose"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var ue=Object.create;var S=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var ge=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty;var be=(n,p)=>{for(var g in p)S(n,g,{get:p[g],enumerable:!0})},U=(n,p,g,b)=>{if(p&&typeof p=="object"||typeof p=="function")for(let v of he(p))!ve.call(n,v)&&v!==g&&S(n,v,{get:()=>p[v],enumerable:!(b=fe(p,v))||b.enumerable});return n};var we=(n,p,g)=>(g=n!=null?ue(ge(n)):{},U(p||!n||!n.__esModule?S(g,"default",{value:n,enumerable:!0}):g,n)),_e=n=>U(S({},"__esModule",{value:!0}),n);var Te={};be(Te,{default:()=>Ne});module.exports=_e(Te);var e=require("react/jsx-runtime"),a=we(require("react")),r=require("../../components/index.js"),l=require("../../helpers/utils.js"),ee=require("../../shared/Styles.js"),te=require("../../hooks/useExposure.js"),ie=require("../../hooks/useIntersectionObserver.js"),ae=require("../AiuiProvider/index.js"),k=require("framer-motion");const ye="image",ke="image_with_text",X=(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,e.jsx)("path",{d:"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z",fill:"currentColor"})}),Y=a.default.forwardRef(({data:n,className:p},g)=>{const{title:b,subtitle:v,desc:_,descIcon:M,image:N,padImage:z,mobileImage:E,theme:oe="dark",items:H=[],layout:le="left",mediaType:se="image",datalist:d=[],video:j,padVideo:R,mobVideo:W,button:w,textAlign:m="left"}=n,i=le,{locale:C="us"}=(0,ae.useAiuiContext)(),D=(0,a.useRef)(null),I=(0,a.useRef)(null),L=(0,a.useRef)(null),P=(0,a.useRef)(null),A=(0,a.useRef)(null),[u,re]=(0,a.useState)(0),q=(0,a.useRef)([]),[$,ne]=(0,a.useState)({left:0,width:0}),[y,B]=(0,a.useState)(""),[F,O]=(0,a.useState)(""),[Z,G]=(0,a.useState)(""),c=d.length>0,T=se==="video";(0,te.useExposure)(D,{componentType:ye,componentName:ke,componentTitle:b,componentDescription:v}),(0,a.useImperativeHandle)(g,()=>D.current),(0,a.useEffect)(()=>{if(d.length>0){const t=q.current[u];if(t){const{offsetLeft:s,offsetWidth:o}=t;ne({left:s,width:o})}}},[u,d.length]);const[J,me]=(0,a.useState)(!1);(0,ie.useIntersectionObserverDelay)(A,{once:!0,threshold:.01,callback:()=>{me(!0)}}),(0,a.useEffect)(()=>{if(!J||!T)return;let t="",s="",o="";if(c&&d[u]){const f=d[u];t=f.video?.url||"",s=f.padVideo?.url||t,o=f.mobVideo?.url||t}else t=j?.url||"",s=R?.url||t,o=W?.url||t;t&&B(t),s&&O(s),o&&G(o),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},200)},[J,T,c,u,d,j?.url,R?.url,W?.url]);const de=(t,s)=>{if(re(t),s.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),T&&c&&d[t]){const o=d[t];o.video?.url&&B(o.video.url),o.padVideo?.url&&O(o.padVideo.url),o.mobVideo?.url&&G(o.mobVideo.url),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},300)}},pe=()=>!V||!w?.text||i==="top"||i==="bottom"?null:(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]",{"flex justify-center":m==="center","flex justify-start":m==="left"}),children:(0,e.jsx)(r.Link,{href:(0,l.getLocalizedPath)(w.link||"",C),className:"image-with-text__button whitespace-nowrap no-underline",suffixIcon:X,children:w.text})}),x=H.length>0,V=!!w,K=()=>{if(c&&d[u]){const t=d[u];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return N?`${N?.url},${z?.url||N?.url} 1024, ${E?.url||N?.url} 768`:""},Q=()=>{if(c){const f=d[u],h=f.image?.url,ce=f.imgPad?.url||h,xe=f.imageMob?.url||h;return(0,e.jsx)(k.AnimatePresence,{mode:"wait",children:(0,e.jsx)(k.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__video-motion absolute left-0 top-0 w-full",children:(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:h,src:y,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:ce,src:F||y,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:xe,src:Z||y,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},f.video?.url||f.image?.url)})}const t=N?.url,s=z?.url||t,o=E?.url||t;return(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:y,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:s,src:F||y,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:o,src:Z||y,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return(0,e.jsxs)("section",{ref:D,"data-ui-component-id":"ImageWithText",className:(0,l.cn)("image-with-text text-info-primary",{"flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!c,"flex-col":!c&&(i==="top"||i==="bottom"),"items-center":i==="left"||i==="right","flex-col laptop:flex-row":!c&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":c,"aiui-dark":oe==="dark"},p),children:[c&&(b||_||d.length>0)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":m==="left","text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:"image-with-text__header",children:[(0,e.jsx)(r.Heading,{as:"h3",size:4,html:b,className:"image-with-text__title"}),(0,e.jsx)(r.Text,{as:"p",size:1,html:_,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":m==="center"}),children:(0,e.jsxs)("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[(0,e.jsx)("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:$.left,width:$.width}}),d.map((t,s)=>(0,e.jsx)("div",{ref:o=>{q.current[s]=o},onClick:o=>de(s,o),className:(0,l.cn)("image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]",u===s?"image-with-text__tab--active text-black":"text-white"),children:(0,e.jsx)(r.Heading,{as:"h1",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},s))]})})]}),!c&&(b||v||_)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__content flex w-full flex-col",{"justify-center":!V,"justify-between":V,"items-start":m==="left"&&x,"items-center":m==="center"&&x,"text-left":m==="left","text-center":m==="center","laptop:order-1":i==="left"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__main-content",{"flex flex-col":V}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":(i==="top"||i==="bottom")&&w?.text}),children:[(0,e.jsxs)("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[(0,e.jsx)(r.Heading,{as:"h2",size:4,html:b,className:(0,l.cn)("image-with-text__title",{"text-left":x&&m==="left","text-center":x&&m==="center"})}),v&&(0,e.jsx)(r.Text,{as:"p",size:x?4:3,html:v,className:(0,l.cn)("image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",{"laptop:mt-[16px]":!x,"min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]":x,"text-left":x&&m==="left","text-center":x&&m==="center"})})]}),(i==="top"||i==="bottom")&&w?.text&&(0,e.jsx)(r.Link,{href:(0,l.getLocalizedPath)(w.link||"",C),className:"laptop:flex hidden whitespace-nowrap no-underline",suffixIcon:X,children:w.text})]}),!x&&(_||M)&&(0,e.jsxs)("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[M&&(0,e.jsx)("img",{src:M,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),_&&(0,e.jsx)(r.Heading,{as:"h4",size:5,html:_,className:"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]"})]}),x&&(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__items laptop:mt-[32px] desktop:mt-[48px] mt-[24px] grid w-full gap-6",{"!mt-6":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4 laptop:grid-cols-2":i==="left"||i==="right"}),children:H.map((t,s)=>(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item",{"text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":m==="center","justify-start":m==="left"}),children:[t.icon?.url&&(0,e.jsx)(r.Picture,{source:t.icon.url,alt:t.icon?.alt,className:"image-with-text__item-icon min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px] h-[28px] translate-y-[-12%] md:text-[40px]",imgClassName:"h-full !w-full"}),(0,e.jsx)(r.Heading,{size:4,as:"h6",className:"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:t.text})]}),(0,e.jsx)(r.Text,{size:4,as:"p",html:t.desc,className:"image-with-text__item-desc tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[-2px] text-[14px]"})]},s))})]}),pe()]}),(0,e.jsx)("div",{ref:A,className:(0,l.cn)("image-with-text__media-wrapper",{"laptop:w-[60%] w-full shrink-0":i==="left"||i==="right","aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0":x,"laptop:basis-[63%] desktop:basis-[57%]":x&&i==="left","relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]":c,"!max-w-none !max-h-none aspect-auto":i==="top"||i==="bottom"}),children:c?T?Q():(0,e.jsx)(k.AnimatePresence,{mode:"wait",children:(0,e.jsx)(k.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__image-motion absolute left-0 top-0 w-full",children:(0,e.jsx)(r.Picture,{source:K(),alt:d[u].image?.alt,className:"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]"})},d[u].image?.url)}):T?Q():(0,e.jsx)(r.Picture,{source:K(),className:(0,l.cn)("image-with-text__image rounded-box laptop:rounded-box")})})]})});Y.displayName="ImageWithText";var Ne=(0,ee.withLayout)(Y);
1
+ "use strict";"use client";var fe=Object.create;var S=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var ve=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var we=(n,p)=>{for(var g in p)S(n,g,{get:p[g],enumerable:!0})},U=(n,p,g,b)=>{if(p&&typeof p=="object"||typeof p=="function")for(let v of ge(p))!be.call(n,v)&&v!==g&&S(n,v,{get:()=>p[v],enumerable:!(b=he(p,v))||b.enumerable});return n};var _e=(n,p,g)=>(g=n!=null?fe(ve(n)):{},U(p||!n||!n.__esModule?S(g,"default",{value:n,enumerable:!0}):g,n)),ye=n=>U(S({},"__esModule",{value:!0}),n);var Ie={};we(Ie,{default:()=>Te});module.exports=ye(Ie);var e=require("react/jsx-runtime"),a=_e(require("react")),r=require("../../components/index.js"),l=require("../../helpers/utils.js"),ee=require("../../shared/Styles.js"),te=require("../../hooks/useExposure.js"),ie=require("../../hooks/useIntersectionObserver.js"),ae=require("../AiuiProvider/index.js"),k=require("framer-motion");const ke="image",Ne="image_with_text",X=(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,e.jsx)("path",{d:"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z",fill:"currentColor"})}),Y=a.default.forwardRef(({data:n,className:p},g)=>{const{title:b,subtitle:v,desc:_,descIcon:M,image:N,padImage:z,mobileImage:E,theme:oe="dark",items:H=[],layout:le="left",mediaType:se="image",datalist:d=[],video:j,padVideo:R,mobVideo:W,button:w,textAlign:m="left",titleTag:re}=n,i=le,{locale:C="us"}=(0,ae.useAiuiContext)(),D=(0,a.useRef)(null),I=(0,a.useRef)(null),L=(0,a.useRef)(null),P=(0,a.useRef)(null),A=(0,a.useRef)(null),[u,ne]=(0,a.useState)(0),q=(0,a.useRef)([]),[$,me]=(0,a.useState)({left:0,width:0}),[y,B]=(0,a.useState)(""),[F,O]=(0,a.useState)(""),[Z,G]=(0,a.useState)(""),c=d.length>0,T=se==="video";(0,te.useExposure)(D,{componentType:ke,componentName:Ne,componentTitle:b,componentDescription:v}),(0,a.useImperativeHandle)(g,()=>D.current),(0,a.useEffect)(()=>{if(d.length>0){const t=q.current[u];if(t){const{offsetLeft:s,offsetWidth:o}=t;me({left:s,width:o})}}},[u,d.length]);const[J,de]=(0,a.useState)(!1);(0,ie.useIntersectionObserverDelay)(A,{once:!0,threshold:.01,callback:()=>{de(!0)}}),(0,a.useEffect)(()=>{if(!J||!T)return;let t="",s="",o="";if(c&&d[u]){const f=d[u];t=f.video?.url||"",s=f.padVideo?.url||t,o=f.mobVideo?.url||t}else t=j?.url||"",s=R?.url||t,o=W?.url||t;t&&B(t),s&&O(s),o&&G(o),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},200)},[J,T,c,u,d,j?.url,R?.url,W?.url]);const pe=(t,s)=>{if(ne(t),s.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),T&&c&&d[t]){const o=d[t];o.video?.url&&B(o.video.url),o.padVideo?.url&&O(o.padVideo.url),o.mobVideo?.url&&G(o.mobVideo.url),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},300)}},ce=()=>!V||!w?.text||i==="top"||i==="bottom"?null:(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]",{"flex justify-center":m==="center","flex justify-start":m==="left"}),children:(0,e.jsx)(r.Link,{href:(0,l.getLocalizedPath)(w.link||"",C),className:"image-with-text__button whitespace-nowrap no-underline",suffixIcon:X,children:w.text})}),x=H.length>0,V=!!w,K=()=>{if(c&&d[u]){const t=d[u];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return N?`${N?.url},${z?.url||N?.url} 1024, ${E?.url||N?.url} 768`:""},Q=()=>{if(c){const f=d[u],h=f.image?.url,xe=f.imgPad?.url||h,ue=f.imageMob?.url||h;return(0,e.jsx)(k.AnimatePresence,{mode:"wait",children:(0,e.jsx)(k.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__video-motion absolute left-0 top-0 w-full",children:(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:h,src:y,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:xe,src:F||y,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:ue,src:Z||y,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},f.video?.url||f.image?.url)})}const t=N?.url,s=z?.url||t,o=E?.url||t;return(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:y,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:s,src:F||y,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:o,src:Z||y,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return(0,e.jsxs)("section",{ref:D,"data-ui-component-id":"ImageWithText",className:(0,l.cn)("image-with-text text-info-primary",{"flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!c,"flex-col":!c&&(i==="top"||i==="bottom"),"items-center":i==="left"||i==="right","flex-col laptop:flex-row":!c&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":c,"aiui-dark":oe==="dark"},p),children:[c&&(b||_||d.length>0)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":m==="left","text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:"image-with-text__header",children:[(0,e.jsx)(r.Heading,{as:"h3",size:4,html:b,className:"image-with-text__title"}),(0,e.jsx)(r.Text,{as:"p",size:1,html:_,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":m==="center"}),children:(0,e.jsxs)("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[(0,e.jsx)("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:$.left,width:$.width}}),d.map((t,s)=>(0,e.jsx)("div",{ref:o=>{q.current[s]=o},onClick:o=>pe(s,o),className:(0,l.cn)("image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]",u===s?"image-with-text__tab--active text-black":"text-white"),children:(0,e.jsx)(r.Heading,{as:re??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},s))]})})]}),!c&&(b||v||_)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__content flex w-full flex-col",{"justify-center":!V,"justify-between":V,"items-start":m==="left"&&x,"items-center":m==="center"&&x,"text-left":m==="left","text-center":m==="center","laptop:order-1":i==="left"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__main-content",{"flex flex-col":V}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":(i==="top"||i==="bottom")&&w?.text}),children:[(0,e.jsxs)("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[(0,e.jsx)(r.Heading,{as:"h2",size:4,html:b,className:(0,l.cn)("image-with-text__title",{"text-left":x&&m==="left","text-center":x&&m==="center"})}),v&&(0,e.jsx)(r.Text,{as:"p",size:x?4:3,html:v,className:(0,l.cn)("image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",{"laptop:mt-[16px]":!x,"min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]":x,"text-left":x&&m==="left","text-center":x&&m==="center"})})]}),(i==="top"||i==="bottom")&&w?.text&&(0,e.jsx)(r.Link,{href:(0,l.getLocalizedPath)(w.link||"",C),className:"laptop:flex hidden whitespace-nowrap no-underline",suffixIcon:X,children:w.text})]}),!x&&(_||M)&&(0,e.jsxs)("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[M&&(0,e.jsx)("img",{src:M,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),_&&(0,e.jsx)(r.Heading,{as:"h4",size:5,html:_,className:"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]"})]}),x&&(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__items laptop:mt-[32px] desktop:mt-[48px] mt-[24px] grid w-full gap-6",{"!mt-6":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4 laptop:grid-cols-2":i==="left"||i==="right"}),children:H.map((t,s)=>(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item",{"text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":m==="center","justify-start":m==="left"}),children:[t.icon?.url&&(0,e.jsx)(r.Picture,{source:t.icon.url,alt:t.icon?.alt,className:"image-with-text__item-icon min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px] h-[28px] translate-y-[-12%] md:text-[40px]",imgClassName:"h-full !w-full"}),(0,e.jsx)(r.Heading,{size:4,as:"h6",className:"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:t.text})]}),(0,e.jsx)(r.Text,{size:4,as:"p",html:t.desc,className:"image-with-text__item-desc tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[-2px] text-[14px]"})]},s))})]}),ce()]}),(0,e.jsx)("div",{ref:A,className:(0,l.cn)("image-with-text__media-wrapper",{"laptop:w-[60%] w-full shrink-0":i==="left"||i==="right","aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0":x,"laptop:basis-[63%] desktop:basis-[57%]":x&&i==="left","relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]":c,"!max-w-none !max-h-none aspect-auto":i==="top"||i==="bottom"}),children:c?T?Q():(0,e.jsx)(k.AnimatePresence,{mode:"wait",children:(0,e.jsx)(k.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__image-motion absolute left-0 top-0 w-full",children:(0,e.jsx)(r.Picture,{source:K(),alt:d[u].image?.alt,className:"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]"})},d[u].image?.url)}):T?Q():(0,e.jsx)(r.Picture,{source:K(),className:(0,l.cn)("image-with-text__image rounded-box laptop:rounded-box")})})]})});Y.displayName="ImageWithText";var Te=(0,ee.withLayout)(Y);
2
2
  //# sourceMappingURL=ImageWithText.js.map