yt-uikit 0.7.421-minor-css.0 → 0.7.421-minor-css.1
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/esm/index.js +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1341,7 +1341,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
1341
1341
|
padding: 2px 0px 4px 0px;
|
|
1342
1342
|
border-bottom-left-radius: 8px;
|
|
1343
1343
|
border-bottom-right-radius: 8px;
|
|
1344
|
-
`,ti=({imageUrl:e,overlayText:n,themeColor:r,themeTextColor:o})=>t.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},t.createElement("img",{src:e,alt:"Free Gift",style:{width:"100%",height:"100%",objectFit:"fill",borderRadius:"8px"}}),t.createElement(ei,{$themeColor:r,$themeTextColor:o},n)),ni=({product:e,handleDecrement:n,handleIncrement:r,removeCartItem:a,addCartItem:i,isDev:s,themeColor:d,primaryTextColor:p,secondaryTextColor:u,tertiaryColor:m,tertiaryTextColor:f,showQtySelector:g=!0,themeTextColor:h,showEditOptionOnProducts:x,percentageOff:y,tags:b,removeFreebieFromCart:v,showDeleteOnFreebies:w,imageAspectSelector:C,cartComponentsCornerType:k,cartComponentsCornerRadius:E,backgroundSubdued:T,backgroundColor:S,showDiscountOnMRP:$})=>{const{setLoading:B}=xn(),z=rn(ln),[I,N]=an(Sa),[D,_]=c(!1),P=on(yn),A=Da(),O=!!e.properties?._isYtFreebie&&"number"==typeof e.final_line_price&&e.final_line_price>0&&"number"==typeof e.original_line_price&&e.original_line_price>e.final_line_price;l(()=>{function e(){const e=window.innerWidth;_(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const F=o(null),[M,R]=c(0);l(()=>{let e=null;return F.current&&(e=new ResizeObserver(e=>{e[0]&&R(e[0].contentRect.width)}),e.observe(F.current)),()=>{e&&e.disconnect()}},[]),l(()=>{const e=setTimeout(()=>{F.current&&R(F.current.offsetWidth)},100);return()=>clearTimeout(e)},[]);const L=Nn(e.product_title,M<200?100:120,M,"","16px"),j=()=>{if(e.line_level_discount_allocations&&e.line_level_discount_allocations.length>0&&e.line_level_discount_allocations[0].discount_application){const t=e.line_level_discount_allocations[0].discount_application.title,n=Ln(t);switch(e.line_level_discount_allocations[0].discount_application.value_type){case"amount":return`${n})`;case"percentage":case"fixed_amount":return n;default:return""}}};let V=Sn(z,z?.currency);const W=["__Added with Frequently Bought Together button","_has_gpo","_y"],H="66839544050"===window?.ytapp?.storeId;function q(e,t){e=e.replace(/^#/,"");return`rgba(${parseInt(e.substring(0,2),16)}, ${parseInt(e.substring(2,4),16)}, ${parseInt(e.substring(4,6),16)}, ${t})`}const U=e?.options_with_values&&e.options_with_values.filter(e=>"Title"!==e.name).length>0||e?.properties&&Object.keys(e.properties).filter(e=>!W.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).length>0||x,Q=M?70/M*100:100,G=j(),Y=G&&(G.length>25||!D)?Nn(G,Q,M,"","10px"):G,Z=(()=>{const t=e?.properties?._bundleImage;if(!t||"string"!=typeof t)return;const n=t.trim();return n.length>0?n:void 0})(),X=!!Z,K=(()=>{const t=e?.properties?.itemsInBundle;return"string"!=typeof t?[]:t.split(/,\s*/).map(e=>e.trim()).filter(e=>e.length>0)})(),J=(()=>{const t=e?.properties?._bundleItems;if("string"==typeof t&&t.trim().length>0)try{const e=JSON.parse(t);if(Array.isArray(e)){const t=e.reduce((e,t)=>{const n=Number(t?.quantity);return e+(isNaN(n)?0:n)},0);if(t>0)return t}}catch(e){}let n=0;for(const e of K){const t=e.match(/^(\d+)\s*x\s*/i);n+=t?parseInt(t[1],10)||0:1}return n})(),[ee,te]=c(!0),ne=D?250:190;return t.createElement(Ra,{$hasVariantInfo:U||X,$backgroundColor:S,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"0 1rem"}},t.createElement(ja,{$isBundle:X},t.createElement(La,{className:"yt-cart-product-image",$imageAspectSelector:C,$isBundle:X},g?t.createElement("img",{style:{height:"100%",width:"100%",opacity:0===e.quantity?.5:1},src:Rn(Z??e.image,150,85,"webp"),alt:(e=>e.title?`Product image - ${e.title}`:"Product image")(e),loading:"lazy"}):t.createElement(ti,{imageUrl:Rn(Z??e.image??e?.featuredImage?.url??"/placeholder.svg",150,85,"webp"),overlayText:O||y?"Special Offer":"Free Gift",themeColor:d,themeTextColor:h})),(g||e?.quantity>1)&&t.createElement(Va,null,e.quantity)),t.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1,padding:"4px 0"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"flex-start"}},t.createElement(Ma,{$themeColor:d,$primaryTextColor:p,href:`${window.location.origin}${e.url}`,ref:F},L),t.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement("div",{style:{marginLeft:"3px",display:"flex",alignItems:"center",justifyContent:"center"}},(g||w)&&t.createElement(qa,{onClick:g?async()=>{B&&B(!0,!0);try{a&&await a(e.key)}catch(e){}B&&B(!1,!1)}:async()=>{B&&B(!0,!0);try{v&&await v(e.key)}catch(e){}B&&B(!1,!1)}},t.createElement(Wa,null,t.createElement(ft,{className:"outline"}),t.createElement(mt,{className:"filled"})))))),X?t.createElement("div",{style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},t.createElement("div",{role:"button",onClick:()=>te(!ee),style:{display:"inline-flex",alignItems:"center",gap:"8px",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"4px 6px",width:"fit-content",cursor:"pointer",userSelect:"none",fontSize:"12px",fontWeight:600,color:u??"#1a1a1a"}},t.createElement("span",null,`Contain ${J} Items`),ee?t.createElement(tt,null):t.createElement(et,null)),ee&&K.length>0&&t.createElement("div",{style:{marginTop:"4px",backgroundColor:"#F8F9FA",borderRadius:"8px",padding:"8px 10px",border:"1px solid rgba(0,0,0,0.06)",maxWidth:ne,width:"fit-content"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"4px",maxWidth:ne}},K.map((e,n)=>t.createElement("div",{key:`${e}-${n}`,style:{color:u??"#1a1a1a",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:ne},title:e},e))))):U&&t.createElement("div",{style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},t.createElement(_a,null,e?.options_with_values?.filter(e=>"Title"!==e.name).map(e=>{const n=A?.options?.find(t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase()),r=Na(n,e.value);return"color"===n?.type?.toLowerCase()&&r?t.createElement(Pa,{key:e.name,$colorValue:r.value,style:{display:"block"}}):"image"===n?.type?.toLowerCase()&&r?t.createElement(Aa,{key:e.name,src:Rn(r.value,36,85,"webp"),alt:e.value}):e.value.length>15||e.value.includes("#")?null:t.createElement(Ha,{className:"yt-cart-variant-text",key:e.name,$secondaryTextColor:u,style:{display:"flex",alignItems:"center",borderRadius:"6px",border:"1px solid rgb(117 117 117 / 50%)",padding:"1px 3px"}},e.value)}),e?.properties&&Object.entries(e.properties).filter(([e])=>!W.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).map(([e,n])=>{const r=String(n);return r.includes("#")||(A?.options??[]).some(t=>t.name.trim().toLowerCase()===e.trim().toLowerCase()&&t.values.some(e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()))?null:t.createElement(Ha,{key:e,$secondaryTextColor:u,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px"}},r)}),x&&!e?.product_has_only_default_variant&&t.createElement(qa,{onClick:()=>{const t=!!e.properties?._isYtFreebie;let n;if(t){const t=e.properties?._yt_allowed_variants;if(t&&"string"==typeof t)try{n=JSON.parse(t)}catch(r){console.error(`ProductCard: Failed to parse _yt_allowed_variants for ${e.key}:`,t,r),n=[String(e.variant_id)]}else console.warn(`ProductCard: No allowed variants property found for freebie ${e.key}. Defaulting to current variant.`),n=[String(e.variant_id)]}P({open:!0,variantId:String(e.variant_id),quantity:e.quantity,handle:e.handle,lineItemKey:e.key,freebieSelection:t,productId:String(e.product_id),allowedVariantIds:n})},style:{display:"flex",alignItems:"center"}},t.createElement(go,null))),e?.options_with_values?.filter(e=>"Title"!==e.name&&e.value.length>15).map(e=>{const n=A?.options?.find(t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase());if(Na(n,e.value)&&["color","image"].includes((n?.type??"").toLowerCase()))return null;if(e.value.includes("#"))return null;const r=D?e.value:Nn(e.value,M?120/M*100:100,M,"","10px");return t.createElement(Ha,{key:e.name,$secondaryTextColor:u,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px",width:"fit-content"}},r)})),t.createElement(Ua,null,t.createElement("div",{style:{display:"flex",flexDirection:D?"row":"column",alignItems:D?"center":"flex-start",gap:D?"0px":"4px"}},t.createElement(Qa,null,X?t.createElement(t.Fragment,null,t.createElement(Ga,{$primaryTextColor:p},V,Fn(Number(e?.properties?._finalBundlePrice)??0)),e?.properties?._originalBundlePrice&&t.createElement(Ya,null,V,Fn(Number(e?.properties?._originalBundlePrice)??0))):t.createElement(Ga,{$primaryTextColor:p},0===En(e.final_line_price,z?.currency)?t.createElement(Ja,{$primaryColor:p,$themeColor:d,$backgroundSubdued:T},"FREE"):t.createElement(t.Fragment,null,V,Fn(En(e.final_line_price,z?.currency)))),(e.compare_at_price&&Number(e.compare_at_price)*e.quantity>Number(e.final_line_price)||!e.compare_at_price&&j()&&e.original_line_price)&&$&&t.createElement(Ya,null,V,e.compare_at_price?Fn(En(Number(e.compare_at_price)*e.quantity,z?.currency)):Fn(En(e.original_line_price,z?.currency))),D&&(g||O)&&j()&&t.createElement(Xa,{$tertiaryColor:m},t.createElement(mo,{size:14,color:f}),t.createElement(Ka,{$tertiaryTextColor:f},Y))),!D&&(g||O)&&j()&&t.createElement(Xa,{$tertiaryColor:m},t.createElement(mo,{size:12,color:f}),t.createElement(Ka,{$tertiaryTextColor:f},Y)),b&&b.length>0&&H&&t.createElement("div",{style:{display:"flex",flexWrap:"wrap",columnGap:"2px",rowGap:"2px",marginTop:D?"0px":"4px"}},b.filter(e=>"Delhi-NCR"===e).map(e=>t.createElement("span",{key:e,style:{fontSize:"10px",padding:"3px 8px",backgroundColor:q(d,.15),color:d,borderRadius:"4px"}},"Delhi-NCR"===e?"Only For Delhi NCR":e)))),t.createElement(Za,null,g?t.createElement(Ta,{handleItemQuantityDecrement:async()=>{B&&B(!0,!0);try{n&&await n(e.key,e.quantity-1)}catch(e){}B&&B(!1,!1)},handleItemQuantityIncrement:async()=>{B&&B(!0,!0);try{if(r){-1===await r(e.id,e.quantity+1,e.properties)&&(N(e?.key),setTimeout(()=>N(void 0),3e3))}}catch(e){}B&&B(!1,!1)},value:e.quantity,isDev:s,themeColor:d,cartComponentsCornerType:k,cartComponentsCornerRadius:E,backgroundSubdued:T}):t.createElement("span",{style:{padding:"2px 8px",fontSize:"10px",backgroundColor:m,color:f??"#000",borderRadius:"4px"}},O&&e.original_line_price?`${((e.original_line_price-e.final_line_price)/e.original_line_price*100).toFixed(0)}% off`:y&&e?.properties?._isYtFreebie?`${y}% Off`:"Freebie"))),I&&I===e?.key&&t.createElement("span",{style:{fontSize:"10px",color:"red",marginTop:"4px"}},"⚠️You've reached the maximum quantity for this item")))};function ri(e){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"},child:[]}]})(e)}function oi(e){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(e)}const ai=x.div`
|
|
1344
|
+
`,ti=({imageUrl:e,overlayText:n,themeColor:r,themeTextColor:o})=>t.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},t.createElement("img",{src:e,alt:"Free Gift",style:{width:"100%",height:"100%",objectFit:"fill",borderRadius:"8px"}}),t.createElement(ei,{$themeColor:r,$themeTextColor:o},n)),ni=({product:e,handleDecrement:n,handleIncrement:r,removeCartItem:a,addCartItem:i,isDev:s,themeColor:d,primaryTextColor:p,secondaryTextColor:u,tertiaryColor:m,tertiaryTextColor:f,showQtySelector:g=!0,themeTextColor:h,showEditOptionOnProducts:x,percentageOff:y,tags:b,removeFreebieFromCart:v,showDeleteOnFreebies:w,imageAspectSelector:C,cartComponentsCornerType:k,cartComponentsCornerRadius:E,backgroundSubdued:T,backgroundColor:S,showDiscountOnMRP:$})=>{const{setLoading:B}=xn(),z=rn(ln),[I,N]=an(Sa),[D,_]=c(!1),P=on(yn),A=Da(),O=!!e.properties?._isYtFreebie&&"number"==typeof e.final_line_price&&e.final_line_price>0&&"number"==typeof e.original_line_price&&e.original_line_price>e.final_line_price;l(()=>{function e(){const e=window.innerWidth;_(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const F=o(null),[M,R]=c(0);l(()=>{let e=null;return F.current&&(e=new ResizeObserver(e=>{e[0]&&R(e[0].contentRect.width)}),e.observe(F.current)),()=>{e&&e.disconnect()}},[]),l(()=>{const e=setTimeout(()=>{F.current&&R(F.current.offsetWidth)},100);return()=>clearTimeout(e)},[]);const L=Nn(e.product_title,M<200?100:120,M,"","16px"),j=()=>{if(e.line_level_discount_allocations&&e.line_level_discount_allocations.length>0&&e.line_level_discount_allocations[0].discount_application){const t=e.line_level_discount_allocations[0].discount_application.title,n=Ln(t);switch(e.line_level_discount_allocations[0].discount_application.value_type){case"amount":return`${n})`;case"percentage":case"fixed_amount":return n;default:return""}}};let V=Sn(z,z?.currency);const W=["__Added with Frequently Bought Together button","_has_gpo","_y"],H="66839544050"===window?.ytapp?.storeId;function q(e,t){e=e.replace(/^#/,"");return`rgba(${parseInt(e.substring(0,2),16)}, ${parseInt(e.substring(2,4),16)}, ${parseInt(e.substring(4,6),16)}, ${t})`}const U=e?.options_with_values&&e.options_with_values.filter(e=>"Title"!==e.name).length>0||e?.properties&&Object.keys(e.properties).filter(e=>!W.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).length>0||x,Q=M?70/M*100:100,G=j(),Y=G&&(G.length>25||!D)?Nn(G,Q,M,"","10px"):G,Z=(()=>{const t=e?.properties?._bundleImage;if(!t||"string"!=typeof t)return;const n=t.trim();return n.length>0?n:void 0})(),X=!!Z,K=(()=>{const t=e?.properties?.itemsInBundle;return"string"!=typeof t?[]:t.split(/,\s*/).map(e=>e.trim()).filter(e=>e.length>0)})(),J=(()=>{const t=e?.properties?._bundleItems;if("string"==typeof t&&t.trim().length>0)try{const e=JSON.parse(t);if(Array.isArray(e)){const t=e.reduce((e,t)=>{const n=Number(t?.quantity);return e+(isNaN(n)?0:n)},0);if(t>0)return t}}catch(e){}let n=0;for(const e of K){const t=e.match(/^(\d+)\s*x\s*/i);n+=t?parseInt(t[1],10)||0:1}return n})(),[ee,te]=c(!0),ne=D?"250px":"190px";return t.createElement(Ra,{$hasVariantInfo:U||X,$backgroundColor:S,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"0 1rem"}},t.createElement(ja,{$isBundle:X},t.createElement(La,{className:"yt-cart-product-image",$imageAspectSelector:C,$isBundle:X},g?t.createElement("img",{style:{height:"100%",width:"100%",opacity:0===e.quantity?.5:1},src:Rn(Z??e.image,150,85,"webp"),alt:(e=>e.title?`Product image - ${e.title}`:"Product image")(e),loading:"lazy"}):t.createElement(ti,{imageUrl:Rn(Z??e.image??e?.featuredImage?.url??"/placeholder.svg",150,85,"webp"),overlayText:O||y?"Special Offer":"Free Gift",themeColor:d,themeTextColor:h})),(g||e?.quantity>1)&&t.createElement(Va,null,e.quantity)),t.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1,padding:"4px 0"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"flex-start"}},t.createElement(Ma,{$themeColor:d,$primaryTextColor:p,href:`${window.location.origin}${e.url}`,ref:F},L),t.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement("div",{style:{marginLeft:"3px",display:"flex",alignItems:"center",justifyContent:"center"}},(g||w)&&t.createElement(qa,{onClick:g?async()=>{B&&B(!0,!0);try{a&&await a(e.key)}catch(e){}B&&B(!1,!1)}:async()=>{B&&B(!0,!0);try{v&&await v(e.key)}catch(e){}B&&B(!1,!1)}},t.createElement(Wa,null,t.createElement(ft,{className:"outline"}),t.createElement(mt,{className:"filled"})))))),X?t.createElement("div",{style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},t.createElement("div",{role:"button",onClick:()=>te(!ee),style:{display:"inline-flex",alignItems:"center",gap:"8px",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"4px 6px",width:"fit-content",cursor:"pointer",userSelect:"none",fontSize:"12px",fontWeight:600,color:u??"#1a1a1a"}},t.createElement("span",null,`Contain ${J} Items`),ee?t.createElement(tt,null):t.createElement(et,null)),ee&&K.length>0&&t.createElement("div",{style:{marginTop:"4px",backgroundColor:"#F8F9FA",borderRadius:"8px",padding:"8px 10px",border:"1px solid rgba(0,0,0,0.06)",maxWidth:ne,width:"fit-content"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"4px",maxWidth:ne}},K.map((e,n)=>t.createElement("div",{key:`${e}-${n}`,style:{color:u??"#1a1a1a",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:ne},title:e},e))))):U&&t.createElement("div",{style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},t.createElement(_a,null,e?.options_with_values?.filter(e=>"Title"!==e.name).map(e=>{const n=A?.options?.find(t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase()),r=Na(n,e.value);return"color"===n?.type?.toLowerCase()&&r?t.createElement(Pa,{key:e.name,$colorValue:r.value,style:{display:"block"}}):"image"===n?.type?.toLowerCase()&&r?t.createElement(Aa,{key:e.name,src:Rn(r.value,36,85,"webp"),alt:e.value}):e.value.length>15||e.value.includes("#")?null:t.createElement(Ha,{className:"yt-cart-variant-text",key:e.name,$secondaryTextColor:u,style:{display:"flex",alignItems:"center",borderRadius:"6px",border:"1px solid rgb(117 117 117 / 50%)",padding:"1px 3px"}},e.value)}),e?.properties&&Object.entries(e.properties).filter(([e])=>!W.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).map(([e,n])=>{const r=String(n);return r.includes("#")||(A?.options??[]).some(t=>t.name.trim().toLowerCase()===e.trim().toLowerCase()&&t.values.some(e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()))?null:t.createElement(Ha,{key:e,$secondaryTextColor:u,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px"}},r)}),x&&!e?.product_has_only_default_variant&&t.createElement(qa,{onClick:()=>{const t=!!e.properties?._isYtFreebie;let n;if(t){const t=e.properties?._yt_allowed_variants;if(t&&"string"==typeof t)try{n=JSON.parse(t)}catch(r){console.error(`ProductCard: Failed to parse _yt_allowed_variants for ${e.key}:`,t,r),n=[String(e.variant_id)]}else console.warn(`ProductCard: No allowed variants property found for freebie ${e.key}. Defaulting to current variant.`),n=[String(e.variant_id)]}P({open:!0,variantId:String(e.variant_id),quantity:e.quantity,handle:e.handle,lineItemKey:e.key,freebieSelection:t,productId:String(e.product_id),allowedVariantIds:n})},style:{display:"flex",alignItems:"center"}},t.createElement(go,null))),e?.options_with_values?.filter(e=>"Title"!==e.name&&e.value.length>15).map(e=>{const n=A?.options?.find(t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase());if(Na(n,e.value)&&["color","image"].includes((n?.type??"").toLowerCase()))return null;if(e.value.includes("#"))return null;const r=D?e.value:Nn(e.value,M?120/M*100:100,M,"","10px");return t.createElement(Ha,{key:e.name,$secondaryTextColor:u,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px",width:"fit-content"}},r)})),t.createElement(Ua,null,t.createElement("div",{style:{display:"flex",flexDirection:D?"row":"column",alignItems:D?"center":"flex-start",gap:D?"0px":"4px"}},t.createElement(Qa,null,X?t.createElement(t.Fragment,null,t.createElement(Ga,{$primaryTextColor:p},V,Fn(Number(e?.properties?._finalBundlePrice)??0)),e?.properties?._originalBundlePrice&&t.createElement(Ya,null,V,Fn(Number(e?.properties?._originalBundlePrice)??0))):t.createElement(Ga,{$primaryTextColor:p},0===En(e.final_line_price,z?.currency)?t.createElement(Ja,{$primaryColor:p,$themeColor:d,$backgroundSubdued:T},"FREE"):t.createElement(t.Fragment,null,V,Fn(En(e.final_line_price,z?.currency)))),(e.compare_at_price&&Number(e.compare_at_price)*e.quantity>Number(e.final_line_price)||!e.compare_at_price&&j()&&e.original_line_price)&&$&&t.createElement(Ya,null,V,e.compare_at_price?Fn(En(Number(e.compare_at_price)*e.quantity,z?.currency)):Fn(En(e.original_line_price,z?.currency))),D&&(g||O)&&j()&&t.createElement(Xa,{$tertiaryColor:m},t.createElement(mo,{size:14,color:f}),t.createElement(Ka,{$tertiaryTextColor:f},Y))),!D&&(g||O)&&j()&&t.createElement(Xa,{$tertiaryColor:m},t.createElement(mo,{size:12,color:f}),t.createElement(Ka,{$tertiaryTextColor:f},Y)),b&&b.length>0&&H&&t.createElement("div",{style:{display:"flex",flexWrap:"wrap",columnGap:"2px",rowGap:"2px",marginTop:D?"0px":"4px"}},b.filter(e=>"Delhi-NCR"===e).map(e=>t.createElement("span",{key:e,style:{fontSize:"10px",padding:"3px 8px",backgroundColor:q(d,.15),color:d,borderRadius:"4px"}},"Delhi-NCR"===e?"Only For Delhi NCR":e)))),t.createElement(Za,null,g?t.createElement(Ta,{handleItemQuantityDecrement:async()=>{B&&B(!0,!0);try{n&&await n(e.key,e.quantity-1)}catch(e){}B&&B(!1,!1)},handleItemQuantityIncrement:async()=>{B&&B(!0,!0);try{if(r){-1===await r(e.id,e.quantity+1,e.properties)&&(N(e?.key),setTimeout(()=>N(void 0),3e3))}}catch(e){}B&&B(!1,!1)},value:e.quantity,isDev:s,themeColor:d,cartComponentsCornerType:k,cartComponentsCornerRadius:E,backgroundSubdued:T}):t.createElement("span",{style:{padding:"2px 8px",fontSize:"10px",backgroundColor:m,color:f??"#000",borderRadius:"4px"}},O&&e.original_line_price?`${((e.original_line_price-e.final_line_price)/e.original_line_price*100).toFixed(0)}% off`:y&&e?.properties?._isYtFreebie?`${y}% Off`:"Freebie"))),I&&I===e?.key&&t.createElement("span",{style:{fontSize:"10px",color:"red",marginTop:"4px"}},"⚠️You've reached the maximum quantity for this item")))};function ri(e){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"},child:[]}]})(e)}function oi(e){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(e)}const ai=x.div`
|
|
1345
1345
|
margin: 8px 0 6px 0;
|
|
1346
1346
|
padding: 12px;
|
|
1347
1347
|
background: ${e=>e.$backgroundColor??"rgba(0,0,0,0.04)"};
|