@best-bundles/bundle-ui 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_18x6y_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--bb-backdrop-z-index, 2147483647);display:flex;justify-content:flex-end;background:var(--bb-backdrop-bg, rgba(0, 0, 0, .5));-webkit-backdrop-filter:blur(var(--bb-backdrop-blur, 2px));backdrop-filter:blur(var(--bb-backdrop-blur, 2px));padding:var(--bb-backdrop-padding, 12px);opacity:0;transition:opacity var(--bb-drawer-transition-duration, .22s) ease}._celebrationOverlay_18x6y_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_18x6y_23{font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.03em;font-size:18px;line-height:1;padding:12px 16px;border-radius:999px;color:var(--bb-celebration-text, #0b1b44);background:linear-gradient(180deg,var(--bb-celebration-bg-top, #ffffff),var(--bb-celebration-bg-bottom, #bae6fd));border:2px solid var(--bb-celebration-border, rgba(37, 99, 235, .28));box-shadow:0 18px 55px #0006,0 10px 28px #2563eb33,inset 0 1px #ffffffbf;transform-origin:50% 60%;will-change:transform,opacity,filter;animation:_bbCelebrationPop_18x6y_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_18x6y_1{0%{opacity:0;transform:translateY(10px) scale(.6);filter:blur(1px) saturate(1.1)}12%{opacity:1;transform:translateY(0) scale(1.12);filter:blur(0px) saturate(1.1)}22%{opacity:1;transform:translateY(0) scale(1)}80%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-10px) scale(.98)}}._backdropOpen_18x6y_74{opacity:1}._backdropClosed_18x6y_78{opacity:0}._panel_18x6y_82{width:440px;max-width:100%;min-width:0;height:100%;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border-radius:var(--bb-panel-radius, 16px);box-shadow:0 20px 60px #00000059;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;outline:none;position:relative;top:unset;right:unset;bottom:unset;left:unset}._panelOpen_18x6y_103{animation:_bbSlideInFromRight_18x6y_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_18x6y_107{animation:_bbSlideOutToRight_18x6y_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_18x6y_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_18x6y_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_18x6y_1{transition:none}._celebrationChip_18x6y_23,._panelOpen_18x6y_103,._panelClosed_18x6y_107{animation:none}}._header_18x6y_146{display:grid;grid-template-columns:36px 1fr 36px;align-items:center;column-gap:12px;padding:var(--bb-header-padding, 16px 16px 12px 16px);border-bottom:1px solid var(--bb-border-color, rgba(17, 24, 39, .08))}._headerCenter_18x6y_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_18x6y_163{font-size:24px;margin:0;line-height:1.2;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._searchIconButton_18x6y_172{width:36px;height:36px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}._searchIconButton_18x6y_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_18x6y_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_18x6y_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_18x6y_199{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:0;transform:translateY(-2px);transition:opacity .18s ease,transform .22s ease}._headerSearchOpen_18x6y_211 ._headerTitleWrap_18x6y_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_18x6y_211 ._headerSearchWrap_18x6y_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_18x6y_223{width:min(320px,100%);height:36px;display:flex;align-items:center;gap:8px;background:var(--bb-surface-bg, #ffffff);border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));border-radius:10px;padding:0 8px}._searchInput_18x6y_235{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_18x6y_235::-webkit-search-cancel-button,._searchInput_18x6y_235::-webkit-search-decoration,._searchInput_18x6y_235::-webkit-search-results-button,._searchInput_18x6y_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_18x6y_256{border:none;background:transparent;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:6px;border-radius:10px;line-height:1}._searchClearButton_18x6y_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_18x6y_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_18x6y_278{border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);width:36px;height:36px;border-radius:10px;cursor:pointer;flex:0 0 auto;padding:0}._closeButton_18x6y_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_18x6y_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_18x6y_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_18x6y_195,._headerSearchWrap_18x6y_199{transition:none}}._body_18x6y_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_18x6y_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_18x6y_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_18x6y_327{margin-top:4px}._variantList_18x6y_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_18x6y_339{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_18x6y_347{opacity:.65}._variantLeft_18x6y_351{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_18x6y_358{height:100%;align-self:stretch;border-radius:12px;border:none;background:var(--bb-cta-bg, #91aae5);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:800;padding:0 16px;cursor:pointer;white-space:nowrap}._addToBundleButton_18x6y_358:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_18x6y_358:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_18x6y_358:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_18x6y_386{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_18x6y_386{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._variantThumb_18x6y_403{width:60px;height:60px;border-radius:12px;overflow:hidden;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));flex:0 0 auto}._variantThumbImg_18x6y_413{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_18x6y_420{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_18x6y_430{min-width:0}._variantName_18x6y_434{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_18x6y_443{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_18x6y_451{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_18x6y_458{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_18x6y_451{font-size:13px;font-weight:800}._qtyControls_18x6y_469{display:inline-flex;align-items:center;gap:6px}._qtyButton_18x6y_475{padding:0;width:34px;height:34px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);cursor:pointer;line-height:1;font-size:16px}._qtyButton_18x6y_475:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_18x6y_475:disabled{opacity:.6;cursor:not-allowed}._qtyButton_18x6y_475:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_18x6y_501{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_18x6y_508{padding:var(--bb-footer-padding, 12px 16px 16px 16px);border-top:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);position:relative;min-width:0}._poweredBy_18x6y_516{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_18x6y_516 a{color:inherit;text-decoration:none}._boxSummaryWindow_18x6y_528{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;min-width:0;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_18x6y_528::-webkit-scrollbar{display:none}._boxSummaryRow_18x6y_546{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_18x6y_554{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_18x6y_563{width:100%;aspect-ratio:1 / 1;border-radius:12px;position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;box-sizing:border-box}._boxItemClickable_18x6y_575{cursor:pointer}._boxItemClickable_18x6y_575:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_18x6y_584{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._boxItemPlaceholder_18x6y_595{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemFilled_18x6y_601{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_18x6y_607{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemDiscountText_18x6y_615{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_18x6y_623{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_18x6y_630{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_18x6y_637{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._ctaButtonGroup_18x6y_648{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_18x6y_655{gap:0}._cta_18x6y_648{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer}._ctaSecondary_18x6y_671{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer}._ctaDualLeft_18x6y_683{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),background .3s cubic-bezier(.4,0,.2,1),color .3s cubic-bezier(.4,0,.2,1),border-right-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualLeftAnimating_18x6y_701{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0;background:var(--bb-cta-bg, #2563eb);opacity:.6;color:var(--bb-cta-text, #ffffff)}._ctaDualLeftAnimating_18x6y_701>span{opacity:0}._ctaDualRight_18x6y_714{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),border-left-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualRightAnimating_18x6y_730{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_18x6y_730>span{opacity:0}._ctaTotals_18x6y_741{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_18x6y_749{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));color:var(--bb-tier-text, rgba(29, 78, 216, .95));white-space:nowrap}._ctaTotalsWrap_18x6y_763{overflow:hidden;max-height:0;opacity:0;transform:translateY(4px);margin-bottom:0;transition:max-height .22s ease,opacity .16s ease,transform .22s ease,margin-bottom .22s ease}._ctaTotalsWrapVisible_18x6y_776{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_18x6y_783{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_18x6y_790{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_18x6y_763{transition:none}}._cta_18x6y_648:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_18x6y_648:disabled{opacity:.6;cursor:not-allowed}._cta_18x6y_648:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_18x6y_671:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_18x6y_671:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_18x6y_671:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_18x6y_683:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_18x6y_683:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_18x6y_683:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_18x6y_714:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_18x6y_714:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_18x6y_714:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_18x6y_859{margin-top:8px;font-size:12px;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center}@media(max-width:767px){._backdrop_18x6y_1{padding:0;justify-content:stretch}._panel_18x6y_82{width:100%;height:100%;border-radius:0}}._panel_1n9m6_2 button,._panel_1n9m6_2 input,._panel_1n9m6_2 [role=button]{box-sizing:border-box;margin:0}._panel_1n9m6_2{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));border-radius:var(--bb-panel-radius, 16px);padding:20px;display:grid;gap:14px}._header_1n9m6_20{text-align:start}._title_1n9m6_24{font-size:22px;margin:0;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_1n9m6_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_1n9m6_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_1n9m6_43{font-size:13px;color:#b45309;font-weight:600}._section_1n9m6_49{display:grid;gap:6px}._sectionTitle_1n9m6_54{text-align:left;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._rules_1n9m6_63{display:flex;justify-content:center;gap:6px}._rulesList_1n9m6_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_1n9m6_80{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 10px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .25));background:var(--bb-tier-bg, rgba(37, 99, 235, .06));color:var(--bb-tier-text, #1f2937)}._ruleMin_1n9m6_92{font-weight:600;font-size:13px}._ruleDiscount_1n9m6_97{font-weight:700;font-size:13px}._ruleLabel_1n9m6_102{font-size:12px;opacity:.7}._rulesVisual_1n9m6_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_1n9m6_114,._rulesLinesRow_1n9m6_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_1n9m6_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_1n9m6_128:empty{display:flex!important}._rulesLineLabel_1n9m6_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_1n9m6_145{height:1em}._rulesLine_1n9m6_121{display:block;width:100%;height:4px;border-radius:999px;background-color:var(--bb-tier-background, rgba(148, 163, 184, .22));transition:background-color .2s ease}._rulesLine_1n9m6_121:empty{display:block!important}._rulesLineEmpty_1n9m6_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_1n9m6_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_1n9m6_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_1n9m6_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_1n9m6_186{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start;padding:8px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-border-color, rgba(15, 23, 42, .08));background:#fff;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}._variantRowInteractive_1n9m6_198{cursor:pointer}._variantRowSelected_1n9m6_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_1n9m6_207{opacity:.65}._variantMedia_1n9m6_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_1n9m6_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_1n9m6_227{display:flex;flex-direction:column;gap:4px}._variantTitle_1n9m6_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_1n9m6_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_1n9m6_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_1n9m6_255{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);background:linear-gradient(135deg,#94a3b84d,#94a3b80d);display:grid;place-items:center;color:#94a3b8cc;font-size:10px;text-transform:uppercase;letter-spacing:.08em}._variantMeta_1n9m6_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_1n9m6_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_1n9m6_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_1n9m6_286{display:grid;align-items:end;justify-items:end}._qtyActions_1n9m6_292{display:inline-flex;align-items:center;gap:6px}._variantUnavailable_1n9m6_298{display:none}._qtyControls_1n9m6_302{display:inline-flex;align-items:center;gap:6px;padding:4px;border-radius:999px;border:1px solid var(--bb-border-strong-color, rgba(15, 23, 42, .12));background:#0f172a0a}._qtyButton_1n9m6_312{width:30px;height:30px;padding:0;border-radius:999px;border:0;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-size:16px;cursor:pointer;display:grid;place-items:center}._qtyButton_1n9m6_312:disabled{cursor:not-allowed;opacity:.4}._qtyButton_1n9m6_312:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_1n9m6_336{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_1n9m6_343{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._qtyChip_1n9m6_351{min-width:44px;height:30px;padding:0 2px;border-radius:var(--bb-border-radius, 12px);background:#0f172a14;color:#0f172a;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:3px}._qtyChipInteractive_1n9m6_366{cursor:pointer}._qtyChipValue_1n9m6_370{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_1n9m6_376{margin-bottom:-3px;font-weight:500}._qtyChipClear_1n9m6_381{width:22px;height:22px;border-radius:999px;border:1px solid rgba(15,23,42,.12);background:#fff;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0;transition:background .16s ease,color .16s ease}._qtyChip_1n9m6_351:hover ._qtyChipClear_1n9m6_381{background:#0f172a;color:#fff}._qtyTrash_1n9m6_400{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_1n9m6_412{display:grid;padding-top:6px}._boxSummaryWindow_1n9m6_417{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_1n9m6_417::-webkit-scrollbar{display:none}._boxSummaryRow_1n9m6_431{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_1n9m6_439{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_1n9m6_448{width:100%;border-radius:var(--bb-border-radius, 12px);position:relative;display:block;-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden}._boxItem_1n9m6_448:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_1n9m6_465{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_1n9m6_471{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemThreshold_1n9m6_477{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemClickable_1n9m6_485{cursor:pointer}._boxItemClickable_1n9m6_485:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_1n9m6_494{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;display:block}._boxItemFallback_1n9m6_505{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._boxItemPlus_1n9m6_518{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemDiscountText_1n9m6_530{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxThresholdLabel_1n9m6_543{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._totalsReveal_1n9m6_554{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_1n9m6_562{max-height:80px;opacity:1}._ctaTotalsWrap_1n9m6_567{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_1n9m6_572{opacity:1}._ctaTotals_1n9m6_567{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_1n9m6_587{padding:4px 8px;border-radius:999px;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));color:var(--bb-tier-text, rgba(30, 64, 175, .9));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));font-size:11px;text-transform:uppercase;letter-spacing:.08em}._ctaTotalsStrike_1n9m6_598{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_1n9m6_604{font-weight:700;color:#0f172a}._cta_1n9m6_567{border:0;border-radius:var(--bb-border-radius, 12px);padding:14px 18px;min-height:44px;font-weight:700;font-size:14px;background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff);cursor:pointer;letter-spacing:.02em;transition:transform .14s ease,box-shadow .14s ease,background .14s ease;box-shadow:0 10px 24px #0f172a40}._cta_1n9m6_567:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_1n9m6_567:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_1n9m6_636{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_1n9m6_642,._ctaDualRight_1n9m6_643{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_1n9m6_642{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_1n9m6_643{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_1n9m6_642:disabled,._ctaDualRight_1n9m6_643:disabled{cursor:not-allowed;opacity:.6}._poweredBy_1n9m6_670{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_1n9m6_670 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_1n9m6_2{padding:16px}._variantRow_1n9m6_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_1n9m6_302{justify-self:start}._variantDetailsRow_1n9m6_239{grid-template-columns:1fr}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  import { jsx as s, jsxs as S, Fragment as Xe } from "react/jsx-runtime";
3
- import Ve, { useState as j, useRef as J, useEffect as V, useCallback as Te, useMemo as k, createContext as St, useContext as Bt, forwardRef as wt, createElement as Ze } from "react";
3
+ import Ve, { useState as j, useRef as J, useEffect as V, useCallback as Te, useMemo as R, createContext as St, useContext as Bt, forwardRef as wt, createElement as Ze } from "react";
4
4
  const $e = {
5
5
  bundleId: "_bundle_id",
6
6
  bundleConfig: "_bundle_config",
7
7
  bundleSource: "_bundle_source",
8
8
  bundleTitle: "_bundle_title"
9
9
  };
10
- async function Tt(o) {
11
- const e = new URL("/api/public/bundle-config", o.apiBaseUrl);
12
- e.searchParams.set("shop", o.shop), o.configHandle && e.searchParams.set("handle", o.configHandle);
10
+ async function Tt(r) {
11
+ const e = new URL("/api/public/bundle-config", r.apiBaseUrl);
12
+ e.searchParams.set("shop", r.shop), r.configHandle && e.searchParams.set("handle", r.configHandle);
13
13
  const i = await (await fetch(e, {
14
14
  method: "GET",
15
- signal: o.signal,
15
+ signal: r.signal,
16
16
  headers: { "Content-Type": "application/json" }
17
17
  })).json().catch(() => null);
18
18
  return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
@@ -22,9 +22,9 @@ function Le() {
22
22
  if (typeof window > "u" || typeof localStorage > "u")
23
23
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
24
24
  try {
25
- const o = localStorage.getItem(dt);
26
- if (o && typeof o == "string" && o.length > 0)
27
- return o;
25
+ const r = localStorage.getItem(dt);
26
+ if (r && typeof r == "string" && r.length > 0)
27
+ return r;
28
28
  let e;
29
29
  try {
30
30
  const t = globalThis.crypto;
@@ -40,10 +40,10 @@ function Le() {
40
40
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
41
41
  }
42
42
  }
43
- async function Oe(o, e, t) {
43
+ async function Oe(r, e, t) {
44
44
  if (!(typeof window > "u"))
45
45
  try {
46
- const i = new URL(o, window.location.origin);
46
+ const i = new URL(r, window.location.origin);
47
47
  i.searchParams.set("shop", e);
48
48
  const a = await fetch(i, {
49
49
  method: "POST",
@@ -63,8 +63,8 @@ async function Oe(o, e, t) {
63
63
  }
64
64
  }
65
65
  const xt = St(null), qe = "#best-bundles";
66
- function Rt(o) {
67
- const e = String(o ?? "").trim().toLowerCase();
66
+ function kt(r) {
67
+ const e = String(r ?? "").trim().toLowerCase();
68
68
  if (!e.startsWith(qe)) return null;
69
69
  if (e === qe) return "default";
70
70
  const t = `${qe}:`;
@@ -72,7 +72,7 @@ function Rt(o) {
72
72
  const i = e.slice(t.length).trim();
73
73
  return i && i.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
74
74
  }
75
- const kt = {
75
+ const Rt = {
76
76
  primaryColor: "--bb-cta-bg",
77
77
  primaryHoverColor: "--bb-cta-bg-hover",
78
78
  primaryTextColor: "--bb-cta-text",
@@ -95,18 +95,18 @@ const kt = {
95
95
  fontFamilyBody: "--bb-font-family-body",
96
96
  fontFamilyTitle: "--bb-font-family-title"
97
97
  }, He = "bb-google-fonts";
98
- function ht(o) {
99
- const e = (o ?? "").trim().replace(/^["']|["']$/g, "");
98
+ function ht(r) {
99
+ const e = (r ?? "").trim().replace(/^["']|["']$/g, "");
100
100
  return e ? encodeURIComponent(e).replace(/%20/g, "+") : "";
101
101
  }
102
- function Pt(o) {
102
+ function Pt(r) {
103
103
  var c;
104
104
  if (typeof document > "u" || !document.head) return;
105
- if (!o) {
105
+ if (!r) {
106
106
  (c = document.getElementById(He)) == null || c.remove();
107
107
  return;
108
108
  }
109
- const e = (o.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (o.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), i = [];
109
+ const e = (r.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (r.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), i = [];
110
110
  e && i.push("family=" + ht(e)), t && t !== e && i.push("family=" + ht(t));
111
111
  const a = document.getElementById(He);
112
112
  if (i.length === 0) {
@@ -121,32 +121,32 @@ function Pt(o) {
121
121
  const d = document.createElement("link");
122
122
  d.id = He, d.rel = "stylesheet", d.href = n, document.head.appendChild(d);
123
123
  }
124
- function mt(o) {
125
- if (!o) return;
126
- Pt(o);
124
+ function mt(r) {
125
+ if (!r) return;
126
+ Pt(r);
127
127
  const e = document.documentElement;
128
- Object.entries(kt).forEach(([t, i]) => {
129
- let a = o[t];
128
+ Object.entries(Rt).forEach(([t, i]) => {
129
+ let a = r[t];
130
130
  a && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(a) && !/^["']/.test(a.trim()) && (a = `"${a.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(i, a));
131
131
  });
132
132
  }
133
- function ft(o) {
134
- if (typeof window > "u") return o;
133
+ function ft(r) {
134
+ if (typeof window > "u") return r;
135
135
  const e = window.__BUNDLE_PREVIEW_STYLES__;
136
- return e && typeof e == "object" ? e : o;
136
+ return e && typeof e == "object" ? e : r;
137
137
  }
138
138
  function Ot() {
139
139
  try {
140
- const o = globalThis.crypto;
141
- if (o != null && o.randomUUID) return o.randomUUID();
140
+ const r = globalThis.crypto;
141
+ if (r != null && r.randomUUID) return r.randomUUID();
142
142
  } catch {
143
143
  }
144
144
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
145
145
  }
146
- function pt(o) {
147
- return Number.isFinite(o) ? Math.max(0, Math.floor(o)) : 0;
146
+ function pt(r) {
147
+ return Number.isFinite(r) ? Math.max(0, Math.floor(r)) : 0;
148
148
  }
149
- function Fi(o) {
149
+ function $i(r) {
150
150
  const {
151
151
  apiBaseUrl: e,
152
152
  shop: t,
@@ -157,7 +157,7 @@ function Fi(o) {
157
157
  analyticsEndpoint: c,
158
158
  allowDrawerWhenInactive: I = !1,
159
159
  children: G
160
- } = o, g = c ?? `${e}/api/public/bundle-analytics`, [A, P] = j(!1), [z, H] = j(!n), [te, ne] = j(!1), [L, Q] = j(null), [ee, ue] = j((n == null ? void 0 : n.currencyCode) ?? null), [w, D] = j((n == null ? void 0 : n.config) ?? null), [W, Y] = j(
160
+ } = r, g = c ?? `${e}/api/public/bundle-analytics`, [A, P] = j(!1), [z, H] = j(!n), [te, ne] = j(!1), [L, Q] = j(null), [ee, ue] = j((n == null ? void 0 : n.currencyCode) ?? null), [w, D] = j((n == null ? void 0 : n.config) ?? null), [W, Y] = j(
161
161
  (n == null ? void 0 : n.eligibleVariants) ?? []
162
162
  ), [de, Ce] = j(
163
163
  () => ({ selections: {}, order: [] })
@@ -166,23 +166,23 @@ function Fi(o) {
166
166
  var x;
167
167
  if (n) return;
168
168
  (x = Ne.current) == null || x.abort();
169
- const r = new AbortController();
170
- Ne.current = r;
169
+ const o = new AbortController();
170
+ Ne.current = o;
171
171
  const _ = d ?? Tt;
172
- return H(!0), Q(null), _({ apiBaseUrl: e, shop: t, configHandle: a, signal: r.signal }).then((b) => {
172
+ return H(!0), Q(null), _({ apiBaseUrl: e, shop: t, configHandle: a, signal: o.signal }).then((b) => {
173
173
  if (!b.ok) {
174
174
  Q(b.error || "Failed to load bundle config."), D(null), Y([]), ue(null);
175
175
  return;
176
176
  }
177
177
  ue(b.currencyCode ?? null);
178
- const y = typeof window < "u" ? window : null, R = y == null ? void 0 : y.__BUNDLE_PREVIEW_CONFIG__;
179
- if (R) {
180
- D(R);
178
+ const y = typeof window < "u" ? window : null, k = y == null ? void 0 : y.__BUNDLE_PREVIEW_CONFIG__;
179
+ if (k) {
180
+ D(k);
181
181
  const U = y.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
182
182
  if (U !== void 0)
183
183
  Y(U);
184
184
  else {
185
- const B = new Set(R.eligibleVariantIds ?? []);
185
+ const B = new Set(k.eligibleVariantIds ?? []);
186
186
  Y(
187
187
  B.size === 0 ? b.eligibleVariants ?? [] : (b.eligibleVariants ?? []).filter((E) => B.has(E.id))
188
188
  );
@@ -196,77 +196,77 @@ function Fi(o) {
196
196
  }).finally(() => {
197
197
  const b = typeof window < "u" ? window : null;
198
198
  b != null && b.__BUNDLE_PREVIEW_CONFIG__ || H(!1);
199
- }), () => r.abort();
199
+ }), () => o.abort();
200
200
  }, [e, t, a, n, d]), V(() => {
201
- const r = ft(w == null ? void 0 : w.styleSettings);
202
- r && mt(r);
201
+ const o = ft(w == null ? void 0 : w.styleSettings);
202
+ o && mt(o);
203
203
  }, [w == null ? void 0 : w.styleSettings]), V(() => {
204
204
  if (typeof window > "u") return;
205
- const r = () => {
205
+ const o = () => {
206
206
  const _ = ft(void 0);
207
207
  _ && mt(_);
208
208
  };
209
- return window.addEventListener("bundle-preview-styles-updated", r), () => window.removeEventListener("bundle-preview-styles-updated", r);
209
+ return window.addEventListener("bundle-preview-styles-updated", o), () => window.removeEventListener("bundle-preview-styles-updated", o);
210
210
  }, []), V(() => {
211
211
  if (typeof window > "u") return;
212
- const r = window, _ = () => {
213
- const x = r.__BUNDLE_PREVIEW_CONFIG__;
212
+ const o = window, _ = () => {
213
+ const x = o.__BUNDLE_PREVIEW_CONFIG__;
214
214
  if (!x) return;
215
- const b = r.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
215
+ const b = o.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
216
216
  H(b), D(x);
217
- const y = r.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
218
- y ? Y(y) : b || Y((R) => {
217
+ const y = o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
218
+ y ? Y(y) : b || Y((k) => {
219
219
  const U = new Set(x.eligibleVariantIds ?? []);
220
- return U.size === 0 || R.length === 0 ? R : R.filter((B) => U.has(B.id));
220
+ return U.size === 0 || k.length === 0 ? k : k.filter((B) => U.has(B.id));
221
221
  });
222
222
  };
223
- return r.__BUNDLE_PREVIEW_CONFIG__ && _(), window.addEventListener("bundle-preview-config-updated", _), () => window.removeEventListener("bundle-preview-config-updated", _);
223
+ return o.__BUNDLE_PREVIEW_CONFIG__ && _(), window.addEventListener("bundle-preview-config-updated", _), () => window.removeEventListener("bundle-preview-config-updated", _);
224
224
  }, []);
225
225
  const ae = Te(() => {
226
226
  if (!(!I && w != null && !w.isActive) && (P(!0), g))
227
227
  try {
228
- const r = Le();
228
+ const o = Le();
229
229
  Oe(g, t, {
230
230
  eventType: "DRAWER_OPENED",
231
231
  shop: t,
232
- anonymousUserId: r,
232
+ anonymousUserId: o,
233
233
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
234
234
  mixpanelEvent: "bundle_opened"
235
235
  }).catch((_) => {
236
236
  console.warn("[Bundle Analytics] Failed to track drawer opened:", _);
237
237
  });
238
- } catch (r) {
239
- console.warn("[Bundle Analytics] Error in open() callback:", r);
238
+ } catch (o) {
239
+ console.warn("[Bundle Analytics] Error in open() callback:", o);
240
240
  }
241
241
  }, [g, t, w, I]), oe = Te(() => {
242
242
  if (g)
243
243
  try {
244
- const r = Le();
244
+ const o = Le();
245
245
  Oe(g, t, {
246
246
  eventType: "DRAWER_CLOSED",
247
247
  shop: t,
248
- anonymousUserId: r,
248
+ anonymousUserId: o,
249
249
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
250
250
  mixpanelEvent: "bundle_closed"
251
251
  }).catch((_) => {
252
252
  console.warn("[Bundle Analytics] Failed to track drawer closed:", _);
253
253
  });
254
- } catch (r) {
255
- console.warn("[Bundle Analytics] Error in close() callback:", r);
254
+ } catch (o) {
255
+ console.warn("[Bundle Analytics] Error in close() callback:", o);
256
256
  }
257
257
  P(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(qe) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
258
258
  }, [g, t]);
259
259
  V(() => {
260
260
  if (typeof window > "u") return;
261
- const r = () => {
262
- const _ = Rt(window.location.hash);
261
+ const o = () => {
262
+ const _ = kt(window.location.hash);
263
263
  _ && (_ === "default" || _ === a) && ae();
264
264
  };
265
- return r(), window.addEventListener("hashchange", r), () => window.removeEventListener("hashchange", r);
265
+ return o(), window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
266
266
  }, [ae, a]);
267
267
  const we = Te(() => {
268
- !I && !A && w != null && !w.isActive || P((r) => {
269
- if (r)
268
+ !I && !A && w != null && !w.isActive || P((o) => {
269
+ if (o)
270
270
  oe();
271
271
  else if (g)
272
272
  try {
@@ -283,40 +283,40 @@ function Fi(o) {
283
283
  } catch (_) {
284
284
  console.warn("[Bundle Analytics] Error in toggle() callback:", _);
285
285
  }
286
- return !r;
286
+ return !o;
287
287
  });
288
288
  }, [g, t, oe, w, A, I]);
289
289
  V(() => {
290
290
  !I && (w == null ? void 0 : w.isActive) === !1 && A && oe();
291
291
  }, [I, w == null ? void 0 : w.isActive, A, oe]);
292
- const xe = k(() => {
293
- const r = Number((w == null ? void 0 : w.maxBundleSize) ?? NaN), _ = Number.isFinite(r) ? Math.floor(r) : 100;
292
+ const xe = R(() => {
293
+ const o = Number((w == null ? void 0 : w.maxBundleSize) ?? NaN), _ = Number.isFinite(o) ? Math.floor(o) : 100;
294
294
  return Math.max(2, Math.min(100, _));
295
- }, [w == null ? void 0 : w.maxBundleSize]), X = k(() => new Set(
296
- W.filter((r) => r.availableForSale !== !1).map((r) => r.id)
297
- ), [W]), se = k(() => {
298
- const r = (w == null ? void 0 : w.rules) ?? [], _ = r.length ? Math.min(...r.map((R) => R.minBundleSize)) : 2, x = Number.isFinite(_) && _ > 0 ? _ : 2, b = Number((w == null ? void 0 : w.minBundleSize) ?? NaN), y = Number.isFinite(b) && Number.isInteger(b) ? Math.max(2, Math.min(100, b)) : null;
295
+ }, [w == null ? void 0 : w.maxBundleSize]), X = R(() => new Set(
296
+ W.filter((o) => o.availableForSale !== !1).map((o) => o.id)
297
+ ), [W]), se = R(() => {
298
+ const o = (w == null ? void 0 : w.rules) ?? [], _ = o.length ? Math.min(...o.map((k) => k.minBundleSize)) : 2, x = Number.isFinite(_) && _ > 0 ? _ : 2, b = Number((w == null ? void 0 : w.minBundleSize) ?? NaN), y = Number.isFinite(b) && Number.isInteger(b) ? Math.max(2, Math.min(100, b)) : null;
299
299
  return y == null ? x : Math.min(x, y);
300
- }, [w == null ? void 0 : w.minBundleSize, w == null ? void 0 : w.rules]), ke = Te((r, _) => {
301
- if (!X.has(r) && !z)
300
+ }, [w == null ? void 0 : w.minBundleSize, w == null ? void 0 : w.rules]), Re = Te((o, _) => {
301
+ if (!X.has(o) && !z)
302
302
  return;
303
303
  const x = pt(_);
304
304
  Ce((b) => {
305
- const y = b.selections[r] ?? 0, R = x - y, U = Object.values(b.selections).reduce((ie, O) => ie + (O || 0), 0), B = R > 0 ? Math.min(R, Math.max(0, xe - U)) : R, E = y + B;
305
+ const y = b.selections[o] ?? 0, k = x - y, U = Object.values(b.selections).reduce((ie, O) => ie + (O || 0), 0), B = k > 0 ? Math.min(k, Math.max(0, xe - U)) : k, E = y + B;
306
306
  let K;
307
307
  if (E <= 0) {
308
- const { [r]: ie, ...O } = b.selections;
308
+ const { [o]: ie, ...O } = b.selections;
309
309
  K = O;
310
- } else y === E ? K = b.selections : K = { ...b.selections, [r]: E };
310
+ } else y === E ? K = b.selections : K = { ...b.selections, [o]: E };
311
311
  let _e = b.order;
312
312
  if (B > 0)
313
- _e = [...b.order, ...Array.from({ length: B }, () => r)];
313
+ _e = [...b.order, ...Array.from({ length: B }, () => o)];
314
314
  else if (B < 0) {
315
315
  let ie = -B;
316
316
  const O = [];
317
317
  for (let q = b.order.length - 1; q >= 0; q--) {
318
318
  const T = b.order[q];
319
- if (T === r && ie > 0) {
319
+ if (T === o && ie > 0) {
320
320
  ie--;
321
321
  continue;
322
322
  }
@@ -349,14 +349,14 @@ function Fi(o) {
349
349
  });
350
350
  }, [xe, se, X, g, t, z]);
351
351
  V(() => {
352
- z || Ce((r) => {
353
- const _ = Object.entries(r.selections).filter(
352
+ z || Ce((o) => {
353
+ const _ = Object.entries(o.selections).filter(
354
354
  ([y]) => X.has(y)
355
- ), x = Object.fromEntries(_), b = r.order.filter((y) => X.has(y));
356
- return b.length === r.order.length && _.length === Object.keys(r.selections).length ? r : { selections: x, order: b };
355
+ ), x = Object.fromEntries(_), b = o.order.filter((y) => X.has(y));
356
+ return b.length === o.order.length && _.length === Object.keys(o.selections).length ? o : { selections: x, order: b };
357
357
  });
358
358
  }, [z, X]);
359
- const ge = Te(() => Ce({ selections: {}, order: [] }), []), he = de.selections, ye = de.order, me = k(() => Object.values(he).reduce((r, _) => r + (_ || 0), 0), [he]), fe = k(() => !(z || te || L || !(w != null && w.isActive) || me < se), [me, w == null ? void 0 : w.isActive, L, z, se, te]), pe = Te(async (r) => {
359
+ const ge = Te(() => Ce({ selections: {}, order: [] }), []), he = de.selections, ye = de.order, me = R(() => Object.values(he).reduce((o, _) => o + (_ || 0), 0), [he]), fe = R(() => !(z || te || L || !(w != null && w.isActive) || me < se), [me, w == null ? void 0 : w.isActive, L, z, se, te]), pe = Te(async (o) => {
360
360
  var O, q;
361
361
  if (!fe || !w) return;
362
362
  const _ = Ot(), x = (w.title ?? "").trim().slice(0, 255), b = Object.entries(he).map(([T, Z]) => ({ merchandiseId: T, quantity: pt(Z) })).filter((T) => T.quantity > 0).filter((T) => X.has(T.merchandiseId)).map((T) => ({
@@ -371,14 +371,14 @@ function Fi(o) {
371
371
  }));
372
372
  if (!b.length) return;
373
373
  const y = new Map(W.map((T) => [T.id, T]));
374
- let R = 0;
374
+ let k = 0;
375
375
  for (const [T, Z] of Object.entries(he)) {
376
376
  const Fe = Z ?? 0;
377
377
  if (Fe <= 0) continue;
378
378
  const Me = y.get(T), Be = Number(Me == null ? void 0 : Me.price);
379
- Number.isFinite(Be) && (R += Be * Fe);
379
+ Number.isFinite(Be) && (k += Be * Fe);
380
380
  }
381
- R = Math.round(R * 100) / 100;
381
+ k = Math.round(k * 100) / 100;
382
382
  const U = [...w.rules ?? []].sort((T, Z) => T.minBundleSize - Z.minBundleSize);
383
383
  let B = null;
384
384
  for (const T of U)
@@ -386,19 +386,19 @@ function Fi(o) {
386
386
  const E = B ? (() => {
387
387
  const T = Number.parseFloat(B.discountPercent);
388
388
  return Number.isFinite(T) && T > 0 ? T : null;
389
- })() : null, K = E ? Math.round(R * (1 - E / 100) * 100) / 100 : R, _e = R - K, be = b.map((T) => T.merchandiseId), Se = (B == null ? void 0 : B.handle) ?? "", ie = ((O = B == null ? void 0 : B.label) == null ? void 0 : O.trim()) || "";
389
+ })() : null, K = E ? Math.round(k * (1 - E / 100) * 100) / 100 : k, _e = k - K, be = b.map((T) => T.merchandiseId), Se = (B == null ? void 0 : B.handle) ?? "", ie = ((O = B == null ? void 0 : B.label) == null ? void 0 : O.trim()) || "";
390
390
  ne(!0);
391
391
  try {
392
- if (r != null && r.checkout ? await i.linesAddForCheckout(b) : await i.linesAdd(b), g)
392
+ if (o != null && o.checkout ? await i.linesAddForCheckout(b) : await i.linesAdd(b), g)
393
393
  try {
394
- const T = Le(), Z = !!(r != null && r.checkout);
394
+ const T = Le(), Z = !!(o != null && o.checkout);
395
395
  Oe(g, t, {
396
396
  eventType: "BUNDLE_ADDED_TO_BASKET",
397
397
  shop: t,
398
398
  anonymousUserId: T,
399
399
  bundleId: _,
400
400
  productVariantIds: be,
401
- grossPrice: R,
401
+ grossPrice: k,
402
402
  discountedPrice: K,
403
403
  currency: ee ?? void 0,
404
404
  discountThresholdIdentifier: Se,
@@ -411,7 +411,7 @@ function Fi(o) {
411
411
  });
412
412
  } catch {
413
413
  }
414
- ge(), oe(), (q = r == null ? void 0 : r.onComplete) == null || q.call(r);
414
+ ge(), oe(), (q = o == null ? void 0 : o.onComplete) == null || q.call(o);
415
415
  } finally {
416
416
  ne(!1);
417
417
  }
@@ -433,8 +433,8 @@ function Fi(o) {
433
433
  await pe(
434
434
  {
435
435
  onComplete: () => {
436
- var r;
437
- (r = i.openCartUI) == null || r.call(i);
436
+ var o;
437
+ (o = i.openCartUI) == null || o.call(i);
438
438
  }
439
439
  }
440
440
  );
@@ -443,12 +443,12 @@ function Fi(o) {
443
443
  {
444
444
  checkout: !0,
445
445
  onComplete: () => {
446
- var r;
447
- (r = i.navigateToCheckout) == null || r.call(i);
446
+ var o;
447
+ (o = i.navigateToCheckout) == null || o.call(i);
448
448
  }
449
449
  }
450
450
  );
451
- }, [pe, i]), p = k(
451
+ }, [pe, i]), p = R(
452
452
  () => ({
453
453
  isOpen: A,
454
454
  open: ae,
@@ -462,7 +462,7 @@ function Fi(o) {
462
462
  eligibleVariants: W,
463
463
  selections: he,
464
464
  selectionOrder: ye,
465
- setQuantity: ke,
465
+ setQuantity: Re,
466
466
  clearSelections: ge,
467
467
  bundleSize: me,
468
468
  minRequired: se,
@@ -483,7 +483,7 @@ function Fi(o) {
483
483
  W,
484
484
  he,
485
485
  ye,
486
- ke,
486
+ Re,
487
487
  ge,
488
488
  me,
489
489
  se,
@@ -495,27 +495,27 @@ function Fi(o) {
495
495
  return /* @__PURE__ */ s(xt.Provider, { value: p, children: G });
496
496
  }
497
497
  function ze() {
498
- const o = Bt(xt);
499
- if (!o)
498
+ const r = Bt(xt);
499
+ if (!r)
500
500
  throw new Error("useBundleBuilder must be used within <BundleProvider />");
501
- return o;
501
+ return r;
502
502
  }
503
- function Ai() {
504
- const { isOpen: o, open: e, close: t, toggle: i } = ze();
505
- return { isOpen: o, open: e, close: t, toggle: i };
503
+ function Ei() {
504
+ const { isOpen: r, open: e, close: t, toggle: i } = ze();
505
+ return { isOpen: r, open: e, close: t, toggle: i };
506
506
  }
507
507
  const Mt = "_button_18rtl_1", Ft = {
508
508
  button: Mt
509
509
  };
510
- function Li(o) {
510
+ function qi(r) {
511
511
  const { toggle: e } = ze();
512
512
  return /* @__PURE__ */ s(
513
513
  "button",
514
514
  {
515
515
  type: "button",
516
516
  onClick: e,
517
- className: [Ft.button, o.className].filter(Boolean).join(" "),
518
- children: o.children ?? "Build a bundle"
517
+ className: [Ft.button, r.className].filter(Boolean).join(" "),
518
+ children: r.children ?? "Build a bundle"
519
519
  }
520
520
  );
521
521
  }
@@ -523,7 +523,7 @@ var Qe, _t;
523
523
  function At() {
524
524
  if (_t) return Qe;
525
525
  _t = 1;
526
- var o = {
526
+ var r = {
527
527
  linear: function(e, t, i, a) {
528
528
  var n = i - t;
529
529
  return n * e / a + t;
@@ -638,7 +638,7 @@ function At() {
638
638
  },
639
639
  easeInBounce: function(e, t, i, a) {
640
640
  var n = i - t, d;
641
- return d = o.easeOutBounce(a - e, 0, n, a), n - d + t;
641
+ return d = r.easeOutBounce(a - e, 0, n, a), n - d + t;
642
642
  },
643
643
  easeOutBounce: function(e, t, i, a) {
644
644
  var n = i - t;
@@ -646,39 +646,39 @@ function At() {
646
646
  },
647
647
  easeInOutBounce: function(e, t, i, a) {
648
648
  var n = i - t, d;
649
- return e < a / 2 ? (d = o.easeInBounce(e * 2, 0, n, a), d * 0.5 + t) : (d = o.easeOutBounce(e * 2 - a, 0, n, a), d * 0.5 + n * 0.5 + t);
649
+ return e < a / 2 ? (d = r.easeInBounce(e * 2, 0, n, a), d * 0.5 + t) : (d = r.easeOutBounce(e * 2 - a, 0, n, a), d * 0.5 + n * 0.5 + t);
650
650
  }
651
651
  };
652
- return Qe = o, Qe;
652
+ return Qe = r, Qe;
653
653
  }
654
654
  var Lt = At();
655
- function Dt(o) {
656
- return o * Math.PI / 180;
655
+ function Dt(r) {
656
+ return r * Math.PI / 180;
657
657
  }
658
- function re(o, e) {
659
- return o + Math.random() * (e - o);
658
+ function re(r, e) {
659
+ return r + Math.random() * (e - r);
660
660
  }
661
- function $t(o, e) {
662
- return Math.floor(o + Math.random() * (e - o + 1));
661
+ function $t(r, e) {
662
+ return Math.floor(r + Math.random() * (e - r + 1));
663
663
  }
664
664
  var De;
665
- (function(o) {
666
- o[o.Circle = 0] = "Circle", o[o.Square = 1] = "Square", o[o.Strip = 2] = "Strip";
665
+ (function(r) {
666
+ r[r.Circle = 0] = "Circle", r[r.Square = 1] = "Square", r[r.Strip = 2] = "Strip";
667
667
  })(De || (De = {}));
668
- var Re;
669
- (function(o) {
670
- o[o.Positive = 1] = "Positive", o[o.Negative = -1] = "Negative";
671
- })(Re || (Re = {}));
668
+ var ke;
669
+ (function(r) {
670
+ r[r.Positive = 1] = "Positive", r[r.Negative = -1] = "Negative";
671
+ })(ke || (ke = {}));
672
672
  const Et = 1e3 / 60;
673
673
  class qt {
674
674
  constructor(e, t, i, a) {
675
675
  this.getOptions = t;
676
676
  const { colors: n, initialVelocityX: d, initialVelocityY: c } = this.getOptions();
677
- this.context = e, this.x = i, this.y = a, this.w = re(5, 20), this.h = re(5, 20), this.radius = re(5, 10), this.vx = typeof d == "number" ? re(-d, d) : re(d.min, d.max), this.vy = typeof c == "number" ? re(-c, 0) : re(c.min, c.max), this.shape = $t(0, 2), this.angle = Dt(re(0, 360)), this.angularSpin = re(-0.2, 0.2), this.color = n[Math.floor(Math.random() * n.length)], this.rotateY = re(0, 1), this.rotationDirection = re(0, 1) ? Re.Positive : Re.Negative;
677
+ this.context = e, this.x = i, this.y = a, this.w = re(5, 20), this.h = re(5, 20), this.radius = re(5, 10), this.vx = typeof d == "number" ? re(-d, d) : re(d.min, d.max), this.vy = typeof c == "number" ? re(-c, 0) : re(c.min, c.max), this.shape = $t(0, 2), this.angle = Dt(re(0, 360)), this.angularSpin = re(-0.2, 0.2), this.color = n[Math.floor(Math.random() * n.length)], this.rotateY = re(0, 1), this.rotationDirection = re(0, 1) ? ke.Positive : ke.Negative;
678
678
  }
679
679
  update(e) {
680
680
  const { gravity: t, wind: i, friction: a, opacity: n, drawShape: d } = this.getOptions(), c = e / Et;
681
- this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx += i * c, this.vx *= a ** c, this.vy *= a ** c, this.rotateY >= 1 && this.rotationDirection === Re.Positive ? this.rotationDirection = Re.Negative : this.rotateY <= -1 && this.rotationDirection === Re.Negative && (this.rotationDirection = Re.Positive);
681
+ this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx += i * c, this.vx *= a ** c, this.vy *= a ** c, this.rotateY >= 1 && this.rotationDirection === ke.Positive ? this.rotationDirection = ke.Negative : this.rotateY <= -1 && this.rotationDirection === ke.Negative && (this.rotationDirection = ke.Positive);
682
682
  const I = 0.1 * this.rotationDirection * c;
683
683
  if (this.rotateY += I, this.angle += this.angularSpin, this.context.save(), this.context.translate(this.x, this.y), this.context.rotate(this.angle), this.context.scale(1, this.rotateY), this.context.rotate(this.angle), this.context.beginPath(), this.context.fillStyle = this.color, this.context.strokeStyle = this.color, this.context.globalAlpha = n, this.context.lineCap = "round", this.context.lineWidth = 2, d && typeof d == "function")
684
684
  d.call(this, this.context);
@@ -845,7 +845,7 @@ et.defaultProps = {
845
845
  ...Je
846
846
  };
847
847
  et.displayName = "ReactConfetti";
848
- function Ke(o) {
848
+ function Ke(r) {
849
849
  const e = {}, t = {}, i = {}, a = [
850
850
  ...Object.keys(Je),
851
851
  "confettiSource",
@@ -853,27 +853,27 @@ function Ke(o) {
853
853
  "onConfettiComplete",
854
854
  "frameRate"
855
855
  ], n = ["canvasRef"];
856
- for (const d in o) {
857
- const c = o[d];
856
+ for (const d in r) {
857
+ const c = r[d];
858
858
  a.includes(d) ? e[d] = c : n.includes(d) ? n[d] = c : i[d] = c;
859
859
  }
860
860
  return [e, i, t];
861
861
  }
862
- const Ut = Ve.forwardRef((o, e) => s(et, { canvasRef: e, ...o }));
862
+ const Ut = Ve.forwardRef((r, e) => s(et, { canvasRef: e, ...r }));
863
863
  /**
864
864
  * @license lucide-react v0.515.0 - ISC
865
865
  *
866
866
  * This source code is licensed under the ISC license.
867
867
  * See the LICENSE file in the root directory of this source tree.
868
868
  */
869
- const jt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Gt = (o) => o.replace(
869
+ const jt = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Gt = (r) => r.replace(
870
870
  /^([A-Z])|[\s-_]+(\w)/g,
871
871
  (e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
872
- ), bt = (o) => {
873
- const e = Gt(o);
872
+ ), bt = (r) => {
873
+ const e = Gt(r);
874
874
  return e.charAt(0).toUpperCase() + e.slice(1);
875
- }, gt = (...o) => o.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), Ht = (o) => {
876
- for (const e in o)
875
+ }, gt = (...r) => r.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), Ht = (r) => {
876
+ for (const e in r)
877
877
  if (e.startsWith("aria-") || e === "role" || e === "title")
878
878
  return !0;
879
879
  };
@@ -902,7 +902,7 @@ var Qt = {
902
902
  */
903
903
  const Kt = wt(
904
904
  ({
905
- color: o = "currentColor",
905
+ color: r = "currentColor",
906
906
  size: e = 24,
907
907
  strokeWidth: t = 2,
908
908
  absoluteStrokeWidth: i,
@@ -917,7 +917,7 @@ const Kt = wt(
917
917
  ...Qt,
918
918
  width: e,
919
919
  height: e,
920
- stroke: o,
920
+ stroke: r,
921
921
  strokeWidth: i ? Number(t) * 24 / Number(e) : t,
922
922
  className: gt("lucide", a),
923
923
  ...!n && !Ht(c) && { "aria-hidden": "true" },
@@ -935,20 +935,20 @@ const Kt = wt(
935
935
  * This source code is licensed under the ISC license.
936
936
  * See the LICENSE file in the root directory of this source tree.
937
937
  */
938
- const tt = (o, e) => {
938
+ const tt = (r, e) => {
939
939
  const t = wt(
940
940
  ({ className: i, ...a }, n) => Ze(Kt, {
941
941
  ref: n,
942
942
  iconNode: e,
943
943
  className: gt(
944
- `lucide-${jt(bt(o))}`,
945
- `lucide-${o}`,
944
+ `lucide-${jt(bt(r))}`,
945
+ `lucide-${r}`,
946
946
  i
947
947
  ),
948
948
  ...a
949
949
  })
950
950
  );
951
- return t.displayName = bt(o), t;
951
+ return t.displayName = bt(r), t;
952
952
  };
953
953
  /**
954
954
  * @license lucide-react v0.515.0 - ISC
@@ -982,7 +982,7 @@ const Jt = [
982
982
  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
983
983
  ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
984
984
  ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
985
- ], en = tt("trash-2", Jt), tn = "_backdrop_18x6y_1", nn = "_celebrationOverlay_18x6y_14", an = "_celebrationChip_18x6y_23", rn = "_backdropOpen_18x6y_74", on = "_backdropClosed_18x6y_78", sn = "_panel_18x6y_82", ln = "_panelOpen_18x6y_103", cn = "_panelClosed_18x6y_107", un = "_header_18x6y_146", dn = "_headerCenter_18x6y_155", hn = "_title_18x6y_163", mn = "_searchIconButton_18x6y_172", fn = "_headerTitleWrap_18x6y_195", pn = "_headerSearchWrap_18x6y_199", _n = "_headerSearchOpen_18x6y_211", bn = "_searchBar_18x6y_223", yn = "_searchInput_18x6y_235", vn = "_searchClearButton_18x6y_256", wn = "_closeButton_18x6y_278", xn = "_body_18x6y_312", gn = "_muted_18x6y_317", In = "_error_18x6y_322", Cn = "_variants_18x6y_327", Nn = "_variantList_18x6y_331", Sn = "_variantRow_18x6y_339", Bn = "_variantRowSoldOut_18x6y_347", Tn = "_variantLeft_18x6y_351", Rn = "_addToBundleButton_18x6y_358", kn = "_soldOutContainer_18x6y_386", Pn = "_soldOut_18x6y_386", On = "_variantThumb_18x6y_403", Mn = "_variantThumbImg_18x6y_413", Fn = "_variantThumbFallback_18x6y_420", An = "_variantInfo_18x6y_430", Ln = "_variantName_18x6y_434", Dn = "_variantMeta_18x6y_443", $n = "_variantPriceRow_18x6y_451", En = "_variantCompareAt_18x6y_458", qn = "_variantPrice_18x6y_451", Vn = "_qtyControls_18x6y_469", zn = "_qtyButton_18x6y_475", Wn = "_qtyValue_18x6y_501", Un = "_footer_18x6y_508", jn = "_poweredBy_18x6y_516", Gn = "_boxSummaryWindow_18x6y_528", Hn = "_boxSummaryRow_18x6y_546", Qn = "_boxSlot_18x6y_554", Kn = "_boxItem_18x6y_563", Yn = "_boxItemClickable_18x6y_575", Xn = "_boxThresholdLabel_18x6y_584", Zn = "_boxItemPlaceholder_18x6y_595", Jn = "_boxItemFilled_18x6y_601", ea = "_boxItemThreshold_18x6y_607", ta = "_boxItemDiscountText_18x6y_615", na = "_boxItemPlus_18x6y_623", aa = "_boxItemImage_18x6y_630", ia = "_boxItemFallback_18x6y_637", ra = "_ctaButtonGroup_18x6y_648", oa = "_ctaButtonGroupAnimating_18x6y_655", sa = "_cta_18x6y_648", la = "_ctaDualLeft_18x6y_683", ca = "_ctaDualLeftAnimating_18x6y_701", ua = "_ctaDualRight_18x6y_714", da = "_ctaDualRightAnimating_18x6y_730", ha = "_ctaTotals_18x6y_741", ma = "_ctaDiscountBadge_18x6y_749", fa = "_ctaTotalsWrap_18x6y_763", pa = "_ctaTotalsWrapVisible_18x6y_776", _a = "_ctaTotalsStrike_18x6y_783", ba = "_ctaTotalsPrice_18x6y_790", h = {
985
+ ], en = tt("trash-2", Jt), tn = "_backdrop_18x6y_1", nn = "_celebrationOverlay_18x6y_14", an = "_celebrationChip_18x6y_23", rn = "_backdropOpen_18x6y_74", on = "_backdropClosed_18x6y_78", sn = "_panel_18x6y_82", ln = "_panelOpen_18x6y_103", cn = "_panelClosed_18x6y_107", un = "_header_18x6y_146", dn = "_headerCenter_18x6y_155", hn = "_title_18x6y_163", mn = "_searchIconButton_18x6y_172", fn = "_headerTitleWrap_18x6y_195", pn = "_headerSearchWrap_18x6y_199", _n = "_headerSearchOpen_18x6y_211", bn = "_searchBar_18x6y_223", yn = "_searchInput_18x6y_235", vn = "_searchClearButton_18x6y_256", wn = "_closeButton_18x6y_278", xn = "_body_18x6y_312", gn = "_muted_18x6y_317", In = "_error_18x6y_322", Cn = "_variants_18x6y_327", Nn = "_variantList_18x6y_331", Sn = "_variantRow_18x6y_339", Bn = "_variantRowSoldOut_18x6y_347", Tn = "_variantLeft_18x6y_351", kn = "_addToBundleButton_18x6y_358", Rn = "_soldOutContainer_18x6y_386", Pn = "_soldOut_18x6y_386", On = "_variantThumb_18x6y_403", Mn = "_variantThumbImg_18x6y_413", Fn = "_variantThumbFallback_18x6y_420", An = "_variantInfo_18x6y_430", Ln = "_variantName_18x6y_434", Dn = "_variantMeta_18x6y_443", $n = "_variantPriceRow_18x6y_451", En = "_variantCompareAt_18x6y_458", qn = "_variantPrice_18x6y_451", Vn = "_qtyControls_18x6y_469", zn = "_qtyButton_18x6y_475", Wn = "_qtyValue_18x6y_501", Un = "_footer_18x6y_508", jn = "_poweredBy_18x6y_516", Gn = "_boxSummaryWindow_18x6y_528", Hn = "_boxSummaryRow_18x6y_546", Qn = "_boxSlot_18x6y_554", Kn = "_boxItem_18x6y_563", Yn = "_boxItemClickable_18x6y_575", Xn = "_boxThresholdLabel_18x6y_584", Zn = "_boxItemPlaceholder_18x6y_595", Jn = "_boxItemFilled_18x6y_601", ea = "_boxItemThreshold_18x6y_607", ta = "_boxItemDiscountText_18x6y_615", na = "_boxItemPlus_18x6y_623", aa = "_boxItemImage_18x6y_630", ia = "_boxItemFallback_18x6y_637", ra = "_ctaButtonGroup_18x6y_648", oa = "_ctaButtonGroupAnimating_18x6y_655", sa = "_cta_18x6y_648", la = "_ctaDualLeft_18x6y_683", ca = "_ctaDualLeftAnimating_18x6y_701", ua = "_ctaDualRight_18x6y_714", da = "_ctaDualRightAnimating_18x6y_730", ha = "_ctaTotals_18x6y_741", ma = "_ctaDiscountBadge_18x6y_749", fa = "_ctaTotalsWrap_18x6y_763", pa = "_ctaTotalsWrapVisible_18x6y_776", _a = "_ctaTotalsStrike_18x6y_783", ba = "_ctaTotalsPrice_18x6y_790", h = {
986
986
  backdrop: tn,
987
987
  celebrationOverlay: nn,
988
988
  celebrationChip: an,
@@ -1010,8 +1010,8 @@ const Jt = [
1010
1010
  variantRow: Sn,
1011
1011
  variantRowSoldOut: Bn,
1012
1012
  variantLeft: Tn,
1013
- addToBundleButton: Rn,
1014
- soldOutContainer: kn,
1013
+ addToBundleButton: kn,
1014
+ soldOutContainer: Rn,
1015
1015
  soldOut: Pn,
1016
1016
  variantThumb: On,
1017
1017
  variantThumbImg: Mn,
@@ -1054,7 +1054,7 @@ const Jt = [
1054
1054
  ctaTotalsStrike: _a,
1055
1055
  ctaTotalsPrice: ba
1056
1056
  };
1057
- function Di(o) {
1057
+ function Vi(r) {
1058
1058
  var ct, ut;
1059
1059
  const {
1060
1060
  isOpen: e,
@@ -1073,14 +1073,14 @@ function Di(o) {
1073
1073
  canSubmit: H,
1074
1074
  submit: te,
1075
1075
  submitAndCheckout: ne
1076
- } = ze(), [L, Q] = j(!1), [ee, ue] = j(""), w = J(null), D = J(null), W = J(null), [Y, de] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [Ce, Ne] = j(0), [ae, oe] = j(null), [we, xe] = j(!1), X = J(null), se = J(P), ke = 7e3, [ge, he] = j(0), [ye, me] = j(null), [fe, pe] = j(!1), le = J(null), m = 2800, p = [
1076
+ } = ze(), [L, Q] = j(!1), [ee, ue] = j(""), w = J(null), D = J(null), W = J(null), [Y, de] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [Ce, Ne] = j(0), [ae, oe] = j(null), [we, xe] = j(!1), X = J(null), se = J(P), Re = 7e3, [ge, he] = j(0), [ye, me] = j(null), [fe, pe] = j(!1), le = J(null), m = 2800, p = [
1077
1077
  "#2563eb",
1078
1078
  "#3b82f6",
1079
1079
  "#60a5fa",
1080
1080
  "#93c5fd",
1081
1081
  "#bae6fd",
1082
1082
  "#e0f2fe"
1083
- ], r = k(() => {
1083
+ ], o = R(() => {
1084
1084
  var u;
1085
1085
  const l = (u = c == null ? void 0 : c.styleSettings) == null ? void 0 : u.confettiColors;
1086
1086
  return Array.isArray(l) && l.length >= 6 ? l.slice(0, 6).map(
@@ -1102,7 +1102,7 @@ function Di(o) {
1102
1102
  }, y = (l) => {
1103
1103
  const u = b(l), v = x(l.selectedOptions);
1104
1104
  return [u, v].filter(Boolean).join(" — ");
1105
- }, [R, U] = j(e), B = J(null), E = (l) => {
1105
+ }, [k, U] = j(e), B = J(null), E = (l) => {
1106
1106
  const u = Number(l);
1107
1107
  if (!Number.isFinite(u)) return l;
1108
1108
  if (d)
@@ -1111,10 +1111,10 @@ function Di(o) {
1111
1111
  } catch {
1112
1112
  }
1113
1113
  return `$${u.toFixed(2)}`;
1114
- }, K = ((ut = c == null ? void 0 : c.title) == null ? void 0 : ut.trim()) || "Build your bundle", _e = k(() => {
1114
+ }, K = ((ut = c == null ? void 0 : c.title) == null ? void 0 : ut.trim()) || "Build your bundle", _e = R(() => {
1115
1115
  const l = Number((c == null ? void 0 : c.maxBundleSize) ?? NaN), u = Number.isFinite(l) ? Math.floor(l) : 100;
1116
1116
  return Math.max(2, Math.min(100, u));
1117
- }, [c == null ? void 0 : c.maxBundleSize]), be = P >= _e, Se = k(() => [...I].sort((l, u) => l.displayName.localeCompare(u.displayName)), [I]), ie = k(() => {
1117
+ }, [c == null ? void 0 : c.maxBundleSize]), be = P >= _e, Se = R(() => [...I].sort((l, u) => l.displayName.localeCompare(u.displayName)), [I]), ie = R(() => {
1118
1118
  const l = ee.trim().toLowerCase();
1119
1119
  if (!l) return Se;
1120
1120
  const u = l.split(/\s+/).filter(Boolean), v = (N) => {
@@ -1127,16 +1127,16 @@ function Di(o) {
1127
1127
  return u.every(($) => F.includes($));
1128
1128
  };
1129
1129
  return Se.filter(v);
1130
- }, [ee, Se]), O = k(() => [...(c == null ? void 0 : c.rules) ?? []].sort((l, u) => l.minBundleSize - u.minBundleSize), [c == null ? void 0 : c.rules]), q = k(() => Math.max(0, z - P), [P, z]), T = k(() => {
1130
+ }, [ee, Se]), O = R(() => [...(c == null ? void 0 : c.rules) ?? []].sort((l, u) => l.minBundleSize - u.minBundleSize), [c == null ? void 0 : c.rules]), q = R(() => Math.max(0, z - P), [P, z]), T = R(() => {
1131
1131
  let l = null;
1132
1132
  for (const u of O)
1133
1133
  P >= u.minBundleSize && (l = u);
1134
1134
  return l;
1135
- }, [P, O]), Z = k(() => {
1135
+ }, [P, O]), Z = R(() => {
1136
1136
  if (!T) return null;
1137
1137
  const l = Number.parseFloat(T.discountPercent);
1138
1138
  return !Number.isFinite(l) || l <= 0 ? null : l;
1139
- }, [T]), Fe = O[0], Me = !!(Fe && P >= Fe.minBundleSize), Be = k(() => {
1139
+ }, [T]), Fe = O[0], Me = !!(Fe && P >= Fe.minBundleSize), Be = R(() => {
1140
1140
  const l = new Map(I.map((v) => [v.id, v]));
1141
1141
  let u = 0;
1142
1142
  for (const [v, N] of Object.entries(G)) {
@@ -1146,14 +1146,14 @@ function Di(o) {
1146
1146
  Number.isFinite(M) && (u += M * C);
1147
1147
  }
1148
1148
  return Math.round(u * 100) / 100;
1149
- }, [I, G]), It = k(() => {
1149
+ }, [I, G]), It = R(() => {
1150
1150
  if (!Z) return Be;
1151
1151
  const l = Be * (1 - Z / 100);
1152
1152
  return Math.round(l * 100) / 100;
1153
- }, [Z, Be]), nt = k(() => O.length ? Math.max(...O.map((l) => l.minBundleSize)) : 0, [O]), We = k(() => {
1153
+ }, [Z, Be]), nt = R(() => O.length ? Math.max(...O.map((l) => l.minBundleSize)) : 0, [O]), We = R(() => {
1154
1154
  const l = new Map(I.map((u) => [u.id, u]));
1155
1155
  return g.map((u) => l.get(u)).filter((u) => !!u);
1156
- }, [I, g]), Ct = k(() => {
1156
+ }, [I, g]), Ct = R(() => {
1157
1157
  var u;
1158
1158
  const l = /* @__PURE__ */ new Map();
1159
1159
  for (const v of O) {
@@ -1165,7 +1165,7 @@ function Di(o) {
1165
1165
  });
1166
1166
  }
1167
1167
  return l;
1168
- }, [O]), Nt = k(() => Math.max(nt || z, We.length), [We.length, nt, z]), [Ue, at] = j(!0), it = J(q);
1168
+ }, [O]), Nt = R(() => Math.max(nt || z, We.length), [We.length, nt, z]), [Ue, at] = j(!0), it = J(q);
1169
1169
  V(() => {
1170
1170
  if (((c == null ? void 0 : c.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
1171
1171
  const u = it.current > 0;
@@ -1250,19 +1250,19 @@ function Di(o) {
1250
1250
  };
1251
1251
  oe(M), Ne((ce) => ce + 1), xe(!0), X.current != null && window.clearTimeout(X.current), X.current = window.setTimeout(() => {
1252
1252
  xe(!1), X.current = null;
1253
- }, ke);
1253
+ }, Re);
1254
1254
  });
1255
1255
  return () => cancelAnimationFrame(l);
1256
- }, [ge, ye, ke, fe, e]), V(() => {
1256
+ }, [ge, ye, Re, fe, e]), V(() => {
1257
1257
  var l;
1258
1258
  e && ((l = je.current) == null || l.focus());
1259
- }, [e]), R ? /* @__PURE__ */ S(
1259
+ }, [e]), k ? /* @__PURE__ */ S(
1260
1260
  "div",
1261
1261
  {
1262
1262
  role: "dialog",
1263
1263
  "aria-modal": "true",
1264
1264
  "aria-label": "Bundle builder",
1265
- className: [h.backdrop, e ? h.backdropOpen : h.backdropClosed, o.className].filter(Boolean).join(" "),
1265
+ className: [h.backdrop, e ? h.backdropOpen : h.backdropClosed, r.className].filter(Boolean).join(" "),
1266
1266
  onMouseDown: (l) => {
1267
1267
  l.target === l.currentTarget && t();
1268
1268
  },
@@ -1273,7 +1273,7 @@ function Di(o) {
1273
1273
  width: Y.width,
1274
1274
  height: Y.height,
1275
1275
  confettiSource: ae,
1276
- colors: r,
1276
+ colors: o,
1277
1277
  recycle: !1,
1278
1278
  numberOfPieces: 70,
1279
1279
  tweenDuration: 100,
@@ -1504,7 +1504,7 @@ function Di(o) {
1504
1504
  }
1505
1505
  ) : null;
1506
1506
  }
1507
- const ya = "_panel_1n9m6_2", va = "_header_1n9m6_20", wa = "_title_1n9m6_24", xa = "_status_1n9m6_32", ga = "_error_1n9m6_37", Ia = "_inactive_1n9m6_43", Ca = "_section_1n9m6_49", Na = "_sectionTitle_1n9m6_54", Sa = "_rulesVisual_1n9m6_107", Ba = "_rulesLabelsRow_1n9m6_114", Ta = "_rulesLinesRow_1n9m6_121", Ra = "_rulesLineLabelCell_1n9m6_128", ka = "_rulesLineLabel_1n9m6_128", Pa = "_rulesLine_1n9m6_121", Oa = "_rulesLineEmpty_1n9m6_162", Ma = "_rulesLineFilled_1n9m6_166", Fa = "_variants_1n9m6_170", Aa = "_variantList_1n9m6_178", La = "_variantRow_1n9m6_186", Da = "_variantRowInteractive_1n9m6_198", $a = "_variantRowSelected_1n9m6_202", Ea = "_variantRowSoldOut_1n9m6_207", qa = "_variantMedia_1n9m6_211", Va = "_variantContent_1n9m6_219", za = "_variantHeader_1n9m6_227", Wa = "_variantTitle_1n9m6_233", Ua = "_variantImage_1n9m6_247", ja = "_variantImageFallback_1n9m6_255", Ga = "_variantMeta_1n9m6_268", Ha = "_variantPrice_1n9m6_273", Qa = "_variantFooterRow_1n9m6_279", Ka = "_variantActions_1n9m6_286", Ya = "_qtyActions_1n9m6_292", Xa = "_soldOut_1n9m6_343", Za = "_qtyChip_1n9m6_351", Ja = "_qtyChipInteractive_1n9m6_366", ei = "_qtyChipValue_1n9m6_370", ti = "_qtyChipPlus_1n9m6_376", ni = "_qtyChipClear_1n9m6_381", ai = "_qtyTrash_1n9m6_400", ii = "_footer_1n9m6_412", ri = "_boxSummaryWindow_1n9m6_417", oi = "_boxSummaryRow_1n9m6_431", si = "_boxSlot_1n9m6_439", li = "_boxItem_1n9m6_448", ci = "_boxItemFilled_1n9m6_465", ui = "_boxItemPlaceholder_1n9m6_471", di = "_boxItemThreshold_1n9m6_477", hi = "_boxItemClickable_1n9m6_485", mi = "_boxItemImage_1n9m6_494", fi = "_boxItemFallback_1n9m6_505", pi = "_boxItemPlus_1n9m6_518", _i = "_boxItemDiscountText_1n9m6_530", bi = "_boxThresholdLabel_1n9m6_543", yi = "_totalsReveal_1n9m6_554", vi = "_totalsRevealOpen_1n9m6_562", wi = "_ctaTotalsWrap_1n9m6_567", xi = "_ctaTotalsWrapVisible_1n9m6_572", gi = "_ctaTotals_1n9m6_567", Ii = "_ctaDiscountBadge_1n9m6_587", Ci = "_ctaTotalsStrike_1n9m6_598", Ni = "_ctaTotalsPrice_1n9m6_604", Si = "_cta_1n9m6_567", Bi = "_ctaButtonGroup_1n9m6_636", Ti = "_ctaDualLeft_1n9m6_642", Ri = "_ctaDualRight_1n9m6_643", ki = "_poweredBy_1n9m6_670", f = {
1507
+ const ya = "_panel_1n9m6_2", va = "_header_1n9m6_20", wa = "_title_1n9m6_24", xa = "_status_1n9m6_32", ga = "_error_1n9m6_37", Ia = "_inactive_1n9m6_43", Ca = "_section_1n9m6_49", Na = "_sectionTitle_1n9m6_54", Sa = "_rulesVisual_1n9m6_107", Ba = "_rulesLabelsRow_1n9m6_114", Ta = "_rulesLinesRow_1n9m6_121", ka = "_rulesLineLabelCell_1n9m6_128", Ra = "_rulesLineLabel_1n9m6_128", Pa = "_rulesLine_1n9m6_121", Oa = "_rulesLineEmpty_1n9m6_162", Ma = "_rulesLineFilled_1n9m6_166", Fa = "_variants_1n9m6_170", Aa = "_variantList_1n9m6_178", La = "_variantRow_1n9m6_186", Da = "_variantRowInteractive_1n9m6_198", $a = "_variantRowSelected_1n9m6_202", Ea = "_variantRowSoldOut_1n9m6_207", qa = "_variantMedia_1n9m6_211", Va = "_variantContent_1n9m6_219", za = "_variantHeader_1n9m6_227", Wa = "_variantTitle_1n9m6_233", Ua = "_variantImage_1n9m6_247", ja = "_variantImageFallback_1n9m6_255", Ga = "_variantMeta_1n9m6_268", Ha = "_variantPrice_1n9m6_273", Qa = "_variantFooterRow_1n9m6_279", Ka = "_variantActions_1n9m6_286", Ya = "_qtyActions_1n9m6_292", Xa = "_soldOut_1n9m6_343", Za = "_qtyChip_1n9m6_351", Ja = "_qtyChipInteractive_1n9m6_366", ei = "_qtyChipValue_1n9m6_370", ti = "_qtyChipPlus_1n9m6_376", ni = "_qtyChipClear_1n9m6_381", ai = "_qtyTrash_1n9m6_400", ii = "_footer_1n9m6_412", ri = "_boxSummaryWindow_1n9m6_417", oi = "_boxSummaryRow_1n9m6_431", si = "_boxSlot_1n9m6_439", li = "_boxItem_1n9m6_448", ci = "_boxItemFilled_1n9m6_465", ui = "_boxItemPlaceholder_1n9m6_471", di = "_boxItemThreshold_1n9m6_477", hi = "_boxItemClickable_1n9m6_485", mi = "_boxItemImage_1n9m6_494", fi = "_boxItemFallback_1n9m6_505", pi = "_boxItemPlus_1n9m6_518", _i = "_boxItemDiscountText_1n9m6_530", bi = "_boxThresholdLabel_1n9m6_543", yi = "_totalsReveal_1n9m6_554", vi = "_totalsRevealOpen_1n9m6_562", wi = "_ctaTotalsWrap_1n9m6_567", xi = "_ctaTotalsWrapVisible_1n9m6_572", gi = "_ctaTotals_1n9m6_567", Ii = "_ctaDiscountBadge_1n9m6_587", Ci = "_ctaTotalsStrike_1n9m6_598", Ni = "_ctaTotalsPrice_1n9m6_604", Si = "_cta_1n9m6_567", Bi = "_ctaButtonGroup_1n9m6_636", Ti = "_ctaDualLeft_1n9m6_642", ki = "_ctaDualRight_1n9m6_643", Ri = "_poweredBy_1n9m6_670", f = {
1508
1508
  panel: ya,
1509
1509
  header: va,
1510
1510
  title: wa,
@@ -1516,8 +1516,8 @@ const ya = "_panel_1n9m6_2", va = "_header_1n9m6_20", wa = "_title_1n9m6_24", xa
1516
1516
  rulesVisual: Sa,
1517
1517
  rulesLabelsRow: Ba,
1518
1518
  rulesLinesRow: Ta,
1519
- rulesLineLabelCell: Ra,
1520
- rulesLineLabel: ka,
1519
+ rulesLineLabelCell: ka,
1520
+ rulesLineLabel: Ra,
1521
1521
  rulesLine: Pa,
1522
1522
  rulesLineEmpty: Oa,
1523
1523
  rulesLineFilled: Ma,
@@ -1570,10 +1570,10 @@ const ya = "_panel_1n9m6_2", va = "_header_1n9m6_20", wa = "_title_1n9m6_24", xa
1570
1570
  cta: Si,
1571
1571
  ctaButtonGroup: Bi,
1572
1572
  ctaDualLeft: Ti,
1573
- ctaDualRight: Ri,
1574
- poweredBy: ki
1573
+ ctaDualRight: ki,
1574
+ poweredBy: Ri
1575
1575
  };
1576
- function $i(o) {
1576
+ function zi(r) {
1577
1577
  var le;
1578
1578
  const {
1579
1579
  loading: e,
@@ -1594,16 +1594,16 @@ function $i(o) {
1594
1594
  className: te,
1595
1595
  showRules: ne = !0,
1596
1596
  showVariants: L = !0
1597
- } = o, Q = (m) => {
1597
+ } = r, Q = (m) => {
1598
1598
  const p = Number.parseFloat(m);
1599
1599
  return Number.isFinite(p) ? String(Math.round(p)) : m;
1600
1600
  }, ee = (m) => {
1601
- const p = (m ?? []).filter((r) => {
1601
+ const p = (m ?? []).filter((o) => {
1602
1602
  var b, y;
1603
- const _ = (b = r == null ? void 0 : r.name) == null ? void 0 : b.trim(), x = (y = r == null ? void 0 : r.value) == null ? void 0 : y.trim();
1603
+ const _ = (b = o == null ? void 0 : o.name) == null ? void 0 : b.trim(), x = (y = o == null ? void 0 : o.value) == null ? void 0 : y.trim();
1604
1604
  return !(!_ || !x || _.toLowerCase() === "title");
1605
1605
  });
1606
- return p.length ? p.map((r) => `${r.name}: ${r.value}`).join(" • ") : null;
1606
+ return p.length ? p.map((o) => `${o.name}: ${o.value}`).join(" • ") : null;
1607
1607
  }, ue = (m) => {
1608
1608
  const p = Number(m);
1609
1609
  if (!Number.isFinite(p)) return m;
@@ -1613,59 +1613,59 @@ function $i(o) {
1613
1613
  } catch {
1614
1614
  }
1615
1615
  return `$${p.toFixed(2)}`;
1616
- }, w = k(() => [...d].sort((m, p) => m.displayName.localeCompare(p.displayName)), [d]), D = k(() => [...(n == null ? void 0 : n.rules) ?? []].sort((m, p) => m.minBundleSize - p.minBundleSize), [n == null ? void 0 : n.rules]), W = k(() => Math.max(0, A - g), [g, A]), Y = k(() => {
1616
+ }, w = R(() => [...d].sort((m, p) => m.displayName.localeCompare(p.displayName)), [d]), D = R(() => [...(n == null ? void 0 : n.rules) ?? []].sort((m, p) => m.minBundleSize - p.minBundleSize), [n == null ? void 0 : n.rules]), W = R(() => Math.max(0, A - g), [g, A]), Y = R(() => {
1617
1617
  let m = null;
1618
1618
  for (const p of D)
1619
1619
  g >= p.minBundleSize && (m = p);
1620
1620
  return m;
1621
- }, [g, D]), de = k(() => {
1621
+ }, [g, D]), de = R(() => {
1622
1622
  if (!Y) return null;
1623
1623
  const m = Number.parseFloat(Y.discountPercent);
1624
1624
  return !Number.isFinite(m) || m <= 0 ? null : m;
1625
- }, [Y]), Ce = D[0], Ne = !!(Ce && g >= Ce.minBundleSize), ae = k(() => {
1626
- const m = new Map(d.map((r) => [r.id, r]));
1625
+ }, [Y]), Ce = D[0], Ne = !!(Ce && g >= Ce.minBundleSize), ae = R(() => {
1626
+ const m = new Map(d.map((o) => [o.id, o]));
1627
1627
  let p = 0;
1628
- for (const [r, _] of Object.entries(c)) {
1628
+ for (const [o, _] of Object.entries(c)) {
1629
1629
  const x = _ ?? 0;
1630
1630
  if (x <= 0) continue;
1631
- const b = m.get(r), y = Number(b == null ? void 0 : b.price);
1631
+ const b = m.get(o), y = Number(b == null ? void 0 : b.price);
1632
1632
  Number.isFinite(y) && (p += y * x);
1633
1633
  }
1634
1634
  return Math.round(p * 100) / 100;
1635
- }, [d, c]), oe = k(() => {
1635
+ }, [d, c]), oe = R(() => {
1636
1636
  if (!de) return ae;
1637
1637
  const m = ae * (1 - de / 100);
1638
1638
  return Math.round(m * 100) / 100;
1639
- }, [de, ae]), we = k(() => D.length ? Math.max(...D.map((m) => m.minBundleSize)) : 0, [D]), xe = k(() => {
1639
+ }, [de, ae]), we = R(() => D.length ? Math.max(...D.map((m) => m.minBundleSize)) : 0, [D]), xe = R(() => {
1640
1640
  const m = new Map(d.map((p) => [p.id, p]));
1641
1641
  return I.map((p) => m.get(p)).filter((p) => !!p);
1642
- }, [d, I]), X = k(() => {
1642
+ }, [d, I]), X = R(() => {
1643
1643
  var p;
1644
1644
  const m = /* @__PURE__ */ new Map();
1645
- for (const r of D) {
1646
- const _ = Math.max(0, r.minBundleSize - 1);
1645
+ for (const o of D) {
1646
+ const _ = Math.max(0, o.minBundleSize - 1);
1647
1647
  m.set(_, {
1648
- discountPercent: r.discountPercent,
1649
- minBundleSize: r.minBundleSize,
1650
- label: ((p = r.label) == null ? void 0 : p.trim()) || `Buy ${r.minBundleSize}+`
1648
+ discountPercent: o.discountPercent,
1649
+ minBundleSize: o.minBundleSize,
1650
+ label: ((p = o.label) == null ? void 0 : p.trim()) || `Buy ${o.minBundleSize}+`
1651
1651
  });
1652
1652
  }
1653
1653
  return m;
1654
- }, [D]), se = k(() => {
1654
+ }, [D]), se = R(() => {
1655
1655
  const m = Number((n == null ? void 0 : n.maxBundleSize) ?? NaN), p = Number.isFinite(m) ? Math.floor(m) : 100;
1656
1656
  return Math.max(2, Math.min(100, p));
1657
- }, [n == null ? void 0 : n.maxBundleSize]), ke = ((le = n == null ? void 0 : n.title) == null ? void 0 : le.trim()) || "Build your bundle", ge = k(() => Math.max(we || A, xe.length), [xe.length, we, A]), he = g >= se, ye = J(null), me = J(null), fe = J(g);
1657
+ }, [n == null ? void 0 : n.maxBundleSize]), Re = ((le = n == null ? void 0 : n.title) == null ? void 0 : le.trim()) || "Build your bundle", ge = R(() => Math.max(we || A, xe.length), [xe.length, we, A]), he = g >= se, ye = J(null), me = J(null), fe = J(g);
1658
1658
  V(() => {
1659
1659
  const m = fe.current;
1660
1660
  if (fe.current = g, g <= m) return;
1661
1661
  const p = me.current;
1662
1662
  if (!p) return;
1663
- const r = D.some((y) => y.minBundleSize === g), _ = D.find((y) => y.minBundleSize > g), x = _ && r ? _.minBundleSize - 1 : _ ? null : g - 1;
1663
+ const o = D.some((y) => y.minBundleSize === g), _ = D.find((y) => y.minBundleSize > g), x = _ && o ? _.minBundleSize - 1 : _ ? null : g - 1;
1664
1664
  if (x == null || x < 0) return;
1665
1665
  const b = requestAnimationFrame(() => {
1666
1666
  const y = p.querySelector(`[data-box-slot="${x}"]`);
1667
1667
  if (!y) return;
1668
- const R = p.getBoundingClientRect(), B = y.getBoundingClientRect().right - R.right;
1668
+ const k = p.getBoundingClientRect(), B = y.getBoundingClientRect().right - k.right;
1669
1669
  if (B <= 1) return;
1670
1670
  const E = Math.max(0, p.scrollWidth - p.clientWidth), K = Math.min(E, Math.max(0, p.scrollLeft + B));
1671
1671
  p.scrollTo({ left: K, behavior: "smooth" });
@@ -1675,21 +1675,21 @@ function $i(o) {
1675
1675
  const pe = (m) => {
1676
1676
  const p = ye.current;
1677
1677
  if (!p) return;
1678
- const r = p.querySelector(`[data-variant-row="${m}"]`);
1679
- r && r.scrollIntoView({ behavior: "smooth", block: "nearest" });
1678
+ const o = p.querySelector(`[data-variant-row="${m}"]`);
1679
+ o && o.scrollIntoView({ behavior: "smooth", block: "nearest" });
1680
1680
  };
1681
1681
  return /* @__PURE__ */ S("section", { className: [f.panel, te].filter(Boolean).join(" "), "aria-busy": e, children: [
1682
- /* @__PURE__ */ s("header", { className: f.header, children: /* @__PURE__ */ s("h2", { className: f.title, children: ke }) }),
1682
+ /* @__PURE__ */ s("header", { className: f.header, children: /* @__PURE__ */ s("h2", { className: f.title, children: Re }) }),
1683
1683
  e ? /* @__PURE__ */ s("div", { className: f.status, children: "Loading…" }) : null,
1684
1684
  i ? /* @__PURE__ */ s("div", { className: f.error, children: i }) : null,
1685
1685
  !e && n && !n.isActive ? /* @__PURE__ */ s("div", { className: f.inactive, children: "Bundles are not active." }) : null,
1686
1686
  ne && D.length ? /* @__PURE__ */ s("div", { className: f.section, children: /* @__PURE__ */ S("div", { className: f.rulesVisual, children: [
1687
1687
  /* @__PURE__ */ s("div", { className: f.rulesLabelsRow, children: Array.from({ length: we }).map((m, p) => {
1688
- const r = p + 1, _ = D.find((b) => b.minBundleSize === r), x = _ ? `${Q(_.discountPercent)}% off` : null;
1689
- return /* @__PURE__ */ s("div", { className: f.rulesLineLabelCell, children: x ? /* @__PURE__ */ s("span", { className: f.rulesLineLabel, children: x }) : null }, r);
1688
+ const o = p + 1, _ = D.find((b) => b.minBundleSize === o), x = _ ? `${Q(_.discountPercent)}% off` : null;
1689
+ return /* @__PURE__ */ s("div", { className: f.rulesLineLabelCell, children: x ? /* @__PURE__ */ s("span", { className: f.rulesLineLabel, children: x }) : null }, o);
1690
1690
  }) }),
1691
1691
  /* @__PURE__ */ s("div", { className: f.rulesLinesRow, children: Array.from({ length: we }).map((m, p) => {
1692
- const r = p + 1, _ = g >= r;
1692
+ const o = p + 1, _ = g >= o;
1693
1693
  return /* @__PURE__ */ s(
1694
1694
  "div",
1695
1695
  {
@@ -1698,7 +1698,7 @@ function $i(o) {
1698
1698
  _ ? f.rulesLineFilled : f.rulesLineEmpty
1699
1699
  ].filter(Boolean).join(" ")
1700
1700
  },
1701
- r
1701
+ o
1702
1702
  );
1703
1703
  }) })
1704
1704
  ] }) }) : null,
@@ -1706,7 +1706,7 @@ function $i(o) {
1706
1706
  /* @__PURE__ */ s("div", { className: f.sectionTitle, children: "Select items" }),
1707
1707
  /* @__PURE__ */ s("div", { className: f.variants, children: /* @__PURE__ */ s("ul", { className: f.variantList, children: w.map((m) => {
1708
1708
  var b;
1709
- const p = c[m.id] ?? 0, r = ee(m.selectedOptions), _ = m.availableForSale === !1, x = !_ && !he;
1709
+ const p = c[m.id] ?? 0, o = ee(m.selectedOptions), _ = m.availableForSale === !1, x = !_ && !he;
1710
1710
  return /* @__PURE__ */ S(
1711
1711
  "li",
1712
1712
  {
@@ -1741,7 +1741,7 @@ function $i(o) {
1741
1741
  /* @__PURE__ */ S("div", { className: f.variantContent, children: [
1742
1742
  /* @__PURE__ */ S("div", { className: f.variantHeader, children: [
1743
1743
  /* @__PURE__ */ s("div", { className: f.variantTitle, children: m.displayName }),
1744
- r ? /* @__PURE__ */ s("div", { className: f.variantMeta, children: r }) : null
1744
+ o ? /* @__PURE__ */ s("div", { className: f.variantMeta, children: o }) : null
1745
1745
  ] }),
1746
1746
  /* @__PURE__ */ S("div", { className: f.variantFooterRow, children: [
1747
1747
  /* @__PURE__ */ s("div", { className: f.variantPrice, children: ue(m.price) }),
@@ -1806,7 +1806,7 @@ function $i(o) {
1806
1806
  /* @__PURE__ */ S("footer", { className: f.footer, children: [
1807
1807
  /* @__PURE__ */ s("div", { className: f.boxSummaryWindow, ref: me, children: /* @__PURE__ */ s("div", { className: f.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: ge }).map((m, p) => {
1808
1808
  var B, E, K, _e;
1809
- const r = xe[p], _ = X.get(p), x = !!r, b = !!_, y = b && !x, R = _ ? `${_.discountPercent}% off` : null, U = x ? r.displayName : `Slot ${p + 1}`;
1809
+ const o = xe[p], _ = X.get(p), x = !!o, b = !!_, y = b && !x, k = _ ? `${_.discountPercent}% off` : null, U = x ? o.displayName : `Slot ${p + 1}`;
1810
1810
  return /* @__PURE__ */ S("div", { "data-box-slot": p, className: f.boxSlot, children: [
1811
1811
  /* @__PURE__ */ s(
1812
1812
  "div",
@@ -1819,23 +1819,23 @@ function $i(o) {
1819
1819
  ].filter(Boolean).join(" "),
1820
1820
  role: x ? "button" : void 0,
1821
1821
  tabIndex: x ? 0 : void 0,
1822
- onClick: x ? () => pe(r.id) : void 0,
1822
+ onClick: x ? () => pe(o.id) : void 0,
1823
1823
  onKeyDown: x ? (be) => {
1824
- (be.key === "Enter" || be.key === " ") && (be.preventDefault(), pe(r.id));
1824
+ (be.key === "Enter" || be.key === " ") && (be.preventDefault(), pe(o.id));
1825
1825
  } : void 0,
1826
- "aria-label": y && R ? `${U}. Unlocks ${R}.` : U,
1827
- title: y && R ? `${U} • Unlocks ${R}` : U,
1828
- children: x ? (B = r.image) != null && B.url ? /* @__PURE__ */ s(
1826
+ "aria-label": y && k ? `${U}. Unlocks ${k}.` : U,
1827
+ title: y && k ? `${U} • Unlocks ${k}` : U,
1828
+ children: x ? (B = o.image) != null && B.url ? /* @__PURE__ */ s(
1829
1829
  "img",
1830
1830
  {
1831
1831
  className: f.boxItemImage,
1832
- src: r.image.url,
1833
- alt: r.image.altText ?? r.displayName,
1832
+ src: o.image.url,
1833
+ alt: o.image.altText ?? o.displayName,
1834
1834
  width: 1,
1835
1835
  height: 1,
1836
1836
  loading: "lazy"
1837
1837
  }
1838
- ) : /* @__PURE__ */ s("div", { className: f.boxItemFallback, "aria-hidden": "true", children: ((_e = (K = (E = r.product) == null ? void 0 : E.title) == null ? void 0 : K.slice(0, 1)) == null ? void 0 : _e.toUpperCase()) ?? "•" }) : y && R ? /* @__PURE__ */ s("div", { className: f.boxItemDiscountText, children: R }) : /* @__PURE__ */ s("div", { className: f.boxItemPlus, "aria-hidden": "true", children: "+" })
1838
+ ) : /* @__PURE__ */ s("div", { className: f.boxItemFallback, "aria-hidden": "true", children: ((_e = (K = (E = o.product) == null ? void 0 : E.title) == null ? void 0 : K.slice(0, 1)) == null ? void 0 : _e.toUpperCase()) ?? "•" }) : y && k ? /* @__PURE__ */ s("div", { className: f.boxItemDiscountText, children: k }) : /* @__PURE__ */ s("div", { className: f.boxItemPlus, "aria-hidden": "true", children: "+" })
1839
1839
  }
1840
1840
  ),
1841
1841
  b ? /* @__PURE__ */ s("div", { className: f.boxThresholdLabel, children: _.label }) : null
@@ -1874,19 +1874,36 @@ function $i(o) {
1874
1874
  ] })
1875
1875
  ] });
1876
1876
  }
1877
- function Ye(o) {
1878
- if (o != null && o.length)
1879
- return o.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
1877
+ function Ye(r) {
1878
+ if (r != null && r.length)
1879
+ return r.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
1880
1880
  }
1881
- function vt(o) {
1882
- const e = /\/(\d+)$/.exec(o);
1883
- return e ? e[1] : o;
1881
+ function vt(r) {
1882
+ const e = /\/(\d+)$/.exec(r);
1883
+ return e ? e[1] : r;
1884
1884
  }
1885
1885
  function Pi() {
1886
+ var r;
1887
+ return typeof window > "u" ? null : ((r = window.Shopify) == null ? void 0 : r.theme) ?? null;
1888
+ }
1889
+ function Oi() {
1890
+ const r = Pi();
1891
+ return r ? r.schema_name === "Sleek" ? !0 : /sleek/i.test(r.name ?? "") : !1;
1892
+ }
1893
+ function Mi() {
1894
+ return typeof document > "u" ? !1 : !!document.querySelector("cart-drawer");
1895
+ }
1896
+ function Fi() {
1897
+ return !Oi() || !Mi() ? !1 : (document.dispatchEvent(new CustomEvent("cart:refresh", {
1898
+ bubbles: !0,
1899
+ detail: { open: !0 }
1900
+ })), !0);
1901
+ }
1902
+ function Ai() {
1886
1903
  window.location.reload();
1887
1904
  }
1888
- async function Ee(o, e) {
1889
- const t = await fetch(o, {
1905
+ async function Ee(r, e) {
1906
+ const t = await fetch(r, {
1890
1907
  method: "POST",
1891
1908
  headers: {
1892
1909
  Accept: "application/json",
@@ -1900,38 +1917,38 @@ async function Ee(o, e) {
1900
1917
  }
1901
1918
  return t.json().catch(() => null);
1902
1919
  }
1903
- function Ei() {
1920
+ function Wi() {
1904
1921
  return {
1905
- async linesAdd(o) {
1906
- const e = o.map((t) => ({
1922
+ async linesAdd(r) {
1923
+ const e = r.map((t) => ({
1907
1924
  id: vt(t.merchandiseId),
1908
1925
  quantity: t.quantity,
1909
1926
  properties: Ye(t.attributes)
1910
1927
  }));
1911
1928
  await Ee("/cart/add.js", { items: e });
1912
1929
  },
1913
- async linesAddForCheckout(o) {
1914
- const e = o.map((t) => ({
1930
+ async linesAddForCheckout(r) {
1931
+ const e = r.map((t) => ({
1915
1932
  id: vt(t.merchandiseId),
1916
1933
  quantity: t.quantity,
1917
1934
  properties: Ye(t.attributes)
1918
1935
  }));
1919
1936
  await Ee("/cart/add.js", { items: e });
1920
1937
  },
1921
- async linesUpdate(o) {
1922
- for (const e of o)
1938
+ async linesUpdate(r) {
1939
+ for (const e of r)
1923
1940
  await Ee("/cart/change.js", {
1924
1941
  id: e.id,
1925
1942
  quantity: e.quantity,
1926
1943
  properties: Ye(e.attributes)
1927
1944
  });
1928
1945
  },
1929
- async linesRemove(o) {
1930
- for (const e of o)
1946
+ async linesRemove(r) {
1947
+ for (const e of r)
1931
1948
  await Ee("/cart/change.js", { id: e, quantity: 0 });
1932
1949
  },
1933
1950
  openCartUI() {
1934
- window.setTimeout(() => Pi(), 0);
1951
+ Fi() || window.setTimeout(() => Ai(), 0);
1935
1952
  },
1936
1953
  navigateToCheckout() {
1937
1954
  window.location.href = "/checkout";
@@ -1939,13 +1956,13 @@ function Ei() {
1939
1956
  };
1940
1957
  }
1941
1958
  export {
1942
- Di as BundleBuilderDrawer,
1943
- $i as BundleBuilderPanel,
1944
- Li as BundleButton,
1959
+ Vi as BundleBuilderDrawer,
1960
+ zi as BundleBuilderPanel,
1961
+ qi as BundleButton,
1945
1962
  $e as BundleLineAttributeKeys,
1946
- Fi as BundleProvider,
1947
- Ei as createLiquidCartAdapter,
1963
+ $i as BundleProvider,
1964
+ Wi as createLiquidCartAdapter,
1948
1965
  ze as useBundleBuilder,
1949
- Ai as useBundleBuilderDrawer
1966
+ Ei as useBundleBuilderDrawer
1950
1967
  };
1951
1968
  //# sourceMappingURL=index.js.map