@lime-bundles/widget 3.4.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/index.cjs +4707 -2361
- package/dist/index.d.cts +6 -15
- package/dist/index.d.ts +6 -15
- package/dist/index.js +4701 -2365
- package/dist/lime-bundle.global.js +1165 -453
- package/dist/lime-bundle.global.js.map +1 -1
- package/docs/css-variables.md +44 -70
- package/docs/react-nextjs.md +3 -1
- package/docs/web-component.md +1 -1
- package/package.json +4 -3
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var LimeBundles=(()=>{var
|
|
1
|
+
"use strict";var LimeBundles=(()=>{var st=Object.defineProperty;var lr=Object.getOwnPropertyDescriptor;var sr=Object.getOwnPropertyNames;var dr=Object.prototype.hasOwnProperty;var cr=(e,t)=>{for(var n in t)st(e,n,{get:t[n],enumerable:!0})},ur=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sr(t))!dr.call(e,o)&&o!==n&&st(e,o,{get:()=>t[o],enumerable:!(r=lr(t,o))||r.enumerable});return e};var pr=e=>ur(st({},"__esModule",{value:!0}),e);var Mo={};cr(Mo,{LimeBundleElement:()=>qe,trackInputMode:()=>lt});var mr=Object.defineProperty,Dt=(e,t)=>{for(var n in t)mr(e,n,{get:t[n],enumerable:!0})},At=class extends Error{constructor(e){super(e.map(t=>t.message).join("; ")),this.errors=e,this.name="StorefrontApiError"}},br="2025-10";async function hr(e){if(e)return typeof e=="function"?await e():e}function Ft(e){return!!(e.country||e.language||e.buyer)}function ct(e){let t=e.apiVersion??br,n=`https://${e.shopDomain}/api/${t}/graphql.json`;return{async query(r,o,i){let a={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":e.accessToken};e.buyerIp&&(a["Shopify-Storefront-Buyer-IP"]=e.buyerIp);let l=await hr(e.buyer),d={...o??{}};e.country&&(d.country=e.country),e.language&&(d.language=e.language),l&&(d.buyer=l);let s=await fetch(n,{method:"POST",headers:a,body:JSON.stringify({query:r,variables:d}),signal:i?.signal});if(!s.ok)throw new At([{message:`Storefront API error: ${s.status} ${s.statusText}`}]);let c=await s.json();if(c.errors?.length)throw new At(c.errors);return c.data}}}function Vt(e){return e.replace(/query\s+(\w+)\s*(?:\(([^)]*)\))?\s*\{/,(t,n,r)=>{let o=(r||"").trim(),i="$country: CountryCode, $language: LanguageCode, $buyer: BuyerInput",a=o?`${o}, ${i}`:i;return`query ${n}(${a}) @inContext(country: $country, language: $language, buyer: $buyer) {`})}var Ut=`#graphql
|
|
2
2
|
query BundleMetaobject($id: ID!) {
|
|
3
3
|
metaobject(id: $id) {
|
|
4
4
|
id
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
id
|
|
12
12
|
title
|
|
13
13
|
handle
|
|
14
|
+
productType
|
|
14
15
|
featuredImage { url altText }
|
|
15
16
|
priceRange {
|
|
16
17
|
minVariantPrice { amount currencyCode }
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
id
|
|
40
41
|
title
|
|
41
42
|
handle
|
|
43
|
+
productType
|
|
42
44
|
featuredImage { url altText }
|
|
43
45
|
priceRange {
|
|
44
46
|
minVariantPrice { amount currencyCode }
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
id
|
|
70
72
|
title
|
|
71
73
|
handle
|
|
74
|
+
productType
|
|
72
75
|
featuredImage { url altText }
|
|
73
76
|
priceRange {
|
|
74
77
|
minVariantPrice { amount currencyCode }
|
|
@@ -97,15 +100,18 @@
|
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
|
-
`,
|
|
101
|
-
query
|
|
103
|
+
`,zt=`#graphql
|
|
104
|
+
query ShopSettings {
|
|
102
105
|
shop {
|
|
103
|
-
metafield(namespace: "$app", key: "custom_css") {
|
|
106
|
+
customCss: metafield(namespace: "$app", key: "custom_css") {
|
|
107
|
+
value
|
|
108
|
+
}
|
|
109
|
+
outOfStockBehavior: metafield(namespace: "$app", key: "out_of_stock_behavior") {
|
|
104
110
|
value
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
|
-
`,
|
|
114
|
+
`,Qt=`#graphql
|
|
109
115
|
query BundlesForProduct($handle: String!) {
|
|
110
116
|
product(handle: $handle) {
|
|
111
117
|
id
|
|
@@ -125,6 +131,7 @@
|
|
|
125
131
|
id
|
|
126
132
|
title
|
|
127
133
|
handle
|
|
134
|
+
productType
|
|
128
135
|
featuredImage { url altText }
|
|
129
136
|
priceRange {
|
|
130
137
|
minVariantPrice { amount currencyCode }
|
|
@@ -153,6 +160,7 @@
|
|
|
153
160
|
id
|
|
154
161
|
title
|
|
155
162
|
handle
|
|
163
|
+
productType
|
|
156
164
|
featuredImage { url altText }
|
|
157
165
|
priceRange {
|
|
158
166
|
minVariantPrice { amount currencyCode }
|
|
@@ -183,6 +191,7 @@
|
|
|
183
191
|
id
|
|
184
192
|
title
|
|
185
193
|
handle
|
|
194
|
+
productType
|
|
186
195
|
featuredImage { url altText }
|
|
187
196
|
priceRange {
|
|
188
197
|
minVariantPrice { amount currencyCode }
|
|
@@ -215,49 +224,21 @@
|
|
|
215
224
|
}
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
|
-
`,
|
|
227
|
+
`,Wt=`#graphql
|
|
219
228
|
mutation CartCreate($input: CartInput!) {
|
|
220
229
|
cartCreate(input: $input) {
|
|
221
230
|
cart { id checkoutUrl }
|
|
222
231
|
userErrors { field message }
|
|
223
232
|
}
|
|
224
233
|
}
|
|
225
|
-
`,
|
|
234
|
+
`,jt=`#graphql
|
|
226
235
|
mutation CartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!) {
|
|
227
236
|
cartLinesAdd(cartId: $cartId, lines: $lines) {
|
|
228
237
|
cart { id checkoutUrl }
|
|
229
238
|
userErrors { field message }
|
|
230
239
|
}
|
|
231
240
|
}
|
|
232
|
-
`;var pt={min:1,max:99},ae=class extends Error{constructor(e,t){super(e),this.reason=t,this.name="BundleParseError"}},J={header:{textColor:"#555555",headerStyle:"solid",gradientStart:"#C1E67A",gradientEnd:"#B2D572",saveBadgeBgColor:"#C1E67A",saveBadgeTextColor:"#555555",saveBadgeBorderColor:"#555555",saveBadgeBorderWidth:2,saveBadgeBorderRadius:4,countdownBgColor:"#B2D57247",countdownTextColor:"#555555"},layout:{backgroundColor:"#FCFCFC",borderColor:"#E5E5E5",borderWidth:1,borderRadius:8},productList:{textColor:"#555555",imageBorderWidth:0,imageBorderColor:"#E5E5E5",imageBorderRadius:4,thumbnailRatio:"square",variantBorderWidth:1,variantBorderColor:"#E5E5E5",variantBorderRadius:4,showPrice:!0,showCompareAtPrice:!0,showCountBubble:!0,countBubbleBgColor:"#E9F1D9",countBubbleTextColor:"#555555"},pricing:{showSaveBadge:!0,showComparePrice:!0,showPerUnitPrice:!0,showItemCount:!0,showCompareAtPrice:!0},cta:{ctaText:"Add to cart",primaryColor:"#C1E67A",buttonTextColor:"#555555",borderWidth:0,borderColor:"#C1E67A",borderRadius:4},savingsBar:{visible:!0,bgColor:"#B2D57247",textColor:"#555555",borderWidth:0,borderColor:"#B2D57247",borderRadius:4},countdown:{showCountdown:!0},popularBadge:{visible:!0,text:"Most Popular",bgColor:"#1A1A1A",textColor:"#FFFFFF",borderWidth:0,borderColor:"#1A1A1A",borderRadius:12},outOfStockBehavior:"show_greyed_out",showLowStockBadge:!0,lowStockThreshold:10,lowStockBgColor:"#FEF3C7",lowStockTextColor:"#92400E",showSearch:!0,mixMatchShowQuantitySelector:!0,pickerBgColor:"#FCFCFC",pickerTextColor:"#555555",pickerBorderWidth:0,pickerBorderColor:"#E5E5E5",pickerBorderRadius:8,pickerSearchBorderWidth:1,pickerSearchBorderColor:"#E5E5E5",pickerSearchBorderRadius:8,pickerProductBorderWidth:0,pickerProductBorderColor:"#E5E5E5",pickerProductBorderRadius:8,pickerThumbnailRatio:"square",pickerShowCountBubble:!0,pickerCountBubbleBgColor:"#E9F1D9",pickerCountBubbleTextColor:"#555555",pickerAddBgColor:"#C1E67A",pickerAddLabelColor:"#555555",pickerAddBorderWidth:0,pickerAddBorderColor:"#C1E67A",pickerAddBorderRadius:4,pickerVariantBorderWidth:1,pickerVariantBorderColor:"#555555",pickerVariantBorderRadius:4,pickerQtyStepperBorderWidth:1,pickerQtyStepperBorderColor:"#555555",pickerQtyStepperBorderRadius:4,tierBorderColor:"#E5E5E5",tierBorderWidth:1,tierBorderRadius:12,tierSelectedBorderColor:"#1A1A1A",tierSelectedBorderWidth:2,defaultTier:"first"};function er(e){if(!e||typeof e!="object")return J;let t=e;return{...J,...t,defaultTier:tr(t.defaultTier),header:{...J.header,...t.header??{}},layout:{...J.layout,...t.layout??{}},productList:{...J.productList,...t.productList??{}},pricing:{...J.pricing,...t.pricing??{}},cta:{...J.cta,...t.cta??{}},savingsBar:{...J.savingsBar,...t.savingsBar??{}},countdown:{...J.countdown,...t.countdown??{}},popularBadge:{...J.popularBadge,...t.popularBadge??{}}}}function tr(e){return e==="first"||e==="best_value"||typeof e=="number"&&Number.isInteger(e)&&e>=0?e:J.defaultTier}function rr(e){return{primaryColor:e.cta.primaryColor,backgroundColor:e.layout.backgroundColor,textColor:e.productList.textColor,borderColor:e.layout.borderColor,borderWidth:e.layout.borderWidth,buttonTextColor:e.cta.buttonTextColor,ctaBorderWidth:e.cta.borderWidth,ctaBorderColor:e.cta.borderColor,ctaBorderRadius:e.cta.borderRadius,savingsBarBgColor:e.savingsBar.bgColor,savingsBarTextColor:e.savingsBar.textColor,savingsBarBorderWidth:e.savingsBar.borderWidth,savingsBarBorderColor:e.savingsBar.borderColor,savingsBarBorderRadius:e.savingsBar.borderRadius,borderRadius:e.layout.borderRadius,headerTextColor:e.header.textColor,saveBadgeBgColor:e.header.saveBadgeBgColor,saveBadgeTextColor:e.header.saveBadgeTextColor,saveBadgeBorderColor:e.header.saveBadgeBorderColor,saveBadgeBorderWidth:e.header.saveBadgeBorderWidth,saveBadgeBorderRadius:e.header.saveBadgeBorderRadius,countdownBgColor:e.header.countdownBgColor,countdownTextColor:e.header.countdownTextColor,headerStyle:e.header.headerStyle,headerGradientStart:e.header.gradientStart,headerGradientEnd:e.header.gradientEnd,showSaveBadge:e.pricing.showSaveBadge,imageBorderWidth:e.productList.imageBorderWidth,imageBorderColor:e.productList.imageBorderColor,imageBorderRadius:e.productList.imageBorderRadius,thumbnailRatio:e.productList.thumbnailRatio,variantBorderWidth:e.productList.variantBorderWidth,variantBorderColor:e.productList.variantBorderColor,variantBorderRadius:e.productList.variantBorderRadius,countBubbleBgColor:e.productList.countBubbleBgColor,countBubbleTextColor:e.productList.countBubbleTextColor,showProductPrice:e.productList.showPrice,showProductCompareAtPrice:e.productList.showCompareAtPrice,showCountBubble:e.productList.showCountBubble,showCountdown:e.countdown.showCountdown,ctaText:e.cta.ctaText,outOfStockBehavior:e.outOfStockBehavior,showLowStockBadge:e.showLowStockBadge,lowStockThreshold:e.lowStockThreshold,lowStockBgColor:e.lowStockBgColor,lowStockTextColor:e.lowStockTextColor,showComparePrice:e.pricing.showComparePrice,showPerUnitPrice:e.pricing.showPerUnitPrice,showItemCount:e.pricing.showItemCount,showCompareAtPrice:e.pricing.showCompareAtPrice,showMostPopular:e.popularBadge.visible,popularBadgeText:e.popularBadge.text,popularBadgeBgColor:e.popularBadge.bgColor,popularBadgeTextColor:e.popularBadge.textColor,popularBadgeBorderWidth:e.popularBadge.borderWidth,popularBadgeBorderColor:e.popularBadge.borderColor,popularBadgeBorderRadius:e.popularBadge.borderRadius,showSearch:e.showSearch,pickerBgColor:e.pickerBgColor,pickerTextColor:e.pickerTextColor,pickerBorderWidth:e.pickerBorderWidth,pickerBorderColor:e.pickerBorderColor,pickerBorderRadius:e.pickerBorderRadius,pickerSearchBorderWidth:e.pickerSearchBorderWidth,pickerSearchBorderColor:e.pickerSearchBorderColor,pickerSearchBorderRadius:e.pickerSearchBorderRadius,pickerProductBorderWidth:e.pickerProductBorderWidth,pickerProductBorderColor:e.pickerProductBorderColor,pickerProductBorderRadius:e.pickerProductBorderRadius,pickerThumbnailRatio:e.pickerThumbnailRatio,pickerShowCountBubble:e.pickerShowCountBubble,pickerCountBubbleBgColor:e.pickerCountBubbleBgColor,pickerCountBubbleTextColor:e.pickerCountBubbleTextColor,pickerAddBgColor:e.pickerAddBgColor,pickerAddLabelColor:e.pickerAddLabelColor,pickerAddBorderWidth:e.pickerAddBorderWidth,pickerAddBorderColor:e.pickerAddBorderColor,pickerAddBorderRadius:e.pickerAddBorderRadius,pickerVariantBorderWidth:e.pickerVariantBorderWidth,pickerVariantBorderColor:e.pickerVariantBorderColor,pickerVariantBorderRadius:e.pickerVariantBorderRadius,pickerQtyStepperBorderWidth:e.pickerQtyStepperBorderWidth,pickerQtyStepperBorderColor:e.pickerQtyStepperBorderColor,pickerQtyStepperBorderRadius:e.pickerQtyStepperBorderRadius,tierBorderColor:e.tierBorderColor,tierBorderWidth:e.tierBorderWidth,tierBorderRadius:e.tierBorderRadius,tierSelectedBorderColor:e.tierSelectedBorderColor,tierSelectedBorderWidth:e.tierSelectedBorderWidth,defaultTier:e.defaultTier,...e.popularBadge.tierIndex!==void 0&&{mostPopularTierIndex:e.popularBadge.tierIndex}}}var nr={primaryColor:"--lb-primary-color",backgroundColor:"--lb-bg",textColor:"--lb-text",imageBorderWidth:"--lb-image-border-width",imageBorderColor:"--lb-image-border-color",imageBorderRadius:"--lb-image-border-radius",variantBorderWidth:"--lb-variant-border-width",variantBorderColor:"--lb-variant-border-color",variantBorderRadius:"--lb-variant-radius",countBubbleBgColor:"--lb-qty-badge-bg",countBubbleTextColor:"--lb-qty-badge-color",borderColor:"--lb-border",borderWidth:"--lb-border-width",buttonTextColor:"--lb-btn-text",borderRadius:"--lb-radius",headerTextColor:"--lb-header-text",saveBadgeBgColor:"--lb-save-badge-bg",saveBadgeTextColor:"--lb-save-badge-text",saveBadgeBorderColor:"--lb-save-badge-border-color",saveBadgeBorderWidth:"--lb-save-badge-border-width",saveBadgeBorderRadius:"--lb-save-badge-radius",countdownBgColor:"--lb-countdown-bg",countdownTextColor:"--lb-countdown-text",ctaBorderWidth:"--lb-cta-border-width",ctaBorderColor:"--lb-cta-border-color",ctaBorderRadius:"--lb-cta-radius",savingsBarBgColor:"--lb-savings-bar-bg",savingsBarTextColor:"--lb-savings-bar-text",savingsBarBorderWidth:"--lb-savings-bar-border-width",savingsBarBorderColor:"--lb-savings-bar-border-color",savingsBarBorderRadius:"--lb-savings-bar-radius",tierBorderColor:"--lb-tier-border-color",tierBorderWidth:"--lb-tier-border-width",tierBorderRadius:"--lb-tier-radius",tierSelectedBorderColor:"--lb-tier-selected-border-color",tierSelectedBorderWidth:"--lb-tier-selected-border-width",popularBadgeBgColor:"--lb-popular-badge-bg",popularBadgeTextColor:"--lb-popular-badge-text",popularBadgeBorderWidth:"--lb-popular-badge-border-width",popularBadgeBorderColor:"--lb-popular-badge-border-color",popularBadgeBorderRadius:"--lb-popular-badge-radius",headerGradientStart:"--lb-header-start",headerGradientEnd:"--lb-header-end",pickerBgColor:"--lb-picker-bg",pickerTextColor:"--lb-picker-text",pickerBorderWidth:"--lb-picker-border-width",pickerBorderColor:"--lb-picker-border-color",pickerBorderRadius:"--lb-picker-radius",pickerSearchBorderWidth:"--lb-picker-search-border-width",pickerSearchBorderColor:"--lb-picker-search-border-color",pickerSearchBorderRadius:"--lb-picker-search-radius",pickerProductBorderWidth:"--lb-picker-product-border-width",pickerProductBorderColor:"--lb-picker-product-border-color",pickerProductBorderRadius:"--lb-picker-product-radius",pickerCountBubbleBgColor:"--lb-picker-qty-badge-bg",pickerCountBubbleTextColor:"--lb-picker-qty-badge-color",pickerAddBgColor:"--lb-picker-add-bg",pickerAddLabelColor:"--lb-picker-add-label",pickerAddBorderWidth:"--lb-picker-add-border-width",pickerAddBorderColor:"--lb-picker-add-border-color",pickerAddBorderRadius:"--lb-picker-add-radius",pickerVariantBorderWidth:"--lb-picker-variant-border-width",pickerVariantBorderColor:"--lb-picker-variant-border-color",pickerVariantBorderRadius:"--lb-picker-variant-radius",pickerQtyStepperBorderWidth:"--lb-picker-qty-stepper-border-width",pickerQtyStepperBorderColor:"--lb-picker-qty-stepper-border-color",pickerQtyStepperBorderRadius:"--lb-picker-qty-stepper-radius"},or=new Set(["borderRadius","borderWidth","saveBadgeBorderWidth","saveBadgeBorderRadius","tierBorderWidth","tierBorderRadius","tierSelectedBorderWidth","savingsBarBorderWidth","savingsBarBorderRadius","ctaBorderWidth","ctaBorderRadius","popularBadgeBorderWidth","popularBadgeBorderRadius","imageBorderWidth","imageBorderRadius","variantBorderWidth","variantBorderRadius","pickerBorderWidth","pickerBorderRadius","pickerSearchBorderWidth","pickerSearchBorderRadius","pickerProductBorderWidth","pickerProductBorderRadius","pickerAddBorderWidth","pickerAddBorderRadius","pickerVariantBorderWidth","pickerVariantBorderRadius","pickerQtyStepperBorderWidth","pickerQtyStepperBorderRadius"]);function bt(e,t){let r=rr(t);for(let[i,a]of Object.entries(nr)){let l=r[i];if(l==null)continue;let d=or.has(i)?`${l}px`:String(l);e.style.setProperty(a,d)}e.style.setProperty("--lb-product-price-display",t.productList.showPrice?"block":"none"),e.style.setProperty("--lb-product-compare-display",t.productList.showCompareAtPrice?"inline":"none"),e.style.setProperty("--lb-qty-badge-display",t.productList.showCountBubble?"flex":"none"),e.style.setProperty("--lb-picker-qty-badge-display",t.pickerShowCountBubble?"flex":"none"),e.style.setProperty("--lb-variant-chevron",Ye(t.productList.variantBorderColor)),e.style.setProperty("--lb-picker-variant-chevron",Ye(t.pickerVariantBorderColor)),t.header.headerStyle==="solid"?e.style.setProperty("--lb-header-bg",t.header.gradientStart):e.style.setProperty("--lb-header-bg",`linear-gradient(135deg, ${t.header.gradientStart}, ${t.header.gradientEnd})`);let o=Xe(t.productList.thumbnailRatio);e.style.setProperty("--lb-thumbnail-aspect-ratio",o.aspectRatio),e.style.setProperty("--lb-thumbnail-img-fit",o.imgFit),e.style.setProperty("--lb-thumbnail-img-height",o.imgHeight);let n=Xe(t.pickerThumbnailRatio);e.style.setProperty("--lb-picker-thumbnail-aspect-ratio",n.aspectRatio),e.style.setProperty("--lb-picker-thumbnail-img-fit",n.imgFit),e.style.setProperty("--lb-picker-thumbnail-img-height",n.imgHeight)}function Ye(e){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='${e.replace(/#/g,"%23")}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`}function Xe(e){switch(e){case"tall":return{aspectRatio:"3 / 4",imgFit:"cover",imgHeight:"100%"};case"wide":return{aspectRatio:"4 / 3",imgFit:"cover",imgHeight:"100%"};case"original":return{aspectRatio:"auto",imgFit:"contain",imgHeight:"auto"};default:return{aspectRatio:"1 / 1",imgFit:"cover",imgHeight:"100%"}}}var ir=new Set(["fixed","mix_match","volume"]),ar=new Set(["active"]);function qe(e,t){try{return lr(e,t)}catch(r){if(r instanceof ae)return null;throw r}}function lr(e,t){let r=new Map(t.map(k=>[k.key,k])),o=r.get("title")?.value??"Bundle",n=r.get("bundle_type")?.value,i=r.get("status")?.value;if(!n||!ir.has(n))throw new ae(`Invalid or missing bundle_type: ${n??"null"}`,"invalid_type");let a=n;if(!i||!ar.has(i))throw new ae(`Bundle is not active: status=${i??"null"}`,"inactive");let l=i,d=r.get("starts_at")?.value??null,s=r.get("ends_at")?.value??null,p=new Date;if(d){let k=new Date(d);if(Number.isNaN(k.getTime()))throw new ae(`Invalid starts_at: ${d}`,"invalid_type");if(k>p)throw new ae(`Bundle not yet started: starts_at=${d}`,"not_started")}if(s){let k=new Date(s);if(Number.isNaN(k.getTime()))throw new ae(`Invalid ends_at: ${s}`,"invalid_type");if(k<p)throw new ae(`Bundle has expired: ends_at=${s}`,"expired")}let u=dr(r),C=sr(r),m=cr(r),g={id:e,title:o,description:r.get("description")?.value||null,status:l,products:u,discountConfig:C,widgetConfig:m,startsAt:d,endsAt:s,discountLabel:r.get("discount_label")?.value??null,selectedVariantIds:ur(r),productQuantities:Je(r,"product_quantities"),variantQuantities:Je(r,"variant_quantities"),linkGroup:mr(r),marketVisibility:br(r),marketIds:hr(r)};switch(a){case"fixed":return{...g,bundleType:"fixed"};case"volume":return{...g,bundleType:"volume",volumeTiers:gr(r)};case"mix_match":return{...g,bundleType:"mix_match",minQuantity:vr(r,"min_quantity",{min:1}),maxQuantity:null,productRules:pr(r)}}}function dr(e){let t=[],r=e.get("products");if(r?.reference&&"variants"in r.reference&&t.push(r.reference),r?.references?.nodes)for(let n of r.references.nodes)"variants"in n?t.push(n):"products"in n&&n.products?.nodes&&t.push(...n.products.nodes);let o=e.get("collection");if(o?.references?.nodes)for(let n of o.references.nodes)"products"in n&&n.products?.nodes&&t.push(...n.products.nodes);return t}function sr(e){return{discountType:e.get("discount_type")?.value??"percentage",discountValue:parseFloat(e.get("discount_value")?.value??"0"),allowStacking:e.get("allow_stacking")?.value==="true"}}function cr(e){return er(ce(e,"widget_config"))}function ur(e){let t=ce(e,"selected_variant_ids");if(!Array.isArray(t))return null;let r=[];for(let o of t)Array.isArray(o)?r.push(o.filter(n=>typeof n=="string")):r.push([]);return r}function Je(e,t){let r=ce(e,t);if(!r||typeof r!="object"||Array.isArray(r))return{};let o={};for(let[n,i]of Object.entries(r)){let a=typeof i=="number"?i:Number(i);Number.isFinite(a)&&a>=0&&a<=99&&(o[n]=Math.floor(a))}return o}function pr(e){let t=ce(e,"product_rules");if(!t||typeof t!="object"||Array.isArray(t))return{};let r={};for(let[o,n]of Object.entries(t)){if(!n||typeof n!="object"||Array.isArray(n))continue;let{min:i,max:a}=n,l=typeof i=="number"?i:Number(i),d=typeof a=="number"?a:Number(a);if(!Number.isFinite(l)||!Number.isFinite(d))continue;let s=Math.max(1,Math.min(99,Math.floor(l))),p=Math.max(s,Math.min(99,Math.floor(d)));r[o]={min:s,max:p}}return r}function br(e){return e.get("market_visibility")?.value==="specific"?"specific":"all"}function hr(e){let t=e.get("markets")?.value;if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.filter(o=>typeof o=="string"):[]}catch{return[]}}function mr(e){let t=e.get("link_group_id")?.value;if(!t)return null;let r=e.get("link_group_is_primary")?.value==="true",o=null;if(r){let n=ce(e,"link_group_variants");Array.isArray(n)&&(o=n.filter(i=>typeof i=="object"&&i!==null).map(i=>{let a=typeof i.metaobjectId=="string"?i.metaobjectId:null,l=typeof i.weight=="number"&&Number.isFinite(i.weight)?Math.max(0,Math.min(100,Math.floor(i.weight))):null;return a===null||l===null?null:{metaobjectId:a,weight:l}}).filter(i=>i!==null))}return{id:t,isPrimary:r,variants:o}}function gr(e){let t=ce(e,"volume_tiers");return Array.isArray(t)?t.filter(r=>typeof r=="object"&&r!==null).map(fr):[]}function fr(e){let t=Number(e.minQuantity??0),r={minQuantity:Number.isFinite(t)&&t>=0?t:0};return typeof e.percentage=="number"&&Number.isFinite(e.percentage)&&(r.percentage=e.percentage),typeof e.amount=="number"&&Number.isFinite(e.amount)&&(r.amount=e.amount),r}function ce(e,t){let r=e.get(t)?.value;if(!r)return null;try{return JSON.parse(r)}catch{return null}}function vr(e,t,r={}){let o=e.get(t)?.value;if(!o)return null;let n=parseInt(o,10);return isNaN(n)||r.min!==void 0&&n<r.min?null:n}function we(e,t,r){let o=e.variantQuantities[r];return o!==void 0?o:e.productQuantities[t]??1}async function ht(e,t){await ft(e,{shopDomain:e.shopDomain,eventType:"bundle_impression",bundleGid:t.bundleGid,bundleType:t.bundleType,productId:t.productId,linkGroupId:t.linkGroupId,occurredAt:new Date().toISOString()})}async function mt(e,t){await ft(e,{shopDomain:e.shopDomain,eventType:"bundle_add_to_cart",...t,occurredAt:new Date().toISOString()})}function gt(e,t){if(typeof IntersectionObserver>"u")return t(),()=>{};let r=new IntersectionObserver(o=>{for(let n of o)n.isIntersecting&&(t(),r.unobserve(n.target))},{threshold:.5});return r.observe(e),()=>r.disconnect()}async function ft(e,t){let r=`${e.appUrl}/api/analytics`,o=JSON.stringify(t);try{(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||(await new Promise(i=>setTimeout(i,2e3)),await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:o}))}catch{try{typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(r,o)}catch{}}}var xr=!1;function yr(){return typeof document<"u"}function wr(){if(!yr())return!1;if(xr)return!0;if(typeof window>"u")return!1;let e=window.Shopify;try{return e?.customerPrivacy?.analyticsProcessingAllowed?.()===!0}catch{return!1}}var Ze="lb_session",Cr=720*60*60,kr=720*60*60;function vt(e){return`__Host-_lb_ab_${e}`}async function xt(e,t,r={}){if(typeof document>"u"||t.length===0)return null;let o=new Set(t.map(l=>l.metaobjectId));if(r.forceLiveMetaobjectId&&o.has(r.forceLiveMetaobjectId))return{variantMetaobjectId:r.forceLiveMetaobjectId,persisted:!1,forcedLive:!0};let n=_r(e);if(n&&o.has(n))return{variantMetaobjectId:n,persisted:!0,forcedLive:!1};if(!wr())return null;let i=Sr(),a=Er(i,e,t);return a?(Br(e,a),{variantMetaobjectId:a,persisted:!0,forcedLive:!1}):null}function _r(e){if(typeof document>"u")return null;let r=`${vt(e)}=`,n=document.cookie.split(";").map(l=>l.trim()).find(l=>l.startsWith(r));if(!n)return null;let i=n.substring(r.length),a;try{a=decodeURIComponent(i)}catch{return null}return a.startsWith("gid://shopify/Metaobject/")?a:null}function Br(e,t){if(typeof document>"u")return;let r=vt(e),o=encodeURIComponent(t);document.cookie=`${r}=${o}; Path=/; Max-Age=${kr}; SameSite=Lax; Secure`}function Sr(){if(typeof document>"u")return et();let t=document.cookie.split(";").map(o=>o.trim()).find(o=>o.startsWith(`${Ze}=`))?.split("=")[1];if(t)return t;let r=et();return document.cookie=`${Ze}=${r}; path=/; max-age=${Cr}; SameSite=Lax; Secure`,r}function et(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Er(e,t,r){if(r.length===0)return null;let o=Tr(`${e}:${t}`)%1e4,n=0;for(let i of r)if(!(typeof i?.metaobjectId!="string"||typeof i?.weight!="number")&&(n+=Math.max(0,i.weight)*100,o<n))return i.metaobjectId;return r[r.length-1].metaobjectId}function Tr(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return t>>>0}var tt=1e4,Ar=[[/@import/i,"@import rules"],[/@charset/i,"@charset declarations"],[/expression\s*\(/i,"CSS expressions"],[/-moz-binding/i,"-moz-binding"],[/-webkit-binding/i,"-webkit-binding"],[/behavior\s*:/i,"behavior property"]],Lr=/^(https:|\/[^/]|\.\/|\.\.\/|#)/;function Ve(e){if(e.length>tt)return{ok:!1,error:`CSS exceeds ${tt.toLocaleString("en-US")} character limit`};let t=e.replace(/\/\*[\s\S]*?\*\//g,"");try{t=t.replace(/\\([0-9a-fA-F]{1,6})[ \t\n\f]?/g,(n,i)=>{let a=parseInt(i,16);return a<0||a>1114111?"\uFFFD":String.fromCodePoint(a)}),t=t.replace(/\\\r?\n/g,""),t=t.replace(/\\([^\n\r\f0-9a-fA-F])/g,"$1")}catch{return{ok:!1,error:"CSS contains invalid unicode escape sequences"}}t=t.replace(/</g,"").replace(/>/g,"");for(let[n,i]of Ar)if(n.test(t))return{ok:!1,error:`CSS contains blocked pattern: ${i}`};let r=/url\s*\(\s*([\s\S]*?)\s*\)/gi,o;for(;(o=r.exec(t))!==null;){let n=o[1].trim();if((n.startsWith("'")||n.startsWith('"'))&&(n=n.slice(1)),(n.endsWith("'")||n.endsWith('"'))&&(n=n.slice(0,-1)),n=n.trim(),n&&!Lr.test(n))return{ok:!1,error:"CSS url() values must use https:// or relative paths"}}return{ok:!0,css:t}}var Pr="lb-custom-css-";function yt(e,t){if(typeof document>"u"||!t)return!1;let r=Ve(t);if(!r.ok||!r.css.trim())return!1;let o=Pr+Mr(e),n=document.getElementById(o);return n||(n=document.createElement("style"),n.id=o,n.setAttribute("data-lime-bundles","custom-css"),document.head.appendChild(n)),n.textContent!==r.css&&(n.textContent=r.css),!0}function Mr(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function Ir(e,t){let r=typeof e=="string"?parseFloat(e):e;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(r)}catch{return`${t} ${r.toFixed(2)}`}}var Rr={CL:"cl",CM:"cm",FLOZ:"fl oz",FT:"ft",FT2:"ft\xB2",G:"g",GAL:"gal",IN:"in",ITEM:"each",KG:"kg",L:"l",LB:"lb",M:"m",M2:"m\xB2",M3:"m\xB3",MG:"mg",ML:"ml",MM:"mm",OZ:"oz",PT:"pt",QT:"qt",UNKNOWN:"",YD:"yd"};function le(e,t,r){if(!e||!t||t.referenceUnit==="UNKNOWN")return null;let o=parseFloat(e.amount);if(!Number.isFinite(o))return null;let n=Rr[t.referenceUnit]??"";if(!n)return null;let i=e.currencyCode||r||"USD",a=Ir(o,i),l=t.referenceValue,d=l===1?n:`${l}${n}`;return`${a}/${d}`}function j(e){if(e==null)return 0;let t=typeof e=="string"?parseFloat(e):e;return Number.isFinite(t)?Math.round(t*100):0}function D(e,t){try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e/100)}catch{return`${t} ${(e/100).toFixed(2)}`}}function wt(e,t){return Math.max(0,e-Math.floor(e*t/100))}function Oe(e,t=e.productQuantities,r=e.widgetConfig.pricing.showSaveBadge){let{discountType:o,discountValue:n}=e.discountConfig,i=[],a=0,l=0;for(let u of e.products){let C=u.variants.nodes.find(x=>x.availableForSale)??u.variants.nodes[0];if(!C)continue;let m=j(C.price.amount),g=t[u.id]??1,k=m*g,A=C.compareAtPrice?j(C.compareAtPrice.amount):null;if(i.push({unitCents:m,qty:g,lineCents:k,compareCents:A}),a+=k,o==="percentage"){let x=wt(m,n);l+=x*g}else l+=k}o==="fixed_amount"&&(l=Math.max(0,a-Math.round(n*100)));let d=Math.max(0,a-l),s=e.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",p="";return r&&d>0&&(o==="percentage"&&n>0?p=`-${Math.round(n)}%`:o==="fixed_amount"&&n>0&&(p=`-${D(Math.round(n*100),s)}`)),{rows:i,totalCents:a,saleCents:l,savingsCents:d,headerBadge:p,currency:s}}function Ce(e,t){if(t.discountType==="percentage"){let r=Math.floor(e*t.discountValue/100);return Math.max(0,e-r)}return Math.max(0,e-Math.round(t.discountValue*100))}var U=152;function re(e,t={}){if(!e)return"";try{let r=new URL(e);return t.width!==void 0&&r.searchParams.set("width",String(t.width)),t.height!==void 0&&r.searchParams.set("height",String(t.height)),t.crop&&r.searchParams.set("crop",t.crop),r.toString()}catch{return e}}function Ct(e){if(!Number.isFinite(e)||e<=0)return"";let t=Math.floor(e/1e3),r=Math.floor(t/86400),o=Math.floor(t%86400/3600),n=Math.floor(t%3600/60),i=t%60,a=l=>String(l).padStart(2,"0");return r>0?`${r}d ${a(o)}h ${a(n)}m ${a(i)}s`:`${a(o)}h ${a(n)}m ${a(i)}s`}var Fe={};ot(Fe,{computePosition:()=>qr,emptyTypeAheadState:()=>Hr,handleKey:()=>Fr,pushTypeAheadChar:()=>Ur});var Dr=4;function qr({trigger:e,viewportHeight:t,desiredHeight:r,margin:o=Dr,clip:n}){let i=n?Math.min(t,n.bottom):t,a=n?Math.max(0,n.top):0,l=Math.max(0,i-e.bottom-o),d=Math.max(0,e.top-a-o),s=r<=l?"down":d>l?"up":"down",u=Math.min(r,s==="down"?l:d),C=s==="down"?e.bottom+o:e.top-o-u;return{placement:s,maxHeight:u,offsetTop:C,offsetLeft:e.left,width:e.width}}var Ie={type:"passthrough",preventDefault:!1};function Re(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function rt(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}function Vr(e,t){if(e.length===0)return-1;for(let r=1;r<=e.length;r++){let o=(t+r)%e.length;if(!e[o].disabled)return o}return t}function Or(e,t){if(e.length===0)return-1;for(let r=1;r<=e.length;r++){let o=(t-r+e.length)%e.length;if(!e[o].disabled)return o}return t}function nt(e){return e.length===1&&e!==" "&&/\S/.test(e)}function Fr(e,t){if(e.ctrlKey||e.metaKey||e.altKey)return Ie;let{key:r}=e,{isOpen:o,activeIndex:n,selectedIndex:i,options:a}=t;if(!o)switch(r){case"Enter":case" ":case"ArrowDown":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Re(a),preventDefault:!0};case"ArrowUp":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:rt(a),preventDefault:!0};default:return nt(r)?{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Re(a),preventDefault:!0}:Ie}switch(r){case"ArrowDown":return{type:"move-active",activeIndex:Vr(a,n),preventDefault:!0};case"ArrowUp":return{type:"move-active",activeIndex:Or(a,n),preventDefault:!0};case"Home":return{type:"move-active",activeIndex:Re(a),preventDefault:!0};case"End":return{type:"move-active",activeIndex:rt(a),preventDefault:!0};case"Enter":case" ":return n>=0&&!a[n]?.disabled?{type:"commit",index:n,preventDefault:!0}:{type:"passthrough",preventDefault:!0};case"Escape":return{type:"close",commit:!1,restoreFocus:!0,preventDefault:!0};case"Tab":return{type:"close",commit:!1,restoreFocus:!1,preventDefault:!1};default:return nt(r)?{type:"type-ahead",char:r,preventDefault:!1}:Ie}}var Nr=500;function Hr(){return{buffer:"",lastTime:0}}function Ur(e,t,r,o,n=Nr){if(t.length!==1)return{newState:e,matchedIndex:null};let a=(r-e.lastTime>n?"":e.buffer)+t.toLowerCase(),l={buffer:a,lastTime:r};for(let d=0;d<o.length;d++){let s=o[d];if(!s.disabled&&s.label.toLowerCase().startsWith(a))return{newState:l,matchedIndex:d}}return{newState:l,matchedIndex:null}}var $r={};ot($r,{findVariantByOptions:()=>Wr,isOptionValueAvailable:()=>zr,toPickerVariant:()=>jr});function Wr(e,t){if(e.length===0)return null;for(let r of e){if(r.optionValues.length!==t.length)continue;let o=!0;for(let n=0;n<r.optionValues.length;n++)if(r.optionValues[n]!==t[n]){o=!1;break}if(o)return r}return null}function zr(e,t,r,o){for(let n of e){if(!n.available||n.optionValues[t]!==r)continue;let i=!0;for(let a=0;a<n.optionValues.length;a++)if(a!==t&&n.optionValues[a]!==o[a]){i=!1;break}if(i)return!0}return!1}function jr(e){return{id:e.id,optionValues:e.selectedOptions.map(t=>t.value),available:e.availableForSale}}function Z(e,t){return e.availableForSale?e.currentlyNotInStock||e.quantityAvailable==null?!0:e.quantityAvailable>=t:!1}function ue(e,t,r,o){return!o||e.quantityAvailable==null||e.quantityAvailable<t?!1:e.quantityAvailable<=r}function Ne(e,t,r){if(!e.availableForSale)return 0;if(e.currentlyNotInStock)return Math.max(0,t-r);let o=e.quantityAvailable==null?Number.POSITIVE_INFINITY:e.quantityAvailable;return Math.max(0,Math.min(t,o)-r)}var{computePosition:Qr,emptyTypeAheadState:Gr,handleKey:Kr,pushTypeAheadChar:Yr}=Fe,Xr=32,Jr=8,Zr=8,G=[];function _e(e){let t=e.composedPath();for(let r=G.length-1;r>=0;r--){let o=G[r];!t.includes(o.shell)&&!t.includes(o.listbox)&&o.close()}}function kt(){for(let e=G.length-1;e>=0;e--)G[e].close()}var Be=!1;function en(){Be||(document.addEventListener("pointerdown",_e,!0),window.addEventListener("scroll",_e,!0),window.addEventListener("resize",kt),Be=!0)}function tn(){!Be||G.length>0||(document.removeEventListener("pointerdown",_e,!0),window.removeEventListener("scroll",_e,!0),window.removeEventListener("resize",kt),Be=!1)}function ke(e){let t=[];for(let r=0;r<e.options.length;r++){let o=e.options[r];t.push({disabled:o.disabled,label:o.textContent||o.value})}return t}function rn(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function nn(e){let t=e.ownerDocument?.defaultView;if(!t)return null;let r=e.parentElement;for(;r&&r!==e.ownerDocument.body;){let n=t.getComputedStyle(r).overflowY;if(n==="auto"||n==="scroll"||n==="hidden")return r;r=r.parentElement}return null}var on=["lb-bundle-variant-select","lb-mix-match__variant-select"],an=on.map(e=>`select.${e}:not(.lb-dropdown-state)`).join(", ");function ln(e){let t=e;if(e.classList.contains("lb-dropdown-state"))return t.__lbDropdownInstance??null;let r=e.ownerDocument,o=e.getRootNode(),n=e.getAttribute("aria-label")??"",i=`lb-dd-${Math.random().toString(36).slice(2,9)}`;e.classList.add("lb-dropdown-state"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");let a=r.createElement("div");a.className="lb-dropdown",a.setAttribute("data-lb-dropdown","");let l=r.createElement("button");l.type="button",l.className="lb-dropdown-trigger",l.setAttribute("role","combobox"),l.setAttribute("aria-haspopup","listbox"),l.setAttribute("aria-expanded","false");let d=`${i}-listbox`;l.setAttribute("aria-controls",d),n&&l.setAttribute("aria-label",n);let s=r.createElement("span");s.className="lb-dropdown-trigger-value";let p=r.createElement("span");p.className="lb-dropdown-chevron",p.setAttribute("aria-hidden","true"),l.appendChild(s),l.appendChild(p);let u=r.createElement("ul");u.id=d,u.className="lb-dropdown-listbox",u.setAttribute("role","listbox"),n&&u.setAttribute("aria-label",n),u.hidden=!0,a.appendChild(l),e.parentNode?.insertBefore(a,e.nextSibling);let C=e.closest("[data-modal-overlay]");C?(C.appendChild(u),u.setAttribute("data-lb-dropdown-portal","")):a.appendChild(u);let m=!1,g=-1,k=Gr(),A=[],x;function E(){l.disabled=e.disabled;let v=ke(e),b=e.selectedIndex;for(s.textContent=b>=0&&v[b]?v[b].label:"";u.firstChild;)u.removeChild(u.firstChild);A=[];for(let w=0;w<v.length;w++){let R=r.createElement("li");R.id=`${i}-opt-${w}`,R.className="lb-dropdown-option",R.setAttribute("role","option"),R.setAttribute("aria-selected",w===b?"true":"false"),v[w].disabled&&R.setAttribute("aria-disabled","true"),R.setAttribute("data-value",e.options[w].value),R.setAttribute("data-index",String(w)),R.textContent=v[w].label,u.appendChild(R),A.push(R)}}function _(v){if(g>=0&&A[g]&&A[g].classList.remove("is-active"),g=v,v>=0&&A[v]){let b=A[v];b.classList.add("is-active"),l.setAttribute("aria-activedescendant",b.id);let w=b.offsetTop,R=w+b.offsetHeight,ne=u.scrollTop,Y=ne+u.clientHeight;w<ne?u.scrollTop=w:R>Y&&(u.scrollTop=R-u.clientHeight)}else l.setAttribute("aria-activedescendant","")}function O(){let v=l.getBoundingClientRect();if(v.width===0)return!1;let w=Math.min(A.length||1,Zr)*Xr+Jr,R=nn(l),ne=R?(()=>{let ee=R.getBoundingClientRect();return{top:ee.top,bottom:ee.bottom}})():void 0,Y=Qr({trigger:{top:v.top,bottom:v.bottom,left:v.left,width:v.width},viewportHeight:window.innerHeight,desiredHeight:w,clip:ne});return u.setAttribute("data-placement",Y.placement),u.style.maxHeight=`${Y.maxHeight}px`,u.hasAttribute("data-lb-dropdown-portal")&&(u.style.top=`${Y.offsetTop}px`,u.style.left=`${Y.offsetLeft}px`,u.style.width=`${Y.width}px`),!0}function h(){if(m)return;for(let w=G.length-1;w>=0;w--)G[w]!==x&&G[w].close();m=!0,u.hidden=!1,l.setAttribute("aria-expanded","true"),O()||requestAnimationFrame(()=>O());let v=ke(e),b=e.selectedIndex;b>=0&&v[b]&&!v[b].disabled?_(b):_(rn(v)),G.push(x),G.length===1&&en()}function M(v){if(!m)return;m=!1,u.hidden=!0,l.setAttribute("aria-expanded","false"),l.setAttribute("aria-activedescendant",""),g>=0&&A[g]&&A[g].classList.remove("is-active"),g=-1;let b=G.indexOf(x);b>=0&&G.splice(b,1),G.length===0&&tn(),v&&l.focus()}function L(v){let b=e.options[v];if(!(!b||b.disabled)){if(e.value!==b.value){e.value=b.value;let w=new Event("change",{bubbles:!0});e.dispatchEvent(w)}E(),M(!0)}}function y(v){switch(v.type){case"open":h(),v.activeIndex>=0&&_(v.activeIndex);return;case"close":M(v.restoreFocus);return;case"move-active":_(v.activeIndex);return;case"commit":L(v.index);return;case"type-ahead":{let b=ke(e),w=Yr(k,v.char,Date.now(),b);k=w.newState,w.matchedIndex!==null&&(m||h(),_(w.matchedIndex));return}case"passthrough":return;default:{let b=v}}}function B(v){let b=ke(e),w=Kr({key:v.key,ctrlKey:v.ctrlKey,metaKey:v.metaKey,altKey:v.altKey,shiftKey:v.shiftKey},{isOpen:m,activeIndex:g,selectedIndex:e.selectedIndex,options:b});w.preventDefault&&v.preventDefault(),y(w)}function f(v){v.preventDefault(),m?M(!1):h()}function q(v){let b=v.target;for(;b&&b!==u;){if(b.classList?.contains("lb-dropdown-option")){let w=parseInt(b.getAttribute("data-index")??"",10);if(!Number.isNaN(w)){L(w);return}}b=b.parentElement}}function P(v){let b=v.target;for(;b&&b!==u;){if(b.classList?.contains("lb-dropdown-option")){if(b.getAttribute("aria-disabled")==="true")return;let w=parseInt(b.getAttribute("data-index")??"",10);!Number.isNaN(w)&&w!==g&&_(w);return}b=b.parentElement}}function T(){setTimeout(()=>{if(!m)return;let v=o.activeElement??r.activeElement;a.contains(v)||M(!1)},0)}function S(){E()}let I=new MutationObserver(()=>{E()});I.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","value","selected"]});let F=v=>v.preventDefault();l.addEventListener("click",f),l.addEventListener("keydown",B),a.addEventListener("focusout",T),u.addEventListener("mousedown",F),u.addEventListener("click",q),u.addEventListener("mousemove",P),e.addEventListener("change",S);function te(){m&&M(!1),I.disconnect(),l.removeEventListener("click",f),l.removeEventListener("keydown",B),a.removeEventListener("focusout",T),u.removeEventListener("mousedown",F),u.removeEventListener("click",q),u.removeEventListener("mousemove",P),e.removeEventListener("change",S),a.parentNode&&a.parentNode.removeChild(a),u.parentNode&&u.parentNode.removeChild(u),e.classList.remove("lb-dropdown-state"),e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),delete t.__lbDropdownInstance}return x={shell:a,listbox:u,select:e,close:()=>M(!1),destroy:te},t.__lbDropdownInstance=x,E(),x}function Se(e){let t=e.querySelectorAll(an),r=[];return t.forEach(o=>{let n=ln(o);n&&r.push(n)}),r}function Ee(e){e.querySelectorAll("select.lb-dropdown-state").forEach(r=>{let o=r.__lbDropdownInstance;o&&o.destroy()})}function pe(e){let t=dn(e);if(t===null||t<=Date.now())return null;let r=t,o=document.createElement("div");o.className="lb-bundle-countdown",o.setAttribute("data-countdown","");let n=document.createElement("div");n.className="lb-bundle-countdown__label";let i=document.createElement("span");i.textContent="Ends in",n.appendChild(i),o.appendChild(n);let a=document.createElement("span");a.className="lb-bundle-countdown__timer",a.setAttribute("data-countdown-timer",""),o.appendChild(a);let l=null;function d(){let p=r-Date.now();if(p<=0){o.style.display="none",s();return}a.textContent=Ct(p)}function s(){l!==null&&(clearInterval(l),l=null)}return d(),l=setInterval(d,1e3),{el:o,stop:s}}function dn(e){let t=Date.parse(e);return Number.isFinite(t)?t:null}function be(e){let t=document.createElement("button");t.type="button",t.className="lb-bundle-cta",t.setAttribute("data-add-bundle","");let r=document.createElement("span");r.className="lb-cta-label",r.setAttribute("data-cta-label",""),r.textContent=e,t.appendChild(r);let o=document.createElement("span");return o.className="lb-cta-spinner",o.setAttribute("data-cta-spinner",""),o.setAttribute("aria-hidden","true"),o.innerHTML='<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 2a10 10 0 0 1 10 10" /></svg>',t.appendChild(o),t}function He(e,t){let r=e.querySelector("[data-cta-label]");r&&(r.textContent=t)}function c(e,t,r={}){let o=document.createElement(e);t&&(o.className=t);for(let[n,i]of Object.entries(r))o.setAttribute(n,i);return o}var sn=`
|
|
233
|
-
<svg class="lb-bundle-placeholder-icon" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
234
|
-
<rect x="4" y="4" width="20" height="20" rx="3"></rect>
|
|
235
|
-
<line x1="4" y1="20" x2="24" y2="20"></line>
|
|
236
|
-
<circle cx="10" cy="12" r="2"></circle>
|
|
237
|
-
</svg>`;function _t(e,t,r,o){let n=t.widgetConfig,i=(x,E)=>we(t,x,E),a=[],l=0;if(t.products.forEach((x,E)=>{let _=cn(t,x,E);_.qty!==0&&(_.isOos&&(l++,n.outOfStockBehavior==="hide")||a.push(_))}),a.length===0)return;let d=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",s=c("div","lb-fixed",{"data-discount-type":t.discountConfig.discountType,"data-discount-value":String(t.discountConfig.discountValue)}),p=un(t,d);if(s.appendChild(p.el),n.countdown.showCountdown&&t.endsAt){let x=pe(t.endsAt);x&&(s.appendChild(x.el),o?.(x.stop))}let u=c("div","lb-fixed__products"),C=[];a.forEach(x=>{let E=bn(x,d,i,{enabled:n.showLowStockBadge,threshold:n.lowStockThreshold},()=>{A()});C.push(E),u.appendChild(E.el)}),s.appendChild(u),s.appendChild(c("div","lb-bundle-divider"));let m=hn(t);s.appendChild(m.el);let g=n.savingsBar.visible?mn():null;g&&s.appendChild(g.el);let k=gn(t,l,()=>{let x=a.filter(E=>E.selected).map(E=>({merchandiseId:E.selected.id,quantity:E.qty,attributes:[{key:"_lime_bundle_gid",value:t.id},{key:"_lime_bundle_type",value:t.bundleType}]}));x.length!==0&&r(x)});s.appendChild(k),s.appendChild(c("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),s.appendChild(c("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),e.appendChild(s),Se(s),o?.(()=>Ee(s)),A();function A(){let x=a.reduce((O,h)=>{if(!h.selected)return O;let M=j(h.selected.price.amount);return O+M*h.qty},0),E=fn(x,t.discountConfig,a),_=Math.max(0,x-E);m.update({totalCents:x,saleCents:E,savingsCents:_,currency:d}),g&&g.update({savingsCents:_,currency:d}),p.refresh(pn(t,x,E,d))}}function cn(e,t,r){let o=e.selectedVariantIds?.[r]??null,n=o&&o.length>0?t.variants.nodes.filter(p=>o.includes(p.id)):t.variants.nodes,i=n.find(p=>Z(p,we(e,t.id,p.id)))??null,a=n,l=!i,d=i??n[0]??null,s=d?we(e,t.id,d.id):1;return{product:t,eligibleVariants:a,selected:d,qty:s,isOos:l}}function un(e,t){let r=e.widgetConfig,o=c("div","lb-bundle-header"),n=c("div","lb-bundle-header__content"),i=c("h3","lb-bundle-title");if(i.textContent=e.title,n.appendChild(i),e.description){let d=c("p","lb-bundle-subtitle");d.textContent=e.description,n.appendChild(d)}o.appendChild(n);let a=c("span","lb-bundle-header__badge",{"data-header-badge":""});o.appendChild(a);let l=Oe(e,e.productQuantities,r.pricing.showSaveBadge);return l.headerBadge?a.textContent=l.headerBadge:a.style.display="none",{el:o,refresh(d){if(!r.pricing.showSaveBadge){a.style.display="none";return}d?(a.textContent=d,a.style.display=""):a.style.display="none"}}}function pn(e,t,r,o){if(!e.widgetConfig.pricing.showSaveBadge)return"";let n=t-r;if(n<=0)return"";let i=e.discountConfig;return i.discountType==="percentage"&&i.discountValue>0?`-${Math.round(i.discountValue)}%`:i.discountType==="fixed_amount"&&i.discountValue>0?`-${D(Math.round(i.discountValue*100),o)}`:`-${D(n,o)}`}function bn(e,t,r,o,n){let i=c("div",e.isOos?"lb-bundle-product-row lb-bundle-product-row--oos":"lb-bundle-product-row",{"data-product-id":e.product.id.replace(/^.*\//,""),...e.isOos?{"aria-disabled":"true"}:{}}),a=c("div","lb-bundle-thumbnail",{"data-thumbnail":""}),l=e.selected?.image??e.product.featuredImage??null,d=null;l?(d=document.createElement("img"),d.src=re(l.url,{width:U,height:U,crop:"center"}),d.alt=l.altText??e.product.title,d.width=U,d.height=U,d.loading="lazy",a.appendChild(d)):a.insertAdjacentHTML("beforeend",sn);let s=null;e.isOos||(s=c("span","lb-bundle-qty-badge",{"data-qty-badge":""}),s.textContent=String(e.qty),a.appendChild(s)),i.appendChild(a);let p=c("div","lb-bundle-product-info"),u=document.createElement("a");if(u.className="lb-bundle-product-name",u.href=`/products/${e.product.handle}`,u.textContent=e.product.title,p.appendChild(u),e.isOos){let C=c("span","lb-bundle-oos-label");C.textContent="Out of stock",p.appendChild(C)}else if(e.selected){if(e.eligibleVariants.length===1&&e.product.variants.nodes.length>1){let _=c("span","lb-bundle-variant-badge");_.textContent=e.eligibleVariants[0].title,p.appendChild(_)}let m=c("span","lb-bundle-product-prices"),g=c("span","lb-bundle-product-compare-price",{"data-product-compare-price":""}),k=c("span","lb-bundle-product-price",{"data-product-price":""});m.appendChild(g),m.appendChild(k),p.appendChild(m);let A=c("span","lb-bundle-product-unit-price",{"data-product-unit-price":""});A.setAttribute("hidden",""),p.appendChild(A);let x=c("span","lb-bundle-low-stock-badge",{"data-low-stock-badge":""});x.setAttribute("hidden",""),p.appendChild(x);let E=_=>{let O=j(_.price.amount);if(k.textContent=D(O,t),_.compareAtPrice){let y=j(_.compareAtPrice.amount);y>O?(g.textContent=D(y,t),g.removeAttribute("hidden")):g.setAttribute("hidden","")}else g.setAttribute("hidden","");let h=le(_.unitPrice,_.unitPriceMeasurement,t);h?(A.textContent=h,A.removeAttribute("hidden")):A.setAttribute("hidden","");let M=_.image??e.product.featuredImage;d&&M&&(d.src=re(M.url,{width:U,height:U,crop:"center"}),d.alt=M.altText??e.product.title);let L=r(e.product.id,_.id);ue(_,L,o.threshold,o.enabled)?(x.textContent=`Only ${_.quantityAvailable} left`,x.removeAttribute("hidden")):x.setAttribute("hidden","")};if(E(e.selected),e.eligibleVariants.length>1){let _=e.eligibleVariants[0].selectedOptions.map(P=>P.name),O=e.product.id.replace(/^.*\//,""),h=[],M=P=>e.eligibleVariants.find(T=>T.selectedOptions.every((S,I)=>S.value===P[I])&&T.selectedOptions.length===P.length)??null,L=P=>{P.selectedOptions.forEach((T,S)=>{let I=h[S];I&&I.value!==T.value&&(I.value=T.value)})},y=(P,T,S)=>e.eligibleVariants.some(I=>!Z(I,r(e.product.id,I.id))||I.selectedOptions[P]?.value!==T?!1:I.selectedOptions.every((F,te)=>te===P||F.value===S[te])),B=P=>{h.forEach((T,S)=>{Array.from(T.options).forEach(I=>{I.disabled=!y(S,I.value,P)})})},f=()=>{let P=h.map(S=>S.value),T=M(P);if(!T){e.selected&&(L(e.selected),B(e.selected.selectedOptions.map(S=>S.value)));return}e.selected=T,e.qty=r(e.product.id,T.id),s&&(s.textContent=String(e.qty)),E(T),B(T.selectedOptions.map(S=>S.value)),n()},q=c("div","lb-bundle-variant-option-groups");_.forEach((P,T)=>{let S=c("div","lb-bundle-variant-option-group"),I=c("span","lb-bundle-variant-option-label");I.textContent=P,S.appendChild(I);let F=document.createElement("select");F.className="lb-bundle-variant-select",F.setAttribute("data-variant-option",""),F.setAttribute("data-option-position",String(T+1)),F.name=`lb-variant-${O}-${T+1}`,F.setAttribute("aria-label",P);let te=new Set;e.eligibleVariants.forEach(v=>{let b=v.selectedOptions[T]?.value;if(!b||te.has(b))return;te.add(b);let w=document.createElement("option");w.value=b,w.textContent=b,e.selected?.selectedOptions[T]?.value===b&&(w.selected=!0),F.appendChild(w)}),F.addEventListener("change",f),h.push(F),S.appendChild(F),q.appendChild(S)}),p.appendChild(q),e.selected&&B(e.selected.selectedOptions.map(P=>P.value))}}return i.appendChild(p),{el:i,state:e}}function hn(e){let t=c("div","lb-bundle-pricing"),r=c("span","lb-bundle-pricing__label");r.textContent="Bundle price",t.appendChild(r);let o=c("span","lb-bundle-pricing__prices"),n=c("span","lb-bundle-compare-price",{"data-compare-price":""});n.style.display="none",o.appendChild(n);let i=c("span","lb-bundle-sale-price",{"data-sale-price":""});return o.appendChild(i),t.appendChild(o),{el:t,update({totalCents:a,saleCents:l,savingsCents:d,currency:s}){i.textContent=D(l,s),e.widgetConfig.pricing.showCompareAtPrice&&d>0?(n.textContent=D(a,s),n.style.display=""):n.style.display="none"}}}function mn(){let e=c("div","lb-bundle-savings-bar",{"data-savings-bar":""}),t=document.createElement("span");t.textContent="You save",e.appendChild(t);let r=c("span","",{"data-savings-amount":""});return e.appendChild(r),{el:e,update({savingsCents:o,currency:n}){if(o<=0){e.style.display="none";return}e.style.display="",r.textContent=D(o,n)}}}function gn(e,t,r){let o=t>0?`${t} item${t===1?"":"s"} out of stock`:e.widgetConfig.cta.ctaText||"Add to cart",n=be(o);return t>0?n.disabled=!0:n.addEventListener("click",()=>{n.disabled||r()}),n}function fn(e,t,r){if(t.discountType==="percentage"){let o=0;for(let n of r){if(!n.selected)continue;let i=j(n.selected.price.amount),a=Math.floor(i*t.discountValue/100),l=Math.max(0,i-a);o+=l*n.qty}return o}return Math.max(0,e-Math.round(t.discountValue*100))}var St=`
|
|
238
|
-
<svg class="lb-bundle-placeholder-icon" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
239
|
-
<rect x="4" y="4" width="20" height="20" rx="3"></rect>
|
|
240
|
-
<line x1="4" y1="20" x2="24" y2="20"></line>
|
|
241
|
-
<circle cx="10" cy="12" r="2"></circle>
|
|
242
|
-
</svg>`,vn=`
|
|
243
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
244
|
-
<line x1="9" y1="3" x2="9" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
245
|
-
<line x1="3" y1="9" x2="15" y2="9" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
246
|
-
</svg>`,Et=`
|
|
247
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
248
|
-
<line x1="5" y1="5" x2="15" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
249
|
-
<line x1="15" y1="5" x2="5" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
250
|
-
</svg>`,xn=`
|
|
251
|
-
<svg width="16" height="16" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
252
|
-
<path d="M14.348 5.652a.5.5 0 0 0-.707 0L10 9.293 6.36 5.652a.5.5 0 1 0-.708.707L9.293 10l-3.641 3.641a.5.5 0 0 0 .708.707L10 10.707l3.641 3.641a.5.5 0 0 0 .707-.707L10.707 10l3.641-3.641a.5.5 0 0 0 0-.707z"/>
|
|
253
|
-
</svg>`,yn=`
|
|
254
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
255
|
-
<line x1="3" y1="7" x2="11" y2="7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
256
|
-
</svg>`,wn=`
|
|
257
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
258
|
-
<line x1="7" y1="3" x2="7" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
259
|
-
<line x1="3" y1="7" x2="11" y2="7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
260
|
-
</svg>`;function $e(e,t){return e.productRules[t]??pt}function Ue(e,t,r){let o=0;for(let n of e)n.productId===t&&n.variantId===r&&(o+=n.quantity);return o}function Tt(e,t,r,o){let n=t.widgetConfig,i=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",a=t.minQuantity??1,l=n.mixMatchShowQuantitySelector!==!1,d=Pn(t,n.outOfStockBehavior);if(d.filter(y=>!y.isOos).length<a)return;let p=[],u=c("div","lb-mix-match",{"data-required-quantity":String(a)}),C=kn(t);if(u.appendChild(C),n.countdown.showCountdown&&t.endsAt){let y=pe(t.endsAt);y&&(u.appendChild(y.el),o?.(y.stop))}let m=_n(a);u.appendChild(m.el);let g=c("div","lb-mix-match__slots",{"data-selection-slots":""});u.appendChild(g),u.appendChild(c("div","lb-bundle-divider"));let k=En(n.pricing.showCompareAtPrice);u.appendChild(k.el);let A=n.savingsBar.visible?Tn():null;A&&u.appendChild(A.el);let x=be(`Select ${a} items to unlock`);x.disabled=!0,x.addEventListener("click",()=>{x.disabled||r(Cn(p,t))});let E=An(t,d,i,{showSearch:n.showSearch,showQtySelector:l,selections:p,onAdd:(y,B,f)=>_(y,B,f),isComplete:()=>p.length>=a,getFocusAfterAdd:()=>g.querySelector(".lb-mix-match__slot--empty")??x});u.appendChild(E.el),u.appendChild(x),u.appendChild(c("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),u.appendChild(c("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),e.appendChild(u),o?.(()=>Ee(u)),h();function _(y,B,f){if(p.length>=a)return;let q=$e(t,y.id),P=Ne(B,q.max,Ue(p,y.id,B.id));if(P<q.min)return;let T=Math.max(q.min,Math.min(f,P));p.push({productId:y.id,productTitle:y.title,variantId:B.id,variantTitle:B.title,imageUrl:B.image?.url??y.featuredImage?.url??null,priceCents:j(B.price.amount),compareCents:B.compareAtPrice?j(B.compareAtPrice.amount):null,unitPriceLabel:le(B.unitPrice,B.unitPriceMeasurement,i),quantity:T}),h()}function O(y){y<0||y>=p.length||(p.splice(y,1),h())}function h(){M(),m.update(p.length),k.update(p,t,i),A&&A.update(p,t,i),E.refreshCounts(),L()}function M(){g.innerHTML="";let y=Math.max(a,p.length);for(let B=0;B<y;B++){let f=p[B];f?g.appendChild(Sn(f,B,i,()=>O(B))):g.appendChild(Bn(B,()=>E.open()))}}function L(){let y=p.length;y<a?(x.disabled=!0,He(x,`Select ${a-y} more to unlock`)):(x.disabled=!1,He(x,n.cta.ctaText||"Add to cart"))}}function Cn(e,t){let r=new Map;for(let o of e){let n=`${o.productId}::${o.variantId}`,i=r.get(n);i?i.quantity+=o.quantity:r.set(n,{variantId:o.variantId,quantity:o.quantity})}return Array.from(r.values()).map(o=>({merchandiseId:o.variantId,quantity:o.quantity,attributes:[{key:"_lime_bundle_gid",value:t.id},{key:"_lime_bundle_type",value:t.bundleType}]}))}function kn(e){let t=e.widgetConfig,r=c("div","lb-bundle-header"),o=c("div","lb-bundle-header__content"),n=c("h3","lb-bundle-title");if(n.textContent=e.title,o.appendChild(n),r.appendChild(o),t.pricing.showSaveBadge){let{discountType:i,discountValue:a}=e.discountConfig,l=null;if(i==="percentage"&&a>0?l=`-${Math.round(a)}%`:i==="fixed_amount"&&a>0&&(l=`-${D(Math.round(a*100),e.products[0]?.priceRange.minVariantPrice.currencyCode??"USD")}`),l){let d=c("span","lb-bundle-header__badge");d.textContent=l,r.appendChild(d)}}return r}function _n(e){let t=c("div","lb-mix-match__progress"),r=c("div","lb-mix-match__progress-labels"),o=c("span","lb-mix-match__progress-count",{"data-progress-count":"","aria-live":"polite"});o.textContent=`0 of ${e} selected`,r.appendChild(o);let n=c("span","lb-mix-match__progress-remaining",{"data-progress-remaining":"","aria-live":"polite"});n.textContent=`${e} more to go`,r.appendChild(n),t.appendChild(r);let i=c("div","lb-mix-match__progress-track",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e)}),a=c("div","lb-mix-match__progress-fill",{"data-progress-fill":""});a.style.width="0%",i.appendChild(a),t.appendChild(i);function l(d){let s=Math.min(100,d/e*100);o.textContent=`${d} of ${e} selected`,d>=e?n.textContent="Complete":n.textContent=`${e-d} more to go`,a.style.width=`${s}%`,i.setAttribute("aria-valuenow",String(Math.min(d,e)))}return{el:t,update:l}}function Bn(e,t){let r=c("div","lb-bundle-product-row lb-mix-match__slot lb-mix-match__slot--empty",{"data-slot":String(e+1),tabindex:"0",role:"button","aria-label":"Add a product to the bundle"}),o=c("div","lb-mix-match__empty-thumb");o.innerHTML=vn,r.appendChild(o);let n=c("span","lb-mix-match__empty-text");return n.textContent="Choose an item",r.appendChild(n),r.addEventListener("click",t),r.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),t())}),r}function Sn(e,t,r,o){let n=c("div","lb-bundle-product-row lb-mix-match__slot lb-mix-match__slot--filled",{"data-slot":String(t+1)}),i=c("div","lb-bundle-thumbnail",{"data-thumbnail":""});if(e.imageUrl){let g=document.createElement("img");g.src=re(e.imageUrl,{width:U,height:U,crop:"center"}),g.alt=e.productTitle,g.width=U,g.height=U,g.loading="lazy",i.appendChild(g)}else i.insertAdjacentHTML("beforeend",St);let a=c("span","lb-bundle-qty-badge");a.textContent=`\xD7${e.quantity}`,i.appendChild(a),n.appendChild(i);let l=c("div","lb-mix-match__filled-info"),d=c("span","lb-mix-match__filled-title");if(d.textContent=e.productTitle,l.appendChild(d),e.variantTitle&&e.variantTitle!=="Default Title"){let g=c("span","lb-mix-match__filled-variant");g.textContent=e.variantTitle,l.appendChild(g)}let s=e.priceCents*e.quantity,p=e.compareCents!==null?e.compareCents*e.quantity:null,u=c("span","lb-mix-match__filled-price");if(p!==null&&p>s){let g=c("span","lb-mix-match__filled-compare");g.textContent=D(p,r),u.appendChild(g)}let C=document.createElement("span");if(C.textContent=D(s,r),u.appendChild(C),l.appendChild(u),e.unitPriceLabel){let g=c("span","lb-bundle-product-unit-price");g.textContent=e.unitPriceLabel,l.appendChild(g)}n.appendChild(l);let m=document.createElement("button");return m.type="button",m.className="lb-mix-match__slot-remove",m.setAttribute("aria-label",`Remove ${e.productTitle}`),m.innerHTML=Et,m.addEventListener("click",g=>{g.stopPropagation(),o()}),n.appendChild(m),n}function En(e){let t=c("div","lb-bundle-pricing",{"data-pricing-section":""});t.style.display="none";let r=c("span","lb-bundle-pricing__label");r.textContent="Bundle price",t.appendChild(r);let o=c("span","lb-bundle-pricing__prices"),n=c("span","lb-bundle-compare-price",{"data-compare-price":""});e&&o.appendChild(n);let i=c("span","lb-bundle-sale-price",{"data-sale-price":""});o.appendChild(i),t.appendChild(o);function a(l,d,s){if(l.length===0){t.style.display="none";return}t.style.display="";let p=l.reduce((C,m)=>C+m.priceCents*m.quantity,0),u=Ce(p,d.discountConfig);e&&p>u?(n.textContent=D(p,s),n.style.display=""):n.style.display="none",i.textContent=D(u,s)}return{el:t,update:a}}function Tn(){let e=c("div","lb-bundle-savings-bar",{"data-savings-bar":""});e.style.display="none";let t=document.createElement("span");t.textContent="You save",e.appendChild(t);let r=c("span","",{"data-savings-amount":""});e.appendChild(r);function o(n,i,a){if(n.length===0){e.style.display="none";return}let l=n.reduce((p,u)=>p+u.priceCents*u.quantity,0),d=Ce(l,i.discountConfig),s=Math.max(0,l-d);if(s<=0){e.style.display="none";return}e.style.display="",r.textContent=D(s,a)}return{el:e,update:o}}function An(e,t,r,o){let n=c("div","lb-mix-match__modal-overlay",{"data-modal-overlay":"","data-bundle-gid":e.id});n.style.display="none";let i=c("div","lb-mix-match__modal",{role:"dialog","aria-modal":"true","aria-labelledby":`lb-modal-title-${Bt(e.id)}`,tabindex:"-1"}),a=c("div","lb-mix-match__modal-header"),l=c("h4","lb-mix-match__modal-title",{id:`lb-modal-title-${Bt(e.id)}`});l.textContent="Pick an item",a.appendChild(l);let d=document.createElement("button");d.type="button",d.className="lb-mix-match__modal-close",d.setAttribute("data-modal-close",""),d.setAttribute("aria-label","Close"),d.innerHTML=Et,d.addEventListener("click",L),a.appendChild(d),i.appendChild(a);let s=null,p=null;if(o.showSearch){let f=c("div","lb-mix-match__modal-search");s=document.createElement("input"),s.type="text",s.className="lb-mix-match__modal-search-input",s.setAttribute("data-modal-search",""),s.setAttribute("role","searchbox"),s.setAttribute("aria-label","Search products"),s.setAttribute("placeholder","Search products"),s.autocomplete="off",s.addEventListener("input",()=>E()),f.appendChild(s),p=document.createElement("button"),p.type="button",p.className="lb-mix-match__modal-search-clear",p.setAttribute("data-modal-search-clear",""),p.setAttribute("aria-label","Clear search"),p.style.display="none",p.innerHTML=xn,p.addEventListener("click",()=>{s&&(s.value="",E(),s.focus())}),f.appendChild(p),i.appendChild(f)}let u=c("div","lb-mix-match__modal-list",{"data-modal-list":""});i.appendChild(u);let C=c("div","lb-mix-match__modal-empty",{"data-modal-empty":""});C.style.display="none";let m=document.createElement("p");m.textContent="No products match your search.",C.appendChild(m),i.appendChild(C);let g=c("span","lb-visually-hidden",{"data-modal-live":"","aria-live":"polite"});i.appendChild(g),n.appendChild(i);let k=!1,A=[];function x(){k||(k=!0,u.innerHTML="",t.forEach(f=>{let q=$e(e,f.product.id),P=f.variants,T=f.variants.find(V=>Z(V,q.min))??f.firstAvailableVariant??f.variants[0];if(!T)return;let S=T,I=c("div",f.isOos?"lb-mix-match__modal-product lb-mix-match__modal-product--sold-out":"lb-mix-match__modal-product",{"data-product-id":f.product.id.replace(/^.*\//,"")}),F=c("div","lb-mix-match__modal-product-thumb"),v=(f.variants.find(V=>Z(V,q.min))??f.variants[0]??null)?.image??f.product.featuredImage??null,b=null;v?(b=document.createElement("img"),b.src=re(v.url,{width:U,height:U,crop:"center"}),b.alt=v.altText??f.product.title,b.width=U,b.height=U,b.loading="lazy",F.appendChild(b)):F.insertAdjacentHTML("beforeend",St);let w=c("span","lb-bundle-qty-badge");w.hidden=!0,F.appendChild(w),I.appendChild(F);let R=c("div","lb-mix-match__modal-product-info"),ne=c("p","lb-mix-match__modal-product-title");ne.textContent=f.product.title,R.appendChild(ne);let Y=c("p","lb-mix-match__modal-product-price");Y.textContent=D(j(S.price.amount),r),R.appendChild(Y);let ee=c("p","lb-mix-match__modal-product-unit-price lb-bundle-product-unit-price"),ze=le(S.unitPrice,S.unitPriceMeasurement,r);ze?ee.textContent=ze:ee.hidden=!0,R.appendChild(ee);let he=c("span","lb-bundle-low-stock-badge",{"data-low-stock-badge":""});he.hidden=!0,R.appendChild(he);let je=V=>{ue(V,q.min,e.widgetConfig.lowStockThreshold,e.widgetConfig.showLowStockBadge)?(he.textContent=`Only ${V.quantityAvailable} left`,he.hidden=!1):he.hidden=!0};je(S);let Qe=()=>{let V=Ue(o.selections,f.product.id,S.id),X=Ne(S,q.max,V),oe=Math.max(q.min,X);return{min:q.min,max:oe,cap:X}},K=null,ve=null;!f.isOos&&o.showQtySelector&&(ve=c("div","lb-bundle-variant-option-group lb-mix-match__qty-stepper-group"),K=Ln({initial:q.min,getBounds:()=>{let{min:V,max:X}=Qe();return{min:V,max:X}}}),ve.appendChild(K.el));let me={el:I,product:f.product,variant:T,refreshFromSelections:()=>{}},de=[];if(P.length>1){let V=P[0].selectedOptions.map($=>$.name),X=f.product.id.replace(/^.*\//,""),oe=$=>P.find(N=>N.selectedOptions.length===$.length&&N.selectedOptions.every((Q,H)=>Q.value===$[H]))??null,xe=$=>{$.selectedOptions.forEach((N,Q)=>{let H=de[Q];H&&H.value!==N.value&&(H.value=N.value)})},ie=($,N,Q)=>P.some(H=>!Z(H,q.min)||H.selectedOptions[$]?.value!==N?!1:H.selectedOptions.every((z,ge)=>ge===$||z.value===Q[ge])),Pe=$=>{de.forEach((N,Q)=>{Array.from(N.options).forEach(H=>{H.disabled=!ie(Q,H.value,$)})})},$t=()=>{let $=de.map(z=>z.value),N=oe($);if(!N){xe(S),Pe(S.selectedOptions.map(z=>z.value));return}S=N,me.variant=N,Y.textContent=D(j(S.price.amount),r);let Q=le(S.unitPrice,S.unitPriceMeasurement,r);Q?(ee.textContent=Q,ee.hidden=!1):(ee.textContent="",ee.hidden=!0);let H=S.image??f.product.featuredImage;b&&H&&(b.src=re(H.url,{width:U,height:U,crop:"center"}),b.alt=H.altText??f.product.title),Pe(N.selectedOptions.map(z=>z.value)),je(S),me.refreshFromSelections()},Ge=c("div","lb-bundle-variant-option-groups");V.forEach(($,N)=>{let Q=c("div","lb-bundle-variant-option-group"),H=c("span","lb-bundle-variant-option-label");H.textContent=$,Q.appendChild(H);let z=document.createElement("select");z.className="lb-mix-match__variant-select",z.setAttribute("data-variant-option",""),z.setAttribute("data-option-position",String(N+1)),z.name=`lb-variant-${X}-${N+1}`,z.setAttribute("aria-label",$);let ge=new Set;P.forEach(Wt=>{let se=Wt.selectedOptions[N]?.value;if(!se||ge.has(se))return;ge.add(se);let ye=document.createElement("option");ye.value=se,ye.textContent=se,T.selectedOptions[N]?.value===se&&(ye.selected=!0),z.appendChild(ye)}),z.addEventListener("change",$t),de.push(z),Q.appendChild(z),Ge.appendChild(Q)}),R.appendChild(Ge),Pe(T.selectedOptions.map($=>$.value))}else if(P.length===1&&T.title!=="Default Title"){let V=c("span","lb-mix-match__filled-variant");V.textContent=T.title,R.appendChild(V)}if(f.isOos){let V=c("span","lb-mix-match__modal-sold-out-label");V.textContent="Sold out",R.appendChild(V)}I.appendChild(R);let W=null,Ut=()=>{if(!W){de.forEach(ie=>{ie.disabled=!0}),K&&K.setExternallyDisabled(!0);return}let{cap:V}=Qe(),X=Ue(o.selections,f.product.id,S.id);X>0?(w.textContent=String(X),w.hidden=!1):w.hidden=!0,o.selections.some(ie=>ie.productId===f.product.id)?(W.disabled=!0,W.textContent="Added",W.setAttribute("aria-label",`Added ${f.product.title}`),I.classList.add("lb-mix-match__modal-product--in-bundle")):(W.textContent="Add",W.setAttribute("aria-label",`Add ${f.product.title}`),I.classList.remove("lb-mix-match__modal-product--in-bundle"),W.disabled=o.isComplete()||V<q.min);let xe=W.disabled;de.forEach(ie=>{ie.disabled=xe}),K&&K.setExternallyDisabled(xe)};if(!f.isOos){let V=c("div","lb-mix-match__modal-product-actions");ve&&V.appendChild(ve),W=document.createElement("button"),W.type="button",W.className="lb-mix-match__modal-add",W.textContent="Add",W.setAttribute("aria-label",`Add ${f.product.title}`),W.addEventListener("click",()=>{if(!W||W.disabled||o.isComplete())return;let X=K?K.value():q.min;o.onAdd(f.product,S,X),K&&K.reset(q.min);let oe=o.getFocusAfterAdd();oe&&(_=oe),L()}),V.appendChild(W),R.appendChild(V)}me.refreshFromSelections=()=>{K&&K.refresh(),Ut()},me.refreshFromSelections(),A.push(me),u.appendChild(I)}),Se(u),B())}function E(){if(!s)return;let f=s.value.trim().toLowerCase();p&&(p.style.display=f?"":"none");let q=0;A.forEach(P=>{let T=!f||P.product.title.toLowerCase().includes(f);P.el.style.display=T?"":"none",T&&q++}),C.style.display=q===0&&f?"":"none"}let _=null;function O(f){if(f.key==="Escape"){f.preventDefault(),L();return}f.key==="Tab"&&Mn(f,i)}let h=!1;function M(){h||o.isComplete()||(h=!0,x(),_=n.getRootNode().activeElement,n.style.display="",n.classList.add("lb-mix-match__modal-overlay--open"),i.focus(),document.addEventListener("keydown",O),n.addEventListener("click",y))}function L(){h&&(h=!1,n.classList.remove("lb-mix-match__modal-overlay--open"),n.style.display="none",document.removeEventListener("keydown",O),n.removeEventListener("click",y),_ instanceof HTMLElement&&_.focus())}function y(f){f.target===n&&L()}function B(){A.forEach(f=>f.refreshFromSelections())}return{el:n,open:M,close:L,refreshCounts:B}}function Ln(e){let t=c("div","lb-mix-match__qty-stepper",{role:"group","aria-label":"Quantity"}),r=document.createElement("button");r.type="button",r.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--minus",r.setAttribute("aria-label","Decrease quantity"),r.innerHTML=yn,t.appendChild(r);let o=c("span","lb-mix-match__qty-stepper-value",{"aria-live":"polite"});t.appendChild(o);let n=document.createElement("button");n.type="button",n.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--plus",n.setAttribute("aria-label","Increase quantity"),n.innerHTML=wn,t.appendChild(n);let i=l(e.initial,e.getBounds()),a=!1;function l(s,p){return Math.max(p.min,Math.min(p.max,s))}function d(){let s=e.getBounds();i=l(i,s),o.textContent=String(i),r.disabled=a||i<=s.min,n.disabled=a||i>=s.max}return r.addEventListener("click",()=>{let s=e.getBounds();i=l(i-1,s),d()}),n.addEventListener("click",()=>{let s=e.getBounds();i=l(i+1,s),d()}),d(),{el:t,value:()=>i,reset(s){i=l(s,e.getBounds()),d()},refresh:d,setExternallyDisabled(s){a=s,d()}}}function Pn(e,t){let r=[],o=new Set;for(let n of e.products){if(o.has(n.id))continue;o.add(n.id);let i=$e(e,n.id),a=n.variants.nodes.filter(d=>Z(d,i.min)),l=a.length===0;l&&t==="hide"||r.push({product:n,variants:n.variants.nodes,firstAvailableVariant:a[0]??null,isOos:l})}return r}function Mn(e,t){let r=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(r.length===0)return;let o=r[0],n=r[r.length-1],i=t.getRootNode().activeElement;e.shiftKey&&i===o?(e.preventDefault(),n.focus()):!e.shiftKey&&i===n&&(e.preventDefault(),o.focus())}function Bt(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function Mt(e,t,r,o){let n=t.widgetConfig,i=t.products[0],a=t.volumeTiers[0]?.minQuantity??1,l=i?.variants.nodes.find(h=>Z(h,a));if(!l&&n.outOfStockBehavior==="hide")return;let d=l?j(l.price.amount):0,s=l?.price.currencyCode??"USD",p=t.discountConfig.discountType,u=t.volumeTiers.map((h,M)=>{let L;if(p==="fixed_amount"){let y=Math.round((h.amount??0)*100);L=Math.max(0,d-y)}else{let y=h.percentage??0,B=Math.floor(d*y/100);L=Math.max(0,d-B)}return{tier:h,index:M,qty:h.minQuantity,pricePerUnitCents:L,basePricePerUnitCents:d}}),C=qn(u),m=n.defaultTier==="best_value"?C:0;typeof n.defaultTier=="number"&&(m=Pt(n.defaultTier,0,u.length-1));let g=n.popularBadge.tierIndex!==void 0?Pt(n.popularBadge.tierIndex,0,u.length-1):C,k=c("div","lb-volume");if(k.appendChild(In(t,u,m,s,p)),n.countdown.showCountdown&&t.endsAt){let h=pe(t.endsAt);h&&(k.appendChild(h.el),o?.(h.stop))}let A=c("div","lb-volume__tiers",{role:"radiogroup","aria-label":"Quantity tiers","data-tier-group":""});u.forEach(h=>{let M=Rn(h,h.index===m,s,n.popularBadge.visible&&h.index===g?n.popularBadge.text:null,n.pricing.showComparePrice,n.pricing.showPerUnitPrice);M.addEventListener("click",()=>O(h.index)),M.addEventListener("keydown",L=>{if(L.key==="Enter"||L.key===" "){L.preventDefault(),O(h.index);return}if(L.key==="ArrowDown"||L.key==="ArrowRight"||L.key==="ArrowUp"||L.key==="ArrowLeft"){L.preventDefault();let y=L.key==="ArrowDown"||L.key==="ArrowRight"?1:-1,B=(h.index+y+u.length)%u.length;O(B),A.children[B]?.focus()}}),A.appendChild(M)}),k.appendChild(A),k.appendChild(c("div","lb-bundle-divider"));let x=At(u,m,s,n.pricing.showItemCount,n.pricing.showCompareAtPrice);k.appendChild(x);let E=n.savingsBar.visible?Lt(u,m,s):null;E&&k.appendChild(E);let _=Dn(t,()=>{if(!l)return;let h=u[m];h&&r([{merchandiseId:l.id,quantity:h.qty,attributes:[{key:"_lime_bundle_gid",value:t.id},{key:"_lime_bundle_type",value:t.bundleType}]}])});if(l&&ue(l,a,n.lowStockThreshold,n.showLowStockBadge)){let h=c("span","lb-bundle-low-stock-badge",{"data-low-stock-badge":""});h.textContent=`Only ${l.quantityAvailable} left`,k.appendChild(h)}k.appendChild(_),k.appendChild(c("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),k.appendChild(c("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),e.appendChild(k);function O(h){if(h===m||h<0||h>=u.length)return;m=h,Array.from(A.children).forEach((y,B)=>{y.setAttribute("aria-checked",String(B===h)),y.tabIndex=B===h?0:-1});let M=At(u,h,s,n.pricing.showItemCount,n.pricing.showCompareAtPrice);if(x.replaceWith(M),x=M,E){let y=Lt(u,h,s);E.replaceWith(y),E=y}let L=k.querySelector("[data-header-badge]");if(L){let y=It(u[h],s,p);y?(L.textContent=y,L.style.display=""):L.style.display="none"}}}function In(e,t,r,o,n){let i=e.widgetConfig,a=c("div","lb-bundle-header"),l=c("div","lb-bundle-header__content"),d=c("h3","lb-bundle-title");if(d.textContent=e.title,l.appendChild(d),a.appendChild(l),i.pricing.showSaveBadge){let s=It(t[r],o,n);if(s){let p=c("span","lb-bundle-header__badge",{"data-header-badge":""});p.textContent=s,a.appendChild(p)}}return a}function Rn(e,t,r,o,n,i){let a=c("div","lb-volume__tier",{role:"radio","aria-checked":String(t),tabindex:t?"0":"-1","data-tier-index":String(e.index),"data-tier-qty":String(e.qty)}),l=c("span","lb-volume__radio");l.appendChild(c("span","lb-volume__radio-dot")),a.appendChild(l);let d=c("span","lb-volume__tier-grid"),s=c("span","lb-volume__tier-label");s.textContent=`Buy ${e.qty}`,d.appendChild(s);let p=c("span","lb-volume__tier-price");if(n&&e.pricePerUnitCents<e.basePricePerUnitCents){let C=c("span","lb-volume__tier-compare");C.textContent=D(e.basePricePerUnitCents,r),p.appendChild(C)}if(i){let C=document.createElement("span");C.setAttribute("data-tier-price-each",""),C.textContent=D(e.pricePerUnitCents,r),p.appendChild(C);let m=c("span","lb-volume__tier-unit");m.textContent=" each",p.appendChild(m)}d.appendChild(p),a.appendChild(d);let u=c("span","lb-volume__tier-badge");return o?u.textContent=o:u.style.display="none",a.appendChild(u),a}function At(e,t,r,o,n){let i=e[t],a=i?i.pricePerUnitCents*i.qty:0,l=i?i.basePricePerUnitCents*i.qty:0,d=Math.max(0,l-a),s=c("div","lb-bundle-pricing"),p=c("span","lb-bundle-pricing__label",{"data-total-label":""});if(p.textContent="Total",o&&i){let m=document.createElement("span");m.setAttribute("data-item-count",""),m.textContent=` (${i.qty} item${i.qty===1?"":"s"})`,p.appendChild(m)}s.appendChild(p);let u=c("span","lb-bundle-pricing__prices");if(n&&d>0){let m=c("span","lb-bundle-compare-price",{"data-compare-price":""});m.textContent=D(l,r),u.appendChild(m)}let C=c("span","lb-bundle-sale-price",{"data-total-price":""});return C.textContent=D(a,r),u.appendChild(C),s.appendChild(u),s}function Lt(e,t,r){let o=e[t],n=o?o.pricePerUnitCents*o.qty:0,i=o?o.basePricePerUnitCents*o.qty:0,a=Math.max(0,i-n),l=c("div","lb-bundle-savings-bar",{"data-savings-bar":""});a<=0&&(l.style.display="none");let d=document.createElement("span");d.textContent="You save",l.appendChild(d);let s=c("span","",{"data-savings-amount":""});return s.textContent=D(a,r),l.appendChild(s),l}function Dn(e,t){let r=e.products[0],o=e.volumeTiers[0]?.minQuantity??1,n=r?.variants.nodes.some(l=>Z(l,o)),i=n?e.widgetConfig.cta.ctaText||"Add to cart":"Sold out",a=be(i);return n||(a.disabled=!0),a.addEventListener("click",()=>{a.disabled||t()}),a}function It(e,t,r){if(!e)return null;let{tier:o}=e;if(r==="fixed_amount"){let n=o.amount??0;return n>0?`-${D(Math.round(n*100),t)}`:null}if(r==="percentage"){let n=o.percentage??0;return n>0?`-${Math.round(n)}%`:null}return null}function qn(e){let t=0,r=0;return e.forEach((o,n)=>{let i=o.basePricePerUnitCents-o.pricePerUnitCents;i>t&&(t=i,r=n)}),r}function Pt(e,t,r){return Math.max(t,Math.min(r,e))}var Vn=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","Enter"," ","Escape"]),Te=new Set,Ae=!1;function Rt(e){let t=e==="using-mouse"?"using-keyboard":"using-mouse";for(let r of Te)r.classList.add(e),r.classList.remove(t)}function Dt(e){Vn.has(e.key)&&Rt("using-keyboard")}function qt(){Rt("using-mouse")}function On(){Ae||(Ae=!0,document.addEventListener("keydown",Dt,!0),document.addEventListener("pointerdown",qt,!0))}function Fn(){Ae&&(Ae=!1,document.removeEventListener("keydown",Dt,!0),document.removeEventListener("pointerdown",qt,!0))}function Le(e){return e.classList.add("using-mouse"),e.classList.remove("using-keyboard"),Te.add(e),On(),()=>{Te.delete(e),e.classList.remove("using-mouse"),e.classList.remove("using-keyboard"),Te.size===0&&Fn()}}var We=`/* Lime Bundles \u2014 shared base styles for all bundle widget types */
|
|
241
|
+
`;var ut="show_greyed_out";function $t(e){return e==="hide"?"hide":ut}var oe=class extends Error{constructor(e,t){super(e),this.reason=t,this.name="BundleParseError"}},It={none:0,subtle:6,rounded:12,round:18},re={header:{countdownBgColor:"#B4DC7F47",countdownTextColor:"#555555"},layout:{backgroundColor:"#FCFCFC",borderColor:"#E5E5E5",borderWidth:1,borderRadius:"subtle"},productList:{textColor:"#555555",thumbnailRatio:"square",showPrice:!0,showCompareAtPrice:!0},pricing:{showComparePrice:!0,showPerUnitPrice:!0,showItemCount:!0,showCompareAtPrice:!0},cta:{ctaText:"Add to cart",primaryColor:"#B4DC7F",buttonTextColor:"#555555",borderWidth:0,borderColor:"#B4DC7F"},savingsBar:{visible:!0},countdown:{showCountdown:!0},popularBadge:{visible:!0,text:"Most Popular",bgColor:"#1A1A1A",textColor:"#FFFFFF",borderWidth:0,borderColor:"#1A1A1A"},showLowStockBadge:!0,lowStockThreshold:10,lowStockBgColor:"#FEF3C7",lowStockTextColor:"#92400E",showSearch:!0,mixMatchShowTypeFilters:!0,mixMatchShowQuantitySelector:!0,pickerBgColor:"#FCFCFC",pickerTextColor:"#555555",pickerBorderWidth:1,pickerBorderColor:"#E5E5E5",pickerBorderRadius:"subtle",pickerThumbnailRatio:"square",pickerAddBgColor:"#B4DC7F",pickerAddLabelColor:"#555555",pickerAddBorderWidth:0,pickerAddBorderColor:"#B4DC7F",defaultTier:"first"};function fr(e){if(!e||typeof e!="object")return re;let t=e;return{...re,...t,defaultTier:gr(t.defaultTier),pickerBorderRadius:Mt(t.pickerBorderRadius),header:{...re.header,...t.header??{}},layout:{...re.layout,...t.layout??{},borderRadius:Mt(t.layout?.borderRadius)},productList:{...re.productList,...t.productList??{}},pricing:{...re.pricing,...t.pricing??{}},cta:{...re.cta,...t.cta??{}},savingsBar:{...re.savingsBar,...t.savingsBar??{}},countdown:{...re.countdown,...t.countdown??{}},popularBadge:{...re.popularBadge,...t.popularBadge??{}}}}function gr(e){return e==="first"||e==="best_value"||typeof e=="number"&&Number.isInteger(e)&&e>=0?e:re.defaultTier}function Mt(e){return e==="none"||e==="subtle"||e==="rounded"||e==="round"?e:re.layout.borderRadius}function xr(e){return{primaryColor:e.cta.primaryColor,backgroundColor:e.layout.backgroundColor,textColor:e.productList.textColor,borderColor:e.layout.borderColor,borderWidth:e.layout.borderWidth,buttonTextColor:e.cta.buttonTextColor,ctaBorderWidth:e.cta.borderWidth,ctaBorderColor:e.cta.borderColor,borderRadius:It[e.layout.borderRadius],countdownBgColor:e.header.countdownBgColor,countdownTextColor:e.header.countdownTextColor,thumbnailRatio:e.productList.thumbnailRatio,showProductPrice:e.productList.showPrice,showProductCompareAtPrice:e.productList.showCompareAtPrice,showCountdown:e.countdown.showCountdown,ctaText:e.cta.ctaText,showLowStockBadge:e.showLowStockBadge,lowStockThreshold:e.lowStockThreshold,lowStockBgColor:e.lowStockBgColor,lowStockTextColor:e.lowStockTextColor,showComparePrice:e.pricing.showComparePrice,showPerUnitPrice:e.pricing.showPerUnitPrice,showItemCount:e.pricing.showItemCount,showCompareAtPrice:e.pricing.showCompareAtPrice,showMostPopular:e.popularBadge.visible,popularBadgeText:e.popularBadge.text,popularBadgeBgColor:e.popularBadge.bgColor,popularBadgeTextColor:e.popularBadge.textColor,popularBadgeBorderWidth:e.popularBadge.borderWidth,popularBadgeBorderColor:e.popularBadge.borderColor,showSearch:e.showSearch,mixMatchShowTypeFilters:e.mixMatchShowTypeFilters,pickerBgColor:e.pickerBgColor,pickerTextColor:e.pickerTextColor,pickerBorderWidth:e.pickerBorderWidth,pickerBorderColor:e.pickerBorderColor,pickerBorderRadius:It[e.pickerBorderRadius],pickerThumbnailRatio:e.pickerThumbnailRatio,pickerAddBgColor:e.pickerAddBgColor,pickerAddLabelColor:e.pickerAddLabelColor,pickerAddBorderWidth:e.pickerAddBorderWidth,pickerAddBorderColor:e.pickerAddBorderColor,defaultTier:e.defaultTier,...e.popularBadge.tierIndex!==void 0&&{mostPopularTierIndex:e.popularBadge.tierIndex}}}var vr={primaryColor:"--lb-primary-color",backgroundColor:"--lb-bg",textColor:"--lb-text",borderColor:"--lb-border",borderWidth:"--lb-border-width",buttonTextColor:"--lb-btn-text",borderRadius:"--lb-radius",countdownBgColor:"--lb-countdown-bg",countdownTextColor:"--lb-countdown-text",ctaBorderWidth:"--lb-cta-border-width",ctaBorderColor:"--lb-cta-border-color",popularBadgeBgColor:"--lb-popular-badge-bg",popularBadgeTextColor:"--lb-popular-badge-text",popularBadgeBorderWidth:"--lb-popular-badge-border-width",popularBadgeBorderColor:"--lb-popular-badge-border-color",pickerBgColor:"--lb-picker-bg",pickerTextColor:"--lb-picker-text",pickerBorderWidth:"--lb-picker-border-width",pickerBorderColor:"--lb-picker-border-color",pickerBorderRadius:"--lb-picker-radius",pickerAddBgColor:"--lb-picker-add-bg",pickerAddLabelColor:"--lb-picker-add-label",pickerAddBorderWidth:"--lb-picker-add-border-width",pickerAddBorderColor:"--lb-picker-add-border-color"},yr=new Set(["borderRadius","borderWidth","ctaBorderWidth","popularBadgeBorderWidth","pickerBorderWidth","pickerBorderRadius","pickerAddBorderWidth"]);function Gt(e,t){let n=xr(t);for(let[i,a]of Object.entries(vr)){let l=n[i];if(l==null)continue;let d=yr.has(i)?`${l}px`:String(l);e.style.setProperty(a,d)}e.style.setProperty("--lb-product-price-display",t.productList.showPrice?"block":"none"),e.style.setProperty("--lb-product-compare-display",t.productList.showCompareAtPrice?"inline":"none"),e.style.setProperty("--lb-variant-chevron",Lt(t.layout.borderColor)),e.style.setProperty("--lb-picker-variant-chevron",Lt(t.pickerBorderColor));let r=Pt(t.productList.thumbnailRatio);e.style.setProperty("--lb-thumbnail-aspect-ratio",r.aspectRatio),e.style.setProperty("--lb-thumbnail-img-fit",r.imgFit),e.style.setProperty("--lb-thumbnail-img-height",r.imgHeight);let o=Pt(t.pickerThumbnailRatio);e.style.setProperty("--lb-picker-thumbnail-aspect-ratio",o.aspectRatio),e.style.setProperty("--lb-picker-thumbnail-img-fit",o.imgFit),e.style.setProperty("--lb-picker-thumbnail-img-height",o.imgHeight)}function Lt(e){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='${e.replace(/#/g,"%23")}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`}function Pt(e){switch(e){case"tall":return{aspectRatio:"3 / 4",imgFit:"cover",imgHeight:"100%"};case"wide":return{aspectRatio:"4 / 3",imgFit:"cover",imgHeight:"100%"};case"original":return{aspectRatio:"auto",imgFit:"contain",imgHeight:"auto"};default:return{aspectRatio:"1 / 1",imgFit:"cover",imgHeight:"100%"}}}var wr=new Set(["fixed","mix_match","volume","bogo","multi_step"]),_r=new Set(["active"]);function pt(e,t){try{return Cr(e,t)}catch(n){if(n instanceof oe)return null;throw n}}function Cr(e,t){let n=new Map(t.map(k=>[k.key,k])),r=n.get("title")?.value??"Bundle",o=n.get("bundle_type")?.value,i=n.get("status")?.value;if(!o||!wr.has(o))throw new oe(`Invalid or missing bundle_type: ${o??"null"}`,"invalid_type");let a=o;if(!i||!_r.has(i))throw new oe(`Bundle is not active: status=${i??"null"}`,"inactive");let l=i,d=n.get("starts_at")?.value??null,s=n.get("ends_at")?.value??null,c=new Date;if(d){let k=new Date(d);if(Number.isNaN(k.getTime()))throw new oe(`Invalid starts_at: ${d}`,"invalid_type");if(k>c)throw new oe(`Bundle not yet started: starts_at=${d}`,"not_started")}if(s){let k=new Date(s);if(Number.isNaN(k.getTime()))throw new oe(`Invalid ends_at: ${s}`,"invalid_type");if(k<c)throw new oe(`Bundle has expired: ends_at=${s}`,"expired")}let u=Er(n),m=Ar(n),f=Ir(n),h={id:e,title:r,description:n.get("description")?.value||null,status:l,products:u,discountConfig:m,widgetConfig:f,startsAt:d,endsAt:s,discountLabel:n.get("discount_label")?.value??null,selectedVariantIds:Mr(n),productQuantities:Bt(n,"product_quantities"),variantQuantities:Bt(n,"variant_quantities"),marketVisibility:Lr(n),marketIds:Pr(n)};switch(a){case"fixed":return{...h,bundleType:"fixed"};case"volume":return{...h,bundleType:"volume",volumeTiers:Br(n)};case"mix_match":return{...h,bundleType:"mix_match",minQuantity:Nr(n,"min_quantity",{min:1}),maxQuantity:null,productRules:qt(n)};case"bogo":return{...h,bundleType:"bogo",...Tr(n)};case"multi_step":return{...h,bundleType:"multi_step",steps:kr(n),productRules:qt(n),collectionProductIds:Sr(n)}}}function kr(e){let t=fe(e,"steps");if(!Array.isArray(t))throw new oe("Invalid or missing steps","invalid_type");let n=o=>Array.isArray(o)?o.filter(i=>typeof i=="string"):[],r=[];for(let o of t){if(!o||typeof o!="object"||Array.isArray(o))continue;let i=o;if(typeof i.name!="string")continue;let a=typeof i.minQuantity=="number"?i.minQuantity:Number(i.minQuantity),l=Number.isFinite(a)&&a>=1?Math.floor(a):1,d=null;typeof i.maxQuantity=="number"&&Number.isFinite(i.maxQuantity)&&(d=Math.max(l,Math.floor(i.maxQuantity))),r.push({name:i.name,minQuantity:l,maxQuantity:d,productIds:n(i.productIds),collectionIds:n(i.collectionIds)})}if(r.length===0)throw new oe("multi_step bundle has no valid steps","invalid_type");return r}function Sr(e){let t={},n=e.get("collection");if(!n?.references?.nodes)return t;for(let r of n.references.nodes)!("products"in r)||!r.products?.nodes||(t[r.id]=r.products.nodes.map(o=>o.id));return t}function Tr(e){let t=fe(e,"bogo_config");if(!t||typeof t!="object"||Array.isArray(t))throw new oe("Invalid or missing bogo_config","invalid_type");let n=t,r=typeof n.buyProductId=="string"?n.buyProductId:"",o=typeof n.getProductId=="string"?n.getProductId:"";if(!r||!o)throw new oe("bogo_config is missing buy/get product ids","invalid_type");let i=a=>{let l=typeof a=="number"?a:Number(a);return!Number.isFinite(l)||l<1?1:Math.min(99,Math.floor(l))};return{buyProductId:r,getProductId:o,buyQuantity:i(n.buyQuantity),getQuantity:i(n.getQuantity)}}function Er(e){let t=[],n=e.get("products");if(n?.reference&&"variants"in n.reference&&t.push(n.reference),n?.references?.nodes)for(let o of n.references.nodes)"variants"in o?t.push(o):"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);let r=e.get("collection");if(r?.references?.nodes)for(let o of r.references.nodes)"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);return t}function Ar(e){return{discountType:e.get("discount_type")?.value??"percentage",discountValue:parseFloat(e.get("discount_value")?.value??"0"),allowStacking:e.get("allow_stacking")?.value==="true"}}function Ir(e){return fr(fe(e,"widget_config"))}function Mr(e){let t=fe(e,"selected_variant_ids");if(!Array.isArray(t))return null;let n=[];for(let r of t)Array.isArray(r)?n.push(r.filter(o=>typeof o=="string")):n.push([]);return n}function Bt(e,t){let n=fe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){let a=typeof i=="number"?i:Number(i);Number.isFinite(a)&&a>=0&&a<=99&&(r[o]=Math.floor(a))}return r}function qt(e){let t=fe(e,"product_rules");if(!t||typeof t!="object"||Array.isArray(t))return{};let n={};for(let[r,o]of Object.entries(t)){if(!o||typeof o!="object"||Array.isArray(o))continue;let{min:i,max:a,required:l}=o,d=typeof i=="number"?i:Number(i),s=typeof a=="number"?a:Number(a);if(!Number.isFinite(d)||!Number.isFinite(s))continue;let c=Math.max(1,Math.min(99,Math.floor(d))),u=Math.max(c,Math.min(99,Math.floor(s)));n[r]=l===!0?{min:c,max:u,required:!0}:{min:c,max:u}}return n}function Lr(e){return e.get("market_visibility")?.value==="specific"?"specific":"all"}function Pr(e){let t=e.get("markets")?.value;if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>typeof r=="string"):[]}catch{return[]}}function Br(e){let t=fe(e,"volume_tiers");return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null).map(qr):[]}function qr(e){let t=Number(e.minQuantity??0),n={minQuantity:Number.isFinite(t)&&t>=0?t:0};return typeof e.percentage=="number"&&Number.isFinite(e.percentage)&&(n.percentage=e.percentage),typeof e.amount=="number"&&Number.isFinite(e.amount)&&(n.amount=e.amount),n}function fe(e,t){let n=e.get(t)?.value;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Nr(e,t,n={}){let r=e.get(t)?.value;if(!r)return null;let o=parseInt(r,10);return isNaN(o)||n.min!==void 0&&o<n.min?null:o}function Nt(e){return e.split("/").pop()??e}function Kt(e,t){if(e.marketVisibility!=="specific")return!0;if(!t)return!1;let n=Nt(t);return e.marketIds.some(r=>Nt(r)===n)}function mt(e,t,n){let r=e.variantQuantities[n];return r!==void 0?r:e.productQuantities[t]??1}function Yt(e,t){let n=e.steps[t];if(!n)return[];let r=new Set(n.productIds),o=new Set;for(let l of n.collectionIds)for(let d of e.collectionProductIds[l]??[])o.add(d);let i=new Set,a=[];for(let l of e.products)i.has(l.id)||!r.has(l.id)&&!o.has(l.id)||(i.add(l.id),a.push(l));return a}async function Jt(e,t){await en(e,{shopDomain:e.shopDomain,eventType:"bundle_impression",bundleGid:t.bundleGid,bundleType:t.bundleType,productId:t.productId,occurredAt:new Date().toISOString()})}async function Xt(e,t){await en(e,{shopDomain:e.shopDomain,eventType:"bundle_add_to_cart",...t,occurredAt:new Date().toISOString()})}function Zt(e,t){if(typeof IntersectionObserver>"u")return t(),()=>{};let n=new IntersectionObserver(r=>{for(let o of r)o.isIntersecting&&(t(),n.unobserve(o.target))},{threshold:.5});return n.observe(e),()=>n.disconnect()}async function en(e,t){let n=`${e.appUrl}/api/analytics`,r=JSON.stringify(t);try{(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r})).ok||(await new Promise(i=>setTimeout(i,2e3)),await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r}))}catch{try{typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(n,r)}catch{}}}var Rt=1e4,Rr=[[/@import/i,"@import rules"],[/@charset/i,"@charset declarations"],[/expression\s*\(/i,"CSS expressions"],[/-moz-binding/i,"-moz-binding"],[/-webkit-binding/i,"-webkit-binding"],[/behavior\s*:/i,"behavior property"]],Or=/^(https:|\/[^/]|\.\/|\.\.\/|#)/;function bt(e){if(e.length>Rt)return{ok:!1,error:`CSS exceeds ${Rt.toLocaleString("en-US")} character limit`};let t=e.replace(/\/\*[\s\S]*?\*\//g,"");try{t=t.replace(/\\([0-9a-fA-F]{1,6})[ \t\n\f]?/g,(o,i)=>{let a=parseInt(i,16);return a<0||a>1114111?"\uFFFD":String.fromCodePoint(a)}),t=t.replace(/\\\r?\n/g,""),t=t.replace(/\\([^\n\r\f0-9a-fA-F])/g,"$1")}catch{return{ok:!1,error:"CSS contains invalid unicode escape sequences"}}t=t.replace(/</g,"").replace(/>/g,"");for(let[o,i]of Rr)if(o.test(t))return{ok:!1,error:`CSS contains blocked pattern: ${i}`};let n=/url\s*\(\s*([\s\S]*?)\s*\)/gi,r;for(;(r=n.exec(t))!==null;){let o=r[1].trim();if((o.startsWith("'")||o.startsWith('"'))&&(o=o.slice(1)),(o.endsWith("'")||o.endsWith('"'))&&(o=o.slice(0,-1)),o=o.trim(),o&&!Or.test(o))return{ok:!1,error:"CSS url() values must use https:// or relative paths"}}return{ok:!0,css:t}}var Hr="lb-custom-css-";function tn(e,t){if(typeof document>"u"||!t)return!1;let n=bt(t);if(!n.ok||!n.css.trim())return!1;let r=Hr+Dr(e),o=document.getElementById(r);return o||(o=document.createElement("style"),o.id=r,o.setAttribute("data-lime-bundles","custom-css"),document.head.appendChild(o)),o.textContent!==n.css&&(o.textContent=n.css),!0}function Dr(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function Fr(e,t){let n=typeof e=="string"?parseFloat(e):e;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(n)}catch{return`${t} ${n.toFixed(2)}`}}function Re(e,t,n){return t==="percentage"?Math.max(0,e*(1-n/100)):Math.max(0,e-n)}var Vr={CL:"cl",CM:"cm",FLOZ:"fl oz",FT:"ft",FT2:"ft\xB2",G:"g",GAL:"gal",IN:"in",ITEM:"each",KG:"kg",L:"l",LB:"lb",M:"m",M2:"m\xB2",M3:"m\xB3",MG:"mg",ML:"ml",MM:"mm",OZ:"oz",PT:"pt",QT:"qt",UNKNOWN:"",YD:"yd"};function nn(e,t,n){if(!e||!t||t.referenceUnit==="UNKNOWN")return null;let r=parseFloat(e.amount);if(!Number.isFinite(r))return null;let o=Vr[t.referenceUnit]??"";if(!o)return null;let i=e.currencyCode||n||"USD",a=Fr(r,i),l=t.referenceValue,d=l===1?o:`${l}${o}`;return`${a}/${d}`}var ge={};Dt(ge,{computePosition:()=>zr,emptyTypeAheadState:()=>Gr,firstEnabled:()=>Ne,handleKey:()=>jr,pushTypeAheadChar:()=>Kr});var Ur=4;function zr({trigger:e,viewportHeight:t,desiredHeight:n,margin:r=Ur,clip:o}){let i=o?Math.min(t,o.bottom):t,a=o?Math.max(0,o.top):0,l=Math.max(0,i-e.bottom-r),d=Math.max(0,e.top-a-r),s=n<=l?"down":d>l?"up":"down",u=Math.min(n,s==="down"?l:d),m=s==="down"?e.bottom+r:e.top-r-u;return{placement:s,maxHeight:u,offsetTop:m,offsetLeft:e.left,width:e.width}}var dt={type:"passthrough",preventDefault:!1};function Ne(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function Ot(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}function Qr(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t+n)%e.length;if(!e[r].disabled)return r}return t}function Wr(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t-n+e.length)%e.length;if(!e[r].disabled)return r}return t}function Ht(e){return e.length===1&&e!==" "&&/\S/.test(e)}function jr(e,t){if(e.ctrlKey||e.metaKey||e.altKey)return dt;let{key:n}=e,{isOpen:r,activeIndex:o,selectedIndex:i,options:a}=t;if(!r)switch(n){case"Enter":case" ":case"ArrowDown":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Ne(a),preventDefault:!0};case"ArrowUp":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Ot(a),preventDefault:!0};default:return Ht(n)?{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Ne(a),preventDefault:!0}:dt}switch(n){case"ArrowDown":return{type:"move-active",activeIndex:Qr(a,o),preventDefault:!0};case"ArrowUp":return{type:"move-active",activeIndex:Wr(a,o),preventDefault:!0};case"Home":return{type:"move-active",activeIndex:Ne(a),preventDefault:!0};case"End":return{type:"move-active",activeIndex:Ot(a),preventDefault:!0};case"Enter":case" ":return o>=0&&!a[o]?.disabled?{type:"commit",index:o,preventDefault:!0}:{type:"passthrough",preventDefault:!0};case"Escape":return{type:"close",commit:!1,restoreFocus:!0,preventDefault:!0};case"Tab":return{type:"close",commit:!1,restoreFocus:!1,preventDefault:!1};default:return Ht(n)?{type:"type-ahead",char:n,preventDefault:!1}:dt}}var $r=500;function Gr(){return{buffer:"",lastTime:0}}function Kr(e,t,n,r,o=$r){if(t.length!==1)return{newState:e,matchedIndex:null};let a=(n-e.lastTime>o?"":e.buffer)+t.toLowerCase(),l={buffer:a,lastTime:n};for(let d=0;d<r.length;d++){let s=r[d];if(!s.disabled&&s.label.toLowerCase().startsWith(a))return{newState:l,matchedIndex:d}}return{newState:l,matchedIndex:null}}var Yr={};Dt(Yr,{findVariantByOptions:()=>Jr,isOptionValueAvailable:()=>Xr,toPickerVariant:()=>Zr});function Jr(e,t){if(e.length===0)return null;for(let n of e){if(n.optionValues.length!==t.length)continue;let r=!0;for(let o=0;o<n.optionValues.length;o++)if(n.optionValues[o]!==t[o]){r=!1;break}if(r)return n}return null}function Xr(e,t,n,r){for(let o of e){if(!o.available||o.optionValues[t]!==n)continue;let i=!0;for(let a=0;a<o.optionValues.length;a++)if(a!==t&&o.optionValues[a]!==r[a]){i=!1;break}if(i)return!0}return!1}function Zr(e){return{id:e.id,optionValues:e.selectedOptions.map(t=>t.value),available:e.availableForSale}}function rn(e,t){return e.availableForSale?e.currentlyNotInStock||e.quantityAvailable==null?!0:e.quantityAvailable>=t:!1}function on(e){let t=e.slice(e.lastIndexOf("/")+1),n=Number(t);return Number.isFinite(n)&&t!==""?n:e}function Oe(e){if(!e)return 0;let t=parseFloat(e);return Number.isFinite(t)?Math.round(t*100):0}function eo(e,t,n){return{id:on(e.id),title:e.title,options:(e.selectedOptions??[]).map(r=>r.value),available:rn(e,t),price:Oe(e.price?.amount),compareAtPrice:Oe(e.compareAtPrice?.amount),unitPrice:nn(e.unitPrice,e.unitPriceMeasurement,n),image:e.image?.url??null}}function ye(e,t,n){let r=n.allowedVariantIds,o=e.variants.nodes.filter(s=>!r||r.length===0||r.includes(s.id)),i=e.priceRange.minVariantPrice.currencyCode,a=mt(n.quantities,e.id,o[0]?.id??""),l=o.map(s=>{let c=mt(n.quantities,e.id,s.id),u=eo(s,c,i);return c!==a&&(u.quantity=c),u}),d=l.find(s=>s.available)??l[0];return{productId:on(e.id),title:e.title,url:e.handle?"/products/"+e.handle:null,featuredImage:e.featuredImage?.url??null,quantity:a,selectedVariantId:d?d.id:"",optionNames:(o[0]?.selectedOptions??[]).map(s=>s.name),variants:l}}function He(e){return e.products.map((t,n)=>ye(t,e.id,{quantities:{productQuantities:e.productQuantities,variantQuantities:e.variantQuantities},allowedVariantIds:e.selectedVariantIds?.[n]??null}))}function G(e,t){for(let n=0;n<e.variants.length;n++)if(String(e.variants[n].id)===String(t))return e.variants[n];return e.variants[0]}function an(e,t){if(!e.variants||!t)return null;for(let n=0;n<e.variants.length;n++){let r=e.variants[n];if(!r.options||r.options.length!==t.length)continue;let o=!0;for(let i=0;i<r.options.length;i++)if(r.options[i]!==t[i]){o=!1;break}if(o)return r}return null}function ln(e,t,n,r){for(let o=0;o<e.length;o++){let i=e[o];if(i.available===!1||!i.options||i.options[t]!==n)continue;let a=!0;for(let l=0;l<i.options.length;l++)if(l!==t&&i.options[l]!==r[l]){a=!1;break}if(a)return!0}return!1}function sn(e){let t=[];for(let n=0;n<e.length;n++){let r=G(e[n],e[n].selectedVariantId),o=r.quantity||e[n].quantity||1;t.push({variantId:Number(e[n].selectedVariantId),quantity:o,priceCents:(r.price||0)*o})}return t}function to(e,t,n){let r=0,o=0;for(let i=0;i<e.length;i++){let a=G(e[i],e[i].selectedVariantId),l=a.quantity||e[i].quantity||1,d=a.price*l;if(r+=d,t==="percentage"){let s=Math.floor(a.price*n/100);o+=(a.price-s)*l}else o+=d}if(t==="fixed_amount"&&(o=Math.max(0,r-Math.round(n*100))),t==="flat_price"){let i=Math.round(n*100);o=i<r?i:r}return{totalPrice:r,salePrice:o,savings:r-o}}function ht(e,t,n){let r=e.classList?.contains("lb-fixed")?e:e.querySelector(".lb-fixed");if(!r)return;let{totalPrice:o,salePrice:i,savings:a}=to(t,r.getAttribute("data-discount-type")||"",parseFloat(r.getAttribute("data-discount-value")??"")||0),l=e.querySelector("[data-sale-price]"),d=e.querySelector("[data-compare-price]"),s=e.querySelector("[data-savings-bar]"),c=e.querySelector("[data-savings-amount]"),u=e.querySelector("[data-savings-percent]");if(l&&(l.textContent=n(i)),d&&(a>0?(d.textContent=n(o),d.style.display=""):d.style.display="none"),s)if(a>0){if(c&&(c.textContent=n(a)),u){let m=o>0?Math.round(a*100/o):0;u.textContent="("+m+"%)"}s.style.display=""}else s.style.display="none"}function ie(e){return t=>{try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(t/100)}catch{return e+" "+(t/100).toFixed(2)}}}var no="_lime_bundle_gid",ro="_lime_bundle_type";function ae(e,t){return[{key:no,value:e},{key:ro,value:t}]}function De(e,t,n){let r=e.querySelectorAll("[data-variant-option]");if(!r.length)return;function o(s){return parseInt(s.getAttribute("data-option-position")??"",10)}function i(){let s=[];for(let c=0;c<r.length;c++){let u=o(r[c]);!u||u<1||(s[u-1]=r[c].value)}return s}function a(s){if(!(!s||!s.options))for(let c=0;c<r.length;c++){let u=o(r[c]);if(!u||u<1)continue;let m=s.options[u-1];r[c].value!==m&&(r[c].value=m)}}function l(s,c){for(let u=0;u<r.length;u++){let m=r[u],f=o(m);if(!f||f<1)continue;let h=m.options;for(let k=0;k<h.length;k++)h[k].disabled=!ln(s.variants,f-1,h[k].value,c)}}let d=t();if(d){let s=G(d,d.selectedVariantId);s&&s.options&&l(d,s.options)}for(let s=0;s<r.length;s++)r[s].addEventListener("change",c=>{c.stopPropagation();let u=t();if(!u)return;let m=an(u,i());if(!m){let f=G(u,u.selectedVariantId);a(f),f&&f.options&&l(u,f.options);return}u.selectedVariantId=m.id,l(u,m.options),n(m,u)})}function Fe(e,t,n){if(!t.variants.length)return;let r=e.querySelector(".lb-bundle-variant-badge");r&&!r.textContent&&(r.textContent=n.title);let o=e.querySelector(".lb-bundle-variant-option-groups");o&&!o.children.length&&oo(o,t,n)}function oo(e,t,n){let r=t.optionNames||[];for(let o=0;o<r.length;o++){let i=document.createElement("div");i.className="lb-bundle-variant-option-group";let a=document.createElement("span");a.className="lb-bundle-variant-option-label",a.textContent=r[o],i.appendChild(a);let l=document.createElement("select");l.className="lb-bundle-variant-select",l.setAttribute("data-variant-option",""),l.setAttribute("data-option-position",String(o+1)),l.setAttribute("data-product-id",String(t.productId)),l.name="lb-variant-"+t.productId+"-"+(o+1),l.setAttribute("aria-label",r[o]);let d=Object.create(null);for(let s of t.variants){let c=s.options&&s.options[o];if(!c||d[c])continue;d[c]=!0;let u=document.createElement("option");u.value=c,u.textContent=c,n.options&&n.options[o]===c&&(u.selected=!0),l.appendChild(u)}i.appendChild(l),e.appendChild(i)}}var ft=new WeakMap;function Ve(e,t,n){let r=e.querySelector("[data-thumbnail]");if(!r)return;let o=r.querySelector("img");if(!ft.has(e)){let a=n||(o?o.src:null);a&&ft.set(e,a)}let i=t.image||ft.get(e)||null;if(i)if(o)o.src=i,o.srcset="";else{let a=document.createElement("img");a.src=i,a.loading="lazy",a.alt="",r.textContent="",r.appendChild(a)}}function io(e,t){let n=e.querySelector("[data-qty-inline]");n&&(n.textContent="\xD7"+t)}function gt(e,t,n,r){if(!t)return;Ve(e,t,n.featuredImage),io(e,t.quantity||n.quantity||1);let o=e.querySelector("[data-product-price]");o&&t.price!=null&&(o.textContent=r(t.price));let i=e.querySelector("[data-product-compare-price]");if(i){let l=t.compareAtPrice;l&&l>t.price?(i.textContent=r(l),i.hidden=!1):(i.textContent="",i.hidden=!0)}let a=e.querySelector("[data-product-unit-price]");a&&(t.unitPrice?(a.textContent=t.unitPrice,a.hidden=!1):(a.textContent="",a.hidden=!0))}function q(e,t,n){let r=document.createElement(e);r.className=t;for(let o in n)r.setAttribute(o,n[o]);return r}function Ue(e,t,n){let r=e.variants.length,o=q("div","lb-bundle-product-row");n.isOos&&(o.classList.add("lb-bundle-product-row--oos"),o.setAttribute("aria-disabled","true")),o.setAttribute("data-product-id",String(e.productId)),n.bogoRole&&o.setAttribute("data-bogo-role",n.bogoRole),o.appendChild(q("div","lb-bundle-thumbnail",{"data-thumbnail":""}));let i=q("div","lb-bundle-product-info"),a=document.createElement(n.href?"a":"span");if(a.className="lb-bundle-product-name",n.href&&(a.href=n.href),a.textContent=e.title??"",i.appendChild(a),n.isOos){let d=q("span","lb-bundle-oos-label");return d.textContent=t.outOfStock||"Out of stock",i.appendChild(d),o.appendChild(i),o}r===1&&e.variants[0]?.title!=="Default Title"&&i.appendChild(q("span","lb-bundle-variant-badge"));let l=q("span","lb-bundle-product-prices");if(l.appendChild(q("span","lb-bundle-product-compare-price",{"data-product-compare-price":"",hidden:""})),l.appendChild(q("span","lb-bundle-product-price",{"data-product-price":""})),n.inlineQuantity!=null){let d=q("span","lb-bundle-qty-inline",{"data-qty-inline":""});d.textContent="\xD7"+n.inlineQuantity,l.appendChild(d)}if(i.appendChild(l),i.appendChild(q("span","lb-bundle-product-unit-price",{"data-product-unit-price":""})),r>1&&i.appendChild(q("div","lb-bundle-variant-option-groups",{style:"--lb-row-option-count: "+(e.optionNames.length||1)})),o.appendChild(i),n.inlineQuantity==null&&o.appendChild(q("span","lb-bundle-qty-chip",{"data-qty-inline":""})),n.badgeText){let d=q("span","lb-bogo__badge");d.textContent=n.badgeText,o.appendChild(d)}return o}function le(e,t){let n=q("div",e),r=q("div","lb-bundle-header"),o=q("h3","lb-bundle-title");if(o.textContent=t.title,r.appendChild(o),t.subtitle){let m=q("p","lb-bundle-subtitle");m.textContent=t.subtitle,r.appendChild(m)}if(n.appendChild(r),t.endsAt){let m=q("div","lb-bundle-countdown",{"data-countdown":""}),f=q("span","lb-bundle-countdown-label");f.textContent=t.countdownLabel??"Ends in",m.appendChild(f),m.appendChild(q("span","lb-bundle-countdown-timer",{"data-countdown-timer":""})),n.appendChild(m)}let i=q("div",e+"__products lb-edge-fade");n.appendChild(i),n.appendChild(q("div","lb-bundle-divider"));let a=q("div","lb-bundle-summary"),l=q("div","lb-bundle-summary__text"),d=q("span","lb-bundle-summary__label");if(d.textContent=t.summaryLabel??"Bundle price",l.appendChild(d),t.withItemCount&&d.appendChild(q("span","",{"data-item-count":""})),t.showSavingsBar){let m=q("p","lb-bundle-savings-line",{"data-savings-bar":"",style:"display:none"});m.appendChild(document.createTextNode("Save ")),m.appendChild(q("span","",{"data-savings-amount":""})),m.appendChild(document.createTextNode(" ")),m.appendChild(q("span","",{"data-savings-percent":""})),l.appendChild(m)}a.appendChild(l);let s=q("span","lb-bundle-summary__prices");t.showComparePrice&&s.appendChild(q("span","lb-bundle-compare-price",{"data-compare-price":""})),s.appendChild(q("span","lb-bundle-sale-price",{[t.totalPriceSlot?"data-total-price":"data-sale-price"]:""})),a.appendChild(s),n.appendChild(a);let c=q("button","lb-bundle-cta",{type:"button","data-add-bundle":""}),u=q("span","lb-cta-label",{"data-cta-label":""});return u.textContent=t.ctaText,c.appendChild(u),n.appendChild(c),n.appendChild(q("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),n.appendChild(q("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),{root:n,products:i,cta:c}}function dn(e,t){let n=q("div","lb-volume__tiers lb-edge-fade",{role:"radiogroup","aria-label":t,"data-tier-group":""});return e.forEach((r,o)=>{let i=q("div","lb-volume__tier",{role:"radio","aria-checked":r.selected?"true":"false",tabindex:r.selected?"0":"-1","data-tier-index":String(o),"data-tier-qty":String(r.quantity),"data-tier-pct":String(r.percent),"data-tier-amt":String(r.amountCents)}),a=q("span","lb-volume__radio");a.appendChild(q("span","lb-volume__radio-dot")),i.appendChild(a);let l=q("span","lb-volume__tier-info"),d=q("span","lb-volume__tier-label");d.textContent=r.label,l.appendChild(d);let s=q("span","lb-volume__tier-price");if(s.appendChild(q("span","lb-volume__tier-compare")),s.appendChild(q("span","",{"data-tier-price-each":""})),l.appendChild(s),i.appendChild(l),r.badgeLabel||r.savingsLabel){let c=q("span","lb-volume__tier-right");if(r.badgeLabel){let u=q("span","lb-volume__tier-badge");u.textContent=r.badgeLabel,c.appendChild(u)}if(r.savingsLabel){let u=q("span","lb-volume__tier-savings");u.textContent=r.savingsLabel,c.appendChild(u)}i.appendChild(c)}n.appendChild(i)}),n}function ze(e){let t=q("div","lb-mix-match__progress",{"data-progress":""}),n=q("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e)});for(let o=0;o<e;o++)n.appendChild(q("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));t.appendChild(n);let r=q("div","lb-mix-match__progress-labels");return r.appendChild(q("span","lb-mix-match__progress-count",{"data-progress-count":"","aria-live":"polite"})),r.appendChild(q("span","lb-mix-match__progress-remaining",{"data-progress-remaining":"","aria-live":"polite"})),t.appendChild(r),t}function we(e){return e<10?"0"+e:String(e)}function se(e){e._lbCountdownInterval&&(clearInterval(e._lbCountdownInterval),e._lbCountdownInterval=null);let t=e.querySelector("[data-countdown]");if(!t)return;let n=e.closest(".lb-bundle-widget"),r=n&&n.getAttribute("data-ends-at");if(!r){t.style.display="none";return}let o=new Date(r).getTime();if(isNaN(o)){t.style.display="none";return}let i=t.querySelector("[data-countdown-timer]");if(!i)return;let a;function l(){let d=o-Date.now();if(d<=0){n&&(n.style.display="none"),a&&clearInterval(a);return}let s=Math.floor(d/864e5),c=Math.floor(d%864e5/36e5),u=Math.floor(d%36e5/6e4),m=Math.floor(d%6e4/1e3);i.textContent=s>0?s+"d "+we(c)+"h "+we(u)+"m "+we(m)+"s":we(c)+"h "+we(u)+"m "+we(m)+"s"}l(),o-Date.now()>0&&(a=setInterval(l,1e3),e._lbCountdownInterval=a)}var de={locale:"en",addItem:"Add",addedItem:"Added",removeItem:"Remove",swapItem:"Swap",required:"Required",soldOut:"Sold out",outOfStock:"Out of stock",itemsOutOfStock:"__COUNT__ items out of stock",quantity:"Quantity",increaseQuantity:"Increase quantity",decreaseQuantity:"Decrease quantity",allTypes:"All",editSelection:"Edit selection",addToCart:"Add to cart",bundlePrice:"Bundle price",save:"Save",complete:"Complete",ofSelected:"__COUNT__ of __TOTAL__ added",moreToGo:"__COUNT__ more to go",nProductsShown:"__COUNT__ products shown",bundleComplete:"Your bundle is complete",chooseMoreUnlock:"Choose __COUNT__ more to unlock __PCT__% off",chooseMoreComplete:"Choose __COUNT__ more to complete your bundle",stepOf:"Step __STEP__ of __TOTAL__",stepsCompleted:"__COUNT__ of __TOTAL__ steps completed",each:" each",buyQty:"Buy __COUNT__",needsSpots:{one:"Needs __COUNT__ spot",other:"Needs __COUNT__ spots"}};function cn(e){let t=e.ownerDocument,n=t&&t.defaultView;if(!n)return null;let r=e.parentElement;for(;r&&r!==t.body;){let o=n.getComputedStyle(r).overflowY;if(o==="auto"||o==="scroll"||o==="hidden")return r;r=r.parentElement}return null}var ee=[],Qe=!1;function ao(e,t){if(e.composedPath){let r=e.composedPath();for(let o=0;o<r.length;o++)if(r[o]===t.shell||r[o]===t.listbox)return!0;return!1}let n=e.target;return t.shell.contains(n)||t.listbox.contains(n)}function We(e){for(let t=ee.length-1;t>=0;t--)ao(e,ee[t])||ee[t].close()}function un(){for(let e=ee.length-1;e>=0;e--)ee[e].close()}function lo(){Qe||(document.addEventListener("pointerdown",We,!0),window.addEventListener("resize",un),window.addEventListener("scroll",We,!0),Qe=!0)}function so(){Qe&&(document.removeEventListener("pointerdown",We,!0),window.removeEventListener("resize",un),window.removeEventListener("scroll",We,!0),Qe=!1)}function pn(e){ee.push(e),ee.length===1&&lo()}function mn(e){let t=ee.indexOf(e);t>=0&&ee.splice(t,1),ee.length===0&&so()}function bn(e){for(let t=ee.length-1;t>=0;t--)ee[t]!==e&&ee[t].close()}var co=32,uo=8,po=8,xt=new WeakMap;function hn(e){return xt.get(e)}function fn(e){if(e.classList.contains("lb-dropdown-state"))return null;let t=document,n=e.getAttribute("aria-label")||"",r="lb-dd-"+Math.random().toString(36).slice(2,9);e.classList.add("lb-dropdown-state"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");let o=t.createElement("div");o.className="lb-dropdown",o.setAttribute("data-lb-dropdown","");let i=t.createElement("button");i.type="button",i.className="lb-dropdown-trigger",i.setAttribute("role","combobox"),i.setAttribute("aria-haspopup","listbox"),i.setAttribute("aria-expanded","false");let a=r+"-listbox";i.setAttribute("aria-controls",a),n&&i.setAttribute("aria-label",n);let l=t.createElement("span");l.className="lb-dropdown-trigger-value";let d=t.createElement("span");d.className="lb-dropdown-chevron",d.setAttribute("aria-hidden","true"),i.appendChild(l),i.appendChild(d);let s=t.createElement("ul");s.id=a,s.className="lb-dropdown-listbox",s.setAttribute("role","listbox"),n&&s.setAttribute("aria-label",n),s.hidden=!0,o.appendChild(i),e.parentNode?.insertBefore(o,e.nextSibling);let c=e.closest("[data-modal-overlay]");c?(c.appendChild(s),s.setAttribute("data-lb-dropdown-portal","")):o.appendChild(s);let u=!1,m=-1,f=ge.emptyTypeAheadState(),h=[];function k(){let B=[];for(let C=0;C<e.options.length;C++){let x=e.options[C];B.push({disabled:x.disabled,label:x.textContent||x.value})}return B}function L(){i.disabled=e.disabled;let B=k(),C=e.selectedIndex;for(l.textContent=C>=0&&B[C]?B[C].label:"";s.firstChild;)s.removeChild(s.firstChild);h=[];for(let x=0;x<B.length;x++){let A=t.createElement("li");A.id=r+"-opt-"+x,A.className="lb-dropdown-option",A.setAttribute("role","option"),A.setAttribute("aria-selected",x===C?"true":"false"),B[x].disabled&&A.setAttribute("aria-disabled","true"),A.setAttribute("data-value",e.options[x].value),A.setAttribute("data-index",String(x)),A.textContent=B[x].label,s.appendChild(A),h.push(A)}}function b(B){if(m>=0&&h[m]&&h[m].classList.remove("is-active"),m=B,B<0||!h[B]){i.setAttribute("aria-activedescendant","");return}let C=h[B];C.classList.add("is-active"),i.setAttribute("aria-activedescendant",C.id);let x=C.offsetTop,A=x+C.offsetHeight,v=s.scrollTop,I=v+s.clientHeight;x<v?s.scrollTop=x:A>I&&(s.scrollTop=A-s.clientHeight)}function N(){let B=i.getBoundingClientRect();if(B.width===0)return!1;let x=Math.min(h.length||1,po)*co+uo,A=cn(i),v=A?{top:A.getBoundingClientRect().top,bottom:A.getBoundingClientRect().bottom}:void 0,I=ge.computePosition({trigger:{top:B.top,bottom:B.bottom,left:B.left,width:B.width},viewportHeight:window.innerHeight,desiredHeight:x,clip:v});return s.setAttribute("data-placement",I.placement),s.style.maxHeight=I.maxHeight+"px",s.hasAttribute("data-lb-dropdown-portal")&&(s.style.top=I.offsetTop+"px",s.style.left=I.offsetLeft+"px",s.style.width=I.width+"px"),!0}function O(){if(u)return;bn(j),u=!0,s.hidden=!1,i.setAttribute("aria-expanded","true"),N()||requestAnimationFrame(()=>{N()});let B=k(),C=e.selectedIndex;C>=0&&B[C]&&!B[C].disabled?b(C):b(ge.firstEnabled(B)),pn(j)}function T(B){u&&(u=!1,s.hidden=!0,i.setAttribute("aria-expanded","false"),i.setAttribute("aria-activedescendant",""),m>=0&&h[m]&&h[m].classList.remove("is-active"),m=-1,mn(j),B&&i.focus())}function p(B){let C=e.options[B];!C||C.disabled||(e.value!==C.value&&(e.value=C.value,e.dispatchEvent(new Event("change",{bubbles:!0}))),L(),T(!0))}function w(B){let C=k(),x=ge.handleKey({key:B.key,ctrlKey:B.ctrlKey,metaKey:B.metaKey,altKey:B.altKey,shiftKey:B.shiftKey},{isOpen:u,activeIndex:m,selectedIndex:e.selectedIndex,options:C});switch(x.preventDefault&&B.preventDefault(),x.type){case"open":O(),x.activeIndex>=0&&b(x.activeIndex);break;case"close":T(x.restoreFocus);break;case"move-active":b(x.activeIndex);break;case"commit":p(x.index);break;case"type-ahead":{let A=ge.pushTypeAheadChar(f,x.char,Date.now(),C);f=A.newState,A.matchedIndex!==null&&(u||O(),b(A.matchedIndex));break}}}function E(B){B.preventDefault(),u?T(!1):O()}function g(B){let C=B.target;for(;C&&C!==s;){if(C.classList&&C.classList.contains("lb-dropdown-option")){let x=parseInt(C.getAttribute("data-index")??"",10);return isNaN(x)?null:x}C=C.parentNode}return null}function U(B){let C=g(B);C!==null&&p(C)}function F(B){let C=B.target;for(;C&&C!==s;){if(C.classList&&C.classList.contains("lb-dropdown-option")){if(C.getAttribute("aria-disabled")==="true")return;let x=parseInt(C.getAttribute("data-index")??"",10);!isNaN(x)&&x!==m&&b(x);return}C=C.parentNode}}function D(){setTimeout(()=>{u&&(o.contains(document.activeElement)||T(!1))},0)}function Z(){L()}let J=new MutationObserver(()=>{L()});J.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","value","selected"]});function ne(B){B.preventDefault()}i.addEventListener("click",E),i.addEventListener("keydown",w),o.addEventListener("focusout",D),s.addEventListener("mousedown",ne),s.addEventListener("click",U),s.addEventListener("mousemove",F),e.addEventListener("change",Z);function W(){u&&T(!1),J.disconnect(),i.removeEventListener("click",E),i.removeEventListener("keydown",w),o.removeEventListener("focusout",D),s.removeEventListener("mousedown",ne),s.removeEventListener("click",U),s.removeEventListener("mousemove",F),e.removeEventListener("change",Z),o.parentNode?.removeChild(o),s.parentNode?.removeChild(s),e.classList.remove("lb-dropdown-state"),e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),xt.delete(e)}let j={shell:o,listbox:s,select:e,close:()=>T(!1),destroy:W};return xt.set(e,j),L(),j}var mo="select.lb-bundle-variant-select:not(.lb-dropdown-state), select.lb-mix-match__variant-select:not(.lb-dropdown-state)";function gn(e){let n=(e??document).querySelectorAll(mo);for(let r=0;r<n.length;r++)fn(n[r])}function xn(e){let n=(e??document).querySelectorAll("select.lb-dropdown-state");for(let r=0;r<n.length;r++)hn(n[r])?.destroy()}function be(e){return gn(e),()=>xn(e)}function vn(e,t,n,r,o){let i=t.widgetConfig,a=He(t);if(!a.length)return;let l=a.filter(m=>!m.variants.some(f=>f.available));if(n==="hide"&&l.length>0)return;let d=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",s=ie(d),c=de,u=le("lb-fixed",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||c.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});u.root.setAttribute("data-discount-type",t.discountConfig.discountType),u.root.setAttribute("data-discount-value",String(t.discountConfig.discountValue));for(let m of a){let f=!m.variants.some(L=>L.available),h=Ue(m,c,{isOos:f,href:m.url});if(u.products.appendChild(h),f)continue;let k=G(m,m.selectedVariantId);Fe(h,m,k),gt(h,k,m,s),De(h,()=>m,(L,b)=>{gt(h,L,b,s),ht(u.root,a,s)})}if(l.length>0){u.cta.disabled=!0;let m=u.cta.querySelector("[data-cta-label]");m&&(m.textContent=(c.itemsOutOfStock||"__COUNT__ items out of stock").split("__COUNT__").join(String(l.length)))}else u.cta.addEventListener("click",()=>{r(sn(a).map(m=>({merchandiseId:"gid://shopify/ProductVariant/"+m.variantId,quantity:m.quantity,attributes:ae(t.id,t.bundleType)})))});e.appendChild(u.root),se(u.root),ht(u.root,a,s),o?.(be(u.root))}function K(e,t){let n=e;for(let r in t)n=n.split("__"+r+"__").join(String(t[r]));return n}function je(e,t){let n=t.needsSpots;if(!n)return"Needs "+e+" spots";let r=new Intl.PluralRules(t.locale||"en").select(e);return K(n[r]||n.other||"__COUNT__",{COUNT:e})}function $e(e,t,n){return K(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function yn(e,t){return e>0?K(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function wn(e,t,n,r){if(e<=0)return r.bundleComplete||"Your bundle is complete";let o=t==="percentage"&&n?Math.round(n):0;return o>0?K(r.chooseMoreUnlock||"Choose __COUNT__ more to unlock __PCT__% off",{COUNT:e,PCT:o}):K(r.chooseMoreComplete||"Choose __COUNT__ more to complete your bundle",{COUNT:e})}var bo={min:1,max:99};function Y(e,t){let n=t["gid://shopify/Product/"+e];return!n||typeof n.min!="number"||typeof n.max!="number"?bo:n}function Ge(e,t){return Y(e,t).min}function te(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].quantity||1;return t}function ue(e,t){for(let n=0;n<e.length;n++)if(e[n]&&e[n].variantId===t)return n;return-1}function _n(e,t){let n=ue(e,t);return n===-1?0:e[n].quantity||0}function Cn(e,t){return e.min<=t}function kn(e,t,n,r=0,o=0){let i=Math.min(e.max-o,r+t);return typeof n=="number"?Math.min(i,n):i}var Sn=[120,180,240],vt=[480,600,768,1024],Tn="60px",En="(max-width: 767px) 45vw, 228px";function _e(e,t){return e&&(/[?&]width=\d+/.test(e)?e.replace(/([?&])width=\d+/,"$1width="+t):e+(e.indexOf("?")===-1?"?":"&")+"width="+t)}function Ee(e,t){return e?t.map(n=>_e(e,n)+" "+n+"w").join(", "):""}function Ke(e,t){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Ce(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():""}var An=600;function Ye(e,t,n){let{t:r,rulesMap:o,capacity:i,formatMoney:a}=n,l=Y(e.id,o),d=document.createElement("div");d.className="lb-mix-match__modal-product",e.available||(d.className+=" lb-mix-match__modal-product--sold-out"),d.setAttribute("data-product-item",""),d.setAttribute("data-title",Ce(e.title)),d.setAttribute("data-type",e.type||"");let s=!1,c=!1,u=document.createElement("div");u.className="lb-mix-match__modal-product-thumb";let m=document.createElement("span");m.className="lb-mix-match__modal-added-badge",m.textContent=r.addedItem||"Added",m.hidden=!0,u.appendChild(m);let f=e.variants.find(v=>v.available)??null,h=f&&f.image||e.featuredImage;if(h){let v=document.createElement("img");v.src=_e(h,An),v.srcset=Ee(h,vt),v.sizes=En,v.alt=e.title,v.loading="lazy",u.appendChild(v)}d.appendChild(u);let k=document.createElement("div");k.className="lb-mix-match__modal-product-info";let L=document.createElement("p");if(L.className="lb-mix-match__modal-product-title",e.url){let v=document.createElement("a");v.href=e.url,v.target="_blank",v.rel="noopener noreferrer",v.textContent=e.title,L.appendChild(v)}else L.textContent=e.title;k.appendChild(L);let b=f??(e.variants.length>0?e.variants[0]:null),N=b?l.min:1,O=document.createElement("p");O.className="lb-mix-match__modal-product-price",O.setAttribute("data-row-price","");let T=document.createElement("span");T.setAttribute("data-row-price-sale",""),b&&(T.textContent=a(b.price*N)),O.appendChild(T);let p=document.createElement("s");p.className="lb-mix-match__modal-product-compare",p.setAttribute("data-row-compare",""),O.appendChild(p),k.appendChild(O);function w(v,I,z){let _=I&&I.compareAtPrice?I.compareAtPrice*z:0,y=I?I.price*z:0;_>y?(v.textContent=a(_),v.hidden=!1):(v.textContent="",v.hidden=!0)}w(p,b,N);let E=document.createElement("p");E.className="lb-mix-match__modal-product-unit-price lb-bundle-product-unit-price",E.setAttribute("data-row-unit-price","");let g=b?b.unitPrice:null;g?E.textContent=g:E.hidden=!0,k.appendChild(E);let U=null,F=null,D=l.min,Z=l.max,J=null,ne=null;if(e.available&&n.showQtySelector){U=document.createElement("div"),U.className="lb-bundle-variant-option-group lb-mix-match__qty-stepper-group";let v=document.createElement("div");v.className="lb-mix-match__qty-stepper",v.setAttribute("role","group"),v.setAttribute("aria-label",r.quantity||"Quantity");let I=document.createElement("button");I.type="button",I.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--minus",I.setAttribute("aria-label",r.decreaseQuantity||"Decrease quantity"),I.textContent="\u2212",F=document.createElement("span"),F.className="lb-mix-match__qty-stepper-value",F.setAttribute("data-row-qty",""),F.setAttribute("aria-live","polite"),F.textContent=String(l.min);let z=document.createElement("button");z.type="button",z.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--plus",z.setAttribute("aria-label",r.increaseQuantity||"Increase quantity"),z.textContent="+",v.appendChild(I),v.appendChild(F),v.appendChild(z),U.appendChild(v);let _=F;J=()=>{_.textContent=String(D),_.setAttribute("data-qty",String(D)),I.disabled=c||D<=l.min,z.disabled=c||D>=Z},ne=(P,M=0)=>{let S=P?P.id:null,R=S===null?0:i.ownQty(S),H=S===null?0:i.productUnitsElsewhere(e.id,S),V=S===null?0:i.swapUnits(e.id,S),$=P?P.inventoryQuantity:null,X=Math.max(0,M-R),pe=typeof $=="number"?Math.max(0,$-X):void 0;Z=V>0?typeof pe=="number"?Math.min(V,pe):V:kn(l,i.remainingSpots(),pe,R,H),Z<l.min?D=l.min:(D>Z&&(D=Z),D<l.min&&(D=l.min)),J()};let y=()=>{b&&i.commitQty(b.id,D)&&n.onCommittedQtyChanged()};I.addEventListener("click",()=>{D>l.min&&(D-=1),J(),y()}),z.addEventListener("click",()=>{D<Z&&(D+=1),J(),y()}),b?ne(b):J()}let W=e.variants.slice(),j=[];if(W.length>1){let v=e.optionNames||[];b=W.find(S=>S.available!==!1)??W[0];let I=()=>{let S=j.map(R=>R.value);for(let R of W)if(!(!R.options||R.options.length!==S.length)&&R.options.every((H,V)=>H===S[V]))return R;return null},z=S=>{if(!(!S||!S.options))for(let R=0;R<j.length&&R<S.options.length;R++)j[R].value!==S.options[R]&&(j[R].value=S.options[R])},_=(S,R,H)=>{for(let V of W){if(V.available===!1||!V.options||V.options[S]!==R)continue;let $=!0;for(let X=0;X<V.options.length;X++)if(X!==S&&V.options[X]!==H[X]){$=!1;break}if($)return!0}return!1},y=S=>{for(let R=0;R<j.length;R++){let H=j[R];for(let V=0;V<H.options.length;V++)H.options[V].disabled=!_(R,H.options[V].value,S)}},P=()=>{let S=I();if(!S){z(b),b?.options&&y(b.options);return}b=S,d.setAttribute("data-selected-variant-id",String(S.id));let R=l.min;T.textContent=a(S.price*R),w(p,S,R),S.unitPrice?(E.textContent=S.unitPrice,E.hidden=!1):(E.textContent="",E.hidden=!0);let H=u.querySelector("img"),V=S.image||e.featuredImage;H&&V&&(H.src=_e(V,An),H.srcset=Ee(V,vt)),ne?.(S,i.variantUnitsElsewhere(S.id)),S.options&&y(S.options),A()},M=document.createElement("div");M.className="lb-bundle-variant-option-groups";for(let S=0;S<v.length;S++){let R=v[S],H=document.createElement("div");H.className="lb-bundle-variant-option-group";let V=document.createElement("span");V.className="lb-bundle-variant-option-label",V.textContent=R,H.appendChild(V);let $=document.createElement("select");$.className="lb-mix-match__variant-select",$.setAttribute("data-variant-option",""),$.setAttribute("data-option-position",String(S+1)),$.name="lb-variant-"+e.id+"-"+(S+1),$.setAttribute("aria-label",R);let X=Object.create(null),pe=b?.options?.[S];for(let Te of W){let ce=Te.options&&Te.options[S];if(!ce||X[ce])continue;X[ce]=!0;let me=document.createElement("option");me.value=ce,me.textContent=ce,ce===pe&&(me.selected=!0),$.appendChild(me)}$.addEventListener("change",P),j.push($),H.appendChild($),M.appendChild(H)}k.appendChild(M),b&&(d.setAttribute("data-selected-variant-id",String(b.id)),b.options&&y(b.options))}else if(W.length===1&&W[0].title!=="Default Title"){let v=document.createElement("span");v.className="lb-mix-match__filled-variant",v.textContent=W[0].title,k.appendChild(v)}let B=null;e.available&&(B=document.createElement("span"),B.className="lb-mix-match__modal-needs-spots",B.hidden=!0,k.appendChild(B));let C=null;if(e.available){let v=document.createElement("div");v.className="lb-mix-match__modal-product-actions",U&&v.appendChild(U),C=document.createElement("button"),C.type="button",C.className="lb-mix-match__modal-add",C.textContent=r.addItem||"Add",C.setAttribute("aria-label",(r.addItem||"Add")+" "+e.title),C.setAttribute("data-add-product",String(t)),v.appendChild(C),k.appendChild(v)}else{let v=document.createElement("span");v.className="lb-mix-match__modal-sold-out-label",v.textContent=r.soldOut||"Sold out",d.setAttribute("aria-disabled","true"),k.appendChild(v)}d.appendChild(k);let x=b?b.id:null;function A(){if(!b)return;let v=b,I=v.inventoryQuantity,z=typeof I=="number"?i.variantUnitsElsewhere(v.id):0,_=i.isInBundle(v.id);if(ne){let R=i.ownQty(v.id);R>0?D=R:x!==v.id&&(D=l.min),x=v.id,ne(v,z)}let P=i.swapUnits(e.id,v.id)>=l.min,M=i.remainingSpots(),S=!_&&!P&&!Cn(l,M);if(B&&(S&&M>0?(B.textContent=je(l.min,r),B.hidden=!1):B.hidden=!0),C)if(_)C.disabled=!1,i.canRemove(v.id)?(C.textContent=r.removeItem||"Remove",C.setAttribute("aria-label",(r.removeItem||"Remove")+" "+e.title),C.classList.remove("lb-mix-match__modal-add--required")):(C.disabled=!0,C.textContent=r.required||"Required",C.setAttribute("aria-label",e.title+" is required and cannot be removed"),C.classList.add("lb-mix-match__modal-add--required")),C.classList.add("lb-mix-match__modal-add--added"),d.classList.add("lb-mix-match__modal-product--in-bundle"),m.hidden=!1;else{let R=r.swapItem||"Swap",H=P?R:r.addItem||"Add";C.textContent=H,C.setAttribute("aria-label",H+" "+e.title),C.classList.remove("lb-mix-match__modal-add--added"),C.classList.remove("lb-mix-match__modal-add--required"),d.classList.remove("lb-mix-match__modal-product--in-bundle"),m.hidden=!0;let V=typeof I=="number"?Math.max(0,I-z)<l.min:!1;if(P)C.disabled=V;else{let $=l.max-i.productUnitsElsewhere(e.id,v.id)<l.min;C.disabled=V||$||S||i.isFull()}}s=!e.available,c=!e.available||!_&&!!C?.disabled,J?.();for(let R of j)R.disabled=s}return{el:d,refresh:A}}var ho='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';function Je(e){let t=e.querySelectorAll(ho),n=[];for(let r=0;r<t.length;r++)t[r].offsetParent!==null&&n.push(t[r]);return n}var yt=0,Ae=0;function Xe(){if(Ae++,Ae>1)return;yt=window.pageYOffset||document.documentElement.scrollTop;let e=document.body;e.style.position="fixed",e.style.top="-"+yt+"px",e.style.left="0",e.style.right="0",e.style.overflow="hidden"}function Ze(){if(Ae<=0||(Ae--,Ae>0))return;let e=document.body;e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.overflow="",window.scrollTo(0,yt)}var Ie="__all__",fo=300,go=200;function In(e){let{container:t,data:n,t:r,eligibleProducts:o,items:i}=e,a=t.querySelector("[data-modal-overlay]");a&&e.portalTarget&&e.portalTarget.appendChild(a);let l=x=>a?a.querySelector(x):null,d=l('[role="dialog"]'),s=l("[data-modal-search]"),c=l("[data-modal-search-clear]"),u=l("[data-modal-list]"),m=l("[data-modal-empty]"),f=l("[data-modal-live]"),h=l("[data-modal-close]"),k=l("[data-modal-done]"),L=l("[data-modal-footer-count]"),b=l("[data-modal-subtitle]"),N=l("[data-modal-filters]"),O=n.showTypeFilters!==!1,T=Ie,p=!1,w=!1,E=!1,g=[];function U(){for(let x of g)x.refresh()}function F(){let x=Math.min(te(i),e.requiredQty),A=Math.max(0,e.requiredQty-x);L&&(L.textContent=$e(x,e.requiredQty,r)),b&&(b.textContent=wn(A,n.discountType,n.discountValue,r))}function D(){U(),F()}function Z(){if(u){e.dropdown?.unbindAll(u),u.innerHTML="",g=[];for(let x=0;x<o.length;x++){let A=Ye(o[x],x,{t:r,rulesMap:e.rulesMap,showQtySelector:e.showQtySelector,capacity:e.rowCapacity,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),D()}});g.push(A),u.appendChild(A.el)}e.dropdown?.bindAll(u),u.addEventListener("click",J)}}function J(x){let A=x.target.closest("[data-add-product]");if(!A||A.disabled)return;let v=parseInt(A.getAttribute("data-add-product")??"",10),I=o[v];if(!I)return;let z=A.closest(".lb-mix-match__modal-product"),_=z&&z.getAttribute("data-selected-variant-id"),y=(_?I.variants.find(H=>H.id===parseInt(_,10)):null)??null;if(y||(y=I.variants.find(H=>H.available)??null),!y)return;if(e.isInBundle(y.id)){e.removeVariant(y.id),D();return}let P=z?.querySelector("[data-row-qty]"),M=P?Math.max(1,parseInt(P.getAttribute("data-qty")||P.textContent||"",10)||1):Ge(I.id,e.rulesMap),S={productId:I.id,variantId:y.id,title:I.title,url:I.url||null,variantTitle:y.title,featuredImage:y.image||I.featuredImage||null,price:y.price,compareAtPrice:y.compareAtPrice||null,unitPrice:y.unitPrice||null,quantity:M},R=e.swapUnitsFor(I.id,y.id);if(R>0){e.swapVariant(S,Math.min(M,R)),D();return}e.atCapacity()||(e.addSelection(S),D())}function ne(){if(!N||!O)return;let x=[],A=Object.create(null);for(let v of o){let I=(v.type||"").trim();I&&!A[I]&&(A[I]=!0,x.push(I))}if(x.length<2){N.style.display="none",d?.classList.add("lb-mix-match__modal--filters-hidden");return}N.innerHTML="";for(let v of[Ie,...x]){let I=document.createElement("button");I.type="button",I.className="lb-mix-match__filter",I.setAttribute("data-filter",v),I.setAttribute("aria-pressed",v===T?"true":"false"),v===T&&I.classList.add("lb-mix-match__filter--active"),I.textContent=v===Ie?r.allTypes||"All":v,I.addEventListener("click",()=>{T=v,W(),j(s?s.value:"")}),N.appendChild(I)}}function W(){if(!N)return;let x=N.querySelectorAll("[data-filter]");for(let A=0;A<x.length;A++){let v=x[A].getAttribute("data-filter")===T;x[A].classList.toggle("lb-mix-match__filter--active",v),x[A].setAttribute("aria-pressed",v?"true":"false")}}function j(x){if(!u)return;let A=Ce(x),v=u.querySelectorAll("[data-product-item]"),I=0;for(let z=0;z<v.length;z++){let _=v[z].getAttribute("data-title")??"",y=v[z].getAttribute("data-type")||"",P=(!A||_.indexOf(A)!==-1)&&(T===Ie||y===T);v[z].classList.toggle("lb-hidden",!P),P&&I++}m&&(m.style.display=I===0&&A.length>0?"":"none"),c&&(c.style.display=x.length>0?"":"none"),f&&(f.textContent=K(r.nProductsShown||"__COUNT__ products shown",{COUNT:I}))}if(s){let x=Ke(()=>j(s.value),go);s.addEventListener("input",x)}c&&c.addEventListener("click",()=>{s&&(s.value="",j(""),s.focus())});function B(){!a||E||(E=!0,p||(Z(),p=!0),w||(ne(),w=!0),D(),T=Ie,W(),s&&(s.value=""),j(s?s.value:""),a.style.display="",a.offsetHeight,a.classList.add("lb-mix-match__modal-overlay--open"),Xe(),setTimeout(()=>{s?s.focus():d?.focus()},50))}function C(){if(!a||!E)return;E=!1,a.classList.remove("lb-mix-match__modal-overlay--open"),Ze(),setTimeout(()=>{E||(a.style.display="none")},fo);let x=e.fallbackFocus;x&&typeof x.focus=="function"&&setTimeout(()=>x.focus(),0)}if(h?.addEventListener("click",C),k?.addEventListener("click",C),a){let x=null;a.addEventListener("mousedown",A=>{x=A.target}),a.addEventListener("mouseup",A=>{A.target===a&&x===a&&C(),x=null})}return document.addEventListener("keydown",x=>{if(E){if(x.key==="Escape"){x.preventDefault(),C();return}if(x.key==="Tab"&&d){let A=Je(d);if(A.length===0){x.preventDefault();return}let v=A[0],I=A[A.length-1];x.shiftKey&&document.activeElement===v?(x.preventDefault(),I.focus()):!x.shiftKey&&document.activeElement===I&&(x.preventDefault(),v.focus())}}}),{open:B,close:C,isOpen:()=>E,refresh:D,overlay:a}}function Mn(e,t){return Math.max(0,t-te(e))}function wt(e,t){return te(e)>=t}function Ln(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].variantId===t&&(n+=e[r].quantity||0);return n}function et(e,t,n){let r=0;for(let o=0;o<e.length;o++){let i=e[o];i&&i.productId===t&&i.variantId!==n&&(r+=i.quantity||0)}return r}function ke(e,t,n){let r=Y(t.productId,n);if(!r.required)return!0;let o=0;for(let i=0;i<e.length;i++){let a=e[i];a!==t&&a.productId===t.productId&&(o+=a.quantity||1)}return o>=r.min}function _t(e,t,n,r){let o=Y(t,r);return!o.required||o.max!==o.min||ue(e,n)!==-1?0:et(e,t,n)}function xo(){let e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","16"),t.setAttribute("height","16"),t.setAttribute("viewBox","0 0 20 20"),t.setAttribute("fill","none");for(let[n,r,o,i]of[["5","5","15","15"],["15","5","5","15"]]){let a=document.createElementNS(e,"line");a.setAttribute("x1",n),a.setAttribute("y1",r),a.setAttribute("x2",o),a.setAttribute("y2",i),a.setAttribute("stroke","currentColor"),a.setAttribute("stroke-width","2"),a.setAttribute("stroke-linecap","round"),t.appendChild(a)}return t}function tt(e,t,n,r,o,i){let a=document.createElement("div");a.className="lb-mix-match__slot lb-mix-match__slot--filled";let l=document.createElement("div");if(l.className="lb-bundle-thumbnail",e.featuredImage){let h=document.createElement("img");h.src=_e(e.featuredImage,240),h.srcset=Ee(e.featuredImage,Sn),h.sizes=Tn,h.alt=e.title,h.loading="lazy",l.appendChild(h)}a.appendChild(l);let d=document.createElement("div");d.className="lb-mix-match__filled-info";let s=document.createElement("button");if(s.type="button",s.className="lb-mix-match__filled-title",s.textContent=e.title,s.setAttribute("aria-label",(t.editSelection||"Edit selection")+": "+e.title),d.appendChild(s),e.variantTitle&&e.variantTitle!=="Default Title"){let h=document.createElement("span");h.className="lb-mix-match__filled-variant",h.textContent=e.variantTitle,d.appendChild(h)}let c=document.createElement("span");c.className="lb-mix-match__filled-price";let u=e.compareAtPrice||0;if(u>e.price){let h=document.createElement("s");h.className="lb-mix-match__filled-compare",h.textContent=n(u),c.appendChild(h)}let m=document.createElement("span");m.className="lb-bundle-product-price",m.textContent=n(e.price),c.appendChild(m);let f=document.createElement("span");if(f.className="lb-bundle-qty-inline",f.textContent="\xD7"+(e.quantity||1),c.appendChild(f),d.appendChild(c),e.unitPrice){let h=document.createElement("span");h.className="lb-bundle-product-unit-price",h.textContent=e.unitPrice,d.appendChild(h)}if(a.appendChild(d),r){let h=document.createElement("button");h.type="button",h.className="lb-mix-match__slot-remove",h.setAttribute("aria-label",(t.removeItem||"Remove")+" "+e.title),h.appendChild(xo()),h.addEventListener("click",k=>{k.stopPropagation(),o()}),a.appendChild(h)}else{let h=document.createElement("span");h.className="lb-mix-match__slot-required",h.textContent=t.required||"Required",a.appendChild(h)}return a.addEventListener("click",i),a}function Pn(e,t,n,r,o){let i=r.translations||{},a=e.querySelector("[data-selection-slots]");if(a){a.innerHTML="";for(let s=0;s<t.length;s++){let c=s;a.appendChild(tt(t[c],i,o.formatMoney,ke(t,t[c],o.rulesMap),()=>o.onRemove(c),o.onEdit))}}let l=e.querySelector("[data-add-product-trigger]");l&&(l.style.display=te(t)>=n?"none":"");let d=e.querySelector("[data-add-bundle]");if(d){d.disabled=te(t)<n;let s=d.querySelector("[data-cta-label]");s&&(s.textContent=d.getAttribute("data-cta-text")||i.addToCart||"Add to cart")}}function Bn(e,t,n,r,o,i){let a=e.querySelector("[data-pricing-section]");if(te(t)<n){a&&(a.style.display="none");return}a&&(a.style.display="");let l=0;for(let d=0;d<t.length;d++)l+=t[d].price*(t[d].quantity||1);l>0&&r.discountType&&i(e,o(l,r.discountType,r.discountValue??0),l)}function qn(e,t,n,r,o){let i=Math.min(te(n),r),a=Math.max(0,r-i),l=[e];t&&l.push(t);for(let d of l){let s=d.querySelectorAll("[data-progress-segment]");for(let f=0;f<s.length;f++)s[f].classList.toggle("lb-mix-match__progress-segment--filled",f<i);let c=d.querySelector("[data-progress-count]");c&&(c.textContent=$e(i,r,o));let u=d.querySelector("[data-progress-remaining]");u&&(u.textContent=yn(a,o));let m=d.querySelector(".lb-mix-match__progress-segments");m&&m.setAttribute("aria-valuenow",String(i))}}function nt(e){return(t,n,r)=>{let o=t.querySelector("[data-sale-price]"),i=t.querySelector("[data-compare-price]"),a=t.querySelector("[data-savings-bar]"),l=t.querySelector("[data-savings-amount]"),d=t.querySelector("[data-savings-percent]"),s=r-n;if(o&&(o.textContent=e(n)),i&&(s>0?(i.textContent=e(r),i.style.display=""):i.style.display="none"),a)if(s>0){if(l&&(l.textContent=e(s)),d){let c=r>0?Math.round(s*100/r):0;d.textContent="("+c+"%)"}a.style.display=""}else a.style.display="none"}}function Nn(e,t,n,r){let o=c=>c.variants.find(u=>u.available)??null,i=(c,u,m)=>({productId:c.id,variantId:u.id,title:c.title,url:c.url||null,variantTitle:u.title,featuredImage:c.featuredImage||null,price:u.price,compareAtPrice:u.compareAtPrice||null,unitPrice:u.unitPrice||null,quantity:m}),a=[];for(let c of e){let u=Y(c.id,t);if(!u.required||!c.available||!c.variants)continue;let m=o(c);m&&a.push(i(c,m,Math.max(1,u.min)))}if(a.length||!r?.enabled)return a;let l=c=>c.available&&Y(c.id,t).min<=n,d=(r.currentProductId!=null?e.find(c=>c.id===r.currentProductId&&l(c)):null)??e.find(l);if(!d)return[];let s=o(d);return s?[i(d,s,Y(d.id,t).min)]:[]}function Rn(e){let t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("viewBox","0 0 20 20"),n.setAttribute("fill","none");for(let[r,o,i,a]of e){let l=document.createElementNS(t,"line");l.setAttribute("x1",r),l.setAttribute("y1",o),l.setAttribute("x2",i),l.setAttribute("y2",a),l.setAttribute("stroke","currentColor"),l.setAttribute("stroke-width","2"),l.setAttribute("stroke-linecap","round"),n.appendChild(l)}return n}function Q(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let o in n)r.setAttribute(o,n[o]);return r}function rt(e){let t="lb-modal-title-"+e.domId,n=Q("div","lb-mix-match__modal-overlay",{"data-modal-overlay":"","data-bundle-gid":e.bundleGid,style:"display: none;"}),r=Q("div","lb-mix-match__modal"+(e.showTypeFilters?"":" lb-mix-match__modal--filters-hidden"),{role:"dialog","aria-modal":"true","aria-labelledby":t,tabindex:"-1"}),o=Q("div","lb-mix-match__modal-header"),i=Q("div","lb-mix-match__modal-header-top"),a=Q("div","lb-mix-match__modal-heading"),l=Q("h4","lb-mix-match__modal-title",{id:t});e.wizard&&l.setAttribute("tabindex","-1"),l.textContent="Add to your bundle",a.appendChild(l),a.appendChild(Q("p","lb-mix-match__modal-subtitle",{"data-modal-subtitle":""})),i.appendChild(a);let d=Q("button","lb-mix-match__modal-close",{type:"button","data-modal-close":"","aria-label":"Close"});d.appendChild(Rn([["5","5","15","15"],["15","5","5","15"]])),i.appendChild(d),o.appendChild(i);let s=Q("div","lb-mix-match__progress lb-mix-match__modal-progress",{"data-progress":""}),c=Q("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e.segmentCount??0)});if(e.wizard)c.setAttribute("data-modal-step-segments","");else for(let k=0;k<(e.segmentCount??0);k++)c.appendChild(Q("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));if(s.appendChild(c),o.appendChild(s),r.appendChild(o),e.showSearch){let k=Q("div","lb-mix-match__modal-search"),L=Q("input","lb-mix-match__modal-search-input",{type:"text","data-modal-search":"",role:"searchbox","aria-label":"Search products",placeholder:"Search products",autocomplete:"off"});k.appendChild(L);let b=Q("button","lb-mix-match__modal-search-clear",{type:"button","data-modal-search-clear":"","aria-label":"Clear search",style:"display: none;"});b.appendChild(Rn([["5","5","15","15"],["15","5","5","15"]])),k.appendChild(b),r.appendChild(k)}e.showTypeFilters&&r.appendChild(Q("div","lb-mix-match__filters",{"data-modal-filters":"",role:"group","aria-label":"Filter by type"})),r.appendChild(Q("div","lb-mix-match__modal-list",{"data-modal-list":""}));let u=Q("div","lb-mix-match__modal-empty",{"data-modal-empty":"",style:"display: none;"}),m=document.createElement("p");m.textContent="No products match your search",u.appendChild(m),r.appendChild(u),r.appendChild(Q("span","lb-visually-hidden",{"data-modal-live":"","aria-live":"polite"}));let f=Q("div",e.wizard?"lb-mix-match__modal-footer lb-multi-step__modal-footer":"lb-mix-match__modal-footer");if(e.wizard){let k=Q("button","lb-multi-step__modal-back",{type:"button","data-modal-back":"",style:"display: none;"});k.textContent="Back",f.appendChild(k)}if(f.appendChild(Q("span","lb-mix-match__modal-footer-count",{"data-modal-footer-count":"","aria-live":"polite"})),e.wizard){let k=Q("button","lb-mix-match__modal-done",{type:"button","data-modal-next":"",style:"display: none;"});k.textContent="Next",f.appendChild(k)}let h=Q("button","lb-mix-match__modal-done",{type:"button","data-modal-done":"",...e.wizard?{style:"display: none;"}:{}});return h.textContent="Done",f.appendChild(h),r.appendChild(f),n.appendChild(r),n}function On(e,t,n,r,o){let i=t.widgetConfig,a=de,l=t.minQuantity||1,d=t.productRules??{},c=He(t).map(p=>({id:Number(p.productId),title:p.title??"",url:p.url??null,type:"",featuredImage:p.featuredImage??null,available:p.variants.some(w=>w.available),optionNames:p.optionNames,variants:p.variants.map(w=>({id:Number(w.id),title:w.title,options:w.options,available:w.available,price:w.price,compareAtPrice:w.compareAtPrice,unitPrice:w.unitPrice,image:w.image,inventoryQuantity:null}))}));if(!c.length)return;let u=c.filter(p=>p.available).length;if(n==="hide"&&u===0)return;let m=ie(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),f=le("lb-mix-match",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});f.root.setAttribute("data-required-quantity",String(l)),f.products.before(ze(l));let h=document.createElement("div");h.className="lb-mix-match__slots lb-edge-fade",h.setAttribute("data-selection-slots",""),f.products.replaceWith(h);let k=document.createElement("button");k.type="button",k.className="lb-mix-match__add-product",k.setAttribute("data-add-product-trigger",""),k.textContent=(a.addItem,"Add a product"),h.after(k);let L=rt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:!0,showTypeFilters:!1,segmentCount:l,wizard:!1});f.root.appendChild(L);let b=Nn(c,d,l),N={remainingSpots:()=>Mn(b,l),ownQty:p=>_n(b,p),variantUnitsElsewhere:p=>Ln(b,p),productUnitsElsewhere:(p,w)=>et(b,p,w),swapUnits:(p,w)=>_t(b,p,w,d),isInBundle:p=>ue(b,p)!==-1,canRemove:p=>{let w=ue(b,p);return w!==-1&&ke(b,b[w],d)},isFull:()=>wt(b,l),commitQty:(p,w)=>{let E=ue(b,p);return E===-1||b[E].quantity===w?!1:(b[E].quantity=w,!0)}};function O(){Pn(f.root,b,l,t,{formatMoney:m,rulesMap:d,onRemove:p=>{ke(b,b[p],d)&&(b.splice(p,1),O(),T.isOpen()&&T.refresh())},onEdit:()=>T.open()}),Bn(f.root,b,l,t,(p,w,E)=>Re(p,w,E),nt(m)),qn(f.root,T.overlay,b,l,a)}let T=In({container:f.root,data:{translations:a,discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},t:a,rulesMap:d,eligibleProducts:c,requiredQty:l,showQtySelector:!0,items:b,formatMoney:m,rowCapacity:N,dropdown:void 0,portalTarget:null,fallbackFocus:k,onSelectionChanged:O,addSelection:p=>{if(te(b)+(p.quantity||1)>l)return;let w=Y(p.productId,d).max-et(b,p.productId,p.variantId);(p.quantity||1)>w||(b.push(p),O())},removeVariant:p=>{let w=ue(b,p);w===-1||!ke(b,b[w],d)||(b.splice(w,1),O())},swapVariant:(p,w)=>{let E=0;for(let g=b.length-1;g>=0&&E<w;g--){let U=b[g];if(U.productId!==p.productId||U.variantId===p.variantId)continue;let F=Math.min(U.quantity||1,w-E);F>=(U.quantity||1)?b.splice(g,1):U.quantity=(U.quantity||1)-F,E+=F}E>0&&(p.quantity=E,b.push(p),O())},swapUnitsFor:(p,w)=>_t(b,p,w,d),isInBundle:p=>ue(b,p)!==-1,atCapacity:()=>wt(b,l)});k.addEventListener("click",()=>{T.isOpen()||T.open()}),f.cta.addEventListener("click",()=>{te(b)<l||r(b.map(p=>({merchandiseId:"gid://shopify/ProductVariant/"+p.variantId,quantity:p.quantity||1,attributes:ae(t.id,t.bundleType)})))}),e.appendChild(f.root),se(f.root),O(),o?.(be(f.root))}function vo(e,t,n){if(t==="fixed_amount"){let o=parseInt(n.getAttribute("data-tier-amt")??"",10)||0;return Math.max(0,e-o)}let r=parseInt(n.getAttribute("data-tier-pct")??"",10)||0;return Math.max(0,e-Math.floor(e*r/100))}function yo(e,t,n){let r=parseInt(n.getAttribute("data-tier-qty")??"",10),o=vo(e,t,n),i=o*r,a=e*r;return{qty:r,priceEach:o,totalPrice:i,undiscountedTotal:a,totalSavings:a-i}}function wo(e,t){if(!t.itemCount)return null;let n=new Intl.PluralRules(t.locale||"en").select(e);return" ("+(t.itemCount[n]||t.itemCount.other||"__COUNT__").split("__COUNT__").join(String(e))+")"}function Hn(e,t,n,r,o,i,a){for(let b=0;b<t.length;b++)t[b].setAttribute("aria-checked",b===o?"true":"false"),t[b].setAttribute("tabindex",b===o?"0":"-1");let{qty:l,totalPrice:d,undiscountedTotal:s,totalSavings:c}=yo(n,r,t[o]),u=e.querySelector("[data-item-count]");if(u){let b=wo(l,i);b!==null&&(u.textContent=b)}let m=e.querySelector("[data-total-price]");m&&(m.textContent=a(d));let f=e.querySelector("[data-compare-price]");f&&(c>0?(f.textContent=a(s),f.style.display=""):f.style.display="none");let h=e.querySelector("[data-savings-bar]"),k=e.querySelector("[data-savings-amount]"),L=e.querySelector("[data-savings-percent]");if(h)if(c>0){if(k&&(k.textContent=a(c)),L){let b=s>0?Math.round(c*100/s):0;L.textContent="("+b+"%)"}h.style.display=""}else h.style.display="none"}function Dn(e,t,n,r){let o=t.widgetConfig,i=t.products[0];if(!i)return;let a=i.variants.nodes,l=a.find(p=>p.availableForSale)??a[0];if(!l)return;let d=a.some(p=>p.availableForSale);if(n==="hide"&&!d)return;let s=Oe(l.price.amount),c=t.discountConfig.discountType,u=ie(i.priceRange.minVariantPrice.currencyCode),m=de,f=o.popularBadge?.visible?Math.floor((t.volumeTiers.length-1)/2):-1,h=0,k=t.volumeTiers.map((p,w)=>{let E=c==="fixed_amount"?0:Math.round(p.percentage??0),g=c==="fixed_amount"?Math.round((p.amount??0)*100):0,U=c==="fixed_amount"?Math.max(0,s-g):Math.max(0,s-Math.floor(s*E/100)),F=s>0?Math.round((s-U)*100/s):0;return{quantity:p.minQuantity,percent:E,amountCents:g,label:K(m.buyQty||"Buy __COUNT__",{COUNT:p.minQuantity}),savingsLabel:F>0?"Save "+F+"%":null,badgeLabel:w===f?o.popularBadge?.text||"Most popular":null,selected:w===h}});if(!k.length)return;let L=le("lb-volume",{title:t.title,subtitle:t.description,summaryLabel:"Total",withItemCount:!0,totalPriceSlot:!0,showSavingsBar:o.savingsBar?.visible!==!1,showComparePrice:o.pricing?.showCompareAtPrice!==!1,ctaText:o.cta?.ctaText||m.addToCart||"Add to cart",endsAt:o.countdown?.showCountdown===!1?null:t.endsAt}),b=dn(k,"Select quantity");L.products.replaceWith(b);let N=b.querySelectorAll("[data-tier-index]"),O=h,T=()=>Hn(L.root,N,s,c,O,m,u);if(b.addEventListener("click",p=>{let w=p.target.closest("[data-tier-index]");w&&(O=parseInt(w.getAttribute("data-tier-index")??"",10)||0,T())}),b.addEventListener("keydown",p=>{p.key==="ArrowDown"||p.key==="ArrowRight"?(p.preventDefault(),O=Math.min(O+1,N.length-1),T(),N[O].focus()):(p.key==="ArrowUp"||p.key==="ArrowLeft")&&(p.preventDefault(),O=Math.max(O-1,0),T(),N[O].focus())}),d)L.cta.addEventListener("click",()=>{let p=parseInt(N[O].getAttribute("data-tier-qty")??"",10);r([{merchandiseId:l.id,quantity:p,attributes:ae(t.id,t.bundleType)}])});else{L.cta.disabled=!0;let p=L.cta.querySelector("[data-cta-label]");p&&(p.textContent=m.outOfStock||"Out of stock")}e.appendChild(L.root),se(L.root),T()}function ot(e,t){return e-Math.floor(e*t/100)}function _o(e,t,n,r){let o=G(e[0],e[0].selectedVariantId),i=G(e[1],e[1].selectedVariantId),a=o.price*n+i.price*r,l=o.price*n+ot(i.price,t)*r;return{totalPrice:a,salePrice:l,savings:a-l}}function Ct(e,t,n,r,o){let i=e.querySelector("[data-product-price]"),a=e.querySelector("[data-product-compare-price]");if(i){if(r&&n>0){i.textContent=o(ot(t.price,n)),a&&(a.textContent=o(t.price),a.hidden=!1);return}if(i.textContent=o(t.price),a){let l=t.compareAtPrice;l&&l>t.price?(a.textContent=o(l),a.hidden=!1):(a.textContent="",a.hidden=!0)}}}function kt(e,t,n,r,o,i){let{totalPrice:a,salePrice:l,savings:d}=_o(t,n,r,o),s=e.querySelector("[data-sale-price]"),c=e.querySelector("[data-compare-price]"),u=e.querySelector("[data-savings-bar]"),m=e.querySelector("[data-savings-amount]"),f=e.querySelector("[data-savings-percent]");if(s&&(s.textContent=i(l)),c&&(d>0?(c.textContent=i(a),c.style.display=""):c.style.display="none"),u)if(d>0){if(m&&(m.textContent=i(d)),f){let h=a>0?Math.round(d*100/a):0;f.textContent="("+h+"%)"}u.style.display=""}else u.style.display="none"}function Fn(e,t,n,r){let o=G(e[0],e[0].selectedVariantId),i=G(e[1],e[1].selectedVariantId),a={variantId:Number(e[0].selectedVariantId),quantity:n,priceCents:(o.price||0)*n},l=ot(i.price||0,t)*r;return String(e[0].selectedVariantId)===String(e[1].selectedVariantId)?[{variantId:a.variantId,quantity:n+r,priceCents:(a.priceCents??0)+l}]:[a,{variantId:Number(e[1].selectedVariantId),quantity:r,priceCents:l}]}function Vn(e,t,n,r,o){let i=t.widgetConfig,a=t.products.find(N=>N.id===t.buyProductId),l=t.products.find(N=>N.id===t.getProductId);if(!a||!l)return;let d=t.buyQuantity,s=t.getQuantity,c=t.discountConfig.discountValue,u={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},m=[{...ye(a,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[0]??null}),role:"buy"},{...ye(l,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[1]??null}),role:"get"}],f=m.filter(N=>!N.variants.some(O=>O.available)).length;if(n==="hide"&&f>0)return;let h=ie(a.priceRange.minVariantPrice.currencyCode),k=de,L=le("lb-bogo",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||k.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});L.root.setAttribute("data-discount-value",String(c)),L.root.setAttribute("data-buy-qty",String(d)),L.root.setAttribute("data-get-qty",String(s));let b=c>=100?"Free":c+"% off";if(m.forEach((N,O)=>{let T=O===1,p=!N.variants.some(g=>g.available),w=Ue(N,k,{isOos:p,href:N.url,bogoRole:N.role,inlineQuantity:T?s:d,badgeText:T&&!p?b:null});if(L.products.appendChild(w),p)return;let E=G(N,N.selectedVariantId);Fe(w,N,E),Ve(w,E,N.featuredImage),Ct(w,E,c,T,h),De(w,()=>N,g=>{Ve(w,g,N.featuredImage),Ct(w,g,c,T,h),kt(L.root,m,c,d,s,h)})}),f>0){L.cta.disabled=!0;let N=L.cta.querySelector("[data-cta-label]");N&&(N.textContent=(k.itemsOutOfStock||"__COUNT__ items out of stock").split("__COUNT__").join(String(f)))}else L.cta.addEventListener("click",()=>{r(Fn(m,c,d,s).map(N=>({merchandiseId:"gid://shopify/ProductVariant/"+N.variantId,quantity:N.quantity,attributes:ae(t.id,t.bundleType)})))});e.appendChild(L.root),se(L.root),kt(L.root,m,c,d,s,h),o?.(be(L.root))}function St(e,t,n){return K(n.stepOf||"Step __STEP__ of __TOTAL__",{STEP:e+1,TOTAL:t})}function Me(e,t,n){return K(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function Un(e,t,n){return K(n.stepsCompleted||"__COUNT__ of __TOTAL__ steps completed",{COUNT:e,TOTAL:t})}function zn(e,t){return e>0?K(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function he(e,t){let n=0;for(let r=0;r<e[t].length;r++)n+=e[t][r].quantity||1;return n}function xe(e,t,n){return he(e,n)>=(t[n].minQuantity||1)}function Se(e,t,n){let r=t[n].maxQuantity;return r==null?1/0:Math.max(0,r-he(e,n))}function Le(e,t){for(let n=0;n<t.length;n++)if(!xe(e,t,n))return!1;return!0}function Pe(e,t,n){let r=Y(t.productId,n);if(!r.required)return!0;let o=0;for(let i of e)for(let a of i)a!==t&&a.productId===t.productId&&(o+=a.quantity||1);return o>=r.min}function Tt(e,t,n,r,o){let i=Y(n,o);if(!i.required||i.max!==i.min||ve(e,t,r)!==-1)return 0;let a=0;for(let l of e[t])l.productId===n&&l.variantId!==r&&(a+=l.quantity||1);return a}function ve(e,t,n){for(let r=0;r<e[t].length;r++)if(e[t][r].variantId===n)return r;return-1}function Qn(e){let{container:t,steps:n,selections:r,t:o}=e;for(let i=0;i<n.length;i++){let a=n[i].minQuantity||1,l=t.querySelector('[data-step-count="'+i+'"]');l&&(l.textContent=Me(Math.min(he(r,i),a),a,o),l.classList.toggle("lb-multi-step__group-count--met",xe(r,n,i)));let d=t.querySelector('[data-step-slots="'+i+'"]');if(d){d.innerHTML="";for(let s=0;s<r[i].length;s++){let c=i,u=s,m=r[c][u];d.appendChild(tt(m,o,e.formatMoney,Pe(r,m,e.rulesMap),()=>e.onRemove(c,u),()=>e.onEdit(c)))}}}for(let i=0;i<n.length;i++){let a=t.querySelector('[data-step-trigger="'+i+'"]');a&&(a.style.display=Se(r,n,i)===0?"none":"")}}function Wn(e,t,n,r){let{container:o,steps:i,selections:a}=e,l=o.querySelector("[data-pricing-section]");if(!Le(a,i)){l&&(l.style.display="none");return}l&&(l.style.display="");let d=0;for(let s of a)for(let c of s)d+=c.price*(c.quantity||1);d>0&&t.discountType&&r(o,n(d,t.discountType,t.discountValue??0),d)}function jn(e){let{container:t,steps:n,selections:r,t:o}=e,i=0;for(let u=0;u<n.length;u++)xe(r,n,u)&&(i+=1);let a=n.length-i,l=t.querySelectorAll("[data-progress] [data-progress-segment]");for(let u=0;u<l.length;u++)l[u].classList.toggle("lb-mix-match__progress-segment--filled",u<i);let d=t.querySelector("[data-progress-count]");d&&(d.textContent=Un(i,n.length,o));let s=t.querySelector("[data-progress-remaining]");s&&(s.textContent=zn(a,o));let c=t.querySelector(".lb-mix-match__progress-segments");c&&c.setAttribute("aria-valuenow",String(i))}function $n(e){let t=e.container.querySelector("[data-add-bundle]");if(!t)return;t.disabled=!Le(e.selections,e.steps);let n=t.querySelector("[data-cta-label]");n&&(n.textContent=t.getAttribute("data-cta-text")||e.t.addToCart||"Add to cart")}function Gn(e){let t=Object.create(null),n=[];for(let r of e)for(let o of r){let i=o.quantity||1,a=String(o.variantId);t[a]?(t[a].quantity+=i,t[a].priceCents=(t[a].priceCents??0)+(o.price||0)*i):(t[a]={variantId:o.variantId,quantity:i,priceCents:(o.price||0)*i},n.push(a))}return n.map(r=>t[r])}var Be="__all__",Co=300,ko=200;function Kn(e){let{container:t,steps:n,selections:r,t:o}=e,i=t.querySelector("[data-modal-overlay]");i&&e.portalTarget&&e.portalTarget.appendChild(i);let a=_=>i?i.querySelector(_):null,l=a('[role="dialog"]'),d=a(".lb-mix-match__modal-title"),s=a("[data-modal-search]"),c=a("[data-modal-search-clear]"),u=a("[data-modal-list]"),m=a("[data-modal-empty]"),f=a("[data-modal-live]"),h=a("[data-modal-close]"),k=a("[data-modal-back]"),L=a("[data-modal-next]"),b=a("[data-modal-done]"),N=a("[data-modal-footer-count]"),O=a("[data-modal-subtitle]"),T=a("[data-modal-step-segments]"),p=a("[data-modal-filters]"),w=Be,E=!1,g=0,U=[],F=_=>n[_].eligibleProducts||[],D={remainingSpots:()=>Se(r,n,g),ownQty:_=>{let y=ve(r,g,_);return y===-1?0:r[g][y].quantity||0},variantUnitsElsewhere:_=>{let y=0;for(let P of r)for(let M of P)M.variantId===_&&(y+=M.quantity||0);return y},productUnitsElsewhere:(_,y)=>{let P=0;for(let M=0;M<r.length;M++)for(let S of r[M])S.productId===_&&(M===g&&S.variantId===y||(P+=S.quantity||0));return P},swapUnits:(_,y)=>Tt(r,g,_,y,e.rulesMap),isInBundle:_=>ve(r,g,_)!==-1,canRemove:_=>{let y=ve(r,g,_);return y!==-1&&e.canRemove(r[g][y])},isFull:()=>Se(r,n,g)===0,commitQty:(_,y)=>{let P=ve(r,g,_);return P===-1||r[g][P].quantity===y?!1:(r[g][P].quantity=y,!0)}};function Z(_){if(!T)return;let y=n[_].minQuantity||1;T.innerHTML="",T.setAttribute("aria-valuemax",String(y));for(let P=0;P<y;P++){let M=document.createElement("span");M.className="lb-mix-match__progress-segment",M.setAttribute("data-progress-segment",""),T.appendChild(M)}J()}function J(){if(!T)return;let _=n[g].minQuantity||1,y=Math.min(he(r,g),_),P=T.querySelectorAll("[data-progress-segment]");for(let M=0;M<P.length;M++)P[M].classList.toggle("lb-mix-match__progress-segment--filled",M<y);T.setAttribute("aria-valuenow",String(y))}function ne(){let _=n[g].minQuantity||1,y=Math.min(he(r,g),_);N&&(N.textContent=Me(y,_,o)),O&&(O.textContent=St(g,n.length,o)+" \xB7 "+(n[g].name||""));let P=xe(r,n,g),M=g===n.length-1;k&&(k.style.display=g>0?"":"none"),L&&(L.style.display=M?"none":"",L.disabled=!P),b&&(b.style.display=M?"":"none",b.disabled=!P),J()}function W(){for(let _ of U)_.refresh();ne()}function j(_){if(!u)return;e.dropdown?.unbindAll(u),u.innerHTML="",U=[];let y=F(_);for(let P=0;P<y.length;P++){let M=Ye(y[P],P,{t:o,rulesMap:e.rulesMap,capacity:D,showQtySelector:e.showQtySelector,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),W()}});U.push(M),u.appendChild(M.el)}e.dropdown?.bindAll(u)}function B(_){let y=_.target.closest("[data-add-product]");if(!y||y.disabled)return;let M=F(g)[parseInt(y.getAttribute("data-add-product")??"",10)];if(!M)return;let S=y.closest(".lb-mix-match__modal-product"),R=S&&S.getAttribute("data-selected-variant-id"),H=(R?M.variants.find(me=>me.id===parseInt(R,10)):null)??null;if(H||(H=M.variants.find(me=>me.available)??null),!H)return;let V=ve(r,g,H.id);if(V!==-1){if(!e.canRemove(r[g][V]))return;r[g].splice(V,1),e.onSelectionChanged(),W();return}let $=S?.querySelector("[data-row-qty]"),X=$?Math.max(1,parseInt($.getAttribute("data-qty")||$.textContent||"",10)||1):Ge(M.id,e.rulesMap),pe={productId:M.id,variantId:H.id,title:M.title,url:M.url||null,variantTitle:H.title,featuredImage:H.image||M.featuredImage||null,price:H.price,compareAtPrice:H.compareAtPrice||null,unitPrice:H.unitPrice||null,quantity:X},Te=Tt(r,g,M.id,H.id,e.rulesMap);if(Te>0){e.swapVariant(g,pe,Math.min(X,Te)),W();return}let ce=Se(r,n,g);ce!==1/0&&X>ce||(r[g].push(pe),e.onSelectionChanged(),W())}u&&u.addEventListener("click",B);function C(_){if(!p||!e.showTypeFilters)return;let y=[],P=Object.create(null);for(let M of F(_)){let S=(M.type||"").trim();S&&!P[S]&&(P[S]=!0,y.push(S))}if(y.length<2){p.style.display="none",l?.classList.add("lb-mix-match__modal--filters-hidden");return}p.style.display="",l?.classList.remove("lb-mix-match__modal--filters-hidden"),p.innerHTML="";for(let M of[Be,...y]){let S=document.createElement("button");S.type="button",S.className="lb-mix-match__filter",S.setAttribute("data-filter",M),S.setAttribute("aria-pressed",M===w?"true":"false"),M===w&&S.classList.add("lb-mix-match__filter--active"),S.textContent=M===Be?o.allTypes||"All":M,S.addEventListener("click",()=>{w=M,x(),A(s?s.value:"")}),p.appendChild(S)}}function x(){if(!p)return;let _=p.querySelectorAll("[data-filter]");for(let y=0;y<_.length;y++){let P=_[y].getAttribute("data-filter")===w;_[y].classList.toggle("lb-mix-match__filter--active",P),_[y].setAttribute("aria-pressed",P?"true":"false")}}function A(_){if(!u)return;let y=Ce(_),P=u.querySelectorAll("[data-product-item]"),M=0;for(let S=0;S<P.length;S++){let R=P[S].getAttribute("data-title")??"",H=P[S].getAttribute("data-type")||"",V=(!y||R.indexOf(y)!==-1)&&(w===Be||H===w);P[S].classList.toggle("lb-hidden",!V),V&&M++}m&&(m.style.display=M===0&&y.length>0?"":"none"),c&&(c.style.display=_.length>0?"":"none"),f&&(f.textContent=K(o.nProductsShown||"__COUNT__ products shown",{COUNT:M}))}if(s){let _=Ke(()=>A(s.value),ko);s.addEventListener("input",_)}c&&c.addEventListener("click",()=>{s&&(s.value="",A(""),s.focus())});function v(_,y={}){if(g=Math.max(0,Math.min(n.length-1,_)),j(g),C(g),w=Be,x(),s&&(s.value=""),A(""),Z(g),W(),f){let P=n[g].minQuantity||1;f.textContent=St(g,n.length,o)+". "+(n[g].name||"")+". "+Me(Math.min(he(r,g),P),P,o)}!y.skipFocus&&d&&typeof d.focus=="function"&&d.focus()}function I(_){!i||E||(E=!0,v(typeof _=="number"?_:0,{skipFocus:!0}),i.style.display="",i.offsetHeight,i.classList.add("lb-mix-match__modal-overlay--open"),Xe(),setTimeout(()=>{s?s.focus():l?.focus()},50))}function z(){if(!i||!E)return;E=!1,i.classList.remove("lb-mix-match__modal-overlay--open"),Ze(),setTimeout(()=>{E||(i.style.display="none")},Co);let _=t.querySelector('[data-step-trigger="'+g+'"]'),y=_&&_.offsetParent!==null?_:e.ctaButton;y&&typeof y.focus=="function"&&setTimeout(()=>y.focus(),0)}if(h?.addEventListener("click",z),b?.addEventListener("click",z),k?.addEventListener("click",()=>{g>0&&v(g-1)}),L?.addEventListener("click",()=>{g<n.length-1&&xe(r,n,g)&&v(g+1)}),i){let _=null;i.addEventListener("mousedown",y=>{_=y.target}),i.addEventListener("mouseup",y=>{y.target===i&&_===i&&z(),_=null})}return document.addEventListener("keydown",_=>{if(E){if(_.key==="Escape"){_.preventDefault(),z();return}if(_.key==="Tab"&&l){let y=Je(l);if(y.length===0){_.preventDefault();return}let P=y[0],M=y[y.length-1];_.shiftKey&&document.activeElement===P?(_.preventDefault(),M.focus()):!_.shiftKey&&document.activeElement===M&&(_.preventDefault(),P.focus())}}}),{open:I,close:z,isOpen:()=>E,refresh:W}}function Yn(e,t,n,r,o){let i=t.widgetConfig,a=de,l=t.productRules??{},d=t.steps??[];if(!d.length)return;let s={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},c=d.map((T,p)=>Yt(t,p).map(w=>{let E=ye(w,t.id,{quantities:s,allowedVariantIds:null});return{id:Number(E.productId),title:E.title??"",url:E.url??null,type:w.productType??"",featuredImage:E.featuredImage??null,available:E.variants.some(g=>g.available),optionNames:E.optionNames,variants:E.variants.map(g=>({id:Number(g.id),title:g.title,options:g.options,available:g.available,price:g.price,compareAtPrice:g.compareAtPrice,unitPrice:g.unitPrice,image:g.image,inventoryQuantity:null}))}})),u=c.some(T=>T.some(p=>p.available));if(n==="hide"&&!u)return;let m=ie(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),f=le("lb-multi-step",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});f.products.before(ze(d.length));let h=document.createElement("div");h.className="lb-multi-step__groups",d.forEach((T,p)=>{let w=document.createElement("div");w.className="lb-multi-step__group",w.setAttribute("data-step-group",String(p));let E=document.createElement("div");E.className="lb-multi-step__group-heading";let g=document.createElement("span");g.className="lb-multi-step__group-name",g.textContent=T.name,E.appendChild(g);let U=document.createElement("span");U.className="lb-multi-step__group-count",U.setAttribute("data-step-count",String(p)),E.appendChild(U),w.appendChild(E);let F=document.createElement("div");F.className="lb-mix-match__slots lb-edge-fade",F.setAttribute("data-step-slots",String(p)),w.appendChild(F);let D=document.createElement("button");D.type="button",D.className="lb-mix-match__add-product",D.setAttribute("data-step-trigger",String(p)),D.textContent="Add a product",w.appendChild(D),h.appendChild(w)}),f.products.replaceWith(h);let k=rt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:!0,showTypeFilters:!0,segmentCount:null,wizard:!0});f.root.appendChild(k);let L=d.map(()=>[]),b={container:f.root,steps:d.map((T,p)=>({name:T.name,minQuantity:T.minQuantity,maxQuantity:T.maxQuantity,eligibleProducts:c[p]})),selections:L,t:a,rulesMap:l,formatMoney:m,onRemove:(T,p)=>{let w=L[T][p];!w||!Pe(L,w,l)||(L[T].splice(p,1),N(),O.isOpen()&&O.refresh())},onEdit:T=>O.open(T)};function N(){Qn(b),Wn(b,{discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},(T,p,w)=>Re(T,p,w),nt(m)),jn(b),$n(b)}let O=Kn({container:f.root,steps:b.steps,selections:L,t:a,rulesMap:l,showQtySelector:!0,showTypeFilters:!0,formatMoney:m,dropdown:void 0,portalTarget:null,ctaButton:f.cta,onSelectionChanged:N,swapVariant:(T,p,w)=>{let E=0,g=L[T];for(let U=g.length-1;U>=0&&E<w;U--){let F=g[U];if(F.productId!==p.productId||F.variantId===p.variantId)continue;let D=Math.min(F.quantity||1,w-E);D>=(F.quantity||1)?g.splice(U,1):F.quantity=(F.quantity||1)-D,E+=D}E>0&&(p.quantity=E,g.push(p),N())},canRemove:T=>Pe(L,T,l)});f.root.querySelectorAll("[data-step-trigger]").forEach(T=>{T.addEventListener("click",()=>{O.isOpen()||O.open(parseInt(T.getAttribute("data-step-trigger")??"",10)||0)})}),f.cta.addEventListener("click",()=>{Le(L,b.steps)&&r(Gn(L).map(T=>({merchandiseId:"gid://shopify/ProductVariant/"+T.variantId,quantity:T.quantity,attributes:ae(t.id,t.bundleType)})))}),e.appendChild(f.root),se(f.root),N(),o?.(be(f.root))}var So=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","Enter"," ","Escape"]),it=new Set,at=!1;function Jn(e){let t=e==="using-mouse"?"using-keyboard":"using-mouse";for(let n of it)n.classList.add(e),n.classList.remove(t)}function Xn(e){So.has(e.key)&&Jn("using-keyboard")}function Zn(){Jn("using-mouse")}function To(){at||(at=!0,document.addEventListener("keydown",Xn,!0),document.addEventListener("pointerdown",Zn,!0))}function Eo(){at&&(at=!1,document.removeEventListener("keydown",Xn,!0),document.removeEventListener("pointerdown",Zn,!0))}function lt(e){return e.classList.add("using-mouse"),e.classList.remove("using-keyboard"),it.add(e),To(),()=>{it.delete(e),e.classList.remove("using-mouse"),e.classList.remove("using-keyboard"),it.size===0&&Eo()}}var Et=`/* Lime Bundles \u2014 shared base styles for all bundle widget types */
|
|
261
242
|
|
|
262
243
|
.lb-bundle-widget.lb-bundle-widget,
|
|
263
244
|
.lb-bundle-widget.lb-bundle-widget * {
|
|
@@ -268,12 +249,18 @@
|
|
|
268
249
|
/* Internal CSS-only vars (not merchant-configurable). */
|
|
269
250
|
--lb-thumbnail-bg: #F0F0F0;
|
|
270
251
|
--lb-widget-pad: 20px;
|
|
271
|
-
--lb-progress-color: var(--lb-primary-color);
|
|
272
252
|
/* Cap on the per-bundle product/slot/tier list height \u2014 keeps long
|
|
273
253
|
bundles from pushing the CTA off-screen. The list scrolls
|
|
274
|
-
internally with the
|
|
275
|
-
|
|
254
|
+
internally (with the .lb-edge-fade treatment) when content exceeds
|
|
255
|
+
this. */
|
|
276
256
|
--lb-list-max-height: 360px;
|
|
257
|
+
/* Depth of the soft fade at a scroll list's clipped edge. */
|
|
258
|
+
--lb-edge-fade-size: 20px;
|
|
259
|
+
/* Derived "small" corner radius for inner controls (thumbnails, variant
|
|
260
|
+
selects, the qty chip). One step tighter than the global --lb-radius so
|
|
261
|
+
small elements stay proportionate. Both come from the global radius
|
|
262
|
+
preset; nothing else sets a radius. */
|
|
263
|
+
--lb-radius-sm: max(0px, calc(var(--lb-radius) - 4px));
|
|
277
264
|
|
|
278
265
|
font-family: inherit;
|
|
279
266
|
font-size: 16px;
|
|
@@ -288,12 +275,40 @@
|
|
|
288
275
|
max-width: 440px;
|
|
289
276
|
}
|
|
290
277
|
|
|
291
|
-
/*
|
|
278
|
+
/* Edge fade \u2014 the shared treatment for inset scroll lists (fixed products,
|
|
279
|
+
mix & match slots, volume tiers). The native scrollbar channel is hidden;
|
|
280
|
+
instead the clipped edge of the list softly fades so content melts away
|
|
281
|
+
rather than ending in a hard cut against an app-chrome scrollbar. JS
|
|
282
|
+
(LB.attachEdgeFade) toggles data-edge-fade so an edge fades ONLY when content
|
|
283
|
+
is actually scrolled past it \u2014 never at rest \u2014 which keeps the first/last
|
|
284
|
+
card and the volume "Most popular" badge from ever being dimmed. Without JS
|
|
285
|
+
the list simply scrolls with no bar and no fade (a safe, quiet fallback). */
|
|
286
|
+
.lb-edge-fade {
|
|
287
|
+
scrollbar-width: none;
|
|
288
|
+
}
|
|
289
|
+
.lb-edge-fade::-webkit-scrollbar {
|
|
290
|
+
width: 0;
|
|
291
|
+
height: 0;
|
|
292
|
+
}
|
|
293
|
+
.lb-edge-fade[data-edge-fade="top"] {
|
|
294
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size));
|
|
295
|
+
mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size));
|
|
296
|
+
}
|
|
297
|
+
.lb-edge-fade[data-edge-fade="bottom"] {
|
|
298
|
+
-webkit-mask-image: linear-gradient(to top, transparent 0, #000 var(--lb-edge-fade-size));
|
|
299
|
+
mask-image: linear-gradient(to top, transparent 0, #000 var(--lb-edge-fade-size));
|
|
300
|
+
}
|
|
301
|
+
.lb-edge-fade[data-edge-fade="both"] {
|
|
302
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size), #000 calc(100% - var(--lb-edge-fade-size)), transparent 100%);
|
|
303
|
+
mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size), #000 calc(100% - var(--lb-edge-fade-size)), transparent 100%);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Countdown timer bar \u2014 a full-bleed "limited time" strip sitting below the
|
|
307
|
+
title, with the same breathing room the title gives the product list. */
|
|
292
308
|
.lb-bundle-countdown {
|
|
293
309
|
margin: 0 calc(-1 * var(--lb-widget-pad)) 20px;
|
|
294
310
|
padding: 12px 20px;
|
|
295
311
|
background: var(--lb-countdown-bg);
|
|
296
|
-
border-top: 1px solid color-mix(in srgb, var(--lb-text) 6%, transparent);
|
|
297
312
|
display: flex;
|
|
298
313
|
align-items: center;
|
|
299
314
|
justify-content: space-between;
|
|
@@ -328,8 +343,13 @@
|
|
|
328
343
|
letter-spacing: 0.02em;
|
|
329
344
|
}
|
|
330
345
|
|
|
331
|
-
/* Hide wrapper when the inner snippet rendered nothing (product OOS / unfulfillable)
|
|
332
|
-
|
|
346
|
+
/* Hide wrapper when the inner snippet rendered nothing (product OOS / unfulfillable).
|
|
347
|
+
The --loading class is excluded: the web component's skeleton has none of the
|
|
348
|
+
snippet root classes, so this rule matched it and beat its own display:block,
|
|
349
|
+
hiding the skeleton it renders on the first frame. */
|
|
350
|
+
.lb-bundle-widget:not(.lb-bundle-widget--loading):not(
|
|
351
|
+
:has(.lb-fixed, .lb-mix-match, .lb-volume, .lb-bogo, .lb-multi-step)
|
|
352
|
+
) {
|
|
333
353
|
display: none;
|
|
334
354
|
}
|
|
335
355
|
|
|
@@ -339,93 +359,52 @@
|
|
|
339
359
|
rendered DOM alternates <style><widget><style><widget>. The \`+\` combinator
|
|
340
360
|
requires immediate adjacency and would match nothing; \`~\` matches every
|
|
341
361
|
widget after the first regardless of elements between. Single-widget pages
|
|
342
|
-
stay unaffected (no prior \`.lb-bundle-widget\` sibling to match against).
|
|
343
|
-
Only \`margin-top\` \u2014 do NOT override \`padding-top\` here. The gradient header
|
|
344
|
-
uses \`margin-top: calc(-1 * var(--lb-widget-pad))\` to reach the widget's
|
|
345
|
-
inner border edge, assuming padding-top == --lb-widget-pad. Changing
|
|
346
|
-
padding-top on the subsequent widget breaks that math and leaves a visible
|
|
347
|
-
gap above the header. */
|
|
362
|
+
stay unaffected (no prior \`.lb-bundle-widget\` sibling to match against). */
|
|
348
363
|
.lb-bundle-widget ~ .lb-bundle-widget {
|
|
349
364
|
margin-top: 24px;
|
|
350
365
|
}
|
|
351
366
|
|
|
352
|
-
/* Header \u2014
|
|
367
|
+
/* Header \u2014 a plain section-heading title block in the merchant's own type.
|
|
368
|
+
No colored band, no full-bleed, no save-badge pill: the widget reads as a
|
|
369
|
+
part of the store, not as third-party app chrome. The 16px below holds
|
|
370
|
+
whether the title is followed by the product list or the countdown strip. */
|
|
353
371
|
.lb-bundle-header {
|
|
354
|
-
margin:
|
|
355
|
-
padding: 20px 20px;
|
|
356
|
-
background: var(--lb-header-bg);
|
|
357
|
-
/* Match the widget's inner border curve so there's no background gap at the top corners. */
|
|
358
|
-
border-radius: max(0px, calc(var(--lb-radius) - var(--lb-border-width))) max(0px, calc(var(--lb-radius) - var(--lb-border-width))) 0 0;
|
|
359
|
-
display: flex;
|
|
360
|
-
align-items: center;
|
|
361
|
-
justify-content: space-between;
|
|
362
|
-
gap: 16px;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* When countdown follows header, remove header bottom margin */
|
|
366
|
-
.lb-bundle-header:has(+ .lb-bundle-countdown) {
|
|
367
|
-
margin-bottom: 0;
|
|
372
|
+
margin: 0 0 16px;
|
|
368
373
|
}
|
|
369
374
|
|
|
370
375
|
.lb-bundle-header__content {
|
|
371
|
-
flex: 1;
|
|
372
376
|
min-width: 0;
|
|
373
377
|
}
|
|
374
378
|
|
|
375
379
|
.lb-bundle-title {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
+
/* Weight 600 (not 700): the receipt's sale price is the widget's heaviest,
|
|
381
|
+
largest element, so the title steps down to clear the hierarchy. */
|
|
382
|
+
font-size: 18px;
|
|
383
|
+
font-weight: 600;
|
|
384
|
+
line-height: 24px;
|
|
385
|
+
letter-spacing: -0.01em;
|
|
380
386
|
color: var(--lb-text);
|
|
381
387
|
margin: 0;
|
|
382
388
|
}
|
|
383
389
|
|
|
384
|
-
.lb-bundle-header .lb-bundle-title {
|
|
385
|
-
color: var(--lb-header-text);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
390
|
.lb-bundle-subtitle {
|
|
389
|
-
font-size:
|
|
391
|
+
font-size: 14px;
|
|
390
392
|
font-weight: 400;
|
|
391
393
|
line-height: 20px;
|
|
392
394
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
393
395
|
margin: 4px 0 0;
|
|
394
396
|
}
|
|
395
397
|
|
|
396
|
-
.lb-bundle-header .lb-bundle-subtitle {
|
|
397
|
-
color: var(--lb-header-text);
|
|
398
|
-
opacity: 0.85;
|
|
399
|
-
margin-top: 8px;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.lb-bundle-header:has(.lb-bundle-subtitle) {
|
|
403
|
-
align-items: flex-start;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.lb-bundle-header__badge {
|
|
407
|
-
background: var(--lb-save-badge-bg);
|
|
408
|
-
color: var(--lb-save-badge-text);
|
|
409
|
-
border: var(--lb-save-badge-border-width) solid var(--lb-save-badge-border-color);
|
|
410
|
-
font-size: 16px;
|
|
411
|
-
font-weight: 700;
|
|
412
|
-
line-height: 1;
|
|
413
|
-
padding: 4px 12px;
|
|
414
|
-
border-radius: var(--lb-save-badge-radius);
|
|
415
|
-
white-space: nowrap;
|
|
416
|
-
flex-shrink: 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
398
|
/* Override Dawn's \`div:empty { display: none }\` reset for decorative elements */
|
|
420
399
|
.lb-bundle-divider:empty,
|
|
421
|
-
.lb-mix-match__progress-
|
|
400
|
+
.lb-mix-match__progress-segment:empty {
|
|
422
401
|
display: block;
|
|
423
402
|
}
|
|
424
403
|
|
|
425
404
|
/* Divider */
|
|
426
405
|
.lb-bundle-divider {
|
|
427
|
-
height:
|
|
428
|
-
background:
|
|
406
|
+
height: var(--lb-border-width);
|
|
407
|
+
background: var(--lb-border);
|
|
429
408
|
margin: 16px 0;
|
|
430
409
|
}
|
|
431
410
|
|
|
@@ -445,7 +424,7 @@
|
|
|
445
424
|
ratio. Default keeps the historical 1:1 behaviour. */
|
|
446
425
|
aspect-ratio: var(--lb-thumbnail-aspect-ratio, 1 / 1);
|
|
447
426
|
background: var(--lb-thumbnail-bg);
|
|
448
|
-
border-radius:
|
|
427
|
+
border-radius: var(--lb-radius-sm);
|
|
449
428
|
overflow: hidden;
|
|
450
429
|
display: flex;
|
|
451
430
|
align-items: center;
|
|
@@ -473,7 +452,7 @@
|
|
|
473
452
|
|
|
474
453
|
.lb-bundle-product-name {
|
|
475
454
|
font-size: 16px;
|
|
476
|
-
font-weight:
|
|
455
|
+
font-weight: 600;
|
|
477
456
|
line-height: 20px;
|
|
478
457
|
color: var(--lb-text);
|
|
479
458
|
margin: 0;
|
|
@@ -481,8 +460,16 @@
|
|
|
481
460
|
display: block;
|
|
482
461
|
}
|
|
483
462
|
|
|
484
|
-
|
|
463
|
+
/* The underline fades in \u2014 text-decoration itself can't transition, but
|
|
464
|
+
its color can. Links only: plain titles carry no hover affordance. */
|
|
465
|
+
a.lb-bundle-product-name {
|
|
485
466
|
text-decoration: underline;
|
|
467
|
+
text-decoration-color: transparent;
|
|
468
|
+
transition: text-decoration-color 0.25s ease;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
a.lb-bundle-product-name:hover {
|
|
472
|
+
text-decoration-color: currentColor;
|
|
486
473
|
}
|
|
487
474
|
|
|
488
475
|
a.lb-bundle-product-name:focus-visible {
|
|
@@ -499,6 +486,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
499
486
|
font-weight: 400;
|
|
500
487
|
line-height: 20px;
|
|
501
488
|
color: var(--lb-text);
|
|
489
|
+
font-variant-numeric: tabular-nums;
|
|
502
490
|
}
|
|
503
491
|
|
|
504
492
|
.lb-bundle-product-prices {
|
|
@@ -506,7 +494,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
506
494
|
align-items: baseline;
|
|
507
495
|
gap: 6px;
|
|
508
496
|
flex-wrap: wrap;
|
|
509
|
-
margin-top:
|
|
497
|
+
margin-top: 4px;
|
|
510
498
|
}
|
|
511
499
|
|
|
512
500
|
.lb-bundle-product-compare-price {
|
|
@@ -517,6 +505,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
517
505
|
line-height: 20px;
|
|
518
506
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
519
507
|
text-decoration: line-through;
|
|
508
|
+
font-variant-numeric: tabular-nums;
|
|
520
509
|
}
|
|
521
510
|
|
|
522
511
|
/* Setting \`display\` above outranks the UA [hidden] rule \u2014 restore it so rows
|
|
@@ -550,16 +539,16 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
550
539
|
.lb-bundle-variant-badge,
|
|
551
540
|
.lb-mix-match__slot--filled .lb-mix-match__filled-variant {
|
|
552
541
|
display: block;
|
|
553
|
-
font-size:
|
|
542
|
+
font-size: 14px;
|
|
554
543
|
line-height: 20px;
|
|
555
544
|
margin-top: 2px;
|
|
556
545
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
557
546
|
}
|
|
558
547
|
|
|
559
548
|
/* Per-option variant pickers. Each option's label + select sit inside a
|
|
560
|
-
.lb-bundle-variant-option-group (flex column,
|
|
549
|
+
.lb-bundle-variant-option-group (flex column, 4px gap between label and
|
|
561
550
|
select); the groups stack inside a .lb-bundle-variant-option-groups
|
|
562
|
-
parent (flex column,
|
|
551
|
+
parent (flex column, 8px gap between groups). The parent owns the top
|
|
563
552
|
offset from the preceding unit-price line, so individual labels and
|
|
564
553
|
selects don't carry their own vertical margins. */
|
|
565
554
|
.lb-bundle-variant-option-groups {
|
|
@@ -572,7 +561,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
572
561
|
.lb-bundle-variant-option-group {
|
|
573
562
|
display: flex;
|
|
574
563
|
flex-direction: column;
|
|
575
|
-
gap:
|
|
564
|
+
gap: 4px;
|
|
576
565
|
}
|
|
577
566
|
|
|
578
567
|
.lb-bundle-variant-option-label {
|
|
@@ -630,87 +619,90 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
630
619
|
white-space: nowrap;
|
|
631
620
|
}
|
|
632
621
|
|
|
633
|
-
/*
|
|
634
|
-
|
|
622
|
+
/* Receipt summary \u2014 a column: the total row, then one quiet savings line.
|
|
623
|
+
The sale price is the widget's #1 element (largest, heaviest), so the eye
|
|
624
|
+
lands on what the bundle costs. Inherits the widget's global text color. */
|
|
625
|
+
.lb-bundle-summary {
|
|
635
626
|
display: flex;
|
|
636
|
-
align-items:
|
|
627
|
+
align-items: center;
|
|
637
628
|
justify-content: space-between;
|
|
638
|
-
padding: 4px 0 8px;
|
|
639
629
|
gap: 12px;
|
|
630
|
+
margin-bottom: 16px;
|
|
640
631
|
}
|
|
641
632
|
|
|
642
|
-
.
|
|
643
|
-
|
|
633
|
+
/* Left column \u2014 the label over the savings line. Paired with the price stack on
|
|
634
|
+
the right and vertically centred against it, so the summary stays balanced
|
|
635
|
+
whether or not a savings line / compare price is present (e.g. an undiscounted
|
|
636
|
+
bundle reads as a clean "label \u2026 total" on one centred line). */
|
|
637
|
+
.lb-bundle-summary__text {
|
|
638
|
+
display: flex;
|
|
639
|
+
flex-direction: column;
|
|
640
|
+
gap: 2px;
|
|
641
|
+
min-width: 0;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.lb-bundle-summary__label {
|
|
645
|
+
font-size: 15px;
|
|
644
646
|
font-weight: 400;
|
|
645
|
-
line-height:
|
|
647
|
+
line-height: 1.4;
|
|
648
|
+
text-transform: uppercase;
|
|
649
|
+
color: color-mix(in srgb, var(--lb-text) 70%, transparent);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/* Savings line \u2014 the one savings signal, quiet text under the label. No pill,
|
|
653
|
+
no lime: lime is reserved for the CTA. JS toggles its display when savings
|
|
654
|
+
reach/leave zero (the [data-savings-bar] hook name is unchanged). */
|
|
655
|
+
.lb-bundle-savings-line {
|
|
656
|
+
font-size: 13px;
|
|
657
|
+
font-weight: 400;
|
|
658
|
+
line-height: 1.4;
|
|
659
|
+
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
660
|
+
margin: 0;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.lb-bundle-savings-line [data-savings-amount] {
|
|
646
664
|
color: var(--lb-text);
|
|
647
|
-
|
|
665
|
+
font-variant-numeric: tabular-nums;
|
|
648
666
|
}
|
|
649
667
|
|
|
650
|
-
|
|
668
|
+
/* Right column \u2014 the struck original over the bundle total ("was / now"),
|
|
669
|
+
vertically centred against the label/savings column on the left. */
|
|
670
|
+
.lb-bundle-summary__prices {
|
|
651
671
|
display: flex;
|
|
652
|
-
|
|
653
|
-
|
|
672
|
+
flex-direction: column;
|
|
673
|
+
align-items: flex-end;
|
|
674
|
+
gap: 1px;
|
|
675
|
+
flex-shrink: 0;
|
|
676
|
+
text-align: right;
|
|
654
677
|
}
|
|
655
678
|
|
|
656
679
|
.lb-bundle-sale-price {
|
|
657
|
-
font-size:
|
|
658
|
-
font-weight:
|
|
659
|
-
line-height: 1;
|
|
680
|
+
font-size: 24px;
|
|
681
|
+
font-weight: 600;
|
|
682
|
+
line-height: 1.1;
|
|
660
683
|
letter-spacing: -0.02em;
|
|
661
684
|
color: var(--lb-text);
|
|
685
|
+
font-variant-numeric: tabular-nums;
|
|
662
686
|
}
|
|
663
687
|
|
|
664
688
|
.lb-bundle-compare-price {
|
|
665
|
-
font-size:
|
|
689
|
+
font-size: 14px;
|
|
666
690
|
font-weight: 400;
|
|
667
|
-
line-height:
|
|
668
|
-
color: color-mix(in srgb, var(--lb-text)
|
|
691
|
+
line-height: 1.3;
|
|
692
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
669
693
|
text-decoration: line-through;
|
|
694
|
+
font-variant-numeric: tabular-nums;
|
|
670
695
|
}
|
|
671
696
|
|
|
672
|
-
/*
|
|
673
|
-
.lb-bundle-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
color: var(--lb-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
font-weight: 600;
|
|
682
|
-
line-height: 20px;
|
|
683
|
-
padding: 8px 12px;
|
|
684
|
-
border-radius: var(--lb-savings-bar-radius);
|
|
685
|
-
margin-bottom: 12px;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/* Quantity badge \u2014 overlay on thumbnail top-right */
|
|
689
|
-
.lb-bundle-qty-badge.lb-bundle-qty-badge {
|
|
690
|
-
position: absolute;
|
|
691
|
-
top: -8px;
|
|
692
|
-
right: -8px;
|
|
693
|
-
/* --lb-qty-badge-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
694
|
-
display: var(--lb-qty-badge-display, flex);
|
|
695
|
-
align-items: center;
|
|
696
|
-
justify-content: center;
|
|
697
|
-
width: 24px;
|
|
698
|
-
height: 24px;
|
|
699
|
-
border-radius: 50%;
|
|
700
|
-
background: var(--lb-qty-badge-bg);
|
|
701
|
-
border: var(--lb-image-border-width) solid var(--lb-image-border-color);
|
|
702
|
-
color: var(--lb-qty-badge-color);
|
|
703
|
-
font-size: 12px;
|
|
704
|
-
font-weight: 700;
|
|
705
|
-
line-height: 0;
|
|
706
|
-
text-align: center;
|
|
707
|
-
z-index: 1;
|
|
708
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/* Override Dawn's \`div:empty\` for savings bar when hidden */
|
|
712
|
-
.lb-bundle-savings-bar:empty {
|
|
713
|
-
display: none;
|
|
697
|
+
/* Inline quantity \u2014 "\xD72" beside the product price (mix & match chosen-product
|
|
698
|
+
cards). Quiet, theme-inherited; the fixed widget uses .lb-bundle-qty-chip in
|
|
699
|
+
the card's right slot instead. */
|
|
700
|
+
.lb-bundle-qty-inline {
|
|
701
|
+
font-size: 13px;
|
|
702
|
+
font-weight: 400;
|
|
703
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
704
|
+
font-variant-numeric: tabular-nums;
|
|
705
|
+
white-space: nowrap;
|
|
714
706
|
}
|
|
715
707
|
|
|
716
708
|
/* CTA button.
|
|
@@ -726,13 +718,13 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
726
718
|
width: 100%;
|
|
727
719
|
padding: 12px 16px;
|
|
728
720
|
border: var(--lb-cta-border-width) solid var(--lb-cta-border-color);
|
|
729
|
-
border-radius: var(--lb-
|
|
721
|
+
border-radius: var(--lb-radius);
|
|
730
722
|
font-size: 16px;
|
|
731
723
|
font-weight: 600;
|
|
732
724
|
line-height: 20px;
|
|
733
725
|
cursor: pointer;
|
|
734
726
|
text-align: center;
|
|
735
|
-
transition: opacity 0.
|
|
727
|
+
transition: opacity 0.25s ease;
|
|
736
728
|
font-family: inherit;
|
|
737
729
|
}
|
|
738
730
|
|
|
@@ -790,22 +782,50 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
790
782
|
visibility: visible;
|
|
791
783
|
}
|
|
792
784
|
|
|
785
|
+
/* Transient "Added" confirmation \u2014 JS swaps the label text on success; a quick
|
|
786
|
+
pop draws the eye to the state change. No bounce. */
|
|
787
|
+
.lb-bundle-cta[data-added="true"] .lb-cta-label {
|
|
788
|
+
animation: lb-cta-added-pop 0.22s cubic-bezier(0.25, 1, 0.5, 1);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
@keyframes lb-cta-added-pop {
|
|
792
|
+
from { opacity: 0.5; transform: scale(0.96); }
|
|
793
|
+
to { opacity: 1; transform: scale(1); }
|
|
794
|
+
}
|
|
795
|
+
|
|
793
796
|
@media (prefers-reduced-motion: reduce) {
|
|
794
797
|
.lb-cta-spinner svg {
|
|
795
798
|
animation-duration: 2.5s;
|
|
796
799
|
}
|
|
800
|
+
.lb-bundle-cta[data-added="true"] .lb-cta-label {
|
|
801
|
+
animation: none;
|
|
802
|
+
}
|
|
797
803
|
}
|
|
798
804
|
|
|
799
|
-
/* Error message
|
|
805
|
+
/* Error / warning message \u2014 amber, never red. Stock and warning states share
|
|
806
|
+
the merchant-overridable low-stock token; the leading icon keeps meaning
|
|
807
|
+
from being carried by color alone. */
|
|
800
808
|
.lb-bundle-error {
|
|
801
809
|
font-size: 16px;
|
|
802
|
-
color:
|
|
810
|
+
color: var(--lb-low-stock-text);
|
|
803
811
|
margin-top: 8px;
|
|
804
812
|
display: none;
|
|
805
813
|
}
|
|
806
814
|
|
|
807
815
|
.lb-bundle-error[data-visible="true"] {
|
|
808
|
-
display:
|
|
816
|
+
display: flex;
|
|
817
|
+
align-items: center;
|
|
818
|
+
gap: 6px;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.lb-bundle-error[data-visible="true"]::before {
|
|
822
|
+
content: "";
|
|
823
|
+
flex-shrink: 0;
|
|
824
|
+
width: 18px;
|
|
825
|
+
height: 18px;
|
|
826
|
+
background-color: currentColor;
|
|
827
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
828
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
809
829
|
}
|
|
810
830
|
|
|
811
831
|
/* Visually hidden \u2014 accessible to screen readers only */
|
|
@@ -838,7 +858,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
838
858
|
.lb-bundle-oos-label {
|
|
839
859
|
font-size: 12px;
|
|
840
860
|
font-weight: 500;
|
|
841
|
-
color:
|
|
861
|
+
color: var(--lb-low-stock-text);
|
|
842
862
|
white-space: nowrap;
|
|
843
863
|
margin-left: auto;
|
|
844
864
|
}
|
|
@@ -857,7 +877,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
857
877
|
line-height: 1.4;
|
|
858
878
|
color: var(--lb-low-stock-text);
|
|
859
879
|
background-color: var(--lb-low-stock-bg);
|
|
860
|
-
border-radius:
|
|
880
|
+
border-radius: var(--lb-radius-sm);
|
|
861
881
|
white-space: nowrap;
|
|
862
882
|
}
|
|
863
883
|
|
|
@@ -865,60 +885,119 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
865
885
|
.lb-ab-pending {
|
|
866
886
|
visibility: hidden;
|
|
867
887
|
}
|
|
868
|
-
|
|
888
|
+
|
|
889
|
+
/* \u2500\u2500 Geometry reservation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
890
|
+
Liquid renders each row's structure and its product title; everything else
|
|
891
|
+
is filled by JS on hydration. These rules give the empty boxes the exact
|
|
892
|
+
height their filled counterparts will occupy, so a row never changes size
|
|
893
|
+
between first paint and hydration \u2014 cumulative layout shift stays at zero.
|
|
894
|
+
|
|
895
|
+
\`:empty\` stops matching the moment JS puts content in, handing the height
|
|
896
|
+
back to the real content, which measures the same.
|
|
897
|
+
|
|
898
|
+
The title is the one box NOT reserved this way: text wrapping depends on the
|
|
899
|
+
merchant's font, so it is server-rendered and its height is simply real. */
|
|
900
|
+
|
|
901
|
+
.lb-bundle-product-price:empty {
|
|
902
|
+
display: inline-block;
|
|
903
|
+
min-height: 20px;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
.lb-bundle-variant-badge:empty {
|
|
907
|
+
display: block;
|
|
908
|
+
min-height: 20px;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
.lb-bundle-product-unit-price:empty {
|
|
912
|
+
display: block;
|
|
913
|
+
min-height: 16px;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/* Label (16) + gap (4) + trigger (8 + 16 + 8 padding/line-height) per group,
|
|
917
|
+
plus the 8px gap between groups. --lb-row-option-count is set per row by
|
|
918
|
+
Liquid, which knows how many options the product has. */
|
|
919
|
+
.lb-bundle-variant-option-groups:empty {
|
|
920
|
+
min-height: calc(
|
|
921
|
+
var(--lb-row-option-count, 1) * (52px + 2 * var(--lb-border-width)) +
|
|
922
|
+
(var(--lb-row-option-count, 1) - 1) * 8px
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/* The thumbnail is a fixed 48px wide with an aspect-ratio, so its box is sized
|
|
927
|
+
before the image loads. The "original" ratio is the exception \u2014 it sizes to
|
|
928
|
+
the image's intrinsic dimensions, which nothing knows up front. Liquid emits
|
|
929
|
+
the real ratio per row so even that case reserves correctly. */
|
|
930
|
+
.lb-bundle-thumbnail[style*="--lb-row-thumb-ratio"] {
|
|
931
|
+
aspect-ratio: var(--lb-row-thumb-ratio);
|
|
932
|
+
}
|
|
933
|
+
`,er=`/* Lime Bundles \u2014 Fixed bundle styles */
|
|
869
934
|
|
|
870
935
|
.lb-fixed__products {
|
|
871
936
|
display: flex;
|
|
872
937
|
flex-direction: column;
|
|
873
|
-
gap:
|
|
938
|
+
gap: 12px;
|
|
874
939
|
margin: 0;
|
|
875
940
|
max-height: var(--lb-list-max-height);
|
|
876
941
|
overflow-y: auto;
|
|
877
|
-
/*
|
|
878
|
-
scrollbar-width: thin;
|
|
879
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text) 15%, transparent)
|
|
880
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
.lb-fixed__products::-webkit-scrollbar { width: 4px; }
|
|
884
|
-
.lb-fixed__products::-webkit-scrollbar-track {
|
|
885
|
-
background: color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
886
|
-
border-radius: 2px;
|
|
887
|
-
}
|
|
888
|
-
.lb-fixed__products::-webkit-scrollbar-thumb {
|
|
889
|
-
background: color-mix(in srgb, var(--lb-text) 15%, transparent);
|
|
890
|
-
border-radius: 2px;
|
|
942
|
+
/* Scrollbar hidden + edge fade \u2014 see .lb-edge-fade in bundle-base.css. */
|
|
891
943
|
}
|
|
892
944
|
|
|
893
|
-
/* Fixed bundles: product
|
|
945
|
+
/* Fixed bundles: product cards. Each product is a bordered card \u2014 thumbnail,
|
|
946
|
+
info, and a right-slot quantity chip \u2014 mirroring the mix & match chosen-
|
|
947
|
+
product card so the two bundle types read the same. The info column flows
|
|
948
|
+
name \u2192 variant \u2192 price \u2192 unit \u2192 pickers on the inherited type. */
|
|
894
949
|
.lb-fixed .lb-bundle-product-row {
|
|
895
|
-
|
|
896
|
-
align-items:
|
|
950
|
+
display: flex;
|
|
951
|
+
align-items: flex-start;
|
|
952
|
+
gap: 12px;
|
|
953
|
+
padding: 8px;
|
|
954
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
955
|
+
border-radius: var(--lb-radius);
|
|
956
|
+
box-sizing: border-box;
|
|
897
957
|
}
|
|
898
958
|
|
|
899
|
-
/*
|
|
900
|
-
(set on .lb-bundle-widget via Liquid / applyWidgetConfigVars).
|
|
959
|
+
/* Larger thumbnails. Height comes from --lb-thumbnail-aspect-ratio
|
|
960
|
+
(set on .lb-bundle-widget via Liquid / applyWidgetConfigVars). Thumbnails
|
|
961
|
+
carry only the derived corner radius \u2014 no border. */
|
|
901
962
|
.lb-fixed .lb-bundle-thumbnail {
|
|
902
963
|
width: 60px;
|
|
903
964
|
min-width: 60px;
|
|
904
|
-
border-radius: var(--lb-
|
|
905
|
-
border: var(--lb-image-border-width) solid var(--lb-image-border-color);
|
|
965
|
+
border-radius: var(--lb-radius-sm);
|
|
906
966
|
box-sizing: border-box;
|
|
907
|
-
overflow: visible;
|
|
908
967
|
}
|
|
909
968
|
|
|
910
969
|
.lb-fixed .lb-bundle-thumbnail img {
|
|
911
|
-
border-radius:
|
|
970
|
+
border-radius: var(--lb-radius-sm);
|
|
912
971
|
border: none;
|
|
913
972
|
}
|
|
914
973
|
|
|
974
|
+
/* Quantity chip \u2014 the card's right slot. A quiet, non-interactive count (\xD7N),
|
|
975
|
+
deliberately border-less so it never reads as the mix & match remove button. */
|
|
976
|
+
.lb-bundle-qty-chip {
|
|
977
|
+
flex-shrink: 0;
|
|
978
|
+
min-width: 34px;
|
|
979
|
+
height: 28px;
|
|
980
|
+
padding: 0 8px;
|
|
981
|
+
display: inline-flex;
|
|
982
|
+
align-items: center;
|
|
983
|
+
justify-content: center;
|
|
984
|
+
border-radius: var(--lb-radius-sm);
|
|
985
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
986
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
987
|
+
font-size: 13px;
|
|
988
|
+
font-weight: 500;
|
|
989
|
+
line-height: 1;
|
|
990
|
+
font-variant-numeric: tabular-nums;
|
|
991
|
+
white-space: nowrap;
|
|
992
|
+
}
|
|
993
|
+
|
|
915
994
|
/* Variant picker select \u2014 styled to match the variant badge aesthetic.
|
|
916
995
|
Sits inside .lb-bundle-variant-option-group so vertical spacing is owned
|
|
917
996
|
by the group/groups flex gap, not the select itself. */
|
|
918
997
|
.lb-bundle-variant-select {
|
|
919
998
|
display: inline-block;
|
|
920
|
-
border: var(--lb-
|
|
921
|
-
border-radius: var(--lb-
|
|
999
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
1000
|
+
border-radius: var(--lb-radius-sm);
|
|
922
1001
|
padding: 8px 32px 8px 12px;
|
|
923
1002
|
font-size: 12px;
|
|
924
1003
|
line-height: 16px;
|
|
@@ -941,39 +1020,71 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
941
1020
|
outline-offset: 2px;
|
|
942
1021
|
box-shadow: none;
|
|
943
1022
|
}
|
|
944
|
-
`,
|
|
1023
|
+
`,tr=`/* Lime Bundles \u2014 Mix & Match styles */
|
|
945
1024
|
|
|
946
|
-
/* ===
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
variant dropdown panel. */
|
|
1025
|
+
/* === Selected product list ================================================
|
|
1026
|
+
The chosen products render as bordered cards. Capped height so long
|
|
1027
|
+
bundles don't push the CTA off the page; internal scroll uses the same
|
|
1028
|
+
custom 4px scrollbar as the variant dropdown panel. */
|
|
950
1029
|
.lb-mix-match__slots {
|
|
1030
|
+
display: flex;
|
|
1031
|
+
flex-direction: column;
|
|
1032
|
+
gap: 12px;
|
|
951
1033
|
max-height: var(--lb-list-max-height);
|
|
952
1034
|
overflow-y: auto;
|
|
953
|
-
|
|
954
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text) 15%, transparent)
|
|
955
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
1035
|
+
/* Scrollbar hidden + edge fade \u2014 see .lb-edge-fade in bundle-base.css. */
|
|
956
1036
|
}
|
|
957
1037
|
|
|
958
|
-
.lb-mix-match__slots
|
|
959
|
-
|
|
960
|
-
background: color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
961
|
-
border-radius: 2px;
|
|
962
|
-
}
|
|
963
|
-
.lb-mix-match__slots::-webkit-scrollbar-thumb {
|
|
964
|
-
background: color-mix(in srgb, var(--lb-text) 15%, transparent);
|
|
965
|
-
border-radius: 2px;
|
|
1038
|
+
.lb-mix-match__slots:empty {
|
|
1039
|
+
display: none;
|
|
966
1040
|
}
|
|
967
1041
|
|
|
968
|
-
/* === Progress Bar
|
|
1042
|
+
/* === Progress Bar (segmented) ============================================
|
|
1043
|
+
One rounded segment per required pick; the first N (count) fill with the
|
|
1044
|
+
primary colour as the shopper adds products. */
|
|
969
1045
|
.lb-mix-match__progress {
|
|
970
1046
|
margin-bottom: 16px;
|
|
971
1047
|
}
|
|
972
1048
|
|
|
1049
|
+
.lb-mix-match__progress-segments {
|
|
1050
|
+
display: flex;
|
|
1051
|
+
gap: 6px;
|
|
1052
|
+
width: 100%;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.lb-mix-match__progress-segment {
|
|
1056
|
+
flex: 1;
|
|
1057
|
+
height: 6px;
|
|
1058
|
+
/* Follows the global radius (like the widget's other small elements); the
|
|
1059
|
+
modal override below switches it to the picker radius. Capped by the 6px
|
|
1060
|
+
height, so it reads as a pill until the merchant picks a tighter radius. */
|
|
1061
|
+
border-radius: var(--lb-radius-sm);
|
|
1062
|
+
background: color-mix(in srgb, var(--lb-text) 12%, transparent);
|
|
1063
|
+
/* The fill is an inner layer that grows/retracts horizontally (0.3s per
|
|
1064
|
+
DESIGN.md's motion vocabulary) rather than a colour swap. */
|
|
1065
|
+
position: relative;
|
|
1066
|
+
overflow: hidden;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.lb-mix-match__progress-segment::after {
|
|
1070
|
+
content: '';
|
|
1071
|
+
position: absolute;
|
|
1072
|
+
inset: 0;
|
|
1073
|
+
background: var(--lb-text);
|
|
1074
|
+
border-radius: inherit;
|
|
1075
|
+
transform: scaleX(0);
|
|
1076
|
+
transform-origin: left;
|
|
1077
|
+
transition: transform 0.3s ease;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.lb-mix-match__progress-segment--filled::after {
|
|
1081
|
+
transform: scaleX(1);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
973
1084
|
.lb-mix-match__progress-labels {
|
|
974
1085
|
display: flex;
|
|
975
1086
|
justify-content: space-between;
|
|
976
|
-
margin-
|
|
1087
|
+
margin-top: 8px;
|
|
977
1088
|
}
|
|
978
1089
|
|
|
979
1090
|
.lb-mix-match__progress-count {
|
|
@@ -990,77 +1101,55 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
990
1101
|
color: var(--lb-text);
|
|
991
1102
|
}
|
|
992
1103
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
overflow: hidden;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
.lb-mix-match__progress-fill {
|
|
1002
|
-
height: 100%;
|
|
1003
|
-
background: var(--lb-text);
|
|
1004
|
-
border-radius: 4px;
|
|
1005
|
-
transition: width 0.3s ease;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/* === Slots === */
|
|
1009
|
-
.lb-mix-match__slot {
|
|
1010
|
-
cursor: pointer;
|
|
1104
|
+
/* In the modal the segmented bar lives inside the header, below the subtitle
|
|
1105
|
+
and above the header's bottom border. */
|
|
1106
|
+
.lb-mix-match__modal-progress {
|
|
1107
|
+
margin: 0;
|
|
1108
|
+
padding: 0;
|
|
1011
1109
|
}
|
|
1012
1110
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1111
|
+
/* The modal's progress segments follow the picker radius, not the global
|
|
1112
|
+
one \u2014 and the picker PALETTE: inside the modal the track and fill read
|
|
1113
|
+
--lb-picker-text, not the widget's --lb-text. */
|
|
1114
|
+
.lb-mix-match__modal-progress .lb-mix-match__progress-segment {
|
|
1115
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1116
|
+
background: color-mix(in srgb, var(--lb-picker-text) 12%, transparent);
|
|
1015
1117
|
}
|
|
1016
1118
|
|
|
1017
|
-
.lb-mix-
|
|
1018
|
-
|
|
1019
|
-
outline-offset: -2px;
|
|
1020
|
-
box-shadow: none;
|
|
1021
|
-
border-radius: 8px;
|
|
1119
|
+
.lb-mix-match__modal-progress .lb-mix-match__progress-segment::after {
|
|
1120
|
+
background: var(--lb-picker-text);
|
|
1022
1121
|
}
|
|
1023
1122
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
height: 60px;
|
|
1027
|
-
min-width: 60px;
|
|
1028
|
-
/* 2px border is intentionally independent of --lb-image-border-width \u2014
|
|
1029
|
-
empty slots always need a visible dashed outline as an affordance,
|
|
1030
|
-
regardless of how the merchant has styled populated thumbnails. */
|
|
1031
|
-
border: 2px dashed color-mix(in srgb, var(--lb-text) 35%, transparent);
|
|
1032
|
-
border-radius: var(--lb-image-border-radius);
|
|
1033
|
-
box-sizing: border-box;
|
|
1123
|
+
/* === Selected product cards === */
|
|
1124
|
+
.lb-mix-match__slot--filled {
|
|
1034
1125
|
display: flex;
|
|
1035
|
-
align-items:
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1126
|
+
align-items: flex-start;
|
|
1127
|
+
gap: 12px;
|
|
1128
|
+
padding: 8px;
|
|
1129
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
1130
|
+
border-radius: var(--lb-radius);
|
|
1131
|
+
box-sizing: border-box;
|
|
1132
|
+
/* The whole card is an edit target \u2014 clicking it reopens the picker. */
|
|
1133
|
+
cursor: pointer;
|
|
1134
|
+
transition: border-color 0.25s ease;
|
|
1044
1135
|
}
|
|
1045
1136
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
cursor: default;
|
|
1137
|
+
.lb-mix-match__slot--filled:hover {
|
|
1138
|
+
border-color: color-mix(in srgb, var(--lb-text) 45%, transparent);
|
|
1049
1139
|
}
|
|
1050
1140
|
|
|
1051
1141
|
/* Mix-match thumbnails. Height comes from --lb-thumbnail-aspect-ratio
|
|
1052
1142
|
(set on .lb-bundle-widget via Liquid / applyWidgetConfigVars). */
|
|
1053
1143
|
.lb-mix-match .lb-bundle-thumbnail {
|
|
1144
|
+
position: relative;
|
|
1054
1145
|
width: 60px;
|
|
1055
1146
|
min-width: 60px;
|
|
1056
|
-
border-radius: var(--lb-
|
|
1057
|
-
border: var(--lb-image-border-width) solid var(--lb-image-border-color);
|
|
1147
|
+
border-radius: var(--lb-radius-sm);
|
|
1058
1148
|
box-sizing: border-box;
|
|
1059
|
-
overflow: visible;
|
|
1060
1149
|
}
|
|
1061
1150
|
|
|
1062
1151
|
.lb-mix-match .lb-bundle-thumbnail img {
|
|
1063
|
-
border-radius:
|
|
1152
|
+
border-radius: var(--lb-radius-sm);
|
|
1064
1153
|
border: none;
|
|
1065
1154
|
}
|
|
1066
1155
|
|
|
@@ -1071,20 +1160,25 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1071
1160
|
flex-direction: column;
|
|
1072
1161
|
}
|
|
1073
1162
|
|
|
1163
|
+
/* The title is an edit BUTTON (reopens the picker), not a product link \u2014
|
|
1164
|
+
reset the UA button chrome and inherit the theme font. */
|
|
1074
1165
|
.lb-mix-match__slot--filled .lb-mix-match__filled-title {
|
|
1075
1166
|
font-size: 16px;
|
|
1076
|
-
font-weight:
|
|
1167
|
+
font-weight: 600;
|
|
1077
1168
|
line-height: 20px;
|
|
1078
1169
|
color: var(--lb-text);
|
|
1079
1170
|
text-decoration: none;
|
|
1080
1171
|
overflow-wrap: break-word;
|
|
1172
|
+
background: none;
|
|
1173
|
+
border: none;
|
|
1174
|
+
margin: 0;
|
|
1175
|
+
padding: 0;
|
|
1176
|
+
font-family: inherit;
|
|
1177
|
+
text-align: left;
|
|
1178
|
+
cursor: pointer;
|
|
1081
1179
|
}
|
|
1082
1180
|
|
|
1083
|
-
.lb-mix-match__slot--filled
|
|
1084
|
-
text-decoration: underline;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
.lb-mix-match__slot--filled a.lb-mix-match__filled-title:focus-visible {
|
|
1181
|
+
.lb-mix-match__slot--filled .lb-mix-match__filled-title:focus-visible {
|
|
1088
1182
|
outline: 2px solid var(--lb-primary-color);
|
|
1089
1183
|
outline-offset: 2px;
|
|
1090
1184
|
box-shadow: none;
|
|
@@ -1095,42 +1189,57 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1095
1189
|
.lb-bundle-variant-badge above to keep the variant text consistent
|
|
1096
1190
|
across mix-match and fixed bundle widgets. */
|
|
1097
1191
|
|
|
1098
|
-
.lb-mix-match__filled-price {
|
|
1099
|
-
/*
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1192
|
+
.lb-mix-match__slot--filled .lb-mix-match__filled-price {
|
|
1193
|
+
/* Canonical price row (WIDGET-DESIGN.md): flex container, 6px gap, no
|
|
1194
|
+
toggles here \u2014 show/hide vars live on the inner price elements. */
|
|
1195
|
+
display: flex;
|
|
1196
|
+
align-items: baseline;
|
|
1197
|
+
gap: 6px;
|
|
1198
|
+
flex-wrap: wrap;
|
|
1103
1199
|
margin-top: 4px;
|
|
1104
|
-
color: var(--lb-text);
|
|
1105
|
-
font-weight: 500;
|
|
1106
1200
|
}
|
|
1107
1201
|
|
|
1108
1202
|
.lb-mix-match__filled-compare {
|
|
1109
1203
|
/* --lb-product-compare-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
1110
1204
|
display: var(--lb-product-compare-display, inline);
|
|
1111
|
-
font-size:
|
|
1205
|
+
font-size: 14px;
|
|
1112
1206
|
font-weight: 400;
|
|
1113
1207
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
1114
1208
|
text-decoration: line-through;
|
|
1115
|
-
margin-right: 4px;
|
|
1116
1209
|
}
|
|
1117
1210
|
|
|
1211
|
+
/* Boxed \xD7 remove control on the right of each card. */
|
|
1212
|
+
/* Remove control \u2014 the interactive member of the right-slot chip family
|
|
1213
|
+
(WIDGET-DESIGN.md): same 28px / --lb-radius-sm / neutral-fill silhouette
|
|
1214
|
+
as the quantity and savings chips. The visual box is 28px; the ::before
|
|
1215
|
+
pseudo-element extends the touch target to 44px without changing layout. */
|
|
1118
1216
|
.lb-mix-match__slot-remove {
|
|
1119
|
-
|
|
1120
|
-
|
|
1217
|
+
flex-shrink: 0;
|
|
1218
|
+
position: relative;
|
|
1219
|
+
width: 28px;
|
|
1220
|
+
height: 28px;
|
|
1221
|
+
min-width: 28px;
|
|
1121
1222
|
display: flex;
|
|
1122
1223
|
align-items: center;
|
|
1123
1224
|
justify-content: center;
|
|
1124
|
-
background:
|
|
1225
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
1125
1226
|
border: none;
|
|
1227
|
+
border-radius: var(--lb-radius-sm);
|
|
1126
1228
|
cursor: pointer;
|
|
1127
|
-
color: var(--lb-text);
|
|
1229
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1128
1230
|
padding: 0;
|
|
1129
1231
|
margin-left: auto;
|
|
1130
|
-
|
|
1232
|
+
transition: background 0.25s ease, color 0.25s ease;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
.lb-mix-match__slot-remove::before {
|
|
1236
|
+
content: '';
|
|
1237
|
+
position: absolute;
|
|
1238
|
+
inset: -8px;
|
|
1131
1239
|
}
|
|
1132
1240
|
|
|
1133
1241
|
.lb-mix-match__slot-remove:hover {
|
|
1242
|
+
background: color-mix(in srgb, var(--lb-text) 12%, transparent);
|
|
1134
1243
|
color: var(--lb-text);
|
|
1135
1244
|
}
|
|
1136
1245
|
|
|
@@ -1140,6 +1249,82 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1140
1249
|
box-shadow: none;
|
|
1141
1250
|
}
|
|
1142
1251
|
|
|
1252
|
+
/* "Required" chip \u2014 shown in the right slot in place of the \xD7 when a
|
|
1253
|
+
required product sits at its minimum (removing it would break the
|
|
1254
|
+
bundle). Right-slot chip family silhouette; pure state, not a control. */
|
|
1255
|
+
.lb-mix-match__slot-required {
|
|
1256
|
+
flex-shrink: 0;
|
|
1257
|
+
height: 28px;
|
|
1258
|
+
display: inline-flex;
|
|
1259
|
+
align-items: center;
|
|
1260
|
+
padding: 0 8px;
|
|
1261
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
1262
|
+
border-radius: var(--lb-radius-sm);
|
|
1263
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1264
|
+
font-size: 13px;
|
|
1265
|
+
font-weight: 500;
|
|
1266
|
+
line-height: 1;
|
|
1267
|
+
white-space: nowrap;
|
|
1268
|
+
margin-left: auto;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/* === "Add a product" \u2014 a dashed empty slot === */
|
|
1272
|
+
/* Reads as the next card to fill, mirroring the filled cards' geometry (the +
|
|
1273
|
+
sits in the thumbnail position). Dashed + theme-inherited text, so lime stays
|
|
1274
|
+
reserved for the CTA rather than tinting a non-action element. */
|
|
1275
|
+
.lb-mix-match__add-product {
|
|
1276
|
+
display: flex;
|
|
1277
|
+
align-items: center;
|
|
1278
|
+
gap: 12px;
|
|
1279
|
+
width: 100%;
|
|
1280
|
+
margin-top: 12px;
|
|
1281
|
+
padding: 8px;
|
|
1282
|
+
background: none;
|
|
1283
|
+
border: 1px dashed color-mix(in srgb, var(--lb-text) 28%, transparent);
|
|
1284
|
+
border-radius: var(--lb-radius);
|
|
1285
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1286
|
+
font-family: inherit;
|
|
1287
|
+
font-size: 15px;
|
|
1288
|
+
font-weight: 500;
|
|
1289
|
+
line-height: 1.2;
|
|
1290
|
+
text-align: left;
|
|
1291
|
+
cursor: pointer;
|
|
1292
|
+
box-sizing: border-box;
|
|
1293
|
+
transition: border-color 0.25s ease, color 0.25s ease;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
.lb-mix-match__add-product:hover {
|
|
1297
|
+
border-color: color-mix(in srgb, var(--lb-text) 45%, transparent);
|
|
1298
|
+
color: var(--lb-text);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.lb-mix-match__add-product:focus-visible {
|
|
1302
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1303
|
+
outline-offset: 2px;
|
|
1304
|
+
box-shadow: none;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.lb-mix-match__add-product-icon {
|
|
1308
|
+
display: flex;
|
|
1309
|
+
align-items: center;
|
|
1310
|
+
justify-content: center;
|
|
1311
|
+
width: 60px;
|
|
1312
|
+
min-width: 60px;
|
|
1313
|
+
height: 40px;
|
|
1314
|
+
flex-shrink: 0;
|
|
1315
|
+
color: inherit;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/* Derived "small" radius for the picker's inner controls (search, thumbnails,
|
|
1319
|
+
variant select, qty stepper, Add/Done buttons), one step tighter than the
|
|
1320
|
+
modal's --lb-picker-radius \u2014 the picker-scoped mirror of --lb-radius-sm in the
|
|
1321
|
+
main widget. Defined on the overlay so the modal AND the variant listbox
|
|
1322
|
+
(which portals up to [data-modal-overlay]) both inherit it. The modal shell
|
|
1323
|
+
and product tiles keep the full --lb-picker-radius. */
|
|
1324
|
+
[data-modal-overlay] {
|
|
1325
|
+
--lb-picker-radius-sm: max(0px, calc(var(--lb-picker-radius) - 4px));
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1143
1328
|
/* === Modal Overlay === */
|
|
1144
1329
|
.lb-mix-match__modal-overlay {
|
|
1145
1330
|
position: fixed;
|
|
@@ -1186,12 +1371,24 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1186
1371
|
/* === Modal Header === */
|
|
1187
1372
|
.lb-mix-match__modal-header {
|
|
1188
1373
|
display: flex;
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
padding: 20px
|
|
1374
|
+
flex-direction: column;
|
|
1375
|
+
gap: 16px;
|
|
1376
|
+
padding: 20px;
|
|
1377
|
+
border-bottom: 1px solid color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
|
|
1192
1378
|
flex-shrink: 0;
|
|
1193
1379
|
}
|
|
1194
1380
|
|
|
1381
|
+
.lb-mix-match__modal-header-top {
|
|
1382
|
+
display: flex;
|
|
1383
|
+
align-items: flex-start;
|
|
1384
|
+
justify-content: space-between;
|
|
1385
|
+
gap: 12px;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
.lb-mix-match__modal-heading {
|
|
1389
|
+
min-width: 0;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1195
1392
|
.lb-mix-match__modal-title {
|
|
1196
1393
|
font-size: 20px;
|
|
1197
1394
|
font-weight: 600;
|
|
@@ -1200,6 +1397,18 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1200
1397
|
color: inherit;
|
|
1201
1398
|
}
|
|
1202
1399
|
|
|
1400
|
+
/* Dynamic "Choose N more to unlock X% off" line under the title. */
|
|
1401
|
+
.lb-mix-match__modal-subtitle {
|
|
1402
|
+
margin: 4px 0 0;
|
|
1403
|
+
font-size: 13px;
|
|
1404
|
+
line-height: 18px;
|
|
1405
|
+
color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
.lb-mix-match__modal-subtitle:empty {
|
|
1409
|
+
display: none;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1203
1412
|
.lb-mix-match__modal-close {
|
|
1204
1413
|
min-width: 44px;
|
|
1205
1414
|
min-height: 44px;
|
|
@@ -1212,7 +1421,12 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1212
1421
|
color: var(--lb-picker-text);
|
|
1213
1422
|
border-radius: 8px;
|
|
1214
1423
|
padding: 0;
|
|
1215
|
-
margin: -12px -12px
|
|
1424
|
+
margin: -12px -12px 0 0;
|
|
1425
|
+
transition: background 0.25s ease;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
.lb-mix-match__modal-close:hover {
|
|
1429
|
+
background: color-mix(in srgb, var(--lb-picker-text) 5%, transparent);
|
|
1216
1430
|
}
|
|
1217
1431
|
|
|
1218
1432
|
.lb-mix-match__modal-close:focus-visible {
|
|
@@ -1221,22 +1435,81 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1221
1435
|
box-shadow: none;
|
|
1222
1436
|
}
|
|
1223
1437
|
|
|
1438
|
+
/* === Modal Filter Pills === */
|
|
1439
|
+
.lb-mix-match__filters {
|
|
1440
|
+
display: flex;
|
|
1441
|
+
flex-wrap: wrap;
|
|
1442
|
+
gap: 8px;
|
|
1443
|
+
/* Bottom padding lives on the filters (a fixed section) rather than the
|
|
1444
|
+
scrolling list, so the gap below the pills stays put as the list scrolls. */
|
|
1445
|
+
padding: 16px 20px 16px;
|
|
1446
|
+
flex-shrink: 0;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
.lb-mix-match__filter {
|
|
1450
|
+
padding: 6px 14px;
|
|
1451
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1452
|
+
border-radius: 999px;
|
|
1453
|
+
background: transparent;
|
|
1454
|
+
color: var(--lb-picker-text);
|
|
1455
|
+
font-family: inherit;
|
|
1456
|
+
font-size: 13px;
|
|
1457
|
+
font-weight: 500;
|
|
1458
|
+
line-height: 1;
|
|
1459
|
+
cursor: pointer;
|
|
1460
|
+
white-space: nowrap;
|
|
1461
|
+
transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
.lb-mix-match__filter:focus-visible {
|
|
1465
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1466
|
+
outline-offset: 2px;
|
|
1467
|
+
box-shadow: none;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/* Picker vars, not widget vars \u2014 the modal is its own colour context;
|
|
1471
|
+
mixing the two palettes can render the active label invisible. */
|
|
1472
|
+
.lb-mix-match__filter--active {
|
|
1473
|
+
background: var(--lb-picker-text);
|
|
1474
|
+
border-color: var(--lb-picker-text);
|
|
1475
|
+
color: var(--lb-picker-bg);
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1224
1478
|
/* === Modal Search === */
|
|
1225
1479
|
.lb-mix-match__modal-search {
|
|
1226
|
-
padding:
|
|
1480
|
+
padding: 16px 20px 0;
|
|
1227
1481
|
position: relative;
|
|
1228
1482
|
flex-shrink: 0;
|
|
1229
1483
|
}
|
|
1230
1484
|
|
|
1485
|
+
/* Search icon pinned inside the left edge of the input. Rendered as a masked
|
|
1486
|
+
pseudo-element on the search row (an <input> can't host ::before) so the
|
|
1487
|
+
icon colour tracks the merchant's picker text at 60% \u2014 consistent with the
|
|
1488
|
+
variant-select chevron and the rest of the picker. */
|
|
1489
|
+
.lb-mix-match__modal-search::before {
|
|
1490
|
+
content: "";
|
|
1491
|
+
position: absolute;
|
|
1492
|
+
left: 36px;
|
|
1493
|
+
top: 16px;
|
|
1494
|
+
bottom: 0;
|
|
1495
|
+
width: 18px;
|
|
1496
|
+
background-color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1497
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3E%3Cpath d='M21 21l-6 -6'/%3E%3C/svg%3E") center / 18px no-repeat;
|
|
1498
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3E%3Cpath d='M21 21l-6 -6'/%3E%3C/svg%3E") center / 18px no-repeat;
|
|
1499
|
+
pointer-events: none;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1231
1502
|
.lb-mix-match__modal-search-input {
|
|
1232
1503
|
width: 100%;
|
|
1233
|
-
padding: 12px 40px 12px
|
|
1234
|
-
border: var(--lb-picker-
|
|
1235
|
-
border-radius: var(--lb-picker-
|
|
1504
|
+
padding: 12px 40px 12px 44px;
|
|
1505
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1506
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1236
1507
|
font-size: 16px;
|
|
1237
1508
|
line-height: 20px;
|
|
1238
1509
|
color: var(--lb-picker-text);
|
|
1239
|
-
|
|
1510
|
+
/* padding-left (above) clears the search icon, which is drawn by
|
|
1511
|
+
.lb-mix-match__modal-search::before so it can take a themed colour. */
|
|
1512
|
+
background-color: var(--lb-picker-bg);
|
|
1240
1513
|
box-sizing: border-box;
|
|
1241
1514
|
-webkit-appearance: none;
|
|
1242
1515
|
appearance: none;
|
|
@@ -1255,10 +1528,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1255
1528
|
.lb-mix-match__modal-search-clear {
|
|
1256
1529
|
position: absolute;
|
|
1257
1530
|
right: 32px;
|
|
1258
|
-
/* Anchor to the input area only \u2014
|
|
1259
|
-
|
|
1260
|
-
top:
|
|
1261
|
-
bottom:
|
|
1531
|
+
/* Anchor to the input area only \u2014 the search row's top padding (16px) plus
|
|
1532
|
+
the input height keeps the button centred on it. */
|
|
1533
|
+
top: 16px;
|
|
1534
|
+
bottom: 0;
|
|
1262
1535
|
min-width: 32px;
|
|
1263
1536
|
min-height: 32px;
|
|
1264
1537
|
display: flex;
|
|
@@ -1267,56 +1540,74 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1267
1540
|
background: none;
|
|
1268
1541
|
border: none;
|
|
1269
1542
|
cursor: pointer;
|
|
1270
|
-
color: var(--lb-picker-text);
|
|
1543
|
+
color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1271
1544
|
padding: 0;
|
|
1272
1545
|
}
|
|
1273
1546
|
|
|
1547
|
+
/* When the filter row isn't shown (filters off, or fewer than two product
|
|
1548
|
+
types), the search row owns the gap above the product list. The icon and
|
|
1549
|
+
clear button re-anchor to bottom: 16px so they stay centred on the input. */
|
|
1550
|
+
.lb-mix-match__modal--filters-hidden .lb-mix-match__modal-search {
|
|
1551
|
+
padding-bottom: 16px;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.lb-mix-match__modal--filters-hidden .lb-mix-match__modal-search::before,
|
|
1555
|
+
.lb-mix-match__modal--filters-hidden .lb-mix-match__modal-search-clear {
|
|
1556
|
+
bottom: 16px;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1274
1559
|
/* === Modal Product List === */
|
|
1275
1560
|
.lb-mix-match__modal-list {
|
|
1276
1561
|
overflow-y: auto;
|
|
1277
1562
|
flex: 1;
|
|
1278
|
-
padding
|
|
1563
|
+
/* Always keep a small top padding so the first row's count bubbles
|
|
1564
|
+
(which sit at top: -8px) aren't clipped by overflow. The larger gap
|
|
1565
|
+
above the list comes from the filters' bottom padding, or \u2014 when no
|
|
1566
|
+
filters show \u2014 the search's bottom padding (see --filters-hidden). */
|
|
1567
|
+
padding: 8px 20px 20px;
|
|
1279
1568
|
-webkit-overflow-scrolling: touch;
|
|
1569
|
+
/* Two-column product grid. Each product is a vertical card (image on
|
|
1570
|
+
top, info below) built by JS. Stays 2-up on mobile too (the modal
|
|
1571
|
+
is a bottom sheet there). */
|
|
1572
|
+
display: grid;
|
|
1573
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1574
|
+
column-gap: 24px;
|
|
1575
|
+
row-gap: 28px;
|
|
1576
|
+
align-content: start;
|
|
1280
1577
|
}
|
|
1281
1578
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
column-gap: 20px;
|
|
1287
|
-
padding-top: 20px;
|
|
1288
|
-
padding-bottom: 16px;
|
|
1289
|
-
border-bottom: 1px solid color-mix(in srgb, var(--lb-picker-text) 7%, transparent);
|
|
1579
|
+
/* When neither search nor filters render, the list follows the header
|
|
1580
|
+
directly and needs the full top gap restored. */
|
|
1581
|
+
.lb-mix-match__modal-header + .lb-mix-match__modal-list {
|
|
1582
|
+
padding-top: 16px;
|
|
1290
1583
|
}
|
|
1291
1584
|
|
|
1292
|
-
.lb-mix-match__modal-product
|
|
1293
|
-
|
|
1585
|
+
.lb-mix-match__modal-product {
|
|
1586
|
+
display: flex;
|
|
1587
|
+
flex-direction: column;
|
|
1588
|
+
padding: 8px;
|
|
1589
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1590
|
+
border-radius: var(--lb-picker-radius);
|
|
1591
|
+
box-sizing: border-box;
|
|
1592
|
+
transition: border-color 0.25s ease, background 0.25s ease;
|
|
1294
1593
|
}
|
|
1295
1594
|
|
|
1296
1595
|
.lb-mix-match__modal-product-thumb {
|
|
1596
|
+
/* Fills the grid cell \u2014 the image sets the visual size now, not a fixed
|
|
1597
|
+
60px thumb. Aspect-ratio + object-fit (below) crop to the merchant's
|
|
1598
|
+
pickerThumbnailRatio; "original" shows the full uncropped image. */
|
|
1599
|
+
width: 100%;
|
|
1600
|
+
/* Positioning context for the "Added" badge. */
|
|
1297
1601
|
position: relative;
|
|
1298
|
-
width: 60px;
|
|
1299
|
-
min-width: 60px;
|
|
1300
1602
|
/* Modal picker thumbs follow the merchant's pickerThumbnailRatio \u2014
|
|
1301
1603
|
independent from the main widget's thumbnailRatio so a merchant can
|
|
1302
1604
|
e.g. show tall picker thumbs with square main thumbs. */
|
|
1303
1605
|
aspect-ratio: var(--lb-picker-thumbnail-aspect-ratio, 1 / 1);
|
|
1304
|
-
border-radius: var(--lb-picker-
|
|
1305
|
-
border: var(--lb-picker-product-border-width) solid var(--lb-picker-product-border-color);
|
|
1606
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1306
1607
|
box-sizing: border-box;
|
|
1307
|
-
overflow:
|
|
1608
|
+
overflow: hidden;
|
|
1308
1609
|
background: var(--lb-thumbnail-bg);
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
/* Qty badge inside the picker modal inherits picker-product border (width + color) plus
|
|
1312
|
-
inverted picker bg/text for clear contrast against the modal \u2014 always stays round
|
|
1313
|
-
(the badge shape is independent of the thumbnail shape). */
|
|
1314
|
-
.lb-mix-match__modal-product-thumb .lb-bundle-qty-badge.lb-bundle-qty-badge {
|
|
1315
|
-
/* --lb-picker-qty-badge-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
1316
|
-
display: var(--lb-picker-qty-badge-display, flex);
|
|
1317
|
-
background: var(--lb-picker-qty-badge-bg);
|
|
1318
|
-
color: var(--lb-picker-qty-badge-color);
|
|
1319
|
-
border: var(--lb-picker-product-border-width) solid var(--lb-picker-product-border-color);
|
|
1610
|
+
margin-bottom: 10px;
|
|
1320
1611
|
}
|
|
1321
1612
|
|
|
1322
1613
|
.lb-mix-match__modal-product-thumb img {
|
|
@@ -1325,7 +1616,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1325
1616
|
to auto/contain so the image renders uncropped at intrinsic ratio. */
|
|
1326
1617
|
height: var(--lb-picker-thumbnail-img-height, 100%);
|
|
1327
1618
|
object-fit: var(--lb-picker-thumbnail-img-fit, cover);
|
|
1328
|
-
border-radius:
|
|
1619
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1329
1620
|
}
|
|
1330
1621
|
|
|
1331
1622
|
.lb-mix-match__modal-product-info {
|
|
@@ -1335,21 +1626,58 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1335
1626
|
|
|
1336
1627
|
.lb-mix-match__modal-product-title {
|
|
1337
1628
|
font-size: 16px;
|
|
1338
|
-
font-weight:
|
|
1629
|
+
font-weight: 600;
|
|
1339
1630
|
line-height: 20px;
|
|
1340
1631
|
color: inherit;
|
|
1341
1632
|
margin: 0;
|
|
1342
1633
|
}
|
|
1343
1634
|
|
|
1635
|
+
/* Modal titles link to the product page (new tab) \u2014 quiet by default,
|
|
1636
|
+
underline on hover so the row's Add affordance stays dominant. */
|
|
1637
|
+
.lb-mix-match__modal-product-title a {
|
|
1638
|
+
color: inherit;
|
|
1639
|
+
/* Underline fades in \u2014 text-decoration itself can't transition, but its
|
|
1640
|
+
color can. */
|
|
1641
|
+
text-decoration: underline;
|
|
1642
|
+
text-decoration-color: transparent;
|
|
1643
|
+
transition: text-decoration-color 0.25s ease;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
.lb-mix-match__modal-product-title a:hover {
|
|
1647
|
+
text-decoration-color: currentColor;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.lb-mix-match__modal-product-title a:focus-visible {
|
|
1651
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1652
|
+
outline-offset: 2px;
|
|
1653
|
+
border-radius: 2px;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1344
1656
|
.lb-mix-match__modal-product-price {
|
|
1345
|
-
|
|
1657
|
+
display: flex;
|
|
1658
|
+
align-items: baseline;
|
|
1659
|
+
gap: 6px;
|
|
1660
|
+
font-size: 14px;
|
|
1346
1661
|
line-height: 20px;
|
|
1347
1662
|
color: inherit;
|
|
1348
1663
|
margin: 2px 0 0;
|
|
1349
1664
|
}
|
|
1350
1665
|
|
|
1666
|
+
.lb-mix-match__modal-product-compare {
|
|
1667
|
+
/* --lb-product-compare-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
1668
|
+
display: var(--lb-product-compare-display, inline);
|
|
1669
|
+
font-size: 13px;
|
|
1670
|
+
font-weight: 400;
|
|
1671
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
1672
|
+
text-decoration: line-through;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
.lb-mix-match__modal-product-compare[hidden] {
|
|
1676
|
+
display: none;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1351
1679
|
.lb-mix-match__modal-product-unit-price {
|
|
1352
|
-
font-size:
|
|
1680
|
+
font-size: 12px;
|
|
1353
1681
|
line-height: 16px;
|
|
1354
1682
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
1355
1683
|
margin: 2px 0 0;
|
|
@@ -1362,8 +1690,8 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1362
1690
|
.lb-mix-match__variant-select {
|
|
1363
1691
|
font-size: 12px;
|
|
1364
1692
|
padding: 4px 24px 4px 8px;
|
|
1365
|
-
border: var(--lb-picker-
|
|
1366
|
-
border-radius: var(--lb-picker-
|
|
1693
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1694
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1367
1695
|
background-color: var(--lb-picker-bg);
|
|
1368
1696
|
background-image: var(--lb-picker-variant-chevron);
|
|
1369
1697
|
background-repeat: no-repeat;
|
|
@@ -1371,10 +1699,12 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1371
1699
|
background-size: 12px;
|
|
1372
1700
|
color: var(--lb-picker-text);
|
|
1373
1701
|
font-family: inherit;
|
|
1374
|
-
|
|
1702
|
+
box-sizing: border-box;
|
|
1703
|
+
min-height: 40px;
|
|
1704
|
+
max-height: 40px;
|
|
1375
1705
|
cursor: pointer;
|
|
1376
|
-
width:
|
|
1377
|
-
max-width:
|
|
1706
|
+
width: 100%;
|
|
1707
|
+
max-width: 100%;
|
|
1378
1708
|
appearance: none;
|
|
1379
1709
|
-webkit-appearance: none;
|
|
1380
1710
|
}
|
|
@@ -1386,13 +1716,11 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1386
1716
|
}
|
|
1387
1717
|
|
|
1388
1718
|
/* Per-pick quantity stepper inside the picker modal product row.
|
|
1389
|
-
Three flex cells (\u2212 / number / +) sharing a single outer border
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
Mirrors extensions/bundle-theme/assets/bundle-mix-match.css so
|
|
1395
|
-
the headless web component matches the Liquid theme widget. */
|
|
1719
|
+
Three flex cells (\u2212 / number / +) sharing a single outer border that
|
|
1720
|
+
inherits the modal "Borders" (--lb-picker-border-* / --lb-picker-radius),
|
|
1721
|
+
like every other control in the modal. The cell dividers come from a 1px
|
|
1722
|
+
border on the centre value rather than per-button borders, so the rounded
|
|
1723
|
+
outer corners stay clean. */
|
|
1396
1724
|
/* Quantity label + stepper sit together in a .lb-bundle-variant-option-group
|
|
1397
1725
|
wrapper so the label-to-stepper gap inherits the same 2px the variant
|
|
1398
1726
|
pickers use. The wrapper carries the margin-top that spaces the qty
|
|
@@ -1409,13 +1737,20 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1409
1737
|
|
|
1410
1738
|
.lb-mix-match__qty-stepper {
|
|
1411
1739
|
display: inline-flex;
|
|
1412
|
-
align-items:
|
|
1740
|
+
align-items: center;
|
|
1741
|
+
justify-content: space-between;
|
|
1742
|
+
width: 100%;
|
|
1413
1743
|
flex-shrink: 0;
|
|
1414
|
-
border: var(--lb-picker-
|
|
1415
|
-
border-radius: var(--lb-picker-
|
|
1744
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1745
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1416
1746
|
background-color: var(--lb-picker-bg);
|
|
1417
1747
|
overflow: hidden;
|
|
1418
1748
|
box-sizing: border-box;
|
|
1749
|
+
/* Pin the height so the stepper and Add button stay equal-height even when
|
|
1750
|
+
they wrap onto separate rows on narrow (mobile) cards \u2014 without this the
|
|
1751
|
+
stepper loses its cross-axis stretch reference and shrinks. */
|
|
1752
|
+
min-height: 32px;
|
|
1753
|
+
max-height: 32px;
|
|
1419
1754
|
}
|
|
1420
1755
|
|
|
1421
1756
|
.lb-mix-match__qty-stepper-button {
|
|
@@ -1424,8 +1759,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1424
1759
|
background: transparent;
|
|
1425
1760
|
border: none;
|
|
1426
1761
|
margin: 0;
|
|
1427
|
-
padding: 0;
|
|
1428
|
-
width:
|
|
1762
|
+
padding: 0 4px;
|
|
1763
|
+
width: 24px;
|
|
1764
|
+
height: 24px;
|
|
1765
|
+
box-sizing: border-box;
|
|
1429
1766
|
font-family: inherit;
|
|
1430
1767
|
font-size: 16px;
|
|
1431
1768
|
font-weight: 500;
|
|
@@ -1452,8 +1789,8 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1452
1789
|
display: inline-flex;
|
|
1453
1790
|
align-items: center;
|
|
1454
1791
|
justify-content: center;
|
|
1455
|
-
|
|
1456
|
-
|
|
1792
|
+
width: 24px;
|
|
1793
|
+
height: 24px;
|
|
1457
1794
|
font-family: inherit;
|
|
1458
1795
|
font-size: 13px;
|
|
1459
1796
|
font-weight: 500;
|
|
@@ -1471,22 +1808,27 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1471
1808
|
display: flex;
|
|
1472
1809
|
flex-wrap: wrap;
|
|
1473
1810
|
align-items: stretch;
|
|
1474
|
-
row-gap:
|
|
1811
|
+
row-gap: 8px;
|
|
1475
1812
|
column-gap: 8px;
|
|
1476
1813
|
margin-top: 12px;
|
|
1477
1814
|
}
|
|
1478
1815
|
|
|
1479
1816
|
.lb-mix-match__modal-add {
|
|
1480
1817
|
flex: 1;
|
|
1481
|
-
padding:
|
|
1818
|
+
padding: 8px 16px;
|
|
1482
1819
|
background: var(--lb-picker-add-bg);
|
|
1483
1820
|
color: var(--lb-picker-add-label);
|
|
1484
1821
|
border: var(--lb-picker-add-border-width) solid var(--lb-picker-add-border-color);
|
|
1485
|
-
border-radius: var(--lb-picker-
|
|
1822
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1486
1823
|
box-sizing: border-box;
|
|
1487
1824
|
font-size: 12px;
|
|
1488
1825
|
font-weight: 600;
|
|
1489
1826
|
cursor: pointer;
|
|
1827
|
+
/* Matches the qty stepper's pinned height so the two stay equal-height
|
|
1828
|
+
whether they sit on one row or wrap onto two on narrow (mobile) cards. */
|
|
1829
|
+
min-height: 32px;
|
|
1830
|
+
max-height: 32px;
|
|
1831
|
+
transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
|
|
1490
1832
|
}
|
|
1491
1833
|
|
|
1492
1834
|
.lb-mix-match__modal-add:hover {
|
|
@@ -1505,16 +1847,53 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1505
1847
|
cursor: not-allowed;
|
|
1506
1848
|
}
|
|
1507
1849
|
|
|
1508
|
-
/*
|
|
1509
|
-
.
|
|
1510
|
-
|
|
1850
|
+
/* In-bundle "Remove" \u2014 the Add button's colours INVERTED (label and
|
|
1851
|
+
background swap), no icons. The base :hover (opacity 0.9) applies as-is;
|
|
1852
|
+
state feedback lives on the thumbnail's "Added" badge, not the button. */
|
|
1853
|
+
.lb-mix-match__modal-add--added {
|
|
1854
|
+
background: var(--lb-picker-add-label);
|
|
1855
|
+
color: var(--lb-picker-add-bg);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
/* Required-locked row \u2014 the Remove slot holds an inert quiet "Required"
|
|
1859
|
+
label (button disabled); the thumbnail's Added badge still carries the
|
|
1860
|
+
in-bundle state. Removal returns once another slot covers the product's
|
|
1861
|
+
minimum (variant swap flow). */
|
|
1862
|
+
.lb-mix-match__modal-add--added.lb-mix-match__modal-add--required {
|
|
1863
|
+
background: transparent;
|
|
1864
|
+
border-color: transparent;
|
|
1865
|
+
color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1866
|
+
cursor: default;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
.lb-mix-match__modal-add--added.lb-mix-match__modal-add--required:hover {
|
|
1870
|
+
opacity: 1;
|
|
1511
1871
|
}
|
|
1512
1872
|
|
|
1513
|
-
/*
|
|
1514
|
-
|
|
1515
|
-
counts distinct products, not slot occupancy). The thumb keeps
|
|
1516
|
-
its qty badge so the shopper sees what's already in the bundle. */
|
|
1873
|
+
/* In-bundle card \u2014 border only, a touch darker than the resting border;
|
|
1874
|
+
the thumbnail badge carries the "Added" state (no background tint). */
|
|
1517
1875
|
.lb-mix-match__modal-product--in-bundle {
|
|
1876
|
+
border-color: color-mix(in srgb, var(--lb-picker-text) 30%, transparent);
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
/* "Added" badge \u2014 top-right of the thumbnail, in the Add button's colours;
|
|
1880
|
+
pure state (pointer-events: none), the row's Remove button acts. */
|
|
1881
|
+
.lb-mix-match__modal-added-badge {
|
|
1882
|
+
position: absolute;
|
|
1883
|
+
top: 6px;
|
|
1884
|
+
right: 6px;
|
|
1885
|
+
background: var(--lb-picker-add-bg);
|
|
1886
|
+
color: var(--lb-picker-add-label);
|
|
1887
|
+
font-size: 11px;
|
|
1888
|
+
font-weight: 600;
|
|
1889
|
+
line-height: 1;
|
|
1890
|
+
padding: 8px 16px;
|
|
1891
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1892
|
+
pointer-events: none;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
/* Sold out product row */
|
|
1896
|
+
.lb-mix-match__modal-product--sold-out {
|
|
1518
1897
|
opacity: 0.5;
|
|
1519
1898
|
}
|
|
1520
1899
|
|
|
@@ -1525,6 +1904,19 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1525
1904
|
white-space: nowrap;
|
|
1526
1905
|
}
|
|
1527
1906
|
|
|
1907
|
+
/* "Needs N spots" hint \u2014 exact-size enforcement: the product's minimum
|
|
1908
|
+
pick exceeds the bundle's remaining open spots, so its Add and stepper
|
|
1909
|
+
are disabled. Same quiet label treatment as the sold-out state. */
|
|
1910
|
+
.lb-mix-match__modal-needs-spots {
|
|
1911
|
+
display: block;
|
|
1912
|
+
margin-top: 8px;
|
|
1913
|
+
font-size: 12px;
|
|
1914
|
+
color: inherit;
|
|
1915
|
+
font-weight: 500;
|
|
1916
|
+
white-space: nowrap;
|
|
1917
|
+
opacity: 0.7;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1528
1920
|
/* === Modal Empty State === */
|
|
1529
1921
|
.lb-mix-match__modal-empty {
|
|
1530
1922
|
padding: 32px 20px;
|
|
@@ -1537,11 +1929,60 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1537
1929
|
color: var(--lb-picker-text);
|
|
1538
1930
|
}
|
|
1539
1931
|
|
|
1932
|
+
/* === Modal Footer === */
|
|
1933
|
+
.lb-mix-match__modal-footer {
|
|
1934
|
+
display: flex;
|
|
1935
|
+
align-items: center;
|
|
1936
|
+
justify-content: space-between;
|
|
1937
|
+
gap: 12px;
|
|
1938
|
+
padding: 16px 20px;
|
|
1939
|
+
border-top: 1px solid color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
|
|
1940
|
+
flex-shrink: 0;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.lb-mix-match__modal-footer-count {
|
|
1944
|
+
font-size: 13px;
|
|
1945
|
+
font-weight: 500;
|
|
1946
|
+
color: color-mix(in srgb, var(--lb-picker-text) 70%, transparent);
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
/* "Done" reuses the picker Add-button styling so it matches the Add buttons. */
|
|
1950
|
+
.lb-mix-match__modal-done {
|
|
1951
|
+
padding: 10px 24px;
|
|
1952
|
+
transition: opacity 0.25s ease;
|
|
1953
|
+
background: var(--lb-picker-add-bg);
|
|
1954
|
+
color: var(--lb-picker-add-label);
|
|
1955
|
+
border: var(--lb-picker-add-border-width) solid var(--lb-picker-add-border-color);
|
|
1956
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1957
|
+
box-sizing: border-box;
|
|
1958
|
+
font-family: inherit;
|
|
1959
|
+
font-size: 14px;
|
|
1960
|
+
font-weight: 600;
|
|
1961
|
+
cursor: pointer;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
.lb-mix-match__modal-done:hover {
|
|
1965
|
+
opacity: 0.9;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
.lb-mix-match__modal-done:focus-visible {
|
|
1969
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1970
|
+
outline-offset: 2px;
|
|
1971
|
+
box-shadow: none;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1540
1974
|
/* Hidden utility for search filtering */
|
|
1541
1975
|
.lb-hidden {
|
|
1542
1976
|
display: none !important;
|
|
1543
1977
|
}
|
|
1544
1978
|
|
|
1979
|
+
/* === Desktop: stepper group + Add button share the action row equally === */
|
|
1980
|
+
@media (min-width: 768px) {
|
|
1981
|
+
.lb-mix-match__qty-stepper-group {
|
|
1982
|
+
flex: 1;
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1545
1986
|
/* === Mobile Full-Screen Modal === */
|
|
1546
1987
|
@media (max-width: 767px) {
|
|
1547
1988
|
.lb-mix-match__modal-overlay {
|
|
@@ -1559,9 +2000,44 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1559
2000
|
transform: translateY(0);
|
|
1560
2001
|
}
|
|
1561
2002
|
|
|
2003
|
+
/* Touch targets: bump the picker controls to ~44px on touch devices.
|
|
2004
|
+
The stepper and Add button stay equal-height (both pinned to 44px). */
|
|
1562
2005
|
.lb-mix-match__variant-select {
|
|
1563
|
-
width:
|
|
1564
|
-
max-width:
|
|
2006
|
+
width: 100%;
|
|
2007
|
+
max-width: 100%;
|
|
2008
|
+
min-height: 44px;
|
|
2009
|
+
max-height: none;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
.lb-mix-match__qty-stepper {
|
|
2013
|
+
min-height: 44px;
|
|
2014
|
+
max-height: 44px;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
.lb-mix-match__qty-stepper-button {
|
|
2018
|
+
width: 44px;
|
|
2019
|
+
height: 44px;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
.lb-mix-match__modal-add {
|
|
2023
|
+
min-height: 44px;
|
|
2024
|
+
max-height: 44px;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
/* Full-width qty stepper on mobile \u2014 once it wraps below the Add button,
|
|
2028
|
+
stretch it to the row and space the \u2212/value/+ across it so it mirrors
|
|
2029
|
+
the full-width button instead of staying a compact control. */
|
|
2030
|
+
.lb-mix-match__qty-stepper-group {
|
|
2031
|
+
width: 100%;
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
/* Small phones: a 2-up card grid leaves each picker card cramped (image +
|
|
2036
|
+
variant selects + stepper + Add at ~148px wide). Drop to a single column
|
|
2037
|
+
below 430px; larger phones and up keep the 2-up grid. */
|
|
2038
|
+
@media (max-width: 430px) {
|
|
2039
|
+
.lb-mix-match__modal-list {
|
|
2040
|
+
grid-template-columns: 1fr;
|
|
1565
2041
|
}
|
|
1566
2042
|
}
|
|
1567
2043
|
|
|
@@ -1569,85 +2045,86 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1569
2045
|
@media (prefers-reduced-motion: reduce) {
|
|
1570
2046
|
.lb-mix-match__modal-overlay,
|
|
1571
2047
|
.lb-mix-match__modal,
|
|
1572
|
-
.lb-mix-match__progress-
|
|
2048
|
+
.lb-mix-match__progress-segment,
|
|
2049
|
+
.lb-mix-match__progress-segment::after {
|
|
1573
2050
|
transition: none;
|
|
1574
2051
|
}
|
|
1575
2052
|
}
|
|
1576
|
-
`,
|
|
2053
|
+
`,nr=`/* Lime Bundles \u2014 Volume / Quantity Breaks styles */
|
|
1577
2054
|
|
|
1578
2055
|
.lb-volume__tiers {
|
|
1579
2056
|
display: flex;
|
|
1580
2057
|
flex-direction: column;
|
|
1581
|
-
gap:
|
|
2058
|
+
gap: 16px;
|
|
1582
2059
|
max-height: var(--lb-list-max-height);
|
|
1583
2060
|
overflow-y: auto;
|
|
1584
|
-
/*
|
|
1585
|
-
scrollbar-width: thin;
|
|
1586
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text) 15%, transparent)
|
|
1587
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
2061
|
+
/* Scrollbar hidden + edge fade \u2014 see .lb-edge-fade in bundle-base.css. */
|
|
1588
2062
|
}
|
|
1589
2063
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
.lb-volume__tiers::-webkit-scrollbar-thumb {
|
|
1596
|
-
background: color-mix(in srgb, var(--lb-text) 15%, transparent);
|
|
1597
|
-
border-radius: 2px;
|
|
2064
|
+
/* Reserve room for the floating "Most popular" badge ONLY when the first tier
|
|
2065
|
+
is the popular one \u2014 that's the single case where the badge has no card above
|
|
2066
|
+
it to float into and would otherwise clip at the scroll container's top. */
|
|
2067
|
+
.lb-volume__tiers:has(> .lb-volume__tier:first-child .lb-volume__tier-badge) {
|
|
2068
|
+
padding-top: 12px;
|
|
1598
2069
|
}
|
|
1599
2070
|
|
|
2071
|
+
/* Tier card \u2014 mirrors the fixed / mix & match bundle card so volume reads as
|
|
2072
|
+
the same app: a bordered card with matching geometry, a price row, and a
|
|
2073
|
+
right-slot chip. The radio sits where those cards put the thumbnail, since a
|
|
2074
|
+
volume tier is the same product at a different quantity (no thumbnail). */
|
|
1600
2075
|
.lb-volume__tier {
|
|
2076
|
+
position: relative;
|
|
1601
2077
|
display: flex;
|
|
1602
2078
|
align-items: center;
|
|
1603
2079
|
gap: 12px;
|
|
1604
|
-
border: var(--lb-
|
|
1605
|
-
border-radius: var(--lb-
|
|
1606
|
-
padding: 12px
|
|
2080
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2081
|
+
border-radius: var(--lb-radius);
|
|
2082
|
+
padding: 12px;
|
|
2083
|
+
/* border-box so the selected tier's thicker (2px) border grows inward and
|
|
2084
|
+
doesn't shift the card by 1px when selected. */
|
|
2085
|
+
box-sizing: border-box;
|
|
1607
2086
|
cursor: pointer;
|
|
1608
|
-
|
|
1609
|
-
transition: border-color 0.15s ease;
|
|
2087
|
+
transition: border-color 0.25s ease, background 0.25s ease;
|
|
1610
2088
|
}
|
|
1611
2089
|
|
|
1612
2090
|
.lb-volume__tier:hover {
|
|
1613
|
-
border-color: var(--lb-
|
|
2091
|
+
border-color: color-mix(in srgb, var(--lb-text) 28%, transparent);
|
|
1614
2092
|
}
|
|
1615
2093
|
|
|
1616
|
-
/* Suppress the UA default focus outline + Dawn's focus shadow so a
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
outline below. Keyboard focus is still indicated by the
|
|
1620
|
-
:focus-visible rule. */
|
|
2094
|
+
/* Suppress the UA default focus outline + Dawn's focus shadow so a freshly
|
|
2095
|
+
clicked tier doesn't briefly show the focus ring on top of the selected
|
|
2096
|
+
state. Keyboard focus is still indicated by the :focus-visible rule. */
|
|
1621
2097
|
.lb-volume__tier:focus {
|
|
1622
2098
|
outline: none;
|
|
1623
2099
|
box-shadow: none;
|
|
1624
2100
|
}
|
|
1625
2101
|
|
|
1626
|
-
/* Keyboard focus indicator \u2014 explicitly excludes the selected tier so
|
|
1627
|
-
the selected-state outline rule below has full ownership of the
|
|
1628
|
-
outline property when both states apply at once. */
|
|
1629
2102
|
.lb-volume__tier:focus-visible:not([aria-checked="true"]) {
|
|
1630
2103
|
outline: 2px solid var(--lb-primary-color);
|
|
1631
2104
|
outline-offset: -2px;
|
|
1632
2105
|
box-shadow: none;
|
|
1633
2106
|
}
|
|
1634
2107
|
|
|
2108
|
+
/* Selected tier \u2014 the same quiet neutral highlight as the mix & match
|
|
2109
|
+
in-bundle / Added card (soft tint + stronger border), plus the filled
|
|
2110
|
+
radio, so "selected" looks the same everywhere in the app. */
|
|
1635
2111
|
.lb-volume__tier[aria-checked="true"] {
|
|
1636
|
-
border-color: var(--lb-
|
|
1637
|
-
|
|
1638
|
-
outline-offset: calc(-1 * var(--lb-tier-selected-border-width));
|
|
2112
|
+
border-color: var(--lb-text);
|
|
2113
|
+
border-width: 2px;
|
|
1639
2114
|
}
|
|
1640
2115
|
|
|
1641
2116
|
.lb-volume__radio {
|
|
1642
2117
|
width: 20px;
|
|
1643
2118
|
height: 20px;
|
|
1644
2119
|
min-width: 20px;
|
|
1645
|
-
|
|
2120
|
+
flex: none;
|
|
2121
|
+
box-sizing: border-box;
|
|
2122
|
+
border: 2px solid color-mix(in srgb, var(--lb-text) 45%, transparent);
|
|
1646
2123
|
border-radius: 50%;
|
|
1647
2124
|
display: flex;
|
|
1648
2125
|
align-items: center;
|
|
1649
2126
|
justify-content: center;
|
|
1650
|
-
transition: border-color 0.
|
|
2127
|
+
transition: border-color 0.25s ease;
|
|
1651
2128
|
}
|
|
1652
2129
|
|
|
1653
2130
|
.lb-volume__tier[aria-checked="true"] .lb-volume__radio {
|
|
@@ -1655,70 +2132,295 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1655
2132
|
}
|
|
1656
2133
|
|
|
1657
2134
|
.lb-volume__radio-dot {
|
|
1658
|
-
width:
|
|
1659
|
-
height:
|
|
2135
|
+
width: 10px;
|
|
2136
|
+
height: 10px;
|
|
1660
2137
|
border-radius: 50%;
|
|
1661
2138
|
background: transparent;
|
|
1662
|
-
transition: background 0.
|
|
2139
|
+
transition: background 0.25s ease;
|
|
1663
2140
|
}
|
|
1664
2141
|
|
|
1665
2142
|
.lb-volume__tier[aria-checked="true"] .lb-volume__radio-dot {
|
|
1666
2143
|
background: var(--lb-text);
|
|
1667
2144
|
}
|
|
1668
2145
|
|
|
1669
|
-
/*
|
|
1670
|
-
.lb-volume__tier-
|
|
2146
|
+
/* Info column: the quantity over the price row. */
|
|
2147
|
+
.lb-volume__tier-info {
|
|
1671
2148
|
flex: 1;
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
2149
|
+
min-width: 0;
|
|
2150
|
+
display: flex;
|
|
2151
|
+
flex-direction: column;
|
|
1675
2152
|
}
|
|
1676
2153
|
|
|
1677
2154
|
.lb-volume__tier-label {
|
|
1678
2155
|
font-size: 16px;
|
|
1679
|
-
font-weight:
|
|
2156
|
+
font-weight: 600;
|
|
2157
|
+
line-height: 20px;
|
|
1680
2158
|
color: var(--lb-text);
|
|
1681
2159
|
}
|
|
1682
2160
|
|
|
2161
|
+
/* Right column \u2014 stacks the "Most popular" badge (when present) over the
|
|
2162
|
+
savings chip, so the markers group on the right and the quantity row stays
|
|
2163
|
+
clean. */
|
|
2164
|
+
.lb-volume__tier-right {
|
|
2165
|
+
flex: none;
|
|
2166
|
+
display: flex;
|
|
2167
|
+
flex-direction: column;
|
|
2168
|
+
align-items: flex-end;
|
|
2169
|
+
gap: 6px;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
/* "Most popular" pill \u2014 a floating crown straddling the card's top-right edge.
|
|
2173
|
+
The 16px gap on .lb-volume__tiers leaves room for it above each card. */
|
|
1683
2174
|
.lb-volume__tier-badge {
|
|
1684
|
-
|
|
2175
|
+
position: absolute;
|
|
2176
|
+
top: -12px;
|
|
2177
|
+
right: 12px;
|
|
2178
|
+
z-index: 1;
|
|
1685
2179
|
font-size: 12px;
|
|
1686
|
-
|
|
2180
|
+
font-weight: 500;
|
|
2181
|
+
line-height: 1;
|
|
1687
2182
|
color: var(--lb-popular-badge-text);
|
|
1688
2183
|
background: var(--lb-popular-badge-bg);
|
|
1689
2184
|
border: var(--lb-popular-badge-border-width) solid var(--lb-popular-badge-border-color);
|
|
1690
|
-
border-radius: var(--lb-
|
|
1691
|
-
padding: 4px
|
|
2185
|
+
border-radius: var(--lb-radius-sm);
|
|
2186
|
+
padding: 4px 9px;
|
|
1692
2187
|
}
|
|
1693
2188
|
|
|
2189
|
+
/* Price row \u2014 the same struck \u2192 per-unit \u2192 "each" treatment the product cards
|
|
2190
|
+
use (compare-at muted and struck, per-unit price, tabular figures). */
|
|
1694
2191
|
.lb-volume__tier-price {
|
|
1695
|
-
|
|
2192
|
+
display: flex;
|
|
2193
|
+
align-items: baseline;
|
|
2194
|
+
gap: 6px;
|
|
2195
|
+
flex-wrap: wrap;
|
|
2196
|
+
margin-top: 4px;
|
|
1696
2197
|
font-size: 14px;
|
|
1697
|
-
font-weight: 500;
|
|
1698
2198
|
color: var(--lb-text);
|
|
2199
|
+
font-variant-numeric: tabular-nums;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
.lb-volume__tier-compare {
|
|
2203
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
2204
|
+
text-decoration: line-through;
|
|
1699
2205
|
}
|
|
1700
2206
|
|
|
1701
2207
|
.lb-volume__tier-unit {
|
|
1702
2208
|
font-size: 12px;
|
|
2209
|
+
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
/* Savings chip \u2014 the same soft neutral chip as the fixed card's quantity chip,
|
|
2213
|
+
here carrying the per-tier discount so "buy more, save more" is scannable. */
|
|
2214
|
+
.lb-volume__tier-savings {
|
|
2215
|
+
flex-shrink: 0;
|
|
2216
|
+
display: inline-flex;
|
|
2217
|
+
align-items: center;
|
|
2218
|
+
height: 28px;
|
|
2219
|
+
padding: 0 8px;
|
|
2220
|
+
border-radius: var(--lb-radius-sm);
|
|
2221
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
2222
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
2223
|
+
font-size: 13px;
|
|
2224
|
+
font-weight: 500;
|
|
2225
|
+
line-height: 1;
|
|
2226
|
+
white-space: nowrap;
|
|
2227
|
+
font-variant-numeric: tabular-nums;
|
|
2228
|
+
}
|
|
2229
|
+
`,rr=`/* Lime Bundles \u2014 BOGO (Buy X Get Y) bundle styles */
|
|
2230
|
+
|
|
2231
|
+
.lb-bogo__products {
|
|
2232
|
+
display: flex;
|
|
2233
|
+
flex-direction: column;
|
|
2234
|
+
gap: 12px;
|
|
2235
|
+
margin: 0;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
/* Buy/get product cards \u2014 same bordered-card construction as fixed rows so
|
|
2239
|
+
the two bundle types read the same on a storefront. */
|
|
2240
|
+
.lb-bogo .lb-bundle-product-row {
|
|
2241
|
+
display: flex;
|
|
2242
|
+
align-items: flex-start;
|
|
2243
|
+
gap: 12px;
|
|
2244
|
+
padding: 8px;
|
|
2245
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2246
|
+
border-radius: var(--lb-radius);
|
|
2247
|
+
box-sizing: border-box;
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
.lb-bogo .lb-bundle-thumbnail {
|
|
2251
|
+
width: 60px;
|
|
2252
|
+
min-width: 60px;
|
|
2253
|
+
border-radius: var(--lb-radius-sm);
|
|
2254
|
+
box-sizing: border-box;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
.lb-bogo .lb-bundle-thumbnail img {
|
|
2258
|
+
border-radius: var(--lb-radius-sm);
|
|
2259
|
+
border: none;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/* The "+" divider between the buy and get cards \u2014 a small accent medallion
|
|
2263
|
+
so the offer's hinge ("this plus that") stands out. Circular by design:
|
|
2264
|
+
it is a connector dot, not a card control, so it sits outside the
|
|
2265
|
+
--lb-radius system (blessed in WIDGET-DESIGN.md). */
|
|
2266
|
+
.lb-bogo__plus {
|
|
2267
|
+
align-self: center;
|
|
2268
|
+
display: inline-flex;
|
|
2269
|
+
align-items: center;
|
|
2270
|
+
justify-content: center;
|
|
2271
|
+
width: 24px;
|
|
2272
|
+
height: 24px;
|
|
2273
|
+
border-radius: 50%;
|
|
2274
|
+
background: var(--lb-primary-color);
|
|
2275
|
+
color: var(--lb-btn-text);
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
/* Reward badge on the get card: "Free" or "P% off". Neutral chip colors
|
|
2279
|
+
(right-slot chip family) \u2014 the accent stays reserved for the CTA and the
|
|
2280
|
+
plus medallion; 600 weight carries the reward emphasis. */
|
|
2281
|
+
.lb-bogo__badge {
|
|
2282
|
+
display: inline-flex;
|
|
2283
|
+
align-items: center;
|
|
2284
|
+
align-self: flex-start;
|
|
2285
|
+
flex-shrink: 0;
|
|
2286
|
+
height: 28px;
|
|
2287
|
+
padding: 0 8px;
|
|
2288
|
+
border-radius: var(--lb-radius-sm);
|
|
2289
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
2290
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
2291
|
+
font-size: 13px;
|
|
2292
|
+
font-weight: 600;
|
|
2293
|
+
line-height: 1;
|
|
2294
|
+
white-space: nowrap;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
/* Struck-through original price on the get card when the reward applies. */
|
|
2298
|
+
.lb-bogo .lb-bundle-product-compare-price {
|
|
2299
|
+
text-decoration: line-through;
|
|
2300
|
+
opacity: 0.6;
|
|
2301
|
+
}
|
|
2302
|
+
`,or=`/**
|
|
2303
|
+
* Lime Bundles \u2014 Multi-step bundle widget styles (wizard chrome ONLY).
|
|
2304
|
+
*
|
|
2305
|
+
* The multi-step widget reuses the mix & match classes wholesale \u2014
|
|
2306
|
+
* bundle-widget.liquid emits bundle-mix-match.css whenever has_multi_step
|
|
2307
|
+
* is set. This file carries only what the wizard adds on top: step groups
|
|
2308
|
+
* in the widget body, the group heading + count chip, and the modal's
|
|
2309
|
+
* three-slot Back / count / Next-Done footer.
|
|
2310
|
+
*
|
|
2311
|
+
* Canon: WIDGET-DESIGN.md (spacing scale, radius system, chip family).
|
|
2312
|
+
*/
|
|
2313
|
+
|
|
2314
|
+
/* \u2500\u2500 Step groups (widget body) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2315
|
+
|
|
2316
|
+
.lb-multi-step__groups {
|
|
2317
|
+
display: flex;
|
|
2318
|
+
flex-direction: column;
|
|
2319
|
+
gap: 16px;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
.lb-multi-step__group {
|
|
2323
|
+
display: flex;
|
|
2324
|
+
flex-direction: column;
|
|
2325
|
+
gap: 8px;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
/* Heading is a quiet, non-interactive row: step name left, live count
|
|
2329
|
+
chip right. The step's dashed trigger below is the click target. */
|
|
2330
|
+
.lb-multi-step__group-heading {
|
|
2331
|
+
display: flex;
|
|
2332
|
+
align-items: center;
|
|
2333
|
+
justify-content: space-between;
|
|
2334
|
+
gap: 12px;
|
|
1703
2335
|
color: var(--lb-text);
|
|
1704
2336
|
}
|
|
1705
2337
|
|
|
1706
|
-
|
|
1707
|
-
.lb-volume__tier-compare {
|
|
2338
|
+
.lb-multi-step__group-name {
|
|
1708
2339
|
font-size: 14px;
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
2340
|
+
font-weight: 600;
|
|
2341
|
+
line-height: 1.4;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
/* Count chip \u2014 right-slot chip family (28px, 0 8px, radius-sm, 13/500,
|
|
2345
|
+
neutral 7%/75% fill). Weight-only emphasis when the step is met. */
|
|
2346
|
+
.lb-multi-step__group-count {
|
|
2347
|
+
display: inline-flex;
|
|
2348
|
+
align-items: center;
|
|
2349
|
+
height: 28px;
|
|
2350
|
+
padding: 0 8px;
|
|
2351
|
+
border-radius: var(--lb-radius-sm);
|
|
2352
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
2353
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
2354
|
+
font-size: 13px;
|
|
2355
|
+
font-weight: 500;
|
|
2356
|
+
white-space: nowrap;
|
|
1713
2357
|
}
|
|
1714
2358
|
|
|
2359
|
+
.lb-multi-step__group-count--met {
|
|
2360
|
+
font-weight: 600;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
/* Empty step group: the slots container collapses so the heading rows
|
|
2364
|
+
read as a compact checklist until picks land. */
|
|
2365
|
+
.lb-multi-step__group-slots:empty {
|
|
2366
|
+
display: none;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
/* \u2500\u2500 Wizard modal footer: [Back] [count] [Next|Done] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
2370
|
+
Three-column grid so the count stays dead-centre whether or not the
|
|
2371
|
+
Back button is showing (Next and Done share the right cell \u2014 only one
|
|
2372
|
+
is visible at a time). */
|
|
2373
|
+
.lb-multi-step__modal-footer {
|
|
2374
|
+
display: grid;
|
|
2375
|
+
grid-template-columns: 1fr auto 1fr;
|
|
2376
|
+
align-items: center;
|
|
2377
|
+
gap: 12px;
|
|
2378
|
+
}
|
|
1715
2379
|
|
|
1716
|
-
|
|
2380
|
+
.lb-multi-step__modal-footer > .lb-multi-step__modal-back {
|
|
2381
|
+
grid-area: 1 / 1;
|
|
2382
|
+
justify-self: start;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
.lb-multi-step__modal-footer > .lb-mix-match__modal-footer-count {
|
|
2386
|
+
grid-area: 1 / 2;
|
|
2387
|
+
text-align: center;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
.lb-multi-step__modal-footer > .lb-mix-match__modal-done {
|
|
2391
|
+
grid-area: 1 / 3;
|
|
2392
|
+
justify-self: end;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
/* Back \u2014 secondary treatment beside the primary Next/Done (which reuse
|
|
2396
|
+
.lb-mix-match__modal-done). */
|
|
2397
|
+
.lb-multi-step__modal-back {
|
|
2398
|
+
padding: 10px 16px;
|
|
2399
|
+
background: none;
|
|
2400
|
+
border: var(--lb-border-width) solid var(--lb-border-color);
|
|
2401
|
+
border-radius: var(--lb-radius-sm);
|
|
2402
|
+
color: var(--lb-text);
|
|
2403
|
+
font-family: inherit;
|
|
2404
|
+
font-size: 14px;
|
|
2405
|
+
font-weight: 600;
|
|
2406
|
+
cursor: pointer;
|
|
2407
|
+
transition: background-color 0.25s ease;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
.lb-multi-step__modal-back:hover {
|
|
2411
|
+
background: color-mix(in srgb, var(--lb-text) 5%, transparent);
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
.lb-multi-step__modal-back:focus-visible {
|
|
2415
|
+
outline: 2px solid var(--lb-primary-color);
|
|
2416
|
+
outline-offset: 2px;
|
|
2417
|
+
}
|
|
2418
|
+
`,ir=`/**
|
|
1717
2419
|
* Lime Bundles \u2014 Custom variant-picker dropdown styling.
|
|
1718
2420
|
*
|
|
1719
2421
|
* Reuses existing CSS variables: no new merchant-configurable surface.
|
|
1720
|
-
* --lb-
|
|
1721
|
-
* --lb-bg, --lb-text, --lb-primary-color
|
|
2422
|
+
* --lb-border-width, --lb-border (global border), --lb-radius-sm (derived),
|
|
2423
|
+
* --lb-variant-chevron, --lb-bg, --lb-text, --lb-primary-color
|
|
1722
2424
|
*
|
|
1723
2425
|
* Mix-match modal context overrides via .lb-mix-match__modal scope to use
|
|
1724
2426
|
* --lb-picker-variant-* and --lb-picker-bg.
|
|
@@ -1736,7 +2438,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1736
2438
|
padding: 0 !important;
|
|
1737
2439
|
margin: -1px !important;
|
|
1738
2440
|
overflow: hidden !important;
|
|
1739
|
-
clip:
|
|
2441
|
+
clip-path: inset(50%) !important;
|
|
1740
2442
|
white-space: nowrap !important;
|
|
1741
2443
|
border: 0 !important;
|
|
1742
2444
|
pointer-events: none !important;
|
|
@@ -1758,8 +2460,8 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1758
2460
|
justify-content: space-between;
|
|
1759
2461
|
gap: 8px;
|
|
1760
2462
|
width: 100%;
|
|
1761
|
-
border: var(--lb-
|
|
1762
|
-
border-radius: var(--lb-
|
|
2463
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2464
|
+
border-radius: var(--lb-radius-sm);
|
|
1763
2465
|
padding: 8px 12px;
|
|
1764
2466
|
font-size: 12px;
|
|
1765
2467
|
line-height: 16px;
|
|
@@ -1770,7 +2472,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1770
2472
|
appearance: none;
|
|
1771
2473
|
-webkit-appearance: none;
|
|
1772
2474
|
text-align: start;
|
|
1773
|
-
transition: border-color
|
|
2475
|
+
transition: border-color 0.25s ease;
|
|
1774
2476
|
}
|
|
1775
2477
|
|
|
1776
2478
|
.lb-dropdown-trigger:focus-visible {
|
|
@@ -1796,7 +2498,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1796
2498
|
width: 12px;
|
|
1797
2499
|
height: 12px;
|
|
1798
2500
|
background: var(--lb-variant-chevron) center / contain no-repeat;
|
|
1799
|
-
transition: transform
|
|
2501
|
+
transition: transform 0.25s ease;
|
|
1800
2502
|
}
|
|
1801
2503
|
|
|
1802
2504
|
.lb-dropdown-trigger[aria-expanded="true"] .lb-dropdown-chevron {
|
|
@@ -1821,15 +2523,16 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1821
2523
|
list-style: none;
|
|
1822
2524
|
background: var(--lb-bg);
|
|
1823
2525
|
color: var(--lb-text);
|
|
1824
|
-
border: var(--lb-
|
|
1825
|
-
border-radius: var(--lb-
|
|
2526
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2527
|
+
border-radius: var(--lb-radius-sm);
|
|
1826
2528
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
1827
2529
|
overflow-y: auto;
|
|
1828
2530
|
overflow-x: hidden;
|
|
1829
|
-
/*
|
|
2531
|
+
/* Quiet overlay scrollbar \u2014 transparent track, soft rounded thumb. The
|
|
2532
|
+
popover has a shadow + border, so it keeps a thumb rather than the inset
|
|
2533
|
+
lists' edge fade (a mask would clip the shadow). */
|
|
1830
2534
|
scrollbar-width: thin;
|
|
1831
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text)
|
|
1832
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
2535
|
+
scrollbar-color: color-mix(in srgb, var(--lb-text) 18%, transparent) transparent;
|
|
1833
2536
|
animation: lb-dropdown-in-down 120ms ease-out;
|
|
1834
2537
|
transform-origin: top center;
|
|
1835
2538
|
}
|
|
@@ -1856,17 +2559,20 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1856
2559
|
width: auto;
|
|
1857
2560
|
}
|
|
1858
2561
|
|
|
1859
|
-
/*
|
|
2562
|
+
/* Quiet overlay scrollbar \u2014 Webkit/Blink: transparent track, soft rounded
|
|
2563
|
+
thumb that darkens on hover. */
|
|
1860
2564
|
.lb-dropdown-listbox::-webkit-scrollbar {
|
|
1861
|
-
width:
|
|
2565
|
+
width: 6px;
|
|
1862
2566
|
}
|
|
1863
2567
|
.lb-dropdown-listbox::-webkit-scrollbar-track {
|
|
1864
|
-
background:
|
|
1865
|
-
border-radius: 2px;
|
|
2568
|
+
background: transparent;
|
|
1866
2569
|
}
|
|
1867
2570
|
.lb-dropdown-listbox::-webkit-scrollbar-thumb {
|
|
1868
|
-
background: color-mix(in srgb, var(--lb-text)
|
|
1869
|
-
border-radius:
|
|
2571
|
+
background: color-mix(in srgb, var(--lb-text) 16%, transparent);
|
|
2572
|
+
border-radius: 999px;
|
|
2573
|
+
}
|
|
2574
|
+
.lb-dropdown-listbox::-webkit-scrollbar-thumb:hover {
|
|
2575
|
+
background: color-mix(in srgb, var(--lb-text) 30%, transparent);
|
|
1870
2576
|
}
|
|
1871
2577
|
|
|
1872
2578
|
/* Options */
|
|
@@ -1935,11 +2641,17 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1935
2641
|
because WidgetConfig.parse() fully hydrates the merchant config.
|
|
1936
2642
|
See docs/solutions/ui-bugs/widget-css-single-source-defaults.md. */
|
|
1937
2643
|
.lb-mix-match__modal .lb-dropdown-trigger {
|
|
1938
|
-
border-color: var(--lb-picker-
|
|
1939
|
-
border-width: var(--lb-picker-
|
|
1940
|
-
border-radius: var(--lb-picker-
|
|
2644
|
+
border-color: var(--lb-picker-border-color);
|
|
2645
|
+
border-width: var(--lb-picker-border-width);
|
|
2646
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1941
2647
|
background: var(--lb-picker-bg);
|
|
1942
2648
|
color: var(--lb-picker-text);
|
|
2649
|
+
/* Match the picker qty stepper + Add button height (border-box so 32px is
|
|
2650
|
+
the full height including padding + border). */
|
|
2651
|
+
box-sizing: border-box;
|
|
2652
|
+
padding: 4px 8px;
|
|
2653
|
+
min-height: 32px;
|
|
2654
|
+
max-height: 32px;
|
|
1943
2655
|
}
|
|
1944
2656
|
|
|
1945
2657
|
.lb-mix-match__modal .lb-dropdown-chevron {
|
|
@@ -1950,9 +2662,9 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1950
2662
|
its [data-modal-overlay] parent, so picker-scoped rules anchor on the
|
|
1951
2663
|
overlay attribute, not the modal class. */
|
|
1952
2664
|
[data-modal-overlay] > .lb-dropdown-listbox {
|
|
1953
|
-
border-color: var(--lb-picker-
|
|
1954
|
-
border-width: var(--lb-picker-
|
|
1955
|
-
border-radius: var(--lb-picker-
|
|
2665
|
+
border-color: var(--lb-picker-border-color);
|
|
2666
|
+
border-width: var(--lb-picker-border-width);
|
|
2667
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1956
2668
|
background: var(--lb-picker-bg);
|
|
1957
2669
|
color: var(--lb-picker-text);
|
|
1958
2670
|
scrollbar-color: color-mix(in srgb, var(--lb-picker-text) 15%, transparent)
|
|
@@ -1966,7 +2678,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1966
2678
|
[data-modal-overlay] > .lb-dropdown-listbox::-webkit-scrollbar-thumb {
|
|
1967
2679
|
background: color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
|
|
1968
2680
|
}
|
|
1969
|
-
`,
|
|
2681
|
+
`,ar=`/* Lime Bundles \u2014 web-component loading skeleton (not mirrored to theme assets) */
|
|
1970
2682
|
|
|
1971
2683
|
.lb-bundle-widget--loading {
|
|
1972
2684
|
display: block;
|
|
@@ -2049,7 +2761,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
2049
2761
|
.lb-bundle-widget--loading .lb-skeleton--cta {
|
|
2050
2762
|
height: 44px;
|
|
2051
2763
|
width: 140px;
|
|
2052
|
-
border-radius: var(--lb-
|
|
2764
|
+
border-radius: var(--lb-radius, 8px);
|
|
2053
2765
|
}
|
|
2054
2766
|
|
|
2055
2767
|
@keyframes lb-skeleton-pulse {
|
|
@@ -2062,10 +2774,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
2062
2774
|
animation: none;
|
|
2063
2775
|
}
|
|
2064
2776
|
}
|
|
2065
|
-
`;var
|
|
2066
|
-
`),this.shadow.appendChild(t),this.shopCustomCss){let
|
|
2067
|
-
<style>${
|
|
2068
|
-
<style>${
|
|
2777
|
+
`;var Ao=e=>`lb_cart_id:${e}`;function Io(e){if(e)return e.trim()||null;if(typeof document<"u"){let t=document.querySelector('meta[name="shopify:product-handle"]');if(t?.content)return t.content.trim()||null}if(typeof window<"u"){let t=window.location.pathname.match(/\/products\/([^/?#]+)/);if(t?.[1])return decodeURIComponent(t[1])}return null}var qe=class extends HTMLElement{static observedAttributes=["shop-domain","storefront-token","bundle-gid","product-handle","app-url","analytics","locale","country","language","market-id"];buyer=void 0;shadow;bundles=[];abortController=null;impressionCleanups=[];renderCleanups=[];shopCustomCss=null;outOfStockBehavior=ut;constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.fetchBundle()}disconnectedCallback(){this.abortController?.abort(),this.teardownImpressions(),this.teardownRenderers()}teardownImpressions(){for(let t of this.impressionCleanups)t();this.impressionCleanups=[]}teardownRenderers(){for(let t of this.renderCleanups)t();this.renderCleanups=[]}attributeChangedCallback(t,n,r){n===r||!this.isConnected||(t==="bundle-gid"||t==="product-handle"||t==="shop-domain"||t==="storefront-token")&&this.shopDomain&&this.storefrontToken&&this.fetchBundle()}get shopDomain(){return this.getAttribute("shop-domain")??""}get storefrontToken(){return this.getAttribute("storefront-token")??""}get bundleGid(){return this.getAttribute("bundle-gid")??""}get productHandleAttr(){return this.getAttribute("product-handle")??""}get appUrl(){return this.getAttribute("app-url")??""}get analyticsEnabled(){return this.getAttribute("analytics")!=="false"}get country(){return this.getAttribute("country")??void 0}get language(){return this.getAttribute("language")??void 0}get marketId(){return this.getAttribute("market-id")??void 0}wrapQueryForContext(t){return Ft({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer})?Vt(t):t}isMarketHidden(t){return!Kt(t,this.marketId)}async fetchBundle(){if(!this.shopDomain||!this.storefrontToken){this.renderError("Missing required attributes: shop-domain, storefront-token");return}this.abortController?.abort();let t=new AbortController;this.abortController=t,this.renderLoading();let n=ct({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer});try{let r,o=!1;if(this.bundleGid)o=!0,r=this.fetchSingleBundle(n,t.signal);else{let d=Io(this.productHandleAttr);if(!d){this.teardownImpressions(),this.renderError("No bundle-gid or product-handle provided, and the current URL doesn't match /products/<handle>.");return}r=this.fetchProductBundles(n,t.signal,d)}let i=n.query(zt,void 0,{signal:t.signal}).catch(()=>null);if(await r,t.signal.aborted)return;if(o&&this.bundles.length===0){this.teardownImpressions(),this.renderError("Bundle not found");return}let a=await i,l=a?.shop?.customCss?.value;if(l){tn(this.shopDomain,l);let d=bt(l);d.ok&&(this.shopCustomCss=d.css)}this.outOfStockBehavior=$t(a?.shop?.outOfStockBehavior?.value),this.renderBundles()}catch(r){if(t.signal.aborted)return;this.bundles=[],this.teardownImpressions(),this.renderError(r instanceof Error?r.message:"Failed to load bundle")}}async fetchSingleBundle(t,n){let r=await t.query(this.wrapQueryForContext(Ut),{id:this.bundleGid},{signal:n});if(!r.metaobject){this.bundles=[];return}let o=pt(r.metaobject.id,r.metaobject.fields);this.bundles=o&&!this.isMarketHidden(o)?[o]:[]}async fetchProductBundles(t,n,r){let o=await t.query(this.wrapQueryForContext(Qt),{handle:r},{signal:n});if(!o.product){this.bundles=[];return}let i=o.product.metafield?.references?.nodes??[],a=[];for(let l of i){let d=pt(l.id,l.fields);d&&!this.isMarketHidden(d)&&a.push(d)}this.bundles=a}handleAddToCart=async(t,n)=>{let r=new CustomEvent("lime-bundle:add-to-cart",{detail:{lines:n},bubbles:!0,composed:!0,cancelable:!0}),o=this.dispatchEvent(r);this.reportAddToCartEvent(t,n),o&&await this.defaultAddToCart(n)};async defaultAddToCart(t){if(typeof window>"u")return;let n=ct({shopDomain:this.shopDomain,accessToken:this.storefrontToken}),r=window.localStorage,o=Ao(this.shopDomain),i=r?.getItem(o)??null;try{let a=null;if(i){let d=(await n.query(jt,{cartId:i,lines:t})).cartLinesAdd;d?.userErrors?.length?r?.removeItem(o):d?.cart&&(a=d.cart.checkoutUrl)}if(!a){let d=(await n.query(Wt,{input:{lines:t}})).cartCreate;d?.cart&&(r?.setItem(o,d.cart.id),a=d.cart.checkoutUrl)}a?window.location.assign(a):this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:"Cart creation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}catch(a){this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:a instanceof Error?a.message:"Cart mutation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}}reportAddToCartEvent(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=n.reduce((i,a)=>i+a.quantity,0),o=n.reduce((i,a)=>{let d=t.products.find(c=>c.variants.nodes.some(u=>u.id===a.merchandiseId))?.variants.nodes.find(c=>c.id===a.merchandiseId),s=d?parseFloat(d.price.amount):0;return i+s*a.quantity},0);Xt({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType,productId:t.products[0]?.id??"",quantity:r,totalPrice:Math.round(o*100)/100})}renderBundles(){this.teardownImpressions(),this.teardownRenderers(),this.shadow.innerHTML="";let t=document.createElement("style");if(t.textContent=[Et,er,tr,or,nr,rr,ir].join(`
|
|
2778
|
+
`),this.shadow.appendChild(t),this.shopCustomCss){let r=document.createElement("style");r.setAttribute("data-lime-bundles","shop-custom-css"),r.textContent=this.shopCustomCss,this.shadow.appendChild(r)}for(let r of this.bundles){let o=document.createElement("div");o.className="lb-bundle-widget",o.setAttribute("role","region"),o.setAttribute("aria-label",r.title),o.setAttribute("data-bundle-type",r.bundleType),o.setAttribute("data-bundle-gid",r.id),Gt(o,r.widgetConfig),this.renderCleanups.push(lt(o));let i=l=>this.handleAddToCart(r,l),a=l=>this.renderCleanups.push(l);switch(r.bundleType){case"fixed":vn(o,r,this.outOfStockBehavior,i,a);break;case"mix_match":On(o,r,this.outOfStockBehavior,i,a);break;case"volume":Dn(o,r,this.outOfStockBehavior,i);break;case"bogo":Vn(o,r,this.outOfStockBehavior,i,a);break;case"multi_step":Yn(o,r,this.outOfStockBehavior,i,a);break}this.shadow.appendChild(o),this.setupImpressionFor(r,o)}let n=this.bundles[0];this.dispatchEvent(new CustomEvent("lime-bundle:loaded",{detail:{bundleCount:this.bundles.length,bundleTypes:this.bundles.map(r=>r.bundleType),bundleType:n?.bundleType,title:n?.title},bubbles:!0,composed:!0}))}setupImpressionFor(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=Zt(n,()=>{Jt({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType})});this.impressionCleanups.push(r)}renderLoading(){this.shadow.innerHTML=`
|
|
2779
|
+
<style>${Et}</style>
|
|
2780
|
+
<style>${ar}</style>
|
|
2069
2781
|
<div class="lb-bundle-widget lb-bundle-widget--loading" aria-busy="true" aria-label="Loading bundle">
|
|
2070
2782
|
<div class="lb-skeleton lb-skeleton--title"></div>
|
|
2071
2783
|
<div class="lb-skeleton--products">
|
|
@@ -2099,5 +2811,5 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
2099
2811
|
<div class="lb-skeleton lb-skeleton--cta"></div>
|
|
2100
2812
|
</div>
|
|
2101
2813
|
</div>
|
|
2102
|
-
`}renderError(t){this.shadow.innerHTML="",this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:t,code:"LOAD_ERROR"},bubbles:!0,composed:!0}))}};typeof customElements<"u"&&!customElements.get("lime-bundle")&&customElements.define("lime-bundle",
|
|
2814
|
+
`}renderError(t){this.shadow.innerHTML="",this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:t,code:"LOAD_ERROR"},bubbles:!0,composed:!0}))}};typeof customElements<"u"&&!customElements.get("lime-bundle")&&customElements.define("lime-bundle",qe);return pr(Mo);})();
|
|
2103
2815
|
//# sourceMappingURL=lime-bundle.global.js.map
|