yt-uikit 0.10.81 → 0.10.82

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.
@@ -40,6 +40,7 @@ type CartProductsListProps = {
40
40
  showFreebieMilestone?: boolean;
41
41
  freebieMilestoneData?: freebieMilestoneProps;
42
42
  freeLabelText?: string;
43
+ showVariantsInClaimSection?: boolean;
43
44
  customCartProgressBarCriteria?: string;
44
45
  effectiveQuantityForProgressBar?: number;
45
46
  isLargeScreen?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare const _default: React.MemoExoticComponent<({ product: variant, handleDecrement, handleIncrement, removeCartItem, addCartItem, isDev, themeColor, primaryTextColor, secondaryTextColor, tertiaryColor, tertiaryTextColor, showQtySelector, themeTextColor, showEditOptionOnProducts, percentageOff, removeFreebieFromCart, showDeleteOnFreebies, imageAspectSelector, cartComponentsCornerType, cartComponentsCornerRadius, backgroundSubdued, backgroundColor, showDiscountOnMRP, freeLabelText, isLargeScreen, }: {
2
+ declare const _default: React.MemoExoticComponent<({ product: variant, handleDecrement, handleIncrement, removeCartItem, addCartItem, isDev, themeColor, primaryTextColor, secondaryTextColor, tertiaryColor, tertiaryTextColor, showQtySelector, themeTextColor, showEditOptionOnProducts, percentageOff, removeFreebieFromCart, showDeleteOnFreebies, imageAspectSelector, cartComponentsCornerType, cartComponentsCornerRadius, backgroundSubdued, backgroundColor, showDiscountOnMRP, freeLabelText, showVariantsInClaimSection, isLargeScreen, }: {
3
3
  product: any;
4
4
  addCartItem?: ((product: any) => Promise<any>) | undefined;
5
5
  removeCartItem?: ((product: any) => Promise<any>) | undefined;
@@ -26,6 +26,7 @@ declare const _default: React.MemoExoticComponent<({ product: variant, handleDec
26
26
  backgroundColor?: string | undefined;
27
27
  showDiscountOnMRP?: boolean | undefined;
28
28
  freeLabelText?: string | undefined;
29
+ showVariantsInClaimSection?: boolean | undefined;
29
30
  isLargeScreen?: boolean | undefined;
30
31
  }) => React.JSX.Element>;
31
32
  export default _default;
package/dist/esm/index.js CHANGED
@@ -1314,7 +1314,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
1314
1314
  padding: 2px 0px 4px 0px;
1315
1315
  border-bottom-left-radius: 8px;
1316
1316
  border-bottom-right-radius: 8px;
1317
- `,xa=({imageUrl:t,overlayText:n,themeColor:r,themeTextColor:o})=>e.createElement("div",{className:"yt-cart-product-overlay-image-wrapper",style:{position:"relative",width:"100%",height:"100%"}},e.createElement("img",{className:"yt-cart-product-overlay-image",src:t,alt:"Free Gift",style:{width:"100%",height:"100%",objectFit:"fill",borderRadius:"8px"}}),n&&e.createElement(fa,{className:"yt-cart-product-freebie-overlay-text",$themeColor:r,$themeTextColor:o},n));var ha=e.memo(({product:n,handleDecrement:r,handleIncrement:o,removeCartItem:a,addCartItem:i,isDev:l,themeColor:s,primaryTextColor:c,secondaryTextColor:d,tertiaryColor:p,tertiaryTextColor:m,showQtySelector:u=!0,themeTextColor:g,showEditOptionOnProducts:y,percentageOff:f,removeFreebieFromCart:x,showDeleteOnFreebies:h,imageAspectSelector:b,cartComponentsCornerType:w,cartComponentsCornerRadius:v,backgroundSubdued:C,backgroundColor:E,showDiscountOnMRP:k,freeLabelText:T,isLargeScreen:S=!1})=>{const N=Bn(),F=Ce(En),[I,B]=ve(Vo),z=we(zn),$=Yo(),P="undefined"!=typeof window&&"swashaa.myshopify.com"===window?.Shopify?.shop&&Number(n?.total_discount)>0&&Array.isArray(n?.discounts)&&n.discounts.length>0&&Number(n?.line_price)<Number(n?.final_line_price),A=P?n.line_price:n.final_line_price,D=!!n.properties?._isYtFreebie,_=!!n.properties?._isStealDeal,L=D&&"number"==typeof n.final_line_price&&n.final_line_price>0&&"number"==typeof n.original_line_price&&n.original_line_price>n.final_line_price,R=L&&n.original_line_price?`${((n.original_line_price-n.final_line_price)/n.original_line_price*100).toFixed(0)}% off`:f&&D?`${f}% Off`:"";let O=Dn(F,F?.currency);const M=["__Added with Frequently Bought Together button","_has_gpo","_y"],V=n?.options_with_values&&n.options_with_values.filter(e=>"Title"!==e.name).length>0||n?.properties&&Object.keys(n.properties).filter(e=>!M.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).length>0||y,W=(()=>{if(n.line_level_discount_allocations&&n.line_level_discount_allocations.length>0&&n.line_level_discount_allocations[0].discount_application){const e=n.line_level_discount_allocations[0].discount_application.title,t=nr(e);switch(n.line_level_discount_allocations[0].discount_application.value_type){case"amount":return`${t})`;case"percentage":case"fixed_amount":return t;default:return""}}if(P&&Array.isArray(n.discounts)&&n.discounts[0]?.title)return nr(n.discounts[0].title)})(),q=W,U=(()=>{const e=n?.properties?._bundleImage;if(!e||"string"!=typeof e)return;const t=e.trim();return t.length>0?t:void 0})(),Q=!!U,Y=(()=>{const e=n?.properties?.itemsInBundle;return"string"!=typeof e?[]:e.split(/,\s*/).map(e=>e.trim()).filter(e=>e.length>0)})(),G=(()=>{const e=n?.properties?._bundleItems;if("string"==typeof e&&e.trim().length>0)try{const t=JSON.parse(e);if(Array.isArray(t)){const e=t.reduce((e,t)=>{const n=Number(t?.quantity);return e+(isNaN(n)?0:n)},0);if(e>0)return e}}catch(e){}let t=0;for(const e of Y){const n=e.match(/^(\d+)\s*x\s*/i);t+=n?parseInt(n[1],10)||0:1}return t})(),Z=(()=>{try{const e=Number(n?.compare_at_price),t=Number(n?.quantity)||1;if(Number.isFinite(e)&&e>0)return e*t}catch(e){}return null})(),[X,K]=t(!0),J=S?"250px":"190px",ee=$n(A,F?.currency),te="undefined"!=typeof window?`${window.location.origin}${n.url}`:n.url,ne=D||Q||0===ee,re="undefined"!=typeof window&&"whats-up-wellness.myshopify.com"===window.ytapp?.storeDomain?"Free Gift":_?"Steal Deal":L||f?"Special Offer":"",oe=e.createElement(ra,{className:"yt-cart-product-image-wrapper",$isBundle:Q},e.createElement(na,{className:"yt-cart-product-image",$imageAspectSelector:b,$isBundle:Q},u?e.createElement("img",{className:"yt-cart-product-item-image",style:{height:"100%",width:"100%",opacity:0===n.quantity?.5:1},src:tr(U??n.image,200,85,"webp"),alt:(e=>e.title?`Product image - ${e.title}`:"Product image")(n),loading:"lazy"}):e.createElement(xa,{imageUrl:tr(U??n.image??n?.featuredImage?.url??"/placeholder.svg",200,85,"webp"),overlayText:re,themeColor:s,themeTextColor:g})),(u||n?.quantity>1)&&e.createElement(oa,{className:"yt-cart-product-quantity-badge"},n.quantity));return e.createElement(ta,{className:"yt-cart-product-card",$hasVariantInfo:V||Q,$backgroundColor:E,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"0 1rem"}},ne?oe:e.createElement("a",{className:"yt-cart-product-image-link",href:te,style:{textDecoration:"none",display:"contents"}},oe),e.createElement("div",{className:"yt-cart-product-details",style:{display:"flex",flexDirection:"column",flex:1,minWidth:0,padding:"4px 0"}},e.createElement("div",{className:"yt-cart-product-header",style:{display:"flex",flexDirection:"row",alignItems:"flex-start"}},e.createElement(ea,{as:ne?"span":"a",className:"yt-cart-product-title",$themeColor:s,$primaryTextColor:c,$isNavigationDisabled:ne,href:ne?void 0:te},Qn(n.product_title??"")),e.createElement("div",{className:"yt-cart-product-actions",style:{marginLeft:"auto",display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center"}},e.createElement("div",{className:"yt-cart-product-remove-action-wrapper",style:{marginLeft:"3px",display:"flex",alignItems:"center",justifyContent:"center"}},(u||h)&&e.createElement(la,{onClick:u?async()=>{N&&N(!0,!0);try{a&&await a(n.key)}catch(e){}N&&N(!1,!1)}:async()=>{N&&N(!0,!0);try{x&&await x(n.key)}catch(e){}N&&N(!1,!1)}},e.createElement(aa,null,e.createElement(me,{className:"outline"}),e.createElement(ue,{className:"filled"})))))),Q?e.createElement("div",{className:"yt-cart-product-bundle-info",style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},e.createElement("div",{className:"yt-cart-product-bundle-toggle",role:"button",onClick:()=>K(!X),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:d??"#1a1a1a"}},e.createElement("span",{className:"yt-cart-product-bundle-toggle-label"},`Contain ${G} Items`),X?e.createElement(j,null):e.createElement(H,null)),X&&Y.length>0&&e.createElement("div",{className:"yt-cart-product-bundle-items-popover",style:{marginTop:"4px",backgroundColor:"#F8F9FA",borderRadius:"8px",padding:"8px 10px",border:"1px solid rgba(0,0,0,0.06)",maxWidth:J,width:"fit-content"}},e.createElement("div",{className:"yt-cart-product-bundle-items-list",style:{display:"flex",flexDirection:"column",gap:"4px",maxWidth:J}},Y.map((t,n)=>e.createElement("div",{className:"yt-cart-product-bundle-item",key:`${t}-${n}`,style:{color:d??"#1a1a1a",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:J},title:t},t))))):V&&e.createElement("div",{className:"yt-cart-product-variant-info",style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},e.createElement(Go,{className:"yt-cart-product-variant-container"},n?.options_with_values?.filter(e=>"Title"!==e.name).map(t=>{const n=$?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase()),r=Uo(n,t.value),o=Qo(n,t.value);return"color"===n?.type?.toLowerCase()&&r?e.createElement(Zo,{key:t.name,$colorValue:r.value,style:{display:"block"}}):"image"===n?.type?.toLowerCase()&&r?e.createElement(Xo,{key:t.name,src:tr(r.value,36,85,"webp"),alt:t.value}):o.length>15||o.includes("#")?null:e.createElement(ia,{className:"yt-cart-variant-text",key:t.name,$secondaryTextColor:d,style:{display:"flex",alignItems:"center",borderRadius:"6px",border:"1px solid rgb(117 117 117 / 50%)",padding:"1px 3px"}},o)}),n?.properties&&Object.entries(n.properties).filter(([e])=>!M.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).map(([t,n])=>{const r=String(n);return r.includes("#")||($?.options??[]).some(e=>e.name.trim().toLowerCase()===t.trim().toLowerCase()&&e.values.some(e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()))?null:e.createElement(ia,{key:t,$secondaryTextColor:d,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px"}},r)}),y&&!n?.product_has_only_default_variant&&e.createElement(la,{onClick:()=>{const e=!!n.properties?._isYtFreebie;let t;if(e){const e=n.properties?._yt_allowed_variants;if(e&&"string"==typeof e)try{t=JSON.parse(e)}catch(r){console.error(`ProductCard: Failed to parse _yt_allowed_variants for ${n.key}:`,e,r),t=[String(n.variant_id)]}else console.warn(`ProductCard: No allowed variants property found for freebie ${n.key}. Defaulting to current variant.`),t=[String(n.variant_id)]}const r=void 0!==n.properties?._yt_coupon_template_id&&null!==n.properties?._yt_coupon_template_id?String(n.properties._yt_coupon_template_id):void 0,o=e&&r?{couponTemplateId:r,rewardKey:void 0!==n.properties?._yt_reward_key&&null!==n.properties?._yt_reward_key?String(n.properties._yt_reward_key):void 0}:void 0;z({open:!0,variantId:String(n.variant_id),quantity:n.quantity,handle:n.handle,lineItemKey:n.key,freebieSelection:e,productId:String(n.product_id),allowedVariantIds:t,rewardContext:o})},style:{display:"flex",alignItems:"center"}},e.createElement(Qe,null))),n?.options_with_values?.filter(e=>"Title"!==e.name).map(t=>{const n=$?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase()),r=Uo(n,t.value),o=Qo(n,t.value);return r&&["color","image"].includes((n?.type??"").toLowerCase())||o.length<=15||o.includes("#")?null:e.createElement(ia,{key:t.name,$secondaryTextColor:d,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px",width:"fit-content"}},o)})),e.createElement(sa,{className:"yt-cart-product-bottom-row"},e.createElement("div",{className:"yt-cart-product-pricing-row",style:{display:"flex",flexDirection:S?"row":"column",alignItems:S?"center":"flex-start",gap:S?"0px":"4px"}},e.createElement(ca,{className:"yt-cart-product-price-container"},Q?e.createElement(e.Fragment,null,e.createElement(da,{$primaryTextColor:c},0===$n(A,F?.currency)?e.createElement(ya,{$primaryColor:c,$themeColor:s,$backgroundSubdued:C},T||"FREE"):e.createElement(e.Fragment,null,O,Jn($n(A,F?.currency)))),Z&&Z>Number(A)&&k&&e.createElement(pa,null,O,Jn($n(Z,F?.currency)))):e.createElement(da,{$primaryTextColor:c},0===$n(A,F?.currency)?e.createElement(ya,{$primaryColor:c,$themeColor:s,$backgroundSubdued:C},T||"FREE"):e.createElement(e.Fragment,null,O,Jn($n(A,F?.currency)))),!Q&&(n.compare_at_price&&Number(n.compare_at_price)*n.quantity>Number(A)||!n.compare_at_price&&W&&n.original_line_price)&&k&&e.createElement(pa,null,O,n.compare_at_price?Jn($n(Number(n.compare_at_price)*n.quantity,F?.currency)):Jn($n(n.original_line_price,F?.currency))),S&&(u||L)&&W&&e.createElement(ua,{className:"yt-cart-product-discount",$tertiaryColor:p},e.createElement(Ve,{size:14,color:m}),e.createElement(ga,{$tertiaryTextColor:m},q))),!S&&(u||L)&&W&&e.createElement(ua,{className:"yt-cart-product-discount",$tertiaryColor:p},e.createElement(Ve,{size:12,color:m}),e.createElement(ga,{$tertiaryTextColor:m},q))),e.createElement(ma,{className:"yt-cart-product-quantity-controls"},u?e.createElement(Mo,{handleItemQuantityDecrement:async()=>{N&&N(!0,!0);try{r&&await r(n.key,n.quantity-1)}catch(e){}N&&N(!1,!1)},handleItemQuantityIncrement:async()=>{N&&N(!0,!0);try{if(o){-1===await o(n.key,n.quantity+1,n.properties)&&(B(n?.key),setTimeout(()=>B(void 0),3e3))}}catch(e){}N&&N(!1,!1)},value:n.quantity,isDev:l,themeColor:s,cartComponentsCornerType:w,cartComponentsCornerRadius:v,backgroundSubdued:C}):(!_||L||f)&&R?e.createElement("span",{className:"yt-cart-line-item-freebie-badge",style:{padding:"2px 8px",fontSize:"10px",backgroundColor:p,color:m??"#000",borderRadius:"4px"}},R):null)),I&&I===n?.key&&e.createElement("span",{className:"yt-cart-product-quantity-error",style:{fontSize:"10px",color:"red",marginTop:"4px"}},"⚠️You've reached the maximum quantity for this item")))});const ba=c.div`
1317
+ `,xa=({imageUrl:t,overlayText:n,themeColor:r,themeTextColor:o})=>e.createElement("div",{className:"yt-cart-product-overlay-image-wrapper",style:{position:"relative",width:"100%",height:"100%"}},e.createElement("img",{className:"yt-cart-product-overlay-image",src:t,alt:"Free Gift",style:{width:"100%",height:"100%",objectFit:"fill",borderRadius:"8px"}}),n&&e.createElement(fa,{className:"yt-cart-product-freebie-overlay-text",$themeColor:r,$themeTextColor:o},n));var ha=e.memo(({product:n,handleDecrement:r,handleIncrement:o,removeCartItem:a,addCartItem:i,isDev:l,themeColor:s,primaryTextColor:c,secondaryTextColor:d,tertiaryColor:p,tertiaryTextColor:m,showQtySelector:u=!0,themeTextColor:g,showEditOptionOnProducts:y,percentageOff:f,removeFreebieFromCart:x,showDeleteOnFreebies:h,imageAspectSelector:b,cartComponentsCornerType:w,cartComponentsCornerRadius:v,backgroundSubdued:C,backgroundColor:E,showDiscountOnMRP:k,freeLabelText:T,showVariantsInClaimSection:S,isLargeScreen:N=!1})=>{const F=Bn(),I=Ce(En),[B,z]=ve(Vo),$=we(zn),P=Yo(),A="undefined"!=typeof window&&"swashaa.myshopify.com"===window?.Shopify?.shop&&Number(n?.total_discount)>0&&Array.isArray(n?.discounts)&&n.discounts.length>0&&Number(n?.line_price)<Number(n?.final_line_price),D=A?n.line_price:n.final_line_price,_=!!n.properties?._isYtFreebie,L=!!n.properties?._isStealDeal,R=_&&"number"==typeof n.final_line_price&&n.final_line_price>0&&"number"==typeof n.original_line_price&&n.original_line_price>n.final_line_price,O=R&&n.original_line_price?`${((n.original_line_price-n.final_line_price)/n.original_line_price*100).toFixed(0)}% off`:f&&_?`${f}% Off`:"";let M=Dn(I,I?.currency);const V=["__Added with Frequently Bought Together button","_has_gpo","_y"],W=n?.options_with_values&&n.options_with_values.filter(e=>"Title"!==e.name).length>0||n?.properties&&Object.keys(n.properties).filter(e=>!V.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).length>0||y,q=(()=>{if(n.line_level_discount_allocations&&n.line_level_discount_allocations.length>0&&n.line_level_discount_allocations[0].discount_application){const e=n.line_level_discount_allocations[0].discount_application.title,t=nr(e);switch(n.line_level_discount_allocations[0].discount_application.value_type){case"amount":return`${t})`;case"percentage":case"fixed_amount":return t;default:return""}}if(A&&Array.isArray(n.discounts)&&n.discounts[0]?.title)return nr(n.discounts[0].title)})(),U=q,Q=(()=>{const e=n?.properties?._bundleImage;if(!e||"string"!=typeof e)return;const t=e.trim();return t.length>0?t:void 0})(),Y=!!Q,G=(()=>{const e=n?.properties?.itemsInBundle;return"string"!=typeof e?[]:e.split(/,\s*/).map(e=>e.trim()).filter(e=>e.length>0)})(),Z=(()=>{const e=n?.properties?._bundleItems;if("string"==typeof e&&e.trim().length>0)try{const t=JSON.parse(e);if(Array.isArray(t)){const e=t.reduce((e,t)=>{const n=Number(t?.quantity);return e+(isNaN(n)?0:n)},0);if(e>0)return e}}catch(e){}let t=0;for(const e of G){const n=e.match(/^(\d+)\s*x\s*/i);t+=n?parseInt(n[1],10)||0:1}return t})(),X=(()=>{try{const e=Number(n?.compare_at_price),t=Number(n?.quantity)||1;if(Number.isFinite(e)&&e>0)return e*t}catch(e){}return null})(),[K,J]=t(!0),ee=N?"250px":"190px",te=$n(D,I?.currency),ne="undefined"!=typeof window?`${window.location.origin}${n.url}`:n.url,re=_||Y||0===te,oe="undefined"!=typeof window&&"whats-up-wellness.myshopify.com"===window.ytapp?.storeDomain?"Free Gift":L?"Steal Deal":R||f?"Special Offer":"",ae=e.createElement(ra,{className:"yt-cart-product-image-wrapper",$isBundle:Y},e.createElement(na,{className:"yt-cart-product-image",$imageAspectSelector:b,$isBundle:Y},u?e.createElement("img",{className:"yt-cart-product-item-image",style:{height:"100%",width:"100%",opacity:0===n.quantity?.5:1},src:tr(Q??n.image,200,85,"webp"),alt:(e=>e.title?`Product image - ${e.title}`:"Product image")(n),loading:"lazy"}):e.createElement(xa,{imageUrl:tr(Q??n.image??n?.featuredImage?.url??"/placeholder.svg",200,85,"webp"),overlayText:oe,themeColor:s,themeTextColor:g})),(u||n?.quantity>1)&&e.createElement(oa,{className:"yt-cart-product-quantity-badge"},n.quantity));return e.createElement(ta,{className:"yt-cart-product-card",$hasVariantInfo:W||Y,$backgroundColor:E,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"0 1rem"}},re?ae:e.createElement("a",{className:"yt-cart-product-image-link",href:ne,style:{textDecoration:"none",display:"contents"}},ae),e.createElement("div",{className:"yt-cart-product-details",style:{display:"flex",flexDirection:"column",flex:1,minWidth:0,padding:"4px 0"}},e.createElement("div",{className:"yt-cart-product-header",style:{display:"flex",flexDirection:"row",alignItems:"flex-start"}},e.createElement(ea,{as:re?"span":"a",className:"yt-cart-product-title",$themeColor:s,$primaryTextColor:c,$isNavigationDisabled:re,href:re?void 0:ne},Qn(S&&(_||L)?n.title??n.product_title??"":n.product_title??"")),e.createElement("div",{className:"yt-cart-product-actions",style:{marginLeft:"auto",display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center"}},e.createElement("div",{className:"yt-cart-product-remove-action-wrapper",style:{marginLeft:"3px",display:"flex",alignItems:"center",justifyContent:"center"}},(u||h)&&e.createElement(la,{onClick:u?async()=>{F&&F(!0,!0);try{a&&await a(n.key)}catch(e){}F&&F(!1,!1)}:async()=>{F&&F(!0,!0);try{x&&await x(n.key)}catch(e){}F&&F(!1,!1)}},e.createElement(aa,null,e.createElement(me,{className:"outline"}),e.createElement(ue,{className:"filled"})))))),Y?e.createElement("div",{className:"yt-cart-product-bundle-info",style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},e.createElement("div",{className:"yt-cart-product-bundle-toggle",role:"button",onClick:()=>J(!K),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:d??"#1a1a1a"}},e.createElement("span",{className:"yt-cart-product-bundle-toggle-label"},`Contain ${Z} Items`),K?e.createElement(j,null):e.createElement(H,null)),K&&G.length>0&&e.createElement("div",{className:"yt-cart-product-bundle-items-popover",style:{marginTop:"4px",backgroundColor:"#F8F9FA",borderRadius:"8px",padding:"8px 10px",border:"1px solid rgba(0,0,0,0.06)",maxWidth:ee,width:"fit-content"}},e.createElement("div",{className:"yt-cart-product-bundle-items-list",style:{display:"flex",flexDirection:"column",gap:"4px",maxWidth:ee}},G.map((t,n)=>e.createElement("div",{className:"yt-cart-product-bundle-item",key:`${t}-${n}`,style:{color:d??"#1a1a1a",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:ee},title:t},t))))):W&&e.createElement("div",{className:"yt-cart-product-variant-info",style:{display:"flex",flexDirection:"column",marginBottom:"4px"}},e.createElement(Go,{className:"yt-cart-product-variant-container"},n?.options_with_values?.filter(e=>"Title"!==e.name).map(t=>{const n=P?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase()),r=Uo(n,t.value),o=Qo(n,t.value);return"color"===n?.type?.toLowerCase()&&r?e.createElement(Zo,{key:t.name,$colorValue:r.value,style:{display:"block"}}):"image"===n?.type?.toLowerCase()&&r?e.createElement(Xo,{key:t.name,src:tr(r.value,36,85,"webp"),alt:t.value}):o.length>15||o.includes("#")?null:e.createElement(ia,{className:"yt-cart-variant-text",key:t.name,$secondaryTextColor:d,style:{display:"flex",alignItems:"center",borderRadius:"6px",border:"1px solid rgb(117 117 117 / 50%)",padding:"1px 3px"}},o)}),n?.properties&&Object.entries(n.properties).filter(([e])=>!V.includes(e)&&!e.startsWith("_")&&!e.startsWith("__")).map(([t,n])=>{const r=String(n);return r.includes("#")||(P?.options??[]).some(e=>e.name.trim().toLowerCase()===t.trim().toLowerCase()&&e.values.some(e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()))?null:e.createElement(ia,{key:t,$secondaryTextColor:d,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px"}},r)}),y&&!n?.product_has_only_default_variant&&e.createElement(la,{onClick:()=>{const e=!!n.properties?._isYtFreebie;let t;if(e){const e=n.properties?._yt_allowed_variants;if(e&&"string"==typeof e)try{t=JSON.parse(e)}catch(r){console.error(`ProductCard: Failed to parse _yt_allowed_variants for ${n.key}:`,e,r),t=[String(n.variant_id)]}else console.warn(`ProductCard: No allowed variants property found for freebie ${n.key}. Defaulting to current variant.`),t=[String(n.variant_id)]}const r=void 0!==n.properties?._yt_coupon_template_id&&null!==n.properties?._yt_coupon_template_id?String(n.properties._yt_coupon_template_id):void 0,o=e&&r?{couponTemplateId:r,rewardKey:void 0!==n.properties?._yt_reward_key&&null!==n.properties?._yt_reward_key?String(n.properties._yt_reward_key):void 0}:void 0;$({open:!0,variantId:String(n.variant_id),quantity:n.quantity,handle:n.handle,lineItemKey:n.key,freebieSelection:e,productId:String(n.product_id),allowedVariantIds:t,rewardContext:o})},style:{display:"flex",alignItems:"center"}},e.createElement(Qe,null))),n?.options_with_values?.filter(e=>"Title"!==e.name).map(t=>{const n=P?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase()),r=Uo(n,t.value),o=Qo(n,t.value);return r&&["color","image"].includes((n?.type??"").toLowerCase())||o.length<=15||o.includes("#")?null:e.createElement(ia,{key:t.name,$secondaryTextColor:d,style:{display:"flex",alignItems:"center",backgroundColor:"#F8F9FA",borderRadius:"6px",border:"1px solid rgba(0,0,0,0.1)",padding:"1px 3px",width:"fit-content"}},o)})),e.createElement(sa,{className:"yt-cart-product-bottom-row"},e.createElement("div",{className:"yt-cart-product-pricing-row",style:{display:"flex",flexDirection:N?"row":"column",alignItems:N?"center":"flex-start",gap:N?"0px":"4px"}},e.createElement(ca,{className:"yt-cart-product-price-container"},Y?e.createElement(e.Fragment,null,e.createElement(da,{$primaryTextColor:c},0===$n(D,I?.currency)?e.createElement(ya,{$primaryColor:c,$themeColor:s,$backgroundSubdued:C},T||"FREE"):e.createElement(e.Fragment,null,M,Jn($n(D,I?.currency)))),X&&X>Number(D)&&k&&e.createElement(pa,null,M,Jn($n(X,I?.currency)))):e.createElement(da,{$primaryTextColor:c},0===$n(D,I?.currency)?e.createElement(ya,{$primaryColor:c,$themeColor:s,$backgroundSubdued:C},T||"FREE"):e.createElement(e.Fragment,null,M,Jn($n(D,I?.currency)))),!Y&&(n.compare_at_price&&Number(n.compare_at_price)*n.quantity>Number(D)||!n.compare_at_price&&q&&n.original_line_price)&&k&&e.createElement(pa,null,M,n.compare_at_price?Jn($n(Number(n.compare_at_price)*n.quantity,I?.currency)):Jn($n(n.original_line_price,I?.currency))),N&&(u||R)&&q&&e.createElement(ua,{className:"yt-cart-product-discount",$tertiaryColor:p},e.createElement(Ve,{size:14,color:m}),e.createElement(ga,{$tertiaryTextColor:m},U))),!N&&(u||R)&&q&&e.createElement(ua,{className:"yt-cart-product-discount",$tertiaryColor:p},e.createElement(Ve,{size:12,color:m}),e.createElement(ga,{$tertiaryTextColor:m},U))),e.createElement(ma,{className:"yt-cart-product-quantity-controls"},u?e.createElement(Mo,{handleItemQuantityDecrement:async()=>{F&&F(!0,!0);try{r&&await r(n.key,n.quantity-1)}catch(e){}F&&F(!1,!1)},handleItemQuantityIncrement:async()=>{F&&F(!0,!0);try{if(o){-1===await o(n.key,n.quantity+1,n.properties)&&(z(n?.key),setTimeout(()=>z(void 0),3e3))}}catch(e){}F&&F(!1,!1)},value:n.quantity,isDev:l,themeColor:s,cartComponentsCornerType:w,cartComponentsCornerRadius:v,backgroundSubdued:C}):(!L||R||f)&&O?e.createElement("span",{className:"yt-cart-line-item-freebie-badge",style:{padding:"2px 8px",fontSize:"10px",backgroundColor:p,color:m??"#000",borderRadius:"4px"}},O):null)),B&&B===n?.key&&e.createElement("span",{className:"yt-cart-product-quantity-error",style:{fontSize:"10px",color:"red",marginTop:"4px"}},"⚠️You've reached the maximum quantity for this item")))});const ba=c.div`
1318
1318
  margin: 8px 0 6px 0;
1319
1319
  padding: 12px;
1320
1320
  background: ${e=>e.$backgroundColor??"rgba(0,0,0,0.04)"};
@@ -1351,7 +1351,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
1351
1351
  border-bottom: 0.8px solid rgb(135 135 135 / 50%);
1352
1352
  width: calc(100% + 2rem);
1353
1353
  }
1354
- `,Ea=({addCartItem:t,handleDecrement:n,handleIncrement:r,removeCartItem:o,isDev:a,themeColor:i,primaryTextColor:l,secondaryTextColor:s,freeProduct:c,themeTextColor:d,showEditOptionOnProducts:p,productPercentageOffMapping:m,removeFreebieFromCart:u,showDeleteOnFreebies:g,freeProductAdjustedCartTotal:y,freebieCouponTemplates:f,cartCheckpoints:x,freebieFlowCheckpoints:h,imageAspectSelector:b,cartComponentsCornerType:w,cartComponentsCornerRadius:v,giftWrapProductId:C,giftWrapVariantId:E,showGiftWrapAsLineItem:k=!1,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:F,showDiscountOnMRP:I,checkoutSectionMessage:B,checkoutSectionMessageRedirectLink:z,showFreebieMilestone:$,freebieMilestoneData:P,freeLabelText:A,customCartProgressBarCriteria:D,effectiveQuantityForProgressBar:_,isLargeScreen:L})=>{const R=Ce(En),{cartLoading:O}=In(),M=!O.cartLoading&&R?.items,V=(y??Number(R?.items_subtotal_price))/100;let W=!0,j=0;if(R?.items?.length>0)for(const e of R.items)e?.properties?._isYtFreebie&&(j+=e?.quantity);if(j===R?.item_count&&(W=!1),!M&&0===R?.item_count)return e.createElement(va,null);if(!(M&&0!==R?.item_count||R?.items))return null;const H=P?.campaignFilter??"all_campaigns";let q=[];"all_campaigns"===H?q=f??[]:"progress_bar_tiers"===H?q=x??[]:"freebie_campaigns"===H&&(q=h??[]);const U="minimum_order_value"!==(D??"minimum_order_value"),Q=U?_??R?.item_count??0:V,Y=e=>U?e.quantityThreshold:e.minimumOrderValue,G=Array.isArray(q)?q.filter(e=>"free_product"===e?.couponType).slice().sort((e,t)=>Y(e)-Y(t)).find(e=>Y(e)>Q):void 0,Z=Dn(R,R?.currency);return e.createElement(e.Fragment,null,R.items.filter(e=>!!k||!(String(e?.id)===Xn(String(C))||String(e?.id)===Xn(String(E)))).map(c=>{const y=m?.[c?.key],x=f?.find(e=>e?._allVariantIds?.includes(String(c.id)));let h=!1;if(x&&V>=x.minimumOrderValue&&0===c?.line_price&&(h=!0),!k&&(String(c?.id)===Xn(String(C))||Xn(String(E))===String(c?.id)))return null;const B=c.discounts&&c.discounts.length>0;return c.properties?._isYtFreebie&&(y||h)&&B&&W?e.createElement(e.Fragment,null,e.createElement(Ca,{className:"yt-cart-product-card-wrapper",key:c?.key??c?.id},e.createElement(ha,{product:c,themeColor:i,isDev:a,primaryTextColor:l,secondaryTextColor:s,themeTextColor:d,showQtySelector:!1,showEditOptionOnProducts:p,percentageOff:y,imageAspectSelector:b,showDeleteOnFreebies:g,removeFreebieFromCart:u,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:F,showDiscountOnMRP:!0,freeLabelText:A,isLargeScreen:L}))):e.createElement(Ca,{className:"yt-cart-product-card-wrapper",key:c?.key??c?.id},e.createElement(ha,{themeColor:i,handleDecrement:n,handleIncrement:r,removeCartItem:o,addCartItem:t,product:c,isDev:a,primaryTextColor:l,secondaryTextColor:s,showQtySelector:!c.properties?._isYtFreebie,showEditOptionOnProducts:p,removeFreebieFromCart:u,showDeleteOnFreebies:g,imageAspectSelector:b,cartComponentsCornerRadius:v,cartComponentsCornerType:w,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:F,showDiscountOnMRP:I,freeLabelText:A,isLargeScreen:L}))}),$&&W&&G&&e.createElement(wa,{name:G.name,minimumOrderValue:G.minimumOrderValue,currency:Z,themeColor:i,tertiaryColor:S,imageUrl:P?.milestoneImage?.path,criteria:D??"minimum_order_value",quantityThreshold:G.quantityThreshold}),er()&&B&&B.length>0?e.createElement("div",{className:"yt-cart-checkout-message yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:S,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:N,marginBottom:"4px",cursor:z?"pointer":"default"},onClick:()=>{z&&(window.location.href=z)}},B):e.createElement("div",{className:"yt-cart-products-list-separator",style:{display:"list-item",height:"12px",background:"#87878717"}}))};const ka=({bundleProducts:t})=>{const n=Ce(En);return e.createElement("div",{className:"yt-cart-bundle-container flex flex-col gap-y-2"},e.createElement("div",{className:"yt-cart-bundle-title flex items-center justify-center"},e.createElement("span",{className:"font-semibold"},"Save more with Bundle!")),e.createElement("div",{className:"yt-cart-bundle-products flex items-center justify-center gap-2 relative"},e.createElement("div",{className:"yt-cart-bundle-product-card w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{className:"yt-cart-bundle-product-image",style:{alignSelf:"center"},width:100,height:100,src:t[0].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},Un(t[0].title)),e.createElement("div",{className:"yt-cart-bundle-product-price"},e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},Dn(n,n?.currency),t[0].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},Dn(n,n?.currency),t[0].price)),t[0]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{className:"yt-cart-bundle-product-image",style:{alignSelf:"center"},width:100,height:100,src:t[1].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},Un(t[0].title)),e.createElement("div",{className:"yt-cart-bundle-product-price"},e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},Dn(n,n?.currency),t[1].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},Dn(n,n?.currency),t[1].price)),t[1]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"yt-cart-bundle-plus-icon absolute",style:{left:"50%",transform:"translateX(-50%)"}},e.createElement("img",{className:"yt-cart-bundle-plus-image",src:'<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="17.2797" cy="18.7208" r="15.5219" fill="#3A3A3A" stroke="#767676" stroke-width="1.51433"/>\n<path d="M15.5903 25.9172V12.1037H19.0827V25.9172H15.5903ZM10.4297 20.7566V17.2642H24.2433V20.7566H10.4297Z" fill="white"/>\n</svg>',alt:"Delivery Truck",height:"25px",width:"42px"}))),e.createElement("div",{className:"yt-cart-bundle-pricing flex flex-row justify-between items-center"},e.createElement("div",{className:"flex flex-row gap-x-4 items-center"},e.createElement("span",{className:"text-[#667085] text-[13px]"},"Total Price"),e.createElement("span",{className:"yt-cart-bundle-total-price"},e.createElement("span",{className:"font-bold text-black"},Dn(n,n?.currency),t[0].price+t[1].price)," ",e.createElement("span",{className:"text-[#868E96] text-[12px] line-through"},Dn(n,n?.currency),t[0].original_price+t[1].original_price))),e.createElement("span",{className:"text-[#1ADF5D] text-[10px]"},"save extra"," ",e.createElement("span",{className:"font-semibold"},Dn(n,n?.currency),t[0].original_price-t[0].price+(t[1].original_price-t[1].price)))),e.createElement("button",{className:"yt-cart-bundle-buy-button flex flex-row items-center bg-[#333333] gap-x-3 justify-center w-full py-1.5"},e.createElement(Lt,{color:"white"}),e.createElement("span",{className:"text-white uppercase text-[14px]"},"Buy Bundle at"," ",e.createElement("span",{className:"font-semibold"},Dn(n,n?.currency),t[0].price+t[1].price))))},Ta=({backgroundSubdued:r,themeColor:a,themeTextColor:i,primaryTextColor:l,cartComponentsCornerRadius:s,applyCouponCode:c,removeDiscount:d,enableConfetti:p,hideAppliedCodes:m})=>{const u=Ce(En),[g,y]=t(""),[f,x]=t(null),[h,b]=t(!1),[w,v]=t(!1),[C,E]=t(!1),k=Bn(),[T,S]=t(null),[N,F]=t(!1),[I,B]=t(!1),z=o(null);n(()=>{if(T){F(!0);const e=setTimeout(()=>{F(!1)},4e3),t=setTimeout(()=>{S(null)},4500);return()=>{clearTimeout(e),clearTimeout(t)}}F(!1)},[T]),n(()=>{if(u&&u.discount_codes&&f){const e=u.discount_codes.find(e=>e.code===f);e&&(e.applicable?(S({message:"Coupon applied successfully!",type:"success"}),p&&(B(!0),setTimeout(()=>B(!1),5e3))):S({message:"Coupon not applicable",type:"error"}),x(null))}},[u,f]);const $=async()=>{if(c&&g&&!h){S(null),b(!0),x(g);try{await c(g),y("")}catch(e){S({message:"Failed to apply coupon.",type:"error"}),x(null)}finally{b(!1)}}},P=async()=>{if(d&&!C){S(null),E(!0),k&&k(!0,!1,!1,!0);try{await d()}catch(e){S({message:"Failed to remove coupon.",type:"error"})}finally{k&&k(!1,!1,!1,!1),E(!1)}}},A="error"===T?.type,D=u?.discount_codes?.filter(e=>!1!==e?.applicable);return e.createElement("div",{className:"yt-cart-apply-container",ref:z,style:{marginTop:"10px",padding:"0 16px",marginBottom:"10px"}},I&&p&&e.createElement(lo,{particleCount:100,spread:160,origin:{y:.6},checkpointPosition:.5}),e.createElement("div",{className:"yt-cart-apply-input-wrapper",style:{display:"flex",alignItems:"stretch",border:A?"0.5px solid #FF4E4E":w?`1px solid ${a||"#007bff"}`:"1px solid #e0e0e0",borderRadius:s??4,transition:"border-color 0.5s ease-in-out",overflow:"hidden"}},e.createElement("input",{className:"yt-cart-apply-input",type:"text",placeholder:"Have a Coupon Code?",value:g,disabled:h,onFocus:()=>{v(!0),setTimeout(()=>{z.current&&window.innerWidth<=768&&z.current.scrollIntoView({behavior:"smooth",block:"nearest"})},300)},onBlur:()=>v(!1),onChange:e=>{y(e.target.value),T&&S(null)},onKeyDown:e=>{"Enter"===e.key&&$()},style:{flexGrow:1,border:"none",padding:"10px",outline:"none",fontSize:"14px",fontWeight:"bold",borderTopLeftRadius:s??4,borderBottomLeftRadius:s??4,backgroundColor:r,color:l,boxShadow:"none",cursor:h?"not-allowed":"auto",margin:"0"}}),e.createElement("button",{className:"yt-cart-apply-button",onClick:$,disabled:!g||h,style:{padding:"10px 15px",border:"none",backgroundColor:A?"#D98181":g?a||"#007bff":"#cccccc",color:g||A?i||"#ffffff":"#666666",cursor:!g||h?"not-allowed":"pointer",fontSize:"14px",fontWeight:"bold",borderTopRightRadius:s??4,borderBottomRightRadius:s??4,transition:"background-color 0.5s ease-in-out, opacity 0.2s ease-in-out",minWidth:"80px",display:"flex",justifyContent:"center",alignItems:"center",opacity:h?.7:1}},h?e.createElement(Ne,{color:i||"#ffffff",size:18}):"Apply")),T&&e.createElement("div",{className:"yt-cart-apply-status",style:{color:"success"===T.type?"#28a745":"#dc3545",fontSize:"12px",marginTop:"4px",fontStyle:"italic",transition:"opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out",opacity:N?1:0,transform:N?"translateY(0)":"translateY(-10px)",maxHeight:N?"50px":"0",overflow:"hidden"}},T.message),!m&&D&&D.length>0&&e.createElement("div",{className:"yt-cart-apply-applied-list",style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"8px"}},D.map(t=>e.createElement("div",{className:"yt-cart-apply-applied-item",key:t.code,style:{display:"flex",alignItems:"center",fontSize:"12px",fontStyle:"italic"}},e.createElement("div",{className:"yt-cart-apply-applied-badge",style:{display:"flex",alignItems:"center",color:"#333333",backgroundColor:r,paddingInlineStart:"6px",gap:"4px"}},e.createElement(Et,{size:12,color:"#4D4D4D"}),e.createElement("span",{className:"yt-cart-apply-code",style:{fontWeight:"bold",fontStyle:"normal"}},t.code)," applied!",e.createElement("button",{className:"yt-cart-apply-remove-button",onClick:P,disabled:C,style:{background:"#E2E2E2",border:"0.5px solid #B5B5B5",cursor:"pointer",marginLeft:"4px",padding:"0",display:"flex",alignItems:"center"}},C?e.createElement(Ne,{color:a||"#007bff",size:14}):e.createElement(De,{size:16})))))))},Sa="yt-coupon-selection-animations",Na=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Fa=e=>e?.trim().toLowerCase()??"",Ia=e=>e.couponType?.toLowerCase()??"",Ba=e=>"percentage_discount_coupon"===Ia(e),za=e=>"amount_discount_coupon"===Ia(e),$a=e=>"free_delivery"===Ia(e),Pa=e=>{const t=Number(e);return Number.isFinite(t)&&t>0?t:0},Aa=e=>{const t=Number(e.toFixed(2)),n=Number.isInteger(t)?t.toFixed(0):t.toFixed(2);return Jn(n)},Da=e=>{const t=e.resolvedCollectionNames;return t&&t.length>0?1===t.length?`Applicable on '${t[0]}' collection only.`:`Applicable on '${t.join("', '")}' collections.`:e.allowedCollections?.ids&&e.allowedCollections.ids.length>0?"Applicable on select collections.":"Applicable storewide"},_a=(e,t,n,r)=>{const o=((e,t)=>{const n=Number(e.estimatedSavings);if(Number.isFinite(n)&&n>=0)return n;const r=(e.allowedCollections?.ids?.length??0)>0,o=Number(e.applicableSubtotal),a=Number.isFinite(o)&&o>=0?o:r?0:Pa(t);return Ba(e)?a*(Pa(e.discountPercentage)/100):za(e)?Math.min(Pa(e.discountValue),a):$a(e)?Pa(e.discountValue):0})(e,n),a=`${t}${Aa(o)}`,i=!1!==e.isEligible;let l=e.name;Ba(e)&&e.discountPercentage?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${e.discountPercentage}% ${r.couponTextSuffix}`:`Get an additional ${e.discountPercentage}% off`:za(e)&&e.discountValue?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${t}${Aa(e.discountValue)} ${r.couponTextSuffix}`:`Get an additional ${t}${Aa(e.discountValue)} off`:$a(e)&&(l="Get free shipping");let s="";return"minimum_quantity"===e.customCartProgressBarCriteria?e.quantityThreshold&&(s=`On orders with ${e.quantityThreshold}+ items.`):e.minimumOrderValue&&(s=`On purchases above ${t}${Aa(e.minimumOrderValue)}.`),{coupon:e,isUnlocked:i,estimatedSavings:o,title:l,subtitle:s,bannerTitle:o>0?r.preCollectionBannerPrefixText&&r.preCollectionBannerSuffixText?`${r.preCollectionBannerPrefixText} ${a} ${r.preCollectionBannerSuffixText}`:`Save extra ${a} on this order`:$a(e)?"Claim free shipping on this order":l,appliedSavingsText:o>0?`saved extra ${a} off`:$a(e)?"saved extra on shipping":Ba(e)&&e.discountPercentage?`saved extra ${e.discountPercentage}% off`:"",bannerSavingsText:o>0?r.postCollectionBannerPrefixText&&r.postCollectionBannerSuffixText?`${r.postCollectionBannerPrefixText} ${a} ${r.postCollectionBannerSuffixText}`:`saved additional ${a} on your purchase`:$a(e)?"saved additional shipping on your purchase":"coupon applied on your purchase",applicabilityText:Da(e)}},La=({rewardCoupons:a,couponSelectionData:i,applyCouponCode:l,removeDiscount:s,enableConfetti:c,backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,ctaButtonBackgroundColor:g,ctaButtonTextColor:y,cartComponentsCornerRadius:f})=>{const x=Ce(En),h=o(null),b=o(null),w=o(null),v=o(!1),C=o(null),[E,k]=t(!1),[T,S]=t(!1),[N,F]=t(null),[I,B]=t(null),[z,$]=t(null),[P,A]=t(!1),[D,_]=t(null);n(()=>((()=>{if(document.getElementById(Sa))return;const e=document.createElement("style");e.id=Sa,e.textContent="\n @keyframes ytSlideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n @keyframes ytSlideDown {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n }\n @keyframes ytSuccessPulse {\n 0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.4); }\n 50% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }\n 100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }\n }\n @keyframes ytCheckFade {\n 0% { opacity: 0; transform: scale(0.5); }\n 50% { opacity: 1; transform: scale(1.2); }\n 100% { opacity: 1; transform: scale(1); }\n }\n ",document.head.appendChild(e)})(),()=>{Na(h),Na(b),Na(w)}),[]);const L=r(()=>x?.discount_codes?.filter(e=>!1!==e?.applicable)??[],[x?.discount_codes]),R=L[0],O=Dn(x,x?.currency),M=$n(x?.items_subtotal_price??x?.original_total_price??x?.total_price??0,x?.currency??"INR"),V=r(()=>((e,t,n,r,o)=>{const a=new Set(t.map(e=>Fa(e?.code)).filter(Boolean)),i=e.map(e=>_a(e,n,r,o));let l;const s=[];let c;for(const e of i)!l&&a.has(Fa(e.coupon.name))&&(l=e),e.isUnlocked&&(s.push(e),(!c||e.estimatedSavings>c.estimatedSavings)&&(c=e));return{couponDisplayModels:i,collectedCouponDisplay:l,unlockedCouponDisplays:s,bestUnlockedCouponDisplay:c,eligibleCouponCountText:1===s.length?"1 coupon eligible for your order":`${s.length}+ coupons eligible for your order`}})(a,L,O,M,i),[L,M,i,O,a]),W=()=>{C.current=null,B(null),F(null),Na(w)},j=()=>{S(!1),k(!0)},H=()=>{T||(Na(h),S(!0),h.current=setTimeout(()=>{h.current=null,v.current?window.history.back():(k(!1),S(!1))},280))};n(()=>{const e=V.collectedCouponDisplay;e&&C.current===e.coupon.couponTemplateId&&(W(),$(null),_(e.coupon.couponTemplateId),Na(b),b.current=setTimeout(()=>{_(null),H(),b.current=null},1200))},[V.collectedCouponDisplay,T]),n(()=>{if(!E)return;v.current||(window.history.pushState({couponSelectionOpen:!0},""),v.current=!0);const e=()=>{v.current=!1,Na(h),k(!1),S(!1)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[E]);const Q=async e=>{if(null===N&&!P&&!1!==e.isEligible&&e.name)if(l){Na(w),$(null),F(e.couponTemplateId),B(e.couponTemplateId),C.current=e.couponTemplateId;try{await l(e.name),C.current===e.couponTemplateId&&(w.current=setTimeout(()=>{C.current===e.couponTemplateId&&(C.current=null,B(null),F(null),$(e.couponTemplateId)),w.current=null},2500))}catch(t){console.error("Failed to collect coupon:",t),C.current=null,B(null),F(null),$(e.couponTemplateId)}}else $(e.couponTemplateId)},Y=async()=>{if(s&&!P){A(!0);try{await s(),_(null),$(null),W()}catch(e){console.error("Failed to remove coupon:",e)}finally{A(!1)}}},G=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),j())},Z=t=>{const{coupon:n}=t,r=n.couponTemplateId===V.collectedCouponDisplay?.coupon.couponTemplateId,o=N===n.couponTemplateId;n.couponTemplateId;const a=D===n.couponTemplateId,l=!r&&!t.isUnlocked,c=z===n.couponTemplateId,d=o||P||l||r&&!s,m=r?"Remove":i.applyButtonText||"Apply";return e.createElement("div",{className:`yt-cart-coupon-selection-card${r?" yt-cart-coupon-selection-card-selected":""}${l?" yt-cart-coupon-selection-card-ineligible":""}`,key:n.couponTemplateId,style:{border:r?`1.5px solid ${p||"#4A7C59"}`:"1px solid #E8E8E8",borderRadius:f??8,overflow:"hidden",marginBottom:"12px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",animation:a?"ytSuccessPulse 0.6s ease-out":void 0,transition:"border-color 0.3s ease, box-shadow 0.3s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-body",style:{padding:"14px 16px",background:"linear-gradient(135deg, #FFFFFF 60%, #FFF5F5 100%)",position:"relative"}},a&&e.createElement("div",{className:"yt-cart-coupon-selection-card-checkmark",style:{position:"absolute",top:"10px",right:"10px",width:24,height:24,borderRadius:"50%",backgroundColor:"#2E7D32",display:"flex",alignItems:"center",justifyContent:"center",animation:"ytCheckFade 0.4s ease-out forwards"}},e.createElement("span",{className:"yt-cart-coupon-selection-checkmark",style:{color:"#fff",fontSize:"14px",fontWeight:700}},"✓")),e.createElement("div",{className:"yt-cart-coupon-selection-card-header",style:{display:"flex",alignItems:"flex-start",gap:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-icon",style:{width:32,height:32,borderRadius:4,backgroundColor:"#FDE8E8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(ge,{size:18,color:l?"#6b7280":"#8B0000"})),e.createElement("div",{className:"yt-cart-coupon-selection-card-text",style:{flex:1}},e.createElement("div",{className:"yt-cart-coupon-selection-card-title",style:{fontSize:"14px",fontWeight:600,color:u||"#1A1A1A",marginBottom:"2px"}},t.title),e.createElement("div",{className:"yt-cart-coupon-selection-card-subtitle",style:{fontSize:"12px",color:l?"#6b7280":"#2E7D32",fontWeight:500}},t.subtitle))),e.createElement("div",{className:"yt-cart-coupon-selection-code-row",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"12px",border:"1px solid #E0E0E0",borderRadius:f??6,padding:"8px 12px",backgroundColor:"#FAFAFA"}},e.createElement("span",{className:"yt-cart-coupon-selection-code",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",letterSpacing:"0.5px"}},n.name),e.createElement("button",{className:"yt-cart-coupon-selection-action","aria-label":r?`Remove ${n.name}`:`Apply ${n.name}`,onClick:e=>{e.stopPropagation(),r?Y():Q(n)},disabled:d,style:{background:"none",border:"none",color:l?"#6b7280":"#8B0000",fontSize:"14px",fontWeight:600,cursor:d?"not-allowed":"pointer",padding:0,display:"flex",alignItems:"center",gap:"4px"}},o||r&&P?e.createElement(Ne,{color:"#8B0000",size:14}):m)),c&&e.createElement("div",{className:"yt-cart-coupon-selection-error",style:{color:"#B91C1C",fontSize:"12px",marginTop:"8px"}},"Could not apply this coupon. Try another offer.")),e.createElement("div",{className:"yt-cart-coupon-selection-applicability",style:{padding:"6px 16px",fontSize:"11px",fontWeight:500,textAlign:"center",backgroundColor:"#FFF0F0",color:l?"#6b7280":"#8B0000",borderTop:"1px solid #FECACA"}},t.applicabilityText))};return e.createElement(e.Fragment,null,(()=>{const t=V.collectedCouponDisplay,n=V.bestUnlockedCouponDisplay,r=!!t||!!R,o=V.unlockedCouponDisplays.length>0,a=!r&&!!n,l=n?.coupon,s=l&&N===l.couponTemplateId,c=t?.coupon.name??R?.code??"",d=t?"#2E7D32":"#8B0000",x=t?"#2E7D32":"#666666";return e.createElement("div",{className:"yt-cart-coupon-selection-banner-container",style:{padding:"0 16px",marginTop:"10px",marginBottom:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner",onClick:j,onKeyDown:G,role:"button",tabIndex:0,"aria-label":"Open coupons and offers",style:{display:"flex",alignItems:"center",padding:"12px 14px",border:"1px dashed #E8E8E8",borderRadius:f??8,cursor:"pointer",backgroundColor:"#FFFFFF",transition:"box-shadow 0.2s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner-icon",style:{width:36,height:36,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginRight:"12px",transition:"background-color 0.3s ease"}},t?e.createElement(Et,{size:20,color:d}):e.createElement(ge,{size:20,color:d})),e.createElement("div",{className:"yt-cart-coupon-selection-banner-content",style:{flex:1,minWidth:0}},r?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",color:u||"#1A1A1A"}},e.createElement("span",{className:"yt-cart-coupon-selection-banner-code",style:{fontWeight:600}},c),e.createElement("span",{className:"yt-cart-coupon-selection-banner-applied",style:{fontStyle:"italic"}}," ","applied!")),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:x,marginTop:"1px",fontStyle:t?"italic":"normal"}},t?.bannerSavingsText??"coupon applied on your purchase")):a&&n?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",lineHeight:1.25}},n.bannerTitle),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#8B0000",marginTop:"2px"}},"view all offers →")):e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#888888",marginTop:"1px"}},"view available offers"))),a&&l?e.createElement("button",{className:"yt-cart-coupon-selection-banner-collect","aria-label":`Apply ${l.name}`,onClick:e=>{e.stopPropagation(),Q(l)},disabled:!!s||P,style:{borderRadius:f??8,border:`1.5px solid ${g||p||"#315A9F"}`,backgroundColor:g||p||"#EEF4FF",color:y||m||"#FFFFFF",fontSize:"16px",fontWeight:700,cursor:s||P?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"12px",flexShrink:0,padding:s?"6px":"5px 9px"}},s?e.createElement(Ne,{color:y||m||"#FFFFFF",size:16}):i.applyButtonText||"Apply"):e.createElement(q,{className:"yt-cart-coupon-selection-banner-arrow",size:14,color:"#888888"})),!r&&o&&e.createElement("div",{className:"yt-cart-coupon-selection-eligible-count",style:{textAlign:"center",fontSize:"12px",fontWeight:600,color:"#8B0000",backgroundColor:"#FFF0F0",padding:"6px 0",borderRadius:`0 0 ${f??8}px ${f??8}px`,marginTop:"-1px",border:"1px dashed #FECACA",borderTop:"none"}},V.eligibleCouponCountText))})(),E&&(()=>{const t=V.unlockedCouponDisplays.length>0;return e.createElement("div",{className:"yt-cart-coupon-selection-overlay",style:{position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",backgroundColor:"#FFFFFF",zIndex:2147483645,display:"flex",flexDirection:"column",animation:T?"ytSlideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards":"ytSlideUp 0.32s cubic-bezier(0, 0, 0.2, 1) forwards"}},e.createElement("div",{className:"yt-cart-coupon-selection-overlay-header",style:{display:"flex",alignItems:"center",padding:"16px",flexShrink:0}},e.createElement("button",{className:"yt-cart-coupon-selection-back-button","aria-label":"Close coupons and offers",onClick:H,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",marginRight:"12px"}},e.createElement(U,{size:18,color:u||"#1A1A1A"})),e.createElement("span",{className:"yt-cart-coupon-selection-overlay-title",style:{fontSize:"18px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers")),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-overlay-content",style:{flex:1,overflowY:"auto"}},R&&e.createElement("div",{className:"yt-cart-coupon-selection-applied-badge",style:{display:"flex",alignItems:"center",padding:"12px 16px",gap:"8px",flexWrap:"wrap"}},e.createElement(Et,{size:16,color:"#333333"}),e.createElement("span",{className:"yt-cart-coupon-selection-applied-code",style:{fontWeight:700,fontSize:"14px",color:u||"#1A1A1A"}},R.code),e.createElement("span",{className:"yt-cart-coupon-selection-applied-text",style:{fontStyle:"italic",fontSize:"14px",color:u||"#1A1A1A"}},"applied!"),e.createElement("button",{className:"yt-cart-coupon-selection-applied-remove","aria-label":`Remove ${R.code}`,onClick:Y,disabled:P||!s,style:{background:"none",border:"none",cursor:P||!s?"not-allowed":"pointer",padding:"2px",display:"flex",alignItems:"center"}},P?e.createElement(Ne,{color:"#666",size:14}):e.createElement(De,{size:18,color:"#666666"})),V.collectedCouponDisplay?.appliedSavingsText&&e.createElement("span",{className:"yt-cart-coupon-selection-applied-savings",style:{fontSize:"14px",color:"#2E7D32",fontStyle:"italic"}},V.collectedCouponDisplay.appliedSavingsText)),e.createElement("div",{className:"yt-cart-coupon-selection-apply-section"},e.createElement(Ta,{backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,cartComponentsCornerRadius:f,applyCouponCode:l,removeDiscount:s,enableConfetti:c,hideAppliedCodes:!0})),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-collect-section",style:{padding:"16px"}},e.createElement("div",{className:"yt-cart-coupon-selection-collect-title",style:{fontSize:"16px",fontWeight:700,color:u||"#1A1A1A",marginBottom:"4px"}},t?"Collect Coupon":"Available Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-collect-subtitle",style:{fontSize:"13px",color:"#888888",marginBottom:"16px"}},t?"Pick any one coupon deal":"No coupons are currently unlocked for this cart"),e.createElement("div",{className:"yt-cart-coupon-selection-list"},V.couponDisplayModels.map(Z)))))})())},Ra=Ee("showGSTInput",!1),Oa=c.div`
1354
+ `,Ea=({addCartItem:t,handleDecrement:n,handleIncrement:r,removeCartItem:o,isDev:a,themeColor:i,primaryTextColor:l,secondaryTextColor:s,freeProduct:c,themeTextColor:d,showEditOptionOnProducts:p,productPercentageOffMapping:m,removeFreebieFromCart:u,showDeleteOnFreebies:g,freeProductAdjustedCartTotal:y,freebieCouponTemplates:f,cartCheckpoints:x,freebieFlowCheckpoints:h,imageAspectSelector:b,cartComponentsCornerType:w,cartComponentsCornerRadius:v,giftWrapProductId:C,giftWrapVariantId:E,showGiftWrapAsLineItem:k=!1,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:F,showDiscountOnMRP:I,checkoutSectionMessage:B,checkoutSectionMessageRedirectLink:z,showFreebieMilestone:$,freebieMilestoneData:P,freeLabelText:A,showVariantsInClaimSection:D,customCartProgressBarCriteria:_,effectiveQuantityForProgressBar:L,isLargeScreen:R})=>{const O=Ce(En),{cartLoading:M}=In(),V=!M.cartLoading&&O?.items,W=(y??Number(O?.items_subtotal_price))/100;let j=!0,H=0;if(O?.items?.length>0)for(const e of O.items)e?.properties?._isYtFreebie&&(H+=e?.quantity);if(H===O?.item_count&&(j=!1),!V&&0===O?.item_count)return e.createElement(va,null);if(!(V&&0!==O?.item_count||O?.items))return null;const q=P?.campaignFilter??"all_campaigns";let U=[];"all_campaigns"===q?U=f??[]:"progress_bar_tiers"===q?U=x??[]:"freebie_campaigns"===q&&(U=h??[]);const Q="minimum_order_value"!==(_??"minimum_order_value"),Y=Q?L??O?.item_count??0:W,G=e=>Q?e.quantityThreshold:e.minimumOrderValue,Z=Array.isArray(U)?U.filter(e=>"free_product"===e?.couponType).slice().sort((e,t)=>G(e)-G(t)).find(e=>G(e)>Y):void 0,X=Dn(O,O?.currency);return e.createElement(e.Fragment,null,O.items.filter(e=>!!k||!(String(e?.id)===Xn(String(C))||String(e?.id)===Xn(String(E)))).map(c=>{const y=m?.[c?.key],x=f?.find(e=>e?._allVariantIds?.includes(String(c.id)));let h=!1;if(x&&W>=x.minimumOrderValue&&0===c?.line_price&&(h=!0),!k&&(String(c?.id)===Xn(String(C))||Xn(String(E))===String(c?.id)))return null;const B=c.discounts&&c.discounts.length>0;return c.properties?._isYtFreebie&&(y||h)&&B&&j?e.createElement(e.Fragment,null,e.createElement(Ca,{className:"yt-cart-product-card-wrapper",key:c?.key??c?.id},e.createElement(ha,{product:c,themeColor:i,isDev:a,primaryTextColor:l,secondaryTextColor:s,themeTextColor:d,showQtySelector:!1,showEditOptionOnProducts:p,percentageOff:y,imageAspectSelector:b,showDeleteOnFreebies:g,removeFreebieFromCart:u,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:F,showDiscountOnMRP:!0,freeLabelText:A,showVariantsInClaimSection:D,isLargeScreen:R}))):e.createElement(Ca,{className:"yt-cart-product-card-wrapper",key:c?.key??c?.id},e.createElement(ha,{themeColor:i,handleDecrement:n,handleIncrement:r,removeCartItem:o,addCartItem:t,product:c,isDev:a,primaryTextColor:l,secondaryTextColor:s,showQtySelector:!c.properties?._isYtFreebie,showEditOptionOnProducts:p,removeFreebieFromCart:u,showDeleteOnFreebies:g,imageAspectSelector:b,cartComponentsCornerRadius:v,cartComponentsCornerType:w,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:F,showDiscountOnMRP:I,freeLabelText:A,showVariantsInClaimSection:D,isLargeScreen:R}))}),$&&j&&Z&&e.createElement(wa,{name:Z.name,minimumOrderValue:Z.minimumOrderValue,currency:X,themeColor:i,tertiaryColor:S,imageUrl:P?.milestoneImage?.path,criteria:_??"minimum_order_value",quantityThreshold:Z.quantityThreshold}),er()&&B&&B.length>0?e.createElement("div",{className:"yt-cart-checkout-message yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:S,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:N,marginBottom:"4px",cursor:z?"pointer":"default"},onClick:()=>{z&&(window.location.href=z)}},B):e.createElement("div",{className:"yt-cart-products-list-separator",style:{display:"list-item",height:"12px",background:"#87878717"}}))};const ka=({bundleProducts:t})=>{const n=Ce(En);return e.createElement("div",{className:"yt-cart-bundle-container flex flex-col gap-y-2"},e.createElement("div",{className:"yt-cart-bundle-title flex items-center justify-center"},e.createElement("span",{className:"font-semibold"},"Save more with Bundle!")),e.createElement("div",{className:"yt-cart-bundle-products flex items-center justify-center gap-2 relative"},e.createElement("div",{className:"yt-cart-bundle-product-card w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{className:"yt-cart-bundle-product-image",style:{alignSelf:"center"},width:100,height:100,src:t[0].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},Un(t[0].title)),e.createElement("div",{className:"yt-cart-bundle-product-price"},e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},Dn(n,n?.currency),t[0].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},Dn(n,n?.currency),t[0].price)),t[0]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{className:"yt-cart-bundle-product-image",style:{alignSelf:"center"},width:100,height:100,src:t[1].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},Un(t[0].title)),e.createElement("div",{className:"yt-cart-bundle-product-price"},e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},Dn(n,n?.currency),t[1].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},Dn(n,n?.currency),t[1].price)),t[1]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"yt-cart-bundle-plus-icon absolute",style:{left:"50%",transform:"translateX(-50%)"}},e.createElement("img",{className:"yt-cart-bundle-plus-image",src:'<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="17.2797" cy="18.7208" r="15.5219" fill="#3A3A3A" stroke="#767676" stroke-width="1.51433"/>\n<path d="M15.5903 25.9172V12.1037H19.0827V25.9172H15.5903ZM10.4297 20.7566V17.2642H24.2433V20.7566H10.4297Z" fill="white"/>\n</svg>',alt:"Delivery Truck",height:"25px",width:"42px"}))),e.createElement("div",{className:"yt-cart-bundle-pricing flex flex-row justify-between items-center"},e.createElement("div",{className:"flex flex-row gap-x-4 items-center"},e.createElement("span",{className:"text-[#667085] text-[13px]"},"Total Price"),e.createElement("span",{className:"yt-cart-bundle-total-price"},e.createElement("span",{className:"font-bold text-black"},Dn(n,n?.currency),t[0].price+t[1].price)," ",e.createElement("span",{className:"text-[#868E96] text-[12px] line-through"},Dn(n,n?.currency),t[0].original_price+t[1].original_price))),e.createElement("span",{className:"text-[#1ADF5D] text-[10px]"},"save extra"," ",e.createElement("span",{className:"font-semibold"},Dn(n,n?.currency),t[0].original_price-t[0].price+(t[1].original_price-t[1].price)))),e.createElement("button",{className:"yt-cart-bundle-buy-button flex flex-row items-center bg-[#333333] gap-x-3 justify-center w-full py-1.5"},e.createElement(Lt,{color:"white"}),e.createElement("span",{className:"text-white uppercase text-[14px]"},"Buy Bundle at"," ",e.createElement("span",{className:"font-semibold"},Dn(n,n?.currency),t[0].price+t[1].price))))},Ta=({backgroundSubdued:r,themeColor:a,themeTextColor:i,primaryTextColor:l,cartComponentsCornerRadius:s,applyCouponCode:c,removeDiscount:d,enableConfetti:p,hideAppliedCodes:m})=>{const u=Ce(En),[g,y]=t(""),[f,x]=t(null),[h,b]=t(!1),[w,v]=t(!1),[C,E]=t(!1),k=Bn(),[T,S]=t(null),[N,F]=t(!1),[I,B]=t(!1),z=o(null);n(()=>{if(T){F(!0);const e=setTimeout(()=>{F(!1)},4e3),t=setTimeout(()=>{S(null)},4500);return()=>{clearTimeout(e),clearTimeout(t)}}F(!1)},[T]),n(()=>{if(u&&u.discount_codes&&f){const e=u.discount_codes.find(e=>e.code===f);e&&(e.applicable?(S({message:"Coupon applied successfully!",type:"success"}),p&&(B(!0),setTimeout(()=>B(!1),5e3))):S({message:"Coupon not applicable",type:"error"}),x(null))}},[u,f]);const $=async()=>{if(c&&g&&!h){S(null),b(!0),x(g);try{await c(g),y("")}catch(e){S({message:"Failed to apply coupon.",type:"error"}),x(null)}finally{b(!1)}}},P=async()=>{if(d&&!C){S(null),E(!0),k&&k(!0,!1,!1,!0);try{await d()}catch(e){S({message:"Failed to remove coupon.",type:"error"})}finally{k&&k(!1,!1,!1,!1),E(!1)}}},A="error"===T?.type,D=u?.discount_codes?.filter(e=>!1!==e?.applicable);return e.createElement("div",{className:"yt-cart-apply-container",ref:z,style:{marginTop:"10px",padding:"0 16px",marginBottom:"10px"}},I&&p&&e.createElement(lo,{particleCount:100,spread:160,origin:{y:.6},checkpointPosition:.5}),e.createElement("div",{className:"yt-cart-apply-input-wrapper",style:{display:"flex",alignItems:"stretch",border:A?"0.5px solid #FF4E4E":w?`1px solid ${a||"#007bff"}`:"1px solid #e0e0e0",borderRadius:s??4,transition:"border-color 0.5s ease-in-out",overflow:"hidden"}},e.createElement("input",{className:"yt-cart-apply-input",type:"text",placeholder:"Have a Coupon Code?",value:g,disabled:h,onFocus:()=>{v(!0),setTimeout(()=>{z.current&&window.innerWidth<=768&&z.current.scrollIntoView({behavior:"smooth",block:"nearest"})},300)},onBlur:()=>v(!1),onChange:e=>{y(e.target.value),T&&S(null)},onKeyDown:e=>{"Enter"===e.key&&$()},style:{flexGrow:1,border:"none",padding:"10px",outline:"none",fontSize:"14px",fontWeight:"bold",borderTopLeftRadius:s??4,borderBottomLeftRadius:s??4,backgroundColor:r,color:l,boxShadow:"none",cursor:h?"not-allowed":"auto",margin:"0"}}),e.createElement("button",{className:"yt-cart-apply-button",onClick:$,disabled:!g||h,style:{padding:"10px 15px",border:"none",backgroundColor:A?"#D98181":g?a||"#007bff":"#cccccc",color:g||A?i||"#ffffff":"#666666",cursor:!g||h?"not-allowed":"pointer",fontSize:"14px",fontWeight:"bold",borderTopRightRadius:s??4,borderBottomRightRadius:s??4,transition:"background-color 0.5s ease-in-out, opacity 0.2s ease-in-out",minWidth:"80px",display:"flex",justifyContent:"center",alignItems:"center",opacity:h?.7:1}},h?e.createElement(Ne,{color:i||"#ffffff",size:18}):"Apply")),T&&e.createElement("div",{className:"yt-cart-apply-status",style:{color:"success"===T.type?"#28a745":"#dc3545",fontSize:"12px",marginTop:"4px",fontStyle:"italic",transition:"opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out",opacity:N?1:0,transform:N?"translateY(0)":"translateY(-10px)",maxHeight:N?"50px":"0",overflow:"hidden"}},T.message),!m&&D&&D.length>0&&e.createElement("div",{className:"yt-cart-apply-applied-list",style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"8px"}},D.map(t=>e.createElement("div",{className:"yt-cart-apply-applied-item",key:t.code,style:{display:"flex",alignItems:"center",fontSize:"12px",fontStyle:"italic"}},e.createElement("div",{className:"yt-cart-apply-applied-badge",style:{display:"flex",alignItems:"center",color:"#333333",backgroundColor:r,paddingInlineStart:"6px",gap:"4px"}},e.createElement(Et,{size:12,color:"#4D4D4D"}),e.createElement("span",{className:"yt-cart-apply-code",style:{fontWeight:"bold",fontStyle:"normal"}},t.code)," applied!",e.createElement("button",{className:"yt-cart-apply-remove-button",onClick:P,disabled:C,style:{background:"#E2E2E2",border:"0.5px solid #B5B5B5",cursor:"pointer",marginLeft:"4px",padding:"0",display:"flex",alignItems:"center"}},C?e.createElement(Ne,{color:a||"#007bff",size:14}):e.createElement(De,{size:16})))))))},Sa="yt-coupon-selection-animations",Na=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Fa=e=>e?.trim().toLowerCase()??"",Ia=e=>e.couponType?.toLowerCase()??"",Ba=e=>"percentage_discount_coupon"===Ia(e),za=e=>"amount_discount_coupon"===Ia(e),$a=e=>"free_delivery"===Ia(e),Pa=e=>{const t=Number(e);return Number.isFinite(t)&&t>0?t:0},Aa=e=>{const t=Number(e.toFixed(2)),n=Number.isInteger(t)?t.toFixed(0):t.toFixed(2);return Jn(n)},Da=e=>{const t=e.resolvedCollectionNames;return t&&t.length>0?1===t.length?`Applicable on '${t[0]}' collection only.`:`Applicable on '${t.join("', '")}' collections.`:e.allowedCollections?.ids&&e.allowedCollections.ids.length>0?"Applicable on select collections.":"Applicable storewide"},_a=(e,t,n,r)=>{const o=((e,t)=>{const n=Number(e.estimatedSavings);if(Number.isFinite(n)&&n>=0)return n;const r=(e.allowedCollections?.ids?.length??0)>0,o=Number(e.applicableSubtotal),a=Number.isFinite(o)&&o>=0?o:r?0:Pa(t);return Ba(e)?a*(Pa(e.discountPercentage)/100):za(e)?Math.min(Pa(e.discountValue),a):$a(e)?Pa(e.discountValue):0})(e,n),a=`${t}${Aa(o)}`,i=!1!==e.isEligible;let l=e.name;Ba(e)&&e.discountPercentage?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${e.discountPercentage}% ${r.couponTextSuffix}`:`Get an additional ${e.discountPercentage}% off`:za(e)&&e.discountValue?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${t}${Aa(e.discountValue)} ${r.couponTextSuffix}`:`Get an additional ${t}${Aa(e.discountValue)} off`:$a(e)&&(l="Get free shipping");let s="";return"minimum_quantity"===e.customCartProgressBarCriteria?e.quantityThreshold&&(s=`On orders with ${e.quantityThreshold}+ items.`):e.minimumOrderValue&&(s=`On purchases above ${t}${Aa(e.minimumOrderValue)}.`),{coupon:e,isUnlocked:i,estimatedSavings:o,title:l,subtitle:s,bannerTitle:o>0?r.preCollectionBannerPrefixText&&r.preCollectionBannerSuffixText?`${r.preCollectionBannerPrefixText} ${a} ${r.preCollectionBannerSuffixText}`:`Save extra ${a} on this order`:$a(e)?"Claim free shipping on this order":l,appliedSavingsText:o>0?`saved extra ${a} off`:$a(e)?"saved extra on shipping":Ba(e)&&e.discountPercentage?`saved extra ${e.discountPercentage}% off`:"",bannerSavingsText:o>0?r.postCollectionBannerPrefixText&&r.postCollectionBannerSuffixText?`${r.postCollectionBannerPrefixText} ${a} ${r.postCollectionBannerSuffixText}`:`saved additional ${a} on your purchase`:$a(e)?"saved additional shipping on your purchase":"coupon applied on your purchase",applicabilityText:Da(e)}},La=({rewardCoupons:a,couponSelectionData:i,applyCouponCode:l,removeDiscount:s,enableConfetti:c,backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,ctaButtonBackgroundColor:g,ctaButtonTextColor:y,cartComponentsCornerRadius:f})=>{const x=Ce(En),h=o(null),b=o(null),w=o(null),v=o(!1),C=o(null),[E,k]=t(!1),[T,S]=t(!1),[N,F]=t(null),[I,B]=t(null),[z,$]=t(null),[P,A]=t(!1),[D,_]=t(null);n(()=>((()=>{if(document.getElementById(Sa))return;const e=document.createElement("style");e.id=Sa,e.textContent="\n @keyframes ytSlideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n @keyframes ytSlideDown {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n }\n @keyframes ytSuccessPulse {\n 0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.4); }\n 50% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }\n 100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }\n }\n @keyframes ytCheckFade {\n 0% { opacity: 0; transform: scale(0.5); }\n 50% { opacity: 1; transform: scale(1.2); }\n 100% { opacity: 1; transform: scale(1); }\n }\n ",document.head.appendChild(e)})(),()=>{Na(h),Na(b),Na(w)}),[]);const L=r(()=>x?.discount_codes?.filter(e=>!1!==e?.applicable)??[],[x?.discount_codes]),R=L[0],O=Dn(x,x?.currency),M=$n(x?.items_subtotal_price??x?.original_total_price??x?.total_price??0,x?.currency??"INR"),V=r(()=>((e,t,n,r,o)=>{const a=new Set(t.map(e=>Fa(e?.code)).filter(Boolean)),i=e.map(e=>_a(e,n,r,o));let l;const s=[];let c;for(const e of i)!l&&a.has(Fa(e.coupon.name))&&(l=e),e.isUnlocked&&(s.push(e),(!c||e.estimatedSavings>c.estimatedSavings)&&(c=e));return{couponDisplayModels:i,collectedCouponDisplay:l,unlockedCouponDisplays:s,bestUnlockedCouponDisplay:c,eligibleCouponCountText:1===s.length?"1 coupon eligible for your order":`${s.length}+ coupons eligible for your order`}})(a,L,O,M,i),[L,M,i,O,a]),W=()=>{C.current=null,B(null),F(null),Na(w)},j=()=>{S(!1),k(!0)},H=()=>{T||(Na(h),S(!0),h.current=setTimeout(()=>{h.current=null,v.current?window.history.back():(k(!1),S(!1))},280))};n(()=>{const e=V.collectedCouponDisplay;e&&C.current===e.coupon.couponTemplateId&&(W(),$(null),_(e.coupon.couponTemplateId),Na(b),b.current=setTimeout(()=>{_(null),H(),b.current=null},1200))},[V.collectedCouponDisplay,T]),n(()=>{if(!E)return;v.current||(window.history.pushState({couponSelectionOpen:!0},""),v.current=!0);const e=()=>{v.current=!1,Na(h),k(!1),S(!1)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[E]);const Q=async e=>{if(null===N&&!P&&!1!==e.isEligible&&e.name)if(l){Na(w),$(null),F(e.couponTemplateId),B(e.couponTemplateId),C.current=e.couponTemplateId;try{await l(e.name),C.current===e.couponTemplateId&&(w.current=setTimeout(()=>{C.current===e.couponTemplateId&&(C.current=null,B(null),F(null),$(e.couponTemplateId)),w.current=null},2500))}catch(t){console.error("Failed to collect coupon:",t),C.current=null,B(null),F(null),$(e.couponTemplateId)}}else $(e.couponTemplateId)},Y=async()=>{if(s&&!P){A(!0);try{await s(),_(null),$(null),W()}catch(e){console.error("Failed to remove coupon:",e)}finally{A(!1)}}},G=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),j())},Z=t=>{const{coupon:n}=t,r=n.couponTemplateId===V.collectedCouponDisplay?.coupon.couponTemplateId,o=N===n.couponTemplateId;n.couponTemplateId;const a=D===n.couponTemplateId,l=!r&&!t.isUnlocked,c=z===n.couponTemplateId,d=o||P||l||r&&!s,m=r?"Remove":i.applyButtonText||"Apply";return e.createElement("div",{className:`yt-cart-coupon-selection-card${r?" yt-cart-coupon-selection-card-selected":""}${l?" yt-cart-coupon-selection-card-ineligible":""}`,key:n.couponTemplateId,style:{border:r?`1.5px solid ${p||"#4A7C59"}`:"1px solid #E8E8E8",borderRadius:f??8,overflow:"hidden",marginBottom:"12px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",animation:a?"ytSuccessPulse 0.6s ease-out":void 0,transition:"border-color 0.3s ease, box-shadow 0.3s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-body",style:{padding:"14px 16px",background:"linear-gradient(135deg, #FFFFFF 60%, #FFF5F5 100%)",position:"relative"}},a&&e.createElement("div",{className:"yt-cart-coupon-selection-card-checkmark",style:{position:"absolute",top:"10px",right:"10px",width:24,height:24,borderRadius:"50%",backgroundColor:"#2E7D32",display:"flex",alignItems:"center",justifyContent:"center",animation:"ytCheckFade 0.4s ease-out forwards"}},e.createElement("span",{className:"yt-cart-coupon-selection-checkmark",style:{color:"#fff",fontSize:"14px",fontWeight:700}},"✓")),e.createElement("div",{className:"yt-cart-coupon-selection-card-header",style:{display:"flex",alignItems:"flex-start",gap:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-icon",style:{width:32,height:32,borderRadius:4,backgroundColor:"#FDE8E8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(ge,{size:18,color:l?"#6b7280":"#8B0000"})),e.createElement("div",{className:"yt-cart-coupon-selection-card-text",style:{flex:1}},e.createElement("div",{className:"yt-cart-coupon-selection-card-title",style:{fontSize:"14px",fontWeight:600,color:u||"#1A1A1A",marginBottom:"2px"}},t.title),e.createElement("div",{className:"yt-cart-coupon-selection-card-subtitle",style:{fontSize:"12px",color:l?"#6b7280":"#2E7D32",fontWeight:500}},t.subtitle))),e.createElement("div",{className:"yt-cart-coupon-selection-code-row",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"12px",border:"1px solid #E0E0E0",borderRadius:f??6,padding:"8px 12px",backgroundColor:"#FAFAFA"}},e.createElement("span",{className:"yt-cart-coupon-selection-code",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",letterSpacing:"0.5px"}},n.name),e.createElement("button",{className:"yt-cart-coupon-selection-action","aria-label":r?`Remove ${n.name}`:`Apply ${n.name}`,onClick:e=>{e.stopPropagation(),r?Y():Q(n)},disabled:d,style:{background:"none",border:"none",color:l?"#6b7280":"#8B0000",fontSize:"14px",fontWeight:600,cursor:d?"not-allowed":"pointer",padding:0,display:"flex",alignItems:"center",gap:"4px"}},o||r&&P?e.createElement(Ne,{color:"#8B0000",size:14}):m)),c&&e.createElement("div",{className:"yt-cart-coupon-selection-error",style:{color:"#B91C1C",fontSize:"12px",marginTop:"8px"}},"Could not apply this coupon. Try another offer.")),e.createElement("div",{className:"yt-cart-coupon-selection-applicability",style:{padding:"6px 16px",fontSize:"11px",fontWeight:500,textAlign:"center",backgroundColor:"#FFF0F0",color:l?"#6b7280":"#8B0000",borderTop:"1px solid #FECACA"}},t.applicabilityText))};return e.createElement(e.Fragment,null,(()=>{const t=V.collectedCouponDisplay,n=V.bestUnlockedCouponDisplay,r=!!t||!!R,o=V.unlockedCouponDisplays.length>0,a=!r&&!!n,l=n?.coupon,s=l&&N===l.couponTemplateId,c=t?.coupon.name??R?.code??"",d=t?"#2E7D32":"#8B0000",x=t?"#2E7D32":"#666666";return e.createElement("div",{className:"yt-cart-coupon-selection-banner-container",style:{padding:"0 16px",marginTop:"10px",marginBottom:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner",onClick:j,onKeyDown:G,role:"button",tabIndex:0,"aria-label":"Open coupons and offers",style:{display:"flex",alignItems:"center",padding:"12px 14px",border:"1px dashed #E8E8E8",borderRadius:f??8,cursor:"pointer",backgroundColor:"#FFFFFF",transition:"box-shadow 0.2s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner-icon",style:{width:36,height:36,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginRight:"12px",transition:"background-color 0.3s ease"}},t?e.createElement(Et,{size:20,color:d}):e.createElement(ge,{size:20,color:d})),e.createElement("div",{className:"yt-cart-coupon-selection-banner-content",style:{flex:1,minWidth:0}},r?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",color:u||"#1A1A1A"}},e.createElement("span",{className:"yt-cart-coupon-selection-banner-code",style:{fontWeight:600}},c),e.createElement("span",{className:"yt-cart-coupon-selection-banner-applied",style:{fontStyle:"italic"}}," ","applied!")),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:x,marginTop:"1px",fontStyle:t?"italic":"normal"}},t?.bannerSavingsText??"coupon applied on your purchase")):a&&n?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",lineHeight:1.25}},n.bannerTitle),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#8B0000",marginTop:"2px"}},"view all offers →")):e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#888888",marginTop:"1px"}},"view available offers"))),a&&l?e.createElement("button",{className:"yt-cart-coupon-selection-banner-collect","aria-label":`Apply ${l.name}`,onClick:e=>{e.stopPropagation(),Q(l)},disabled:!!s||P,style:{borderRadius:f??8,border:`1.5px solid ${g||p||"#315A9F"}`,backgroundColor:g||p||"#EEF4FF",color:y||m||"#FFFFFF",fontSize:"16px",fontWeight:700,cursor:s||P?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"12px",flexShrink:0,padding:s?"6px":"5px 9px"}},s?e.createElement(Ne,{color:y||m||"#FFFFFF",size:16}):i.applyButtonText||"Apply"):e.createElement(q,{className:"yt-cart-coupon-selection-banner-arrow",size:14,color:"#888888"})),!r&&o&&e.createElement("div",{className:"yt-cart-coupon-selection-eligible-count",style:{textAlign:"center",fontSize:"12px",fontWeight:600,color:"#8B0000",backgroundColor:"#FFF0F0",padding:"6px 0",borderRadius:`0 0 ${f??8}px ${f??8}px`,marginTop:"-1px",border:"1px dashed #FECACA",borderTop:"none"}},V.eligibleCouponCountText))})(),E&&(()=>{const t=V.unlockedCouponDisplays.length>0;return e.createElement("div",{className:"yt-cart-coupon-selection-overlay",style:{position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",backgroundColor:"#FFFFFF",zIndex:2147483645,display:"flex",flexDirection:"column",animation:T?"ytSlideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards":"ytSlideUp 0.32s cubic-bezier(0, 0, 0.2, 1) forwards"}},e.createElement("div",{className:"yt-cart-coupon-selection-overlay-header",style:{display:"flex",alignItems:"center",padding:"16px",flexShrink:0}},e.createElement("button",{className:"yt-cart-coupon-selection-back-button","aria-label":"Close coupons and offers",onClick:H,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",marginRight:"12px"}},e.createElement(U,{size:18,color:u||"#1A1A1A"})),e.createElement("span",{className:"yt-cart-coupon-selection-overlay-title",style:{fontSize:"18px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers")),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-overlay-content",style:{flex:1,overflowY:"auto"}},R&&e.createElement("div",{className:"yt-cart-coupon-selection-applied-badge",style:{display:"flex",alignItems:"center",padding:"12px 16px",gap:"8px",flexWrap:"wrap"}},e.createElement(Et,{size:16,color:"#333333"}),e.createElement("span",{className:"yt-cart-coupon-selection-applied-code",style:{fontWeight:700,fontSize:"14px",color:u||"#1A1A1A"}},R.code),e.createElement("span",{className:"yt-cart-coupon-selection-applied-text",style:{fontStyle:"italic",fontSize:"14px",color:u||"#1A1A1A"}},"applied!"),e.createElement("button",{className:"yt-cart-coupon-selection-applied-remove","aria-label":`Remove ${R.code}`,onClick:Y,disabled:P||!s,style:{background:"none",border:"none",cursor:P||!s?"not-allowed":"pointer",padding:"2px",display:"flex",alignItems:"center"}},P?e.createElement(Ne,{color:"#666",size:14}):e.createElement(De,{size:18,color:"#666666"})),V.collectedCouponDisplay?.appliedSavingsText&&e.createElement("span",{className:"yt-cart-coupon-selection-applied-savings",style:{fontSize:"14px",color:"#2E7D32",fontStyle:"italic"}},V.collectedCouponDisplay.appliedSavingsText)),e.createElement("div",{className:"yt-cart-coupon-selection-apply-section"},e.createElement(Ta,{backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,cartComponentsCornerRadius:f,applyCouponCode:l,removeDiscount:s,enableConfetti:c,hideAppliedCodes:!0})),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-collect-section",style:{padding:"16px"}},e.createElement("div",{className:"yt-cart-coupon-selection-collect-title",style:{fontSize:"16px",fontWeight:700,color:u||"#1A1A1A",marginBottom:"4px"}},t?"Collect Coupon":"Available Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-collect-subtitle",style:{fontSize:"13px",color:"#888888",marginBottom:"16px"}},t?"Pick any one coupon deal":"No coupons are currently unlocked for this cart"),e.createElement("div",{className:"yt-cart-coupon-selection-list"},V.couponDisplayModels.map(Z)))))})())},Ra=Ee("showGSTInput",!1),Oa=c.div`
1355
1355
  width: 95%;
1356
1356
  background: white;
1357
1357
  border-radius: 2px;
@@ -1789,7 +1789,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
1789
1789
  border: none;
1790
1790
  max-width: unset;
1791
1791
  margin-left: 10px;
1792
- `,wl=({freebieProductsInCart:t,maxFreebiesInTier:a,tierName:i,themeColor:l,themeTextColor:s,primaryTextColor:c,addFreebieToCart:d,imageAspectSelector:p="square",freebieCouponTemplates:m=[],freebieClaimData:u,isCartDrawerOpen:y=!0})=>{const[f]=ve(Mi),[x]=ve(Wi),h=we(Hi),b=we(Ui),w=we(qi),[v,C]=ve(al),E=o(!1),k=o(null),[T,S]=e.useState(!1),[N,F]=e.useState(null),[I,B]=e.useState({}),z=u?.allowOverlayClose??!0,$=u?.freebieSectionTitle,P=u?.productClaimCtaButtonText??"Claim Gifts",A=r(()=>t?.length?t.filter(ai):[],[t]),D=r(()=>new Map(A.map(e=>[gi(e),e])),[A]);n(()=>{f.selectedProducts.forEach(e=>{D.has(e)||w(e)}),B(e=>{const t={...e};let n=!1;return Object.entries(e).forEach(([e,r])=>{const o=D.get(e);if(!o)return delete t[e],void(n=!0);const a=ri(o);a.some(e=>ei(e?.node?.id,r))||(t[e]=a[0]?.node?.id,n=!0)}),n?t:e})},[D,f.selectedProducts,w]);const _=r(()=>pi(A,m,a),[A,m,a]);n(()=>()=>{k.current=null},[]),n(()=>{if(!y)return null!==k.current&&(k.current=Symbol()),E.current=!1,C({isOpen:!1}),h(),B({}),void F(null);E.current||(b(_,i),C({isOpen:!0}),E.current=!0)},[y,_,i,b,h,C]);const L=()=>{C({isOpen:!1}),h(),B({}),F(null)},R=()=>{T||L()},O=()=>{C({isOpen:!0})};n(()=>{const e=e=>{"Escape"===e.key&&z&&!T&&R()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[z,T]);const V=0===f.selectedProducts.length||T||!d;if(!v.isOpen)return e.createElement("div",{className:"yt-cart-freebie-claim-collapsed",style:{display:"flex",flexDirection:"column",marginTop:"5px"}},e.createElement(xl,{onClick:O,className:"yt-cart-freebie-claim-overlay-header"},e.createElement(hl,{$primaryTextColor:c,className:"yt-cart-freebie-claim-overlay-header-title"},e.createElement(g,{size:16}),$??"Freebies"," • ",_," items available"),e.createElement(bl,null)));const W=e.createElement(il,{role:"dialog","aria-modal":"true",onClick:z&&!T?R:void 0,className:"yt-cart-freebie-claim-modal-overlay"},e.createElement(ll,{onClick:e=>e.stopPropagation(),"aria-labelledby":"freebie-modal-title",className:"yt-cart-freebie-claim-modal-container"},e.createElement(sl,{className:"yt-cart-freebie-claim-modal-header"},e.createElement(cl,null,e.createElement(G,{color:"#4D4D4D",size:22})),e.createElement(dl,{id:"freebie-modal-title",className:"yt-cart-freebie-claim-modal-title"},e.createElement("span",{className:"bold"},"Freebie")," Unlocked!"),e.createElement(pl,{className:"yt-cart-freebie-claim-modal-selection-counter"},"claim up to ",e.createElement("span",{className:"bold"},_," items")," for free")),e.createElement(ml,{className:"yt-cart-freebie-claim-modal-body"},e.createElement(ul,null,A.map(t=>e.createElement(ol,{key:gi(t),product:t,imageAspectSelector:p,freebieCouponTemplates:m,accentColor:l,freebieProductsInCart:A,selectedVariantId:I[gi(t)],onVariantChange:e=>B(n=>({...n,[gi(t)]:e})),isSubmitting:T})))),e.createElement(gl,{className:"yt-cart-freebie-claim-modal-footer"},N&&e.createElement(yl,{role:"status","aria-live":"polite"},N),e.createElement(fl,{$themeColor:l||"#000",$themeTextColor:s,$disabled:V,onClick:async()=>{if(f.selectedProducts.length>0&&null===k.current&&d){const e=f.selectedProducts.filter(e=>D.has(e));if(0===e.length)return;const t=Symbol();k.current=t,S(!0),F(null);try{await fi(e,A,d,I,e=>{k.current===t&&(w(e),B(t=>{const n={...t};return delete n[e],n}))}),k.current===t&&L()}catch(e){console.error("Failed to add freebies:",e),k.current===t&&F("Something went wrong. Please try again.")}finally{null!==k.current&&(k.current=null,S(!1))}}},className:"yt-cart-freebie-claim-modal-add-button",disabled:V},T?"Adding to Cart...":x>0?`${P} • ${x}/${_} added`:`${x}/${_} added`))));return"undefined"!=typeof document&&document.body?M.createPortal(W,document.body):null},vl=({freebieProductsInCart:t,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,freebieClaimData:l,imageAspectSelector:s,freebieCouponTemplates:c,cartCheckpoints:d,isCartDrawerOpen:p})=>{const m=e.useMemo(()=>{const e=d?.filter(e=>"free_product"===e?.couponType);if(e&&0!==e.length)return(t??[]).map(t=>ii(t,e)).find(e=>!!e)},[d,t]),u=e.useMemo(()=>{const e=m?.maxFreebiesInTier;return"number"!=typeof e||isNaN(e)?1:e},[m]),g=e.useMemo(()=>m?.name??"Freebie",[m]),y=l?.type||"section",f=e.useMemo(()=>l?.showVariantsInClaimSection?t.map(e=>{const t=gi(e).split("|").pop(),n=e?.variants?.edges?.find(e=>ei(e?.node?.id,t))?.node;return n?{...e,_claim_allowed_variants:[t],title:n.title||e.title,featuredMedia:n.image?.url?{...e.featuredMedia,preview:{...e.featuredMedia?.preview,image:n.image}}:e.featuredMedia}:e}):t,[l?.showVariantsInClaimSection,t]);return"section"===y?e.createElement(Li,{freebieProductsInCart:f,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,imageAspectSelector:s,freebieCouponTemplates:c,maxFreebiesInTier:u,tierName:g,freebieClaimData:l}):"overlay"===y?e.createElement(wl,{freebieProductsInCart:f,maxFreebiesInTier:u,tierName:g,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,imageAspectSelector:s,freebieCouponTemplates:c,freebieClaimData:l,isCartDrawerOpen:p}):(console.warn(`Unknown claimDisplayType: ${y}`),null)};function Cl({inlineCartOfferInfoText:n,inlineCartOfferInfoRedirectLink:r,themeColor:o,tooltipText:a,themeTextColor:i}){const[l,s]=t(!1),c="polygon(0% 100%, 100% 100%, 100% 0%, 100% 0%, 90% 18%, 0% 18%)",d=e.createElement("div",{className:"yt-cart-top-bar",style:{marginTop:"4px",display:"flex",flexDirection:"row",width:"100%",fontSize:"12px",borderRadius:"none",textAlign:"center",justifyContent:"center",position:"relative",background:Gn(o,1),color:i,fontWeight:"var(--yt-cart-font-weight)",padding:"3px",cursor:r?"pointer":"default"}},n,a&&e.createElement("div",{className:"yt-cart-offer-info-tooltip-wrapper",style:{position:"relative",alignSelf:"center",justifySelf:"center",display:"flex",justifyContent:"center",alignItems:"center"}},e.createElement(Z,{size:16,style:{marginLeft:"5px",cursor:"pointer",alignSelf:"center",color:i},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)}),l&&e.createElement("div",{className:"yt-cart-offer-info-tooltip",style:{position:"absolute",top:"100%",right:"100%",zIndex:1e3,filter:"drop-shadow(0px 0px 10px rgba(0,0,0,0.1))"}},e.createElement("div",{className:"yt-cart-offer-info-tooltip-border",style:{backgroundColor:"gray",clipPath:c,padding:".5px"}},e.createElement("div",{className:"yt-cart-offer-info-tooltip-content",style:{backgroundColor:"white",clipPath:c,padding:"10px",fontSize:"10px",color:"black",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"15px",height:"10px"}},a)))));return r?e.createElement("a",{className:"yt-cart-inline-offer-link",href:r,style:{textDecoration:"none",color:"inherit"}},d):d}jt(".react-calendar {\n width: 350px;\n max-width: 100%;\n background: white;\n border: 1px solid #a0a096;\n font-family: 'Arial', 'Helvetica', sans-serif;\n line-height: 1.125em;\n}\n\n.react-calendar--doubleView {\n width: 700px;\n}\n\n.react-calendar--doubleView .react-calendar__viewContainer {\n display: flex;\n margin: -0.5em;\n}\n\n.react-calendar--doubleView .react-calendar__viewContainer > * {\n width: 50%;\n margin: 0.5em;\n}\n\n.react-calendar,\n.react-calendar *,\n.react-calendar *:before,\n.react-calendar *:after {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.react-calendar button {\n margin: 0;\n border: 0;\n outline: none;\n}\n\n.react-calendar button:enabled:hover {\n cursor: pointer;\n}\n\n.react-calendar__navigation {\n display: flex;\n height: 44px;\n margin-bottom: 1em;\n}\n\n.react-calendar__navigation button {\n min-width: 44px;\n background: none;\n}\n\n.react-calendar__navigation button:disabled {\n background-color: #f0f0f0;\n}\n\n.react-calendar__navigation button:enabled:hover,\n.react-calendar__navigation button:enabled:focus {\n background-color: #e6e6e6;\n}\n\n.react-calendar__month-view__weekdays {\n text-align: center;\n text-transform: uppercase;\n font: inherit;\n font-size: 0.75em;\n font-weight: bold;\n}\n\n.react-calendar__month-view__weekdays__weekday {\n padding: 0.5em;\n}\n\n.react-calendar__month-view__weekNumbers .react-calendar__tile {\n display: flex;\n align-items: center;\n justify-content: center;\n font: inherit;\n font-size: 0.75em;\n font-weight: bold;\n}\n\n.react-calendar__month-view__days__day--weekend {\n color: #d10000;\n}\n\n.react-calendar__month-view__days__day--neighboringMonth,\n.react-calendar__decade-view__years__year--neighboringDecade,\n.react-calendar__century-view__decades__decade--neighboringCentury {\n color: #757575;\n}\n\n.react-calendar__year-view .react-calendar__tile,\n.react-calendar__decade-view .react-calendar__tile,\n.react-calendar__century-view .react-calendar__tile {\n padding: 2em 0.5em;\n}\n\n.react-calendar__tile {\n max-width: 100%;\n padding: 10px 6.6667px;\n background: none;\n text-align: center;\n font: inherit;\n font-size: 0.833em;\n}\n\n.react-calendar__tile:disabled {\n background-color: #f0f0f0;\n color: #ababab;\n}\n\n.react-calendar__month-view__days__day--neighboringMonth:disabled,\n.react-calendar__decade-view__years__year--neighboringDecade:disabled,\n.react-calendar__century-view__decades__decade--neighboringCentury:disabled {\n color: #cdcdcd;\n}\n\n.react-calendar__tile:enabled:hover,\n.react-calendar__tile:enabled:focus {\n background-color: #e6e6e6;\n}\n\n.react-calendar__tile--now {\n background: #ffff76;\n}\n\n.react-calendar__tile--now:enabled:hover,\n.react-calendar__tile--now:enabled:focus {\n background: #ffffa9;\n}\n\n.react-calendar__tile--hasActive {\n background: #76baff;\n}\n\n.react-calendar__tile--hasActive:enabled:hover,\n.react-calendar__tile--hasActive:enabled:focus {\n background: #a9d4ff;\n}\n\n.react-calendar__tile--active {\n background: #006edc;\n color: white;\n}\n\n.react-calendar__tile--active:enabled:hover,\n.react-calendar__tile--active:enabled:focus {\n background: #1087ff;\n}\n\n.react-calendar--selectRange .react-calendar__tile--hover {\n background-color: #e6e6e6;\n}\n");jt(".custom-date-picker {\n position: relative;\n width: 100%;\n}\n\n.date-display {\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n}\n\n.date-display span {\n color: black;\n}\n\n.date-display svg {\n width: 20px;\n height: 20px;\n color: rgb(73, 69, 69);\n}\n\n.calendar-container {\n position: absolute;\n bottom: 100%;\n left: -10%;\n z-index: 10;\n margin-top: 10px;\n}\n\n.custom-calendar {\n background-color: white;\n border-radius: 6px;\n box-shadow: 0 4px 6px rgba(10, 8, 8, 0.1);\n border: 1px solid darken(#674918, 50%);\n}\n");const El=c(Mt)`
1792
+ `,wl=({freebieProductsInCart:t,maxFreebiesInTier:a,tierName:i,themeColor:l,themeTextColor:s,primaryTextColor:c,addFreebieToCart:d,imageAspectSelector:p="square",freebieCouponTemplates:m=[],freebieClaimData:u,isCartDrawerOpen:y=!0})=>{const[f]=ve(Mi),[x]=ve(Wi),h=we(Hi),b=we(Ui),w=we(qi),[v,C]=ve(al),E=o(!1),k=o(null),[T,S]=e.useState(!1),[N,F]=e.useState(null),[I,B]=e.useState({}),z=u?.allowOverlayClose??!0,$=u?.freebieSectionTitle,P=u?.productClaimCtaButtonText??"Claim Gifts",A=r(()=>t?.length?t.filter(ai):[],[t]),D=r(()=>new Map(A.map(e=>[gi(e),e])),[A]);n(()=>{f.selectedProducts.forEach(e=>{D.has(e)||w(e)}),B(e=>{const t={...e};let n=!1;return Object.entries(e).forEach(([e,r])=>{const o=D.get(e);if(!o)return delete t[e],void(n=!0);const a=ri(o);a.some(e=>ei(e?.node?.id,r))||(t[e]=a[0]?.node?.id,n=!0)}),n?t:e})},[D,f.selectedProducts,w]);const _=r(()=>pi(A,m,a),[A,m,a]);n(()=>()=>{k.current=null},[]),n(()=>{if(!y)return null!==k.current&&(k.current=Symbol()),E.current=!1,C({isOpen:!1}),h(),B({}),void F(null);E.current||(b(_,i),C({isOpen:!0}),E.current=!0)},[y,_,i,b,h,C]);const L=()=>{C({isOpen:!1}),h(),B({}),F(null)},R=()=>{T||L()},O=()=>{C({isOpen:!0})};n(()=>{const e=e=>{"Escape"===e.key&&z&&!T&&R()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[z,T]);const V=0===f.selectedProducts.length||T||!d;if(!v.isOpen)return e.createElement("div",{className:"yt-cart-freebie-claim-collapsed",style:{display:"flex",flexDirection:"column",marginTop:"5px"}},e.createElement(xl,{onClick:O,className:"yt-cart-freebie-claim-overlay-header"},e.createElement(hl,{$primaryTextColor:c,className:"yt-cart-freebie-claim-overlay-header-title"},e.createElement(g,{size:16}),$??"Freebies"," • ",_," items available"),e.createElement(bl,null)));const W=e.createElement(il,{role:"dialog","aria-modal":"true",onClick:z&&!T?R:void 0,className:"yt-cart-freebie-claim-modal-overlay"},e.createElement(ll,{onClick:e=>e.stopPropagation(),"aria-labelledby":"freebie-modal-title",className:"yt-cart-freebie-claim-modal-container"},e.createElement(sl,{className:"yt-cart-freebie-claim-modal-header"},e.createElement(cl,null,e.createElement(G,{color:"#4D4D4D",size:22})),e.createElement(dl,{id:"freebie-modal-title",className:"yt-cart-freebie-claim-modal-title"},e.createElement("span",{className:"bold"},"Freebie")," Unlocked!"),e.createElement(pl,{className:"yt-cart-freebie-claim-modal-selection-counter"},"claim up to ",e.createElement("span",{className:"bold"},_," items")," for free")),e.createElement(ml,{className:"yt-cart-freebie-claim-modal-body"},e.createElement(ul,null,A.map(t=>e.createElement(ol,{key:gi(t),product:t,imageAspectSelector:p,freebieCouponTemplates:m,accentColor:l,freebieProductsInCart:A,selectedVariantId:I[gi(t)],onVariantChange:e=>B(n=>({...n,[gi(t)]:e})),isSubmitting:T})))),e.createElement(gl,{className:"yt-cart-freebie-claim-modal-footer"},N&&e.createElement(yl,{role:"status","aria-live":"polite"},N),e.createElement(fl,{$themeColor:l||"#000",$themeTextColor:s,$disabled:V,onClick:async()=>{if(f.selectedProducts.length>0&&null===k.current&&d){const e=f.selectedProducts.filter(e=>D.has(e));if(0===e.length)return;const t=Symbol();k.current=t,S(!0),F(null);try{await fi(e,A,d,I,e=>{k.current===t&&(w(e),B(t=>{const n={...t};return delete n[e],n}))}),k.current===t&&L()}catch(e){console.error("Failed to add freebies:",e),k.current===t&&F("Something went wrong. Please try again.")}finally{null!==k.current&&(k.current=null,S(!1))}}},className:"yt-cart-freebie-claim-modal-add-button",disabled:V},T?"Adding to Cart...":x>0?`${P} • ${x}/${_} added`:`${x}/${_} added`))));return"undefined"!=typeof document&&document.body?M.createPortal(W,document.body):null},vl=({freebieProductsInCart:t,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,freebieClaimData:l,imageAspectSelector:s,freebieCouponTemplates:c,cartCheckpoints:d,isCartDrawerOpen:p})=>{const m=e.useMemo(()=>{const e=d?.filter(e=>"free_product"===e?.couponType);if(e&&0!==e.length)return(t??[]).map(t=>ii(t,e)).find(e=>!!e)},[d,t]),u=e.useMemo(()=>{const e=m?.maxFreebiesInTier;return"number"!=typeof e||isNaN(e)?1:e},[m]),g=e.useMemo(()=>m?.name??"Freebie",[m]),y=l?.type||"section",f=e.useMemo(()=>l?.showVariantsInClaimSection?t.map(e=>{const t=gi(e).split("|").pop(),n=e?.variants?.edges?.find(e=>ei(e?.node?.id,t))?.node;return n?{...e,_claim_allowed_variants:[t],title:e?.variants?.edges?.length>1&&n.title?`${e.title} - ${n.title}`:e.title,featuredMedia:n.image?.url?{...e.featuredMedia,preview:{...e.featuredMedia?.preview,image:n.image}}:e.featuredMedia}:e}):t,[l?.showVariantsInClaimSection,t]);return"section"===y?e.createElement(Li,{freebieProductsInCart:f,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,imageAspectSelector:s,freebieCouponTemplates:c,maxFreebiesInTier:u,tierName:g,freebieClaimData:l}):"overlay"===y?e.createElement(wl,{freebieProductsInCart:f,maxFreebiesInTier:u,tierName:g,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,imageAspectSelector:s,freebieCouponTemplates:c,freebieClaimData:l,isCartDrawerOpen:p}):(console.warn(`Unknown claimDisplayType: ${y}`),null)};function Cl({inlineCartOfferInfoText:n,inlineCartOfferInfoRedirectLink:r,themeColor:o,tooltipText:a,themeTextColor:i}){const[l,s]=t(!1),c="polygon(0% 100%, 100% 100%, 100% 0%, 100% 0%, 90% 18%, 0% 18%)",d=e.createElement("div",{className:"yt-cart-top-bar",style:{marginTop:"4px",display:"flex",flexDirection:"row",width:"100%",fontSize:"12px",borderRadius:"none",textAlign:"center",justifyContent:"center",position:"relative",background:Gn(o,1),color:i,fontWeight:"var(--yt-cart-font-weight)",padding:"3px",cursor:r?"pointer":"default"}},n,a&&e.createElement("div",{className:"yt-cart-offer-info-tooltip-wrapper",style:{position:"relative",alignSelf:"center",justifySelf:"center",display:"flex",justifyContent:"center",alignItems:"center"}},e.createElement(Z,{size:16,style:{marginLeft:"5px",cursor:"pointer",alignSelf:"center",color:i},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)}),l&&e.createElement("div",{className:"yt-cart-offer-info-tooltip",style:{position:"absolute",top:"100%",right:"100%",zIndex:1e3,filter:"drop-shadow(0px 0px 10px rgba(0,0,0,0.1))"}},e.createElement("div",{className:"yt-cart-offer-info-tooltip-border",style:{backgroundColor:"gray",clipPath:c,padding:".5px"}},e.createElement("div",{className:"yt-cart-offer-info-tooltip-content",style:{backgroundColor:"white",clipPath:c,padding:"10px",fontSize:"10px",color:"black",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"15px",height:"10px"}},a)))));return r?e.createElement("a",{className:"yt-cart-inline-offer-link",href:r,style:{textDecoration:"none",color:"inherit"}},d):d}jt(".react-calendar {\n width: 350px;\n max-width: 100%;\n background: white;\n border: 1px solid #a0a096;\n font-family: 'Arial', 'Helvetica', sans-serif;\n line-height: 1.125em;\n}\n\n.react-calendar--doubleView {\n width: 700px;\n}\n\n.react-calendar--doubleView .react-calendar__viewContainer {\n display: flex;\n margin: -0.5em;\n}\n\n.react-calendar--doubleView .react-calendar__viewContainer > * {\n width: 50%;\n margin: 0.5em;\n}\n\n.react-calendar,\n.react-calendar *,\n.react-calendar *:before,\n.react-calendar *:after {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.react-calendar button {\n margin: 0;\n border: 0;\n outline: none;\n}\n\n.react-calendar button:enabled:hover {\n cursor: pointer;\n}\n\n.react-calendar__navigation {\n display: flex;\n height: 44px;\n margin-bottom: 1em;\n}\n\n.react-calendar__navigation button {\n min-width: 44px;\n background: none;\n}\n\n.react-calendar__navigation button:disabled {\n background-color: #f0f0f0;\n}\n\n.react-calendar__navigation button:enabled:hover,\n.react-calendar__navigation button:enabled:focus {\n background-color: #e6e6e6;\n}\n\n.react-calendar__month-view__weekdays {\n text-align: center;\n text-transform: uppercase;\n font: inherit;\n font-size: 0.75em;\n font-weight: bold;\n}\n\n.react-calendar__month-view__weekdays__weekday {\n padding: 0.5em;\n}\n\n.react-calendar__month-view__weekNumbers .react-calendar__tile {\n display: flex;\n align-items: center;\n justify-content: center;\n font: inherit;\n font-size: 0.75em;\n font-weight: bold;\n}\n\n.react-calendar__month-view__days__day--weekend {\n color: #d10000;\n}\n\n.react-calendar__month-view__days__day--neighboringMonth,\n.react-calendar__decade-view__years__year--neighboringDecade,\n.react-calendar__century-view__decades__decade--neighboringCentury {\n color: #757575;\n}\n\n.react-calendar__year-view .react-calendar__tile,\n.react-calendar__decade-view .react-calendar__tile,\n.react-calendar__century-view .react-calendar__tile {\n padding: 2em 0.5em;\n}\n\n.react-calendar__tile {\n max-width: 100%;\n padding: 10px 6.6667px;\n background: none;\n text-align: center;\n font: inherit;\n font-size: 0.833em;\n}\n\n.react-calendar__tile:disabled {\n background-color: #f0f0f0;\n color: #ababab;\n}\n\n.react-calendar__month-view__days__day--neighboringMonth:disabled,\n.react-calendar__decade-view__years__year--neighboringDecade:disabled,\n.react-calendar__century-view__decades__decade--neighboringCentury:disabled {\n color: #cdcdcd;\n}\n\n.react-calendar__tile:enabled:hover,\n.react-calendar__tile:enabled:focus {\n background-color: #e6e6e6;\n}\n\n.react-calendar__tile--now {\n background: #ffff76;\n}\n\n.react-calendar__tile--now:enabled:hover,\n.react-calendar__tile--now:enabled:focus {\n background: #ffffa9;\n}\n\n.react-calendar__tile--hasActive {\n background: #76baff;\n}\n\n.react-calendar__tile--hasActive:enabled:hover,\n.react-calendar__tile--hasActive:enabled:focus {\n background: #a9d4ff;\n}\n\n.react-calendar__tile--active {\n background: #006edc;\n color: white;\n}\n\n.react-calendar__tile--active:enabled:hover,\n.react-calendar__tile--active:enabled:focus {\n background: #1087ff;\n}\n\n.react-calendar--selectRange .react-calendar__tile--hover {\n background-color: #e6e6e6;\n}\n");jt(".custom-date-picker {\n position: relative;\n width: 100%;\n}\n\n.date-display {\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n}\n\n.date-display span {\n color: black;\n}\n\n.date-display svg {\n width: 20px;\n height: 20px;\n color: rgb(73, 69, 69);\n}\n\n.calendar-container {\n position: absolute;\n bottom: 100%;\n left: -10%;\n z-index: 10;\n margin-top: 10px;\n}\n\n.custom-calendar {\n background-color: white;\n border-radius: 6px;\n box-shadow: 0 4px 6px rgba(10, 8, 8, 0.1);\n border: 1px solid darken(#674918, 50%);\n}\n");const El=c(Mt)`
1793
1793
  .react-calendar {
1794
1794
  font-family: Arial, sans-serif;
1795
1795
  color: ${e=>e.tileTextColor||"#374151"} !important;
@@ -2420,7 +2420,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
2420
2420
  &:hover {
2421
2421
  opacity: ${e=>e.$locked?.5:.85};
2422
2422
  }
2423
- `,js=(e,t)=>null!=e?`${String(e)}|${String(t)}`:String(t),Hs=e=>{const t=String(e??"").trim();if(!t)return"";const n=t.split("/");return n[n.length-1]?.split(":")[0]??""},qs=e=>{const t=String(e??"").trim(),n=t.indexOf("|");return-1===n?{couponTemplateId:void 0,variantId:Hs(t)}:{couponTemplateId:t.slice(0,n)||void 0,variantId:Hs(t.slice(n+1))}},Us=e=>{const t=new Set;return e.forEach(e=>{const n=Hs(e);n&&t.add(n)}),Array.from(t)},Qs=(e,t)=>{const n=new Set((e=>{const t=e._allVariantIds?.length?e._allVariantIds:[...e.customerGetsProductIds?.ids??[],...(e.customerGetsProductIds?.products??[]).flatMap(e=>e?.variantIds??[])];return Us(t)})(e)),r=String(e.couponTemplateId),o=new Set;return t.forEach(e=>{const t=qs(e);t.variantId&&n.has(t.variantId)&&(t.couponTemplateId&&t.couponTemplateId!==r||o.add(t.variantId))}),o.size},Ys=(e,t,n)=>{const r=null!=e?String(e):void 0,o=new Set(Us(t));return n.some(e=>{const t=qs(e);return!(!t.variantId||!o.has(t.variantId))&&(!t.couponTemplateId||t.couponTemplateId===r)})},Gs=e=>{const t=Number(e?.amount??e??0);return Number.isFinite(t)?t:0},Zs=(e,t)=>{const n=Hs(t);if(n)return e.find(e=>(e?.variants?.edges??e?.variants?.nodes??[]).some(e=>{const t=e?.node??e;return Hs(t?.id)===n}))},Xs=(e,t)=>{const n=Hs(t);if(!n)return;const r=(e?.variants?.edges??e?.variants?.nodes??[]).find(e=>{const t=e?.node??e;return Hs(t?.id)===n});return r?.node??r},Ks=e=>e?.featuredMedia?.preview?.image?.url??e?.featuredImage?.url??e?.images?.edges?.[0]?.node?.url??e?.image?.src??"",Js=({stealDealCheckpoints:a,stealDealProducts:i,freeProductAdjustedCartTotal:l,effectiveQuantityForProgressBar:s,addFreebieToCart:c,freebiesInCart:d,primaryTextColor:p,showVariantsInClaimSection:m})=>{const u=Ce(En),g=Bn(),x=we(zn),h=a?.[0],[b,w]=t(0),[v,C]=t(0),E=o(null),k=o(null),T=r(()=>(l||Number(u?.items_subtotal_price))/100,[l,u?.items_subtotal_price]),S=Dn(u,u?.currency),N=r(()=>{if(!h)return!1;const e="minimum_order_value"===(h.customCartProgressBarCriteria??"minimum_order_value"),t=s||(u?.item_count??0);return e?T>=h.minimumOrderValue:t>=h.quantityThreshold},[h,T,u?.item_count,s]),F=h?.maxFreebiesInTier??1,I=r(()=>h?Qs(h,d):0,[h,d])>=F,B=r(()=>{if(!h||!i?.length)return[];const e=(e=>Us(e.customerGetsProductIds?.ids??[]))(h),t=[];for(const n of e){const e=Zs(i,n);if(!e)continue;const r=Xs(e,n);if(m&&!Ka(e,r))continue;const o=Gs(r?.price),a=Gs(r?.compareAtPrice);let l,s;"no_discount"===h.freebieType?(l=o,s=0):"percentage_off"===h.freebieType&&h.discountPercentage?(s=h.discountPercentage,l=o*(1-s/100)):(l=h.discountValue??o,s=o>0?Math.round((o-l)/o*100):0);const c=m?[n]:e?._claim_allowed_variants??[n],p=js(h.couponTemplateId,n),u={couponTemplateId:String(h.couponTemplateId),rewardKey:p},g=Ys(h.couponTemplateId,c,d),y=a>l?a:o>l?o:null;t.push({product:e,variantId:n,title:m&&r?.title||e?.title||"",imageUrl:m&&r?.image?.url||Ks(e),isUnlocked:N,isClaimed:g,discountPercent:s,dealPrice:l,originalPrice:o,strikeThroughPrice:y,allowedVariantIds:c,rewardContext:u})}return t},[h,i,d,N,m]);n(()=>{if(E.current){const e=E.current.offsetWidth,t=window.innerWidth<=768;C(t?Math.min(.95*e,280):Math.min(.8*e,320))}},[B.length]);const z=Math.max(0,B.length-1);n(()=>{b>z&&w(z)},[z,b]);const $=()=>{w(e=>0===e?z:e-1)},P=()=>{w(e=>e===z?0:e+1)};if(!h||!B.length)return null;return e.createElement(fs,{className:"yt-cart-steal-deal-section-container"},e.createElement(xs,{className:"yt-cart-steal-deal-section-header"},e.createElement(hs,{style:{color:p},className:"yt-cart-steal-deal-section-title"},e.createElement(bs,null,"STEAL"),e.createElement(ws,null,"DEALS")),I?e.createElement(ks,{className:"yt-cart-steal-deal-section-max-claim-badge"},"Max ",F," claims reached"):N?e.createElement(Es,{className:"yt-cart-steal-deal-section-unlocked-badge"},e.createElement(K,{size:10}),"UNLOCKED"):e.createElement(vs,{className:"yt-cart-steal-deal-section-locked-badge"},e.createElement(Cs,null),"minimum_order_value"===(h.customCartProgressBarCriteria??"minimum_order_value")?e.createElement(e.Fragment,null,"UNLOCK AT ",S,h.minimumOrderValue):e.createElement(e.Fragment,null,"UNLOCK AT ",h.quantityThreshold," ITEMS"))),e.createElement(Ts,{ref:E,onTouchStart:e=>{k.current=e.touches[0].clientX},onTouchEnd:e=>{if(null===k.current)return;const t=e.changedTouches[0].clientX-k.current;Math.abs(t)>50&&(t<0?P():$()),k.current=null},className:"yt-cart-steal-deal-carousel-container"},B.length>1&&e.createElement(Bs,{onClick:$,className:"yt-cart-steal-deal-carousel-left-button"},e.createElement(y,{size:30,color:"#4D4D4D"})),e.createElement(Fs,{position:"left",style:{display:"flex"}}),e.createElement(Fs,{position:"right",style:{display:"flex"}}),e.createElement(Ss,{$cardWidth:v,className:"yt-cart-steal-deal-carousel-wrapper"},e.createElement(Ns,{$translate:b*(v+10),className:"yt-cart-steal-deal-carousel-content"},B.map(t=>e.createElement("div",{key:t.variantId,style:{width:`${v}px`,flexShrink:0},className:"yt-steal-deal-card"},e.createElement($s,{className:"yt-cart-steal-deal-carousel-deal-card"},e.createElement(Ps,{className:"yt-cart-steal-deal-carousel-product-image-wrapper"},e.createElement(As,{src:t.imageUrl,alt:t.title,className:"yt-cart-steal-deal-carousel-product-image"}),t.discountPercent>0&&e.createElement(Ds,{className:"yt-cart-steal-deal-carousel-discount-image"},"-",t.discountPercent,"% OFF")),e.createElement(_s,{className:"yt-cart-steal-deal-carousel-card-content"},e.createElement(Ls,{className:"yt-cart-steal-deal-carousel-card-product-name"},t.title),e.createElement(Vs,null,e.createElement(Rs,{className:"yt-cart-steal-deal-carousel-card-price"},e.createElement(Os,{className:"yt-cart-steal-deal-carousel-card-price"},S,t.dealPrice.toLocaleString()),null!==t.strikeThroughPrice&&e.createElement(Ms,{className:"yt-cart-steal-deal-carousel-card-original-price"},S,t.strikeThroughPrice.toLocaleString())),e.createElement(Ws,{$locked:!t.isUnlocked||t.isClaimed||I,onClick:()=>(async e=>{if(e.isUnlocked&&!e.isClaimed&&!I&&c){if(e.allowedVariantIds.length>1){const t=e.product?.variants?.edges??e.product?.variants?.nodes??[];if(e.allowedVariantIds.some(n=>t.some(t=>{const r=t?.node??t;return(String(r?.id??"").split("/").pop()===n||String(r?.id??"").includes(n))&&Ka(e.product,r)}))){const t=e.product?.id?.split("/").pop();return void x({open:!0,variantId:e.variantId,handle:e.product?.handle,freebieSelection:!0,stealDealSelection:!0,productId:t,allowedVariantIds:e.allowedVariantIds,rewardContext:e.rewardContext})}}g(!0,!0);try{await c(e.variantId,e.allowedVariantIds,e.rewardContext)}catch(e){}finally{g(!1,!1)}}})(t),disabled:!t.isUnlocked||t.isClaimed||I,className:"yt-cart-steal-deal-carousel-card-action-button"},t.isUnlocked?e.createElement(J,{size:12}):e.createElement(ee,{size:12}))))))))),B.length>1&&e.createElement(zs,{onClick:P,className:"yt-cart-steal-deal-carousel-right-button"},e.createElement(f,{size:30,color:"#4D4D4D"}))))};const ec=new Set(["application/pdf","image/jpeg","image/png"]),tc={alignItems:"center",display:"flex",justifyContent:"center"},nc={addIcon:{...tc,borderStyle:"dashed",borderWidth:"1.5px"},copy:{flex:1,minWidth:0},deleteButton:{...tc,WebkitAppearance:"none",WebkitTapHighlightColor:"transparent",border:0,padding:0,touchAction:"manipulation",color:"#4a4a4a"},preview:{...tc,background:"#ffffff",border:"1.5px solid #656565",color:"#555555",overflow:"hidden"},previewImage:{height:"100%",objectFit:"cover",width:"100%"},previewPdf:{fontSize:"13px",fontWeight:700},removeError:{color:"#b91c1c",display:"block",fontSize:"12px",lineHeight:1.3,marginTop:"4px"},uploadIcon:{flex:"0 0 auto"}},rc=c.button`
2423
+ `,js=(e,t)=>null!=e?`${String(e)}|${String(t)}`:String(t),Hs=e=>{const t=String(e??"").trim();if(!t)return"";const n=t.split("/");return n[n.length-1]?.split(":")[0]??""},qs=e=>{const t=String(e??"").trim(),n=t.indexOf("|");return-1===n?{couponTemplateId:void 0,variantId:Hs(t)}:{couponTemplateId:t.slice(0,n)||void 0,variantId:Hs(t.slice(n+1))}},Us=e=>{const t=new Set;return e.forEach(e=>{const n=Hs(e);n&&t.add(n)}),Array.from(t)},Qs=(e,t)=>{const n=new Set((e=>{const t=e._allVariantIds?.length?e._allVariantIds:[...e.customerGetsProductIds?.ids??[],...(e.customerGetsProductIds?.products??[]).flatMap(e=>e?.variantIds??[])];return Us(t)})(e)),r=String(e.couponTemplateId),o=new Set;return t.forEach(e=>{const t=qs(e);t.variantId&&n.has(t.variantId)&&(t.couponTemplateId&&t.couponTemplateId!==r||o.add(t.variantId))}),o.size},Ys=(e,t,n)=>{const r=null!=e?String(e):void 0,o=new Set(Us(t));return n.some(e=>{const t=qs(e);return!(!t.variantId||!o.has(t.variantId))&&(!t.couponTemplateId||t.couponTemplateId===r)})},Gs=e=>{const t=Number(e?.amount??e??0);return Number.isFinite(t)?t:0},Zs=(e,t)=>{const n=Hs(t);if(n)return e.find(e=>(e?.variants?.edges??e?.variants?.nodes??[]).some(e=>{const t=e?.node??e;return Hs(t?.id)===n}))},Xs=(e,t)=>{const n=Hs(t);if(!n)return;const r=(e?.variants?.edges??e?.variants?.nodes??[]).find(e=>{const t=e?.node??e;return Hs(t?.id)===n});return r?.node??r},Ks=e=>e?.featuredMedia?.preview?.image?.url??e?.featuredImage?.url??e?.images?.edges?.[0]?.node?.url??e?.image?.src??"",Js=({stealDealCheckpoints:a,stealDealProducts:i,freeProductAdjustedCartTotal:l,effectiveQuantityForProgressBar:s,addFreebieToCart:c,freebiesInCart:d,primaryTextColor:p,showVariantsInClaimSection:m})=>{const u=Ce(En),g=Bn(),x=we(zn),h=a?.[0],[b,w]=t(0),[v,C]=t(0),E=o(null),k=o(null),T=r(()=>(l||Number(u?.items_subtotal_price))/100,[l,u?.items_subtotal_price]),S=Dn(u,u?.currency),N=r(()=>{if(!h)return!1;const e="minimum_order_value"===(h.customCartProgressBarCriteria??"minimum_order_value"),t=s||(u?.item_count??0);return e?T>=h.minimumOrderValue:t>=h.quantityThreshold},[h,T,u?.item_count,s]),F=h?.maxFreebiesInTier??1,I=r(()=>h?Qs(h,d):0,[h,d])>=F,B=r(()=>{if(!h||!i?.length)return[];const e=(e=>Us(e.customerGetsProductIds?.ids??[]))(h),t=[];for(const n of e){const e=Zs(i,n);if(!e)continue;const r=Xs(e,n);if(m&&!Ka(e,r))continue;const o=Gs(r?.price),a=Gs(r?.compareAtPrice);let l,s;"no_discount"===h.freebieType?(l=o,s=0):"percentage_off"===h.freebieType&&h.discountPercentage?(s=h.discountPercentage,l=o*(1-s/100)):(l=h.discountValue??o,s=o>0?Math.round((o-l)/o*100):0);const c=m?[n]:e?._claim_allowed_variants??[n],p=js(h.couponTemplateId,n),u={couponTemplateId:String(h.couponTemplateId),rewardKey:p},g=Ys(h.couponTemplateId,c,d),y=a>l?a:o>l?o:null;t.push({product:e,variantId:n,title:m&&(e?.variants?.edges??e?.variants?.nodes??[]).length>1&&r?.title?`${e?.title??""} - ${r.title}`:e?.title??"",imageUrl:m&&r?.image?.url||Ks(e),isUnlocked:N,isClaimed:g,discountPercent:s,dealPrice:l,originalPrice:o,strikeThroughPrice:y,allowedVariantIds:c,rewardContext:u})}return t},[h,i,d,N,m]);n(()=>{if(E.current){const e=E.current.offsetWidth,t=window.innerWidth<=768;C(t?Math.min(.95*e,280):Math.min(.8*e,320))}},[B.length]);const z=Math.max(0,B.length-1);n(()=>{b>z&&w(z)},[z,b]);const $=()=>{w(e=>0===e?z:e-1)},P=()=>{w(e=>e===z?0:e+1)};if(!h||!B.length)return null;return e.createElement(fs,{className:"yt-cart-steal-deal-section-container"},e.createElement(xs,{className:"yt-cart-steal-deal-section-header"},e.createElement(hs,{style:{color:p},className:"yt-cart-steal-deal-section-title"},e.createElement(bs,null,"STEAL"),e.createElement(ws,null,"DEALS")),I?e.createElement(ks,{className:"yt-cart-steal-deal-section-max-claim-badge"},"Max ",F," claims reached"):N?e.createElement(Es,{className:"yt-cart-steal-deal-section-unlocked-badge"},e.createElement(K,{size:10}),"UNLOCKED"):e.createElement(vs,{className:"yt-cart-steal-deal-section-locked-badge"},e.createElement(Cs,null),"minimum_order_value"===(h.customCartProgressBarCriteria??"minimum_order_value")?e.createElement(e.Fragment,null,"UNLOCK AT ",S,h.minimumOrderValue):e.createElement(e.Fragment,null,"UNLOCK AT ",h.quantityThreshold," ITEMS"))),e.createElement(Ts,{ref:E,onTouchStart:e=>{k.current=e.touches[0].clientX},onTouchEnd:e=>{if(null===k.current)return;const t=e.changedTouches[0].clientX-k.current;Math.abs(t)>50&&(t<0?P():$()),k.current=null},className:"yt-cart-steal-deal-carousel-container"},B.length>1&&e.createElement(Bs,{onClick:$,className:"yt-cart-steal-deal-carousel-left-button"},e.createElement(y,{size:30,color:"#4D4D4D"})),e.createElement(Fs,{position:"left",style:{display:"flex"}}),e.createElement(Fs,{position:"right",style:{display:"flex"}}),e.createElement(Ss,{$cardWidth:v,className:"yt-cart-steal-deal-carousel-wrapper"},e.createElement(Ns,{$translate:b*(v+10),className:"yt-cart-steal-deal-carousel-content"},B.map(t=>e.createElement("div",{key:t.variantId,style:{width:`${v}px`,flexShrink:0},className:"yt-steal-deal-card"},e.createElement($s,{className:"yt-cart-steal-deal-carousel-deal-card"},e.createElement(Ps,{className:"yt-cart-steal-deal-carousel-product-image-wrapper"},e.createElement(As,{src:t.imageUrl,alt:t.title,className:"yt-cart-steal-deal-carousel-product-image"}),t.discountPercent>0&&e.createElement(Ds,{className:"yt-cart-steal-deal-carousel-discount-image"},"-",t.discountPercent,"% OFF")),e.createElement(_s,{className:"yt-cart-steal-deal-carousel-card-content"},e.createElement(Ls,{className:"yt-cart-steal-deal-carousel-card-product-name"},t.title),e.createElement(Vs,null,e.createElement(Rs,{className:"yt-cart-steal-deal-carousel-card-price"},e.createElement(Os,{className:"yt-cart-steal-deal-carousel-card-price"},S,t.dealPrice.toLocaleString()),null!==t.strikeThroughPrice&&e.createElement(Ms,{className:"yt-cart-steal-deal-carousel-card-original-price"},S,t.strikeThroughPrice.toLocaleString())),e.createElement(Ws,{$locked:!t.isUnlocked||t.isClaimed||I,onClick:()=>(async e=>{if(e.isUnlocked&&!e.isClaimed&&!I&&c){if(e.allowedVariantIds.length>1){const t=e.product?.variants?.edges??e.product?.variants?.nodes??[];if(e.allowedVariantIds.some(n=>t.some(t=>{const r=t?.node??t;return(String(r?.id??"").split("/").pop()===n||String(r?.id??"").includes(n))&&Ka(e.product,r)}))){const t=e.product?.id?.split("/").pop();return void x({open:!0,variantId:e.variantId,handle:e.product?.handle,freebieSelection:!0,stealDealSelection:!0,productId:t,allowedVariantIds:e.allowedVariantIds,rewardContext:e.rewardContext})}}g(!0,!0);try{await c(e.variantId,e.allowedVariantIds,e.rewardContext)}catch(e){}finally{g(!1,!1)}}})(t),disabled:!t.isUnlocked||t.isClaimed||I,className:"yt-cart-steal-deal-carousel-card-action-button"},t.isUnlocked?e.createElement(J,{size:12}):e.createElement(ee,{size:12}))))))))),B.length>1&&e.createElement(zs,{onClick:P,className:"yt-cart-steal-deal-carousel-right-button"},e.createElement(f,{size:30,color:"#4D4D4D"}))))};const ec=new Set(["application/pdf","image/jpeg","image/png"]),tc={alignItems:"center",display:"flex",justifyContent:"center"},nc={addIcon:{...tc,borderStyle:"dashed",borderWidth:"1.5px"},copy:{flex:1,minWidth:0},deleteButton:{...tc,WebkitAppearance:"none",WebkitTapHighlightColor:"transparent",border:0,padding:0,touchAction:"manipulation",color:"#4a4a4a"},preview:{...tc,background:"#ffffff",border:"1.5px solid #656565",color:"#555555",overflow:"hidden"},previewImage:{height:"100%",objectFit:"cover",width:"100%"},previewPdf:{fontSize:"13px",fontWeight:700},removeError:{color:"#b91c1c",display:"block",fontSize:"12px",lineHeight:1.3,marginTop:"4px"},uploadIcon:{flex:"0 0 auto"}},rc=c.button`
2424
2424
  -webkit-appearance: none;
2425
2425
  -webkit-tap-highlight-color: transparent;
2426
2426
  align-items: center;
@@ -2775,7 +2775,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
2775
2775
  font-weight: 400;
2776
2776
  min-width: 14px;
2777
2777
  line-height: 14px;
2778
- `;const cc=[...((dc={headerIds:["offers-carousel","timer","info-text"],scroll:{topIds:[],bottomIds:["steal-deal","upload-image","recs"]},footerIds:["bundle","gst","freebie-claim","shipping","note","gift-wrap","coupon","loyalty","points-preview"]}).headerIds??[]).map(e=>({id:e,zone:"headerIds"})),...(dc.scroll?.topIds??[]).map(e=>({id:e,zone:"scroll.topIds"})),...(dc.scroll?.bottomIds??[]).map(e=>({id:e,zone:"scroll.bottomIds"})),...(dc.footerIds??[]).map(e=>({id:e,zone:"footerIds"}))];var dc;const pc=new Set(cc.map(e=>e.id)),mc=(e,t,n)=>{switch(t){case"headerIds":e.headerIds?.push(n);break;case"scroll.topIds":e.scroll?.topIds?.push(n);break;case"scroll.bottomIds":e.scroll?.bottomIds?.push(n);break;case"footerIds":e.footerIds?.push(n)}};var uc=e.memo(({isOpen:r,setIsOpen:a,backgroundColor:i="white",backgroundSubdued:l="#3947821F",tertiaryColor:s="#067D431A",tertiaryTextColor:c="#000000",exploreCTAColor:d,checkoutFontSize:p,cartTitle:m="My Cart",emptyCartTitle:u,emptyCartDescription:g,emptyCartButtons:y,removeCartItem:f,handleIncrement:x,handleDecrement:h,addCartItem:b,isUserSignedIn:w,showBundle:v,bundleProducts:C,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,rewardMultiplier:S,redemptionMultiplier:N,discountApplied:F,removeDiscount:I,applyDiscount:B,checkoutFunction:z,joinNowFunction:$,guestLoyaltyPercentage:P,isDev:A,recProductsList:D,showMultiStepProgressBar:_,cartCheckpoints:L,redemptionRate:R,orderCreditType:O,orderCreditValue:M,showCartLevelAltPay:W,exploreCtaRedirectLink:j,discountAmountApplied:H,minimumCartValue:q,discountInCheckoutButton:U,isStickyCheckout:G,handleCheckpointCrossed:Z,customCartProgressBarCriteria:X,checkoutButtonColor:K="#252E69",ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,primaryTextColor:te,secondaryTextColor:ne,productRecsCtaButtonText:re,productRecsTitleText:oe,emptyProductRecsTitleText:ae,showProductRecsOnDesktop:ie,showProductRecsOnMobile:le,themeColor:se,themeTextColor:ce,companyName:pe,gstNumber:me,showGSTOption:ue,applyGSTToCart:ge,showMOVForProgressTiers:fe,freeProduct:xe,showLoyaltyCta:he=!1,freeProductAdjustedCartTotal:be,redemptionMinimumOrderValue:we,redemptionMinimumOrderValueStatus:Ee,signinCTAButtonVisible:ke,cartSigninCTAMainText:Te,applyNoteToCart:Se,note:Ne,showNoteOption:Fe,inlineCartOfferInfoText:Ie,inlineCartOfferInfoRedirectLink:Be,cartOfferTermsAndConditionsText:ze,showEditOptionOnProducts:$e,onSetLoading:Pe,showVariantSelectionDropdownInProductRecs:Ae,originalCartSubtotal:De,freebieProductsInCart:_e,showFreebieClaim:Le,addFreebieToCart:Re,freebiesInCart:Oe,effectiveQuantityForProgressBar:Me,productPercentageOffMapping:Ve,removeFreebieFromCart:We,postalCodeList:je,enableGeoLocationDeliveryRestriction:He=!1,getProductDetailsByVariantId:qe,applyPostalCodeAndDeliverySlotToCart:Ue,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ye,freebieFlowCheckpoints:Ge,freebieClaimData:Ze,postalCodeBasedItemTrackingParameter:Xe,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:rt,progressBarFreeProductIconType:ot,enableCustomCartOnCartPage:at,isCartPage:it,showCartTimer:lt,showFreebieMilestone:st,freebieMilestoneData:ct,cartTimerInMinutes:dt,cartTimerCustomText:pt,productRecsCardLayout:mt,productRecsCardListVariant:ut,imageAspectSelector:gt,cartComponentsCornerType:yt,cartComponentsCornerRadius:ft,cartOffersCarousalData:xt,gstSectionCustomizationData:ht,noteSectionTitle:bt,checkoutSectionMessage:wt,checkoutSectionMessageDisplay:vt,showVariantSelectionDropdownInProductClaim:Ct,loyaltyDiscount:Et,coinName:kt,showDiscountOnMRP:Tt,switchWidthVariant:St,prefixMessageText:Nt,suffixMessageText:Ft,successMessageText:It,toggleDecimal:Bt,cartOffersCarouselHeight:zt,disableCheckoutButton:$t,showEmptyCartRecommendations:Pt=!1,checkoutButtonBottomSpacing:At,applyCouponCode:Dt,showApplyCoupon:_t,enableConfetti:Lt,checkoutSectionMessageRedirectLink:Rt,showCheckoutButtonPaymentIcons:Ot,stealDealCheckpoints:Mt,stealDealProducts:Vt,stealDealAddToCart:Wt,showCouponOptions:jt,rewardCoupons:Ht,couponSelectionData:qt,useCartShell:Ut,showTrustedBadge:Qt,trustedBadgeData:Yt,drawerLayoutData:Gt,uploadImageAddonData:Zt})=>{const Xt=Ce(En),Kt=Ce(Fn),[Jt,en]=t(!1),tn=o(0),nn=o(null),[rn,on]=t(!1),[an,ln]=t(!0),[sn,cn]=t(!1),dn=o(null),pn=o(null),mn=o(null),[un,gn]=t(null),[yn,fn]=t(()=>window.ytUploadImageState??{status:"checking",items:[]}),xn=Bn();n(()=>{const e=e=>{const t=e.detail;(t.file||"uploaded"!==t.status&&"checking"!==t.status)&&(mn.current&&(URL.revokeObjectURL(mn.current),mn.current=null),gn(null)),fn(t)};return window.addEventListener("yt:upload-image:updated",e),()=>window.removeEventListener("yt:upload-image:updated",e)},[]),n(()=>{"required"!==yn.status&&(pn.current&&(window.clearTimeout(pn.current),pn.current=null),cn(!1))},[yn.status]),n(()=>()=>{pn.current&&window.clearTimeout(pn.current),mn.current&&URL.revokeObjectURL(mn.current)},[]);const hn=e=>{mn.current&&(URL.revokeObjectURL(mn.current),mn.current=null),e?(mn.current=URL.createObjectURL(e),gn({name:e.name,url:mn.current})):gn(null)},bn=()=>hn(null),wn=yn.file??un;e.useEffect(()=>{Pe&&Pe(xn)},[Pe]);const vn=o(!!Ut&&(window.ytCartShellState?.isOpen??!1)),Cn=o(null),Tn=o(null);n(()=>{const e=e=>{"open"!==e.state?.ytCustomCartDrawer&&a(!1)};return r?(vn.current||(Cn.current=window.history.state,Tn.current=window.location.href,window.history.pushState({ytCustomCartDrawer:"open"},"")),window.addEventListener("popstate",e),vn.current=!0):(vn.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.replaceState(Cn.current,"",Tn.current??window.location.href),vn.current=!1),()=>{window.removeEventListener("popstate",e)}},[r,a]);const In=function(e,r=!1){const[o,a]=t(r);return n(()=>{if("undefined"==typeof window||!window.matchMedia)return;const t=window.matchMedia(e),n=()=>a(t.matches);return n(),t.addEventListener?t.addEventListener("change",n):t.addListener(n),()=>{t.removeEventListener?t.removeEventListener("change",n):t.removeListener(n)}},[e]),o}("(min-width: 450px)");n(()=>{const e=document.querySelector("body");e&&(at&&it?e.classList.remove("drawer-open"):!In&&r?e.classList.add("drawer-open"):e.classList.remove("drawer-open"))},[r,at,it,In]);const Pn=Xt?.items?.reduce((e,t)=>e+t?.quantity,0);n(()=>{const e=()=>{const e=Date.now();e-tn.current<1500||(tn.current=e,en(!0),nn.current&&window.clearTimeout(nn.current),nn.current=window.setTimeout(()=>en(!1),1500))};return window.addEventListener("yt:autoFreebieAdded",e),()=>{nn.current&&window.clearTimeout(nn.current),window.removeEventListener("yt:autoFreebieAdded",e)}},[]);const[An,Dn]=t("normal"),[_n,Ln]=t("normal"),[Rn,On]=t("auto");n(()=>{CSS.supports("font-weight","500")?Dn("500"):CSS.supports("font-weight","400")?Dn("400"):CSS.supports("font-weight","600")&&Dn("600"),CSS.supports("font-weight","400")?Ln("400"):CSS.supports("font-weight","300")?Ln("300"):CSS.supports("font-weight","200")&&Ln("200"),CSS.supports("width","-webkit-fill-available")?On("-webkit-fill-available"):CSS.supports("width","-moz-available")&&On("-moz-available")},[]),n(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",An),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",_n),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Rn)},[An,_n]);const[Mn]=ve(kn),[Vn]=ve(Nn),[Wn]=ve(Sn);n(()=>{ln(!("all-products"!==Xe&&("specific-tags"!==Xe||Mn.isPostalCodeValid||Ke)&&("specific-tags"!==Xe||Mn.isPostalCodeValid||Vn||!Ke)&&("specific-tags"===Xe&&"standard"===Wn||rn&&(Ke?Mn.isPostalCodeValid&&Vn:Mn.isPostalCodeValid))))},[Mn.isPostalCodeValid,Vn,rn,Xe,Ke]),ve(zn);const[jn,Hn]=t(!0);n(()=>{const e=String(dt??5);if(localStorage.getItem("cartTimerMinutes")!==e)return localStorage.setItem("cartTimerMinutes",e),localStorage.removeItem("cartTimerRanOnce"),localStorage.removeItem("cartTimerTimeLeft"),void Hn(!0);"true"===localStorage.getItem("cartTimerRanOnce")&&Hn(!1);const t=localStorage.getItem("cartTimerTimeLeft");t&&parseInt(t,10)<=0&&Hn(!1)},[dt]);const qn=()=>{Hn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("cartTimerTimeLeft")},Un=new Date("2024-11-01"),Qn=Ut?document.getElementById("yt-cart-shell-content"):null,Yn=at&&it,Gn=(e=>{const t={headerIds:[],scroll:{topIds:[],bottomIds:[]},footerIds:[]},n=new Set;return["headerIds","scroll.topIds","scroll.bottomIds","footerIds"].forEach(r=>{((e,t)=>{switch(t){case"headerIds":return e?.headerIds??[];case"scroll.topIds":return e?.scroll?.topIds??[];case"scroll.bottomIds":return e?.scroll?.bottomIds??[];case"footerIds":return e?.footerIds??[];default:return[]}})(e,r).forEach(e=>{!n.has(e)&&pc.has(e)&&(n.add(e),mc(t,r,e))})}),cc.forEach(({id:e,zone:r})=>{n.has(e)||(n.add(e),mc(t,r,e))}),t})(Gt),Zn=D&&D?.filter(Boolean).length>0,Xn=D&&D?.filter(Boolean),Kn={borderBottom:Yn?"1px solid #3947821F":"none",marginTop:Yn?"5px":"none"},Jn={fontWeight:"var(--yt-cart-font-weight, bold)",color:te,fontSize:"16px"},er={display:"flex",flexDirection:Yn&&In?"row":"column",gap:Yn?"15px":"0px",height:Yn?"500px":"100%",marginTop:Yn?"10px":"0px",overflow:"hidden"},tr={flex:1,minHeight:0,display:"flex",flexDirection:"column",width:Yn&&In?"50%":"100%"},nr={display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",scrollbarWidth:"none",borderRight:Yn?"1px solid #3947821F":"none"},rr={display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},or={fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"},ar={fontSize:"10px",color:se??"#50D1AA",fontWeight:600,display:"flex",justifyContent:ke?"space-between":"center"},ir=(t,n)=>{const o=`drawer-layout-${t}-${n}`;switch(t){case"offers-carousel":return xt?.enableCartOffersCarousel?e.createElement(is,{key:o,themeColor:se,cartOffersCarousalData:xt,cartOffersCarouselHeight:zt,cartData:Xt}):null;case"timer":return lt&&jn&&Xt?.item_count?e.createElement(Rl,{key:o,minutes:dt,customText:pt,onTimerComplete:qn}):null;case"info-text":return Ie?e.createElement(Cl,{key:o,inlineCartOfferInfoText:Ie,inlineCartOfferInfoRedirectLink:Be,themeColor:se,tooltipText:ze,themeTextColor:ce}):null;case"steal-deal":return Mt&&Mt.length>0&&Vt&&Vt.length>0&&Xt?.item_count>0?e.createElement(Js,{key:o,stealDealCheckpoints:Mt,stealDealProducts:Vt,freeProductAdjustedCartTotal:be,effectiveQuantityForProgressBar:Me,addFreebieToCart:Wt??Re,freebiesInCart:Oe??[],themeColor:se,primaryTextColor:te,secondaryTextColor:ne,showVariantsInClaimSection:Ze?.showVariantsInClaimSection??!1}):null;case"upload-image":return!0!==Zt?.showUploadImageAddon||"always"!==Zt.showUI&&("required_item_atc"!==Zt.showUI||"required"!==yn.status&&"optional"!==yn.status&&"uploaded"!==yn.status)?null:e.createElement(lc,{key:o,ref:dn,highlighted:sn,onFileSelected:hn,onRemove:bn,required:"required"===Zt.state,ctaButtonBackgroundColor:J,primaryTextColor:te,tertiaryColor:s,tertiaryTextColor:c,uploadImageAddonData:Zt,uploadedFile:wn});case"recs":return(t=>{const n=In&&ie&&!!Xn&&Zn&&Xt?.item_count>0&&b,r=!In&&le&&!!Xn&&Zn&&Xt?.item_count>0&&b;return n||r?e.createElement(e.Fragment,{key:t},n&&e.createElement(_r,{addCartItem:b,products:Xn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,productRecsTitleText:oe,themeColor:se,primaryTextColor:te,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ae,cardLayout:mt,variant:ut,cartComponentsCornerType:yt,cartComponentsCornerRadius:ft,backgroundSubdued:l,backgroundColor:i,tertiaryColor:s,tertiaryTextColor:c}),r&&e.createElement(_r,{addCartItem:b,products:Xn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,productRecsTitleText:oe,themeColor:se,primaryTextColor:te,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ae,cardLayout:mt,variant:ut,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,backgroundSubdued:l,tertiaryColor:s,tertiaryTextColor:c})):null})(o);case"bundle":return Xt?.item_count>0&&v&&C?e.createElement(ka,{key:o,bundleProducts:C}):null;case"gst":return ue&&ge&&Xt?.item_count>0?e.createElement(Za,{key:o,companyName:pe,gstNumber:me,themeColor:se,iconColor:ht?.iconColor,showIcon:ht?.showIcon,backgroundColor:ht?.backgroundColor,textColor:ht?.textColor,title:ht?.title}):null;case"freebie-claim":return Xt&&Xt?.item_count>0&&Re&&_e&&Oe&&_e.length>0?e.createElement(vl,{key:o,freebieProductsInCart:_e,themeColor:se,themeTextColor:ce,primaryTextColor:te,addFreebieToCart:Re,freebiesInCart:Oe,imageAspectSelector:gt,freebieCouponTemplates:Ye,freebieClaimData:Ze,cartCheckpoints:L,isCartDrawerOpen:r}):null;case"shipping":return He&&(je?.length??0)>0&&Ue&&Xt?.item_count>0?e.createElement("div",{key:o,className:"yt-cart-geolocation-section form-group"},e.createElement("div",{className:"yt-cart-shipping-header",style:rr,onClick:()=>ln(!an)},e.createElement("span",{className:"yt-cart-shipping-label",style:or},"Shipping ",e.createElement(de,null)),e.createElement("div",{className:"yt-cart-shipping-toggle-icon icon-transition"},an?e.createElement(Q,null):e.createElement(Y,null))),"all-products"===Xe&&an?e.createElement(Tl,{postalCodeList:je,themeColor:se,themeTextColor:ce,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Un}):an&&(rn?e.createElement(Tl,{postalCodeList:je,themeColor:se,themeTextColor:ce,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Un}):e.createElement(Sl,{postalCodeList:je,themeColor:se,themeTextColor:ce,enableSlotPicker:Ke,disabledDates:Un}))):null;case"note":return Fe&&Se&&Xt?.item_count>0?e.createElement(Xa,{key:o,note:Ne,noteSectionTitle:bt}):null;case"gift-wrap":return nt?.showGiftWrapOption&&Xt?.item_count>0?e.createElement(Dl,{key:o,themeColor:se,id:nt?.giftProductId,detail:rt,showPrice:nt?.showPrice,errorText:nt?.errorText,customText:nt?.customText,showGiftIcon:nt?.showGiftIcon,showProductImage:nt?.showProductImage,addCartItem:b,removeCartItem:f}):null;case"coupon":return Xt?.item_count>0&&jt&&Ht&&qt&&Dt&&!he?e.createElement(La,{key:o,rewardCoupons:Ht,couponSelectionData:qt,applyCouponCode:Dt,removeDiscount:I,enableConfetti:Lt,backgroundSubdued:l,themeColor:se,themeTextColor:ce,primaryTextColor:te,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,cartComponentsCornerRadius:ft}):Xt?.item_count>0&&_t&&!jt&&!he&&Dt?e.createElement(Ta,{key:o,backgroundSubdued:l,themeColor:se,themeTextColor:ce,primaryTextColor:te,cartComponentsCornerRadius:ft,applyCouponCode:Dt,removeDiscount:I,enableConfetti:Lt}):null;case"loyalty":return(t=>he&&Xt?.item_count?e.createElement(e.Fragment,{key:t},w||Et?!Et&&void 0!==E&&void 0!==T&&!!B&&e.createElement(Oo,{themeColor:se,applyDiscount:B,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,primaryTextColor:te,redemptionMinimumOrderValue:we,redemptionMinimumOrderValueStatus:Ee,coinName:kt,showCartLevelAltPay:W}):!!P&&!!$&&e.createElement(zo,{cartSigninCTAMainText:Te,signinCTAButtonVisible:ke,themeColor:se,joinNowFunction:$,guestLoyaltyPercentage:P,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,primaryTextColor:te,secondaryTextColor:ne,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,showCartLevelAltPay:W}),!!Et&&!!I&&Et&&e.createElement(Do,{themeColor:se,removeDiscount:I,loyaltyDiscount:Et,primaryTextColor:te,secondaryTextColor:ne,showCartLevelAltPay:W}),!!Ee&&!!we&&we>1&&e.createElement("span",{className:"yt-cart-loyalty-mov-text",style:ar},"Minimum order value to use ",kt,":"," ",we)):null)(o);case"points-preview":return he&&W&&R&&Xt?.item_count>0?e.createElement(ms,{key:o,loyaltyIcon:k,backgroundSubdued:l,primaryTextColor:te,orderCreditType:O,orderCreditValue:M,coinName:kt,rewardMultiplier:S}):null;default:return null}},lr=e.createElement(e.Fragment,null,Kt.cartLoading?e.createElement("div",{className:"yt-cart-loader-overlay",style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},Kt.showLoader&&!Kt.showSkeletonLoader&&e.createElement("div",{className:"loader"},"‎")):e.createElement(e.Fragment,null),e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},e.createElement("div",{className:"yt-cart-header"},e.createElement("div",{className:"yt-cart-header-row",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},e.createElement("span",{className:"yt-cart-title-container",style:Jn},e.createElement("span",{className:"yt-cart-title-text",style:{whiteSpace:"nowrap",flexShrink:0}},m),Xt?.item_count>0&&W&&!(he&&W)&&!!M&&M>0&&e.createElement(gs,{orderCreditType:O,orderCreditValue:M,loyaltyIcon:k,coinName:kt,themeColor:se,themeTextColor:ce,rewardMultiplier:S}),Pn>0&&e.createElement("span",{className:"yt-cart-item-count-badge",style:(e=>({backgroundColor:e||"#e1e1e1",borderRadius:"50%",width:"14px",height:"14px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9px",fontWeight:400,minWidth:"14px",lineHeight:"14px"}))(l)},Pn)),e.createElement("div",{className:"yt-cart-header-actions",style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(at&&it)&&e.createElement("div",{className:"yt-cart-close-button",style:{backgroundColor:l||"#cacaca30",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"}},e.createElement(ye,{style:{color:te},size:28,cursor:"pointer",onClick:()=>{a(!r)}})))),Kt&&e.createElement(ds,{$themeColor:se,show:Kt.showLoader}),Jt&&Lt&&e.createElement(lo,{particleCount:50,spread:90,origin:{y:.3}}),Gn.headerIds?.map((e,t)=>ir(e,t))),_&&Xt?.items_subtotal_price>0&&Xt?.currency&&!!L&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold);return a.filter(e=>0!==e?.[no(r)]&&("minimum_order_value"!==r||1!==e?.[no(r)])).some((e,i)=>ro(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(L,$n(void 0!==De?De:Xt?.items_subtotal_price,Xt.currency),void 0===Me?Xt?.item_count:Me,X??"minimum_order_value",Xt?.item_count)&&e.createElement(e.Fragment,null,e.createElement(ho,{customCartProgressBarCriteria:X??"minimum_order_value",handleCheckpointCrossed:Z,checkpoints:L,effectiveQuantityForProgressBar:void 0===Me?Xt?.item_count:Me,currentCartAmount:$n(void 0!==De?De:Xt?.items_subtotal_price,Xt.currency),themeColor:se,themeTextColor:ce,primaryTextColor:te,secondaryTextColor:ne,showMOVForProgressTiers:fe,progressBarFreeProductIconType:ot,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,prefixMessageText:Nt,suffixMessageText:Ft,successMessageText:It,enableConfetti:Lt})),Yn&&e.createElement("div",{className:"yt-cartheader-border",style:Kn}),Xt?.item_count>0&&!Yn&&e.createElement("div",{className:"yt-cart-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-content-wrapper",style:er},e.createElement("div",{className:"yt-cart-content",style:tr},0===Xt?.items?.length&&0===Xt?.item_count&&!1===Kt?.showSkeletonLoader?e.createElement(vo,{showLoyaltyCta:he,joinNowFunction:$,emptyCartTitle:u,emptyCartDescription:g,exploreCTAColor:d,isUserSignedIn:w,exploreCtaRedirectLink:j,themeColor:se,emptyCartButtons:y,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,themeTextColor:ce,isRecProductsListValid:Zn,recProductsList:Xn,addCartItem:b,productRecsCtaButtonText:re,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,primaryTextColor:te,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ae,emptyProductRecsTitleText:ae,backgroundSubdued:l,showEmptyCartRecommendations:Pt,tertiaryColor:s,tertiaryTextColor:c}):e.createElement("div",{className:"yt-cart-scroll-area",style:nr},Gn.scroll?.topIds?.map((e,t)=>ir(e,t)),e.createElement(Ea,{isDev:A,themeColor:se,handleDecrement:h,handleIncrement:x,removeCartItem:f,addCartItem:b,primaryTextColor:te,secondaryTextColor:ne,freeProduct:xe,themeTextColor:ce,showEditOptionOnProducts:$e,productPercentageOffMapping:Ve,removeFreebieFromCart:We,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ye??[],freebieFlowCheckpoints:Ge??[],cartCheckpoints:L,freeProductAdjustedCartTotal:be,imageAspectSelector:gt,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,giftWrapVariantId:rt?.variants?.nodes[0]?.id,giftWrapProductId:nt?.giftProductId,showGiftWrapAsLineItem:nt?.showGiftWrapAsLineItem,backgroundSubdued:l,tertiaryColor:s,tertiaryTextColor:c,backgroundColor:i,showDiscountOnMRP:Tt,checkoutSectionMessage:wt,checkoutSectionMessageRedirectLink:Rt,showFreebieMilestone:st,freebieMilestoneData:ct,freeLabelText:Ze?.freeLabelText,customCartProgressBarCriteria:X,effectiveQuantityForProgressBar:Me,isLargeScreen:In}),Gn.scroll?.bottomIds?.map((e,t)=>ir(e,t)),"devlhok.myshopify.com"===window.ytapp?.storeDomain&&e.createElement(ys,{showDiscountOnMRP:Tt,cartCheckpoints:L,toggleDecimal:Bt,primaryTextColor:te,discountApplied:F,showTrustedBadge:Qt,discountAmountApplied:H}))),e.createElement(Po,{isCartPageEnabled:Yn,backgroundColour:i,isLargeScreen:In},Gn.footerIds?.map((e,t)=>ir(e,t)),Xt&&z&&Xt?.item_count>0&&e.createElement("div",{className:"yt-cart-checkout-wrapper"},e.createElement(So,{isCartPageEnabled:Yn,disableCheckoutButton:!!$t||Kt.cartLoading,discountApplied:F,checkoutFunction:z,checkoutButtonColor:K,checkoutFontSize:p,discountInCheckoutButton:U,isStickyCheckout:G,discountAmountApplied:H,minimumCartValue:q,themeTextColor:ce,applyGSTToCart:ge,showGSTOption:ue,applyNoteToCart:Se,showNoteOption:Fe,enableGeoLocationDeliveryRestriction:He,applyPostalCodeAndDeliverySlotToCart:Ue,enableSlotPicker:Ke,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,checkoutSectionMessage:wt,checkoutSectionMessageDisplay:vt,checkoutSectionMessageRedirectLink:Rt,showDiscountOnMRP:Tt,tertiaryColor:s,tertiaryTextColor:c,cartCheckpoints:L,toggleDecimal:Bt,checkoutButtonBottomSpacing:At,showCheckoutButtonPaymentIcons:Ot,primaryTextColor:te,hideSubtotalAndBadge:"devlhok.myshopify.com"===window.ytapp?.storeDomain,showTrustedBadge:Qt,trustedBadgeData:Yt,isLargeScreen:In,uploadImageStatus:yn.status,uploadImageRequired:"required"===yn.status,onUploadImageRequired:()=>{pn.current&&window.clearTimeout(pn.current),cn(!0),pn.current=window.setTimeout(()=>{cn(!1),pn.current=null},2e3),requestAnimationFrame(()=>{dn.current?.scrollIntoView({behavior:"smooth",block:"center"}),dn.current?.focus({preventScroll:!0})})}})))))));return Ut&&Qn?V(lr,Qn):e.createElement(sc,{className:"yt-cart-drawer",$isDev:A,$isOpen:r,$backgroundColor:i,$isCartPageEnabled:Yn,$isLargeScreen:In,$switchWidthVariant:St},lr)});jt('@media (max-width: 108px) {\n .yt-fixed-bundle-price-section {\n width: 100% !important;\n }\n .yt-fixed-bundle-product-list {\n max-width: 100% !important;\n width: 100% !important;\n justify-content: center !important;\n }\n .price-text {\n text-align: center !important;\n }\n .bundle-builder-add-to-bundle-button {\n font-size: 12px !important;\n padding: 0px 8px !important;\n }\n .quantity .input-text.qty {\n width: 12px !important;\n height: 18px !important;\n }\n .quantity.buttons_added .minus,\n .quantity.buttons_added .plus {\n padding: 6px !important;\n height: 20px !important;\n }\n .bundle-builder-tracker-container {\n justify-content: center !important;\n }\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n .bundle-builder-title {\n font-size: 2rem !important;\n }\n .bundle-builder-tracker-item {\n width: 64px !important;\n height: 64px !important;\n }\n .bundle-builder-product-title {\n font-size: 14px !important;\n }\n}\n.hide-tracker-scrollbar {\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n}\n\n.hide-tracker-scrollbar::-webkit-scrollbar {\n display: none;\n}\n\n.yt-fixed-bundle-border {\n border: 1px solid #c7c7c7;\n}\n\n.yt-fixed-bundle-border-minor-curved {\n border-radius: 8px;\n}\n\n.yt-fixed-bundle-border-minor-curved-image {\n border-radius: 6px;\n}\n\n.yt-fixed-bundle-border-major-curved {\n border-radius: 20px;\n}\n\n.yt-fixed-bundle-border-major-curved-image {\n border-radius: 18px;\n}\n\n@media (min-width: 1200px) {\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-builder-tracker-container {\n margin-block: 0 !important;\n }\n .bundle-summary {\n display: flex;\n flex-direction: column !important;\n align-items: flex-start;\n gap: 2px !important;\n }\n .bundle-summary button {\n padding-top: 2px !important;\n padding-inline: 13px !important;\n font-size: 14px !important;\n padding-inline: 10px !important;\n padding: 0px;\n width: -webkit-fill-available;\n }\n .bundle-builder-tracker-progress {\n display: block !important;\n }\n .summary-info {\n width: 100% !important;\n min-width: 200px !important;\n display: flex;\n justify-content: space-between !important;\n flex-direction: row !important;\n flex-grow: 1 !important;\n font-size: 14px !important;\n }\n}\n@media (max-width: 540px) {\n .products-display {\n justify-content: space-between !important;\n column-gap: 5px !important;\n }\n .bundle-builder-product-container {\n width: 49% !important;\n }\n .bundle-builder-title {\n font-size: 1.5rem !important;\n margin-bottom: 8px !important;\n }\n .bundle-builder-subtitle {\n padding-top: 4px;\n font-size: 1rem !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-summary.bundle-filled {\n display: flex !important;\n }\n}\n.yt-bundle-builder-product-price {\n font-weight: 600;\n color: black;\n margin-bottom: 2px;\n}\n\n/* Fixed bundle block */\n.yt-fixed-bundle-fixed-bundle {\n box-sizing: unset;\n max-width: 1000px;\n margin: 0 auto;\n container-type: inline-size;\n text-align: left;\n}\n\n.yt-fixed-bundle-bundle-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n gap: 8px;\n line-height: normal;\n}\n\n.yt-fixed-bundle-bundle-title {\n font-size: 24px;\n font-weight: 600;\n text-align: center;\n width: 100%;\n}\n\n.yt-fixed-bundle-bundle-subtitle {\n font-size: 16px;\n font-weight: 300;\n text-align: center;\n}\n\n.yt-fixed-bundle-bundle-content {\n display: flex;\n flex-direction: column;\n padding: 10px 0px;\n}\n\n.yt-fixed-bundle-product-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.yt-product-main {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-card {\n display: flex;\n width: 90%;\n align-items: flex-start;\n padding: 0px;\n box-shadow: 2px 2px 11.8px 0px rgba(0, 0, 0, 0.1411764706);\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n position: unset;\n}\n\n.yt-fixed-bundle-product-image {\n max-width: none;\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n}\n\n.yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n}\n\n.yt-fixed-bundle-product-title {\n font-size: 16px;\n font-weight: 700;\n display: block;\n line-height: 1.4;\n}\n\n.yt-fixed-bundle-product-price {\n font-size: 16px;\n display: block;\n margin-bottom: 6px;\n}\n\n.yt-fixed-bundle-original-price {\n text-decoration: line-through !important;\n color: #6b7280;\n margin-left: 4px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-checkbox {\n display: none !important;\n}\n\n.yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n}\n\n.yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n}\n\n.yt-fixed-bundle-variant-select {\n appearance: none;\n -webkit-appearance: none;\n width: 100%;\n padding: 4px 20px;\n background-color: #ffffff;\n font-size: 15px;\n background-image: none;\n color: #2d2d2d;\n cursor: pointer;\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-variant-select:focus {\n border-color: #cac6c6;\n box-shadow: 0 0 8px 0 rgba(56, 55, 57, 0.3);\n outline: none;\n}\n\n.yt-fixed-bundle-select-dot {\n position: absolute;\n top: 50%;\n left: 10px;\n transform: translateY(-50%);\n font-weight: 700;\n color: #4d4d4d;\n width: 8px; /* Adjust size */\n font-size: 8px;\n border-radius: 50%;\n pointer-events: none;\n}\n\n.yt-fixed-bundle-select-dot::after {\n content: "";\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background-color: #1b1b1b;\n}\n\n.yt-fixed-bundle-select-icon {\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n pointer-events: none;\n color: #6b7280;\n background-color: rgba(30, 57, 103, 0.1);\n font-size: 20px;\n height: 100%;\n padding: 0px 5px;\n}\n\n.yt-fixed-bundle-plus-sign {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-plus-sign span {\n display: flex;\n justify-content: center;\n width: 24px;\n height: 22px;\n align-items: center;\n padding-bottom: 2px;\n background-color: #f2f2f2;\n color: black;\n border-radius: 2px;\n font-size: 20px;\n font-weight: bold;\n}\n\n.yt-fixed-bundle-price-section {\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n width: 1000px;\n}\n\n.yt-fixed-bundle-subtotal {\n font-size: 13px;\n font-weight: 400 !important;\n}\n\n.yt-fixed-bundle-subtotal-amount {\n font-weight: 600;\n font-size: 13px;\n}\n\n.yt-fixed-bundle-deal-price-container {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 12px;\n gap: 8px;\n margin-top: 3px;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-deal-price {\n font-size: 16px;\n font-weight: 600;\n}\n\n.yt-fixed-bundle-extra-savings {\n font-size: 12px;\n color: #f6f8f7;\n padding: 4px 8px;\n background-color: #d3122a;\n border-radius: 2px;\n font-weight: 700 !important;\n}\n\n.yt-fixed-bundle-add-to-cart-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background-color: #8b5cf6;\n border: none;\n padding: 8px 0px;\n font-size: 16px;\n font-weight: 500 !important;\n cursor: pointer;\n width: 100%;\n}\n\n.yt-fixed-bundle-add-to-cart-button:disabled,\n.yt-fixed-bundle-add-to-cart-button[disabled] {\n color: #7d7d7d;\n cursor: default;\n}\n\n.yt-fixed-bundle-product-card.horizontal {\n max-width: 100%;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-product-card.horizontal:hover {\n transform: none;\n}\n\n.yt-fixed-bundle-product-list.horizontal {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n}\n\n.yt-product-main.horizontal {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-image-container.horizontal {\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n width: 30%;\n}\n\n.yt-fixed-bundle-product-image.horizontal {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n user-select: none;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop.horizontal {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile.horizontal {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop.horizontal {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-product-details.horizontal {\n padding-left: 0px;\n}\n\n.yt-fixed-bundle-product-price.horizontal {\n margin-bottom: 0px;\n}\n\n@media (min-width: 100px) {\n @container (width > 100px) {\n .yt-fixed-bundle-fixed-bundle {\n padding: 40px;\n }\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: flex;\n width: 100%;\n bottom: 6px;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n display: none;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n }\n .yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n }\n .yt-fixed-bundle-variant-select {\n margin: 0px 4px;\n }\n .yt-fixed-bundle-select-icon {\n right: 4px;\n }\n .yt-fixed-bundle-bundle-title {\n font-size: 32px;\n }\n .yt-fixed-bundle-bundle-subtitle {\n font-size: 20px;\n }\n .yt-fixed-bundle-bundle-content {\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n }\n .yt-fixed-bundle-product-list {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n }\n .yt-fixed-bundle-product-card {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n text-align: center;\n }\n .yt-fixed-bundle-product-image-container {\n width: 100%;\n height: 100%;\n margin-right: 0;\n margin-bottom: 12px;\n justify-content: center;\n position: relative;\n }\n .yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n }\n .yt-fixed-bundle-product-image {\n height: 230px;\n width: 100%;\n aspect-ratio: 1;\n align-self: center;\n }\n .yt-fixed-bundle-plus-sign {\n align-self: center;\n margin-left: 0;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n margin-top: 32px;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 10px;\n }\n .yt-fixed-bundle-subtotal {\n font-size: 15px;\n }\n .yt-fixed-bundle-subtotal-amount {\n font-size: 15px;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n top: 8px;\n left: 10px;\n height: auto;\n display: flex;\n align-items: center;\n }\n .yt-fixed-bundle-deal-price {\n font-size: 24px;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 13px;\n padding: 4px 8px;\n }\n .yt-fixed-bundle-add-to-cart-button {\n font-size: 20px;\n padding: 10px 0px;\n width: 100%;\n }\n .yt-product-main {\n width: 29%;\n }\n .yt-fixed-bundle-product-card:hover {\n transform: translateY(-5px);\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1411764706);\n }\n }\n}\n.yt-product-main {\n display: flex;\n position: relative;\n}\n\n/* Container query */\n@container (max-width: 100px) {\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n }\n .yt-product-main {\n width: 100%;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n bottom: 6px;\n }\n .yt-fixed-bundle-product-image {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n }\n .yt-fixed-bundle-variant-select-wrapper {\n position: relative;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n }\n .yt-fixed-bundle-product-card {\n max-width: 100%;\n flex-direction: row;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n }\n}\n.yt-product-card-transition {\n opacity: 0;\n transform: translateY(20px);\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n}\n\n.yt-product-card-transition-up {\n opacity: 0;\n transform: translateY(-20px);\n transition: opacity 0.6s ease, transform 0.6s ease;\n}\n\n.yt-product-card-transition-active {\n opacity: 1;\n transform: translateY(0);\n}\n\n.yt-description-content img,\n.yt-collection-bundle-modal-description img,\n.yt-collection-bundle-modal-description iframe {\n max-width: 100%;\n height: auto;\n display: block;\n margin: 0 auto 15px;\n border-radius: 7px;\n}\n\n.yt-description-content,\n.yt-collection-bundle-modal-description {\n text-align: left;\n overflow-wrap: break-word;\n}\n\n.yt-byob-pagination-observer {\n display: block !important;\n}');const gc=c.div`
2778
+ `;const cc=[...((dc={headerIds:["offers-carousel","timer","info-text"],scroll:{topIds:[],bottomIds:["steal-deal","upload-image","recs"]},footerIds:["bundle","gst","freebie-claim","shipping","note","gift-wrap","coupon","loyalty","points-preview"]}).headerIds??[]).map(e=>({id:e,zone:"headerIds"})),...(dc.scroll?.topIds??[]).map(e=>({id:e,zone:"scroll.topIds"})),...(dc.scroll?.bottomIds??[]).map(e=>({id:e,zone:"scroll.bottomIds"})),...(dc.footerIds??[]).map(e=>({id:e,zone:"footerIds"}))];var dc;const pc=new Set(cc.map(e=>e.id)),mc=(e,t,n)=>{switch(t){case"headerIds":e.headerIds?.push(n);break;case"scroll.topIds":e.scroll?.topIds?.push(n);break;case"scroll.bottomIds":e.scroll?.bottomIds?.push(n);break;case"footerIds":e.footerIds?.push(n)}};var uc=e.memo(({isOpen:r,setIsOpen:a,backgroundColor:i="white",backgroundSubdued:l="#3947821F",tertiaryColor:s="#067D431A",tertiaryTextColor:c="#000000",exploreCTAColor:d,checkoutFontSize:p,cartTitle:m="My Cart",emptyCartTitle:u,emptyCartDescription:g,emptyCartButtons:y,removeCartItem:f,handleIncrement:x,handleDecrement:h,addCartItem:b,isUserSignedIn:w,showBundle:v,bundleProducts:C,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,rewardMultiplier:S,redemptionMultiplier:N,discountApplied:F,removeDiscount:I,applyDiscount:B,checkoutFunction:z,joinNowFunction:$,guestLoyaltyPercentage:P,isDev:A,recProductsList:D,showMultiStepProgressBar:_,cartCheckpoints:L,redemptionRate:R,orderCreditType:O,orderCreditValue:M,showCartLevelAltPay:W,exploreCtaRedirectLink:j,discountAmountApplied:H,minimumCartValue:q,discountInCheckoutButton:U,isStickyCheckout:G,handleCheckpointCrossed:Z,customCartProgressBarCriteria:X,checkoutButtonColor:K="#252E69",ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,primaryTextColor:te,secondaryTextColor:ne,productRecsCtaButtonText:re,productRecsTitleText:oe,emptyProductRecsTitleText:ae,showProductRecsOnDesktop:ie,showProductRecsOnMobile:le,themeColor:se,themeTextColor:ce,companyName:pe,gstNumber:me,showGSTOption:ue,applyGSTToCart:ge,showMOVForProgressTiers:fe,freeProduct:xe,showLoyaltyCta:he=!1,freeProductAdjustedCartTotal:be,redemptionMinimumOrderValue:we,redemptionMinimumOrderValueStatus:Ee,signinCTAButtonVisible:ke,cartSigninCTAMainText:Te,applyNoteToCart:Se,note:Ne,showNoteOption:Fe,inlineCartOfferInfoText:Ie,inlineCartOfferInfoRedirectLink:Be,cartOfferTermsAndConditionsText:ze,showEditOptionOnProducts:$e,onSetLoading:Pe,showVariantSelectionDropdownInProductRecs:Ae,originalCartSubtotal:De,freebieProductsInCart:_e,showFreebieClaim:Le,addFreebieToCart:Re,freebiesInCart:Oe,effectiveQuantityForProgressBar:Me,productPercentageOffMapping:Ve,removeFreebieFromCart:We,postalCodeList:je,enableGeoLocationDeliveryRestriction:He=!1,getProductDetailsByVariantId:qe,applyPostalCodeAndDeliverySlotToCart:Ue,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ye,freebieFlowCheckpoints:Ge,freebieClaimData:Ze,postalCodeBasedItemTrackingParameter:Xe,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:rt,progressBarFreeProductIconType:ot,enableCustomCartOnCartPage:at,isCartPage:it,showCartTimer:lt,showFreebieMilestone:st,freebieMilestoneData:ct,cartTimerInMinutes:dt,cartTimerCustomText:pt,productRecsCardLayout:mt,productRecsCardListVariant:ut,imageAspectSelector:gt,cartComponentsCornerType:yt,cartComponentsCornerRadius:ft,cartOffersCarousalData:xt,gstSectionCustomizationData:ht,noteSectionTitle:bt,checkoutSectionMessage:wt,checkoutSectionMessageDisplay:vt,showVariantSelectionDropdownInProductClaim:Ct,loyaltyDiscount:Et,coinName:kt,showDiscountOnMRP:Tt,switchWidthVariant:St,prefixMessageText:Nt,suffixMessageText:Ft,successMessageText:It,toggleDecimal:Bt,cartOffersCarouselHeight:zt,disableCheckoutButton:$t,showEmptyCartRecommendations:Pt=!1,checkoutButtonBottomSpacing:At,applyCouponCode:Dt,showApplyCoupon:_t,enableConfetti:Lt,checkoutSectionMessageRedirectLink:Rt,showCheckoutButtonPaymentIcons:Ot,stealDealCheckpoints:Mt,stealDealProducts:Vt,stealDealAddToCart:Wt,showCouponOptions:jt,rewardCoupons:Ht,couponSelectionData:qt,useCartShell:Ut,showTrustedBadge:Qt,trustedBadgeData:Yt,drawerLayoutData:Gt,uploadImageAddonData:Zt})=>{const Xt=Ce(En),Kt=Ce(Fn),[Jt,en]=t(!1),tn=o(0),nn=o(null),[rn,on]=t(!1),[an,ln]=t(!0),[sn,cn]=t(!1),dn=o(null),pn=o(null),mn=o(null),[un,gn]=t(null),[yn,fn]=t(()=>window.ytUploadImageState??{status:"checking",items:[]}),xn=Bn();n(()=>{const e=e=>{const t=e.detail;(t.file||"uploaded"!==t.status&&"checking"!==t.status)&&(mn.current&&(URL.revokeObjectURL(mn.current),mn.current=null),gn(null)),fn(t)};return window.addEventListener("yt:upload-image:updated",e),()=>window.removeEventListener("yt:upload-image:updated",e)},[]),n(()=>{"required"!==yn.status&&(pn.current&&(window.clearTimeout(pn.current),pn.current=null),cn(!1))},[yn.status]),n(()=>()=>{pn.current&&window.clearTimeout(pn.current),mn.current&&URL.revokeObjectURL(mn.current)},[]);const hn=e=>{mn.current&&(URL.revokeObjectURL(mn.current),mn.current=null),e?(mn.current=URL.createObjectURL(e),gn({name:e.name,url:mn.current})):gn(null)},bn=()=>hn(null),wn=yn.file??un;e.useEffect(()=>{Pe&&Pe(xn)},[Pe]);const vn=o(!!Ut&&(window.ytCartShellState?.isOpen??!1)),Cn=o(null),Tn=o(null);n(()=>{const e=e=>{"open"!==e.state?.ytCustomCartDrawer&&a(!1)};return r?(vn.current||(Cn.current=window.history.state,Tn.current=window.location.href,window.history.pushState({ytCustomCartDrawer:"open"},"")),window.addEventListener("popstate",e),vn.current=!0):(vn.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.replaceState(Cn.current,"",Tn.current??window.location.href),vn.current=!1),()=>{window.removeEventListener("popstate",e)}},[r,a]);const In=function(e,r=!1){const[o,a]=t(r);return n(()=>{if("undefined"==typeof window||!window.matchMedia)return;const t=window.matchMedia(e),n=()=>a(t.matches);return n(),t.addEventListener?t.addEventListener("change",n):t.addListener(n),()=>{t.removeEventListener?t.removeEventListener("change",n):t.removeListener(n)}},[e]),o}("(min-width: 450px)");n(()=>{const e=document.querySelector("body");e&&(at&&it?e.classList.remove("drawer-open"):!In&&r?e.classList.add("drawer-open"):e.classList.remove("drawer-open"))},[r,at,it,In]);const Pn=Xt?.items?.reduce((e,t)=>e+t?.quantity,0);n(()=>{const e=()=>{const e=Date.now();e-tn.current<1500||(tn.current=e,en(!0),nn.current&&window.clearTimeout(nn.current),nn.current=window.setTimeout(()=>en(!1),1500))};return window.addEventListener("yt:autoFreebieAdded",e),()=>{nn.current&&window.clearTimeout(nn.current),window.removeEventListener("yt:autoFreebieAdded",e)}},[]);const[An,Dn]=t("normal"),[_n,Ln]=t("normal"),[Rn,On]=t("auto");n(()=>{CSS.supports("font-weight","500")?Dn("500"):CSS.supports("font-weight","400")?Dn("400"):CSS.supports("font-weight","600")&&Dn("600"),CSS.supports("font-weight","400")?Ln("400"):CSS.supports("font-weight","300")?Ln("300"):CSS.supports("font-weight","200")&&Ln("200"),CSS.supports("width","-webkit-fill-available")?On("-webkit-fill-available"):CSS.supports("width","-moz-available")&&On("-moz-available")},[]),n(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",An),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",_n),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Rn)},[An,_n]);const[Mn]=ve(kn),[Vn]=ve(Nn),[Wn]=ve(Sn);n(()=>{ln(!("all-products"!==Xe&&("specific-tags"!==Xe||Mn.isPostalCodeValid||Ke)&&("specific-tags"!==Xe||Mn.isPostalCodeValid||Vn||!Ke)&&("specific-tags"===Xe&&"standard"===Wn||rn&&(Ke?Mn.isPostalCodeValid&&Vn:Mn.isPostalCodeValid))))},[Mn.isPostalCodeValid,Vn,rn,Xe,Ke]),ve(zn);const[jn,Hn]=t(!0);n(()=>{const e=String(dt??5);if(localStorage.getItem("cartTimerMinutes")!==e)return localStorage.setItem("cartTimerMinutes",e),localStorage.removeItem("cartTimerRanOnce"),localStorage.removeItem("cartTimerTimeLeft"),void Hn(!0);"true"===localStorage.getItem("cartTimerRanOnce")&&Hn(!1);const t=localStorage.getItem("cartTimerTimeLeft");t&&parseInt(t,10)<=0&&Hn(!1)},[dt]);const qn=()=>{Hn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("cartTimerTimeLeft")},Un=new Date("2024-11-01"),Qn=Ut?document.getElementById("yt-cart-shell-content"):null,Yn=at&&it,Gn=(e=>{const t={headerIds:[],scroll:{topIds:[],bottomIds:[]},footerIds:[]},n=new Set;return["headerIds","scroll.topIds","scroll.bottomIds","footerIds"].forEach(r=>{((e,t)=>{switch(t){case"headerIds":return e?.headerIds??[];case"scroll.topIds":return e?.scroll?.topIds??[];case"scroll.bottomIds":return e?.scroll?.bottomIds??[];case"footerIds":return e?.footerIds??[];default:return[]}})(e,r).forEach(e=>{!n.has(e)&&pc.has(e)&&(n.add(e),mc(t,r,e))})}),cc.forEach(({id:e,zone:r})=>{n.has(e)||(n.add(e),mc(t,r,e))}),t})(Gt),Zn=D&&D?.filter(Boolean).length>0,Xn=D&&D?.filter(Boolean),Kn={borderBottom:Yn?"1px solid #3947821F":"none",marginTop:Yn?"5px":"none"},Jn={fontWeight:"var(--yt-cart-font-weight, bold)",color:te,fontSize:"16px"},er={display:"flex",flexDirection:Yn&&In?"row":"column",gap:Yn?"15px":"0px",height:Yn?"500px":"100%",marginTop:Yn?"10px":"0px",overflow:"hidden"},tr={flex:1,minHeight:0,display:"flex",flexDirection:"column",width:Yn&&In?"50%":"100%"},nr={display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",scrollbarWidth:"none",borderRight:Yn?"1px solid #3947821F":"none"},rr={display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},or={fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"},ar={fontSize:"10px",color:se??"#50D1AA",fontWeight:600,display:"flex",justifyContent:ke?"space-between":"center"},ir=(t,n)=>{const o=`drawer-layout-${t}-${n}`;switch(t){case"offers-carousel":return xt?.enableCartOffersCarousel?e.createElement(is,{key:o,themeColor:se,cartOffersCarousalData:xt,cartOffersCarouselHeight:zt,cartData:Xt}):null;case"timer":return lt&&jn&&Xt?.item_count?e.createElement(Rl,{key:o,minutes:dt,customText:pt,onTimerComplete:qn}):null;case"info-text":return Ie?e.createElement(Cl,{key:o,inlineCartOfferInfoText:Ie,inlineCartOfferInfoRedirectLink:Be,themeColor:se,tooltipText:ze,themeTextColor:ce}):null;case"steal-deal":return Mt&&Mt.length>0&&Vt&&Vt.length>0&&Xt?.item_count>0?e.createElement(Js,{key:o,stealDealCheckpoints:Mt,stealDealProducts:Vt,freeProductAdjustedCartTotal:be,effectiveQuantityForProgressBar:Me,addFreebieToCart:Wt??Re,freebiesInCart:Oe??[],themeColor:se,primaryTextColor:te,secondaryTextColor:ne,showVariantsInClaimSection:Ze?.showVariantsInClaimSection??!1}):null;case"upload-image":return!0!==Zt?.showUploadImageAddon||"always"!==Zt.showUI&&("required_item_atc"!==Zt.showUI||"required"!==yn.status&&"optional"!==yn.status&&"uploaded"!==yn.status)?null:e.createElement(lc,{key:o,ref:dn,highlighted:sn,onFileSelected:hn,onRemove:bn,required:"required"===Zt.state,ctaButtonBackgroundColor:J,primaryTextColor:te,tertiaryColor:s,tertiaryTextColor:c,uploadImageAddonData:Zt,uploadedFile:wn});case"recs":return(t=>{const n=In&&ie&&!!Xn&&Zn&&Xt?.item_count>0&&b,r=!In&&le&&!!Xn&&Zn&&Xt?.item_count>0&&b;return n||r?e.createElement(e.Fragment,{key:t},n&&e.createElement(_r,{addCartItem:b,products:Xn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,productRecsTitleText:oe,themeColor:se,primaryTextColor:te,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ae,cardLayout:mt,variant:ut,cartComponentsCornerType:yt,cartComponentsCornerRadius:ft,backgroundSubdued:l,backgroundColor:i,tertiaryColor:s,tertiaryTextColor:c}),r&&e.createElement(_r,{addCartItem:b,products:Xn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,productRecsTitleText:oe,themeColor:se,primaryTextColor:te,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ae,cardLayout:mt,variant:ut,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,backgroundSubdued:l,tertiaryColor:s,tertiaryTextColor:c})):null})(o);case"bundle":return Xt?.item_count>0&&v&&C?e.createElement(ka,{key:o,bundleProducts:C}):null;case"gst":return ue&&ge&&Xt?.item_count>0?e.createElement(Za,{key:o,companyName:pe,gstNumber:me,themeColor:se,iconColor:ht?.iconColor,showIcon:ht?.showIcon,backgroundColor:ht?.backgroundColor,textColor:ht?.textColor,title:ht?.title}):null;case"freebie-claim":return Xt&&Xt?.item_count>0&&Re&&_e&&Oe&&_e.length>0?e.createElement(vl,{key:o,freebieProductsInCart:_e,themeColor:se,themeTextColor:ce,primaryTextColor:te,addFreebieToCart:Re,freebiesInCart:Oe,imageAspectSelector:gt,freebieCouponTemplates:Ye,freebieClaimData:Ze,cartCheckpoints:L,isCartDrawerOpen:r}):null;case"shipping":return He&&(je?.length??0)>0&&Ue&&Xt?.item_count>0?e.createElement("div",{key:o,className:"yt-cart-geolocation-section form-group"},e.createElement("div",{className:"yt-cart-shipping-header",style:rr,onClick:()=>ln(!an)},e.createElement("span",{className:"yt-cart-shipping-label",style:or},"Shipping ",e.createElement(de,null)),e.createElement("div",{className:"yt-cart-shipping-toggle-icon icon-transition"},an?e.createElement(Q,null):e.createElement(Y,null))),"all-products"===Xe&&an?e.createElement(Tl,{postalCodeList:je,themeColor:se,themeTextColor:ce,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Un}):an&&(rn?e.createElement(Tl,{postalCodeList:je,themeColor:se,themeTextColor:ce,enableSlotPicker:Ke,deliveryHeaderTitle:Je,deliveryAvailableText:et,deliveryNotAvailableText:tt,disabledDates:Un}):e.createElement(Sl,{postalCodeList:je,themeColor:se,themeTextColor:ce,enableSlotPicker:Ke,disabledDates:Un}))):null;case"note":return Fe&&Se&&Xt?.item_count>0?e.createElement(Xa,{key:o,note:Ne,noteSectionTitle:bt}):null;case"gift-wrap":return nt?.showGiftWrapOption&&Xt?.item_count>0?e.createElement(Dl,{key:o,themeColor:se,id:nt?.giftProductId,detail:rt,showPrice:nt?.showPrice,errorText:nt?.errorText,customText:nt?.customText,showGiftIcon:nt?.showGiftIcon,showProductImage:nt?.showProductImage,addCartItem:b,removeCartItem:f}):null;case"coupon":return Xt?.item_count>0&&jt&&Ht&&qt&&Dt&&!he?e.createElement(La,{key:o,rewardCoupons:Ht,couponSelectionData:qt,applyCouponCode:Dt,removeDiscount:I,enableConfetti:Lt,backgroundSubdued:l,themeColor:se,themeTextColor:ce,primaryTextColor:te,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,cartComponentsCornerRadius:ft}):Xt?.item_count>0&&_t&&!jt&&!he&&Dt?e.createElement(Ta,{key:o,backgroundSubdued:l,themeColor:se,themeTextColor:ce,primaryTextColor:te,cartComponentsCornerRadius:ft,applyCouponCode:Dt,removeDiscount:I,enableConfetti:Lt}):null;case"loyalty":return(t=>he&&Xt?.item_count?e.createElement(e.Fragment,{key:t},w||Et?!Et&&void 0!==E&&void 0!==T&&!!B&&e.createElement(Oo,{themeColor:se,applyDiscount:B,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,primaryTextColor:te,redemptionMinimumOrderValue:we,redemptionMinimumOrderValueStatus:Ee,coinName:kt,showCartLevelAltPay:W}):!!P&&!!$&&e.createElement(zo,{cartSigninCTAMainText:Te,signinCTAButtonVisible:ke,themeColor:se,joinNowFunction:$,guestLoyaltyPercentage:P,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,primaryTextColor:te,secondaryTextColor:ne,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,showCartLevelAltPay:W}),!!Et&&!!I&&Et&&e.createElement(Do,{themeColor:se,removeDiscount:I,loyaltyDiscount:Et,primaryTextColor:te,secondaryTextColor:ne,showCartLevelAltPay:W}),!!Ee&&!!we&&we>1&&e.createElement("span",{className:"yt-cart-loyalty-mov-text",style:ar},"Minimum order value to use ",kt,":"," ",we)):null)(o);case"points-preview":return he&&W&&R&&Xt?.item_count>0?e.createElement(ms,{key:o,loyaltyIcon:k,backgroundSubdued:l,primaryTextColor:te,orderCreditType:O,orderCreditValue:M,coinName:kt,rewardMultiplier:S}):null;default:return null}},lr=e.createElement(e.Fragment,null,Kt.cartLoading?e.createElement("div",{className:"yt-cart-loader-overlay",style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},Kt.showLoader&&!Kt.showSkeletonLoader&&e.createElement("div",{className:"loader"},"‎")):e.createElement(e.Fragment,null),e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},e.createElement("div",{className:"yt-cart-header"},e.createElement("div",{className:"yt-cart-header-row",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},e.createElement("span",{className:"yt-cart-title-container",style:Jn},e.createElement("span",{className:"yt-cart-title-text",style:{whiteSpace:"nowrap",flexShrink:0}},m),Xt?.item_count>0&&W&&!(he&&W)&&!!M&&M>0&&e.createElement(gs,{orderCreditType:O,orderCreditValue:M,loyaltyIcon:k,coinName:kt,themeColor:se,themeTextColor:ce,rewardMultiplier:S}),Pn>0&&e.createElement("span",{className:"yt-cart-item-count-badge",style:(e=>({backgroundColor:e||"#e1e1e1",borderRadius:"50%",width:"14px",height:"14px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9px",fontWeight:400,minWidth:"14px",lineHeight:"14px"}))(l)},Pn)),e.createElement("div",{className:"yt-cart-header-actions",style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(at&&it)&&e.createElement("div",{className:"yt-cart-close-button",style:{backgroundColor:l||"#cacaca30",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"}},e.createElement(ye,{style:{color:te},size:28,cursor:"pointer",onClick:()=>{a(!r)}})))),Kt&&e.createElement(ds,{$themeColor:se,show:Kt.showLoader}),Jt&&Lt&&e.createElement(lo,{particleCount:50,spread:90,origin:{y:.3}}),Gn.headerIds?.map((e,t)=>ir(e,t))),_&&Xt?.items_subtotal_price>0&&Xt?.currency&&!!L&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold);return a.filter(e=>0!==e?.[no(r)]&&("minimum_order_value"!==r||1!==e?.[no(r)])).some((e,i)=>ro(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(L,$n(void 0!==De?De:Xt?.items_subtotal_price,Xt.currency),void 0===Me?Xt?.item_count:Me,X??"minimum_order_value",Xt?.item_count)&&e.createElement(e.Fragment,null,e.createElement(ho,{customCartProgressBarCriteria:X??"minimum_order_value",handleCheckpointCrossed:Z,checkpoints:L,effectiveQuantityForProgressBar:void 0===Me?Xt?.item_count:Me,currentCartAmount:$n(void 0!==De?De:Xt?.items_subtotal_price,Xt.currency),themeColor:se,themeTextColor:ce,primaryTextColor:te,secondaryTextColor:ne,showMOVForProgressTiers:fe,progressBarFreeProductIconType:ot,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,prefixMessageText:Nt,suffixMessageText:Ft,successMessageText:It,enableConfetti:Lt})),Yn&&e.createElement("div",{className:"yt-cartheader-border",style:Kn}),Xt?.item_count>0&&!Yn&&e.createElement("div",{className:"yt-cart-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-content-wrapper",style:er},e.createElement("div",{className:"yt-cart-content",style:tr},0===Xt?.items?.length&&0===Xt?.item_count&&!1===Kt?.showSkeletonLoader?e.createElement(vo,{showLoyaltyCta:he,joinNowFunction:$,emptyCartTitle:u,emptyCartDescription:g,exploreCTAColor:d,isUserSignedIn:w,exploreCtaRedirectLink:j,themeColor:se,emptyCartButtons:y,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,themeTextColor:ce,isRecProductsListValid:Zn,recProductsList:Xn,addCartItem:b,productRecsCtaButtonText:re,ctaButtonBackgroundColor:J,ctaButtonTextColor:ee,primaryTextColor:te,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ae,emptyProductRecsTitleText:ae,backgroundSubdued:l,showEmptyCartRecommendations:Pt,tertiaryColor:s,tertiaryTextColor:c}):e.createElement("div",{className:"yt-cart-scroll-area",style:nr},Gn.scroll?.topIds?.map((e,t)=>ir(e,t)),e.createElement(Ea,{isDev:A,themeColor:se,handleDecrement:h,handleIncrement:x,removeCartItem:f,addCartItem:b,primaryTextColor:te,secondaryTextColor:ne,freeProduct:xe,themeTextColor:ce,showEditOptionOnProducts:$e,productPercentageOffMapping:Ve,removeFreebieFromCart:We,showDeleteOnFreebies:Qe,freebieCouponTemplates:Ye??[],freebieFlowCheckpoints:Ge??[],cartCheckpoints:L,freeProductAdjustedCartTotal:be,imageAspectSelector:gt,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,giftWrapVariantId:rt?.variants?.nodes[0]?.id,giftWrapProductId:nt?.giftProductId,showGiftWrapAsLineItem:nt?.showGiftWrapAsLineItem,backgroundSubdued:l,tertiaryColor:s,tertiaryTextColor:c,backgroundColor:i,showDiscountOnMRP:Tt,checkoutSectionMessage:wt,checkoutSectionMessageRedirectLink:Rt,showFreebieMilestone:st,freebieMilestoneData:ct,freeLabelText:Ze?.freeLabelText,showVariantsInClaimSection:Ze?.showVariantsInClaimSection,customCartProgressBarCriteria:X,effectiveQuantityForProgressBar:Me,isLargeScreen:In}),Gn.scroll?.bottomIds?.map((e,t)=>ir(e,t)),"devlhok.myshopify.com"===window.ytapp?.storeDomain&&e.createElement(ys,{showDiscountOnMRP:Tt,cartCheckpoints:L,toggleDecimal:Bt,primaryTextColor:te,discountApplied:F,showTrustedBadge:Qt,discountAmountApplied:H}))),e.createElement(Po,{isCartPageEnabled:Yn,backgroundColour:i,isLargeScreen:In},Gn.footerIds?.map((e,t)=>ir(e,t)),Xt&&z&&Xt?.item_count>0&&e.createElement("div",{className:"yt-cart-checkout-wrapper"},e.createElement(So,{isCartPageEnabled:Yn,disableCheckoutButton:!!$t||Kt.cartLoading,discountApplied:F,checkoutFunction:z,checkoutButtonColor:K,checkoutFontSize:p,discountInCheckoutButton:U,isStickyCheckout:G,discountAmountApplied:H,minimumCartValue:q,themeTextColor:ce,applyGSTToCart:ge,showGSTOption:ue,applyNoteToCart:Se,showNoteOption:Fe,enableGeoLocationDeliveryRestriction:He,applyPostalCodeAndDeliverySlotToCart:Ue,enableSlotPicker:Ke,cartComponentsCornerRadius:ft,cartComponentsCornerType:yt,checkoutSectionMessage:wt,checkoutSectionMessageDisplay:vt,checkoutSectionMessageRedirectLink:Rt,showDiscountOnMRP:Tt,tertiaryColor:s,tertiaryTextColor:c,cartCheckpoints:L,toggleDecimal:Bt,checkoutButtonBottomSpacing:At,showCheckoutButtonPaymentIcons:Ot,primaryTextColor:te,hideSubtotalAndBadge:"devlhok.myshopify.com"===window.ytapp?.storeDomain,showTrustedBadge:Qt,trustedBadgeData:Yt,isLargeScreen:In,uploadImageStatus:yn.status,uploadImageRequired:"required"===yn.status,onUploadImageRequired:()=>{pn.current&&window.clearTimeout(pn.current),cn(!0),pn.current=window.setTimeout(()=>{cn(!1),pn.current=null},2e3),requestAnimationFrame(()=>{dn.current?.scrollIntoView({behavior:"smooth",block:"center"}),dn.current?.focus({preventScroll:!0})})}})))))));return Ut&&Qn?V(lr,Qn):e.createElement(sc,{className:"yt-cart-drawer",$isDev:A,$isOpen:r,$backgroundColor:i,$isCartPageEnabled:Yn,$isLargeScreen:In,$switchWidthVariant:St},lr)});jt('@media (max-width: 108px) {\n .yt-fixed-bundle-price-section {\n width: 100% !important;\n }\n .yt-fixed-bundle-product-list {\n max-width: 100% !important;\n width: 100% !important;\n justify-content: center !important;\n }\n .price-text {\n text-align: center !important;\n }\n .bundle-builder-add-to-bundle-button {\n font-size: 12px !important;\n padding: 0px 8px !important;\n }\n .quantity .input-text.qty {\n width: 12px !important;\n height: 18px !important;\n }\n .quantity.buttons_added .minus,\n .quantity.buttons_added .plus {\n padding: 6px !important;\n height: 20px !important;\n }\n .bundle-builder-tracker-container {\n justify-content: center !important;\n }\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n .bundle-builder-title {\n font-size: 2rem !important;\n }\n .bundle-builder-tracker-item {\n width: 64px !important;\n height: 64px !important;\n }\n .bundle-builder-product-title {\n font-size: 14px !important;\n }\n}\n.hide-tracker-scrollbar {\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n}\n\n.hide-tracker-scrollbar::-webkit-scrollbar {\n display: none;\n}\n\n.yt-fixed-bundle-border {\n border: 1px solid #c7c7c7;\n}\n\n.yt-fixed-bundle-border-minor-curved {\n border-radius: 8px;\n}\n\n.yt-fixed-bundle-border-minor-curved-image {\n border-radius: 6px;\n}\n\n.yt-fixed-bundle-border-major-curved {\n border-radius: 20px;\n}\n\n.yt-fixed-bundle-border-major-curved-image {\n border-radius: 18px;\n}\n\n@media (min-width: 1200px) {\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-builder-tracker-container {\n margin-block: 0 !important;\n }\n .bundle-summary {\n display: flex;\n flex-direction: column !important;\n align-items: flex-start;\n gap: 2px !important;\n }\n .bundle-summary button {\n padding-top: 2px !important;\n padding-inline: 13px !important;\n font-size: 14px !important;\n padding-inline: 10px !important;\n padding: 0px;\n width: -webkit-fill-available;\n }\n .bundle-builder-tracker-progress {\n display: block !important;\n }\n .summary-info {\n width: 100% !important;\n min-width: 200px !important;\n display: flex;\n justify-content: space-between !important;\n flex-direction: row !important;\n flex-grow: 1 !important;\n font-size: 14px !important;\n }\n}\n@media (max-width: 540px) {\n .products-display {\n justify-content: space-between !important;\n column-gap: 5px !important;\n }\n .bundle-builder-product-container {\n width: 49% !important;\n }\n .bundle-builder-title {\n font-size: 1.5rem !important;\n margin-bottom: 8px !important;\n }\n .bundle-builder-subtitle {\n padding-top: 4px;\n font-size: 1rem !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-summary.bundle-filled {\n display: flex !important;\n }\n}\n.yt-bundle-builder-product-price {\n font-weight: 600;\n color: black;\n margin-bottom: 2px;\n}\n\n/* Fixed bundle block */\n.yt-fixed-bundle-fixed-bundle {\n box-sizing: unset;\n max-width: 1000px;\n margin: 0 auto;\n container-type: inline-size;\n text-align: left;\n}\n\n.yt-fixed-bundle-bundle-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n gap: 8px;\n line-height: normal;\n}\n\n.yt-fixed-bundle-bundle-title {\n font-size: 24px;\n font-weight: 600;\n text-align: center;\n width: 100%;\n}\n\n.yt-fixed-bundle-bundle-subtitle {\n font-size: 16px;\n font-weight: 300;\n text-align: center;\n}\n\n.yt-fixed-bundle-bundle-content {\n display: flex;\n flex-direction: column;\n padding: 10px 0px;\n}\n\n.yt-fixed-bundle-product-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.yt-product-main {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-card {\n display: flex;\n width: 90%;\n align-items: flex-start;\n padding: 0px;\n box-shadow: 2px 2px 11.8px 0px rgba(0, 0, 0, 0.1411764706);\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n position: unset;\n}\n\n.yt-fixed-bundle-product-image {\n max-width: none;\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n}\n\n.yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n}\n\n.yt-fixed-bundle-product-title {\n font-size: 16px;\n font-weight: 700;\n display: block;\n line-height: 1.4;\n}\n\n.yt-fixed-bundle-product-price {\n font-size: 16px;\n display: block;\n margin-bottom: 6px;\n}\n\n.yt-fixed-bundle-original-price {\n text-decoration: line-through !important;\n color: #6b7280;\n margin-left: 4px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-checkbox {\n display: none !important;\n}\n\n.yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n}\n\n.yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n}\n\n.yt-fixed-bundle-variant-select {\n appearance: none;\n -webkit-appearance: none;\n width: 100%;\n padding: 4px 20px;\n background-color: #ffffff;\n font-size: 15px;\n background-image: none;\n color: #2d2d2d;\n cursor: pointer;\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-variant-select:focus {\n border-color: #cac6c6;\n box-shadow: 0 0 8px 0 rgba(56, 55, 57, 0.3);\n outline: none;\n}\n\n.yt-fixed-bundle-select-dot {\n position: absolute;\n top: 50%;\n left: 10px;\n transform: translateY(-50%);\n font-weight: 700;\n color: #4d4d4d;\n width: 8px; /* Adjust size */\n font-size: 8px;\n border-radius: 50%;\n pointer-events: none;\n}\n\n.yt-fixed-bundle-select-dot::after {\n content: "";\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background-color: #1b1b1b;\n}\n\n.yt-fixed-bundle-select-icon {\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n pointer-events: none;\n color: #6b7280;\n background-color: rgba(30, 57, 103, 0.1);\n font-size: 20px;\n height: 100%;\n padding: 0px 5px;\n}\n\n.yt-fixed-bundle-plus-sign {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-plus-sign span {\n display: flex;\n justify-content: center;\n width: 24px;\n height: 22px;\n align-items: center;\n padding-bottom: 2px;\n background-color: #f2f2f2;\n color: black;\n border-radius: 2px;\n font-size: 20px;\n font-weight: bold;\n}\n\n.yt-fixed-bundle-price-section {\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n width: 1000px;\n}\n\n.yt-fixed-bundle-subtotal {\n font-size: 13px;\n font-weight: 400 !important;\n}\n\n.yt-fixed-bundle-subtotal-amount {\n font-weight: 600;\n font-size: 13px;\n}\n\n.yt-fixed-bundle-deal-price-container {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 12px;\n gap: 8px;\n margin-top: 3px;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-deal-price {\n font-size: 16px;\n font-weight: 600;\n}\n\n.yt-fixed-bundle-extra-savings {\n font-size: 12px;\n color: #f6f8f7;\n padding: 4px 8px;\n background-color: #d3122a;\n border-radius: 2px;\n font-weight: 700 !important;\n}\n\n.yt-fixed-bundle-add-to-cart-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background-color: #8b5cf6;\n border: none;\n padding: 8px 0px;\n font-size: 16px;\n font-weight: 500 !important;\n cursor: pointer;\n width: 100%;\n}\n\n.yt-fixed-bundle-add-to-cart-button:disabled,\n.yt-fixed-bundle-add-to-cart-button[disabled] {\n color: #7d7d7d;\n cursor: default;\n}\n\n.yt-fixed-bundle-product-card.horizontal {\n max-width: 100%;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-product-card.horizontal:hover {\n transform: none;\n}\n\n.yt-fixed-bundle-product-list.horizontal {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n}\n\n.yt-product-main.horizontal {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-image-container.horizontal {\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n width: 30%;\n}\n\n.yt-fixed-bundle-product-image.horizontal {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n user-select: none;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop.horizontal {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile.horizontal {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop.horizontal {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-product-details.horizontal {\n padding-left: 0px;\n}\n\n.yt-fixed-bundle-product-price.horizontal {\n margin-bottom: 0px;\n}\n\n@media (min-width: 100px) {\n @container (width > 100px) {\n .yt-fixed-bundle-fixed-bundle {\n padding: 40px;\n }\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: flex;\n width: 100%;\n bottom: 6px;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n display: none;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n }\n .yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n }\n .yt-fixed-bundle-variant-select {\n margin: 0px 4px;\n }\n .yt-fixed-bundle-select-icon {\n right: 4px;\n }\n .yt-fixed-bundle-bundle-title {\n font-size: 32px;\n }\n .yt-fixed-bundle-bundle-subtitle {\n font-size: 20px;\n }\n .yt-fixed-bundle-bundle-content {\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n }\n .yt-fixed-bundle-product-list {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n }\n .yt-fixed-bundle-product-card {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n text-align: center;\n }\n .yt-fixed-bundle-product-image-container {\n width: 100%;\n height: 100%;\n margin-right: 0;\n margin-bottom: 12px;\n justify-content: center;\n position: relative;\n }\n .yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n }\n .yt-fixed-bundle-product-image {\n height: 230px;\n width: 100%;\n aspect-ratio: 1;\n align-self: center;\n }\n .yt-fixed-bundle-plus-sign {\n align-self: center;\n margin-left: 0;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n margin-top: 32px;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 10px;\n }\n .yt-fixed-bundle-subtotal {\n font-size: 15px;\n }\n .yt-fixed-bundle-subtotal-amount {\n font-size: 15px;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n top: 8px;\n left: 10px;\n height: auto;\n display: flex;\n align-items: center;\n }\n .yt-fixed-bundle-deal-price {\n font-size: 24px;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 13px;\n padding: 4px 8px;\n }\n .yt-fixed-bundle-add-to-cart-button {\n font-size: 20px;\n padding: 10px 0px;\n width: 100%;\n }\n .yt-product-main {\n width: 29%;\n }\n .yt-fixed-bundle-product-card:hover {\n transform: translateY(-5px);\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1411764706);\n }\n }\n}\n.yt-product-main {\n display: flex;\n position: relative;\n}\n\n/* Container query */\n@container (max-width: 100px) {\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n }\n .yt-product-main {\n width: 100%;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n bottom: 6px;\n }\n .yt-fixed-bundle-product-image {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n }\n .yt-fixed-bundle-variant-select-wrapper {\n position: relative;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n }\n .yt-fixed-bundle-product-card {\n max-width: 100%;\n flex-direction: row;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n }\n}\n.yt-product-card-transition {\n opacity: 0;\n transform: translateY(20px);\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n}\n\n.yt-product-card-transition-up {\n opacity: 0;\n transform: translateY(-20px);\n transition: opacity 0.6s ease, transform 0.6s ease;\n}\n\n.yt-product-card-transition-active {\n opacity: 1;\n transform: translateY(0);\n}\n\n.yt-description-content img,\n.yt-collection-bundle-modal-description img,\n.yt-collection-bundle-modal-description iframe {\n max-width: 100%;\n height: auto;\n display: block;\n margin: 0 auto 15px;\n border-radius: 7px;\n}\n\n.yt-description-content,\n.yt-collection-bundle-modal-description {\n text-align: left;\n overflow-wrap: break-word;\n}\n\n.yt-byob-pagination-observer {\n display: block !important;\n}');const gc=c.div`
2779
2779
  display: flex;
2780
2780
  flex-direction: row;
2781
2781
  height: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.10.81",
3
+ "version": "0.10.82",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && tsc && rollup -c",