@anker-in/headless-ui 1.3.86 → 1.3.87
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.
- package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +8 -2
- package/dist/cjs/biz-components/Listing/BizProductProvider.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
- package/dist/cjs/biz-components/Listing/types/product.d.ts +9 -0
- package/dist/cjs/biz-components/Listing/types/product.js +1 -1
- package/dist/cjs/biz-components/Listing/types.d.ts +19 -0
- package/dist/cjs/biz-components/Listing/types.js +1 -1
- package/dist/cjs/biz-components/Listing/utils/priceCalc.d.ts +28 -0
- package/dist/cjs/biz-components/Listing/utils/priceCalc.js +1 -0
- package/dist/cjs/biz-components/index.d.ts +2 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +8 -2
- package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
- package/dist/esm/biz-components/Listing/types/product.d.ts +9 -0
- package/dist/esm/biz-components/Listing/types.d.ts +19 -0
- package/dist/esm/biz-components/Listing/utils/priceCalc.d.ts +28 -0
- package/dist/esm/biz-components/Listing/utils/priceCalc.js +1 -0
- package/dist/esm/biz-components/index.d.ts +2 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as x}from"react/jsx-runtime";import{useAiuiContext as Z}from"../../../../AiuiProvider/index.js";import{Text as J,Picture as W,Badge as oe}from"../../../../../components/index.js";import{useCallback as N,useMemo as Y,useState as E,forwardRef as Q,useRef as V,useEffect as R,useImperativeHandle as re}from"react";import{Swiper as $,SwiperSlide as B}from"swiper/react";import{Navigation as K,Mousewheel as X,Thumbs as O,Pagination as ee,Autoplay as ne}from"swiper/modules";import{cn as L}from"../../../../../helpers/index.js";import{GalleryTabType as _}from"./types.js";import{Content as se,List as ce,Root as de,Trigger as ue}from"@radix-ui/react-tabs";import{useBizProductContext as q}from"../../../BizProductProvider.js";import{useVariantMedia as pe}from"../../../hooks/use-variant-media.js";import{SpecsModal as me}from"./components/SpecsModal.js";import be from"./components/CompareModal.js";import{formatPrice as ge}from"../../../utils/index.js";import{withLayout as fe}from"../../../../../shared/Styles.js";import{gaTrack as ve}from"../../../../../shared/track.js";import{ExposureDetector as ye}from"../../../../../components/index.js";import{debounce as te}from"es-toolkit";const ae=e=>x("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t("rect",{x:"48",y:"48",width:"48",height:"48",rx:"24",transform:"rotate(-180 48 48)",fill:"white"}),t("path",{d:"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z",fill:"currentColor"})]}),le=e=>x("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t("rect",{width:"48",height:"48",rx:"24",transform:"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)",fill:"white"}),t("path",{d:"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z",fill:"currentColor"})]}),he=()=>{const{copyWriting:e}=Z(),{product:r,variant:c,selectedOptions:P}=q(),m=pe({product:r,variant:c}),[f,S]=E(null),A=V(null),T=c?.metafields?.component?.custom_media_list;let o,v,y,h;T&&T?.available?(o=T?.product||[],v=T?.scenarios||[],y=T?.keyFeatures||[],h=T?.video||[]):(o=m?.productList,v=m?.sceneList,y=m?.keyFeaturesList,h=m?.videoList);const k=Y(()=>[...o,...v,...h],[o,v,h]),I={productList:o,sceneList:v,keyFeaturesList:y,videoList:h},d=Y(()=>{const i=r?.payload?.components?.find(g=>g.componentKey==="ProductGallery")?.data||[],s=c?.payload?.components?.find(g=>g.componentKey==="ProductGallery")?.data||[];return i?.map(g=>{const G=Array.isArray(s)?s?.find(F=>g?.galleries===F?.galleries):{};let D=I[g?.galleries]||[];if(G?.images&&Array.isArray(G.images)&&G.images.length>0){const F=G.images.map(u=>{const C=[];if(u.image_1920&&u.image_1920.trim()&&C.push(`${u.image_1920}`),u.image_1440&&u.image_1440.trim()&&C.push(`${u.image_1440} 1919`),u.image_1024&&u.image_1024.trim()&&C.push(`${u.image_1024} 1439`),u.image_768&&u.image_768.trim()&&C.push(`${u.image_768} 1023`),u.image_390&&u.image_390.trim()&&C.push(`${u.image_390} 767`),C.length>0){const U=C.join(", ");return{image:{url:U,altText:g.comment?.content||""},_fromImages:!0,_responsiveSource:U}}return null}).filter(u=>u!==null);F.length>0&&(D=F)}return{...g,galleries:D}}).filter(g=>g.galleries.length>0)},[c?.payload,I,r?.payload]),[n,a]=E(d?.[0]),[l,p]=E(0),[b,w]=E(null),M=N(()=>{const i=(l+1)%d.length;p(i),a(d[i]),w(0)},[l,d]),z=N(()=>{const i=l===0?d.length-1:l-1;p(i),a(d[i]);const s=d[i]?.galleries||[];w(s.length-1)},[l,d]);R(()=>{l!=null&&requestAnimationFrame(()=>{A.current?.scrollToTab(l)})},[l]),R(()=>{a(d[0]),p(0)},[c?.id]);const H=(i,s)=>{switch(i?.galleryTabType){case _.GALLERY_IMAGE_MAIN:return t(j,{...i,index:s,onNextTab:M,onPrevTab:z,targetSlideIndex:b,onSlideChange:()=>w(null)});case _.GALLERY_IMAGE_FEATURES:return t(j,{...i,index:s,onNextTab:M,onPrevTab:z,targetSlideIndex:b,onSlideChange:()=>w(null)});case _.GALLERY_IMAGE_SCENE:return t(j,{...i,index:s,onNextTab:M,onPrevTab:z,targetSlideIndex:b,onSlideChange:()=>w(null)});case _.GALLERY_VIDEO:return t(Te,{...i,onNextTab:M,onPrevTab:z,targetSlideIndex:b,onSlideChange:()=>w(null)});default:return null}};return t("div",{id:"ipc-product-gallery",children:x(de,{className:"relative",value:n?.tabValue,defaultValue:d?.[0]?.tabValue,children:[t("div",{className:"tablet:h-[620px] laptop-md:rounded-2xl laptop-md:h-[560px] lg-desktop:h-[700px] laptop-md:relative h-[420px] overflow-hidden bg-[#EAEAEC] ",children:d.map((i,s)=>t(se,{className:"h-full",value:i.tabValue,children:H(i,s)},i.tabValue))}),t(ie,{ref:A,galleryTabs:d,activeGalleryTab:n,setActiveGalleryTab:a,setActiveTabIndex:p,setTargetSlideIndex:w})]})})},ie=Q((e,r)=>{const{galleryTabs:c,activeGalleryTab:P,setActiveGalleryTab:m,setActiveTabIndex:f,setTargetSlideIndex:S}=e,{product:A,compareData:T}=q(),o=V(null),v=V(new Map),y=!!A.metafields?.global?.specifications?.length,h=!!T?.specificationKeys?.length,k=N(n=>{if(o.current){const a=o.current,l=n.currentTarget,p=l.offsetLeft-a.offsetWidth/2+l.offsetWidth/2;a.scrollTo({left:p,behavior:"smooth"})}},[]),I=N((n,a,l)=>{m(a),f(l),S(0),k(n)},[m,f,S,k]),d=N(n=>{if(o.current&&c[n]){const a=o.current,l=c[n],p=v.current.get(l.tabValue);if(p){const b=p.offsetLeft-a.offsetWidth/2+p.offsetWidth/2;a.scrollTo({left:b,behavior:"smooth"})}}},[c]);return re(r,()=>({scrollToTab:d})),x("div",{className:"laptop:inset-x-16 tablet:mt-3 laptop-md:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between",children:[t(ce,{ref:o,className:"laptop:p-0 laptop-md:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:t("div",{className:"whitespace-nowrap",children:c?.map((n,a)=>t(ue,{ref:l=>{l?v.current.set(n.tabValue,l):v.current.delete(n.tabValue)},className:L("lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight",n.tabValue===P?.tabValue&&"bg-white"),onClick:l=>I(l,n,a),value:n.tabValue,children:n.tabLabel},n.tabValue+a))})}),(y||h)&&x("div",{className:"desktop:gap-2 desktop:flex hidden",children:[y&&t(me,{}),y&&h&&t("span",{children:"|"}),h&&t(be,{})]})]})});ie.displayName="ProductGalleryTab";const j=Q((e,r)=>{const{locale:c="us",copyWriting:P}=Z(),{variant:m,totalSavings:f}=q(),S=V(null),[A,T]=E(null),[o,v]=E(null),[y,h]=E([]),k=V(null),I=Y(()=>{if(e?.galleryTabType===_.GALLERY_IMAGE_MAIN)return"size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]";e?.galleryTabType===_.GALLERY_IMAGE_FEATURES||(e?.galleryTabType,_.GALLERY_IMAGE_SCENE)},[e?.galleryTabType]),d=N(()=>{o?.isBeginning?e.onPrevTab?.():o?.slidePrev()},[o,e]),n=N(()=>{o?.isEnd?e.onNextTab?.():o?.slideNext()},[o,e]);return R(()=>{o&&e.targetSlideIndex&&(o.slideTo(e.targetSlideIndex,0),e.onSlideChange?.())},[o,e.targetSlideIndex,e]),R(()=>{const a=()=>{if(!e?.comment?.content||!k.current)return;const b=k.current;b.textContent="Test";const M=b.offsetHeight*2+2,H=e.comment.content.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().split(" "),i=[];let s="";for(let g=0;g<H.length;g++){const G=H[g],D=s?`${s} ${G}`:G;b.textContent=D,b.offsetHeight>M?s?(i.push(s),s=G):(i.push(G),s=""):s=D}s&&i.push(s),b.textContent="",h(i)},l=requestAnimationFrame(()=>{requestAnimationFrame(()=>{a()})}),p=()=>{a()};return window.addEventListener("resize",te(p,500)),()=>{cancelAnimationFrame(l),window.removeEventListener("resize",te(p,500))}},[e?.comment?.content]),x("div",{className:"h-full [&_.swiper-button]:hover:opacity-100",children:[t($,{ref:r,className:"h-full",onSwiper:v,onTouchEnd:(a,l)=>{a.isBeginning&&a.swipeDirection==="prev"?d():a.isEnd&&a.swipeDirection==="next"&&n()},pagination:{clickable:!0,el:S.current},thumbs:{swiper:A},modules:[X,O,K,ee],mousewheel:{forceToAxis:!0},breakpoints:{0:{slidesPerView:1,freeMode:!1}},children:e?.galleries?.map((a,l)=>{const p=`${e.tabValue}-${l}`,b=()=>{ve({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:`Product Detail Page${m.sku}`,component_type:"image",component_name:e?.tabLabel||"",position:l+1,creative_id:"",component_title:"",component_description:"",navigation:""}})},w=a?._responsiveSource||a?.image?.url||"";return t(B,{className:"h-full",children:t(ye,{onExposure:b,exposureKey:p,threshold:.5,duration:2e3,className:"h-full",children:t(W,{source:w,alt:a?.image?.altText,className:L("h-full",I),imgClassName:"object-cover h-full"})})},e?.id+"SwiperSlideItem"+l)})}),m.availableForSale&&!!f&&!e.index&&t(oe,{size:"lg",className:"bg-brand-0 laptop:left-16 laptop:top-5 laptop-md:left-6 laptop-md:top-6 absolute left-4 top-3 z-[2] text-white",children:`${ge({amount:f,currencyCode:m?.price?.currencyCode,locale:c})} ${P?.off}`}),t("div",{className:L("tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 laptop-md:left-6 z-10 hidden -translate-y-1/2 cursor-pointer","swiper-button"),onClick:d,children:t(ae,{className:L("tablet:size-10 lg-desktop:size-12")})}),t("div",{className:L("tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 laptop-md:right-6 z-10 hidden -translate-y-1/2 cursor-pointer","swiper-button"),onClick:n,children:t(le,{className:L("tablet:size-10 lg-desktop:size-12")})}),x("div",{className:"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 laptop-md:bottom-[20px] laptop-md:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between",children:[t("div",{className:"tablet:block hidden",children:t($,{className:"flex items-center justify-between",onSwiper:T,spaceBetween:12,slidesPerView:6,freeMode:!0,watchSlidesProgress:!0,modules:[K,O],children:e?.galleries?.map((a,l)=>t(B,{className:"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded",children:t(W,{source:a.image?.url,alt:a.image?.altText,className:"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white",imgClassName:"object-cover h-full"})},e?.id+"SwiperSlideThumbItem"+l))})}),!e?.index&&x("div",{className:"flex items-center gap-2",children:[t(W,{source:e?.comment?.avatar?.url,className:"laptop:size-10 size-8 shrink-0 rounded-full",imgClassName:"object-cover "}),x("div",{className:"relative max-w-[528px]",children:[t("div",{ref:k,className:"lg-desktop:text-base pointer-events-none text-sm font-bold text-[#1D1D1F] opacity-0",style:{visibility:"hidden"}}),t($,{modules:[ne],loop:y.length>1,className:"h-[44px]",direction:"vertical",autoplay:{delay:5e3,disableOnInteraction:!1},children:y.length>0?y.map((a,l)=>t(B,{children:t(J,{html:a,as:"div",className:"lg-desktop:text-base overflow-hidden text-sm font-bold text-[#1D1D1F]"})},l+"text-group")):t(B,{children:t(J,{as:"div",html:e?.comment?.content,className:"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]"})})})]})]})]}),t("div",{ref:S,className:"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#080A0F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100"})]})});j.displayName="ProductGalleryTabImage";const xe=({src:e})=>{const r=V(null);return R(()=>{const c=r.current;c&&(c.muted=!0,c.play().catch(()=>{}))},[]),x("video",{ref:r,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,controls:!0,className:"w-full mt-20 laptop:size-full laptop:mt-0 aspect-video laptop:aspect-auto object-cover",children:[t("track",{kind:"captions"}),t("source",{src:e,type:"video/mp4"}),t("source",{src:e,type:"video/webm"}),t("source",{src:e,type:"video/ogg"})]})},Te=e=>{const[r,c]=E(null),P=N(()=>{r?.isBeginning?e.onPrevTab?.():r?.slidePrev()},[r,e]),m=N(()=>{r?.isEnd?e.onNextTab?.():r?.slideNext()},[r,e]);return R(()=>{r&&e.targetSlideIndex!==null&&e.targetSlideIndex!==void 0&&(r.slideTo(e.targetSlideIndex,0),e.onSlideChange?.())},[r,e.targetSlideIndex,e]),x("div",{className:"h-full [&_.swiper-button]:hover:opacity-100",children:[t($,{className:"h-full",onSwiper:c,onTouchEnd:(f,S)=>{f.isBeginning&&f.swipeDirection==="prev"?P():f.isEnd&&f.swipeDirection==="next"&&m()},modules:[X,O,K,ee],mousewheel:{forceToAxis:!0},breakpoints:{0:{slidesPerView:1,freeMode:!1}},children:e?.galleries?.map((f,S)=>t(B,{className:"h-full bg-info-primary",children:t(xe,{src:f?.sources?.[0]?.url})},e?.id+"SwiperSlideItem"+S))}),t("div",{className:L("swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer"),onClick:P,children:t(ae,{className:"tablet:size-10 lg-desktop:size-12"})}),t("div",{className:L("tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer"),onClick:m,children:t(le,{className:"tablet:size-10 lg-desktop:size-12"})})]})},Fe=e=>t("div",{children:"3D View"});var Be=fe(he);export{Be as default};
|
|
1
|
+
import{jsx as t,jsxs as x}from"react/jsx-runtime";import{useAiuiContext as Z}from"../../../../AiuiProvider/index.js";import{Text as J,Picture as j,Badge as oe}from"../../../../../components/index.js";import{useCallback as S,useMemo as W,useState as E,forwardRef as Q,useRef as z,useEffect as D,useImperativeHandle as re}from"react";import{Swiper as H,SwiperSlide as B}from"swiper/react";import{Navigation as Y,Mousewheel as X,Thumbs as K,Pagination as ee,Autoplay as ne}from"swiper/modules";import{cn as L}from"../../../../../helpers/index.js";import{GalleryTabType as V}from"./types.js";import{Content as se,List as ce,Root as de,Trigger as ue}from"@radix-ui/react-tabs";import{useBizProductContext as O}from"../../../BizProductProvider.js";import{useVariantMedia as pe}from"../../../hooks/use-variant-media.js";import{SpecsModal as me}from"./components/SpecsModal.js";import be from"./components/CompareModal.js";import{formatPrice as ge}from"../../../utils/index.js";import{withLayout as fe}from"../../../../../shared/Styles.js";import{gaTrack as ve}from"../../../../../shared/track.js";import{ExposureDetector as ye}from"../../../../../components/index.js";import{debounce as te}from"es-toolkit";const ae=e=>x("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t("rect",{x:"48",y:"48",width:"48",height:"48",rx:"24",transform:"rotate(-180 48 48)",fill:"white"}),t("path",{d:"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z",fill:"currentColor"})]}),le=e=>x("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t("rect",{width:"48",height:"48",rx:"24",transform:"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)",fill:"white"}),t("path",{d:"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z",fill:"currentColor"})]}),he=()=>{const{copyWriting:e}=Z(),{product:o,variant:c,selectedOptions:k}=O(),g=pe({product:o,variant:c}),[f,G]=E(null),C=z(null),T=c?.metafields?.component?.custom_media_list;let v,s,w,y;T&&T?.available?(v=T?.product||[],s=T?.scenarios||[],w=T?.keyFeatures||[],y=T?.video||[]):(v=g?.productList,s=g?.sceneList,w=g?.keyFeaturesList,y=g?.videoList);const F=W(()=>[...v,...s,...y],[v,s,y]),N={productList:v,sceneList:s,keyFeaturesList:w,videoList:y},p=W(()=>{const i=o?.payload?.components?.find(n=>n.componentKey==="ProductGallery")?.data||[],b=c?.payload?.components?.find(n=>n.componentKey==="ProductGallery")?.data||[];return i?.map(n=>{const P=Array.isArray(b)?b?.find(I=>n?.galleries===I?.galleries):{};let A=N[n?.galleries]||[];if(P?.images&&Array.isArray(P.images)&&P.images.length>0){const I=P.images.map(u=>{const M=[];if(u.image_1920&&u.image_1920.trim()&&M.push(`${u.image_1920}`),u.image_1440&&u.image_1440.trim()&&M.push(`${u.image_1440} 1919`),u.image_1024&&u.image_1024.trim()&&M.push(`${u.image_1024} 1439`),u.image_768&&u.image_768.trim()&&M.push(`${u.image_768} 1023`),u.image_390&&u.image_390.trim()&&M.push(`${u.image_390} 767`),M.length>0){const U=M.join(", ");return{image:{url:U,altText:n.comment?.content||""},_fromImages:!0,_responsiveSource:U}}return null}).filter(u=>u!==null);I.length>0&&(A=I)}return{...n,galleries:A}}).filter(n=>n.galleries.length>0)},[c?.payload,N,o?.payload]),[r,d]=E(p?.[0]),[a,l]=E(0),[h,m]=E(null),_=S(()=>{const i=(a+1)%p.length;l(i),d(p[i]),m(0)},[a,p]),R=S(()=>{const i=a===0?p.length-1:a-1;l(i),d(p[i]);const b=p[i]?.galleries||[];m(b.length-1)},[a,p]);D(()=>{a!=null&&requestAnimationFrame(()=>{C.current?.scrollToTab(a)})},[a]),D(()=>{d(p[0]),l(0)},[c?.id]);const q=(i,b)=>{switch(i?.galleryTabType){case V.GALLERY_IMAGE_MAIN:return t($,{...i,index:b,onNextTab:_,onPrevTab:R,targetSlideIndex:h,onSlideChange:()=>m(null)});case V.GALLERY_IMAGE_FEATURES:return t($,{...i,index:b,onNextTab:_,onPrevTab:R,targetSlideIndex:h,onSlideChange:()=>m(null)});case V.GALLERY_IMAGE_SCENE:return t($,{...i,index:b,onNextTab:_,onPrevTab:R,targetSlideIndex:h,onSlideChange:()=>m(null)});case V.GALLERY_VIDEO:return t(Te,{...i,onNextTab:_,onPrevTab:R,targetSlideIndex:h,onSlideChange:()=>m(null)});default:return null}};return t("div",{id:"ipc-product-gallery",children:x(de,{className:"relative",value:r?.tabValue,defaultValue:p?.[0]?.tabValue,children:[t("div",{className:"tablet:h-[620px] laptop-md:rounded-2xl laptop-md:h-[560px] lg-desktop:h-[700px] laptop-md:relative h-[420px] overflow-hidden bg-[#EAEAEC] ",children:p.map((i,b)=>t(se,{className:"h-full",value:i.tabValue,children:q(i,b)},i.tabValue))}),t(ie,{ref:C,galleryTabs:p,activeGalleryTab:r,setActiveGalleryTab:d,setActiveTabIndex:l,setTargetSlideIndex:m})]})})},ie=Q((e,o)=>{const{galleryTabs:c,activeGalleryTab:k,setActiveGalleryTab:g,setActiveTabIndex:f,setTargetSlideIndex:G}=e,{product:C,compareData:T}=O(),v=z(null),s=z(new Map),w=!!C.metafields?.global?.specifications?.length,y=!!T?.specificationKeys?.length,F=S(r=>{if(v.current){const d=v.current,a=r.currentTarget,l=a.offsetLeft-d.offsetWidth/2+a.offsetWidth/2;d.scrollTo({left:l,behavior:"smooth"})}},[]),N=S((r,d,a)=>{g(d),f(a),G(0),F(r)},[g,f,G,F]),p=S(r=>{if(v.current&&c[r]){const d=v.current,a=c[r],l=s.current.get(a.tabValue);if(l){const h=l.offsetLeft-d.offsetWidth/2+l.offsetWidth/2;d.scrollTo({left:h,behavior:"smooth"})}}},[c]);return re(o,()=>({scrollToTab:p})),x("div",{className:"laptop:inset-x-16 tablet:mt-3 laptop-md:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between",children:[t(ce,{ref:v,className:"laptop:p-0 laptop-md:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:t("div",{className:"whitespace-nowrap",children:c?.map((r,d)=>t(ue,{ref:a=>{a?s.current.set(r.tabValue,a):s.current.delete(r.tabValue)},className:L("lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight",r.tabValue===k?.tabValue&&"bg-white"),onClick:a=>N(a,r,d),value:r.tabValue,children:r.tabLabel},r.tabValue+d))})}),(w||y)&&x("div",{className:"desktop:gap-2 desktop:flex hidden",children:[w&&t(me,{}),w&&y&&t("span",{children:"|"}),y&&t(be,{})]})]})});ie.displayName="ProductGalleryTab";const $=Q((e,o)=>{const{locale:c="us",copyWriting:k}=Z(),{variant:g,totalSavings:f,formattedPrices:G}=O(),C=z(null),[T,v]=E(null),[s,w]=E(null),[y,F]=E([]),N=z(null),p=W(()=>{if(e?.galleryTabType===V.GALLERY_IMAGE_MAIN)return"size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]";e?.galleryTabType===V.GALLERY_IMAGE_FEATURES||(e?.galleryTabType,V.GALLERY_IMAGE_SCENE)},[e?.galleryTabType]),r=S(()=>{s?.isBeginning?e.onPrevTab?.():s?.slidePrev()},[s,e]),d=S(()=>{s?.isEnd?e.onNextTab?.():s?.slideNext()},[s,e]);return D(()=>{s&&e.targetSlideIndex&&(s.slideTo(e.targetSlideIndex,0),e.onSlideChange?.())},[s,e.targetSlideIndex,e]),D(()=>{const a=()=>{if(!e?.comment?.content||!N.current)return;const m=N.current;m.textContent="Test";const R=m.offsetHeight*2+2,i=e.comment.content.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().split(" "),b=[];let n="";for(let P=0;P<i.length;P++){const A=i[P],I=n?`${n} ${A}`:A;m.textContent=I,m.offsetHeight>R?n?(b.push(n),n=A):(b.push(A),n=""):n=I}n&&b.push(n),m.textContent="",F(b)},l=requestAnimationFrame(()=>{requestAnimationFrame(()=>{a()})}),h=()=>{a()};return window.addEventListener("resize",te(h,500)),()=>{cancelAnimationFrame(l),window.removeEventListener("resize",te(h,500))}},[e?.comment?.content]),x("div",{className:"h-full [&_.swiper-button]:hover:opacity-100",children:[t(H,{ref:o,className:"h-full",onSwiper:w,onTouchEnd:(a,l)=>{a.isBeginning&&a.swipeDirection==="prev"?r():a.isEnd&&a.swipeDirection==="next"&&d()},pagination:{clickable:!0,el:C.current},thumbs:{swiper:T},modules:[X,K,Y,ee],mousewheel:{forceToAxis:!0},breakpoints:{0:{slidesPerView:1,freeMode:!1}},children:e?.galleries?.map((a,l)=>{const h=`${e.tabValue}-${l}`,m=()=>{ve({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:`Product Detail Page${g.sku}`,component_type:"image",component_name:e?.tabLabel||"",position:l+1,creative_id:"",component_title:"",component_description:"",navigation:""}})},_=a?._responsiveSource||a?.image?.url||"";return t(B,{className:"h-full",children:t(ye,{onExposure:m,exposureKey:h,threshold:.5,duration:2e3,className:"h-full",children:t(j,{source:_,alt:a?.image?.altText,className:L("h-full",p),imgClassName:"object-cover h-full"})})},e?.id+"SwiperSlideItem"+l)})}),g.availableForSale&&!!f&&!e.index&&t(oe,{size:"lg",className:"bg-brand-0 laptop:left-16 laptop:top-5 laptop-md:left-6 laptop-md:top-6 absolute left-4 top-3 z-[2] text-white",children:`${G?.totalSavings??ge({amount:f,currencyCode:g?.price?.currencyCode,locale:c})} ${k?.off}`}),t("div",{className:L("tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 laptop-md:left-6 z-10 hidden -translate-y-1/2 cursor-pointer","swiper-button"),onClick:r,children:t(ae,{className:L("tablet:size-10 lg-desktop:size-12")})}),t("div",{className:L("tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 laptop-md:right-6 z-10 hidden -translate-y-1/2 cursor-pointer","swiper-button"),onClick:d,children:t(le,{className:L("tablet:size-10 lg-desktop:size-12")})}),x("div",{className:"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 laptop-md:bottom-[20px] laptop-md:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between",children:[t("div",{className:"tablet:block hidden",children:t(H,{className:"flex items-center justify-between",onSwiper:v,spaceBetween:12,slidesPerView:6,freeMode:!0,watchSlidesProgress:!0,modules:[Y,K],children:e?.galleries?.map((a,l)=>t(B,{className:"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded",children:t(j,{source:a.image?.url,alt:a.image?.altText,className:"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white",imgClassName:"object-cover h-full"})},e?.id+"SwiperSlideThumbItem"+l))})}),!e?.index&&x("div",{className:"flex items-center gap-2",children:[t(j,{source:e?.comment?.avatar?.url,className:"laptop:size-10 size-8 shrink-0 rounded-full",imgClassName:"object-cover "}),x("div",{className:"relative max-w-[528px]",children:[t("div",{ref:N,className:"lg-desktop:text-base pointer-events-none text-sm font-bold text-[#1D1D1F] opacity-0",style:{visibility:"hidden"}}),t(H,{modules:[ne],loop:y.length>1,className:"h-[44px]",direction:"vertical",autoplay:{delay:5e3,disableOnInteraction:!1},children:y.length>0?y.map((a,l)=>t(B,{children:t(J,{html:a,as:"div",className:"lg-desktop:text-base overflow-hidden text-sm font-bold text-[#1D1D1F]"})},l+"text-group")):t(B,{children:t(J,{as:"div",html:e?.comment?.content,className:"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]"})})})]})]})]}),t("div",{ref:C,className:"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#080A0F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100"})]})});$.displayName="ProductGalleryTabImage";const xe=({src:e})=>{const o=z(null);return D(()=>{const c=o.current;c&&(c.muted=!0,c.play().catch(()=>{}))},[]),x("video",{ref:o,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,controls:!0,className:"w-full mt-20 laptop:size-full laptop:mt-0 aspect-video laptop:aspect-auto object-cover",children:[t("track",{kind:"captions"}),t("source",{src:e,type:"video/mp4"}),t("source",{src:e,type:"video/webm"}),t("source",{src:e,type:"video/ogg"})]})},Te=e=>{const[o,c]=E(null),k=S(()=>{o?.isBeginning?e.onPrevTab?.():o?.slidePrev()},[o,e]),g=S(()=>{o?.isEnd?e.onNextTab?.():o?.slideNext()},[o,e]);return D(()=>{o&&e.targetSlideIndex!==null&&e.targetSlideIndex!==void 0&&(o.slideTo(e.targetSlideIndex,0),e.onSlideChange?.())},[o,e.targetSlideIndex,e]),x("div",{className:"h-full [&_.swiper-button]:hover:opacity-100",children:[t(H,{className:"h-full",onSwiper:c,onTouchEnd:(f,G)=>{f.isBeginning&&f.swipeDirection==="prev"?k():f.isEnd&&f.swipeDirection==="next"&&g()},modules:[X,K,Y,ee],mousewheel:{forceToAxis:!0},breakpoints:{0:{slidesPerView:1,freeMode:!1}},children:e?.galleries?.map((f,G)=>t(B,{className:"h-full bg-info-primary",children:t(xe,{src:f?.sources?.[0]?.url})},e?.id+"SwiperSlideItem"+G))}),t("div",{className:L("swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer"),onClick:k,children:t(ae,{className:"tablet:size-10 lg-desktop:size-12"})}),t("div",{className:L("tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer"),onClick:g,children:t(le,{className:"tablet:size-10 lg-desktop:size-12"})})]})},Fe=e=>t("div",{children:"3D View"});var Be=fe(he);export{Be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{Text as s,Button as X,Grid as Y,GridItem as M,Picture as S,Heading as Z}from"../../../../../components/index.js";import{useBizProductContext as A}from"../../../BizProductProvider.js";import{useComponentData as tt}from"../../../hooks/useComponentData.js";import{useEffect as et,useMemo as y,useState as at}from"react";import{formatPrice as V}from"../../../utils/index.js";import{useAiuiContext as I}from"../../../../AiuiProvider/index.js";import{replaceTemplate as ot}from"../../../utils/textFormat.js";import{calcSummaryFinalPrice as lt}from"../../../utils/priceCalc.js";import{withLayout as it}from"../../../../../shared/Styles.js";import{ExposureDetector as rt}from"../../../../../components/index.js";import{gaTrack as nt}from"../../../../../shared/track.js";import st from"../../CartActionButtons/index.js";const ct=()=>{const{locale:N="us",copyWriting:o,trackingData:u}=I(),{product:p,variant:l,finalPrice:m,comparePrice:f,coupon:h,selectedOptions:i,selectedVariants:x,totalSavings:k,onAddToCart:P,onBuyNow:w,savingDetail:c,checkedBundle:g,joinedRecommendBuyProducts:e,setJoinedRecommendBuyProducts:B,setSavingDetail:mt,addToCartLoading:q,buyNowLoading:W,notifyMeMode:J,onNotifyMeClick:Q,profile:$,addOrder:O,setAddOrder:_,formattedPrices:D}=A(),C=r=>V({amount:r,currencyCode:l.price.currencyCode,locale:N}),G=u?.showComparePrice??!0,v=tt("ProductSummary")??{},[j]=x,z=y(()=>lt({price:j?.price?.amount||0,memberSaving:c?.member,couponSaving:c?.coupon,isLogin:!!$?.email}),[j,g,$,c?.member,c?.coupon]),{giftVariant:L}=pt()||{},[d,E]=at();et(()=>{E({gift:e.gift?.value?void 0:L})},[L,e]);const H=y(()=>{const r=[];return O&&O.forEach((n,b)=>{e[n]?.value&&r.push({type:n,key:`${n}-${b}`})}),r},[O,e]),K=y(()=>{const r=i?.quantity||"",n=i?.color||i?.colour||i?.couleur||"";return`${r&&n?`${r} | ${n}`:r||n}`},[i?.quantity,i?.color,i?.colour,i?.couleur]),U=y(()=>{const{image_1920:r,image_1440:n,image_1024:b,image_768:F,image_390:T}=v?.thumbnail||{};return(v?.thumbnail?`${r} 1920, ${n} 1440, ${b} 1024, ${F} 768, ${T} 390`:l.image?.url)||l.image?.url},[v?.thumbnail,l.image?.url]);return l.availableForSale?t("div",{className:"ipc-product-summary laptop:px-16 laptop-md:px-0 laptop-md:mt-[96px] lg-desktop:mt-[128px] mt-16",children:t("div",{className:"laptop:rounded-2xl bg-[#F5F5F7]",children:a(Y,{className:"tablet:p-8 tablet:!pb-0 px-4 pt-6",children:[a(M,{className:"laptop:col-start-1 laptop:col-span-5 col-span-12 flex flex-col justify-between gap-4",children:[t(Z,{className:"lg-desktop:text-[48px] laptop:text-[32px] laptop-md:text-[40px] mb-4 text-[24px] font-bold leading-none [&>span]:text-[#D1D1D1]",html:v?.readyWant?.replace?.("{title}",p?.title)}),t("div",{className:"",children:t(S,{source:U,className:"lg-desktop:aspect-[644/320] laptop-md:aspect-[503/270] laptop:aspect-[332/190] tablet:aspect-[704/380] aspect-[358/190]",imgClassName:"object-cover h-full"})})]}),a(M,{className:"tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 col-span-12 mt-8 flex flex-col justify-between gap-6 pb-6",children:[a("div",{children:[a("div",{className:"flex flex-col gap-4",children:[t(rt,{exposureKey:"listing_selector",onExposure:()=>{nt({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:`Product Detail Page${l.sku}`,component_type:"image",component_name:"listing_selector",position:1}})},children:a("div",{className:"flex items-center justify-between gap-6",children:[a("div",{className:"flex items-center gap-4",children:[t(S,{source:l.image?.url||p?.images?.[0]?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),a("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[t(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:p.title}),t(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]",html:K})]})]}),a("div",{className:"flex items-center gap-1",children:[t(s,{className:"laptop-md:text-2xl text-base font-bold",html:D?.summaryFinalPrice??C(z)}),G&&z<l?.price?.amount&&t(s,{className:"laptop-md:text-2xl laptop:text-xl text-base font-bold text-[#6D6D6F] line-through",html:l?.price?.formattedAmount??C(l?.price?.amount)})]})]})}),H.map(({type:r,key:n})=>r==="gift"&&e?.gift?.value?t(R,{giftOperation:b=>{B?.({...e,gift:{value:void 0,canOperate:!0}}),E?.({...d,gift:b}),_?.(F=>F.filter(T=>T!=="gift"))},status:!!e?.gift,gift:e?.gift?.value,canOperate:e?.gift?.canOperate},n):null)]}),d?.gift&&a("div",{className:"laptop-md:mt-8 mt-6",children:[t(s,{className:"laptop-md:text-[18px] text-sm font-bold",html:v?.recommendBuy}),t("div",{className:"laptop-md:gap-4 mt-4 flex flex-col gap-6",children:d?.gift&&t(R,{giftOperation:r=>{B?.({...e,gift:{value:r,canOperate:!0}}),E?.({...d,gift:void 0}),_?.(n=>[...n,"gift"])},canOperate:e?.gift?.canOperate,status:!d?.gift,gift:d?.gift})})]})]}),a("div",{className:"text-right",children:[t(s,{className:"laptop:text-xl laptop-md:text-2xl text-right font-bold",html:`${ot(o?.totalPrice||"",{amount:D?.finalPrice??C(parseFloat(m.toFixed(2)))})}`}),G&&k>0&&t(s,{className:"laptop:text-xl laptop-md:text-2xl ml-1 text-base font-bold text-[#6D6D6F] line-through",html:D?.comparePrice??C(f)}),t("div",{className:"mt-4 flex justify-end gap-3",children:t(st,{mode:J,availableForSale:l.availableForSale,addToCartText:o?.addToCart,buyNowText:o?.shopNow,addToCartLoading:q,buyNowLoading:W,addToCartClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2",buyNowClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2",onAddToCart:P,onBuyNow:w,onNotifyMeClick:Q,notifyMeText:o?.notifyMe,notifyMeClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2"})})]})]})]})})}):null},pt=()=>{const{bundle:N,variant:o,checkedBundle:u,freeGift:p,checkedGift:l}=A();let m;const{giftList:f=[]}=p||{},[h]=f?.filter(i=>i.availableForSale)??[];return m=l||h,{giftVariant:m}},R=({giftOperation:N,gift:o,status:u,canOperate:p})=>{const{locale:l="us",copyWriting:m}=I(),{freeGift:f,setCheckedGift:h}=A(),{freeLabel:i}=f||{},{options:x}=o||{},k=y(()=>{const P=x?.find(e=>e.name==="color"||e.name==="colour"||e.name==="couleur")||{},w=x?.find(e=>e.name==="quantity")||{},c=P?P.values?.[0]?.label:"",g=w?w.values?.[0]?.label:"";return`${c&&g?g+" | "+c:g||c} | ${i}`},[i,x]);return a("div",{className:"flex items-center justify-between gap-6",children:[a("div",{className:"flex items-center gap-4",children:[t(S,{source:o?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),a("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[t(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:o?.product?.title}),t(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]",html:k})]})]}),a("div",{className:"flex flex-col items-end justify-center gap-2",children:[!!o&&a("div",{className:"flex items-center gap-1",children:[t(s,{className:"laptop-md:text-2xl text-base font-bold",html:i}),t(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:o.price.formattedAmount??V({amount:o.price.amount,locale:l,currencyCode:o.price.currencyCode})})]}),p&&t(X,{size:"icon",variant:"link",onClick:()=>{h?.(u?void 0:o),N(o)},className:"size-auto shrink-0 underline",children:u?m?.remove:m?.add})]})]})};var Ot=it(ct);export{Ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as u}from"react/jsx-runtime";import{Text as r,Container as E}from"../../../../../components/index.js";import{useAiuiContext as O}from"../../../../AiuiProvider/index.js";import{useBizProductContext as U}from"../../../BizProductProvider.js";import{useMemo as C}from"react";import{formatPrice as _}from"../../../utils/index.js";import{replaceTemplate as y}from"../../../utils/textFormat.js";import{calcUnlockedSaving as j}from"../../../utils/priceCalc.js";import{useBenefits as q}from"../../../hooks/useBenefits.js";import z from"../../CartActionButtons/index.js";const W=({totalSavingsSlot:N,renderComparePrice:x}={})=>{const{copyWriting:e,locale:d="us",trackingData:h,currencyCode:S}=O(),{variant:o,finalPrice:w,totalSavings:n,isLogin:s,comparePrice:b,onAddToCart:P,onBuyNow:k,savingDetail:p,addToCartLoading:T,buyNowLoading:M,notifyMeMode:A,onNotifyMeClick:B,discount:$,memberFunctionResult:f,formattedPrices:a}=U(),F=q({variant:o}),{commonCoupon:i,memberDiscount:l}=F,D=h?.showComparePrice??!0,c=m=>_({amount:m,currencyCode:o.price.currencyCode,locale:S==="CAD"?"us":d||"us"}),R=C(()=>y(e?.totalSavings||"",{amount:a?.totalSavings??c(n)}),[e?.totalSavings,n,o.price.currencyCode,d,a?.totalSavings]),g=C(()=>{if(!e?.unlockedSaving)return;const m=i?.enable?Number(i?.config?.fixed_value||0):0,L=l?.enable?l.config?.amount??0:0,v=j({memberSaving:L,couponSaving:m,exclusive:!!f?.withoutCouponMaxMemberTotalSave});if(!(v<=0))return y(e.unlockedSaving,{amount:a?.unlockedSaving??c(v)})},[e?.unlockedSaving,i?.enable,i?.config?.fixed_value,l?.enable,l?.config?.amount,f,o.price.currencyCode,d,a?.unlockedSaving]);return u(E,{childClassName:"tablet:flex tablet:justify-end tablet:gap-8 laptop-md:px-0 desktop:px-0 lg-desktop:px-grid tablet:items-center tablet:gap-4",className:"laptop-md:border-none laptop-md:py-0 border-t border-[#E4E5E6] bg-white py-3",children:[o.availableForSale?u("div",{className:"ipc-purchase-bar-price laptop-md:items-end flex flex-col justify-between",children:[u("div",{className:"ipc-purchase-bar-price-row flex items-center gap-1",children:[t(r,{className:"ipc-purchase-bar-final-price tablet:text-2xl laptop-md:text-xl lg-desktop:text-2xl text-xl font-bold !leading-[1.2]",html:a?.finalPrice??c(parseFloat(w.toFixed(2)))}),x?x({comparePrice:b}):D&&(n>0||p?.member>0&&s)&&t(r,{className:"ipc-purchase-bar-compare-price tablet:text-2xl laptop-md:text-xl lg-desktop:text-2xl text-xl font-bold !leading-[1.2] text-[#4A4C56] line-through",html:a?.comparePrice??c(b)}),p?.member>0&&s&&t(r,{className:"ipc-purchase-bar-member-badge bg-brand-0 rounded px-1 py-[2px] text-sm font-bold text-white",html:e?.memberPrice||"Member Price"})]}),N||(n>0||p?.member>0&&s?t(r,{className:"ipc-purchase-bar-total-savings text-brand-0 tablet:text-end laptop-md:text-xl lg-desktop:text-2xl whitespace-nowrap text-[18px] font-bold !leading-[1.2]",html:`${R}`}):g?t(r,{className:"ipc-purchase-bar-unlocked-saving text-info-quaternary tablet:text-end laptop-md:text-xl lg-desktop:text-2xl whitespace-nowrap text-[18px] font-bold !leading-[1.2]",html:g}):null)]}):t(r,{className:"text-[20px] font-bold text-[#999999]",html:e?.soldOut??"Sold Out"}),t("div",{className:"tablet:mt-0 mt-2 flex items-center gap-2",children:t(z,{mode:A,availableForSale:o.availableForSale,addToCartText:e?.addToCart??"Add to Cart",buyNowText:e?.buyNow??"Buy Now",addToCartLoading:T,buyNowLoading:M,onAddToCart:P,onBuyNow:k,onNotifyMeClick:B,notifyMeText:e?.notifyMe,notifyMeClassName:"w-full"})})]})};var Z=W;export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useBizProductContext as
|
|
1
|
+
import{useBizProductContext as C}from"../BizProductProvider.js";import{checkItemAvailableForProduct as h}from"../utils/helper.js";import{useDiscountEnable as G}from"./useDiscountEnable.js";import{useAiuiContext as D}from"../../AiuiProvider/index.js";const x=({variant:e})=>{const{coupon:i,product:a,bundle:r,freeGift:c,functionFreeGift:f,memberFunctionResult:o,creditsRedemption:s,profile:d,formattedPrices:p}=C(),{amount:u}=s??{},{trackingData:t}=D(),g=Math.max(o?.withCouponMemberTotalSave??0,o?.withoutCouponMaxMemberTotalSave??0),m=G({profile:d,variant:e,memberFunctionResult:o,coupon:i}),b=!!(t?.paidShipping&&e.requiresShipping&&!e?.metafields?.global?.presell&&!e?.metafields?.global?.HideShipping),l=t?.freeGift,B=l?.excludeProducts?.map(n=>typeof n=="object"&&"sku"in n?n.sku:n)??[],P=t?.levelDiscount&&h({product:a,variant:e,item:t?.levelDiscount});return{commonCoupon:{enable:m.showCommonCoupon&&!!i,config:i??{}},freeGift:{enable:!!c&&!!c?.giftList?.length,config:c},functionFreeGift:{enable:!!f&&!!f?.giftItems?.length,config:f},bundle:{enable:!!r&&!!r?.bundleOptions?.length,config:r},memberDiscount:{enable:m.showMemberDiscount,config:{amount:g,formattedAmount:p?.memberDiscount,description:o?.labels?.[0]}},creditsRedemption:{enable:!!u&&u>0,config:{amount:u,formattedAmount:s?.formattedAmount,label:t?.creditsRedemptionLabel}},paidShipping:{enable:b,config:{}},fullGift:{enable:!!(l&&!B.includes(e.sku)),config:l??{}},levelDiscount:{enable:!!P,config:t?.levelDiscount??{}}}};export{x as useBenefits};
|
|
@@ -3,6 +3,11 @@ import { DiscountType } from '../const.js';
|
|
|
3
3
|
export type ProductPrice = {
|
|
4
4
|
amount: number;
|
|
5
5
|
currencyCode: CurrencyCode;
|
|
6
|
+
/**
|
|
7
|
+
* 宿主已格式化好的金额(含货币符号)。传入后组件直接展示;
|
|
8
|
+
* 未传入时回退到组件库内置的 formatPrice(旧逻辑)。
|
|
9
|
+
*/
|
|
10
|
+
formattedAmount?: string;
|
|
6
11
|
};
|
|
7
12
|
export type ProductOption = {
|
|
8
13
|
__typename?: 'MultipleChoiceOption';
|
|
@@ -98,6 +103,10 @@ export type VariantCoupon = {
|
|
|
98
103
|
fixed_value: string;
|
|
99
104
|
value_style: string;
|
|
100
105
|
variant_price4wscode: number;
|
|
106
|
+
/** 宿主已格式化的固定减免金额(取绝对值,含货币符号)。未传入时回退到内置 formatPrice */
|
|
107
|
+
formattedFixedValue?: string;
|
|
108
|
+
/** 宿主已格式化的 variant_price4wscode(含货币符号)。未传入时回退到内置 formatPrice */
|
|
109
|
+
formattedVariantPrice4wscode?: string;
|
|
101
110
|
discount_type: string;
|
|
102
111
|
amazon_deal: boolean;
|
|
103
112
|
cdi_id: number;
|
|
@@ -19,6 +19,25 @@ export type CompareData = {
|
|
|
19
19
|
};
|
|
20
20
|
show: boolean;
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* 宿主已格式化好的价格字符串(含货币符号)。
|
|
24
|
+
* 每个字段都是可选的:传入则组件直接展示;未传入则该处回退到组件库内置的 formatPrice(旧逻辑)。
|
|
25
|
+
* 字段对应的数字请通过 `utils/priceCalc` 或 context 中的同名数字字段获取。
|
|
26
|
+
*/
|
|
27
|
+
export type ListingFormattedPrices = {
|
|
28
|
+
/** 对应 context.finalPrice(取 2 位小数) */
|
|
29
|
+
finalPrice?: string;
|
|
30
|
+
/** 对应 context.comparePrice */
|
|
31
|
+
comparePrice?: string;
|
|
32
|
+
/** 对应 context.totalSavings */
|
|
33
|
+
totalSavings?: string;
|
|
34
|
+
/** 对应 calcSummaryFinalPrice() 的结果(ProductSummary 当前商品最终价) */
|
|
35
|
+
summaryFinalPrice?: string;
|
|
36
|
+
/** 对应 calcUnlockedSaving() 的结果(ProductActions 已解锁节省),结果 <= 0 时不会展示 */
|
|
37
|
+
unlockedSaving?: string;
|
|
38
|
+
/** 对应会员折扣金额 max(withCouponMemberTotalSave, withoutCouponMaxMemberTotalSave) */
|
|
39
|
+
memberDiscount?: string;
|
|
40
|
+
};
|
|
22
41
|
export type DiscountData = {
|
|
23
42
|
memberFunctionSaving: number;
|
|
24
43
|
codeSavings: number;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 价格相关的纯数字计算。只返回 number,不做任何格式化。
|
|
3
|
+
* 宿主可调用这些函数拿到与组件内部一致的金额,再自行格式化后通过 `formattedPrices` 传入。
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* ProductSummary 中「当前商品最终价」。
|
|
7
|
+
* = 商品价 - (已登录 ? 会员节省 : 0) - 优惠券节省,保留 2 位小数。
|
|
8
|
+
*/
|
|
9
|
+
export declare function calcSummaryFinalPrice({ price, memberSaving, couponSaving, isLogin, }: {
|
|
10
|
+
/** 当前商品原价,即 selectedVariants[0].price.amount */
|
|
11
|
+
price: number;
|
|
12
|
+
/** savingDetail.member */
|
|
13
|
+
memberSaving?: number;
|
|
14
|
+
/** savingDetail.coupon */
|
|
15
|
+
couponSaving?: number;
|
|
16
|
+
/** 是否已登录,对应组件内 `Boolean(profile?.email)` */
|
|
17
|
+
isLogin: boolean;
|
|
18
|
+
}): number;
|
|
19
|
+
/**
|
|
20
|
+
* ProductActions 中「已解锁的节省金额」。
|
|
21
|
+
* 不可叠加时取会员与 code 折扣的较大值,可叠加时取二者之和,保留 2 位小数。
|
|
22
|
+
*/
|
|
23
|
+
export declare function calcUnlockedSaving({ memberSaving, couponSaving, exclusive, }: {
|
|
24
|
+
memberSaving: number;
|
|
25
|
+
couponSaving: number;
|
|
26
|
+
/** 对应 `Boolean(memberFunctionResult?.withoutCouponMaxMemberTotalSave)` */
|
|
27
|
+
exclusive: boolean;
|
|
28
|
+
}): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i from"decimal.js";function a({price:e,memberSaving:n=0,couponSaving:r=0,isLogin:o}){let u=new i(e||0);o&&(u=u.minus(n||0));const m=u.minus(r).toNumber();return parseFloat(m.toFixed(2))}function c({memberSaving:e,couponSaving:n,exclusive:r}){return Math.round((r?Math.max(e,n):e+n)*100)/100}export{a as calcSummaryFinalPrice,c as calcUnlockedSaving};
|
|
@@ -50,6 +50,8 @@ export { default as GraphicOverlay } from './GraphicOverlay/index.js';
|
|
|
50
50
|
export { default as Specs } from './Specs/index.js';
|
|
51
51
|
export { default as TabGroup } from './TabsGroup/index.js';
|
|
52
52
|
export { default as BizProductProvider, useBizProductContext } from './Listing/BizProductProvider.js';
|
|
53
|
+
export type { ListingFormattedPrices } from './Listing/types.js';
|
|
54
|
+
export { calcSummaryFinalPrice, calcUnlockedSaving } from './Listing/utils/priceCalc.js';
|
|
53
55
|
export { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js';
|
|
54
56
|
export { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js';
|
|
55
57
|
export type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AccessoriesProductGrid as o,SectionHeader as a,PromoBanner as i,MainProductArea as s,AddToCartSuccessPopover as p}from"./AccessoriesShelf/index.js";import{default as f}from"./ActivitySchedule/index.js";import{default as n}from"./GiftShelf/index.js";import{default as u}from"./GiftTierShelf/index.js";import{default as x}from"./ActivityMechanism/index.js";import{default as S}from"./BrandEquity/index.js";import{default as P}from"./MemberEquity/index.js";import{default as g}from"./Slogan/index.js";import{default as B}from"./Title/index.js";import{default as v}from"./Spacer/index.js";import{default as b}from"./ShelfDisplay/index.js";import{default as D}from"./ShelfDisplayHorizontal/index.js";import{default as j}from"./Evaluate/index.js";import{default as L}from"./Category/index.js";import{default as V}from"./HeroBanner/index.js";import{default as k}from"./AccordionCards/index.js";import{default as W}from"./Graphic/index.js";import{default as H}from"./MediaPlayerBase/index.js";import{default as q}from"./MediaPlayerSticky/index.js";import{default as K}from"./MediaPlayerMulti/index.js";import{default as _}from"./Marquee/index.js";import{default as J}from"./MarqueeReview/index.js";import{default as X}from"./WhyChoose/index.js";import{default as $}from"./Faq/index.js";import{MarqueeItem as re,MarqueeImageContent as te,MarqueeTextContent as oe}from"./Marquee/index.js";import{default as ie}from"./MultiLayoutGraphicBlock/index.js";import{default as pe}from"./GraphicAttractionBlock/index.js";import{default as fe}from"./HeaderNavigation/index.js";import{default as ne}from"./FooterNavigation/index.js";import{default as ue}from"./SearchPage/index.js";import{IPC_SEARCH_PAGE as xe,SearchPageTabType as ye}from"./SearchPage/types.js";import{withLayout as he}from"../shared/Styles.js";import{default as Ce}from"./AiuiProvider/index.js";import{default as Me}from"./Tabs/index.js";import{default as Te}from"./SwiperBox/index.js";import{VideoModal as Ie}from"./VideoModal/index.js";import{default as Ae}from"./CreativeModule/index.js";import{default as Fe}from"./GraphicOverlay/index.js";import{default as Ge}from"./Specs/index.js";import{default as Oe}from"./TabsGroup/index.js";import{default as we,useBizProductContext as ke}from"./Listing/BizProductProvider.js";import{default as We}from"./Listing/components/PurchaseBar/index.js";import{default as He}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as qe}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as Ke}from"./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js";import{default as _e}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as Je}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as Xe}from"./Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js";import{default as $e}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as rr}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as or}from"./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js";import{default as ir}from"./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js";import{default as pr}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as fr}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as nr}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as ur}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab.js";import{default as xr}from"./Listing/components/ProductCard/ProductDetail/CreditCouponRedeem/index.js";import{default as Sr}from"./Listing/components/PaidShipping/index.js";import{default as Pr}from"./Listing/components/CartActionButtons/index.js";import{NotifyMeDialog as gr}from"./NotifyMeDialog/index.js";import{default as Br}from"./Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js";import{default as vr}from"./Listing/components/ProductCard/ProductPaidShipping/index.js";import{default as br}from"./GraphicMore/index.js";import{default as Dr}from"./Features/index.js";import{default as jr}from"./AplusDesc/index.js";import{default as Lr}from"./GiftBox/index.js";import{default as Vr}from"./SelectStore/index.js";import{default as kr}from"./DownLoad/index.js";import{default as Wr}from"./FootCharger/index.js";import{default as Hr}from"./BrandCardLink/index.js";import*as Rr from"./IPRedirect/index.js";import{default as zr}from"./WheelLottery/index.js";import{default as Ur}from"./ProductLottery/index.js";import{default as Yr}from"./ProductCompare/index.js";import{default as Qr}from"./Ksp/index.js";import{default as Zr}from"./ImageTextFeature/index.js";import{default as et}from"./FeatureCards/index.js";import{default as tt}from"./FeaturedBlogPosts/index.js";import{default as at}from"./ImageWithText/index.js";import{default as st}from"./VideoFeature/index.js";import{default as dt}from"./TabsWithMedia/index.js";import{default as ct}from"./TabWithImage/index.js";import{default as lt}from"./FeatureShowcase/index.js";import{default as mt}from"./ProductHero/index.js";import{default as yt}from"./SpecsComparison/index.js";import{default as ht}from"./MediaSceneSwitcher/index.js";import{default as Ct}from"./MediaSceneSwitcherV2/index.js";import{default as Mt}from"./ThreeDCarousel/index.js";import{default as Tt}from"./ProductNav/index.js";import{default as It}from"./AnchorNavigation/index.js";import{default as At}from"./PromotionalBar/index.js";import{default as Ft}from"./EventSchedule/index.js";import{default as Gt}from"./SecondaryBanner/index.js";import{default as Ot}from"./BuyOneGetOneShelf/index.js";import{default as wt}from"./ActiveShelf/index.js";import{default as Nt}from"./MediaShelf/index.js";import{default as Et,CreditsProductCard as Ht}from"./CreditsShelf/index.js";import{default as qt,SceneProductCard as zt}from"./SceneShelf/index.js";import{default as Ut,SceneShelfV2ProductCard as _t}from"./SceneShelfV2/index.js";import{default as Jt}from"./SceneShelfV3/index.js";import{default as Xt}from"./MediaEndorsement/index.js";import{default as $t}from"./MediaTextOverlay/index.js";import{default as ro}from"./ImageOverlayShelf/index.js";import{default as oo,AccessoryProductCard as ao}from"./AccessoriesShelf/components/AccessoryShelf/index.js";import{default as so}from"./ImageTextOverlay/index.js";import{default as fo}from"./MiniCart/index.js";import{default as no}from"./MiniCart/CircleProgress.js";import{default as uo,MiniCartDialog as mo}from"./MiniCart/MiniCartDialog.js";import{default as yo}from"./WebPushPopup/index.js";import{useEmarsysWebPush as ho}from"../hooks/useEmarsysWebPush.js";const e={ActivityMechanism:"ActivityMechanism",ActivitySchedule:"ActivitySchedule",AnchorNavigation:"AnchorNavigation",EventSchedule:"EventSchedule",FeatureCards:"FeatureCards",GiftShelf:"GiftShelf",GiftTierShelf:"GiftTierShelf",ImageTextFeature:"ImageTextFeature",ImageTextOverlay:"ImageTextOverlay",ImageWithText:"ImageWithText",MarqueeReview:"MarqueeReview",MediaSceneSwitcher:"MediaSceneSwitcher",ProductCompare:"ProductCompare",ProductHero:"ProductHero",ProductNav:"ProductNav",PromotionalBar:"PromotionalBar",TabsWithMedia:"TabsWithMedia",ThreeDCarousel:"ThreeDCarousel",VideoFeature:"VideoFeature","ipc-accordioncards":"AccordionCards","ipc-active-shelf":"ActiveShelf","ipc-add-to-cart-success-popover":"AddToCartSuccessPopover","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-bogo-shelf":"BuyOneGetOneShelf","ipc-brand-card-link":"BrandCardLink","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-creativemodule":"CreativeModule","ipc-credits-shelf":"CreditsShelf","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-featured-blog-posts":"FeaturedBlogPosts","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-image-overlay-shelf":"ImageOverlayShelf","ipc-marquee":"Marquee","ipc-media-endorsement":"MediaEndorsement","ipc-media-shelf":"MediaShelf","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-media-text-overlay":"MediaTextOverlay","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mini-cart":"MiniCart","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-notify-me-dialog":"NotifyMeDialog","ipc-product-lottery":"ProductLottery","ipc-scene-shelf":"SceneShelf","ipc-scene-shelf-v2":"SceneShelfV2","ipc-scene-shelf-v3":"SceneShelfV3","ipc-search-page":"SearchPage","ipc-search-page-tabs":"SearchPage","ipc-secondary-banner":"SecondaryBanner","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-shelfdisplay-horizontal":"ShelfDisplayHorizontal","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-title":"Title","ipc-wheel-lottery":"WheelLottery","ipc-whychoose":"WhyChoose",ksp:"Ksp",modalCoupon:"ModalCoupon",modalRegisterSubscribe:"ModalRegisterSubscribe",modalSmsSubscribe:"ModalSmsSubscribe",modalSubscribeConfirm:"ModalSubscribeConfirm",modalVerify:"ModalVerify"};import{CartSummaryHeader as Co,CartItemRow as go,CartGiftSection as Mo,CartPerksSection as Bo,CartThirdPartyBanner as To,CartPriceSummary as vo}from"./CartDetail/index.js";import{useAiuiContext as bo}from"./AiuiProvider/index.js";import{default as Do}from"./ModalRegisterSubscribe/index.js";import{default as jo}from"./ModalSubscribeConfirm/index.js";import{default as Lo}from"./ModalCoupon/index.js";import{default as Vo}from"./ModalSmsSubscribe/index.js";import{default as ko}from"./ModalVerify/index.js";export{o as AccessoriesProductGrid,ao as AccessoryProductCard,oo as AccessoryShelf,k as AccordionCards,wt as ActiveShelf,x as ActivityMechanism,f as ActivitySchedule,p as AddToCartSuccessPopover,Ce as AiuiProvider,It as AnchorNavigation,jr as AplusDesc,ur as BenefitsTab,we as BizProductProvider,Hr as BrandCardLink,S as BrandEquity,Ot as BuyOneGetOneShelf,Pr as CartActionButtons,Mo as CartGiftSection,go as CartItemRow,Bo as CartPerksSection,vo as CartPriceSummary,Co as CartSummaryHeader,To as CartThirdPartyBanner,L as Category,Ae as CreativeModule,xr as CreditCouponRedeem,Ht as CreditsProductCard,Et as CreditsShelf,kr as DownLoad,j as Evaluate,Ft as EventSchedule,$ as Faq,et as FeatureCards,lt as FeatureShowcase,tt as FeaturedBlogPosts,Dr as Features,Wr as FootCharger,ne as FooterNavigation,Lr as GiftBox,n as GiftShelf,u as GiftTierShelf,W as Graphic,pe as GraphicAttractionBlock,br as GraphicMore,Fe as GraphicOverlay,fe as HeaderNavigation,V as HeroBanner,xe as IPC_SEARCH_PAGE,Rr as IPRedirect,ro as ImageOverlayShelf,Zr as ImageTextFeature,so as ImageTextOverlay,at as ImageWithText,Qr as Ksp,s as MainProductArea,_ as Marquee,te as MarqueeImageContent,re as MarqueeItem,J as MarqueeReview,oe as MarqueeTextContent,Xt as MediaEndorsement,H as MediaPlayerBase,K as MediaPlayerMulti,q as MediaPlayerSticky,ht as MediaSceneSwitcher,Ct as MediaSceneSwitcherV2,Nt as MediaShelf,$t as MediaTextOverlay,P as MemberEquity,fo as MiniCart,no as MiniCartCircleProgress,uo as MiniCartDialog,mo as MiniCartDialogComponent,Lo as ModalCoupon,Do as ModalRegisterSubscribe,Vo as ModalSmsSubscribe,jo as ModalSubscribeConfirm,ko as ModalVerify,ie as MultiLayoutGraphicBlock,gr as NotifyMeDialog,e as PAYLOAD_COMPONENT_MAP,Sr as PaidShipping,He as ProductActions,ir as ProductBanner,Ke as ProductBenefits,qe as ProductBenefitsTabs,rr as ProductBundle,Yr as ProductCompare,or as ProductCoupon,Je as ProductFreeGift,Xe as ProductFunctionFreeGift,fr as ProductGallery,pr as ProductGridBox,mt as ProductHero,_e as ProductHighlight,Ur as ProductLottery,Tt as ProductNav,$e as ProductOptions,vr as ProductPaidShipping,Br as ProductServiceBenefits,nr as ProductSummary,i as PromoBanner,At as PromotionalBar,We as PurchaseBar,zt as SceneProductCard,qt as SceneShelf,Ut as SceneShelfV2,_t as SceneShelfV2ProductCard,Jt as SceneShelfV3,ue as SearchPage,ye as SearchPageTabType,Gt as SecondaryBanner,a as SectionHeader,Vr as SelectStore,b as ShelfDisplay,D as ShelfDisplayHorizontal,g as Slogan,v as Spacer,Ge as Specs,yt as SpecsComparison,Te as SwiperBox,Oe as TabGroup,ct as TabWithImage,Me as Tabs,dt as TabsWithMedia,Mt as ThreeDCarousel,B as Title,st as VideoFeature,Ie as VideoModal,yo as WebPushPopup,zr as WheelLottery,X as WhyChoose,bo as useAiuiContext,ke as useBizProductContext,ho as useEmarsysWebPush,he as withLayout};
|
|
1
|
+
import{AccessoriesProductGrid as o,SectionHeader as a,PromoBanner as i,MainProductArea as s,AddToCartSuccessPopover as p}from"./AccessoriesShelf/index.js";import{default as f}from"./ActivitySchedule/index.js";import{default as n}from"./GiftShelf/index.js";import{default as u}from"./GiftTierShelf/index.js";import{default as x}from"./ActivityMechanism/index.js";import{default as S}from"./BrandEquity/index.js";import{default as P}from"./MemberEquity/index.js";import{default as g}from"./Slogan/index.js";import{default as B}from"./Title/index.js";import{default as T}from"./Spacer/index.js";import{default as b}from"./ShelfDisplay/index.js";import{default as D}from"./ShelfDisplayHorizontal/index.js";import{default as j}from"./Evaluate/index.js";import{default as L}from"./Category/index.js";import{default as V}from"./HeroBanner/index.js";import{default as k}from"./AccordionCards/index.js";import{default as W}from"./Graphic/index.js";import{default as H}from"./MediaPlayerBase/index.js";import{default as q}from"./MediaPlayerSticky/index.js";import{default as K}from"./MediaPlayerMulti/index.js";import{default as _}from"./Marquee/index.js";import{default as J}from"./MarqueeReview/index.js";import{default as X}from"./WhyChoose/index.js";import{default as $}from"./Faq/index.js";import{MarqueeItem as re,MarqueeImageContent as te,MarqueeTextContent as oe}from"./Marquee/index.js";import{default as ie}from"./MultiLayoutGraphicBlock/index.js";import{default as pe}from"./GraphicAttractionBlock/index.js";import{default as fe}from"./HeaderNavigation/index.js";import{default as ne}from"./FooterNavigation/index.js";import{default as ue}from"./SearchPage/index.js";import{IPC_SEARCH_PAGE as xe,SearchPageTabType as ye}from"./SearchPage/types.js";import{withLayout as he}from"../shared/Styles.js";import{default as Ce}from"./AiuiProvider/index.js";import{default as Me}from"./Tabs/index.js";import{default as ve}from"./SwiperBox/index.js";import{VideoModal as Ie}from"./VideoModal/index.js";import{default as Ae}from"./CreativeModule/index.js";import{default as Fe}from"./GraphicOverlay/index.js";import{default as Ge}from"./Specs/index.js";import{default as Oe}from"./TabsGroup/index.js";import{default as we,useBizProductContext as ke}from"./Listing/BizProductProvider.js";import{calcSummaryFinalPrice as We,calcUnlockedSaving as Ee}from"./Listing/utils/priceCalc.js";import{default as Re}from"./Listing/components/PurchaseBar/index.js";import{default as ze}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as Ue}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as Ye}from"./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js";import{default as Qe}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as Ze}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as er}from"./Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js";import{default as tr}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as ar}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as sr}from"./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js";import{default as dr}from"./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js";import{default as cr}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as lr}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as mr}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as yr}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab.js";import{default as hr}from"./Listing/components/ProductCard/ProductDetail/CreditCouponRedeem/index.js";import{default as Cr}from"./Listing/components/PaidShipping/index.js";import{default as Mr}from"./Listing/components/CartActionButtons/index.js";import{NotifyMeDialog as vr}from"./NotifyMeDialog/index.js";import{default as Ir}from"./Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js";import{default as Ar}from"./Listing/components/ProductCard/ProductPaidShipping/index.js";import{default as Fr}from"./GraphicMore/index.js";import{default as Gr}from"./Features/index.js";import{default as Or}from"./AplusDesc/index.js";import{default as wr}from"./GiftBox/index.js";import{default as Nr}from"./SelectStore/index.js";import{default as Er}from"./DownLoad/index.js";import{default as Rr}from"./FootCharger/index.js";import{default as zr}from"./BrandCardLink/index.js";import*as Kr from"./IPRedirect/index.js";import{default as _r}from"./WheelLottery/index.js";import{default as Jr}from"./ProductLottery/index.js";import{default as Xr}from"./ProductCompare/index.js";import{default as $r}from"./Ksp/index.js";import{default as rt}from"./ImageTextFeature/index.js";import{default as ot}from"./FeatureCards/index.js";import{default as it}from"./FeaturedBlogPosts/index.js";import{default as pt}from"./ImageWithText/index.js";import{default as ft}from"./VideoFeature/index.js";import{default as nt}from"./TabsWithMedia/index.js";import{default as ut}from"./TabWithImage/index.js";import{default as xt}from"./FeatureShowcase/index.js";import{default as St}from"./ProductHero/index.js";import{default as Pt}from"./SpecsComparison/index.js";import{default as gt}from"./MediaSceneSwitcher/index.js";import{default as Bt}from"./MediaSceneSwitcherV2/index.js";import{default as Tt}from"./ThreeDCarousel/index.js";import{default as bt}from"./ProductNav/index.js";import{default as Dt}from"./AnchorNavigation/index.js";import{default as jt}from"./PromotionalBar/index.js";import{default as Lt}from"./EventSchedule/index.js";import{default as Vt}from"./SecondaryBanner/index.js";import{default as kt}from"./BuyOneGetOneShelf/index.js";import{default as Wt}from"./ActiveShelf/index.js";import{default as Ht}from"./MediaShelf/index.js";import{default as qt,CreditsProductCard as zt}from"./CreditsShelf/index.js";import{default as Ut,SceneProductCard as _t}from"./SceneShelf/index.js";import{default as Jt,SceneShelfV2ProductCard as Qt}from"./SceneShelfV2/index.js";import{default as Zt}from"./SceneShelfV3/index.js";import{default as eo}from"./MediaEndorsement/index.js";import{default as to}from"./MediaTextOverlay/index.js";import{default as ao}from"./ImageOverlayShelf/index.js";import{default as so,AccessoryProductCard as po}from"./AccessoriesShelf/components/AccessoryShelf/index.js";import{default as co}from"./ImageTextOverlay/index.js";import{default as lo}from"./MiniCart/index.js";import{default as mo}from"./MiniCart/CircleProgress.js";import{default as yo,MiniCartDialog as So}from"./MiniCart/MiniCartDialog.js";import{default as Po}from"./WebPushPopup/index.js";import{useEmarsysWebPush as go}from"../hooks/useEmarsysWebPush.js";const e={ActivityMechanism:"ActivityMechanism",ActivitySchedule:"ActivitySchedule",AnchorNavigation:"AnchorNavigation",EventSchedule:"EventSchedule",FeatureCards:"FeatureCards",GiftShelf:"GiftShelf",GiftTierShelf:"GiftTierShelf",ImageTextFeature:"ImageTextFeature",ImageTextOverlay:"ImageTextOverlay",ImageWithText:"ImageWithText",MarqueeReview:"MarqueeReview",MediaSceneSwitcher:"MediaSceneSwitcher",ProductCompare:"ProductCompare",ProductHero:"ProductHero",ProductNav:"ProductNav",PromotionalBar:"PromotionalBar",TabsWithMedia:"TabsWithMedia",ThreeDCarousel:"ThreeDCarousel",VideoFeature:"VideoFeature","ipc-accordioncards":"AccordionCards","ipc-active-shelf":"ActiveShelf","ipc-add-to-cart-success-popover":"AddToCartSuccessPopover","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-bogo-shelf":"BuyOneGetOneShelf","ipc-brand-card-link":"BrandCardLink","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-creativemodule":"CreativeModule","ipc-credits-shelf":"CreditsShelf","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-featured-blog-posts":"FeaturedBlogPosts","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-image-overlay-shelf":"ImageOverlayShelf","ipc-marquee":"Marquee","ipc-media-endorsement":"MediaEndorsement","ipc-media-shelf":"MediaShelf","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-media-text-overlay":"MediaTextOverlay","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mini-cart":"MiniCart","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-notify-me-dialog":"NotifyMeDialog","ipc-product-lottery":"ProductLottery","ipc-scene-shelf":"SceneShelf","ipc-scene-shelf-v2":"SceneShelfV2","ipc-scene-shelf-v3":"SceneShelfV3","ipc-search-page":"SearchPage","ipc-search-page-tabs":"SearchPage","ipc-secondary-banner":"SecondaryBanner","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-shelfdisplay-horizontal":"ShelfDisplayHorizontal","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-title":"Title","ipc-wheel-lottery":"WheelLottery","ipc-whychoose":"WhyChoose",ksp:"Ksp",modalCoupon:"ModalCoupon",modalRegisterSubscribe:"ModalRegisterSubscribe",modalSmsSubscribe:"ModalSmsSubscribe",modalSubscribeConfirm:"ModalSubscribeConfirm",modalVerify:"ModalVerify"};import{CartSummaryHeader as Bo,CartItemRow as vo,CartGiftSection as To,CartPerksSection as Io,CartThirdPartyBanner as bo,CartPriceSummary as Ao}from"./CartDetail/index.js";import{useAiuiContext as Fo}from"./AiuiProvider/index.js";import{default as Go}from"./ModalRegisterSubscribe/index.js";import{default as Oo}from"./ModalSubscribeConfirm/index.js";import{default as wo}from"./ModalCoupon/index.js";import{default as No}from"./ModalSmsSubscribe/index.js";import{default as Eo}from"./ModalVerify/index.js";export{o as AccessoriesProductGrid,po as AccessoryProductCard,so as AccessoryShelf,k as AccordionCards,Wt as ActiveShelf,x as ActivityMechanism,f as ActivitySchedule,p as AddToCartSuccessPopover,Ce as AiuiProvider,Dt as AnchorNavigation,Or as AplusDesc,yr as BenefitsTab,we as BizProductProvider,zr as BrandCardLink,S as BrandEquity,kt as BuyOneGetOneShelf,Mr as CartActionButtons,To as CartGiftSection,vo as CartItemRow,Io as CartPerksSection,Ao as CartPriceSummary,Bo as CartSummaryHeader,bo as CartThirdPartyBanner,L as Category,Ae as CreativeModule,hr as CreditCouponRedeem,zt as CreditsProductCard,qt as CreditsShelf,Er as DownLoad,j as Evaluate,Lt as EventSchedule,$ as Faq,ot as FeatureCards,xt as FeatureShowcase,it as FeaturedBlogPosts,Gr as Features,Rr as FootCharger,ne as FooterNavigation,wr as GiftBox,n as GiftShelf,u as GiftTierShelf,W as Graphic,pe as GraphicAttractionBlock,Fr as GraphicMore,Fe as GraphicOverlay,fe as HeaderNavigation,V as HeroBanner,xe as IPC_SEARCH_PAGE,Kr as IPRedirect,ao as ImageOverlayShelf,rt as ImageTextFeature,co as ImageTextOverlay,pt as ImageWithText,$r as Ksp,s as MainProductArea,_ as Marquee,te as MarqueeImageContent,re as MarqueeItem,J as MarqueeReview,oe as MarqueeTextContent,eo as MediaEndorsement,H as MediaPlayerBase,K as MediaPlayerMulti,q as MediaPlayerSticky,gt as MediaSceneSwitcher,Bt as MediaSceneSwitcherV2,Ht as MediaShelf,to as MediaTextOverlay,P as MemberEquity,lo as MiniCart,mo as MiniCartCircleProgress,yo as MiniCartDialog,So as MiniCartDialogComponent,wo as ModalCoupon,Go as ModalRegisterSubscribe,No as ModalSmsSubscribe,Oo as ModalSubscribeConfirm,Eo as ModalVerify,ie as MultiLayoutGraphicBlock,vr as NotifyMeDialog,e as PAYLOAD_COMPONENT_MAP,Cr as PaidShipping,ze as ProductActions,dr as ProductBanner,Ye as ProductBenefits,Ue as ProductBenefitsTabs,ar as ProductBundle,Xr as ProductCompare,sr as ProductCoupon,Ze as ProductFreeGift,er as ProductFunctionFreeGift,lr as ProductGallery,cr as ProductGridBox,St as ProductHero,Qe as ProductHighlight,Jr as ProductLottery,bt as ProductNav,tr as ProductOptions,Ar as ProductPaidShipping,Ir as ProductServiceBenefits,mr as ProductSummary,i as PromoBanner,jt as PromotionalBar,Re as PurchaseBar,_t as SceneProductCard,Ut as SceneShelf,Jt as SceneShelfV2,Qt as SceneShelfV2ProductCard,Zt as SceneShelfV3,ue as SearchPage,ye as SearchPageTabType,Vt as SecondaryBanner,a as SectionHeader,Nr as SelectStore,b as ShelfDisplay,D as ShelfDisplayHorizontal,g as Slogan,T as Spacer,Ge as Specs,Pt as SpecsComparison,ve as SwiperBox,Oe as TabGroup,ut as TabWithImage,Me as Tabs,nt as TabsWithMedia,Tt as ThreeDCarousel,B as Title,ft as VideoFeature,Ie as VideoModal,Po as WebPushPopup,_r as WheelLottery,X as WhyChoose,We as calcSummaryFinalPrice,Ee as calcUnlockedSaving,Fo as useAiuiContext,ke as useBizProductContext,go as useEmarsysWebPush,he as withLayout};
|