1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2363],{62209:(function(rl,ra,m){m.r(ra),m.d(ra,{default:function(){return el}});var e=m(67294),Ra=m(48479),H=m(48290),Ga=m(11382),Va=m(76772),ja=m(97005),M=m(83669),yt=m(46445),$t=m(56853),ia=m(48889),et=m(48086),Wa=m(26272),ca=m(57119),Bt=m(54549),Qa=m(79618),Ie=m(99598),S=m(33432),Ua=m(27361),oa=m.n(Ua),Ka=m(19962),Ha=m(1955),Ya=m(45697),we=m.n(Ya),za=m(23279),da=m.n(za),Ft=m(4791),Xa=m(2465),Ja=m(13591),Rt=m(1050),ge=m(57233),tt=m(30001),ne=m(45090),_a=m(50152),qa=m(75925),ua=m(70491),en=m(87955);const il=({isValid:r,showCheckbox:t,mode:a,isEnabled:p,isSelected:h,handleCheckProduct:b})=>{const o=a==="default";return React.createElement("div",{className:o?"":"cart-col-checkbox"},r&&a!=="default"&&t?React.createElement(Checkbox,{disabled:!p,checked:h,onChange:b}):null)};var cl=null,ol=m(55133),Gt=m(72066),ma=m(21597),tn=m(88190),an=m(61120),nn=m.n(an),ln=m(32130),dl=m(96486),sn=m(90898),rn=m(86648),Vt=m(46411),cn=m(17706),on=Object.defineProperty,pa=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,va=(r,t,a)=>t in r?on(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,$e=(r,t)=>{for(var a in t||(t={}))dn.call(t,a)&&va(r,a,t[a]);if(pa)for(var a of pa(t))un.call(t,a)&&va(r,a,t[a]);return r},at=(r,t,a)=>new Promise((p,h)=>{var b=c=>{try{d(a.next(c))}catch(v){h(v)}},o=c=>{try{d(a.throw(c))}catch(v){h(v)}},d=c=>c.done?p(c.value):Promise.resolve(c.value).then(b,o);d((a=a.apply(r,t)).next())});function ul({data:r}){const{selectedPlatformPromo:t}=r||{},{playTags:a,campaignId:p,playDescription:h}=formatCampaignData(t)||{};return!t||p===-1?null:React.createElement("div",{className:"cart-product-activity-tag-label"},t?React.createElement("div",{className:"activity-tag platform-tag cutwords"},a,React.createElement("div",{className:"activity-tag-desc"},h)):null)}const jt=(0,Gt.M2)(r=>{var t;const{syncCartData:a,isMobile:p,mode:h,refreshCartData:b}=(0,e.useContext)(tt.A),{className:o,type:d,renderType:c,product:v,handleCheckProduct:y,handleDelete:D,handleMoveWishlist:I,itemBO:T,disabledClick:Q,groupSkus:R,existGiftItemStepList:j}=r,{getButtonA11yProps:w,getClickA11yProps:L}=(0,cn.Z)(),{id:g,shop:{id:k},sku:G,extraData:z={},priceInfo:x={},skuQty:O,cartLineBuyLimit:N,isEnabled:_,isSelected:Me,optionalCampaignList:U,invalidTypeDict:Te,isPaidMemberPrice:ie,matchPlatformCampaign:Be,matchShopCampaign:me,noUseShopCampaigns:Ht,noUsePlatformCampaigns:Aa,cartLineSourceDict:Ne,isDiy:Fe=!1,cartLine:ke,matchedSkuCampaign:Yt,commodityPackageBO:{mainItemList:rt=[],itemFittingList:St=[]}={},insurance:Oe,usableInsuranceList:q=[]}=v||{},{giftMarketingCopywriting:zt}=z,{expectDate:Xt,expectDateBegin:Ma}=G||{},[We,Qe]=(0,e.useState)(!1),[Re,Ue]=(0,e.useState)(!1),{item:{id:Ge,itemName:Jt,mainImage:Ve,skuAttributes:je,businessTypeDict:it,urlKey:_t,disPlay:qt,itemShortName:ea,attachment:bt},image:Ct,attributes:Ke,id:He,marketingUnit:ta,adjustStep:ct,skuShopRelationBO:ot,skuUrlSuffix:aa}=G||{},dt=Q||!qt,{minQty:Nt,maxQty:he}=N||{},xe=(Ke||[]).map(u=>u.attrVal).join("/")||"",{unitName:Ta,unitStatus:na}=ta||{},Pe=na==="ENABLED"?Ta:"",ut=it===M.aq.service,ue=it===M.aq.weight,X=ue?(0,Ie.p8)(O):O,Ye=[M.be.exchange,M.be.gift].indexOf(Ne)>-1,ee=d!=="invalid",Ze=d==="pedding",kt=ee,Pt=ee&&!Ye&&Ne!==M.be.recommend,Oa=ee&&!Ye,be=kt&&U&&U.length>0,mt=ee&&!Ye,n=!Ye,s=Fe,l=(0,e.useMemo)(()=>ke==null?void 0:ke.map(u=>{var $,K,A;let re=1;return u!=null&&u.isMainItem?rt==null||rt.forEach(Le=>{var de,fe;((de=Le==null?void 0:Le.itemExtBO)==null?void 0:de.id)===((fe=u==null?void 0:u.item)==null?void 0:fe.id)&&(re=Le==null?void 0:Le.imageOrder)}):re=($=u==null?void 0:u.sku)==null?void 0:$.fitSortNo,{isMainItem:u.isMainItem,id:(K=u==null?void 0:u.sku)==null?void 0:K.id,skuCascadeImage:(A=u==null?void 0:u.sku)==null?void 0:A.skuCascadeImage,imageOrder:re}}).sort((u,$)=>u.imageOrder-$.imageOrder),[ke,rt,St]),{actualAmt:{value:i}={},actualAmt:{value:E}={}
1,tariff:{value:B}={},skuDiscountTotalAmt:{value:C}={},unitMarketSkuAmt:{value:f}={},unitSaleAmt:Z,unitLastSecondAmt:P,unitOriginAmt:J}=x,V=sa(),{benefitCampaignLink:pe={}}=Yt||{},te=(M.IV.straightDown===pe.playType||C)&&ee,F=Ne===M.be.gift,Y=Ne==="ITEM_BUNDLE",ae=Ne==="CART_BUNDLE",ce=(0,e.useRef)(He),W=(0,ln.Z)(),ve=X>he,Ee=p?{width:100,height:119}:{width:140,height:167},ze=Fe?`${(0,Ie.Ty)({urlKey:(T==null?void 0:T.urlKey)||"",shopId:k,itemId:Ge})}?ref=cart_item_details`:`${(0,Ie.Ty)({urlKey:_t,shopId:k,itemId:Ge,skuUrlSuffix:aa})}${aa?"&":"?"}ref=cart_item_details`,la=p?ee?["baseInfo","promotion"]:["baseInfo"]:["baseInfo","pricesAndStepper"],Dt=(0,e.useMemo)(()=>{let u=[];return ie&&u.push((0,S.wv)({id:"trade.cart.productLabel.memberPrice",defaultMessage:"\u4F1A\u5458\u4EF7"})),ut&&u.push((0,S.wv)({id:"trade.cart.productLabel.serviceLabel",defaultMessage:"\u8FC7\u671F\u81EA\u52A8\u9000"})),u},[ie,ut]),Xe=da()((0,e.useCallback)((u,$)=>{const K=(0,ne.Kj)();K.cartLineList=[{skuQty:u,id:g}],a(ge.Tb.bind(void 0,K),$)},[g,a]),500);function sa(){let u=null,$=null;const K=[],A=[],{campaignId:re}=(0,ne.xH)(me)||{},{campaignId:Le}=(0,ne.xH)(Be)||{};(U||[]).forEach(fe=>{const{benefit:Et,campaignId:_e}=(0,ne.xH)(fe)||{},{group:oe}=Et||{};oe===M.rg.shop?(K.push(fe),_e===re&&(u=fe)):oe===M.rg.platform&&(A.push(fe),_e===Le&&($=fe))});const de={noUse:!0,benefitCampaignLink:{playDescription:(0,S.wv)({id:"trade.cart.productNoUsePromoDesc",defaultMessage:"\u4E0D\u4F7F\u7528\u4F18\u60E0"}),campaign:{id:-1}}};return K.length>0&&(K.push(de),Ht&&(u=de)),A.length>0&&(A.push(de),Aa&&($=de)),{shopPromotionList:K,platformPromotionList:A,selectedShopPromo:u,selectedPlatformPromo:$}}function It(){return ee?s?e.createElement(_a.Z,{isMobile:p,shopId:k,skuId:He,itemId:Ge,skuQty:X,selectSkuData:l,showSkuSelector:Pt,handleChangeDiySku:pt,handleChangeDiySkuNew:pt,skuAttrStr:(R||[]).join("; "),groupSkus:R,attachment:bt,isShowEdit:!(Y||ae)}):e.createElement(en.Z,{isMobile:p,sku:G,shopId:k,skuId:He,itemId:Ge,skuQty:X,skuShopId:ot==null?void 0:ot.id,selectedSkuAttrs:Ke,skuAttributes:je,skuAttrStr:xe,showSkuSelector:Pt,setChangeSkuVisible:Ue,onChangeSku:u=>{ce.current=u},handleChangeSku:At,changeSkuVisible:Re,handleChangeDiySku:pt,attachment:bt,isShowEdit:!(Y||ae)}):null}function wt(){let u=null,$=null;return Fe?null:(u=Xt,$=Ma,e.createElement(e.Fragment,null,!$&&u?e.createElement("p",{className:"cart-product-text cart-product-activity-new"},e.createElement("span",{className:"cart-product-activity-new-icon"}),(0,S.wv)({id:"trade.cart.table.shippingDate",defaultMessage:"\u9884\u8BA1{time}\u53D1\u8D27"},{time:(0,Ft.Z)(new Date(u),M.tO.expectDate,{locale:M.GA})})):$&&u?e.createElement("p",{className:"cart-product-text cart-product-activity-new"},e.createElement("span",{className:"cart-product-activity-new-icon"}),(0,S.wv)({id:"trade.cart.table.shippingDate2",defaultMessage:""},{time:(0,Ft.Z)(new Date($),M.tO.expectDateScope,{locale:M.GA}),time2:(0,Ft.Z)(new Date(u),M.tO.expectDateScope,{locale:M.GA})})):e.createElement("p",{className:"immediately-box"},e.createElement("span",{className:"immediately-icon"}),e.createElement(H.Z,{id:"trade.cart.table.immediately",defaultMessage:""}))))}function At(){Ue(!1);const u=(0,ne.Kj)();u.cartLineList=[{id:g,shop:{id:k},sku:{id:ce.current}}],a(ge.kE.bind(this,u))}function pt(u,$){const K=[...u,...$].map(de=>{const{selectedSkuRep:fe,id:Et}=de,{sku:_e}=fe;return{sku:{id:_e.id},item:{id:Et},shop:{id:k},cartLineTypeDict:v.cartLineTypeDict}}).filter(de=>de.sku.id&&de.sku.id!=="no"),A={id:v.id,isDiy:v.isDiy,snapshotPrc:v.snapshotPrc,item:v.item,sku:{id:G.id},shop:{id:k},skuQty:v.skuQty,cartLineTypeDict:v.cartLineTypeDict},{receiveLocation:re}=(0,ne.Kj)(),Le={receiveLocation:re,cartLineList:[...K,A]};a(ge.PS.bind(this,Le))}function $a(u,$){const K=[...u].map(oe=>{const{selectedSkuRep:Zt,id:qe}=oe,{sku:Lt}=Zt;return{sku:{id:Lt.id},item:{id:qe},shop:{id:k},cartLineTypeDict:v.cartLineTypeDict}}).filter(oe=>oe.sku.id&&oe.sku.id!=="no"),A=[...$];let re=[];A.forEach((oe,Zt)=>{var qe;(qe=oe==null?void 0:oe.fitemFittingList)==null||qe.forEach(Lt=>{re.push(Lt)})});const Le=[...re].map(oe=>{const{selectedSkuRep:Zt,id:qe}=oe,{sku:Lt}=Zt;return{sku:{id:Lt.id},item:{id:qe},shop:{id:k},cartLineTypeDict:v.cartLineTypeDict}}).filter(oe=>oe.sku.id&&oe.sku.id!=="no"),de=[...K,...Le],fe={id:v.id,isDiy:v.isDiy,snapshotPrc:v.snapshotPrc,item:v.item,sku:{id:G.
1id},shop:{id:k},skuQty:v.skuQty,cartLineTypeDict:v.cartLineTypeDict},{receiveLocation:Et}=(0,ne.Kj)(),_e={receiveLocation:Et,cartLineList:[...de,fe]};a(ge.PS.bind(this,_e))}function vt(u){const $=e.createElement("div",{key:`${u}_${g}`,className:"product-name"},Jt+"("+ea+")"),K=f;switch(u){case"baseInfo":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-product"},e.createElement("div",{className:"product-info"},e.createElement("div",{className:"product-name-box"},e.createElement(yt.r,$e({to:dt?void 0:ze,target:"_blank"},dt?{}:L()),F?e.createElement("span",{className:"gift-box"},zt):null,$),W.sm&&e.createElement("div",$e({className:"product-item-delete",onClick:()=>{D(g,ke)},"aria-label":"Delete product"},w({onPress:()=>D(g,ke)})))),ee&&Dt.length>0?e.createElement("div",{className:"product-tag-wrapper"},Dt.map((A,re)=>e.createElement("span",{key:`${A}_${re}`,className:"product-tag"},A))):null,It(),wt()),!W.sm&&e.createElement("div",$e({className:"product-item-delete",onClick:()=>{D(g,ke)},"aria-label":"Delete product"},w({onPress:()=>D(g,ke)}))));case"priceAndPromotion":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-price"},i||F?e.createElement("div",{className:"product-price"},(0,S.Sg)({price:i}),ue&&!F?`/${Pe}`:null):null,e.createElement(ua.Z,{cartLineId:g,showPromoSelector:be,changeProVisible:We,promotionData:V,setChangeProVisible:Qe}));case"stepper":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-quantity"},mt?e.createElement(Rt.Z,{max:X>he?X:he,min:Nt,defaultValue:X,disabled:!ee,onChange:Xe,step:ct,formatter:A=>ue?`${+A}${Pe}`:A,parser:A=>ue?`${+A.replace(Pe,"")}`:A,isWeight:ue}):null,F?e.createElement("div",{className:"gift-quantity"},"x1"):null,ve&&ee?e.createElement("div",{className:"product-above-stock-tip"},e.createElement(H.Z,{id:"trade.cart.table.aboveStockTip",defaultMessage:"\u9650\u8D2D{quantity}\u4EF6",values:{quantity:he}})):null);case"subtotalAndTariff":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-subtotal product-subtotal common-bold-font"},E||E===0||F?(0,S.Sg)({price:F?0:E}):null);case"subtotalAndstepper":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-subtotal-quantity"},Ze?e.createElement("div",{className:"cart-col-pedding"},(0,S.wv)({id:"trade.cart.productLabel.bundle.pedding",defaultMessage:"This item cannot be checked out now. Add more items to your cart"})):e.createElement("div",{className:"cart-col-quantity"},mt?e.createElement(Rt.Z,{max:X>he?X:he,min:Nt,defaultValue:X,disabled:Ze||!ee,onChange:Xe,step:ct,formatter:A=>ue?`${+A}${Pe}`:A,parser:A=>ue?`${+A.replace(Pe,"")}`:A,isWeight:ue,fontSize:p?12:22}):null,F?e.createElement("div",{className:"gift-quantity"},`x${X}`):null,ve&&ee?e.createElement("div",{className:"product-above-stock-tip"},e.createElement(H.Z,{id:"trade.cart.table.aboveStockTip",defaultMessage:"\u9650\u8D2D{quantity}\u4EF6",values:{quantity:he}})):null),e.createElement("div",{className:"cart-bundle-price"},Y||ae?e.createElement("div",{className:"cart-bundle-originPrice"},e.createElement(Vt.Z,{unitOriginAmt:J,salePrc:P,unitSaleAmt:Z,type:"cart"})):null,e.createElement("div",{className:"cart-col-subtotal product-subtotal common-bold-font"},e.createElement("p",{className:"product-originPrize"},K>(F?0:E)?(0,S.Sg)({price:K}):null),E||E===0||F?(0,S.Sg)({price:F?0:E}):null,M.P9.showTariff&&B&&ee&&!p?e.createElement("div",{className:"product-tariff"},e.createElement(H.Z,{id:"trade.cart.table.tariff",defaultMessage:"\u7A0E\u8D39\u9884\u8BA1 {tariff}",values:{tariff:(0,S.Sg)({price:B,isSimple:!0})}})):null)));case"operation":return!kt&&e.createElement(qa.Z,{key:`${u}_${g}`,showOperation:n,showPromoSelector:be,cartLineId:g,promotionData:V,handleDelete:D,handleMoveWishlist:I});case"productName":return $;case"skuSelector":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-12"},It());case"promotion":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-12 cart-product-promotion"},e.createElement(ua.Z,{isMobile:p,cartLineId:g,showPromoSelector:be,changeProVisible:We,promotionData:V,setChangeProVisible:Qe}));
1case"invalidReasonAndActivity":return e.createElement("div",{key:`${u}_${g}`,className:"cart-product-invalid-activity"},wt());case"pricesAndStepper":return e.createElement("div",{key:`${u}_${g}`,className:"cart-col-subtotal-quantity"},Ze?e.createElement("div",{className:"cart-col-pedding"},(0,S.wv)({id:"trade.cart.productLabel.bundle.pedding",defaultMessage:"This item cannot be checked out now. Add more items to your cart"})):e.createElement("div",{className:"cart-col-quantity"},mt?e.createElement(Rt.Z,{max:X>he?X:he,min:Nt,defaultValue:X,disabled:Ze||!ee,onChange:Xe,step:ct,formatter:A=>ue?`${+A}${Pe}`:A,parser:A=>ue?`${+A.replace(Pe,"")}`:A,isWeight:ue,fontSize:p?12:22}):null,F?e.createElement("div",{className:"gift-quantity"},`x${X}`):null,ve&&ee?e.createElement("div",{className:"product-above-stock-tip"},e.createElement(H.Z,{id:"trade.cart.table.aboveStockTip",defaultMessage:"\u9650\u8D2D{quantity}\u4EF6",values:{quantity:he}})):null),e.createElement("div",{className:"cart-bundle-price"},Y||ae?e.createElement("div",{className:"cart-bundle-originPrice"},e.createElement(Vt.Z,{unitOriginAmt:J,salePrc:P,unitSaleAmt:Z,type:"cart"})):null,e.createElement("div",{className:"cart-col-subtotal product-subtotal common-bold-font"},e.createElement("p",{className:"product-originPrize"},K>(F?0:E)?(0,S.Sg)({price:K}):null),E||E===0||F?(0,S.Sg)({price:F?0:E}):null)));default:return null}}const Mt=(0,e.useRef)(null),[se,ft]=(0,ma.Z)("Cart_ImageList_DATA"),[Je,gt]=(0,e.useState)(!1),[De,Tt]=(0,e.useState)(0),[Ot,Ce]=(0,e.useState)(!0),[xt,ht]=(0,e.useState)(!1),Ba=()=>{Tt(u=>u+1)},tl=()=>{Ce(!1);const u=(se==null?void 0:se.filter($=>$.cartLineId!==g))||[];ft(u),Tt($=>$-1)};(0,e.useEffect)(()=>{De<0?gt(!1):De===0&&!Je&>(!0)},[De,gt,Je]);const al=()=>at(void 0,null,function*(){nn()(Mt.current,{useCORS:!0}).then(u=>at(void 0,null,function*(){let $;u.toBlob(K=>at(void 0,null,function*(){$=new File([K],`${`${G==null?void 0:G.skushopid}s${Date.now()}`}.png`,{type:"image/png"});try{const A=yield(0,tn.Z)([$]),re=Object.values(typeof A=="string"?JSON.parse(A):A)[0];se.push({cartLineId:g,imageUrl:re}),ft(se)}catch(A){}}))}))});(0,e.useEffect)(()=>{!Ot&&De===0&&Je&&al()},[Je,Ot]);const nl=(0,e.useMemo)(()=>e.createElement("div",{ref:Mt,key:l==null?void 0:l.length,style:$e({position:"relative"},Ee)},l==null?void 0:l.map((u,$)=>e.createElement("div",{style:{zIndex:$,position:"absolute"}},e.createElement(Ja.Z,$e({onLoaded1:tl,onLoaded:Ba,numLoaded:De,key:`${u.id}`,src:u.skuCascadeImage},Ee))))),[l,Ee]),ll=()=>at(void 0,null,function*(){yield(0,ge.t6)({id:v==null?void 0:v.id}),b()}),Fa=()=>{ht(!0)},sl=u=>at(void 0,null,function*(){u==="delete"||u&&(yield(0,ge.t6)({id:v==null?void 0:v.id,insuranceId:u==null?void 0:u.insuranceId}),b())});return e.createElement("div",{className:`${o} ${q&&(q==null?void 0:q.length)>0&&"has-insurance"} ${Ze?"cart-product-pedding":""}`},e.createElement("div",{className:`cart-product ${d} ${c} `,"exposure-data":JSON.stringify({item_id:[Ge],scene:"cart_item_details"})},e.createElement("div",{className:`right-container ${Fe&&"cart-container"}`},e.createElement("div",{className:"product-image-group"},e.createElement(yt.r,$e({className:"product-image-link",to:dt?void 0:ze,target:"_blank"},dt?{}:L()),l?nl:e.createElement(Xa.Z,$e({key:Ct,src:Ct||Ve},Ee)),te&&e.createElement("div",{className:"cart-exchange-img"})),Y?e.createElement(rn.Z,null):null),e.createElement("div",{className:"cart-product-info"},la.map(u=>vt(u))),p&&vt("subtotalAndstepper"))),q&&(q==null?void 0:q.length)>0&&e.createElement("div",{className:"cart-insurance"},e.createElement("div",{className:"empty-img"}),e.createElement("div",{className:"insurance-tools"},Oe?e.createElement("span",{className:"left-title"},Oe==null?void 0:Oe.insuranceName," ",(0,S.Sg)({price:(Oe==null?void 0:Oe.insuranceFee)||0})):e.createElement("span",{className:"left-title"},e.createElement("span",{className:"under-line",onClick:Fa},e.createElement(H.Z,{id:"trade.detail.insurance.modal.Protection.Plan",defaultMessage:"Protection Plan"}))," for ",(0,S.Sg)({price:((t=q==null?void 0:q[0])==null?void 0:t.insuranceFee)||0})),Oe?e.createElement("span",{className:"right-remove",onClick:ll},e.createElement(H.Z,{id:"trade.detail.insurance.modal.Remove",defaultMessage:"Remove"})):e.createElement("span",{className:"right-add",onClick:Fa},e.createElement(H.Z,{id:"trade.detail.insurance.modal.Add",defaultMessage:"Add"})))),q&&(q==null?void 0:q.length)>0&&e.createElement(sn.Z,{visible:xt,setVisible:ht,currentSelect:q&&(q==null?void 0:q[0]),handleResult:sl,usableInsuranceList:q}))});var Wt=jt;jt.propTypes={className:we().string,type:we().oneOf(["valid","invali
1d","pedding"]),renderType:we().oneOf(["gift","normal"]),product:we().objectOf(we().any),handleCheckProduct:we().func,handleDelete:we().func,handleMoveWishlist:we().func},jt.defaultProps={className:"",type:"valid",renderType:"normal",product:{}};var mn=m(31911),pn=m(55494),nt=m(85843),vn=m(96333),fn=m(25217),gn=m(76199),Ae=m(21566),fa=m(82571),hn=m(45061),ga=m(62150);const En=r=>{const{queryLevel:t=[],current:a={},showTips:p=!1}=r,{value:h}=a,b=(0,e.useRef)(null),o=(c,v,y,D)=>e.createElement("div",{key:`progress-bar-wrap-${h}-${c}`,className:`line ${D===0?"line-radius":""}`},e.createElement("div",{className:"under"}),v?e.createElement("div",{className:"active",style:{width:"100%"}}):e.createElement("div",null,e.createElement("div",{className:"active",style:{width:`${c||0}%`}}),y&&p&&c>0&&b.current&&e.createElement(ga.Z,{getPopupContainer:()=>b.current,zIndex:10,overlayClassName:"add-on-deals-tooltip",placement:"top",arrowPointAtCenter:!0,visible:!0,title:(0,S.Sg)({price:h}),color:"white"},e.createElement("span",{style:{position:"absolute",marginLeft:`${c||0}%`}})))),d=(0,e.useMemo)(()=>{var c;return((c=t[0])==null?void 0:c.stepPrice)>h?[{stepPrice:0},...t]:t},[t]);return e.createElement("div",{className:"progress-bar-wrap",ref:b},d&&d.map((c,v)=>{var y;const D=(c==null?void 0:c.stepPrice)||0,I=v<d.length-1?(y=d[v+1])==null?void 0:y.stepPrice:c==null?void 0:c.stepPrice,T=I===D?1:(h-D)/(I-D);return e.createElement(e.Fragment,null,e.createElement("div",{className:`point ${(c==null?void 0:c.stepPrice)===0?"point-hidden":""} ${h>=(c==null?void 0:c.stepPrice)?"active":""}`},(c==null?void 0:c.stepPrice)>0?(0,S.Sg)({price:c==null?void 0:c.stepPrice}):"",v+1===d.length&&h>=I?e.createElement(ga.Z,{getPopupContainer:()=>b.current,zIndex:10,overlayClassName:"add-on-deals-tooltip tooltip-point",placement:"top",arrowPointAtCenter:!0,visible:!0,title:(0,S.Sg)({price:h}),color:"white"},e.createElement("span",{style:{position:"absolute",marginLeft:"0%"}})):null),v+1!==d.length?T>=0&&T<=1?o(T*100,!1,!0,c==null?void 0:c.stepPrice):o(0,h>(c==null?void 0:c.stepPrice),!0,c==null?void 0:c.stepPrice):null)}))};function Ln(r){const{onTap:t=()=>{},priceBundleGroup:a}=r,{bundleEffectiveAmt:p,existBundleItemStepList:h=[],description:b}=a,o=(0,Ae.Z)(),[d,c]=(0,e.useState)(!1),[v,y]=(0,e.useState)(0),[D,I]=(0,e.useState)(0),T=(0,e.useRef)(null),Q=(0,e.useMemo)(()=>Math.min(...(h||[]).map(w=>w.stepPrice)),[h]);(0,e.useEffect)(()=>{var w,L;if(nt.j){const g=(L=(w=document.getElementsByClassName("eve-container-part-header"))==null?void 0:w[0])==null?void 0:L.clientHeight;g&&I(g)}},[o]),(0,e.useEffect)(()=>{if(nt.j){const w=()=>{const L=window.document.querySelector(".add-on-deals-container"),g=window.scrollY;g>D&&v-g<0?(c(!0),L.style.transition="all 0.2s ease-in-out",L.style.transform=`translateY(-${L.clientHeight}px)`):g<v&&(c(!1),L.style.transition="all 0.2s ease-in-out",L.style.transform="translateY(0px)"),y(g)};return window.addEventListener("scroll",w),()=>{window.removeEventListener("scroll",w)}}},[v,D]);const R=(0,e.useMemo)(()=>{const{currentBreakpoint:w}=o;return d?w==="sm"||w==="md"?0:-1:w==="sm"?D||107:w==="md"?D||118:D||152},[d,o,D]),j=()=>{t();const w=T.current;if(!w)return;const L=w.getBoundingClientRect(),g=window.innerWidth/2,k=window.innerHeight/2,G=L.left+L.width/2,z=L.top+L.height/2,x=g-G,O=k-z;w.style.setProperty("--dx",`${x}px`),w.style.setProperty("--dy",`${O}px`),w.classList.add("fly")};return!a||h.length===0?e.createElement("div",{style:{height:40}}):e.createElement("div",{className:"add-on-deals-container",ref:T,style:{top:R},onClick:j},e.createElement("div",{className:"add-on-deals-fixed"},e.createElement("div",{className:"add-on-deals-left"},e.createElement("span",{className:"left-title"}," ",(0,S.wv)({id:"trade.cart.productLabel.unlock.bundle",defaultMessage:"Unlock Add-on Deals"})),e.createElement("span",{className:"left-dec"},b||"")),e.createElement("div",{className:"add-on-deals-right"},e.createElement(En,{showTips:!0,queryLevel:h,current:p}),e.createElement("div",{className:"add-on-deals-arrow"}))))}var yn=m(77386),ha=m(72083),Ea=m(34041),Qt=m(56359),Sn=Object.defineProperty,bn=Object.defineProperties,Cn=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,kn=Object.prototype.propertyIsEnumerable,ya=(r,t,a)=>t in r?Sn(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,Pn=(r,t)=>{for(var a in t||(t={}))Nn.call(t,a)&&ya(r,a,t[a]);if(La)for(var a of La(t))kn.call(t,a)&&ya(r,a,t[a]);return r},Dn=(r,t)=>bn(r,Cn(t));const Ut={1:"#B41B19",0:"#000"},lt={1:"rgba(180, 27, 25, 0.1)",0:"rgba(245, 245, 245, 1)"},In={1:"#B41B19",0:"#8B8C8B"};function Sa(r){var t,a,p,h;const{bundleItemStepList:b,endTime:o,onTimeEnd:d,bundleEffectiveAmt:c,onProductChange:v,showCountdown:y}=r,D=(0,Ae.Z)(),I=(b||[]).reduce((x,O,N)=>O.canSelect?N:x,-1)===-1?0:(b||[]).reduce((x,O,N)=>O.canSelect?N:x,-1),[T,Q]=(0,e.useState)(((t=b[I])==null?void 0:t.key)||"0"),[R,j]=(0,e.useState)((a=b[I])!=null&&a.canSelect?Ut[1]:Ut[0]),[w,L]=(0,e.useState)((p=b[I])!=null&&p.canSelect?lt[1]:lt[0]),[g,k]=(0,e.useState)((h=b[I])!=null&&h.canSelect?lt[1]:lt[0]),G=(0,e.useMemo)(()=>(b||[]).filter(x=>x.key===T),[T,b]),z=x=>{const{stepPrice:O}=(b||[]).find(N=>N.key==x);j(Ut[(c==null?void 0:c.value)<O?"0":"1"]),L(lt[(c==null?void 0:c.value)<O?"0":"1"]),k(In[(c==null?void 0:c.value)<O?"0":"1"]),Q(x)};return e.createElement("div",{className:"add-on-deals-container",style:{"--font-color":g,"--bg-color":w,"--line-color":R}},e.createElement("div",{className:"add-on-deals-content"},e.createElement(An,{showCountdown:y,restTime:o&&o-new Date().getTime(),onTimeEnd:d}),e.createElement(wn,{currentTab:T,bundleEffectiveAmt:c,items:b,onChange:z}),e.createElement(Mn,{skuExtList:G,onProductChange:v})))}function wn(r){const{onChange:t,currentTab:a,items:p=[],bundleEffectiveAmt:h}=r,b=o=>e.createElement("div",{className:`add-on-deals-tab-item ${(h==null?void 0:h.value)>=o.stepPrice?"add-on-deals-tab-item-can":""}`},(h==null?void 0:h.value)>=o.stepPrice?e.createElement(Qt.i,{src:"assets/images/icons/discount.svg"}):null,e.createElement("span",null,"\u2265",(0,S.Sg)({price:o.stepPrice||0})));return e.createElement(ha.Z,{centered:!0,activeKey:a,onChange:t},p.map((o,d)=>e.createElement(ha.Z.TabPane,{tab:b(o,d),key:(o==null?void 0:o.key)||d}
1)))}function An(r){const{restTime:t=0,onTimeEnd:a,showCountdown:p}=r;return e.createElement("div",{className:"bundle-countdown-wrap"},p?e.createElement("div",{className:"bundle-countdown-content"},e.createElement("span",{className:"bundle-countdown-ends"},(0,S.wv)({id:"trade.cart.productLabel.bundle.endin",defaultMessage:"Ends in"})),e.createElement(yn.Z,{restTime:t,overText:"0d 0h 0m 0s",onEnd:a},({d:h,h:b,m:o,s:d})=>e.createElement("div",{className:"bundle-countdown"},e.createElement("div",{className:"bundle-countdown-time-wrapper"},e.createElement("div",{className:"bundle-countdown-time"},h),e.createElement("div",{className:"bundle-countdown-timetext"},"d")),e.createElement("span",{className:"bundle-countdown-time-interval"},":"),e.createElement("div",{className:"bundle-countdown-time-wrapper"},e.createElement("div",{className:"bundle-countdown-time"},b)),e.createElement("span",{className:"bundle-countdown-time-interval"},":"),e.createElement("div",{className:"bundle-countdown-time-wrapper"},e.createElement("div",{className:"bundle-countdown-time"},o)),e.createElement("span",{className:"bundle-countdown-time-interval"},":"),e.createElement("div",{className:"bundle-countdown-time-wrapper"},e.createElement("div",{className:"bundle-countdown-time"},d))))):null)}function Mn(r){var t;const{skuExtList:a=[],onProductChange:p}=r,h=(t=a[0])==null?void 0:t.step,b=(0,Ae.Z)(),o=(0,e.useRef)(null),[d,c]=(0,e.useState)(!1),[v,y]=(0,e.useState)(!1),[D,I]=(0,e.useState)(0),T=b.sm?350:284,Q=(0,e.useMemo)(()=>{const L=new Map;return(a||[]).forEach(g=>{const{bundleSKuItemList:k=[]}=g||{};k.forEach(G=>{const z=G==null?void 0:G.itemId;z!=null&&(L.has(z)||L.set(z,{skuList:[]}),L.get(z).skuList.push(G))})}),Array.from(L.values()).map(g=>Dn(Pn({},g),{selectedSkuList:(g.skuList||[]).find(k=>(k==null?void 0:k.cartLineSelected)===!0)}))},[a]),R=()=>{o.current&&(o.current.scrollLeft-=T);const L=o.current,g=L==null?void 0:L.scrollLeft;I(g-T>=0?g-T:0)},j=()=>{o.current&&(o.current.scrollLeft+=T);const L=o.current,g=L==null?void 0:L.scrollWidth,k=L==null?void 0:L.scrollLeft;I(k+T*2<=g?k+T:g)};(0,e.useEffect)(()=>{var L,g;D>0?c(!0):c(!1),o!=null&&o.current&&D+((L=o==null?void 0:o.current)==null?void 0:L.clientWidth)+7<((g=o==null?void 0:o.current)==null?void 0:g.scrollWidth)?y(!0):y(!1)},[D,o==null?void 0:o.current,a]);const w=(L,g,k)=>{p(L,g,k,h)};return e.createElement("div",{className:"product-list"},e.createElement("div",{className:"swiper-warp",ref:o},e.createElement("div",{className:"sku-items"},Q.map((L,g)=>{var k;return e.createElement(Tn,{onChange:w,index:g,product:L,canSelect:(k=a==null?void 0:a[0])==null?void 0:k.canSelect})}))),d&&e.createElement("div",{className:"recommand-warp-prev",onClick:R}),v&&e.createElement("div",{className:"recommand-warp-next",onClick:j}))}function Tn(r){const{product:t,canSelect:a=!1,index:p,onChange:h}=r,{currentBreakpoint:b}=(0,Ae.Z)(),o=b===M.cL.sm,{selectedSkuList:d={},skuList:c=[]}=t||{},v=d.skuId,[y,D]=(0,e.useState)(""),[I,T]=(0,e.useState)(!1),{itemImage:Q,itemName:R,salePrc:j,originalPrc:w,bundlePrice:L,itemId:g}=(d.skuId?d:c[0])||{};(0,e.useEffect)(()=>{const N=d.skuId?d:c[0];return N&&D({value:N==null?void 0:N.skuId,label:N==null?void 0:N.attributes.map(_=>_.attrVal).join("/")}),()=>{}},[t]);const k=N=>{T(!1),h&&h("add",N,g)},G=(0,e.useMemo)(()=>c.map(N=>({value:N.skuId,label:N.attributes.map(_=>_.attrVal).join("/")})),[c]),z=()=>e.createElement("div",{className:"select-down-content"},G.length>0&&G.map((N,_)=>e.createElement("div",{className:`content-item ${(y==null?void 0:y.value)===N.value?"content-item-active":""}`,onClick:Me=>k(N)},e.createElement("span",{className:(y==null?void 0:y.value)===N.value&&"selsect"},N.label),(y==null?void 0:y.value)===N.value&&e.createElement("span",{className:"g"})))),x=(0,e.useMemo)(()=>o?e.createElement(Ea.Z,{value:y,dropdownClassName:"sku-select-popup",options:G,open:I,onDropdownVisibleChange:N=>T(N),dropdownRender:()=>z()}):e.createElement(Ea.Z,{value:y,onSelect:k,dropdownClassName:"sku-select-popup",options:G}),[t,k]),O=()=>{a&&h&&h(v?"del":"add",y)};return e.createElement("div",{className:`sku-item ${v?"actived":"unactived"}`,key:`productid-${p}`,onClick:O},e.createElement("div",{className:"item-image"},e.createElement(Qt.i,{src:Q})),e.createElement("div",{className:"item-right-content"},e.createElement("div",{className:"item-title"},R),e.createElement("div",{className:"sku-options",onClick:N=>N.stopPropagation()},x),e.createElement("div",{className:"item-prices-wrap"},e.createElement("div",{className:"item-prices"},e.createElement("span",{className:"price-sale"},(0,S.Sg)({price:L||0})),(w==null?void 0:w.value)>
1L?e.createElement("span",{className:"price-origin"},(0,S.Sg)({price:(w==null?void 0:w.value)||0})):null),e.createElement(Vt.Z,{type:"cart",unitOriginAmt:w,salePrc:j,unitSaleAmt:{value:L}}))),v?e.createElement("div",{className:"sku-item-actived"},e.createElement(Qt.i,{src:"assets/images/icons/select.svg"})):null,a?null:e.createElement("div",{className:"unselectable"}))}var ba=m(71577),On=Object.defineProperty,xn=Object.defineProperties,Zn=Object.getOwnPropertyDescriptors,Ca=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Na=(r,t,a)=>t in r?On(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,Fn=(r,t)=>{for(var a in t||(t={}))$n.call(t,a)&&Na(r,a,t[a]);if(Ca)for(var a of Ca(t))Bn.call(t,a)&&Na(r,a,t[a]);return r},Rn=(r,t)=>xn(r,Zn(t));function ka(r){const{onProductFooterChange:t,bundleItemStepList:a=[],loading:p=!1}=r,b=(0,Ae.Z)().sm||!1,o=a.filter(I=>I.canSelect).map(I=>Rn(Fn({},I),{bundleSKuItemList:(I.bundleSKuItemList||[]).filter(T=>T.cartLineSelected)})),d=(0,e.useMemo)(()=>o.some(I=>{const T=I.bundleSKuItemList||[];return Array.isArray(T)&&T.length>0}),[o]),c=(0,e.useMemo)(()=>{let I=0;return o.map(T=>{const{bundleSKuItemList:Q=[]}=T;Q.map(R=>{var j;I+=(R==null?void 0:R.bundlePrice)||((j=R==null?void 0:R.salePrc)==null?void 0:j.value)||0})}),I},[o]),v=(0,e.useMemo)(()=>{let I=0;return o.map(T=>{const{bundleSKuItemList:Q=[]}=T;Q.map(R=>{var j;I+=((j=R==null?void 0:R.originalPrc)==null?void 0:j.value)||0})}),I},[o]),y=(0,e.useMemo)(()=>da()(()=>{p||!d||t&&t(o)},300,{leading:!0,trailing:!1}),[p,d,t,o]);(0,e.useEffect)(()=>()=>{y.cancel()},[y]);const D=()=>{y()};return b?e.createElement("div",{className:"add-on-deals-footer"},e.createElement(ba.Z,{loading:p,disabled:!d||p,className:`footer-right ${!d||p?"footer-right-disabled":""}`,onClick:D},(0,S.wv)({id:"design.itemDetail.addCart",defaultMessage:"Add to cart"})," ",(0,S.Sg)({price:c}))):e.createElement("div",{className:"add-on-deals-footer"},e.createElement("div",{className:"footer-left"},e.createElement("div",{className:"left-tag"},v>c?e.createElement("span",null,(0,S.wv)({id:"trade.cart.draw.footer.discount",defaultMessage:" "})," ",(0,S.Sg)({price:v-c})):null),e.createElement("div",{className:"prices"},e.createElement("span",null,(0,S.wv)({id:"trade.cart.draw.footer.totalWithTax",defaultMessage:""}),":"),e.createElement("span",{className:"sale-price"},(0,S.Sg)({price:c})),v>c?e.createElement("span",{className:"original-price"},(0,S.Sg)({price:v})):null)),e.createElement(ba.Z,{loading:p,disabled:!d||p,className:`footer-right ${!d||p?"footer-right-disabled":""}`,onClick:D},(0,S.wv)({id:"design.itemDetail.addCart",defaultMessage:"Add to cart"})))}var st=m(99053),Gn=m(76436),Vn=Object.defineProperty,jn=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,Pa=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,Da=(r,t,a)=>t in r?Vn(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,ye=(r,t)=>{for(var a in t||(t={}))Qn.call(t,a)&&Da(r,a,t[a]);if(Pa)for(var a of Pa(t))Un.call(t,a)&&Da(r,a,t[a]);return r},Se=(r,t)=>jn(r,Wn(t)),Ia=(r,t,a)=>new Promise((p,h)=>{var b=c=>{try{d(a.next(c))}catch(v){h(v)}},o=c=>{try{d(a.throw(c))}catch(v){h(v)}},d=c=>c.done?p(c.value):Promise.resolve(c.value).then(b,o);d((a=a.apply(r,t)).next())});const{confirm:Kn}=ia.Z;function wa({items:r,header:t,key:a}){return e.createElement(e.Fragment,{key:a},e.isValidElement(t)?t:null,e.createElement("div",{className:"cart-product-list"},r))}function Hn(r){return function(t,a){var p=t.cartLine.priceInfo[r].value,h=a.cartLine.priceInfo[r].value;return p-h}}function Yn(r){return function(t,a){var p=t.cartLine.priceInfo[r].value,h=a.cartLine.priceInfo[r].value;return h-p}}var zn=e.forwardRef((r,t)=>{const{cartData:a,syncCartData:p,mode:h,setMode:b,isMobile:o}=(0,e.useContext)(tt.A),{currentBreakpoint:d}=(0,Ae.Z)(),c=(0,e.useMemo)(()=>d==="xl"||d==="lg"?220:d==="md"||d==="sm"?160:220,[d]),v=(0,e.useMemo)(()=>d==="xl"||d==="lg"?262.62:d==="md"||d==="sm"?191:262.62,[d]),y=(0,e.useRef)(null),{cartGroup:D,c
1artSummary:I,shopSetting:T=null,logisticsArticle:Q={},priceBundleGroup:R={},priceGiftGroup:{existGiftItemStepList:j}={}}=a||{},{totalAmt:w}=I||{},L=w==null?void 0:w.value,{hitPlatformCampaignList:g}=D||{},k=We(),[,G]=(0,ma.Z)("Cart_ImageList_DATA"),z=Qe(),{validCartLineList:x}=k,{validCartRecommenList:O}=z,{refresh:N}=(0,Gt.Lq)(),[_,Me]=(0,e.useState)(0),[U,Te]=(0,e.useState)(!1),[ie,Be]=(0,e.useState)(0),me=(0,Ae.Z)(),Ht=me!=null&&me.xl?6:me!=null&&me.lg?4:3,Aa=220,Ne=()=>{h==="batch"&&Ue("all",null,!0),b(n=>n==="default"?"batch":"default")};(0,e.useEffect)(()=>{Ne(),G([])},[]);function Fe(n={},s="valid"){const{cartLine:l}=n,{id:i,cartLineSourceDict:E}=l||{};return{cartLineList:[l],items:[e.createElement(Wt,{existGiftItemStepList:j||[],key:i,type:s,product:l,mode:h,className:s==="valid"?"cart-line":"",handleCheckProduct:Re.bind(this,"product",i),handleDelete:Ve.bind(this,i,l),handleMoveWishlist:je.bind(this,i)})]}}function ke(n={},s="recommand"){const{cartLine:l}=n,{id:i,relatedCartLine:{id:E}}=l;return{cartLineList:[l],items:[e.createElement("div",{className:"mt-recommand"},e.createElement(mn.Z,{key:i,type:s,product:l,mode:h,className:s==="valid"?"cart-line":"",handleCheckProduct:Ge.bind(this,"product",i,E),productImageSize:c,productImageHeight:v}))]}}function Yt(n={}){let s=[];const{childGroupList:l,cartCampaign:i}=n;let E=[];return l.forEach(B=>{const{cartLine:C}=B;s.push(Se(ye({},C),{groupActivityData:i}));const{id:f,itemType:Z}=C;E.push(e.createElement(Wt,{key:f,className:"cart-product-activity-item",product:C,mode:h,handleCheckProduct:Re.bind(this,"product",f),handleDelete:Ve.bind(this,f,C),handleMoveWishlist:je.bind(this,f)}))}),E.unshift(e.createElement(Ha.Z,{key:`valid-shop-activity-${i.benefitId}`,className:"inner-spacing",groupData:n})),E=e.createElement("div",{className:"cart-line",key:i.benefitId},E),{items:E,cartLineList:s}}function rt(n={},s="valid"){const{cartLine:l,childGroupList:i=[],itemBO:E}=n,{isSelected:B}=l,C=[l],{id:f}=l||{};C[0].cartLine=i.map(P=>P.cartLine);const Z=i.map(P=>(P==null?void 0:P.cartLine)||{});return{cartLineList:C,items:e.createElement("div",{className:`cart-diy-wrap ${s==="valid"?"cart-line":""}`,key:f},e.createElement(Wt,{key:`item_${f}`,type:s,product:l,groupSkus:Z,itemBO:E,mode:h,className:"cart-product-diy-item",handleCheckProduct:Re.bind(this,"product",f),handleDelete:Ve.bind(this,f,l),handleMoveWishlist:je.bind(this,f)}))}}function St(n={},s="valid"){let l=[],i=[];const{childGroupList:E,shop:B={}}=n;return E.filter(f=>
1(f.cartLine.isSelected&&f.cartLine.cartLineSourceDict==M.be.recommend,f.cartLine.cartLineSourceDict!==M.be.recommend||f.cartLine.isSelected)).forEach(f=>{const{groupTypeDict:Z}=f;let P={items:[],cartLineList:[]};switch(Z){case M.$N.line:P=Fe(f,s);break;case M.$N.activity:P=Yt(f);break;case M.$N.item:P=rt(f);break;default:}l=l.concat(P.items),i=i.concat(P.cartLineList)}),l=wa({header:e.createElement(Ka.Z,{groupData:n,handleCheckShop:Re.bind(this,"shop",B.id)}),items:l,key:`valid-shop-item-${B.id}`}),i=i.map(f=>Se(ye({},f),{cartShop:B})),{items:l,cartLineList:i}}function Oe(n={}){var s;let l=[],i=[],E=[];const{childGroupList:B,shop:C={}}=n,f=B.filter(V=>V.cartLine.cartLineSourceDict===M.be.recommend&&!V.cartLine.isSelected),Z=(s=gn.b)==null?void 0:s.find(V=>V.price>L),J=((Z==null?void 0:Z.price)||0)-L;if(J>0&&M.P9.fullDiscountTip){const V=f.filter(F=>{var Y,ae,ce;return((ce=(ae=(Y=F==null?void 0:F.cartLine)==null?void 0:Y.priceInfo)==null?void 0:ae.actualAmt)==null?void 0:ce.value)<J}),le=f.filter(F=>{var Y,ae,ce,W,ve,Ee;return((ce=(ae=(Y=F==null?void 0:F.cartLine)==null?void 0:Y.priceInfo)==null?void 0:ae.actualAmt)==null?void 0:ce.value)>J||((Ee=(ve=(W=F==null?void 0:F.cartLine)==null?void 0:W.priceInfo)==null?void 0:ve.actualAmt)==null?void 0:Ee.value)===J}).sort(Hn("actualAmt")),te=V.sort(Yn("actualAmt"));E=E.concat(le,te)}else E=f;return E.forEach(V=>{const{groupTypeDict:pe}=V;let le={items:[],cartLineList:[]};pe===M.$N.line&&(le=ke(V,"recommand")),l=l.concat(le.items),i=i.concat(le.cartLineList)}),i=i.map(V=>Se(ye({},V),{cartShop:C})),{items:l,cartLineList:i}}function q(n){let s=[],l=[];if(n.childGroupList.length<=0)return{items:s,cartLineList:l};let i={items:[],cartLineList:[]};return i=St(n),s=s.concat(i.items),l=l.concat(i.cartLineList),n.groupTypeDict,{items:s,cartLineList:l}}function zt(n){let s=[],l=[];if(n.childGroupList.length<=0)return{items:s,cartLineList:l};let i={items:[],cartLineList:[]};return i=St(n,"pedding"),s=s.concat(i.items),{items:s,cartLineList:l}}function Xt(n){let s=[],l=[];if(n.childGroupList.length<=0)return{items:s,cartLineList:l};let i={items:[],cartLineList:[]};return i=Oe(n),s=s.concat(i.items),l=l.concat(i.cartLineList),{items:s,cartLineList:l}}function Ma(n){let s=[],l=[];if(n.childGroupList.length<=0)return{items:s,cartLineList:l};let i={items:[],cartLineList:[]};return i=Fe(n,"invalid"),s=s.concat(i.items),l=l.concat(i.cartLineList),s=wa({header:e.createElement(pn.Z,{invalidList:n}),items:s,key:"invalid-header"}),{items:s,cartLineList:l}}function We(n=D){let s=[],l=[],i=[],E=[];return((n==null?void 0:n.childGroupList)||[]).forEach(C=>{const{groupTypeDict:f,childGroupList:Z}=C;let P={items:[],cartLineList:[]};switch(f){case M.$N.valid:{P=q(C),i=i.concat(P.cartLineList);break}case M.$N.pending:{P=zt(C),i=i.concat(P.cartLineList);break}case M.$N.invalid:break;default:}s=s.concat(P.items),l=l.concat(P.cartLineList)}),{items:s,cartLineList:l,validCartLineList:i,invalidCartLineList:E}}function Qe(n=D){let s=[],l=[],i=[],E=[];return((n==null?void 0:n.childGroupList)||[]).forEach(C=>{const{groupTypeDict:f,childGroupList:Z}=C;let P={items:[],cartLineList:[]};f===M.$N.valid&&(P=Xt(C),i=i.concat(P.cartLineList)),s=s.concat(P.items),l=l.concat(P.cartLineList)}),{items:s,cartLineList:l,validCartRecommenList:i,invalidCartLineList:E}}function Re(n,s,l){const i=l.target.checked;Ue(n,s,i)}function Ue(n,s,l){const i=(0,ne.k3)(x,n,l,s),E=(0,ne.Kj)();E.cartLineList=i.map(({cartLineId:B,isSelected:C,cartLineTypeDict:f,shopId:Z,cartLineSourceDict:P})=>({id:B,isSelected:C,cartLineTypeDict:f,cartLineSourceDict:P,shop:{id:Z}})),!(n==="all"&&!E.cartLineList.length)&&p(ge.IZ.bind(this,E))}function Ge(n,s,l,i){const E=x.filter(P=>P.id===l)[0],{isSelected:B,sku:C}=E||{},{item:{itemName:f}}=C;if(!B){et.ZP.warning((0,S.wv)({id:"trade.cart.modal.recommendselectTip",defaultMessage:"\u8BF7\u9009\u62E9\u5BF9\u5E94\u7684\u4E3B\u5546\u54C1"})+` ${f}`);return}const Z=i.target.checked||!0;Jt(n,s,Z)}function Jt(n,s,l){const i=(0,ne.k3)(O,n,l,s),E=(0,ne.Kj)();if(E.cartLineList=i.map(({cartLineId:C,isSelected:f,cartLineTypeDict:Z,shopId:P,cartLineSourceDict:J})=>({id:C,isSelected:f,cartLineTypeDict:Z,cartLineSourceDict:J,shop:{id:P}})),n==="all"&&!E.cartLineList.length)return;const B=()=>{et.ZP.success((0,S.wv)({id:"trade.cart.modal.recommendSuccess",defaultMessage:"success"}))};p(ge.IZ.bind(this,E),B)}function Ve(n,s){var l,i,E,B,C,f,Z,P,J,V,pe,le,te,F,Y;
1const ae=(0,ne.Kj)(),ce=it(n);if(!ce.length){et.ZP.warning((0,S.wv)({id:"trade.cart.modal.selectTip",defaultMessage:"\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5546\u54C1"}));return}ae.cartLineList=ce;const W=x.filter(ze=>ze.id===n),ve=[];(l=W==null?void 0:W[0])!=null&&l.isDiy?ve.push({item_id:(E=(i=W==null?void 0:W[0])==null?void 0:i.item)==null?void 0:E.id,sku_price:+`${(f=(C=(B=W==null?void 0:W[0])==null?void 0:B.priceInfo)==null?void 0:C.actualAmt)==null?void 0:f.value}`,item_quantity:(Z=W==null?void 0:W[0])==null?void 0:Z.skuQty,line_group_type_dict:"DIY"}):ve.push({item_id:(J=(P=W==null?void 0:W[0])==null?void 0:P.item)==null?void 0:J.id,sku_id:(pe=(V=W==null?void 0:W[0])==null?void 0:V.sku)==null?void 0:pe.id,sku_price:+`${(F=(te=(le=W==null?void 0:W[0])==null?void 0:le.priceInfo)==null?void 0:te.actualAmt)==null?void 0:F.value}`,sku_quantity:(Y=W==null?void 0:W[0])==null?void 0:Y.skuQty,line_group_type_dict:"NORMAL"});const Ee={sku_list:ve,scene:"cart_remove"};(0,$t.XW)("removeFromCart",Ee),s.cartLineSourceDict==="ITEM_RECOMMEND"?Ue("product",n,!1):p(ge.F2.bind(this,ae))}function je(n){const s=(0,ne.Kj)(),l=it(n);if(!l.length){et.ZP.warning((0,S.wv)({id:"trade.cart.modal.selectTip",defaultMessage:"\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5546\u54C1"}));return}s.cartLineList=l,(0,Ie.WD)((0,S.wv)({id:"trade.cart.modal.wishlistTitle",defaultMessage:"\u79FB\u5230\u6536\u85CF"}),(0,S.wv)({id:"trade.cart.modal.wishlistContent",defaultMessage:"\u79FB\u52A8\u540E\u9009\u4E2D\u5546\u54C1\u5C06\u4E0D\u5728\u8D2D\u7269\u8F66\u5C55\u793A"}),()=>{p(ge.ol.bind(this,s))},{isMobile:o},"error")}function it(n){return typeof n=="number"?[{id:n}]:x.filter(s=>s.isSelected).map(({id:s})=>({id:s}))}function _t(n=a){const{cartGroup:s}=n||{},{validCartLineList:l}=We(s),{validCartRecommenList:i}=Qe(s),E=[...l,...i],B=[];let C=0;return E==null||E.map(f=>{var Z,P,J,V,pe,le,te,F,Y;const{isSelected:ae,isDiy:ce}=f;ae&&(ce?B.push({item_id:(Z=f==null?void 0:f.item)==null?void 0:Z.id,item_price:+`${(J=(P=f==null?void 0:f.priceInfo)==null?void 0:P.unitSaleAmt)==null?void 0:J.value}`,item_quantity:f.skuQty,line_group_type_dict:"DIY"}):B.push({item_id:(V=f==null?void 0:f.item)==null?void 0:V.id,sku_id:(pe=f.sku)==null?void 0:pe.id,sku_price:+`${(te=(le=f==null?void 0:f.priceInfo)==null?void 0:le.unitSaleAmt)==null?void 0:te.value}`,sku_quantity:f.skuQty,line_group_type_dict:"NORMAL"}),C=C+ +`${(Y=(F=f==null?void 0:f.priceInfo)==null?void 0:F.unitSaleAmt)==null?void 0:Y.value}`*f.skuQty)}),(0,st.po)("seaChartTrackData_Checkout",B),{total_amount:C,sku_list:B,scene:"cart_check"}}function qt(n=a){const s=[];let l={},i="bbc";const{cartGroup:E}=n||{},{validCartLineList:B}=We(E),{validCartRecommenList:C}=Qe(E);return[...B,...C].forEach(Z=>{var P;const{isSelected:J,itemPromotion:V,id:pe,skuQty:le,cartLineSourceDict:te,cartShop:F,noUseShopCampaigns:Y,noUsePlatformCampaigns:ae,matchShopCampaign:ce,matchPlatformCampaign:W,bundledCode:ve,isDiy:Ee,cartLineBuyLimit:ze,insurance:xa}=Z,{id:Za}=(Z==null?void 0:Z.item)||{},{id:la,item:Dt,skuShopRelationBO:Xe}=(Z==null?void 0:Z.sku)||{},{id:sa,companyEntity:It}=F||{},{id:wt}=(F==null?void 0:F.entity)||{},{id:At}=It||{},{insuranceId:pt}=xa||{},$a=(0,Ie.td)(Dt),vt=te&&te!==M.be.normal&&te!==M.be.recommend;J&&$a&&(i="cbe");const{maxQty:Mt}=ze||{};if(J||vt){const se={cartLineId:pe,item:{id:Za},sku:{id:la},tradeQty:le,orderedQty:le,shop:{id:sa,entity:{id:wt},companyEntity:{id:At}},seller:{id:At},skuShopRelation:{id:Xe==null?void 0:Xe.id},bundledCode:ve,insuranceId:pt,cartLineSourceDict:te};V&&(se.campaignId=V.campaignId,se.piscesBenefitId=V.benefitId),vt&&(se.__trantorExtendFields={tradeContactOrderLineBusinessType:M.fs[te]||null});const{campaignId:ft,benefitId:Je,linkId:gt}=(0,ne.xH)(ce)||{};Y?se.noUseShopCampaigns=!0:ft!=null&&(te===M.be.gift&&(se.giftSendType=oa()(Z,"matchShopCampaign.discount.noCalculatedResult.giftSendType")),se.chosenShopBenefit={campaignId:ft,benefitId:Je,linkId:gt});const{campaignId:De,benefitId:Tt,linkId:Ot}=(0,ne.xH)(W)||{};ae?se.noUsePlatformCampaigns=!0:De!=null&&(te===M.be.gift&&(se.giftSendType=oa()(Z,"matchPlatformCampaign.discount.noCalculatedResult.giftSendType")),se.chosenPlatformBenefit={campaignId:De,benefitId:Tt,linkId:Ot}),Ee&&(se.diySkuList=(P=Z==null?void 0:Z.cartLine)==null?void 0:P.map(Ce=>{var xt,ht;return(0,ne.Tn)(Ce.invalidTypeDict)&&(l={type:"warning",message:(0,S.wv)({id:"trade.cart.modal.invalidTip",defaultMessage:"\u90E8\u5206\u5185\u5BB9\u5DF2\u5931\u6548\uFF0C\u9700\u8981\u66F4\u6362\u914D\u7F6E"})}),{item:{id:Ce.item.id},sku:{id:Ce.sku.id},tradeQty:Ce.skuQty,orderedQty:Ce.skuQty,skuShopRelation:{id:(ht=(xt=Ce==null?void 0:Ce.sku)==null?void 0:xt.skuShopRelationBO)==null?void 0:ht.id},itemBusinessTypeDict:Ce.isMainItem?"DIY_MASTER":"DIY_SLAVE"}})),le>Mt&&(l={type:"confirm",message:(0,S.wv)({id:"trade.cart.modal.avaliable",defaultMessage:"Some products are not avaliable, please follow the red suggestion under products to modify and re-order"})}),s.push(se)}}),{tradeType:i,orderLineList:s,orderSource:M.ZL.cart,locationList:(0,Ie.CZ)((0,Ie.q_)()),tipMessage:l.type?l:null}}function ea(n=a,s,l){const{cartSummary:i={}}=n||{},{needReconfirm:E}=i;function B(){return Ia(this,null,function*(){const C=qt(n),f=_t(n);if((0,$t.XW)("checkout",f),C.tipMessage){C.tipMessage.type==="warning"&&et.ZP.warning(C.tipMessage.message),C.tipMessage.type==="confirm"&&Kn({title:(0,S.wv)({id:"trade.cart.modal.avaliableTitle",defaultMessage:"You have expired items"}
1),icon:e.createElement(ca.Z,null),content:C.tipMessage.message});return}delete C.tipMessage,l&&(C.pricingIntent=l),yield N("preOrderCommonData",{redirectParams:C}),Qa.mW.push("/checkout",{from:"cart"})})}E?(0,Ie.WD)(e.createElement(H.Z,{id:"trade.cart.modal.lackExchangeContent",defaultMessage:"\u5DF2\u9009\u62E9\u7684\u5546\u54C1\u6570\u91CF\u5C0F\u4E8E\u53EF\u4EAB\u53D7\u7684\u6570\u91CF\uFF0C\u662F\u5426\u7EE7\u7EED\u524D\u5F80\u7ED3\u7B97"}),null,B,{okText:e.createElement(H.Z,{id:"common.action.confirm",defaultMessage:"\u786E\u5B9A"}),cancelText:e.createElement(H.Z,{id:"common.action.cancel",defaultMessage:"\u53D6\u6D88"})}):B()}(0,e.useImperativeHandle)(t,()=>({handleDelete:Ve,handleMoveWishlist:je,handleChangeMode:Ne}));const{childGroupList:bt}=D||{},Ct=bt.find(n=>n.groupTypeDict==="VALID"),Ke=x.filter(n=>n.isEnabled),He=x.filter(n=>n.isSelected),ta=O.filter(n=>n.isEnabled),{selectedLineCnt:ct}=Ct,ot=Ke.length>0,dt=ta.length>0?ot&&Ke.length===He.length:ot&&Ke.length===ct,Nt={dots:!0,speed:500,infinite:!1,dotsClass:"slick-dots",slidesToShow:3,slidesToScroll:3,arrows:!1,responsive:[{breakpoint:1024,settings:{slidesToShow:2,slidesToScroll:2,infinite:!1,dots:!1}}]},he=(n,s)=>{n.preventDefault(),s==="right"&&ie<O.length-Ht?Be(ie+1):s==="left"&&ie>0&&Be(ie-1)},xe=(0,e.useMemo)(()=>{if(d==="xl")return 238;if(d==="lg")return 238;if(d==="md")return 238;if(d==="sm")return 238},[d]),[Ta,na]=(0,e.useState)(nt.j?document.documentElement.clientWidth:0),[Pe,ut]=(0,e.useState)(!1),[ue,X]=(0,e.useState)(!1);(0,e.useEffect)(()=>{if(nt.j){const n=()=>{window.requestAnimationFrame(()=>{na(document.documentElement.clientWidth)})};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}}},[nt.j]);const Ye=()=>{y.current&&(y.current.scrollLeft-=xe);const n=y.current,s=n==null?void 0:n.scrollLeft;Me(s-xe>0?s-xe:0)},ee=()=>{y.current&&(y.current.scrollLeft+=xe);const n=y.current,s=n==null?void 0:n.scrollWidth,l=n==null?void 0:n.scrollLeft;Me(l+xe<s?l+xe:s)};(0,e.useEffect)(()=>{var n,s;_>0?ut(!0):ut(!1),y!=null&&y.current&&_+((n=y==null?void 0:y.current)==null?void 0:n.clientWidth)<((s=y==null?void 0:y.current)==null?void 0:s.scrollWidth)?X(!0):X(!1)},[_,y==null?void 0:y.current,d]);const{showDialog:Ze,bundleEffectiveAmt:kt}=R,{value:Pt}=kt||{},[Oa,be]=(0,e.useState)(!1);(0,e.useEffect)(()=>{var n,s,l;const i=typeof performance!="undefined"&&((n=performance.getEntriesByType)==null?void 0:n.call(performance,"navigation")[0]),E=(l=i==null?void 0:i.type)!=null?l:((s=performance.navigation)==null?void 0:s.type)===1?"reload":"navigate";return E==="reload"||E==="navigate"?((0,st.G)("cart-bunde")!=="1"&&((0,st.t_)("cart-bunde","1"),setTimeout(()=>{be(!0)},100)),be(!!Ze)):((0,st.t_)("cart-bunde","1"),be(!0)),()=>{}},[Ze,Pt]),(0,e.useEffect)(()=>()=>{(0,st.VV)("cart-bunde")},[]);const mt=()=>{be(!1)};return e.createElement(e.Fragment,null,e.createElement("div",{className:"cart-detail-container"},e.createElement("div",{className:`cart-context ${h!=="default"?"batch-mode":""}`},e.createElement("div",{className:"cart-context-left"},e.createElement(Ln,{onTap:()=>be(!0),priceBundleGroup:R}),e.createElement("div",{className:"cart-header"},e.createElement("h1",{className:"cart-header-title common-bold-font"},e.createElement(H.Z,{id:"trade.cart.myCart",defaultMessage:"My a Cart"}))),e.createElement("div",{className:"cart-detail-time-wrap"},e.createElement("div",{className:"cart-delivery-time-msg-wrap"},e.createElement(fa.Z,{className:"cart-delivery-time-msg__icon"}),e.createElement("span",{style:{maxWidth:"calc(100% - 28px)"}},e.createElement(H.Z,{id:"trade.cart.deliveryTimeMsg1",defaultMessage:"Lieferzeit: "}),e.createElement("span",{className:"cart-delivery-time-msg__text"},"\xA0",e.createElement(H.Z,{id:"trade.cart.deliveryTimeMsg2",defaultMessage:"2 bis 6 Werktage "}),"\xA0"),e.createElement(H.Z,{id:"trade.cart.deliveryTimeMsg3",defaultMessage:"(au\xDFer der Vorverkaufsware)"}),(Q==null?void 0:Q.id)&&e.createElement(ca.Z,{style:{marginLeft:"4px",cursor:"pointer"},onClick:()=>{Te(!0)}})),(Q==null?void 0:Q.id)&&U&&e.createElement(hn.Z,{id:Q.id,setLogisticsInfoModal:Te,mask:!0}
1)),e.createElement("div",{className:"gift-wrap"},e.createElement(Gn.Z,{cartData:a,validCartLineList:x,validCartRecommenList:O}))),e.createElement(fn.Z,{key:"cart-platform-promotion-list",promotionList:g}),k.items),e.createElement("div",{className:"cart-context-right"},e.createElement(vn.Z,{validCartLineList:x,validCartRecommenList:O,selectedItemQty:He.length,handleCheckAll:Re.bind(void 0,"all",null),handleDelete:Ve,handleMoveWishlist:je,handleSubmitCart:ea}))),O.length>0&&o?e.createElement("div",{className:"mobile-maylike-line"}):null),O.length>0?e.createElement("div",{className:"cart-context cart-valid-cart-recommen-list",style:{flexDirection:"column"}},e.createElement("div",{className:"m-cart-header",id:"recommend-header"},e.createElement("p",{className:"recommand-title"},e.createElement(H.Z,{id:"trade.cart.miniRecomendnewTitle",defaultMessage:"\u4FBF\u5B9C\u70B9\u5C31\u4E70\u5427"}))),e.createElement("div",{className:"recommand-warp"},e.createElement("div",{className:"recommand-warp-flex",ref:y},z.items),!o&&Pe&&e.createElement("div",{className:"recommand-warp-prev",onClick:Ye}),!o&&ue&&e.createElement("div",{className:"recommand-warp-next",onClick:ee}))):null,e.createElement(Xn,{onTimeEnd:mt,visible:Oa,setVisible:be,priceBundleGroup:R}))});function Xn(r){const{visible:t,setVisible:a,priceBundleGroup:p,onTimeEnd:h}=r,{bundleEffectiveAmt:b,existBundleItemStepList:o=[],readyBundleItemStepList:d=[],readyToSelectCount:c,endTime:v,showCountdown:y=0}=p,{refreshCartData:D}=(0,e.useContext)(tt.A),I=(0,Ae.Z)(),T=I.sm||!1,Q=I.md||!1,R=()=>(o==null?void 0:o.length)>0?o.map(O=>{const N=d.find(_=>_.step===O.step);return N?Se(ye({},N),{canSelect:!0,key:String(N.step)}):Se(ye({},O),{canSelect:!1,key:String(O.step)})})||[]:[],[j,w]=(0,e.useState)(R()),[L,g]=(0,e.useState)(!1);(0,e.useEffect)(()=>{if((o==null?void 0:o.length)>0){const x=o.map(O=>{const N=d.find(_=>_.step===O.step);return N?Se(ye({},N),{canSelect:!0,key:String(N.step)}):Se(ye({},O),{canSelect:!1,key:String(O.step)})});w(x)}return()=>{}},[o,d]);const k=()=>{const x=document.querySelector(".add-on-deals-container");x&&(x.classList.remove("fly"),a(!1))},G=(x,O,N,_)=>{const Me=(O==null?void 0:O.value)||O,Te=[...j].map(ie=>{var Be;return ie.step===_?Se(ye({},ie),{bundleSKuItemList:(Be=ie.bundleSKuItemList)==null?void 0:Be.map(me=>me.skuId===Me?Se(ye({},me),{cartLineSelected:x!=="del"}):me.itemId===N?Se(ye({},me),{cartLineSelected:!1}):me)}):ie});w(Te||[])},z=x=>Ia(null,null,function*(){if(L||!((x==null?void 0:x.length)>0))return;const O=x.map(N=>{const{bundleSKuItemList:_=[],step:Me}=N;return _.map(U=>{var Te,ie;return{seller:{},sku:{id:U==null?void 0:U.skuId},item:{id:U==null?void 0:U.itemId,outerId:"",name:U==null?void 0:U.itemName,mainImage:U==null?void 0:U.itemImage},shop:{},skuQty:1,snapshotPrc:{value:(U==null?void 0:U.bundlePrice)||((Te=U==null?void 0:U.salePrc)==null?void 0:Te.value),originPrice:(ie=U==null?void 0:U.originalPrc)==null?void 0:ie.value},cartLineTypeDict:"NORMAL_SALE_B2C",cartLinePirceType:"NOMARL",cartLineSourceDict:"CART_BUNDLE",bundleActivityStep:Me}})}).flat();g(!0);try{yield(0,ge.Du)(O),D(),k()}finally{g(!1)}});return(0,e.useEffect)(()=>{(I.sm||I.md)&&requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))})},[I]),!p||o.length===0?null:T||Q?e.createElement(Wa.Z,{placement:"bottom",onClose:()=>k(),visible:t,className:"eu-comment-drawer-wrap-new add-on-deals-modal",closable:!1,height:Q?660:580,extra:e.createElement(Bt.Z,{onClick:()=>k()}),footer:e.createElement(ka,{onProductFooterChange:z,bundleItemStepList:j,loading:L})},e.createElement("div",null,e.createElement("div",{className:"drawer-close-icon"},e.createElement(Bt.Z,{onClick:()=>k()})),e.createElement("div",{className:"drawer-header-title"},(0,S.wv)({id:"trade.cart.productLabel.unlock.bundle",defaultMessage:"Unlock Add-on Deals"})),e.createElement(Sa,{showCountdown:y,onTimeEnd:h,onProductChange:G,bundleEffectiveAmt:b,bundleItemStepList:j,endTime:v}))):e.createElement(e.Fragment,null,e.createElement(ia.Z,{visible:t,width:1e3,wrapClassName:"eu-comment-modal-wrap-new add-on-deals-modal",onOk:()=>k(),onCancel:()=>k(),closeIcon:e.createElement(Bt.Z,null),destroyOnClose:!0,footer:e.createElement(ka,{onProductFooterChange:z,bundleItemStepList:j,loading:L}),title:e.createElement("div",null,(0,S.wv)({id:"trade.cart.productLabel.unlock.bundle",defaultMessage:"Unlock Add-on Deals"}))},e.createElement(Sa,{showCountdown:y,onTimeEnd:h,onProductChange:G,bundleEffectiveAmt:b,bundleItemStepList:j,endTime:v})))}var Jn=m(36066);function Kt(r){return r==null?void 0:r.find(t=>{var a,p;return(a=t.childGroupList)!=null&&a.length?Kt(t.childGroupList):((p=t.cartLine)==null?void 0:p.invalidTypeDict)===M.ZA.restricetedPurchass})}function _n(r){var t,a;const{cartData:p,loading:h,isMobile:b}=(0,e.useContext)(tt.A),{cartGroup:{childGroupList:o}={},cartGroup:d}=p||{},c=o==null?void 0:o.find(L=>L.groupTypeDict==="VALID"),v=o==null?void 0:o.find(L=>L.groupTypeDict==="INVALID"),{selectedLineCnt:y}=c||{},D=!d||!d.childGroupList||(d==null?void 0:d.totalLineCnt)<=0,I=y>0,[T,Q]=(0,e.useState)(((a=(t=r==null?void 0:r.common)==null?void 0:t.user)==null?void 0:a.isTourist)||!1),R=e.createRef(),j=Kt((c==null?void 0:c.childGroupList)||[])||Kt((v==null?void 0:v.childGroupList)||[]),w=()=>b?e.createElement(e.Fragment,null,e.createElement(ja.Z,{gradient:!1,className:"cart-login-tip-marquee"},e.createElement(H.Z,{id:"trade.cart.loginTip",defaultMessage:"Some products in carts can\u2018t be purchased without login."})),e.createElement(yt.r,{className:"cart-tip-link",to:"/login"},e.createElement(H.Z,{id:"trade.cart.loginNow",defaultMessage:"login now"}))):e.createElement(e.Fragment,null,e.createElement(H.Z,{id:"trade.cart.loginTip",defaultMessage:"Some products in carts can\u2018t be purchased without login."}),e.createElement(yt.r,{className:"cart-tip-link",to:"/login"},e.createElement(H.Z,{id:"trade.cart.loginNow",defaultMessage:"login now"})));return(0,e.useEffect)(()=>{p.buyerId&&(0,$t.L9)("viewCart",p)},[p]),e.createElement("div",{className:`${b?"comp-cart-m comp-cart":"comp-cart"}`},e.createElement(Ga.Z,{spinning:h,delay:M.Jl},D?e.createElement(e.Fragment,null,d&&e.createElement(Jn.Z,null),!d&&e.createElement("div",{className:"cart-loading-content"})):e.createElement(e.Fragment,null,T&&j&&e.createElement(Va.Z,{banner:!0,closable:!0,className:"cart-login-tip-wrap",icon:e.createElement(fa.Z,{type:"icon-warning-fill",className:"cart-login-tip-fill"}),message:w(),onClose:()=>Q(!1)}),e.createElement(zn,{ref:R,hasCheckedLine:I}))))}var qn=(0,Gt.M2)(_n);function el(){return e.createElement(Ra.Z,{title:(0,S.wv)({id:"trade.cart.pageTitle",defaultMessage:"\u8D2D\u7269\u8F66"}),hasProgressBar:!1},e.createElement(tt.Z,null,e.createElement(qn,null)))}})}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.