@anker-in/headless-ui 1.0.26-alpha.1763521763904 → 1.0.26-alpha.1763550831017

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/AplusDesc/index.js +1 -1
  2. package/dist/cjs/biz-components/AplusDesc/index.js.map +3 -3
  3. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  4. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  5. package/dist/cjs/biz-components/Features/index.js +1 -1
  6. package/dist/cjs/biz-components/Features/index.js.map +3 -3
  7. package/dist/cjs/biz-components/GiftBox/index.js +1 -1
  8. package/dist/cjs/biz-components/GiftBox/index.js.map +3 -3
  9. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  10. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
  11. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  12. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
  13. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  14. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +3 -3
  15. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
  16. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +3 -3
  17. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  18. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  19. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  20. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  21. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  22. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +1 -1
  23. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  24. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
  25. package/dist/cjs/biz-components/SelectStore/index.js +1 -1
  26. package/dist/cjs/biz-components/SelectStore/index.js.map +3 -3
  27. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  28. package/dist/cjs/biz-components/Spacer/index.js.map +3 -3
  29. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  30. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  31. package/dist/cjs/biz-components/Title/index.js +1 -1
  32. package/dist/cjs/biz-components/Title/index.js.map +2 -2
  33. package/dist/cjs/components/picture.js +1 -1
  34. package/dist/cjs/components/picture.js.map +2 -2
  35. package/dist/esm/biz-components/AplusDesc/index.js +1 -1
  36. package/dist/esm/biz-components/AplusDesc/index.js.map +3 -3
  37. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  38. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  39. package/dist/esm/biz-components/Features/index.js +1 -1
  40. package/dist/esm/biz-components/Features/index.js.map +3 -3
  41. package/dist/esm/biz-components/GiftBox/index.js +1 -1
  42. package/dist/esm/biz-components/GiftBox/index.js.map +3 -3
  43. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  44. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
  45. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  46. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
  47. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  48. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +3 -3
  49. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
  50. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +3 -3
  51. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  52. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  53. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  54. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  55. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  56. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +1 -1
  57. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  58. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
  59. package/dist/esm/biz-components/SelectStore/index.js +1 -1
  60. package/dist/esm/biz-components/SelectStore/index.js.map +3 -3
  61. package/dist/esm/biz-components/Spacer/index.js +1 -1
  62. package/dist/esm/biz-components/Spacer/index.js.map +3 -3
  63. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  64. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  65. package/dist/esm/biz-components/Title/index.js +1 -1
  66. package/dist/esm/biz-components/Title/index.js.map +2 -2
  67. package/dist/esm/components/picture.js +1 -1
  68. package/dist/esm/components/picture.js.map +2 -2
  69. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SelectStore/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type SelectStoreDataType = {\n title: string\n desc: string\n img: Img\n mobileImg: Img\n padImg: Img\n miniImg: Img\n // pay: {\n // img: Img\n // }[]\n // delivery: {\n // img: Img\n // }[]\n // service: {\n // title: string\n // img: Img\n // }[]\n}\n\ntype SelectStoreType = {\n data: {\n list: SelectStoreDataType[]\n }\n className?: string\n}\n\nconst SelectStore = (props: SelectStoreType) => {\n const { data, className } = props\n const { list } = data\n // const number = list?.[2]?.service?.length || 0\n return (\n <>\n <div className=\"\">\n <div className=\"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4\">\n {list.map((item, index) => (\n <div\n key={index}\n className=\"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden flex flex-col bg-[#EAEAEC] select-store-wrapper\"\n >\n <Picture\n className=\"object-cover\"\n imgClassName=\"w-full h-full object-cover\"\n source={`${item?.img?.url}, ${item?.padImg?.url} 1439, ${item?.miniImg?.url} 1023, ${item?.mobileImg?.url} 767`}\n />\n <div className=\"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4\">\n <Text\n html={item?.title}\n className=\"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]\"\n />\n <Text\n html={item?.desc}\n className=\"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]\"\n />\n </div>\n </div>\n ))}\n </div>\n {/* <div className='grid desktop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4'>\n {list.map((item, index) => (\n <div key={index} className='bg-[#EAEAEC] rounded-2xl min-h-[240px] laptop:min-h-[280px] lg-desktop:min-h-[320px]'>\n <div className='flex flex-col laptop:p-[24px] lg-desktop:p-[32px] p-[16px] justify-start h-full'>\n <div className=\"flex flex-col justify-center flex-1\">\n \n {item?.pay && (\n <div className='flex gap-[16px] flex-wrap items-center justify-center laptop:gap-[24px]'>\n {item?.pay?.map((pay, ind)=>{\n return (\n <div key={ind} className='laptop:w-[60px] w-[48px]'>\n <Picture\n className=\" w-full\"\n imgClassName=\"\"\n source={pay?.img?.url}\n alt={pay?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n )}\n \n {\n item?.delivery && (\n <div className='flex gap-[24px] items-center justify-center'>\n {item?.delivery?.map((delivery, ind)=>{\n return (\n <div key={ind} className=''>\n <Picture\n className={` ${ind === 0 ? 'laptop:w-[174px] w-[116px]' : 'laptop:w-[75px] w-[50px]'}`}\n imgClassName=\"\"\n source={delivery?.img?.url}\n alt={delivery?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n ) \n }\n \n {\n item?.service && (\n <div className=' desktop:gap-[24px] gap-[8px] tablet:gap-[12px] laptop:gap-[28px] grid l-tablet:grid-cols-2 tablet:flex flex-wrap desktop:grid-cols-4 items-center justify-center'>\n {item?.service?.map((service, ind)=>{\n // \u5224\u65AD\uFF1A\u53EA\u5BF9\u7B2C\u4E94\u6761\uFF08index === 4\uFF09\u5E94\u7528\u54CD\u5E94\u5F0F\u663E\u793A/\u9690\u85CF\n const isFifth = ind === 4;\n return (\n <div key={ind} className={`\n flex flex-col items-center desktop:h-full w-[157px] justify-start desktop:w-[81px]\n ${isFifth ? 'laptop:flex desktop:hidden hidden' : ''} \n `}>\n <div className='w-[70px] desktop:w-[54px]'>\n <Picture\n className=\"\"\n imgClassName=\"w-full h-auto\"\n source={service?.img?.url}\n alt={service?.img?.alt || ''}\n />\n </div>\n <div className='text-center'>\n <Text html={service?.title} className=' font-bold text-[12px] mt-[8px] leading-[1.4]' />\n </div>\n </div>\n )\n })}\n </div>\n )\n }\n </div>\n <div className='mt-auto'>\n <Text html={item?.title} className='text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]'/>\n <Text html={item?.desc} className='text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]'/>\n </div>\n \n </div>\n </div>\n ))}\n </div> */}\n </div>\n </>\n )\n}\n\nexport default withLayout(SelectStore)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCI,IAAAI,EAAA,6BArCJC,EAAmB,kCACnBC,EAAsB,iCAEtBC,EAA2B,kCAC3BC,EAA8B,qCA4B9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,SACE,mBACE,mBAAC,OAAI,UAAU,GACb,mBAAC,OAAI,UAAU,+DACZ,SAAAE,EAAK,IAAI,CAACC,EAAMC,OACf,QAAC,OAEC,UAAU,oLAEV,oBAAC,WACC,UAAU,eACV,aAAa,6BACb,OAAQ,GAAGD,GAAM,KAAK,GAAG,KAAKA,GAAM,QAAQ,GAAG,UAAUA,GAAM,SAAS,GAAG,UAAUA,GAAM,WAAW,GAAG,OAC3G,KACA,QAAC,OAAI,UAAU,oEACb,oBAAC,QACC,KAAMA,GAAM,MACZ,UAAU,0FACZ,KACA,OAAC,QACC,KAAMA,GAAM,KACZ,UAAU,+EACZ,GACF,IAjBKC,CAkBP,CACD,EACH,EAiFF,EACF,CAEJ,EAEA,IAAOb,KAAQ,cAAWO,CAAW",
6
- "names": ["SelectStore_exports", "__export", "SelectStore_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_components", "SelectStore", "props", "data", "className", "list", "item", "index"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\nexport type SelectStoreDataType = {\n title: string\n desc: string\n img: Img\n mobileImg: Img\n padImg: Img\n miniImg: Img\n // pay: {\n // img: Img\n // }[]\n // delivery: {\n // img: Img\n // }[]\n // service: {\n // title: string\n // img: Img\n // }[]\n}\n\ntype SelectStoreType = {\n data: {\n list: SelectStoreDataType[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'select_store'\n\nconst Item = ({ index, item }: { index: number; item: SelectStoreDataType }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n componentDescription: item.desc,\n })\n \n return (\n <div\n ref={ref}\n className=\"relative rounded-2xl lg-desktop:aspect-[543/320] laptop:aspect-[440/280] tablet:aspect-[346/240] aspect-[358/240] overflow-hidden flex flex-col bg-[#EAEAEC] select-store-wrapper\"\n >\n <Picture\n className=\"object-cover\"\n imgClassName=\"w-full h-full object-cover\"\n source={`${item?.img?.url}, ${item?.padImg?.url} 1439, ${item?.miniImg?.url} 1023, ${item?.mobileImg?.url} 767`}\n />\n <div className=\"laptop:px-6 laptop:pb-6 lg-desktop:px-8 lg-desktop:pb-8 px-4 pb-4\">\n <Text\n html={item?.title}\n className=\"text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]\"\n />\n <Text\n html={item?.desc}\n className=\"text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-[#1d1d1f]\"\n />\n </div>\n </div>\n )\n}\n\nconst SelectStore = (props: SelectStoreType) => {\n const { data, className } = props\n const { list } = data\n // const number = list?.[2]?.service?.length || 0\n return (\n <>\n <div className=\"\">\n <div className=\"grid laptop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n {/* <div className='grid desktop:grid-cols-3 tablet:grid-cols-2 grid-cols-1 gap-4'>\n {list.map((item, index) => (\n <div key={index} className='bg-[#EAEAEC] rounded-2xl min-h-[240px] laptop:min-h-[280px] lg-desktop:min-h-[320px]'>\n <div className='flex flex-col laptop:p-[24px] lg-desktop:p-[32px] p-[16px] justify-start h-full'>\n <div className=\"flex flex-col justify-center flex-1\">\n \n {item?.pay && (\n <div className='flex gap-[16px] flex-wrap items-center justify-center laptop:gap-[24px]'>\n {item?.pay?.map((pay, ind)=>{\n return (\n <div key={ind} className='laptop:w-[60px] w-[48px]'>\n <Picture\n className=\" w-full\"\n imgClassName=\"\"\n source={pay?.img?.url}\n alt={pay?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n )}\n \n {\n item?.delivery && (\n <div className='flex gap-[24px] items-center justify-center'>\n {item?.delivery?.map((delivery, ind)=>{\n return (\n <div key={ind} className=''>\n <Picture\n className={` ${ind === 0 ? 'laptop:w-[174px] w-[116px]' : 'laptop:w-[75px] w-[50px]'}`}\n imgClassName=\"\"\n source={delivery?.img?.url}\n alt={delivery?.img?.alt || ''}\n />\n </div>\n )\n })}\n </div>\n ) \n }\n \n {\n item?.service && (\n <div className=' desktop:gap-[24px] gap-[8px] tablet:gap-[12px] laptop:gap-[28px] grid l-tablet:grid-cols-2 tablet:flex flex-wrap desktop:grid-cols-4 items-center justify-center'>\n {item?.service?.map((service, ind)=>{\n // \u5224\u65AD\uFF1A\u53EA\u5BF9\u7B2C\u4E94\u6761\uFF08index === 4\uFF09\u5E94\u7528\u54CD\u5E94\u5F0F\u663E\u793A/\u9690\u85CF\n const isFifth = ind === 4;\n return (\n <div key={ind} className={`\n flex flex-col items-center desktop:h-full w-[157px] justify-start desktop:w-[81px]\n ${isFifth ? 'laptop:flex desktop:hidden hidden' : ''} \n `}>\n <div className='w-[70px] desktop:w-[54px]'>\n <Picture\n className=\"\"\n imgClassName=\"w-full h-auto\"\n source={service?.img?.url}\n alt={service?.img?.alt || ''}\n />\n </div>\n <div className='text-center'>\n <Text html={service?.title} className=' font-bold text-[12px] mt-[8px] leading-[1.4]' />\n </div>\n </div>\n )\n })}\n </div>\n )\n }\n </div>\n <div className='mt-auto'>\n <Text html={item?.title} className='text-[20px] lg-desktop:text-[24px] [&_*_strong]:!font-bold leading-[1.2] text-[#1d1d1f]'/>\n <Text html={item?.desc} className='text-[14px] line-clamp-1 lg-desktop:text-[16px] leading-[1.4] text-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exports", "__export", "SelectStore_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_components", "import_useExposure", "import_react", "componentType", "componentName", "Item", "index", "item", "ref", "SelectStore", "props", "data", "className", "list"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var m=Object.create;var r=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var S=(e,p)=>{for(var t in p)r(e,t,{get:p[t],enumerable:!0})},s=(e,p,t,a)=>{if(p&&typeof p=="object"||typeof p=="function")for(let o of n(p))!y.call(e,o)&&o!==t&&r(e,o,{get:()=>p[o],enumerable:!(a=h(p,o))||a.enumerable});return e};var v=(e,p,t)=>(t=e!=null?m(u(e)):{},s(p||!e||!e.__esModule?r(t,"default",{value:e,enumerable:!0}):t,e)),x=e=>s(r({},"__esModule",{value:!0}),e);var w={};S(w,{default:()=>k});module.exports=x(w);var l=require("react/jsx-runtime"),i=v(require("react")),d=require("../../helpers/utils.js"),f=require("../../shared/Styles.js");const c=i.default.forwardRef(({className:e,data:p})=>{const{space:t="default"}=p;return(0,l.jsx)("div",{className:(0,d.cn)("ipc_spacer",t==="default"&&"laptop:h-16 desktop:h-[96px] lg-desktop:h-[128px] tablet:h-16 h-16",t==="fixed"&&"h-16",e)})});c.displayName="Spacer";var k=(0,f.withLayout)(c);
1
+ "use strict";"use client";var m=Object.create;var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var S=(e,p)=>{for(var t in p)a(e,t,{get:p[t],enumerable:!0})},s=(e,p,t,r)=>{if(p&&typeof p=="object"||typeof p=="function")for(let o of n(p))!y.call(e,o)&&o!==t&&a(e,o,{get:()=>p[o],enumerable:!(r=h(p,o))||r.enumerable});return e};var v=(e,p,t)=>(t=e!=null?m(u(e)):{},s(p||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),x=e=>s(a({},"__esModule",{value:!0}),e);var w={};S(w,{default:()=>k});module.exports=x(w);var l=require("react/jsx-runtime"),f=v(require("react")),i=require("../../helpers/utils.js"),d=require("../../shared/Styles.js");const c=f.default.forwardRef(({className:e,data:p},t)=>{const{space:r="default"}=p;return(0,l.jsx)("div",{className:(0,i.cn)("ipc_spacer",r==="default"&&"laptop:h-16 desktop:h-[96px] lg-desktop:h-[128px] tablet:h-16 h-16",r==="fixed"&&"h-16",e)})});c.displayName="Spacer";var k=(0,d.withLayout)(c);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Spacer/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { SpacerProps } from './types.js'\n\nconst Spacer = React.forwardRef<HTMLDivElement, SpacerProps>(({ className, data }) => {\n const { space = 'default' } = data\n return (\n <div\n className={cn(\n 'ipc_spacer',\n space === 'default' && 'laptop:h-16 desktop:h-[96px] lg-desktop:h-[128px] tablet:h-16 h-16',\n space === 'fixed' && 'h-16',\n className\n )}\n ></div>\n )\n})\n\nSpacer.displayName = 'Spacer'\n\nexport default withLayout(Spacer)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GASI,IAAAI,EAAA,6BARJC,EAAkB,oBAClBC,EAAmB,kCACnBC,EAA2B,kCAG3B,MAAMC,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,UAAAC,EAAW,KAAAC,CAAK,IAAM,CACpF,KAAM,CAAE,MAAAC,EAAQ,SAAU,EAAID,EAC9B,SACE,OAAC,OACC,aAAW,MACT,aACAC,IAAU,WAAa,qEACvBA,IAAU,SAAW,OACrBF,CACF,EACD,CAEL,CAAC,EAEDF,EAAO,YAAc,SAErB,IAAON,KAAQ,cAAWM,CAAM",
6
- "names": ["Spacer_exports", "__export", "Spacer_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "Spacer", "React", "className", "data", "space"]
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { SpacerProps } from './types.js'\n\nconst Spacer = React.forwardRef<HTMLDivElement, SpacerProps>(({ className, data }, ref) => {\n const { space = 'default' } = data\n return (\n <div\n className={cn(\n 'ipc_spacer',\n space === 'default' && 'laptop:h-16 desktop:h-[96px] lg-desktop:h-[128px] tablet:h-16 h-16',\n space === 'fixed' && 'h-16',\n className\n )}\n ></div>\n )\n})\n\nSpacer.displayName = 'Spacer'\n\nexport default withLayout(Spacer)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GASI,IAAAI,EAAA,6BARJC,EAAkB,oBAClBC,EAAmB,kCACnBC,EAA2B,kCAG3B,MAAMC,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,UAAAC,EAAW,KAAAC,CAAK,EAAGC,IAAQ,CACzF,KAAM,CAAE,MAAAC,EAAQ,SAAU,EAAIF,EAC9B,SACE,OAAC,OACC,aAAW,MACT,aACAE,IAAU,WAAa,qEACvBA,IAAU,SAAW,OACrBH,CACF,EACD,CAEL,CAAC,EAEDF,EAAO,YAAc,SAErB,IAAON,KAAQ,cAAWM,CAAM",
6
+ "names": ["Spacer_exports", "__export", "Spacer_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "Spacer", "React", "className", "data", "ref", "space"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var x=Object.create;var l=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var v=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},u=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of M(r))!P.call(e,i)&&i!==o&&l(e,i,{get:()=>r[i],enumerable:!(n=B(r,i))||n.enumerable});return e};var y=(e,r,o)=>(o=e!=null?x(E(e)):{},u(r||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),N=e=>u(l({},"__esModule",{value:!0}),e);var h={};v(h,{default:()=>b});module.exports=N(h);var f=require("react/jsx-runtime"),t=y(require("react")),m=require("../../helpers/utils.js"),w=require("swiper/react"),s=require("swiper/modules");const c=t.default.forwardRef(({data:e,breakpoints:r,Slide:o,className:n,id:i,itemClassName:d})=>{const[V,S]=(0,t.useState)(!0),[k,g]=(0,t.useState)(!1);return(0,f.jsx)(w.Swiper,{className:(0,m.cn)(n),navigation:{nextEl:`.${i}-custom-swiper-button-next`,prevEl:`.${i}-custom-swiper-button-prev`},onProgress:p=>{S(p.isBeginning),g(p.isEnd)},modules:[s.Navigation,s.FreeMode,s.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:r||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,slidesPerView:1.2,freeMode:!1},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:e?.list?.map((p,a)=>(0,f.jsx)(w.SwiperSlide,{className:(0,m.cn)("!flex !h-[unset]",d),children:(0,f.jsx)(o,{data:p,configuration:e?.configuration?{...e?.configuration,index:a}:{index:a},jIndex:a})},i+"SwiperSlide"+a))})});c.displayName="SwiperBox";var b=c;
1
+ "use strict";"use client";var x=Object.create;var l=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var v=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},u=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of M(r))!P.call(e,i)&&i!==o&&l(e,i,{get:()=>r[i],enumerable:!(n=B(r,i))||n.enumerable});return e};var y=(e,r,o)=>(o=e!=null?x(E(e)):{},u(r||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),N=e=>u(l({},"__esModule",{value:!0}),e);var h={};v(h,{default:()=>b});module.exports=N(h);var f=require("react/jsx-runtime"),t=y(require("react")),m=require("../../helpers/utils.js"),w=require("swiper/react"),s=require("swiper/modules");const c=t.default.forwardRef(({data:e,breakpoints:r,Slide:o,className:n,id:i,itemClassName:d},V)=>{const[k,S]=(0,t.useState)(!0),[R,g]=(0,t.useState)(!1);return(0,f.jsx)(w.Swiper,{className:(0,m.cn)(n),navigation:{nextEl:`.${i}-custom-swiper-button-next`,prevEl:`.${i}-custom-swiper-button-prev`},onProgress:p=>{S(p.isBeginning),g(p.isEnd)},modules:[s.Navigation,s.FreeMode,s.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:r||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,slidesPerView:1.2,freeMode:!1},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:e?.list?.map((p,a)=>(0,f.jsx)(w.SwiperSlide,{className:(0,m.cn)("!flex !h-[unset]",d),children:(0,f.jsx)(o,{data:p,configuration:e?.configuration?{...e?.configuration,index:a}:{index:a},jIndex:a})},i+"SwiperSlide"+a))})});c.displayName="SwiperBox";var b=c;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SwiperBox/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id, itemClassName }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.2,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className={cn('!flex !h-[unset]', itemClassName)}>\n <Slide\n data={item}\n configuration={data?.configuration ? { ...data?.configuration, index: jIndex } : { index: jIndex }}\n jIndex={jIndex}\n />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDU,IAAAI,EAAA,6BAlDVC,EAAgC,oBAChCC,EAAmB,kCAGnBD,EAAoC,wBACpCE,EAAiD,0BAGjD,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,EAAI,cAAAC,CAAc,IAAM,CACjI,KAAM,CAACC,EAASC,CAAQ,KAAI,YAAS,EAAI,EACnC,CAACC,EAAOC,CAAM,KAAI,YAAS,EAAK,EAEtC,SACE,OAAC,UACC,aAAW,MAAGN,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYM,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAAC,aAAY,WAAU,YAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACET,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACW,EAAMC,OACtB,OAAC,eAA8C,aAAW,MAAG,mBAAoBP,CAAa,EAC5F,mBAACH,EAAA,CACC,KAAMS,EACN,cAAeX,GAAM,cAAgB,CAAE,GAAGA,GAAM,cAAe,MAAOY,CAAO,EAAI,CAAE,MAAOA,CAAO,EACjG,OAAQA,EACV,GALgBR,EAAK,cAAgBQ,CAMvC,CACD,EACH,CAEJ,CAAC,EAEDd,EAAU,YAAc,YAExB,IAAON,EAAQM",
6
- "names": ["SwiperBox_exports", "__export", "SwiperBox_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_modules", "SwiperBox", "React", "data", "breakpoints", "Slide", "className", "id", "itemClassName", "isStart", "setStart", "isEnd", "setEnd", "swiper", "item", "jIndex"]
4
+ "sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(\n ({ data, breakpoints, Slide, className, id, itemClassName }, ref) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.2,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className={cn('!flex !h-[unset]', itemClassName)}>\n <Slide\n data={item}\n configuration={data?.configuration ? { ...data?.configuration, index: jIndex } : { index: jIndex }}\n jIndex={jIndex}\n />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n }\n)\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoDY,IAAAI,EAAA,6BAnDZC,EAAgC,oBAChCC,EAAmB,kCAGnBD,EAAoC,wBACpCE,EAAiD,0BAGjD,MAAMC,EAAY,EAAAC,QAAM,WACtB,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,EAAI,cAAAC,CAAc,EAAGC,IAAQ,CACnE,KAAM,CAACC,EAASC,CAAQ,KAAI,YAAS,EAAI,EACnC,CAACC,EAAOC,CAAM,KAAI,YAAS,EAAK,EAEtC,SACE,OAAC,UACC,aAAW,MAAGP,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYO,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAAC,aAAY,WAAU,YAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACEV,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACY,EAAMC,OACtB,OAAC,eAA8C,aAAW,MAAG,mBAAoBR,CAAa,EAC5F,mBAACH,EAAA,CACC,KAAMU,EACN,cAAeZ,GAAM,cAAgB,CAAE,GAAGA,GAAM,cAAe,MAAOa,CAAO,EAAI,CAAE,MAAOA,CAAO,EACjG,OAAQA,EACV,GALgBT,EAAK,cAAgBS,CAMvC,CACD,EACH,CAEJ,CACF,EAEAf,EAAU,YAAc,YAExB,IAAON,EAAQM",
6
+ "names": ["SwiperBox_exports", "__export", "SwiperBox_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_modules", "SwiperBox", "React", "data", "breakpoints", "Slide", "className", "id", "itemClassName", "ref", "isStart", "setStart", "isEnd", "setEnd", "swiper", "item", "jIndex"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var J=Object.create;var d=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var Y=(t,e)=>{for(var n in e)d(t,n,{get:e[n],enumerable:!0})},M=(t,e,n,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Q(e))!X.call(t,o)&&o!==n&&d(t,o,{get:()=>e[o],enumerable:!(c=K(e,o))||c.enumerable});return t};var Z=(t,e,n)=>(n=t!=null?J(W(t)):{},M(e||!t||!t.__esModule?d(n,"default",{value:t,enumerable:!0}):n,t)),tt=t=>M(d({},"__esModule",{value:!0}),t);var rt={};Y(rt,{default:()=>et});module.exports=tt(rt);var i=require("react/jsx-runtime"),r=Z(require("react")),p=require("gsap"),x=require("gsap/dist/SplitText"),T=require("gsap/dist/ScrollTrigger"),k=require("../../helpers/utils.js"),z=require("../../components/index.js"),P=require("../../shared/Styles.js"),S=require("../../shared/trackUrlRef.js"),I=require("react-intersection-observer");const E="link",$="title",D=r.default.forwardRef(({data:t,className:e,as:n="h2",weight:c="bold"},o)=>{const{title:u,caption:f,theme:b,extensions:m,align:g="left"}=t,y=(0,r.useRef)(null),l=(0,r.useRef)(null),s=(0,r.useRef)(null),a=(0,r.useRef)(null),{ref:V,inView:R}=(0,I.useInView)();return(0,r.useImperativeHandle)(o,()=>y.current),(0,r.useEffect)(()=>{p.gsap.registerPlugin(x.SplitText,T.ScrollTrigger);function B(){if(!l.current)return;const U=l.current?.clientHeight||80;s.current&&s.current.revert(),a.current&&a.current.kill(),s.current=new x.SplitText(l.current,{type:"words",wordsClass:"word"});const h=s.current.words;p.gsap.set(h,{opacity:0}),a.current=T.ScrollTrigger.create({trigger:l.current,start:"bottom bottom-=4%",end:`bottom+=${U*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:j=>{const C=j.progress,L=h.length||1,F=.5,w=1/L,N=w*(1-F),H=(L-1)*N+w,O=Math.min(1,H>0?C/H:0);h.forEach((_,q)=>{const A=q*N,G=w;let v=(O-A)/G;v=Math.max(0,Math.min(1,v)),p.gsap.set(_,{opacity:v})})}})}return R&&B(),()=>{s.current&&s.current.revert(),a.current&&a.current.kill()}},[R]),(u||f)&&(0,i.jsxs)("div",{id:m?.id,className:"titleBottom mb-6 flex gap-2 items-end justify-between title-box",ref:y,children:[(0,i.jsx)("div",{ref:V,className:(0,k.cn)("space-y-4 flex-1",e,{"aiui-dark":b==="dark","text-center":g==="center","text-right":g==="right","text-left":g==="left"}),children:(0,i.jsx)(z.Heading,{ref:l,as:n,size:4,html:f||u,weight:c})}),m?.textLink&&(0,i.jsxs)("a",{className:(0,k.cn)({"aiui-dark":b==="dark"},"flex items-center text-base font-[700] leading-[1.4] text-[#777] overflow-hidden transition-all duration-[0.4s] hover:text-[#1D1D1F]"),href:(0,S.trackUrlRef)(m?.link,`${E}_${$}`),"data-headless-type-name":`${E}#${$}`,"data-headless-title-desc-button":`${u}#${f}`,children:[(0,i.jsx)("div",{className:"flex-1 truncate whitespace-nowrap",children:m?.textLink}),(0,i.jsx)("div",{className:"size-6",children:(0,i.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777","stroke-width":"1.5","stroke-linecap":"round"})})})]})]})});D.displayName="Title";var et=(0,P.withLayout)(D);
1
+ "use strict";"use client";var G=Object.create;var d=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var Y=(t,e)=>{for(var n in e)d(t,n,{get:e[n],enumerable:!0})},M=(t,e,n,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of K(e))!X.call(t,o)&&o!==n&&d(t,o,{get:()=>e[o],enumerable:!(c=J(e,o))||c.enumerable});return t};var Z=(t,e,n)=>(n=t!=null?G(Q(t)):{},M(e||!t||!t.__esModule?d(n,"default",{value:t,enumerable:!0}):n,t)),tt=t=>M(d({},"__esModule",{value:!0}),t);var rt={};Y(rt,{default:()=>et});module.exports=tt(rt);var i=require("react/jsx-runtime"),r=Z(require("react")),p=require("gsap"),x=require("gsap/dist/SplitText"),T=require("gsap/dist/ScrollTrigger"),k=require("../../helpers/utils.js"),z=require("../../components/index.js"),P=require("../../shared/Styles.js"),S=require("../../shared/trackUrlRef.js"),I=require("react-intersection-observer");const E="link",$="title",D=r.default.forwardRef(({data:t,className:e,as:n="h2",weight:c="bold"},o)=>{const{title:u,caption:f,theme:b,extensions:m,align:g="left"}=t,y=(0,r.useRef)(null),l=(0,r.useRef)(null),s=(0,r.useRef)(null),a=(0,r.useRef)(null),{ref:V,inView:L}=(0,I.useInView)();return(0,r.useImperativeHandle)(o,()=>y.current),(0,r.useEffect)(()=>{p.gsap.registerPlugin(x.SplitText,T.ScrollTrigger);function B(){if(!l.current)return;const U=l.current?.clientHeight||80;s.current&&s.current.revert(),a.current&&a.current.kill(),s.current=new x.SplitText(l.current,{type:"words",wordsClass:"word"});const h=s.current.words;p.gsap.set(h,{opacity:0}),a.current=T.ScrollTrigger.create({trigger:l.current,start:"bottom bottom-=4%",end:`bottom+=${U*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:j=>{const C=j.progress,R=h.length||1,F=.5,v=1/R,N=v*(1-F),H=(R-1)*N+v,O=Math.min(1,H>0?C/H:0);h.forEach((W,_)=>{const q=_*N,A=v;let w=(O-q)/A;w=Math.max(0,Math.min(1,w)),p.gsap.set(W,{opacity:w})})}})}return L&&B(),()=>{s.current&&s.current.revert(),a.current&&a.current.kill()}},[L]),(u||f)&&(0,i.jsxs)("div",{id:m?.id,className:"titleBottom mb-6 flex gap-2 items-end justify-between title-box",ref:y,children:[(0,i.jsx)("div",{ref:V,className:(0,k.cn)("space-y-4 flex-1",e,{"aiui-dark":b==="dark","text-center":g==="center","text-right":g==="right","text-left":g==="left"}),children:(0,i.jsx)(z.Heading,{ref:l,as:n,size:4,html:f||u,weight:c})}),m?.textLink&&(0,i.jsxs)("a",{className:(0,k.cn)({"aiui-dark":b==="dark"},"flex items-center text-base font-[700] leading-[1.4] text-[#777] overflow-hidden transition-all duration-[0.4s] hover:text-[#1D1D1F]"),href:(0,S.trackUrlRef)(m?.link,`${E}_${$}`),"data-headless-type-name":`${E}#${$}`,"data-headless-title-desc-button":`${u}#${f}`,children:[(0,i.jsx)("div",{className:"flex-1 truncate whitespace-nowrap",children:m?.textLink}),(0,i.jsx)("div",{className:"size-6",children:(0,i.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777",strokeWidth:"1.5",strokeLinecap:"round"})})})]})]})});D.displayName="Title";var et=(0,P.withLayout)(D);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className, as = 'h2', weight = 'bold' }, ref) => {\n const { title, caption, theme, extensions, align = 'left' } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div\n id={extensions?.id}\n className=\"titleBottom mb-6 flex gap-2 items-end justify-between title-box\"\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('space-y-4 flex-1', className, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-right': align === 'right',\n 'text-left': align === 'left',\n })}\n >\n <Heading ref={titleRef} as={as} size={4} html={caption || title} weight={weight} />\n </div>\n {extensions?.textLink && (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'flex items-center text-base font-[700] leading-[1.4] text-[#777] overflow-hidden transition-all duration-[0.4s] hover:text-[#1D1D1F]'\n )}\n href={trackUrlRef(extensions?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n >\n <div className=\"flex-1 truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"size-6\">\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n </div>\n </a>\n )}\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
- "mappings": "wkBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA+FU,IAAAI,EAAA,6BA9FVC,EAA8D,oBAC9DC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAE3BC,EAA4B,uCAC5BC,EAA0B,uCAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAEhBC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAAC,EAAK,KAAM,OAAAC,EAAS,MAAO,EAAGC,IAAQ,CACnH,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,MAAAC,EAAO,WAAAC,EAAY,MAAAC,EAAQ,MAAO,EAAIT,EACxDU,KAAW,UAAuB,IAAI,EACtCC,KAAW,UAA2B,IAAI,EAC1CC,KAAoB,UAAyB,IAAI,EACjDC,KAAmB,UAA6B,IAAI,EAEpD,CAAE,IAAKC,EAAW,OAAAC,CAAO,KAAI,aAAU,EAE7C,gCAAoBX,EAAK,IAAMM,EAAS,OAAyB,KAEjE,aAAU,IAAM,CACd,OAAK,eAAe,YAAW,eAAa,EAC5C,SAASM,GAAa,CACpB,GAAI,CAACL,EAAS,QAAS,OACvB,MAAMM,EAASN,EAAS,SAAS,cAAgB,GAC7CC,EAAkB,SACpBA,EAAkB,QAAQ,OAAO,EAE/BC,EAAiB,SACnBA,EAAiB,QAAQ,KAAK,EAEhCD,EAAkB,QAAU,IAAI,YAAUD,EAAS,QAAS,CAC1D,KAAM,QACN,WA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,aAAW,MACT,CAAE,YAAaD,IAAU,MAAO,EAChC,sIACF,EACA,QAAM,eAAYC,GAAY,KAAM,GAAGZ,CAAa,IAAIC,CAAa,EAAE,EACvE,0BAAyB,GAAGD,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGQ,CAAK,IAAIC,CAAO,GAEpD,oBAAC,OAAI,UAAU,oCAAqC,SAAAE,GAAY,SAAS,KACzE,OAAC,OAAI,UAAU,SACb,mBAAC,OACC,MAAM,KACN,OAAO,KACP,UAAU,WACV,MAAM,6BACN,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,eAAa,MACb,iBAAe,QAChB,EACH,EACF,GACF,GAEJ,CAGN,CAAC,EAEDV,EAAM,YAAc,QAEpB,IAAOd,MAAQ,cAAWc,CAAK",
4
+ "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className, as = 'h2', weight = 'bold' }, ref) => {\n const { title, caption, theme, extensions, align = 'left' } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div\n id={extensions?.id}\n className=\"titleBottom mb-6 flex gap-2 items-end justify-between title-box\"\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('space-y-4 flex-1', className, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-right': align === 'right',\n 'text-left': align === 'left',\n })}\n >\n <Heading ref={titleRef} as={as} size={4} html={caption || title} weight={weight} />\n </div>\n {extensions?.textLink && (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'flex items-center text-base font-[700] leading-[1.4] text-[#777] overflow-hidden transition-all duration-[0.4s] hover:text-[#1D1D1F]'\n )}\n href={trackUrlRef(extensions?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n >\n <div className=\"flex-1 truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"size-6\">\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n ></path>\n </svg>\n </div>\n </a>\n )}\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
+ "mappings": "wkBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA+FU,IAAAI,EAAA,6BA9FVC,EAA8D,oBAC9DC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAE3BC,EAA4B,uCAC5BC,EAA0B,uCAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAEhBC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAAC,EAAK,KAAM,OAAAC,EAAS,MAAO,EAAGC,IAAQ,CACnH,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,MAAAC,EAAO,WAAAC,EAAY,MAAAC,EAAQ,MAAO,EAAIT,EACxDU,KAAW,UAAuB,IAAI,EACtCC,KAAW,UAA2B,IAAI,EAC1CC,KAAoB,UAAyB,IAAI,EACjDC,KAAmB,UAA6B,IAAI,EAEpD,CAAE,IAAKC,EAAW,OAAAC,CAAO,KAAI,aAAU,EAE7C,gCAAoBX,EAAK,IAAMM,EAAS,OAAyB,KAEjE,aAAU,IAAM,CACd,OAAK,eAAe,YAAW,eAAa,EAC5C,SAASM,G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AoBb,EAAW,CAC3C,YAAaM,IAAU,OACvB,cAAeE,IAAU,SACzB,aAAcA,IAAU,QACxB,YAAaA,IAAU,MACzB,CAAC,EAED,mBAAC,WAAQ,IAAKE,EAAU,GAAIT,EAAI,KAAM,EAAG,KAAMI,GAAWD,EAAO,OAAQF,EAAQ,EACnF,EACCK,GAAY,aACX,QAAC,KACC,aAAW,MACT,CAAE,YAAaD,IAAU,MAAO,EAChC,sIACF,EACA,QAAM,eAAYC,GAAY,KAAM,GAAGZ,CAAa,IAAIC,CAAa,EAAE,EACvE,0BAAyB,GAAGD,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGQ,CAAK,IAAIC,CAAO,GAEpD,oBAAC,OAAI,UAAU,oCAAqC,SAAAE,GAAY,SAAS,KACzE,OAAC,OAAI,UAAU,SACb,mBAAC,OACC,MAAM,KACN,OAAO,KACP,UAAU,WACV,MAAM,6BACN,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,YAAY,MACZ,cAAc,QACf,EACH,EACF,GACF,GAEJ,CAGN,CAAC,EAEDV,EAAM,YAAc,QAEpB,IAAOd,MAAQ,cAAWc,CAAK",
6
6
  "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_components", "import_Styles", "import_trackUrlRef", "import_react_intersection_observer", "componentType", "componentName", "Title", "React", "data", "className", "as", "weight", "ref", "title", "caption", "theme", "extensions", "align", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "inViewRef", "inView", "gsapResize", "height", "words", "self", "progress", "total", "overlap", "interval", "step", "lastEnd", "normalizedProgress", "word", "i", "start", "width", "opacity"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var L=Object.create;var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var R=(t,e)=>{for(var r in e)d(t,r,{get:e[r],enumerable:!0})},y=(t,e,r,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!j.call(t,a)&&a!==r&&d(t,a,{get:()=>e[a],enumerable:!(m=x(e,a))||m.enumerable});return t};var k=(t,e,r)=>(r=t!=null?L(U(t)):{},y(e||!t||!t.__esModule?d(r,"default",{value:t,enumerable:!0}):r,t)),N=t=>y(d({},"__esModule",{value:!0}),t);var C={};R(C,{default:()=>B});module.exports=N(C);var u=require("react/jsx-runtime"),p=k(require("react"));const $=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],Z=3960,W=3980,v={domains:["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],deviceSizes:[375,390,768,1024,1280,1440,1540,1920]},z=t=>$.some(e=>t==e),D=(t="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(t),H=t=>{try{return new URL(t).searchParams.get("alt")||""}catch{return""}},T=t=>{try{const e=new URL(t);return e.searchParams.delete("alt"),e.toString()}catch{return t}},X=p.default.forwardRef(({imgClassName:t="",source:e="",quality:r=2,deviceSizes:m=[375,390,767,1023,1024,1279,1440,1439,1539,1919,1920],className:a,loading:A="lazy",alt:h="",...w},I)=>{const M=s=>(v?.domains||[]).some(i=>s.includes(i)),g=(0,p.useCallback)(({src:s,width:o})=>{const i=o,c=T(s);try{const n=new URL(c);if(!z(n.hostname))return c;const l=n.pathname.split("/").pop()||"";if(D(l))return c?.split("/")?.map(f=>{if(M(c)&&/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\?.*)?/.test(f)&&/_[0-9]{2,4}x/.test(c)===!1){const P=f.split(".");return P.map((b,E)=>E===P.length-2?`${b}_${i<3960?i:3980}x`:b).join(".")}return f}).join("/")}catch{return c}},[]),S=(0,p.useCallback)(({srcArr:s,width:o})=>{const i=o*r,c=g({src:s[0][0],width:i}),n=s.filter(([,l])=>l&&parseInt(l,10)>=o).map(([l])=>g({src:l,width:i})).pop();return(0,u.jsx)("source",{srcSet:n||c,media:`(max-width: ${o}px)`},o)},[g,r]),_=(0,p.useMemo)(()=>{if(typeof e!="string"||!e)return[];const s=e.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(n=>n.split(" ").filter(Boolean)),o=h||s.map(n=>n[0]).filter(Boolean).map(H).find(Boolean)||"",i=m.map(n=>S({srcArr:s,width:n})),c=g({src:s[0][0],width:1920*r});return[...i,(0,u.jsx)("img",{src:c,className:`w-full ${t}`,loading:A,alt:o,...w},"default")]},[m,t,g,r,e,S,h]);return(0,u.jsxs)("picture",{ref:I,className:`block overflow-hidden ${a}`,children:[_,w.children]})});var B=X;
1
+ "use strict";"use client";var L=Object.create;var f=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var R=(t,e)=>{for(var r in e)f(t,r,{get:e[r],enumerable:!0})},A=(t,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!j.call(t,a)&&a!==r&&f(t,a,{get:()=>e[a],enumerable:!(l=x(e,a))||l.enumerable});return t};var k=(t,e,r)=>(r=t!=null?L(U(t)):{},A(e||!t||!t.__esModule?f(r,"default",{value:t,enumerable:!0}):r,t)),N=t=>A(f({},"__esModule",{value:!0}),t);var C={};R(C,{default:()=>B});module.exports=N(C);var u=require("react/jsx-runtime"),p=k(require("react"));const $=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],Z=3960,W=3980,v={domains:["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],deviceSizes:[375,390,768,1024,1280,1440,1540,1920]},z=t=>$.some(e=>t==e),D=(t="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(t),H=t=>{try{return new URL(t).searchParams.get("alt")||""}catch{return""}},T=t=>{try{const e=new URL(t);return e.searchParams.delete("alt"),e.toString()}catch{return t}},X=p.default.forwardRef(({imgClassName:t="",source:e="",quality:r=2,deviceSizes:l=[375,390,767,1023,1024,1279,1440,1439,1539,1919,1920],className:a,loading:h="lazy",alt:w="",...S},I)=>{const M=s=>(v?.domains||[]).some(i=>s.includes(i)),g=(0,p.useCallback)(({src:s,width:o})=>{const i=o,c=T(s);try{const n=new URL(c);if(!z(n.hostname))return c;const m=n.pathname.split("/").pop()||"";if(D(m))return c?.split("/")?.map(d=>{if(M(c)&&/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\?.*)?/.test(d)&&/_[0-9]{2,4}x/.test(c)===!1){const b=d.split(".");return b.map((y,E)=>E===b.length-2?`${y}_${i<3960?i:3980}x`:y).join(".")}return d}).join("/")}catch{return c}},[]),P=(0,p.useCallback)(({srcArr:s,width:o})=>{const i=o*r,c=g({src:s[0][0],width:i}),n=s.filter(([,m])=>m&&parseInt(m,10)>=o).map(([m])=>g({src:m,width:i})).pop();return(0,u.jsx)("source",{srcSet:n||c,media:`(max-width: ${o}px)`},o)},[g,r]),_=(0,p.useMemo)(()=>{if(typeof e!="string"||!e)return[];const s=e.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(n=>n.split(" ").filter(Boolean)),o=w||s.map(n=>n[0]).filter(Boolean).map(H).find(Boolean)||"",i=l.map(n=>P({srcArr:s,width:n})),c=g({src:s[0][0],width:1920*r});return[...i,(0,u.jsx)("img",{src:c,className:`w-full ${t}`,loading:h,alt:o,...S},"default")]},[l,t,g,r,e,P,w,h]);return(0,u.jsxs)("picture",{ref:I,className:`block overflow-hidden ${a}`,children:[_,S.children]})});var B=X;
2
2
  //# sourceMappingURL=picture.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/picture.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n alt?: string\n}\nconst images = {\n domains: ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'],\n deviceSizes: [375, 390, 768, 1024, 1280, 1440, 1540, 1920],\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\n/**\n * \u4ECE URL \u4E2D\u89E3\u6790 alt \u53C2\u6570\n * @param url \u56FE\u7247 URL\n * @returns \u89E3\u6790\u51FA\u7684 alt \u503C\uFF0C\u5982\u679C\u6CA1\u6709\u5219\u8FD4\u56DE\u7A7A\u5B57\u7B26\u4E32\n */\nconst parseAltFromUrl = (url: string): string => {\n try {\n return new URL(url).searchParams.get('alt') || ''\n } catch {\n return ''\n }\n}\n\n/**\n * \u79FB\u9664 URL \u4E2D\u7684 alt \u53C2\u6570\n * @param url \u56FE\u7247 URL\n * @returns \u79FB\u9664 alt \u53C2\u6570\u540E\u7684 URL\n */\nconst removeAltFromUrl = (url: string): string => {\n try {\n const urlObj = new URL(url)\n urlObj.searchParams.delete('alt')\n return urlObj.toString()\n } catch {\n return url\n }\n}\n\nconst Picture = React.forwardRef<HTMLPictureElement, PictureProps>(\n (\n {\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 390, 767, 1023, 1024, 1279, 1440, 1439, 1539, 1919, 1920],\n className,\n loading = 'lazy',\n alt = '',\n ...rest\n }: PictureProps,\n ref\n ) => {\n const isShopifycdn = (src: string | string[]) => {\n const domains = images?.domains || []\n return domains.some(domain => src.includes(domain))\n }\n\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n const cleanSrc = removeAltFromUrl(src)\n try {\n const parsedUrl = new URL(cleanSrc)\n if (!isMatchDomain(parsedUrl.hostname)) {\n return cleanSrc\n }\n const fileName = parsedUrl.pathname.split('/').pop() || ''\n if (idMatchFileExtensions(fileName)) {\n return cleanSrc\n ?.split('/')\n ?.map(item => {\n if (\n isShopifycdn(cleanSrc) &&\n /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\\?.*)?/.test(item) &&\n /_[0-9]{2,4}x/.test(cleanSrc) === false\n ) {\n const name = item.split('.')\n return name\n .map((v, i) => {\n if (i === name.length - 2) {\n return `${v}_${size < 3960 ? size : 3980}x`\n }\n return v\n })\n .join('.')\n }\n return item\n })\n .join('/')\n }\n } catch (error) {\n return cleanSrc\n }\n }, [])\n\n const sourceSrcSet = useCallback(\n ({ srcArr, width }: { srcArr: string[][]; width: number }) => {\n const computedWidth = width * quality\n const defaultSrc = imgSrcSetsize({ src: srcArr[0][0], width: computedWidth })\n \n const matchingSrc = srcArr\n .filter(([, breakpoint]) => breakpoint && parseInt(breakpoint, 10) >= width)\n .map(([src]) => imgSrcSetsize({ src, width: computedWidth }))\n .pop()\n \n return <source key={width} srcSet={matchingSrc || defaultSrc} media={`(max-width: ${width}px)`} />\n },\n [imgSrcSetsize, quality]\n )\n\n const sourceList = useMemo(() => {\n if (typeof source !== 'string' || !source) return []\n \n const srcArr = source\n .replace(/[\\r\\n]/g, '')\n .replace(/\\s\\s+/g, ' ')\n .split(',')\n .map(item => item.split(' ').filter(Boolean))\n\n // \u4ECE URL \u4E2D\u89E3\u6790 alt \u53C2\u6570\uFF0C\u4F18\u5148\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL\n const parsedAlt = alt || srcArr\n .map(item => item[0])\n .filter(Boolean)\n .map(parseAltFromUrl)\n .find(Boolean) || ''\n\n const sources = deviceSizes.map(width => sourceSrcSet({ srcArr, width }))\n const defaultImg = imgSrcSetsize({ src: srcArr[0][0], width: 1920 * quality })\n\n return [\n ...sources,\n <img key=\"default\" src={defaultImg} className={`w-full ${imgClassName}`} loading={loading} alt={parsedAlt} {...rest} />\n ]\n }, [deviceSizes, imgClassName, imgSrcSetsize, quality, source, sourceSrcSet, alt])\n\n return (\n <picture ref={ref} className={`block overflow-hidden ${className}`}>\n {sourceList}\n {rest.children}\n </picture>\n )\n }\n)\nexport default Picture\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2He,IAAAI,EAAA,6BA1HfC,EAA4C,oBAE5C,MAAMC,EAAkC,CAAC,kBAAmB,qBAAsB,kBAAkB,EAE9FC,EAAW,KACXC,EAAiB,KAajBC,EAAS,CACb,QAAS,CAAC,kBAAmB,qBAAsB,kBAAkB,EACrE,YAAa,CAAC,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,IAAI,CAC3D,EAEMC,EAAiBC,GACdL,EAAgC,KAAKM,GAAUD,GAAaC,CAAM,EAErEC,EAAwB,CAACC,EAAmB,KAAO,yCAAyC,KAAKA,CAAQ,EAOzGC,EAAmBC,GAAwB,CAC/C,GAAI,CACF,OAAO,IAAI,IAAIA,CAAG,EAAE,aAAa,IAAI,KAAK,GAAK,EACjD,MAAQ,CACN,MAAO,EACT,CACF,EAOMC,EAAoBD,GAAwB,CAChD,GAAI,CACF,MAAME,EAAS,IAAI,IAAIF,CAAG,EAC1B,OAAAE,EAAO,aAAa,OAAO,KAAK,EACzBA,EAAO,S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AnB,EAAK,UACR,CAEJ,CACF,EACA,IAAO1B,EAAQiB",
4
+ "sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n alt?: string\n}\nconst images = {\n domains: ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'],\n deviceSizes: [375, 390, 768, 1024, 1280, 1440, 1540, 1920],\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\n/**\n * \u4ECE URL \u4E2D\u89E3\u6790 alt \u53C2\u6570\n * @param url \u56FE\u7247 URL\n * @returns \u89E3\u6790\u51FA\u7684 alt \u503C\uFF0C\u5982\u679C\u6CA1\u6709\u5219\u8FD4\u56DE\u7A7A\u5B57\u7B26\u4E32\n */\nconst parseAltFromUrl = (url: string): string => {\n try {\n return new URL(url).searchParams.get('alt') || ''\n } catch {\n return ''\n }\n}\n\n/**\n * \u79FB\u9664 URL \u4E2D\u7684 alt \u53C2\u6570\n * @param url \u56FE\u7247 URL\n * @returns \u79FB\u9664 alt \u53C2\u6570\u540E\u7684 URL\n */\nconst removeAltFromUrl = (url: string): string => {\n try {\n const urlObj = new URL(url)\n urlObj.searchParams.delete('alt')\n return urlObj.toString()\n } catch {\n return url\n }\n}\n\nconst Picture = React.forwardRef<HTMLPictureElement, PictureProps>(\n (\n {\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 390, 767, 1023, 1024, 1279, 1440, 1439, 1539, 1919, 1920],\n className,\n loading = 'lazy',\n alt = '',\n ...rest\n }: PictureProps,\n ref\n ) => {\n const isShopifycdn = (src: string | string[]) => {\n const domains = images?.domains || []\n return domains.some(domain => src.includes(domain))\n }\n\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n const cleanSrc = removeAltFromUrl(src)\n try {\n const parsedUrl = new URL(cleanSrc)\n if (!isMatchDomain(parsedUrl.hostname)) {\n return cleanSrc\n }\n const fileName = parsedUrl.pathname.split('/').pop() || ''\n if (idMatchFileExtensions(fileName)) {\n return cleanSrc\n ?.split('/')\n ?.map(item => {\n if (\n isShopifycdn(cleanSrc) &&\n /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\\?.*)?/.test(item) &&\n /_[0-9]{2,4}x/.test(cleanSrc) === false\n ) {\n const name = item.split('.')\n return name\n .map((v, i) => {\n if (i === name.length - 2) {\n return `${v}_${size < 3960 ? size : 3980}x`\n }\n return v\n })\n .join('.')\n }\n return item\n })\n .join('/')\n }\n } catch (error) {\n return cleanSrc\n }\n }, [])\n\n const sourceSrcSet = useCallback(\n ({ srcArr, width }: { srcArr: string[][]; width: number }) => {\n const computedWidth = width * quality\n const defaultSrc = imgSrcSetsize({ src: srcArr[0][0], width: computedWidth })\n \n const matchingSrc = srcArr\n .filter(([, breakpoint]) => breakpoint && parseInt(breakpoint, 10) >= width)\n .map(([src]) => imgSrcSetsize({ src, width: computedWidth }))\n .pop()\n \n return <source key={width} srcSet={matchingSrc || defaultSrc} media={`(max-width: ${width}px)`} />\n },\n [imgSrcSetsize, quality]\n )\n\n const sourceList = useMemo(() => {\n if (typeof source !== 'string' || !source) return []\n \n const srcArr = source\n .replace(/[\\r\\n]/g, '')\n .replace(/\\s\\s+/g, ' ')\n .split(',')\n .map(item => item.split(' ').filter(Boolean))\n\n // \u4ECE URL \u4E2D\u89E3\u6790 alt \u53C2\u6570\uFF0C\u4F18\u5148\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL\n const parsedAlt = alt || srcArr\n .map(item => item[0])\n .filter(Boolean)\n .map(parseAltFromUrl)\n .find(Boolean) || ''\n\n const sources = deviceSizes.map(width => sourceSrcSet({ srcArr, width }))\n const defaultImg = imgSrcSetsize({ src: srcArr[0][0], width: 1920 * quality })\n\n return [\n ...sources,\n <img key=\"default\" src={defaultImg} className={`w-full ${imgClassName}`} loading={loading} alt={parsedAlt} {...rest} />\n ]\n }, [deviceSizes, imgClassName, imgSrcSetsize, quality, source, sourceSrcSet, alt, loading])\n\n return (\n <picture ref={ref} className={`block overflow-hidden ${className}`}>\n {sourceList}\n {rest.children}\n </picture>\n )\n }\n)\nexport default Picture\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2He,IAAAI,EAAA,6BA1HfC,EAA4C,oBAE5C,MAAMC,EAAkC,CAAC,kBAAmB,qBAAsB,kBAAkB,EAE9FC,EAAW,KACXC,EAAiB,KAajBC,EAAS,CACb,QAAS,CAAC,kBAAmB,qBAAsB,kBAAkB,EACrE,YAAa,CAAC,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,IAAI,CAC3D,EAEMC,EAAiBC,GACdL,EAAgC,KAAKM,GAAUD,GAAaC,CAAM,EAErEC,EAAwB,CAACC,EAAmB,KAAO,yCAAyC,KAAKA,CAAQ,EAOzGC,EAAmBC,GAAwB,CAC/C,GAAI,C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Y,GAAI,QAASK,EAAS,IAAKsB,EAAY,GAAGpB,GAAtG,SAA4G,CACvH,CACF,EAAG,CAACJ,EAAaH,EAAcW,EAAeT,EAASD,EAAQmB,EAAcd,EAAKD,CAAO,CAAC,EAE1F,SACE,QAAC,WAAQ,IAAKG,EAAK,UAAW,yBAAyBJ,CAAS,GAC7D,UAAAsB,EACAnB,EAAK,UACR,CAEJ,CACF,EACA,IAAO1B,EAAQiB",
6
6
  "names": ["picture_exports", "__export", "picture_default", "__toCommonJS", "import_jsx_runtime", "import_react", "APPEND_FILE_SUFFIX_MATCH_DOMAIN", "MAX_SIZE", "FIXED_MAX_SIZE", "images", "isMatchDomain", "srcDomain", "domain", "idMatchFileExtensions", "fileName", "parseAltFromUrl", "url", "removeAltFromUrl", "urlObj", "Picture", "React", "imgClassName", "source", "quality", "deviceSizes", "className", "loading", "alt", "rest", "ref", "isShopifycdn", "src", "imgSrcSetsize", "width", "size", "cleanSrc", "parsedUrl", "item", "name", "v", "i", "sourceSrcSet", "srcArr", "computedWidth", "defaultSrc", "matchingSrc", "breakpoint", "sourceList", "parsedAlt", "sources", "defaultImg"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as n,jsx as e,jsxs as s}from"react/jsx-runtime";import{cn as x}from"../../helpers/utils.js";import{withLayout as c}from"../../shared/Styles.js";import{Picture as o,Text as m}from"../../components/index.js";const u=d=>{const{data:t,className:k}=d,{title:a,img:i,mobileImg:p,list:g}=t;return e(n,{children:s("div",{className:"w-full",children:[s("div",{className:"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full",children:[e("div",{className:" desktop:w-[600px] lg-desktop:w-[800px]",children:a&&e(m,{html:a,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]"})}),s("div",{children:[i?.url&&e(o,{className:"w-[464px] rounded-2xl hidden desktop:block",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),p?.url&&e(o,{className:"w-[224px] rounded-2xl block desktop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]})]}),e("div",{className:"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]",children:g.map((l,r)=>s("div",{className:"relative",children:[e(o,{className:" rounded-2xl",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),s("div",{className:x("text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]",{"aiui-dark":l.theme==="dark"}),children:[e(m,{html:l?.title,className:" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]"}),e(m,{html:l?.desc,className:" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]"})]})]},r))})]})})};var v=c(u);export{v as default};
1
+ "use client";import{Fragment as I,jsx as t,jsxs as l}from"react/jsx-runtime";import{cn as g}from"../../helpers/utils.js";import{withLayout as x}from"../../shared/Styles.js";import{Picture as m,Text as p}from"../../components/index.js";import{useExposure as u}from"../../hooks/useExposure.js";import{useRef as f}from"react";const k="image",N="aplus_desc",b=({index:s,item:e})=>{const o=f(null);return u(o,{componentType:k,componentName:N,position:s+1,componentTitle:e.title,componentDescription:e.desc}),l("div",{ref:o,className:"relative",children:[t(m,{className:" rounded-2xl",imgClassName:"",source:e?.img?.url,alt:e?.img?.alt||""}),l("div",{className:g("text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]",{"aiui-dark":e.theme==="dark"}),children:[t(p,{html:e?.title,className:" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]"}),t(p,{html:e?.desc,className:" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]"})]})]})},v=s=>{const{data:e,className:o}=s,{title:i,img:d,mobileImg:r,list:c}=e;return t(I,{children:l("div",{className:"w-full",children:[l("div",{className:"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full",children:[t("div",{className:" desktop:w-[600px] lg-desktop:w-[800px]",children:i&&t(p,{html:i,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]"})}),l("div",{children:[d?.url&&t(m,{className:"w-[464px] rounded-2xl hidden desktop:block",imgClassName:"",source:e?.img?.url,alt:e?.img?.alt||""}),r?.url&&t(m,{className:"w-[224px] rounded-2xl block desktop:hidden",imgClassName:"",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})]})]}),t("div",{className:"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]",children:c.map((n,a)=>t(b,{index:a,item:n},a))})]})})};var D=x(v);export{D as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/AplusDesc/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\n\ntype AplusItem = {\n img: Img\n mobileImg: Img\n title: string\n desc: string\n theme: 'light' | 'dark'\n}\n\ntype AplusDescType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: AplusItem[]\n }\n className?: string\n}\n\nconst AplusDesc = (props: AplusDescType) => {\n const { data, className } = props\n const { title, img , mobileImg,list} = data\n\n return (\n <>\n <div className='w-full'>\n <div className='flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full'>\n <div className=' desktop:w-[600px] lg-desktop:w-[800px]'>\n {title && (\n <Text\n html={title}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n <div>\n {img?.url && (\n <Picture\n className=\"w-[464px] rounded-2xl hidden desktop:block\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {mobileImg?.url && (\n <Picture\n className=\"w-[224px] rounded-2xl block desktop:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n </div>\n </div>\n <div className='mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]'>\n {list.map((item,ind)=>(\n <div key={ind} className='relative'>\n <Picture\n className=\" rounded-2xl\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n <div className={cn(\n 'text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}>\n <Text html={item?.title} className=\" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <Text html={item?.desc} className=\" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]\" />\n </div>\n </div>\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(AplusDesc)\n"],
5
- "mappings": "aA8BI,mBAAAA,EAKY,OAAAC,EAMJ,QAAAC,MAXR,oBA7BJ,OAAS,MAAAC,MAAU,yBAEnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAqB9B,MAAMC,EAAaC,GAAyB,CAC1C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,MAAAG,EAAO,IAAAC,EAAM,UAAAC,EAAU,KAAAC,CAAI,EAAIL,EAEvC,OACER,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAU,SACb,UAAAA,EAAC,OAAI,UAAU,qFACX,UAAAD,EAAC,OAAI,UAAU,0CACV,SAAAU,GACDV,EAACK,EAAA,CACG,KAAMK,EACN,UAAU,iFACd,EAEJ,EACAT,EAAC,OACI,UAAAU,GAAK,KACNX,EAACI,EAAA,CACG,UAAU,6CACV,aAAa,GACb,OAAQI,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EAEHI,GAAW,KACRZ,EAACI,EAAA,CACG,UAAU,6CACV,aAAa,GACb,OAAQI,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GACjC,GAEJ,GACJ,EACAR,EAAC,OAAI,UAAU,+EACV,SAAAa,EAAK,IAAI,CAACC,EAAKC,IACZd,EAAC,OAAc,UAAU,WACrB,UAAAD,EAACI,EAAA,CACG,UAAU,eACV,aAAa,GACb,OAAQU,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EACAb,EAAC,OAAI,UAAWC,EACZ,+JACA,CACI,YAAaY,EAAK,QAAU,MAChC,CACJ,EACI,UAAAd,EAACK,EAAA,CAAK,KAAMS,GAAM,MAAO,UAAU,8DAA8D,EACjGd,EAACK,EAAA,CAAK,KAAMS,GAAM,KAAM,UAAU,8DAA8D,GACpG,IAfMC,CAgBV,CACH,EACL,GACF,EACF,CAEJ,EAEA,IAAOC,EAAQb,EAAWG,CAAS",
6
- "names": ["Fragment", "jsx", "jsxs", "cn", "withLayout", "Picture", "Text", "AplusDesc", "props", "data", "className", "title", "img", "mobileImg", "list", "item", "ind", "AplusDesc_default"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\ntype AplusItem = {\n img: Img\n mobileImg: Img\n title: string\n desc: string\n theme: 'light' | 'dark'\n}\n\ntype AplusDescType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: AplusItem[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'aplus_desc'\n\nconst Item = ({ index, item }: { index: number; item: AplusItem }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n componentDescription: item.desc,\n })\n \n return (\n <div ref={ref} className=\"relative\">\n <Picture className=\" rounded-2xl\" imgClassName=\"\" source={item?.img?.url} alt={item?.img?.alt || ''} />\n <div\n className={cn(\n 'text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Text html={item?.title} className=\" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <Text html={item?.desc} className=\" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]\" />\n </div>\n </div>\n )\n}\n\nconst AplusDesc = (props: AplusDescType) => {\n const { data, className } = props\n const { title, img, mobileImg, list } = data\n\n return (\n <>\n <div className=\"w-full\">\n <div className=\"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full\">\n <div className=\" desktop:w-[600px] lg-desktop:w-[800px]\">\n {title && (\n <Text\n html={title}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n <div>\n {img?.url && (\n <Picture\n className=\"w-[464px] rounded-2xl hidden desktop:block\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {mobileImg?.url && (\n <Picture\n className=\"w-[224px] rounded-2xl block desktop:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n </div>\n </div>\n <div className=\"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px]\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(AplusDesc)\n"],
5
+ "mappings": "aA0CM,OAqBF,YAAAA,EArBE,OAAAC,EACA,QAAAC,MADA,oBAzCN,OAAS,MAAAC,MAAU,yBAEnB,OAAS,cAAAC,M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,CACC,UAAU,6CACV,aAAa,GACb,OAAQY,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,GAEJ,GACF,EACAhB,EAAC,OAAI,UAAU,+EACZ,SAAAqB,EAAK,IAAI,CAACT,EAAMD,IACfX,EAACU,EAAA,CAAiB,MAAOC,EAAO,KAAMC,GAA3BD,CAAiC,CAC7C,EACH,GACF,EACF,CAEJ,EAEA,IAAOW,EAAQnB,EAAWW,CAAS",
6
+ "names": ["Fragment", "jsx", "jsxs", "cn", "withLayout", "Picture", "Text", "useExposure", "useRef", "componentType", "componentName", "Item", "index", "item", "ref", "AplusDesc", "props", "data", "className", "title", "img", "mobileImg", "list", "AplusDesc_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as i}from"react/jsx-runtime";import n from"react";import{Swiper as l,SwiperSlide as p}from"swiper/react";import{Pagination as d,FreeMode as f,Mousewheel as c}from"swiper/modules";import"swiper/css";import"swiper/css/pagination";const o=n.forwardRef(({data:e,Slide:s,id:a,pagination:w})=>i(l,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1},className:"!overflow-visible",modules:[f,c,d],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:e?.list?.map((t,r)=>i(p,{className:"!h-[unset]",children:i(s,{data:t,configuration:{...e?.configuration,index:r}})},a+"SwiperSlide"+r))}));o.displayName="SwiperBox";var M=o;export{M as default};
1
+ "use client";import{jsx as i}from"react/jsx-runtime";import n from"react";import{Swiper as l,SwiperSlide as p}from"swiper/react";import{Pagination as d,FreeMode as f,Mousewheel as c}from"swiper/modules";import"swiper/css";import"swiper/css/pagination";const o=n.forwardRef(({data:e,Slide:s,id:a,pagination:w},m)=>i(l,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1},className:"!overflow-visible",modules:[f,c,d],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:e?.list?.map((t,r)=>i(p,{className:"!h-[unset]",children:i(s,{data:t,configuration:{...e?.configuration,index:r}})},a+"SwiperSlide"+r))}));o.displayName="SwiperBox";var y=o;export{y as default};
2
2
  //# sourceMappingURL=SwiperCategory.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/SwiperCategory.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n pagination?: any\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, Slide, id, pagination }) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n }}\n className=\"!overflow-visible\"\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{...data?.configuration, index: jIndex}} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
- "mappings": "aA6DU,cAAAA,MAAA,oBA5DV,OAAOC,MAAW,QAClB,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,YAAAC,EAAU,cAAAC,MAAkB,iBACjD,MAAO,aACP,MAAO,wBAcP,MAAMC,EAAYN,EAAM,WAA2C,CAAC,CAAE,KAAAO,EAAM,MAAAC,EAAO,GAAAC,EAAI,WAAAC,CAAW,IAE9FX,EAACE,EAAA,CACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,EAClB,EACA,UAAU,oBACV,QAAS,CAACG,EAAUC,EAAYF,CAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGI,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,SAAAA,GAAM,MAAM,IAAI,CAACI,EAAMC,IACtBb,EAACG,EAAA,CAA8C,UAAU,aACvD,SAAAH,EAACS,EAAA,CAAM,KAAMG,EAAM,cAAe,CAAC,GAAGJ,GAAM,cAAe,MAAOK,CAAM,EAAG,GAD3DH,EAAK,cAAgBG,CAEvC,CACD,EACH,CAEH,EAEDN,EAAU,YAAc,YAExB,IAAOO,EAAQP",
6
- "names": ["jsx", "React", "Swiper", "SwiperSlide", "Pagination", "FreeMode", "Mousewheel", "SwiperBox", "data", "Slide", "id", "pagination", "item", "jIndex", "SwiperCategory_default"]
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n pagination?: any\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, Slide, id, pagination }, ref) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n }}\n className=\"!overflow-visible\"\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{ ...data?.configuration, index: jIndex }} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "aA6DU,cAAAA,MAAA,oBA5DV,OAAOC,MAAW,QAClB,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,YAAAC,EAAU,cAAAC,MAAkB,iBACjD,MAAO,aACP,MAAO,wBAcP,MAAMC,EAAYN,EAAM,WAA2C,CAAC,CAAE,KAAAO,EAAM,MAAAC,EAAO,GAAAC,EAAI,WAAAC,CAAW,EAAGC,IAEjGZ,EAACE,EAAA,CACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,EAClB,EACA,UAAU,oBACV,QAAS,CAACG,EAAUC,EAAYF,CAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGI,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,SAAAA,GAAM,MAAM,IAAI,CAACK,EAAMC,IACtBd,EAACG,EAAA,CAA8C,UAAU,aACvD,SAAAH,EAACS,EAAA,CAAM,KAAMI,EAAM,cAAe,CAAE,GAAGL,GAAM,cAAe,MAAOM,CAAO,EAAG,GAD7DJ,EAAK,cAAgBI,CAEvC,CACD,EACH,CAEH,EAEDP,EAAU,YAAc,YAExB,IAAOQ,EAAQR",
6
+ "names": ["jsx", "React", "Swiper", "SwiperSlide", "Pagination", "FreeMode", "Mousewheel", "SwiperBox", "data", "Slide", "id", "pagination", "ref", "item", "jIndex", "SwiperCategory_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as n,jsx as t,jsxs as s}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as r}from"../../shared/Styles.js";import{Picture as p,Text as a}from"../../components/index.js";const x=d=>{const{data:l,className:g}=d,{list:i}=l;return t(n,{children:s("div",{className:"",children:[l?.title&&t("div",{className:"pb-[24px] desktop:w-[800px]",children:t(a,{html:l?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),l?.img?.url&&t(p,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),l?.mobileImg?.url&&t(p,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""}),t("div",{className:"",children:t("div",{className:"flex flex-col gap-4",children:i.map((e,o)=>s("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${o%2===0?"laptop:flex-row-reverse":""}`,children:[s("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[t(a,{html:e?.title,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),t(a,{html:e?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),e?.numberOne&&s("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[s("div",{className:"",children:[t(a,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberOne,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(a,{html:e?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),s("div",{children:[t(a,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberTwo,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(a,{html:e?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),e?.icon?.url&&t("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:t(p,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),t("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:t(p,{className:"w-full h-full object-cover ",source:e?.img?.url,alt:e?.img?.alt||""})}),t("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:t(p,{className:"w-full h-full object-cover",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})})]},o))})})]})})};var f=r(x);export{f as default};
1
+ "use client";import{Fragment as b,jsx as e,jsxs as p}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{useExposure as d}from"../../hooks/useExposure.js";import{withLayout as x}from"../../shared/Styles.js";import{Picture as o,Text as l}from"../../components/index.js";import{useRef as m}from"react";const c="image",g="features",u=({index:s,item:t})=>{const a=m(null);return d(a,{componentType:c,componentName:g,position:s+1,componentTitle:t.title,componentDescription:t.description}),p("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${s%2===0?"laptop:flex-row-reverse":""}`,ref:a,children:[p("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[e(l,{html:t?.title,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),e(l,{html:t?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),t?.numberOne&&p("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[p("div",{className:"",children:[e(l,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:t?.numberOne,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),e(l,{html:t?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),p("div",{children:[e(l,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:t?.numberTwo,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),e(l,{html:t?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),t?.icon?.url&&e("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:e(o,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:t?.icon?.url,alt:t?.icon?.alt||""})})]}),e("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:e(o,{className:"w-full h-full object-cover ",source:t?.img?.url,alt:t?.img?.alt||""})}),e("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:e(o,{className:"w-full h-full object-cover",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})})]})},k=s=>{const{data:t,className:a}=s,{list:r}=t;return e(b,{children:p("div",{className:"",children:[t?.title&&e("div",{className:"pb-[24px] desktop:w-[800px]",children:e(l,{html:t?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),t?.img?.url&&e(o,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),t?.mobileImg?.url&&e(o,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""}),e("div",{className:"flex flex-col gap-4",children:r.map((n,i)=>e(u,{index:i,item:n},i))})]})})};var _=x(k);export{_ as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Features/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=''>\n {data?.title && (\n <div className='pb-[24px] desktop:w-[800px]'>\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=''>\n <div className='flex flex-col gap-4'>\n {list.map((item, index) => (\n <div key={index} className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}>\n <div className='flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]'>\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && \n <div className='desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]'>\n <div className=''>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n \n \n </div>\n }\n {item?.icon?.url && \n <div className='pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]'><Picture className='w-[358px] desktop:w-[368px] lg-desktop:w-[488px]' source={item?.icon?.url} alt={item?.icon?.alt || ''} /></div>\n }\n </div>\n <div className='aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]'>\n <Picture className='w-full h-full object-cover ' source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className='aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]'>\n <Picture className='w-full h-full object-cover' source={item?.mobileImg?.url} alt={item?.mobileImg?.alt || ''} />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
5
- "mappings": "aAkCI,mBAAAA,EAIQ,O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A,EACAT,EAAC,OACG,UAAAD,EAACI,EAAA,CACG,MAAO,CACH,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACX,EACA,KAAMM,GAAM,UACZ,UAAU,mHACd,EACAV,EAACI,EAAA,CACG,KAAMM,GAAM,QACZ,UAAU,wIACd,GACJ,GAGJ,EAECA,GAAM,MAAM,KACbV,EAAC,OAAI,UAAU,mDAAmD,SAAAA,EAACG,EAAA,CAAQ,UAAU,mDAAmD,OAAQO,GAAM,MAAM,IAAK,IAAKA,GAAM,MAAM,KAAO,GAAI,EAAE,GAEnM,EACAV,EAAC,OAAI,UAAU,4GACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,8BAA8B,OAAQO,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EACxG,EACAV,EAAC,OAAI,UAAU,uEACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,6BAA6B,OAAQO,GAAM,WAAW,IAAK,IAAKA,GAAM,WAAW,KAAO,GAAI,EACnH,IA5DMC,CA6DV,CACH,EACL,EACA,GACF,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAQ",
6
- "names": ["Fragment", "jsx", "jsxs", "withLayout", "Picture", "Text", "Features", "props", "data", "className", "list", "item", "index", "Features_default"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useRef } from 'react'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'features'\n\nconst Item = ({ index, item }: { index: number; item: FeaturesDataType }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n componentDescription: item.description,\n })\n\n return (\n <div\n className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}\n ref={ref}\n >\n <div className=\"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]\">\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && (\n <div className=\"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]\">\n <div className=\"\">\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n </div>\n )}\n {item?.icon?.url && (\n <div className=\"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]\">\n <Picture\n className=\"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]\"\n source={item?.icon?.url}\n alt={item?.icon?.alt || ''}\n />\n </div>\n )}\n </div>\n <div className=\"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]\">\n <Picture className=\"w-full h-full object-cover \" source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className=\"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]\">\n <Picture\n className=\"w-full h-full object-cover\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n </div>\n </div>\n )\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=\"\">\n {data?.title && (\n <div className=\"pb-[24px] desktop:w-[800px]\">\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=\"flex flex-col gap-4\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
5
+ "mappings": "aAmDQ,OA4EJ,YAAAA,EA5EI,OAAAC,EAWI,QAAAC,MAXJ,oBAlDR,MAAmB,yBACnB,MAAsB,wBACtB,OAAS,eAAAC,MAAmB,6BAE5B,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,UAAAC,MAAc,QAwBvB,MAAMC,EAAgB,QAChBC,EAAgB,WAEhBC,EAAO,CAAC,CAAE,MAAAC,EAAO,KAAAC,CAAK,IAAiD,CAC3E,MAAMC,EAAMN,EAAuB,IAAI,EAEvC,OAAAJ,EAAYU,EAAK,CACf,cAAeL,EACf,cAAeC,EACf,SAAUE,EAAQ,EAClB,eAAgBC,EAAK,MACrB,qBAAsBA,EAAK,WAC7B,CAAC,EAGCV,EAAC,OACC,UAAW,+DAA+DS,EAAQ,IAAM,EAAI,0BAA4B,EAAE,GAC1H,IAAKE,EAEL,UAAAX,EAAC,OAAI,UAAU,oFACb,UAAAD,EAACK,EAAA,CACC,KAAMM,GAAM,MACZ,UAAU,qHACZ,EACAX,EAACK,EAAA,CACC,KAAMM,GAAM,YACZ,UAAU,4KACZ,EAECA,GAAM,WACLV,EAAC,OAAI,UAAU,2FACb,UAAAA,EAAC,OAAI,UAAU,GACb,UAAAD,EAACK,EAAA,CACC,MAAO,CACL,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACT,EACA,KAAMM,GAAM,UACZ,UAAU,mHACZ,EACAX,EAACK,EAAA,CACC,KAAMM,GAAM,QACZ,UAAU,wIACZ,GACF,EACAV,EAAC,OACC,UAAAD,EAACK,EAAA,CACC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KAAMC,GAA3BD,CAAiC,CAC7C,EACH,GACF,EACF,CAEJ,EAEA,IAAOQ,EAAQf,EAAWU,CAAQ",
6
+ "names": ["Fragment", "jsx", "jsxs", "useExposure", "withLayout", "Picture", "Text", "useRef", "componentType", "componentName", "Item", "index", "item", "ref", "Features", "props", "data", "className", "list", "Features_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as l,jsxs as a}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as m}from"../../shared/Styles.js";import{Picture as e,Text as r}from"../../components/index.js";const d=o=>{const{data:s,className:g}=o,{list:i}=s;return l("div",{className:"w-full bg-[#EAEAEC] rounded-2xl",children:l("div",{className:"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6",children:i.map((t,p)=>a("div",{className:"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]",children:[a("div",{children:[t?.img?.url&&l(e,{className:"aspect-[194/194] l-tablet:hidden",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),t?.mobileImg?.url&&l(e,{className:"aspect-[120/120] laptop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]}),l(r,{html:t?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]},p))})})};var N=m(d);export{N as default};
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as r}from"../../shared/Styles.js";import{Picture as p,Text as c}from"../../components/index.js";import{useExposure as n}from"../../hooks/useExposure.js";import{useRef as g}from"react";const d="image",f="gift_box",x=({index:o,item:t})=>{const l=g(null);return n(l,{componentType:d,componentName:f,position:o+1,componentTitle:t.title}),a("div",{className:"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]",children:[a("div",{children:[t?.img?.url&&e(p,{className:"aspect-[194/194] l-tablet:hidden",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),t?.mobileImg?.url&&e(p,{className:"aspect-[120/120] laptop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]}),e(c,{html:t?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]},o)},u=o=>{const{data:t,className:l}=o,{list:s}=t;return e("div",{className:"w-full bg-[#EAEAEC] rounded-2xl",children:e("div",{className:"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6",children:s.map((m,i)=>e(x,{index:i,item:m},i))})})};var E=r(u);export{E as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/GiftBox/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type GiftBoxDataType = {\n img: Img\n mobileImg: Img\n title: string\n}\n\ntype GiftBoxType = {\n data: {\n list: GiftBoxDataType[]\n }\n className?: string\n}\n\nconst GiftBox = (props: GiftBoxType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <div className=\"w-full bg-[#EAEAEC] rounded-2xl\">\n <div className=\"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6\">\n {list.map((item, index) => (\n <div key={index} className=\"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]\">\n <div>\n {item?.img?.url && (\n <Picture\n className=\"aspect-[194/194] l-tablet:hidden\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n )}\n {item?.mobileImg?.url && (\n <Picture\n className=\"aspect-[120/120] laptop:hidden\"\n imgClassName=\"\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n )}\n </div>\n <Text html={item?.title} className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default withLayout(GiftBox)\n"],
5
- "mappings": "aA6BY,OAEI,OAAAA,EAFJ,QAAAC,MAAA,oBA5BZ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAe9B,MAAMC,EAAWC,GAAuB,CACtC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEP,EAAC,OAAI,UAAU,kCACb,SAAAA,EAAC,OAAI,UAAU,uHACZ,SAAAS,EAAK,IAAI,CAACC,EAAMC,IACfV,EAAC,OAAgB,UAAU,qEACzB,UAAAA,EAAC,OACE,UAAAS,GAAM,KAAK,KACVV,EAACG,EAAA,CACC,UAAU,mCACV,aAAa,GACb,OAAQO,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,KAChBV,EAACG,EAAA,CACC,UAAU,iCACV,aAAa,GACb,OAAQO,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,GAEJ,EACAV,EAACI,EAAA,CAAK,KAAMM,GAAM,MAAO,UAAU,yDAAyD,IAnBpFC,CAoBV,CACD,EACH,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAO",
6
- "names": ["jsx", "jsxs", "withLayout", "Picture", "Text", "GiftBox", "props", "data", "className", "list", "item", "index", "GiftBox_default"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\nexport type GiftBoxDataType = {\n img: Img\n mobileImg: Img\n title: string\n}\n\ntype GiftBoxType = {\n data: {\n list: GiftBoxDataType[]\n }\n className?: string\n}\n\nconst componentType = 'image'\nconst componentName = 'gift_box'\n\nconst Item = ({ index, item }: { index: number; item: GiftBoxDataType }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: index + 1,\n componentTitle: item.title,\n })\n return (\n <div key={index} className=\"flex flex-col items-center justify-center laptop:p-[20px] p-[12px]\">\n <div>\n {item?.img?.url && (\n <Picture\n className=\"aspect-[194/194] l-tablet:hidden\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n )}\n {item?.mobileImg?.url && (\n <Picture\n className=\"aspect-[120/120] laptop:hidden\"\n imgClassName=\"\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n )}\n </div>\n <Text html={item?.title} className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\" />\n </div>\n )\n}\n\nconst GiftBox = (props: GiftBoxType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <div className=\"w-full bg-[#EAEAEC] rounded-2xl\">\n <div className=\"grid grid-cols-2 gap-3 laptop:gap-4 tablet:grid-cols-4 laptop:grid-cols-3 desktop:grid-cols-5 lg-desktop:grid-cols-6\">\n {list.map((item, index) => (\n <Item key={index} index={index} item={item} />\n ))}\n </div>\n </div>\n )\n}\n\nexport default withLayout(GiftBox)\n"],
5
+ "mappings": "aAoCM,OAEI,OAAAA,EAFJ,QAAAC,MAAA,oBAnCN,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,UAAAC,MAAc,QAevB,MAAMC,EAAgB,QAChBC,EAAgB,WAEhBC,EAAO,CAAC,CAAE,MAAAC,EAAO,KAAAC,CAAK,IAAgD,CAC1E,MAAMC,EAAMN,EAAuB,IAAI,EAEvC,OAAAD,EAAYO,EAAK,CACf,cAAeL,EACf,cAAeC,EACf,SAAUE,EAAQ,EAClB,eAAgBC,EAAK,KACvB,CAAC,EAECV,EAAC,OAAgB,UAAU,qEACzB,UAAAA,EAAC,OACE,UAAAU,GAAM,KAAK,KACVX,EAACG,EAAA,CACC,UAAU,mCACV,aAAa,GACb,OAAQQ,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,KAChBX,EAACG,EAAA,CACC,UAAU,iCACV,aAAa,GACb,OAAQQ,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,GAEJ,EACAX,EAACI,EAAA,CAAK,KAAMO,GAAM,MAAO,UAAU,yDAAyD,IAnBpFD,CAoBV,CAEJ,EAEMG,EAAWC,GAAuB,CACtC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEf,EAAC,OAAI,UAAU,kCACb,SAAAA,EAAC,OAAI,UAAU,uHACZ,SAAAiB,EAAK,IAAI,CAACN,EAAMD,IACfV,EAACS,EAAA,CAAiB,MAAOC,EAAO,KAAMC,GAA3BD,CAAiC,CAC7C,EACH,EACF,CAEJ,EAEA,IAAOQ,EAAQhB,EAAWW,CAAO",
6
+ "names": ["jsx", "jsxs", "withLayout", "Picture", "Text", "useExposure", "useRef", "componentType", "componentName", "Item", "index", "item", "ref", "GiftBox", "props", "data", "className", "list", "GiftBox_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as o,jsxs as n}from"react/jsx-runtime";import{formatPrice as u}from"../../utils/index.js";import{useAiuiContext as f}from"../../../AiuiProvider/index.js";import{Text as r}from"../../../../components/index.js";import{cn as t}from"../../../../helpers/index.js";import{ShippingMethodMode as g}from"./type.js";const v=({item:e,index:a,active:d,toggleShipping:p,currencyCode:i,metafields:x,className:s=""})=>{const{trackingData:m,locale:c="us"}=f(),b=m?.common?.copywriting;return n("div",{role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&p(e,a)},className:t("relative flex cursor-pointer gap-[16px] overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]",{"cursor-not-allowed opacity-60":e.disabled,"border-brand":d},s),onClick:()=>p(e,a),children:[n("div",{className:"relative",children:[o(r,{className:t("text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]",{}),as:"p",html:e.title}),o(r,{className:t("mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]",{}),as:"p",html:e.subtitle})]}),o(r,{className:t("relative text-xl font-bold h-fit my-auto",{}),as:"p",html:e.price?u({amount:e.price,currencyCode:i,locale:c,removeTrailingZeros:!0}):b?.free}),e.mode!==g.FREE&&o("div",{className:t("absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white"),children:x?.memberOnly})]})};var w=v;export{w as default};
1
+ import{jsx as o,jsxs as l}from"react/jsx-runtime";import{formatPrice as u}from"../../utils/index.js";import{useAiuiContext as f}from"../../../AiuiProvider/index.js";import{Text as r}from"../../../../components/index.js";import{cn as t}from"../../../../helpers/index.js";import{ShippingMethodMode as g}from"./type.js";const y=({item:e,index:a,active:i,toggleShipping:p,currencyCode:d,metafields:x,className:s=""})=>{const{trackingData:m,locale:c="us"}=f(),b=m?.common?.copywriting;return l("div",{role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&p(e,a)},className:t("relative flex cursor-pointer gap-[16px] justify-between overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]",{"cursor-not-allowed opacity-60":e.disabled,"border-brand":i},s),onClick:()=>p(e,a),children:[l("div",{className:"relative",children:[o(r,{className:t("text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]",{}),as:"p",html:e.title}),o(r,{className:t("mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]",{}),as:"p",html:e.subtitle})]}),o(r,{className:t("relative text-xl font-bold h-fit my-auto",{}),as:"p",html:e.price?u({amount:e.price,currencyCode:d,locale:c,removeTrailingZeros:!0}):b?.free}),e.mode!==g.FREE&&o("div",{className:t("absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white"),children:x?.memberOnly})]})};var k=y;export{k as default};
2
2
  //# sourceMappingURL=ShippingMethod.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/biz-components/Listing/components/PaidShipping/ShippingMethod.tsx"],
4
- "sourcesContent": ["import { formatPrice } from '../../utils/index.js'\nimport { useAiuiContext } from '../../../AiuiProvider/index.js'\nimport { Text } from '../../../../components/index.js'\nimport { cn } from '../../../../helpers/index.js'\nimport { ShippingMethodMode } from './type.js'\n\nconst ShippingMethod = ({\n item,\n index,\n active,\n toggleShipping,\n currencyCode,\n metafields,\n className = '',\n}: {\n item: any\n index: number\n active: boolean\n toggleShipping: (item: any, index: number) => void\n currencyCode: string\n metafields: any\n className?: string\n}) => {\n const { trackingData, locale = 'us' } = useAiuiContext()\n const shopCommon = trackingData?.common?.copywriting\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n toggleShipping(item, index)\n }\n }}\n className={cn(\n 'relative flex cursor-pointer gap-[16px] overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]',\n {\n 'cursor-not-allowed opacity-60': item.disabled,\n 'border-brand': active,\n },\n className\n )}\n onClick={() => toggleShipping(item, index)}\n >\n <div className=\"relative\">\n <Text\n className={cn('text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]', {})}\n as=\"p\"\n html={item.title}\n />\n <Text\n className={cn('mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]', {})}\n as=\"p\"\n html={item.subtitle}\n />\n </div>\n\n <Text\n className={cn('relative text-xl font-bold h-fit my-auto', {})}\n as=\"p\"\n html={\n item.price\n ? formatPrice({\n amount: item.price,\n currencyCode,\n locale,\n removeTrailingZeros: true,\n })\n : shopCommon?.free\n }\n />\n {item.mode !== ShippingMethodMode.FREE && (\n <div\n className={cn(\n 'absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white'\n )}\n >\n {metafields?.memberOnly}\n </div>\n )}\n </div>\n )\n}\n\nexport default ShippingMethod"],
5
- "mappings": "AA6CM,OACE,OAAAA,EADF,QAAAC,MAAA,oBA7CN,OAAS,eAAAC,MAAmB,uBAC5B,OAAS,kBAAAC,MAAsB,iCAC/B,OAAS,QAAAC,MAAY,kCACrB,OAAS,MAAAC,MAAU,+BACnB,OAAS,sBAAAC,MAA0B,YAEnC,MAAMC,EAAiB,CAAC,CACtB,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,eAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,EAAY,EACd,IAQM,CACJ,KAAM,CAAE,aAAAC,EAAc,OAAAC,EAAS,IAAK,EAAIb,EAAe,EACjDc,EAAaF,GAAc,QAAQ,YAEzC,OACEd,EAAC,OACC,KAAK,SACL,SAAU,EACV,UAAWiB,GAAK,EACVA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCP,EAAeH,EAAMC,CAAK,CAE9B,EACA,UAAWJ,EACT,qJACA,CACE,gCAAiCG,EAAK,SACtC,eAAgBE,CAClB,EACAI,CACF,EACA,QAAS,IAAMH,EAAeH,EAAMC,CAAK,EAEzC,UAAAR,EAAC,OAAI,UAAU,WACb,UAAAD,EAACI,EAAA,CACC,UAAWC,EAAG,gFAAiF,CAAC,CAAC,EACjG,GAAG,IACH,KAAMG,EAAK,MACb,EACAR,EAACI,EAAA,CACC,UAAWC,EAAG,iFAAkF,CAAC,CAAC,EAClG,GAAG,IACH,KAAMG,EAAK,SACb,GACF,EAEAR,EAACI,EAAA,CACC,UAAWC,EAAG,2CAA4C,CAAC,CAAC,EAC5D,GAAG,IACH,KACEG,EAAK,MACDN,EAAY,CACV,OAAQM,EAAK,MACb,aAAAI,EACA,OAAAI,EACA,oBAAqB,EACvB,CAAC,EACDC,GAAY,KAEpB,EACCT,EAAK,OAASF,EAAmB,MAChCN,EAAC,OACC,UAAWK,EACT,8IACF,EAEC,SAAAQ,GAAY,WACf,GAEJ,CAEJ,EAEA,IAAOM,EAAQZ",
4
+ "sourcesContent": ["import { formatPrice } from '../../utils/index.js'\nimport { useAiuiContext } from '../../../AiuiProvider/index.js'\nimport { Text } from '../../../../components/index.js'\nimport { cn } from '../../../../helpers/index.js'\nimport { ShippingMethodMode } from './type.js'\n\nconst ShippingMethod = ({\n item,\n index,\n active,\n toggleShipping,\n currencyCode,\n metafields,\n className = '',\n}: {\n item: any\n index: number\n active: boolean\n toggleShipping: (item: any, index: number) => void\n currencyCode: string\n metafields: any\n className?: string\n}) => {\n const { trackingData, locale = 'us' } = useAiuiContext()\n const shopCommon = trackingData?.common?.copywriting\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n toggleShipping(item, index)\n }\n }}\n className={cn(\n 'relative flex cursor-pointer gap-[16px] justify-between overflow-hidden rounded-xl laptop:rounded-2xl border-[2px] border-[#E8E8E8] p-4 laptop:py-5 text-[#1F2021]',\n {\n 'cursor-not-allowed opacity-60': item.disabled,\n 'border-brand': active,\n },\n className\n )}\n onClick={() => toggleShipping(item, index)}\n >\n <div className=\"relative\">\n <Text\n className={cn('text-[14px] font-bold leading-[1.4] laptop:text-[16px] lg-desktop:text-[18px]', {})}\n as=\"p\"\n html={item.title}\n />\n <Text\n className={cn('mt-[8px] text-[12px] font-bold leading-[1.4] text-[#6D6D6F] laptop:text-[14px]', {})}\n as=\"p\"\n html={item.subtitle}\n />\n </div>\n\n <Text\n className={cn('relative text-xl font-bold h-fit my-auto', {})}\n as=\"p\"\n html={\n item.price\n ? formatPrice({\n amount: item.price,\n currencyCode,\n locale,\n removeTrailingZeros: true,\n })\n : shopCommon?.free\n }\n />\n {item.mode !== ShippingMethodMode.FREE && (\n <div\n className={cn(\n 'absolute -right-[1px] -top-[1px] rounded-bl-[8px] rounded-tr-[8px] bg-brand px-[8px] py-[3px] text-[12px] font-bold leading-[1.4] text-white'\n )}\n >\n {metafields?.memberOnly}\n </div>\n )}\n </div>\n )\n}\n\nexport default ShippingMethod"],
5
+ "mappings": "AA6CM,OACE,OAAAA,EADF,QAAAC,MAAA,oBA7CN,OAAS,eAAAC,MAAmB,uBAC5B,OAAS,kBAAAC,MAAsB,iCAC/B,OAAS,QAAAC,MAAY,kCACrB,OAAS,MAAAC,MAAU,+BACnB,OAAS,sBAAAC,MAA0B,YAEnC,MAAMC,EAAiB,CAAC,CACtB,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,eAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,EAAY,EACd,IAQM,CACJ,KAAM,CAAE,aAAAC,EAAc,OAAAC,EAAS,IAAK,EAAIb,EAAe,EACjDc,EAAaF,GAAc,QAAQ,YAEzC,OACEd,EAAC,OACC,KAAK,SACL,SAAU,EACV,UAAWiB,GAAK,EACVA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCP,EAAeH,EAAMC,CAAK,CAE9B,EACA,UAAWJ,EACT,sKACA,CACE,gCAAiCG,EAAK,SACtC,eAAgBE,CAClB,EACAI,CACF,EACA,QAAS,IAAMH,EAAeH,EAAMC,CAAK,EAEzC,UAAAR,EAAC,OAAI,UAAU,WACb,UAAAD,EAACI,EAAA,CACC,UAAWC,EAAG,gFAAiF,CAAC,CAAC,EACjG,GAAG,IACH,KAAMG,EAAK,MACb,EACAR,EAACI,EAAA,CACC,UAAWC,EAAG,iFAAkF,CAAC,CAAC,EAClG,GAAG,IACH,KAAMG,EAAK,SACb,GACF,EAEAR,EAACI,EAAA,CACC,UAAWC,EAAG,2CAA4C,CAAC,CAAC,EAC5D,GAAG,IACH,KACEG,EAAK,MACDN,EAAY,CACV,OAAQM,EAAK,MACb,aAAAI,EACA,OAAAI,EACA,oBAAqB,EACvB,CAAC,EACDC,GAAY,KAEpB,EACCT,EAAK,OAASF,EAAmB,MAChCN,EAAC,OACC,UAAWK,EACT,8IACF,EAEC,SAAAQ,GAAY,WACf,GAEJ,CAEJ,EAEA,IAAOM,EAAQZ",
6
6
  "names": ["jsx", "jsxs", "formatPrice", "useAiuiContext", "Text", "cn", "ShippingMethodMode", "ShippingMethod", "item", "index", "active", "toggleShipping", "currencyCode", "metafields", "className", "trackingData", "locale", "shopCommon", "e", "ShippingMethod_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as c}from"react/jsx-runtime";import{Text as m,Picture as w,Button as y,Dialog as N,DialogContent as C,DialogTrigger as T}from"../../../../../../components";import{Content as h,List as E,Root as D,Trigger as H}from"@radix-ui/react-tabs";import{useCallback as x,useEffect as P,useMemo as I,useRef as b,useState as f}from"react";import{cn as L}from"../../../../../../helpers";import{useBizProductContext as _}from"../../../../BizProductProvider.js";import{withLayout as A}from"../../../../../../shared/Styles.js";import{gaTrack as R}from"../../../../../../shared/track.js";const z=()=>{const{product:l,variant:a}=_(),[g,n]=f(!1),o=I(()=>l?.payload?.components?.find(t=>t.componentKey==="ProductHighlight")?.data||{},[l?.payload]),[s,d]=f(o?.ksp?.[0]),i=x(t=>{R({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:`Product Detail Page${a.sku}`,position:o?.title||"",button_name:t||o?.view||""}})},[o?.title,o?.view,a.sku]);return c("div",{className:"ipc-product-detail-highlight",children:[c("div",{className:"flex items-center justify-between",children:[o?.title&&e(m,{size:3,className:"font-bold leading-[1.2]",html:o?.title}),c(N,{open:g,onOpenChange:n,children:[e(T,{asChild:!0,children:e(y,{variant:"link",className:"font-bold !p-0 text-base",onClick:()=>i(),children:o?.view})}),e(B,{ksp:o?.ksp||[],clickActiveKspItem:s,gaTrackEvent:i})]})]}),e("div",{className:"flex flex-wrap gap-4 mt-3 lg-desktop:mt-4",children:o?.ksp?.map(t=>e("div",{className:"product-highlight-item px-4 h-[36px] leading-[36px] lg-desktop:h-[38px] lg-desktop:leading-[38px] cursor-pointer hover:bg-[#EAEAEC] rounded-full bg-[#F5F5F7]",children:e(m,{size:3,onClick:()=>{d(t),n(!0),i(t?.title)},className:"font-bold text-[#1D1D1F] text-[14px] lg-desktop:text-[16px] break-all line-clamp-1 overflow-hidden",html:t?.title})},t?.title))})]})},B=({ksp:l,clickActiveKspItem:a,gaTrackEvent:g})=>{const n=b([]),o=b(null),[s,d]=f(null),i=x(t=>{const p=l.findIndex(u=>u.title===t?.title),r=n.current[p];if(r&&o.current){const u=o.current,v=r,k=v.offsetLeft-u.offsetWidth/2+v.offsetWidth/2;u.scrollTo({left:k,behavior:"smooth"})}},[a,l]);return P(()=>{a&&(d(a),setTimeout(()=>{i(s)},100))},[a,i]),e(C,{className:"tablet:max-w-[896px] rounded-xl tablet:rounded-2xl [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 max-w-[326px] mx-auto w-full border-none overflow-hidden p-0",children:c(D,{defaultValue:s?.title,className:"w-full overflow-hidden",children:[l?.map(t=>e(h,{value:t.title,children:e(w,{source:`${t?.mobileImg}, ${t?.img} 767`,className:"w-full h-[304px] desktop:h-[480px]",alt:t.img.alt,imgClassName:"object-cover h-full"})},t.title)),c("div",{className:"py-4 desktop:py-6 w-full overflow-visible",children:[e("div",{ref:o,style:{scrollbarWidth:"none",msOverflowStyle:"none"},className:"px-4 desktop:px-6 overflow-x-auto",children:e("div",{className:"w-fit rounded-full bg-[#EAEAEC]",children:e(E,{className:"flex p-1 w-max",children:l?.map?.((t,p)=>e(H,{ref:r=>{r&&(n.current[p]=r)},className:L("lg-desktop:px-7 shrink-0 h-[38px] leading-[38px] rounded-full px-5",t.title===s?.title&&"bg-white"),onClick:()=>{i(t),d(t),g(t?.title)},value:t.title,children:e(m,{html:t.title,className:"font-bold text-[14px] leading-[1.2]"})},p))})})}),e("div",{className:"mt-4 px-4 desktop:px-6",children:l.map(t=>e(h,{value:t.title,className:"font-bold text-base desktop:text-[18px]",children:t.description}))})]})]})})};var V=A(z);export{V as default};
1
+ import{jsx as e,jsxs as c}from"react/jsx-runtime";import{Text as f,Picture as w,Button as y,Dialog as N,DialogContent as C,DialogTrigger as T}from"../../../../../../components";import{Content as x,List as E,Root as D,Trigger as H}from"@radix-ui/react-tabs";import{useCallback as h,useEffect as P,useMemo as I,useRef as k,useState as m}from"react";import{cn as L}from"../../../../../../helpers";import{useBizProductContext as _}from"../../../../BizProductProvider.js";import{withLayout as A}from"../../../../../../shared/Styles.js";import{gaTrack as R}from"../../../../../../shared/track.js";const z=()=>{const{product:l,variant:a}=_(),[g,s]=m(!1),o=I(()=>l?.payload?.components?.find(t=>t.componentKey==="ProductHighlight")?.data||{},[l?.payload]),[r,d]=m(o?.ksp?.[0]),i=h(t=>{R({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:`Product Detail Page${a.sku}`,position:o?.title||"",button_name:t||o?.view||""}})},[o?.title,o?.view,a.sku]);return c("div",{className:"ipc-product-detail-highlight",children:[c("div",{className:"flex items-center justify-between",children:[o?.title&&e(f,{size:3,className:"font-bold leading-[1.2]",html:o?.title}),c(N,{open:g,onOpenChange:s,children:[e(T,{asChild:!0,children:e(y,{variant:"link",className:"font-bold !p-0 text-base",onClick:()=>i(),children:o?.view})}),e(B,{ksp:o?.ksp||[],clickActiveKspItem:r,gaTrackEvent:i})]})]}),e("div",{className:"flex flex-wrap gap-4 mt-3 lg-desktop:mt-4",children:o?.ksp?.map(t=>e("div",{className:"product-highlight-item px-4 h-[36px] leading-[36px] lg-desktop:h-[38px] lg-desktop:leading-[38px] cursor-pointer hover:bg-[#EAEAEC] rounded-full bg-[#F5F5F7]",children:e(f,{size:3,onClick:()=>{d(t),s(!0),i(t?.title)},className:"font-bold text-[#1D1D1F] text-[14px] lg-desktop:text-[16px] break-all line-clamp-1 overflow-hidden",html:t?.title})},t?.title))})]})},B=({ksp:l,clickActiveKspItem:a,gaTrackEvent:g})=>{const s=k([]),o=k(null),[r,d]=m(null),i=h(t=>{const n=l.findIndex(u=>u.title===t?.title),p=s.current[n];if(p&&o.current){const u=o.current,v=p,b=v.offsetLeft-u.offsetWidth/2+v.offsetWidth/2;u.scrollTo({left:b,behavior:"smooth"})}},[a,l]);return P(()=>{a&&(d(a),setTimeout(()=>{i(r)},100))},[a,i]),e(C,{className:"tablet:max-w-[896px] rounded-xl tablet:rounded-2xl [&_.dialog-close-icon]:size-4 [&_.dialog-close-icon]:laptop:size-6 max-w-[326px] mx-auto w-full border-none overflow-hidden p-0",children:c(D,{defaultValue:r?.title,className:"w-full overflow-hidden",children:[l?.map(t=>e(x,{value:t.title,children:e(w,{source:`${t?.mobileImg}, ${t?.img} 767`,className:"w-full h-[304px] desktop:h-[480px]",alt:t.img.alt,imgClassName:"object-cover h-full"})},t.title)),c("div",{className:"py-4 desktop:py-6 w-full overflow-visible",children:[e("div",{ref:o,style:{scrollbarWidth:"none",msOverflowStyle:"none"},className:"px-4 desktop:px-6 overflow-x-auto",children:e("div",{className:"w-fit rounded-full bg-[#EAEAEC]",children:e(E,{className:"flex p-1 w-max",children:l?.map((t,n)=>e(H,{ref:p=>{p&&(s.current[n]=p)},className:L("lg-desktop:px-7 shrink-0 h-[38px] leading-[38px] rounded-full px-5",t.title===r?.title&&"bg-white"),onClick:()=>{i(t),d(t),g(t?.title)},value:t.title,children:e(f,{html:t.title,className:"font-bold text-[14px] leading-[1.2]"})},n))})})}),e("div",{className:"mt-4 px-4 desktop:px-6",children:l?.map((t,n)=>e(x,{value:t.title,className:"font-bold text-[14px] desktop:text-[18px]",children:t.description},n+t.title))})]})]})})};var V=A(z);export{V as default};
2
2
  //# sourceMappingURL=index.js.map