@best-bundles/bundle-ui 0.0.34 → 0.0.36

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,28 +1,28 @@
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_jhu8z_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_jhu8z_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_jhu8z_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_jhu8z_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_jhu8z_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_jhu8z_74{opacity:1}._backdropClosed_jhu8z_78{opacity:0}._panel_jhu8z_82{width:440px;max-width:100%;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_jhu8z_102{animation:_bbSlideInFromRight_jhu8z_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_jhu8z_106{animation:_bbSlideOutToRight_jhu8z_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_jhu8z_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_jhu8z_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_jhu8z_1{transition:none}._celebrationChip_jhu8z_23,._panelOpen_jhu8z_102,._panelClosed_jhu8z_106{animation:none}}._header_jhu8z_145{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_jhu8z_154{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_jhu8z_162{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_jhu8z_171{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}._searchIconButton_jhu8z_171:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_jhu8z_171:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_jhu8z_193{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_jhu8z_197{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_jhu8z_209 ._headerTitleWrap_jhu8z_193{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_jhu8z_209 ._headerSearchWrap_jhu8z_197{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_jhu8z_221{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_jhu8z_233{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_jhu8z_233::-webkit-search-cancel-button,._searchInput_jhu8z_233::-webkit-search-decoration,._searchInput_jhu8z_233::-webkit-search-results-button,._searchInput_jhu8z_233::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_jhu8z_254{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_jhu8z_254:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_jhu8z_254:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_jhu8z_276{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}._closeButton_jhu8z_276:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_jhu8z_276:disabled{opacity:.6;cursor:not-allowed}._closeButton_jhu8z_276:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_jhu8z_193,._headerSearchWrap_jhu8z_197{transition:none}}._body_jhu8z_309{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_jhu8z_314{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_jhu8z_319{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_jhu8z_324{margin-top:4px}._variantList_jhu8z_328{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_jhu8z_336{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_jhu8z_344{opacity:.65}._variantLeft_jhu8z_348{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_jhu8z_355{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_jhu8z_355:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_jhu8z_355:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_jhu8z_355:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_jhu8z_383{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_jhu8z_383{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_jhu8z_400{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_jhu8z_410{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_jhu8z_417{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_jhu8z_427{min-width:0}._variantName_jhu8z_431{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_jhu8z_440{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_jhu8z_448{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_jhu8z_455{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_jhu8z_448{font-size:13px;font-weight:800}._qtyControls_jhu8z_466{display:inline-flex;align-items:center;gap:6px}._qtyButton_jhu8z_472{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_jhu8z_472:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_jhu8z_472:disabled{opacity:.6;cursor:not-allowed}._qtyButton_jhu8z_472:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_jhu8z_497{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_jhu8z_504{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}._poweredBy_jhu8z_511{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_jhu8z_511 a{color:inherit;text-decoration:none}._boxSummaryWindow_jhu8z_523{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_jhu8z_523::-webkit-scrollbar{display:none}._boxSummaryRow_jhu8z_540{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_jhu8z_548{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_jhu8z_557{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_jhu8z_569{cursor:pointer}._boxItemClickable_jhu8z_569:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_jhu8z_578{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_jhu8z_589{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_jhu8z_595{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_jhu8z_601{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_jhu8z_609{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_jhu8z_617{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_jhu8z_624{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_jhu8z_631{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_jhu8z_642{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_jhu8z_649{gap:0}._cta_jhu8z_642{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_jhu8z_665{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_jhu8z_677{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_jhu8z_695{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_jhu8z_695>span{opacity:0}._ctaDualRight_jhu8z_708{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_jhu8z_724{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_jhu8z_724>span{opacity:0}._ctaTotals_jhu8z_735{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_jhu8z_743{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:linear-gradient(180deg,#2563eb24,#2563eb0f);border:1px solid rgba(37,99,235,.3);color:#1d4ed8f2;white-space:nowrap}._ctaTotalsWrap_jhu8z_757{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_jhu8z_770{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_jhu8z_777{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_jhu8z_784{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_jhu8z_757{transition:none}}._cta_jhu8z_642:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_jhu8z_642:disabled{opacity:.6;cursor:not-allowed}._cta_jhu8z_642:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_jhu8z_665:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_jhu8z_665:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_jhu8z_665:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_jhu8z_677:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_jhu8z_677:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_jhu8z_677:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_jhu8z_708:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_jhu8z_708:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_jhu8z_708:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_jhu8z_853{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_jhu8z_1{padding:0;justify-content:stretch}._panel_jhu8z_82{width:100%;height:100%;border-radius:0}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { jsx as f, jsxs as k, Fragment as xt } from "react/jsx-runtime";
3
- import Le, { useState as A, useRef as W, useEffect as j, useCallback as fe, useMemo as P, createContext as Ct, useContext as It, forwardRef as bt, createElement as Ye } from "react";
4
- const Me = {
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.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_i1rsh_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_i1rsh_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_i1rsh_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_i1rsh_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_i1rsh_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_i1rsh_74{opacity:1}._backdropClosed_i1rsh_78{opacity:0}._panel_i1rsh_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_i1rsh_103{animation:_bbSlideInFromRight_i1rsh_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_i1rsh_107{animation:_bbSlideOutToRight_i1rsh_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_i1rsh_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_i1rsh_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_i1rsh_1{transition:none}._celebrationChip_i1rsh_23,._panelOpen_i1rsh_103,._panelClosed_i1rsh_107{animation:none}}._header_i1rsh_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_i1rsh_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_i1rsh_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_i1rsh_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}._searchIconButton_i1rsh_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_i1rsh_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_i1rsh_194{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_i1rsh_198{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_i1rsh_210 ._headerTitleWrap_i1rsh_194{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_i1rsh_210 ._headerSearchWrap_i1rsh_198{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_i1rsh_222{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_i1rsh_234{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_i1rsh_234::-webkit-search-cancel-button,._searchInput_i1rsh_234::-webkit-search-decoration,._searchInput_i1rsh_234::-webkit-search-results-button,._searchInput_i1rsh_234::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_i1rsh_255{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_i1rsh_255:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_i1rsh_255:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_i1rsh_277{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}._closeButton_i1rsh_277:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_i1rsh_277:disabled{opacity:.6;cursor:not-allowed}._closeButton_i1rsh_277:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_i1rsh_194,._headerSearchWrap_i1rsh_198{transition:none}}._body_i1rsh_310{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_i1rsh_315{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_i1rsh_320{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_i1rsh_325{margin-top:4px}._variantList_i1rsh_329{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_i1rsh_337{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_i1rsh_345{opacity:.65}._variantLeft_i1rsh_349{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_i1rsh_356{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_i1rsh_356:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_i1rsh_356:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_i1rsh_356:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_i1rsh_384{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_i1rsh_384{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_i1rsh_401{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_i1rsh_411{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_i1rsh_418{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_i1rsh_428{min-width:0}._variantName_i1rsh_432{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_i1rsh_441{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_i1rsh_449{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_i1rsh_456{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_i1rsh_449{font-size:13px;font-weight:800}._qtyControls_i1rsh_467{display:inline-flex;align-items:center;gap:6px}._qtyButton_i1rsh_473{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_i1rsh_473:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_i1rsh_473:disabled{opacity:.6;cursor:not-allowed}._qtyButton_i1rsh_473:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_i1rsh_498{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_i1rsh_505{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_i1rsh_513{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_i1rsh_513 a{color:inherit;text-decoration:none}._boxSummaryWindow_i1rsh_525{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_i1rsh_525::-webkit-scrollbar{display:none}._boxSummaryRow_i1rsh_543{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_i1rsh_551{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_i1rsh_560{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_i1rsh_572{cursor:pointer}._boxItemClickable_i1rsh_572:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_i1rsh_581{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_i1rsh_592{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_i1rsh_598{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_i1rsh_604{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_i1rsh_612{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_i1rsh_620{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_i1rsh_627{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_i1rsh_634{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_i1rsh_645{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_i1rsh_652{gap:0}._cta_i1rsh_645{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_i1rsh_668{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_i1rsh_680{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_i1rsh_698{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_i1rsh_698>span{opacity:0}._ctaDualRight_i1rsh_711{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_i1rsh_727{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_i1rsh_727>span{opacity:0}._ctaTotals_i1rsh_738{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_i1rsh_746{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_i1rsh_760{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_i1rsh_773{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_i1rsh_780{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_i1rsh_787{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_i1rsh_760{transition:none}}._cta_i1rsh_645:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_i1rsh_645:disabled{opacity:.6;cursor:not-allowed}._cta_i1rsh_645:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_i1rsh_668:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_i1rsh_668:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_i1rsh_668:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_i1rsh_680:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_i1rsh_680:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_i1rsh_680:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_i1rsh_711:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_i1rsh_711:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_i1rsh_711:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_i1rsh_856{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_i1rsh_1{padding:0;justify-content:stretch}._panel_i1rsh_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(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
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";
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 St(o) {
10
+ async function Tt(o) {
11
11
  const e = new URL("/api/public/bundle-config", o.apiBaseUrl);
12
12
  e.searchParams.set("shop", o.shop), o.configHandle && e.searchParams.set("handle", o.configHandle);
13
- const i = await (await fetch(e, {
13
+ const r = await (await fetch(e, {
14
14
  method: "GET",
15
15
  signal: o.signal,
16
16
  headers: { "Content-Type": "application/json" }
17
17
  })).json().catch(() => null);
18
- return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
18
+ return !r || typeof r != "object" ? { ok: !1, error: "Invalid response." } : r;
19
19
  }
20
- const ct = "bb_anonymous_user_id";
21
- function Te() {
20
+ const dt = "bb_anonymous_user_id";
21
+ 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(ct);
25
+ const o = localStorage.getItem(dt);
26
26
  if (o && typeof o == "string" && o.length > 0)
27
27
  return o;
28
28
  let e;
@@ -35,17 +35,17 @@ function Te() {
35
35
  } catch {
36
36
  e = `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
37
37
  }
38
- return localStorage.setItem(ct, e), e;
38
+ return localStorage.setItem(dt, e), e;
39
39
  } catch {
40
40
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
41
41
  }
42
42
  }
43
- async function Ce(o, e, t) {
43
+ async function Oe(o, e, t) {
44
44
  if (!(typeof window > "u"))
45
45
  try {
46
- const i = new URL(o, window.location.origin);
47
- i.searchParams.set("shop", e);
48
- const r = await fetch(i, {
46
+ const r = new URL(o, window.location.origin);
47
+ r.searchParams.set("shop", e);
48
+ const i = await fetch(r, {
49
49
  method: "POST",
50
50
  headers: {
51
51
  "Content-Type": "application/json"
@@ -54,25 +54,25 @@ async function Ce(o, e, t) {
54
54
  // Don't wait for response - fire and forget
55
55
  keepalive: !0
56
56
  });
57
- r.ok || console.warn(
58
- `[Bundle Analytics] Event tracking failed with status ${r.status}:`,
59
- await r.text().catch(() => "Unable to read response")
57
+ i.ok || console.warn(
58
+ `[Bundle Analytics] Event tracking failed with status ${i.status}:`,
59
+ await i.text().catch(() => "Unable to read response")
60
60
  );
61
- } catch (i) {
62
- console.warn("[Bundle Analytics] Failed to track event:", i);
61
+ } catch (r) {
62
+ console.warn("[Bundle Analytics] Failed to track event:", r);
63
63
  }
64
64
  }
65
- const _t = Ct(null), De = "#best-bundles";
66
- function Bt(o) {
65
+ const gt = St(null), qe = "#best-bundles";
66
+ function Rt(o) {
67
67
  const e = String(o ?? "").trim().toLowerCase();
68
- if (!e.startsWith(De)) return null;
69
- if (e === De) return "default";
70
- const t = `${De}:`;
68
+ if (!e.startsWith(qe)) return null;
69
+ if (e === qe) return "default";
70
+ const t = `${qe}:`;
71
71
  if (!e.startsWith(t)) return null;
72
- const i = e.slice(t.length).trim();
73
- return i && i.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
72
+ const r = e.slice(t.length).trim();
73
+ return r && r.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
74
74
  }
75
- const Nt = {
75
+ const kt = {
76
76
  primaryColor: "--bb-cta-bg",
77
77
  primaryHoverColor: "--bb-cta-bg-hover",
78
78
  primaryTextColor: "--bb-cta-text",
@@ -94,43 +94,43 @@ const Nt = {
94
94
  celebrationBorderColor: "--bb-celebration-border",
95
95
  fontFamilyBody: "--bb-font-family-body",
96
96
  fontFamilyTitle: "--bb-font-family-title"
97
- }, We = "bb-google-fonts";
98
- function lt(o) {
97
+ }, He = "bb-google-fonts";
98
+ function ht(o) {
99
99
  const e = (o ?? "").trim().replace(/^["']|["']$/g, "");
100
100
  return e ? encodeURIComponent(e).replace(/%20/g, "+") : "";
101
101
  }
102
- function Tt(o) {
102
+ function Pt(o) {
103
103
  var c;
104
104
  if (typeof document > "u" || !document.head) return;
105
105
  if (!o) {
106
- (c = document.getElementById(We)) == null || c.remove();
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 = [];
110
- e && i.push("family=" + lt(e)), t && t !== e && i.push("family=" + lt(t));
111
- const r = document.getElementById(We);
112
- if (i.length === 0) {
113
- r == null || r.remove();
109
+ const e = (o.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (o.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), r = [];
110
+ e && r.push("family=" + ht(e)), t && t !== e && r.push("family=" + ht(t));
111
+ const i = document.getElementById(He);
112
+ if (r.length === 0) {
113
+ i == null || i.remove();
114
114
  return;
115
115
  }
116
- const n = `https://fonts.googleapis.com/css2?${i.join("&")}&display=swap`;
117
- if (r) {
118
- r.getAttribute("href") !== n && r.setAttribute("href", n);
116
+ const n = `https://fonts.googleapis.com/css2?${r.join("&")}&display=swap`;
117
+ if (i) {
118
+ i.getAttribute("href") !== n && i.setAttribute("href", n);
119
119
  return;
120
120
  }
121
- const u = document.createElement("link");
122
- u.id = We, u.rel = "stylesheet", u.href = n, document.head.appendChild(u);
121
+ const d = document.createElement("link");
122
+ d.id = He, d.rel = "stylesheet", d.href = n, document.head.appendChild(d);
123
123
  }
124
- function ut(o) {
124
+ function mt(o) {
125
125
  if (!o) return;
126
- Tt(o);
126
+ Pt(o);
127
127
  const e = document.documentElement;
128
- Object.entries(Nt).forEach(([t, i]) => {
129
- let r = o[t];
130
- r && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(r) && !/^["']/.test(r.trim()) && (r = `"${r.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(i, r));
128
+ Object.entries(kt).forEach(([t, r]) => {
129
+ let i = o[t];
130
+ i && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(i) && !/^["']/.test(i.trim()) && (i = `"${i.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(r, i));
131
131
  });
132
132
  }
133
- function dt(o) {
133
+ function ft(o) {
134
134
  if (typeof window > "u") return o;
135
135
  const e = window.__BUNDLE_PREVIEW_STYLES__;
136
136
  return e && typeof e == "object" ? e : o;
@@ -143,547 +143,556 @@ function Ot() {
143
143
  }
144
144
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
145
145
  }
146
- function ht(o) {
146
+ function pt(o) {
147
147
  return Number.isFinite(o) ? Math.max(0, Math.floor(o)) : 0;
148
148
  }
149
- function br(o) {
149
+ function Fr(o) {
150
150
  const {
151
151
  apiBaseUrl: e,
152
152
  shop: t,
153
- cartAdapter: i,
154
- configHandle: r = "default",
153
+ cartAdapter: r,
154
+ configHandle: i = "default",
155
155
  initialData: n,
156
- configFetcher: u,
156
+ configFetcher: d,
157
157
  analyticsEndpoint: c,
158
- allowDrawerWhenInactive: b = !1,
159
- children: H
160
- } = o, x = c ?? `${e}/api/public/bundle-analytics`, [M, B] = A(!1), [Z, L] = A(!n), [Q, J] = A(!1), [z, F] = A(null), [V, Ie] = A((n == null ? void 0 : n.currencyCode) ?? null), [m, pe] = A((n == null ? void 0 : n.config) ?? null), [ie, Y] = A(
158
+ allowDrawerWhenInactive: I = !1,
159
+ children: G
160
+ } = o, x = 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
- ), [Pe, ze] = A(
162
+ ), [de, Ce] = j(
163
163
  () => ({ selections: {}, order: [] })
164
- ), ke = W(null);
165
- j(() => {
166
- var E;
164
+ ), Ne = J(null);
165
+ V(() => {
166
+ var g;
167
167
  if (n) return;
168
- (E = ke.current) == null || E.abort();
169
- const d = new AbortController();
170
- ke.current = d;
171
- const y = u ?? St;
172
- return L(!0), F(null), y({ apiBaseUrl: e, shop: t, configHandle: r, signal: d.signal }).then((p) => {
173
- if (!p.ok) {
174
- F(p.error || "Failed to load bundle config."), pe(null), Y([]), Ie(null);
168
+ (g = Ne.current) == null || g.abort();
169
+ const a = new AbortController();
170
+ Ne.current = a;
171
+ const _ = d ?? Tt;
172
+ return H(!0), Q(null), _({ apiBaseUrl: e, shop: t, configHandle: i, signal: a.signal }).then((b) => {
173
+ if (!b.ok) {
174
+ Q(b.error || "Failed to load bundle config."), D(null), Y([]), ue(null);
175
175
  return;
176
176
  }
177
- Ie(p.currencyCode ?? null);
178
- const R = typeof window < "u" ? window : null, T = R == null ? void 0 : R.__BUNDLE_PREVIEW_CONFIG__;
179
- if (T) {
180
- pe(T);
181
- const q = R.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
182
- if (q !== void 0)
183
- Y(q);
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);
181
+ const U = y.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
182
+ if (U !== void 0)
183
+ Y(U);
184
184
  else {
185
- const I = new Set(T.eligibleVariantIds ?? []);
185
+ const B = new Set(R.eligibleVariantIds ?? []);
186
186
  Y(
187
- I.size === 0 ? p.eligibleVariants ?? [] : (p.eligibleVariants ?? []).filter((D) => I.has(D.id))
187
+ B.size === 0 ? b.eligibleVariants ?? [] : (b.eligibleVariants ?? []).filter((E) => B.has(E.id))
188
188
  );
189
189
  }
190
- L(R.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0);
190
+ H(y.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0);
191
191
  } else
192
- pe(p.config), Y(p.eligibleVariants ?? []), L(!1);
193
- }).catch((p) => {
194
- const R = p instanceof Error ? p.message : "Failed to load bundle config.";
195
- F(R), pe(null), Y([]), Ie(null);
192
+ D(b.config), Y(b.eligibleVariants ?? []), H(!1);
193
+ }).catch((b) => {
194
+ const y = b instanceof Error ? b.message : "Failed to load bundle config.";
195
+ Q(y), D(null), Y([]), ue(null);
196
196
  }).finally(() => {
197
- const p = typeof window < "u" ? window : null;
198
- p != null && p.__BUNDLE_PREVIEW_CONFIG__ || L(!1);
199
- }), () => d.abort();
200
- }, [e, t, r, n, u]), j(() => {
201
- const d = dt(m == null ? void 0 : m.styleSettings);
202
- d && ut(d);
203
- }, [m == null ? void 0 : m.styleSettings]), j(() => {
197
+ const b = typeof window < "u" ? window : null;
198
+ b != null && b.__BUNDLE_PREVIEW_CONFIG__ || H(!1);
199
+ }), () => a.abort();
200
+ }, [e, t, i, n, d]), V(() => {
201
+ const a = ft(w == null ? void 0 : w.styleSettings);
202
+ a && mt(a);
203
+ }, [w == null ? void 0 : w.styleSettings]), V(() => {
204
204
  if (typeof window > "u") return;
205
- const d = () => {
206
- const y = dt(void 0);
207
- y && ut(y);
205
+ const a = () => {
206
+ const _ = ft(void 0);
207
+ _ && mt(_);
208
208
  };
209
- return window.addEventListener("bundle-preview-styles-updated", d), () => window.removeEventListener("bundle-preview-styles-updated", d);
210
- }, []), j(() => {
209
+ return window.addEventListener("bundle-preview-styles-updated", a), () => window.removeEventListener("bundle-preview-styles-updated", a);
210
+ }, []), V(() => {
211
211
  if (typeof window > "u") return;
212
- const d = window, y = () => {
213
- const E = d.__BUNDLE_PREVIEW_CONFIG__;
214
- if (!E) return;
215
- const p = d.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
216
- L(p), pe(E);
217
- const R = d.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
218
- R ? Y(R) : p || Y((T) => {
219
- const q = new Set(E.eligibleVariantIds ?? []);
220
- return q.size === 0 || T.length === 0 ? T : T.filter((I) => q.has(I.id));
212
+ const a = window, _ = () => {
213
+ const g = a.__BUNDLE_PREVIEW_CONFIG__;
214
+ if (!g) return;
215
+ const b = a.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
216
+ H(b), D(g);
217
+ const y = a.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
218
+ y ? Y(y) : b || Y((R) => {
219
+ const U = new Set(g.eligibleVariantIds ?? []);
220
+ return U.size === 0 || R.length === 0 ? R : R.filter((B) => U.has(B.id));
221
221
  });
222
222
  };
223
- return d.__BUNDLE_PREVIEW_CONFIG__ && y(), window.addEventListener("bundle-preview-config-updated", y), () => window.removeEventListener("bundle-preview-config-updated", y);
223
+ return a.__BUNDLE_PREVIEW_CONFIG__ && _(), window.addEventListener("bundle-preview-config-updated", _), () => window.removeEventListener("bundle-preview-config-updated", _);
224
224
  }, []);
225
- const be = fe(() => {
226
- if (!(!b && m != null && !m.isActive) && (B(!0), x))
225
+ const ie = Te(() => {
226
+ if (!(!I && w != null && !w.isActive) && (P(!0), x))
227
227
  try {
228
- const d = Te();
229
- Ce(x, t, {
228
+ const a = Le();
229
+ Oe(x, t, {
230
230
  eventType: "DRAWER_OPENED",
231
231
  shop: t,
232
- anonymousUserId: d,
232
+ anonymousUserId: a,
233
233
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
234
234
  mixpanelEvent: "bundle_opened"
235
- }).catch((y) => {
236
- console.warn("[Bundle Analytics] Failed to track drawer opened:", y);
235
+ }).catch((_) => {
236
+ console.warn("[Bundle Analytics] Failed to track drawer opened:", _);
237
237
  });
238
- } catch (d) {
239
- console.warn("[Bundle Analytics] Error in open() callback:", d);
238
+ } catch (a) {
239
+ console.warn("[Bundle Analytics] Error in open() callback:", a);
240
240
  }
241
- }, [x, t, m, b]), te = fe(() => {
241
+ }, [x, t, w, I]), oe = Te(() => {
242
242
  if (x)
243
243
  try {
244
- const d = Te();
245
- Ce(x, t, {
244
+ const a = Le();
245
+ Oe(x, t, {
246
246
  eventType: "DRAWER_CLOSED",
247
247
  shop: t,
248
- anonymousUserId: d,
248
+ anonymousUserId: a,
249
249
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
250
250
  mixpanelEvent: "bundle_closed"
251
- }).catch((y) => {
252
- console.warn("[Bundle Analytics] Failed to track drawer closed:", y);
251
+ }).catch((_) => {
252
+ console.warn("[Bundle Analytics] Failed to track drawer closed:", _);
253
253
  });
254
- } catch (d) {
255
- console.warn("[Bundle Analytics] Error in close() callback:", d);
254
+ } catch (a) {
255
+ console.warn("[Bundle Analytics] Error in close() callback:", a);
256
256
  }
257
- B(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(De) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
257
+ P(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(qe) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
258
258
  }, [x, t]);
259
- j(() => {
259
+ V(() => {
260
260
  if (typeof window > "u") return;
261
- const d = () => {
262
- const y = Bt(window.location.hash);
263
- y && (y === "default" || y === r) && be();
261
+ const a = () => {
262
+ const _ = Rt(window.location.hash);
263
+ _ && (_ === "default" || _ === i) && ie();
264
264
  };
265
- return d(), window.addEventListener("hashchange", d), () => window.removeEventListener("hashchange", d);
266
- }, [be, r]);
267
- const Ae = fe(() => {
268
- !b && !M && m != null && !m.isActive || B((d) => {
269
- if (d)
270
- te();
265
+ return a(), window.addEventListener("hashchange", a), () => window.removeEventListener("hashchange", a);
266
+ }, [ie, i]);
267
+ const we = Te(() => {
268
+ !I && !A && w != null && !w.isActive || P((a) => {
269
+ if (a)
270
+ oe();
271
271
  else if (x)
272
272
  try {
273
- const y = Te();
274
- Ce(x, t, {
273
+ const _ = Le();
274
+ Oe(x, t, {
275
275
  eventType: "DRAWER_OPENED",
276
276
  shop: t,
277
- anonymousUserId: y,
277
+ anonymousUserId: _,
278
278
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
279
279
  mixpanelEvent: "bundle_opened"
280
- }).catch((E) => {
281
- console.warn("[Bundle Analytics] Failed to track drawer opened:", E);
280
+ }).catch((g) => {
281
+ console.warn("[Bundle Analytics] Failed to track drawer opened:", g);
282
282
  });
283
- } catch (y) {
284
- console.warn("[Bundle Analytics] Error in toggle() callback:", y);
283
+ } catch (_) {
284
+ console.warn("[Bundle Analytics] Error in toggle() callback:", _);
285
285
  }
286
- return !d;
286
+ return !a;
287
287
  });
288
- }, [x, t, te, m, M, b]);
289
- j(() => {
290
- !b && (m == null ? void 0 : m.isActive) === !1 && M && te();
291
- }, [b, m == null ? void 0 : m.isActive, M, te]);
292
- const Se = P(() => {
293
- const d = Number((m == null ? void 0 : m.maxBundleSize) ?? NaN), y = Number.isFinite(d) ? Math.floor(d) : 100;
294
- return Math.max(2, Math.min(100, y));
295
- }, [m == null ? void 0 : m.maxBundleSize]), ee = P(() => new Set(
296
- ie.filter((d) => d.availableForSale !== !1).map((d) => d.id)
297
- ), [ie]), ne = P(() => {
298
- const d = (m == null ? void 0 : m.rules) ?? [], y = d.length ? Math.min(...d.map((E) => E.minBundleSize)) : 2;
299
- return Number.isFinite(y) && y > 0 ? y : 2;
300
- }, [m]), Be = fe((d, y) => {
301
- if (!ee.has(d))
288
+ }, [x, t, oe, w, A, I]);
289
+ V(() => {
290
+ !I && (w == null ? void 0 : w.isActive) === !1 && A && oe();
291
+ }, [I, w == null ? void 0 : w.isActive, A, oe]);
292
+ const ge = k(() => {
293
+ const a = Number((w == null ? void 0 : w.maxBundleSize) ?? NaN), _ = Number.isFinite(a) ? Math.floor(a) : 100;
294
+ return Math.max(2, Math.min(100, _));
295
+ }, [w == null ? void 0 : w.maxBundleSize]), X = k(() => new Set(
296
+ W.filter((a) => a.availableForSale !== !1).map((a) => a.id)
297
+ ), [W]), se = k(() => {
298
+ const a = (w == null ? void 0 : w.rules) ?? [], _ = a.length ? Math.min(...a.map((R) => R.minBundleSize)) : 2, g = 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
+ return y == null ? g : Math.min(g, y);
300
+ }, [w == null ? void 0 : w.minBundleSize, w == null ? void 0 : w.rules]), ke = Te((a, _) => {
301
+ if (!X.has(a) && !z)
302
302
  return;
303
- const E = ht(y);
304
- ze((p) => {
305
- const R = p.selections[d] ?? 0, T = E - R, q = Object.values(p.selections).reduce((U, v) => U + (v || 0), 0), I = T > 0 ? Math.min(T, Math.max(0, Se - q)) : T, D = R + I;
303
+ const g = pt(_);
304
+ Ce((b) => {
305
+ const y = b.selections[a] ?? 0, R = g - y, U = Object.values(b.selections).reduce((re, O) => re + (O || 0), 0), B = R > 0 ? Math.min(R, Math.max(0, ge - U)) : R, E = y + B;
306
306
  let K;
307
- if (D <= 0) {
308
- const { [d]: U, ...v } = p.selections;
309
- K = v;
310
- } else R === D ? K = p.selections : K = { ...p.selections, [d]: D };
311
- let ue = p.order;
312
- if (I > 0)
313
- ue = [...p.order, ...Array.from({ length: I }, () => d)];
314
- else if (I < 0) {
315
- let U = -I;
316
- const v = [];
317
- for (let N = p.order.length - 1; N >= 0; N--) {
318
- const g = p.order[N];
319
- if (g === d && U > 0) {
320
- U--;
307
+ if (E <= 0) {
308
+ const { [a]: re, ...O } = b.selections;
309
+ K = O;
310
+ } else y === E ? K = b.selections : K = { ...b.selections, [a]: E };
311
+ let _e = b.order;
312
+ if (B > 0)
313
+ _e = [...b.order, ...Array.from({ length: B }, () => a)];
314
+ else if (B < 0) {
315
+ let re = -B;
316
+ const O = [];
317
+ for (let q = b.order.length - 1; q >= 0; q--) {
318
+ const T = b.order[q];
319
+ if (T === a && re > 0) {
320
+ re--;
321
321
  continue;
322
322
  }
323
- v.push(g);
323
+ O.push(T);
324
324
  }
325
- v.reverse(), ue = v;
325
+ O.reverse(), _e = O;
326
326
  }
327
- if (K === p.selections && ue === p.order) return p;
328
- const ge = q, de = Object.values(K).reduce((U, v) => U + (v || 0), 0);
327
+ if (K === b.selections && _e === b.order) return b;
328
+ const be = U, Se = Object.values(K).reduce((re, O) => re + (O || 0), 0);
329
329
  if (x)
330
330
  try {
331
- const U = Te(), v = {
331
+ const re = Le(), O = {
332
332
  eventType: "VARIANT_SELECTION_CHANGED",
333
333
  shop: t,
334
- anonymousUserId: U,
335
- before: { ...p.selections },
334
+ anonymousUserId: re,
335
+ before: { ...b.selections },
336
336
  after: { ...K },
337
337
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
338
338
  };
339
- Ce(x, t, v), ge === 0 && de >= 1 && Ce(x, t, {
340
- ...v,
339
+ Oe(x, t, O), be === 0 && Se >= 1 && Oe(x, t, {
340
+ ...O,
341
341
  mixpanelEvent: "bundle_started"
342
- }), ge < ne && de >= ne && Ce(x, t, {
343
- ...v,
342
+ }), be < se && Se >= se && Oe(x, t, {
343
+ ...O,
344
344
  mixpanelEvent: "bundle_completed"
345
345
  });
346
346
  } catch {
347
347
  }
348
- return { selections: K, order: ue };
348
+ return { selections: K, order: _e };
349
+ });
350
+ }, [ge, se, X, x, t, z]);
351
+ V(() => {
352
+ z || Ce((a) => {
353
+ const _ = Object.entries(a.selections).filter(
354
+ ([y]) => X.has(y)
355
+ ), g = Object.fromEntries(_), b = a.order.filter((y) => X.has(y));
356
+ return b.length === a.order.length && _.length === Object.keys(a.selections).length ? a : { selections: g, order: b };
349
357
  });
350
- }, [Se, ne, ee, x, t]), _e = fe(() => ze({ selections: {}, order: [] }), []), oe = Pe.selections, we = Pe.order, ce = P(() => Object.values(oe).reduce((d, y) => d + (y || 0), 0), [oe]), le = P(() => !(Z || Q || z || !(m != null && m.isActive) || ce < ne), [ce, m == null ? void 0 : m.isActive, z, Z, ne, Q]), ye = fe(async (d) => {
351
- var v, N;
352
- if (!le || !m) return;
353
- const y = Ot(), E = (m.title ?? "").trim().slice(0, 255), p = Object.entries(oe).map(([g, $]) => ({ merchandiseId: g, quantity: ht($) })).filter((g) => g.quantity > 0).filter((g) => ee.has(g.merchandiseId)).map((g) => ({
354
- merchandiseId: g.merchandiseId,
355
- quantity: g.quantity,
358
+ }, [z, X]);
359
+ const xe = Te(() => Ce({ selections: {}, order: [] }), []), he = de.selections, ye = de.order, me = k(() => Object.values(he).reduce((a, _) => a + (_ || 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 (a) => {
360
+ var O, q;
361
+ if (!fe || !w) return;
362
+ const _ = Ot(), g = (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) => ({
363
+ merchandiseId: T.merchandiseId,
364
+ quantity: T.quantity,
356
365
  attributes: [
357
- { key: Me.bundleId, value: y },
358
- { key: Me.bundleConfig, value: r },
359
- { key: Me.bundleSource, value: "bundle_builder" },
360
- ...E ? [{ key: Me.bundleTitle, value: E }] : []
366
+ { key: $e.bundleId, value: _ },
367
+ { key: $e.bundleConfig, value: i },
368
+ { key: $e.bundleSource, value: "bundle_builder" },
369
+ ...g ? [{ key: $e.bundleTitle, value: g }] : []
361
370
  ]
362
371
  }));
363
- if (!p.length) return;
364
- const R = new Map(ie.map((g) => [g.id, g]));
365
- let T = 0;
366
- for (const [g, $] of Object.entries(oe)) {
367
- const je = $ ?? 0;
368
- if (je <= 0) continue;
369
- const ve = R.get(g), he = Number(ve == null ? void 0 : ve.price);
370
- Number.isFinite(he) && (T += he * je);
372
+ if (!b.length) return;
373
+ const y = new Map(W.map((T) => [T.id, T]));
374
+ let R = 0;
375
+ for (const [T, Z] of Object.entries(he)) {
376
+ const Fe = Z ?? 0;
377
+ if (Fe <= 0) continue;
378
+ const Me = y.get(T), Be = Number(Me == null ? void 0 : Me.price);
379
+ Number.isFinite(Be) && (R += Be * Fe);
371
380
  }
372
- T = Math.round(T * 100) / 100;
373
- const q = [...m.rules ?? []].sort((g, $) => g.minBundleSize - $.minBundleSize);
374
- let I = null;
375
- for (const g of q)
376
- ce >= g.minBundleSize && (I = g);
377
- const D = I ? (() => {
378
- const g = Number.parseFloat(I.discountPercent);
379
- return Number.isFinite(g) && g > 0 ? g : null;
380
- })() : null, K = D ? Math.round(T * (1 - D / 100) * 100) / 100 : T, ue = T - K, ge = p.map((g) => g.merchandiseId), de = (I == null ? void 0 : I.handle) ?? "", U = ((v = I == null ? void 0 : I.label) == null ? void 0 : v.trim()) || "";
381
- J(!0);
381
+ R = Math.round(R * 100) / 100;
382
+ const U = [...w.rules ?? []].sort((T, Z) => T.minBundleSize - Z.minBundleSize);
383
+ let B = null;
384
+ for (const T of U)
385
+ me >= T.minBundleSize && (B = T);
386
+ const E = B ? (() => {
387
+ const T = Number.parseFloat(B.discountPercent);
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) ?? "", re = ((O = B == null ? void 0 : B.label) == null ? void 0 : O.trim()) || "";
390
+ ne(!0);
382
391
  try {
383
- if (d != null && d.checkout ? await i.linesAddForCheckout(p) : await i.linesAdd(p), x)
392
+ if (a != null && a.checkout ? await r.linesAddForCheckout(b) : await r.linesAdd(b), x)
384
393
  try {
385
- const g = Te(), $ = !!(d != null && d.checkout);
386
- Ce(x, t, {
394
+ const T = Le(), Z = !!(a != null && a.checkout);
395
+ Oe(x, t, {
387
396
  eventType: "BUNDLE_ADDED_TO_BASKET",
388
397
  shop: t,
389
- anonymousUserId: g,
390
- bundleId: y,
391
- productVariantIds: ge,
392
- grossPrice: T,
398
+ anonymousUserId: T,
399
+ bundleId: _,
400
+ productVariantIds: be,
401
+ grossPrice: R,
393
402
  discountedPrice: K,
394
- currency: V ?? void 0,
395
- discountThresholdIdentifier: de,
396
- discountLabel: U,
397
- discountPercentage: D,
398
- discountedAmount: ue,
403
+ currency: ee ?? void 0,
404
+ discountThresholdIdentifier: Se,
405
+ discountLabel: re,
406
+ discountPercentage: E,
407
+ discountedAmount: _e,
399
408
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
400
- checkout: $,
401
- mixpanelEvent: $ ? "checkout_started_with_bundle" : "bundle_added_to_cart"
409
+ checkout: Z,
410
+ mixpanelEvent: Z ? "checkout_started_with_bundle" : "bundle_added_to_cart"
402
411
  });
403
412
  } catch {
404
413
  }
405
- _e(), te(), (N = d == null ? void 0 : d.onComplete) == null || N.call(d);
414
+ xe(), oe(), (q = a == null ? void 0 : a.onComplete) == null || q.call(a);
406
415
  } finally {
407
- J(!1);
416
+ ne(!1);
408
417
  }
409
418
  }, [
410
- le,
411
- i,
412
- _e,
413
- te,
414
- m,
419
+ fe,
415
420
  r,
416
- V,
421
+ xe,
417
422
  oe,
423
+ w,
424
+ i,
418
425
  ee,
419
- ie,
420
- ce,
426
+ he,
427
+ X,
428
+ W,
429
+ me,
421
430
  x,
422
431
  t
423
- ]), ae = fe(async () => {
424
- await ye(
432
+ ]), le = Te(async () => {
433
+ await pe(
425
434
  {
426
435
  onComplete: () => {
427
- var d;
428
- (d = i.openCartUI) == null || d.call(i);
436
+ var a;
437
+ (a = r.openCartUI) == null || a.call(r);
429
438
  }
430
439
  }
431
440
  );
432
- }, [ye, i]), Ee = fe(async () => {
433
- await ye(
441
+ }, [pe, r]), m = Te(async () => {
442
+ await pe(
434
443
  {
435
444
  checkout: !0,
436
445
  onComplete: () => {
437
- var d;
438
- (d = i.navigateToCheckout) == null || d.call(i);
446
+ var a;
447
+ (a = r.navigateToCheckout) == null || a.call(r);
439
448
  }
440
449
  }
441
450
  );
442
- }, [ye, i]), Re = P(
451
+ }, [pe, r]), p = k(
443
452
  () => ({
444
- isOpen: M,
445
- open: be,
446
- close: te,
447
- toggle: Ae,
448
- loading: Z,
449
- submitting: Q,
450
- error: z,
451
- currencyCode: V,
452
- config: m,
453
- eligibleVariants: ie,
454
- selections: oe,
455
- selectionOrder: we,
456
- setQuantity: Be,
457
- clearSelections: _e,
458
- bundleSize: ce,
459
- minRequired: ne,
460
- canSubmit: le,
461
- submit: ae,
462
- submitAndCheckout: Ee
453
+ isOpen: A,
454
+ open: ie,
455
+ close: oe,
456
+ toggle: we,
457
+ loading: z,
458
+ submitting: te,
459
+ error: L,
460
+ currencyCode: ee,
461
+ config: w,
462
+ eligibleVariants: W,
463
+ selections: he,
464
+ selectionOrder: ye,
465
+ setQuantity: ke,
466
+ clearSelections: xe,
467
+ bundleSize: me,
468
+ minRequired: se,
469
+ canSubmit: fe,
470
+ submit: le,
471
+ submitAndCheckout: m
463
472
  }),
464
473
  [
465
- M,
466
- be,
467
- te,
468
- Ae,
469
- Z,
470
- Q,
471
- z,
472
- V,
473
- m,
474
+ A,
474
475
  ie,
475
476
  oe,
476
477
  we,
477
- Be,
478
- _e,
479
- ce,
480
- ne,
478
+ z,
479
+ te,
480
+ L,
481
+ ee,
482
+ w,
483
+ W,
484
+ he,
485
+ ye,
486
+ ke,
487
+ xe,
488
+ me,
489
+ se,
490
+ fe,
481
491
  le,
482
- ae,
483
- Ee
492
+ m
484
493
  ]
485
494
  );
486
- return /* @__PURE__ */ f(_t.Provider, { value: Re, children: H });
495
+ return /* @__PURE__ */ s(gt.Provider, { value: p, children: G });
487
496
  }
488
- function Ke() {
489
- const o = It(_t);
497
+ function ze() {
498
+ const o = Bt(gt);
490
499
  if (!o)
491
500
  throw new Error("useBundleBuilder must be used within <BundleProvider />");
492
501
  return o;
493
502
  }
494
- function _r() {
495
- const { isOpen: o, open: e, close: t, toggle: i } = Ke();
496
- return { isOpen: o, open: e, close: t, toggle: i };
503
+ function Ar() {
504
+ const { isOpen: o, open: e, close: t, toggle: r } = ze();
505
+ return { isOpen: o, open: e, close: t, toggle: r };
497
506
  }
498
- const Pt = "_button_18rtl_1", zt = {
499
- button: Pt
507
+ const Mt = "_button_18rtl_1", Ft = {
508
+ button: Mt
500
509
  };
501
- function wr(o) {
502
- const { toggle: e } = Ke();
503
- return /* @__PURE__ */ f(
510
+ function Lr(o) {
511
+ const { toggle: e } = ze();
512
+ return /* @__PURE__ */ s(
504
513
  "button",
505
514
  {
506
515
  type: "button",
507
516
  onClick: e,
508
- className: [zt.button, o.className].filter(Boolean).join(" "),
517
+ className: [Ft.button, o.className].filter(Boolean).join(" "),
509
518
  children: o.children ?? "Build a bundle"
510
519
  }
511
520
  );
512
521
  }
513
- var Ge, ft;
514
- function kt() {
515
- if (ft) return Ge;
516
- ft = 1;
522
+ var Qe, _t;
523
+ function At() {
524
+ if (_t) return Qe;
525
+ _t = 1;
517
526
  var o = {
518
- linear: function(e, t, i, r) {
519
- var n = i - t;
520
- return n * e / r + t;
527
+ linear: function(e, t, r, i) {
528
+ var n = r - t;
529
+ return n * e / i + t;
521
530
  },
522
- easeInQuad: function(e, t, i, r) {
523
- var n = i - t;
524
- return n * (e /= r) * e + t;
531
+ easeInQuad: function(e, t, r, i) {
532
+ var n = r - t;
533
+ return n * (e /= i) * e + t;
525
534
  },
526
- easeOutQuad: function(e, t, i, r) {
527
- var n = i - t;
528
- return -n * (e /= r) * (e - 2) + t;
535
+ easeOutQuad: function(e, t, r, i) {
536
+ var n = r - t;
537
+ return -n * (e /= i) * (e - 2) + t;
529
538
  },
530
- easeInOutQuad: function(e, t, i, r) {
531
- var n = i - t;
532
- return (e /= r / 2) < 1 ? n / 2 * e * e + t : -n / 2 * (--e * (e - 2) - 1) + t;
539
+ easeInOutQuad: function(e, t, r, i) {
540
+ var n = r - t;
541
+ return (e /= i / 2) < 1 ? n / 2 * e * e + t : -n / 2 * (--e * (e - 2) - 1) + t;
533
542
  },
534
- easeInCubic: function(e, t, i, r) {
535
- var n = i - t;
536
- return n * (e /= r) * e * e + t;
543
+ easeInCubic: function(e, t, r, i) {
544
+ var n = r - t;
545
+ return n * (e /= i) * e * e + t;
537
546
  },
538
- easeOutCubic: function(e, t, i, r) {
539
- var n = i - t;
540
- return n * ((e = e / r - 1) * e * e + 1) + t;
547
+ easeOutCubic: function(e, t, r, i) {
548
+ var n = r - t;
549
+ return n * ((e = e / i - 1) * e * e + 1) + t;
541
550
  },
542
- easeInOutCubic: function(e, t, i, r) {
543
- var n = i - t;
544
- return (e /= r / 2) < 1 ? n / 2 * e * e * e + t : n / 2 * ((e -= 2) * e * e + 2) + t;
551
+ easeInOutCubic: function(e, t, r, i) {
552
+ var n = r - t;
553
+ return (e /= i / 2) < 1 ? n / 2 * e * e * e + t : n / 2 * ((e -= 2) * e * e + 2) + t;
545
554
  },
546
- easeInQuart: function(e, t, i, r) {
547
- var n = i - t;
548
- return n * (e /= r) * e * e * e + t;
555
+ easeInQuart: function(e, t, r, i) {
556
+ var n = r - t;
557
+ return n * (e /= i) * e * e * e + t;
549
558
  },
550
- easeOutQuart: function(e, t, i, r) {
551
- var n = i - t;
552
- return -n * ((e = e / r - 1) * e * e * e - 1) + t;
559
+ easeOutQuart: function(e, t, r, i) {
560
+ var n = r - t;
561
+ return -n * ((e = e / i - 1) * e * e * e - 1) + t;
553
562
  },
554
- easeInOutQuart: function(e, t, i, r) {
555
- var n = i - t;
556
- return (e /= r / 2) < 1 ? n / 2 * e * e * e * e + t : -n / 2 * ((e -= 2) * e * e * e - 2) + t;
563
+ easeInOutQuart: function(e, t, r, i) {
564
+ var n = r - t;
565
+ return (e /= i / 2) < 1 ? n / 2 * e * e * e * e + t : -n / 2 * ((e -= 2) * e * e * e - 2) + t;
557
566
  },
558
- easeInQuint: function(e, t, i, r) {
559
- var n = i - t;
560
- return n * (e /= r) * e * e * e * e + t;
567
+ easeInQuint: function(e, t, r, i) {
568
+ var n = r - t;
569
+ return n * (e /= i) * e * e * e * e + t;
561
570
  },
562
- easeOutQuint: function(e, t, i, r) {
563
- var n = i - t;
564
- return n * ((e = e / r - 1) * e * e * e * e + 1) + t;
571
+ easeOutQuint: function(e, t, r, i) {
572
+ var n = r - t;
573
+ return n * ((e = e / i - 1) * e * e * e * e + 1) + t;
565
574
  },
566
- easeInOutQuint: function(e, t, i, r) {
567
- var n = i - t;
568
- return (e /= r / 2) < 1 ? n / 2 * e * e * e * e * e + t : n / 2 * ((e -= 2) * e * e * e * e + 2) + t;
575
+ easeInOutQuint: function(e, t, r, i) {
576
+ var n = r - t;
577
+ return (e /= i / 2) < 1 ? n / 2 * e * e * e * e * e + t : n / 2 * ((e -= 2) * e * e * e * e + 2) + t;
569
578
  },
570
- easeInSine: function(e, t, i, r) {
571
- var n = i - t;
572
- return -n * Math.cos(e / r * (Math.PI / 2)) + n + t;
579
+ easeInSine: function(e, t, r, i) {
580
+ var n = r - t;
581
+ return -n * Math.cos(e / i * (Math.PI / 2)) + n + t;
573
582
  },
574
- easeOutSine: function(e, t, i, r) {
575
- var n = i - t;
576
- return n * Math.sin(e / r * (Math.PI / 2)) + t;
583
+ easeOutSine: function(e, t, r, i) {
584
+ var n = r - t;
585
+ return n * Math.sin(e / i * (Math.PI / 2)) + t;
577
586
  },
578
- easeInOutSine: function(e, t, i, r) {
579
- var n = i - t;
580
- return -n / 2 * (Math.cos(Math.PI * e / r) - 1) + t;
587
+ easeInOutSine: function(e, t, r, i) {
588
+ var n = r - t;
589
+ return -n / 2 * (Math.cos(Math.PI * e / i) - 1) + t;
581
590
  },
582
- easeInExpo: function(e, t, i, r) {
583
- var n = i - t;
584
- return e == 0 ? t : n * Math.pow(2, 10 * (e / r - 1)) + t;
591
+ easeInExpo: function(e, t, r, i) {
592
+ var n = r - t;
593
+ return e == 0 ? t : n * Math.pow(2, 10 * (e / i - 1)) + t;
585
594
  },
586
- easeOutExpo: function(e, t, i, r) {
587
- var n = i - t;
588
- return e == r ? t + n : n * (-Math.pow(2, -10 * e / r) + 1) + t;
595
+ easeOutExpo: function(e, t, r, i) {
596
+ var n = r - t;
597
+ return e == i ? t + n : n * (-Math.pow(2, -10 * e / i) + 1) + t;
589
598
  },
590
- easeInOutExpo: function(e, t, i, r) {
591
- var n = i - t;
592
- return e === 0 ? t : e === r ? t + n : (e /= r / 2) < 1 ? n / 2 * Math.pow(2, 10 * (e - 1)) + t : n / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
599
+ easeInOutExpo: function(e, t, r, i) {
600
+ var n = r - t;
601
+ return e === 0 ? t : e === i ? t + n : (e /= i / 2) < 1 ? n / 2 * Math.pow(2, 10 * (e - 1)) + t : n / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
593
602
  },
594
- easeInCirc: function(e, t, i, r) {
595
- var n = i - t;
596
- return -n * (Math.sqrt(1 - (e /= r) * e) - 1) + t;
603
+ easeInCirc: function(e, t, r, i) {
604
+ var n = r - t;
605
+ return -n * (Math.sqrt(1 - (e /= i) * e) - 1) + t;
597
606
  },
598
- easeOutCirc: function(e, t, i, r) {
599
- var n = i - t;
600
- return n * Math.sqrt(1 - (e = e / r - 1) * e) + t;
607
+ easeOutCirc: function(e, t, r, i) {
608
+ var n = r - t;
609
+ return n * Math.sqrt(1 - (e = e / i - 1) * e) + t;
601
610
  },
602
- easeInOutCirc: function(e, t, i, r) {
603
- var n = i - t;
604
- return (e /= r / 2) < 1 ? -n / 2 * (Math.sqrt(1 - e * e) - 1) + t : n / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
611
+ easeInOutCirc: function(e, t, r, i) {
612
+ var n = r - t;
613
+ return (e /= i / 2) < 1 ? -n / 2 * (Math.sqrt(1 - e * e) - 1) + t : n / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
605
614
  },
606
- easeInElastic: function(e, t, i, r) {
607
- var n = i - t, u, c, b;
608
- return b = 1.70158, c = 0, u = n, e === 0 ? t : (e /= r) === 1 ? t + n : (c || (c = r * 0.3), u < Math.abs(n) ? (u = n, b = c / 4) : b = c / (2 * Math.PI) * Math.asin(n / u), -(u * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - b) * (2 * Math.PI) / c)) + t);
615
+ easeInElastic: function(e, t, r, i) {
616
+ var n = r - t, d, c, I;
617
+ return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= i) === 1 ? t + n : (c || (c = i * 0.3), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), -(d * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - I) * (2 * Math.PI) / c)) + t);
609
618
  },
610
- easeOutElastic: function(e, t, i, r) {
611
- var n = i - t, u, c, b;
612
- return b = 1.70158, c = 0, u = n, e === 0 ? t : (e /= r) === 1 ? t + n : (c || (c = r * 0.3), u < Math.abs(n) ? (u = n, b = c / 4) : b = c / (2 * Math.PI) * Math.asin(n / u), u * Math.pow(2, -10 * e) * Math.sin((e * r - b) * (2 * Math.PI) / c) + n + t);
619
+ easeOutElastic: function(e, t, r, i) {
620
+ var n = r - t, d, c, I;
621
+ return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= i) === 1 ? t + n : (c || (c = i * 0.3), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), d * Math.pow(2, -10 * e) * Math.sin((e * i - I) * (2 * Math.PI) / c) + n + t);
613
622
  },
614
- easeInOutElastic: function(e, t, i, r) {
615
- var n = i - t, u, c, b;
616
- return b = 1.70158, c = 0, u = n, e === 0 ? t : (e /= r / 2) === 2 ? t + n : (c || (c = r * (0.3 * 1.5)), u < Math.abs(n) ? (u = n, b = c / 4) : b = c / (2 * Math.PI) * Math.asin(n / u), e < 1 ? -0.5 * (u * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - b) * (2 * Math.PI) / c)) + t : u * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * r - b) * (2 * Math.PI) / c) * 0.5 + n + t);
623
+ easeInOutElastic: function(e, t, r, i) {
624
+ var n = r - t, d, c, I;
625
+ return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= i / 2) === 2 ? t + n : (c || (c = i * (0.3 * 1.5)), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), e < 1 ? -0.5 * (d * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - I) * (2 * Math.PI) / c)) + t : d * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * i - I) * (2 * Math.PI) / c) * 0.5 + n + t);
617
626
  },
618
- easeInBack: function(e, t, i, r, n) {
619
- var u = i - t;
620
- return n === void 0 && (n = 1.70158), u * (e /= r) * e * ((n + 1) * e - n) + t;
627
+ easeInBack: function(e, t, r, i, n) {
628
+ var d = r - t;
629
+ return n === void 0 && (n = 1.70158), d * (e /= i) * e * ((n + 1) * e - n) + t;
621
630
  },
622
- easeOutBack: function(e, t, i, r, n) {
623
- var u = i - t;
624
- return n === void 0 && (n = 1.70158), u * ((e = e / r - 1) * e * ((n + 1) * e + n) + 1) + t;
631
+ easeOutBack: function(e, t, r, i, n) {
632
+ var d = r - t;
633
+ return n === void 0 && (n = 1.70158), d * ((e = e / i - 1) * e * ((n + 1) * e + n) + 1) + t;
625
634
  },
626
- easeInOutBack: function(e, t, i, r, n) {
627
- var u = i - t;
628
- return n === void 0 && (n = 1.70158), (e /= r / 2) < 1 ? u / 2 * (e * e * (((n *= 1.525) + 1) * e - n)) + t : u / 2 * ((e -= 2) * e * (((n *= 1.525) + 1) * e + n) + 2) + t;
635
+ easeInOutBack: function(e, t, r, i, n) {
636
+ var d = r - t;
637
+ return n === void 0 && (n = 1.70158), (e /= i / 2) < 1 ? d / 2 * (e * e * (((n *= 1.525) + 1) * e - n)) + t : d / 2 * ((e -= 2) * e * (((n *= 1.525) + 1) * e + n) + 2) + t;
629
638
  },
630
- easeInBounce: function(e, t, i, r) {
631
- var n = i - t, u;
632
- return u = o.easeOutBounce(r - e, 0, n, r), n - u + t;
639
+ easeInBounce: function(e, t, r, i) {
640
+ var n = r - t, d;
641
+ return d = o.easeOutBounce(i - e, 0, n, i), n - d + t;
633
642
  },
634
- easeOutBounce: function(e, t, i, r) {
635
- var n = i - t;
636
- return (e /= r) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
643
+ easeOutBounce: function(e, t, r, i) {
644
+ var n = r - t;
645
+ return (e /= i) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
637
646
  },
638
- easeInOutBounce: function(e, t, i, r) {
639
- var n = i - t, u;
640
- return e < r / 2 ? (u = o.easeInBounce(e * 2, 0, n, r), u * 0.5 + t) : (u = o.easeOutBounce(e * 2 - r, 0, n, r), u * 0.5 + n * 0.5 + t);
647
+ easeInOutBounce: function(e, t, r, i) {
648
+ var n = r - t, d;
649
+ return e < i / 2 ? (d = o.easeInBounce(e * 2, 0, n, i), d * 0.5 + t) : (d = o.easeOutBounce(e * 2 - i, 0, n, i), d * 0.5 + n * 0.5 + t);
641
650
  }
642
651
  };
643
- return Ge = o, Ge;
652
+ return Qe = o, Qe;
644
653
  }
645
- var At = kt();
646
- function Et(o) {
654
+ var Lt = At();
655
+ function Dt(o) {
647
656
  return o * Math.PI / 180;
648
657
  }
649
- function G(o, e) {
658
+ function ae(o, e) {
650
659
  return o + Math.random() * (e - o);
651
660
  }
652
- function Rt(o, e) {
661
+ function $t(o, e) {
653
662
  return Math.floor(o + Math.random() * (e - o + 1));
654
663
  }
655
- var Oe;
664
+ var De;
656
665
  (function(o) {
657
666
  o[o.Circle = 0] = "Circle", o[o.Square = 1] = "Square", o[o.Strip = 2] = "Strip";
658
- })(Oe || (Oe = {}));
659
- var me;
667
+ })(De || (De = {}));
668
+ var Re;
660
669
  (function(o) {
661
670
  o[o.Positive = 1] = "Positive", o[o.Negative = -1] = "Negative";
662
- })(me || (me = {}));
663
- const jt = 1e3 / 60;
664
- class Mt {
665
- constructor(e, t, i, r) {
671
+ })(Re || (Re = {}));
672
+ const Et = 1e3 / 60;
673
+ class qt {
674
+ constructor(e, t, r, i) {
666
675
  this.getOptions = t;
667
- const { colors: n, initialVelocityX: u, initialVelocityY: c } = this.getOptions();
668
- this.context = e, this.x = i, this.y = r, this.w = G(5, 20), this.h = G(5, 20), this.radius = G(5, 10), this.vx = typeof u == "number" ? G(-u, u) : G(u.min, u.max), this.vy = typeof c == "number" ? G(-c, 0) : G(c.min, c.max), this.shape = Rt(0, 2), this.angle = Et(G(0, 360)), this.angularSpin = G(-0.2, 0.2), this.color = n[Math.floor(Math.random() * n.length)], this.rotateY = G(0, 1), this.rotationDirection = G(0, 1) ? me.Positive : me.Negative;
676
+ const { colors: n, initialVelocityX: d, initialVelocityY: c } = this.getOptions();
677
+ this.context = e, this.x = r, this.y = i, this.w = ae(5, 20), this.h = ae(5, 20), this.radius = ae(5, 10), this.vx = typeof d == "number" ? ae(-d, d) : ae(d.min, d.max), this.vy = typeof c == "number" ? ae(-c, 0) : ae(c.min, c.max), this.shape = $t(0, 2), this.angle = Dt(ae(0, 360)), this.angularSpin = ae(-0.2, 0.2), this.color = n[Math.floor(Math.random() * n.length)], this.rotateY = ae(0, 1), this.rotationDirection = ae(0, 1) ? Re.Positive : Re.Negative;
669
678
  }
670
679
  update(e) {
671
- const { gravity: t, wind: i, friction: r, opacity: n, drawShape: u } = this.getOptions(), c = e / jt;
672
- this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx += i * c, this.vx *= r ** c, this.vy *= r ** c, this.rotateY >= 1 && this.rotationDirection === me.Positive ? this.rotationDirection = me.Negative : this.rotateY <= -1 && this.rotationDirection === me.Negative && (this.rotationDirection = me.Positive);
673
- const b = 0.1 * this.rotationDirection * c;
674
- if (this.rotateY += b, 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, u && typeof u == "function")
675
- u.call(this, this.context);
680
+ const { gravity: t, wind: r, friction: i, 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 += r * c, this.vx *= i ** c, this.vy *= i ** c, this.rotateY >= 1 && this.rotationDirection === Re.Positive ? this.rotationDirection = Re.Negative : this.rotateY <= -1 && this.rotationDirection === Re.Negative && (this.rotationDirection = Re.Positive);
682
+ const I = 0.1 * this.rotationDirection * c;
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
+ d.call(this, this.context);
676
685
  else
677
686
  switch (this.shape) {
678
- case Oe.Circle: {
687
+ case De.Circle: {
679
688
  this.context.beginPath(), this.context.arc(0, 0, this.radius, 0, 2 * Math.PI), this.context.fill();
680
689
  break;
681
690
  }
682
- case Oe.Square: {
691
+ case De.Square: {
683
692
  this.context.fillRect(-this.w / 2, -this.h / 2, this.w, this.h);
684
693
  break;
685
694
  }
686
- case Oe.Strip: {
695
+ case De.Strip: {
687
696
  this.context.fillRect(-this.w / 6, -this.h / 2, this.w / 3, this.h);
688
697
  break;
689
698
  }
@@ -691,39 +700,39 @@ class Mt {
691
700
  this.context.closePath(), this.context.restore();
692
701
  }
693
702
  }
694
- class Ft {
703
+ class Vt {
695
704
  constructor(e, t) {
696
- this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.lastNumberOfPieces = 0, this.tweenProgress = 0, this.tweenFrom = 0, this.particles = [], this.particlesGenerated = 0, this.removeParticleAt = (r) => {
697
- this.particles.splice(r, 1);
705
+ this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.lastNumberOfPieces = 0, this.tweenProgress = 0, this.tweenFrom = 0, this.particles = [], this.particlesGenerated = 0, this.removeParticleAt = (i) => {
706
+ this.particles.splice(i, 1);
698
707
  }, this.getParticle = () => {
699
- const r = G(this.x, this.w + this.x), n = G(this.y, this.h + this.y);
700
- return new Mt(this.context, this.getOptions, r, n);
701
- }, this.animate = (r) => {
702
- const { canvas: n, context: u, particlesGenerated: c, lastNumberOfPieces: b } = this, { run: H, recycle: x, numberOfPieces: M, debug: B, tweenFunction: Z, tweenDuration: L } = this.getOptions();
703
- if (!H)
708
+ const i = ae(this.x, this.w + this.x), n = ae(this.y, this.h + this.y);
709
+ return new qt(this.context, this.getOptions, i, n);
710
+ }, this.animate = (i) => {
711
+ const { canvas: n, context: d, particlesGenerated: c, lastNumberOfPieces: I } = this, { run: G, recycle: x, numberOfPieces: A, debug: P, tweenFunction: z, tweenDuration: H } = this.getOptions();
712
+ if (!G)
704
713
  return !1;
705
- const Q = this.particles.length, J = x ? Q : c;
706
- if (J < M) {
707
- b !== M && (this.tweenProgress = 0, this.tweenFrom = J, this.lastNumberOfPieces = M), this.tweenProgress = Math.min(L, Math.max(0, this.tweenProgress + r));
708
- const z = Z(this.tweenProgress, this.tweenFrom, M, L), F = Math.round(z - J);
709
- for (let V = 0; V < F; V++)
714
+ const te = this.particles.length, ne = x ? te : c;
715
+ if (ne < A) {
716
+ I !== A && (this.tweenProgress = 0, this.tweenFrom = ne, this.lastNumberOfPieces = A), this.tweenProgress = Math.min(H, Math.max(0, this.tweenProgress + i));
717
+ const L = z(this.tweenProgress, this.tweenFrom, A, H), Q = Math.round(L - ne);
718
+ for (let ee = 0; ee < Q; ee++)
710
719
  this.particles.push(this.getParticle());
711
- this.particlesGenerated += F;
720
+ this.particlesGenerated += Q;
712
721
  }
713
- B && (u.font = "12px sans-serif", u.fillStyle = "#333", u.textAlign = "right", u.fillText(`Particles: ${Q}`, n.width - 10, n.height - 20));
714
- for (let z = this.particles.length - 1; z >= 0; z--) {
715
- const F = this.particles[z];
716
- F.update(r), (F.y > n.height || F.y < -100 || F.x > n.width + 100 || F.x < -100) && (x && J <= M ? this.particles[z] = this.getParticle() : this.removeParticleAt(z));
722
+ P && (d.font = "12px sans-serif", d.fillStyle = "#333", d.textAlign = "right", d.fillText(`Particles: ${te}`, n.width - 10, n.height - 20));
723
+ for (let L = this.particles.length - 1; L >= 0; L--) {
724
+ const Q = this.particles[L];
725
+ Q.update(i), (Q.y > n.height || Q.y < -100 || Q.x > n.width + 100 || Q.x < -100) && (x && ne <= A ? this.particles[L] = this.getParticle() : this.removeParticleAt(L));
717
726
  }
718
- return Q > 0 || J < M;
727
+ return te > 0 || ne < A;
719
728
  }, this.canvas = e;
720
- const i = this.canvas.getContext("2d");
721
- if (!i)
729
+ const r = this.canvas.getContext("2d");
730
+ if (!r)
722
731
  throw new Error("Could not get canvas context");
723
- this.context = i, this.getOptions = t;
732
+ this.context = r, this.getOptions = t;
724
733
  }
725
734
  }
726
- const Xe = {
735
+ const Je = {
727
736
  width: typeof window < "u" ? window.innerWidth : 300,
728
737
  height: typeof window < "u" ? window.innerHeight : 200,
729
738
  numberOfPieces: 200,
@@ -753,14 +762,14 @@ const Xe = {
753
762
  ],
754
763
  opacity: 1,
755
764
  debug: !1,
756
- tweenFunction: At.easeInOutQuad,
765
+ tweenFunction: Lt.easeInOutQuad,
757
766
  tweenDuration: 5e3,
758
767
  recycle: !0,
759
768
  run: !0
760
769
  };
761
- class Dt {
770
+ class zt {
762
771
  constructor(e, t) {
763
- this.lastFrameTime = 0, this.setOptionsWithDefaults = (r) => {
772
+ this.lastFrameTime = 0, this.setOptionsWithDefaults = (i) => {
764
773
  const n = {
765
774
  confettiSource: {
766
775
  x: 0,
@@ -771,55 +780,55 @@ class Dt {
771
780
  };
772
781
  this._options = {
773
782
  ...n,
774
- ...Xe,
775
- ...r
776
- }, Object.assign(this, r.confettiSource);
777
- }, this.update = (r = 0) => {
778
- const { options: { run: n, onConfettiComplete: u, frameRate: c }, canvas: b, context: H } = this, x = Math.min(r - this.lastFrameTime, 50);
783
+ ...Je,
784
+ ...i
785
+ }, Object.assign(this, i.confettiSource);
786
+ }, this.update = (i = 0) => {
787
+ const { options: { run: n, onConfettiComplete: d, frameRate: c }, canvas: I, context: G } = this, x = Math.min(i - this.lastFrameTime, 50);
779
788
  if (c && x < 1e3 / c) {
780
789
  this.rafId = requestAnimationFrame(this.update);
781
790
  return;
782
791
  }
783
- this.lastFrameTime = r - (c ? x % c : 0), n && (H.fillStyle = "white", H.clearRect(0, 0, b.width, b.height)), this.generator.animate(x) ? this.rafId = requestAnimationFrame(this.update) : (u && typeof u == "function" && this.generator.particlesGenerated > 0 && u.call(this, this), this._options.run = !1);
792
+ this.lastFrameTime = i - (c ? x % c : 0), n && (G.fillStyle = "white", G.clearRect(0, 0, I.width, I.height)), this.generator.animate(x) ? this.rafId = requestAnimationFrame(this.update) : (d && typeof d == "function" && this.generator.particlesGenerated > 0 && d.call(this, this), this._options.run = !1);
784
793
  }, this.reset = () => {
785
794
  this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
786
795
  }, this.stop = () => {
787
796
  this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
788
797
  }, this.canvas = e;
789
- const i = this.canvas.getContext("2d");
790
- if (!i)
798
+ const r = this.canvas.getContext("2d");
799
+ if (!r)
791
800
  throw new Error("Could not get canvas context");
792
- this.context = i, this.generator = new Ft(this.canvas, () => this.options), this.options = t, this.update();
801
+ this.context = r, this.generator = new Vt(this.canvas, () => this.options), this.options = t, this.update();
793
802
  }
794
803
  get options() {
795
804
  return this._options;
796
805
  }
797
806
  set options(e) {
798
- var r, n;
799
- const t = (r = this._options) == null ? void 0 : r.run, i = (n = this._options) == null ? void 0 : n.recycle;
800
- this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && i === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
807
+ var i, n;
808
+ const t = (i = this._options) == null ? void 0 : i.run, r = (n = this._options) == null ? void 0 : n.recycle;
809
+ this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && r === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
801
810
  }
802
811
  }
803
- const Lt = Le.createRef();
804
- class Ze extends Le.Component {
812
+ const Wt = Ve.createRef();
813
+ class et extends Ve.Component {
805
814
  constructor(e) {
806
- super(e), this.canvas = Le.createRef(), this.canvas = e.canvasRef || Lt;
815
+ super(e), this.canvas = Ve.createRef(), this.canvas = e.canvasRef || Wt;
807
816
  }
808
817
  componentDidMount() {
809
818
  if (this.canvas.current) {
810
- const e = He(this.props)[0];
811
- this.confetti = new Dt(this.canvas.current, e);
819
+ const e = Ke(this.props)[0];
820
+ this.confetti = new zt(this.canvas.current, e);
812
821
  }
813
822
  }
814
823
  componentDidUpdate() {
815
- const e = He(this.props)[0];
824
+ const e = Ke(this.props)[0];
816
825
  this.confetti && (this.confetti.options = e);
817
826
  }
818
827
  componentWillUnmount() {
819
828
  this.confetti && this.confetti.stop(), this.confetti = void 0;
820
829
  }
821
830
  render() {
822
- const [e, t] = He(this.props), i = {
831
+ const [e, t] = Ke(this.props), r = {
823
832
  zIndex: 2,
824
833
  position: "absolute",
825
834
  pointerEvents: "none",
@@ -829,41 +838,41 @@ class Ze extends Le.Component {
829
838
  right: 0,
830
839
  ...t.style
831
840
  };
832
- return f("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: i });
841
+ return s("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: r });
833
842
  }
834
843
  }
835
- Ze.defaultProps = {
836
- ...Xe
844
+ et.defaultProps = {
845
+ ...Je
837
846
  };
838
- Ze.displayName = "ReactConfetti";
839
- function He(o) {
840
- const e = {}, t = {}, i = {}, r = [
841
- ...Object.keys(Xe),
847
+ et.displayName = "ReactConfetti";
848
+ function Ke(o) {
849
+ const e = {}, t = {}, r = {}, i = [
850
+ ...Object.keys(Je),
842
851
  "confettiSource",
843
852
  "drawShape",
844
853
  "onConfettiComplete",
845
854
  "frameRate"
846
855
  ], n = ["canvasRef"];
847
- for (const u in o) {
848
- const c = o[u];
849
- r.includes(u) ? e[u] = c : n.includes(u) ? n[u] = c : i[u] = c;
856
+ for (const d in o) {
857
+ const c = o[d];
858
+ i.includes(d) ? e[d] = c : n.includes(d) ? n[d] = c : r[d] = c;
850
859
  }
851
- return [e, i, t];
860
+ return [e, r, t];
852
861
  }
853
- const $t = Le.forwardRef((o, e) => f(Ze, { canvasRef: e, ...o }));
862
+ const Ut = Ve.forwardRef((o, e) => s(et, { canvasRef: e, ...o }));
854
863
  /**
855
864
  * @license lucide-react v0.515.0 - ISC
856
865
  *
857
866
  * This source code is licensed under the ISC license.
858
867
  * See the LICENSE file in the root directory of this source tree.
859
868
  */
860
- const Vt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), qt = (o) => o.replace(
869
+ const jt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Gt = (o) => o.replace(
861
870
  /^([A-Z])|[\s-_]+(\w)/g,
862
- (e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
863
- ), mt = (o) => {
864
- const e = qt(o);
871
+ (e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
872
+ ), bt = (o) => {
873
+ const e = Gt(o);
865
874
  return e.charAt(0).toUpperCase() + e.slice(1);
866
- }, wt = (...o) => o.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), Ut = (o) => {
875
+ }, xt = (...o) => o.filter((e, t, r) => !!e && e.trim() !== "" && r.indexOf(e) === t).join(" ").trim(), Ht = (o) => {
867
876
  for (const e in o)
868
877
  if (e.startsWith("aria-") || e === "role" || e === "title")
869
878
  return !0;
@@ -874,7 +883,7 @@ const Vt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), qt = (
874
883
  * This source code is licensed under the ISC license.
875
884
  * See the LICENSE file in the root directory of this source tree.
876
885
  */
877
- var Wt = {
886
+ var Qt = {
878
887
  xmlns: "http://www.w3.org/2000/svg",
879
888
  width: 24,
880
889
  height: 24,
@@ -891,31 +900,31 @@ var Wt = {
891
900
  * This source code is licensed under the ISC license.
892
901
  * See the LICENSE file in the root directory of this source tree.
893
902
  */
894
- const Gt = bt(
903
+ const Kt = wt(
895
904
  ({
896
905
  color: o = "currentColor",
897
906
  size: e = 24,
898
907
  strokeWidth: t = 2,
899
- absoluteStrokeWidth: i,
900
- className: r = "",
908
+ absoluteStrokeWidth: r,
909
+ className: i = "",
901
910
  children: n,
902
- iconNode: u,
911
+ iconNode: d,
903
912
  ...c
904
- }, b) => Ye(
913
+ }, I) => Ze(
905
914
  "svg",
906
915
  {
907
- ref: b,
908
- ...Wt,
916
+ ref: I,
917
+ ...Qt,
909
918
  width: e,
910
919
  height: e,
911
920
  stroke: o,
912
- strokeWidth: i ? Number(t) * 24 / Number(e) : t,
913
- className: wt("lucide", r),
914
- ...!n && !Ut(c) && { "aria-hidden": "true" },
921
+ strokeWidth: r ? Number(t) * 24 / Number(e) : t,
922
+ className: xt("lucide", i),
923
+ ...!n && !Ht(c) && { "aria-hidden": "true" },
915
924
  ...c
916
925
  },
917
926
  [
918
- ...u.map(([H, x]) => Ye(H, x)),
927
+ ...d.map(([G, x]) => Ze(G, x)),
919
928
  ...Array.isArray(n) ? n : [n]
920
929
  ]
921
930
  )
@@ -926,20 +935,20 @@ const Gt = bt(
926
935
  * This source code is licensed under the ISC license.
927
936
  * See the LICENSE file in the root directory of this source tree.
928
937
  */
929
- const Ht = (o, e) => {
930
- const t = bt(
931
- ({ className: i, ...r }, n) => Ye(Gt, {
938
+ const tt = (o, e) => {
939
+ const t = wt(
940
+ ({ className: r, ...i }, n) => Ze(Kt, {
932
941
  ref: n,
933
942
  iconNode: e,
934
- className: wt(
935
- `lucide-${Vt(mt(o))}`,
943
+ className: xt(
944
+ `lucide-${jt(bt(o))}`,
936
945
  `lucide-${o}`,
937
- i
946
+ r
938
947
  ),
939
- ...r
948
+ ...i
940
949
  })
941
950
  );
942
- return t.displayName = mt(o), t;
951
+ return t.displayName = bt(o), t;
943
952
  };
944
953
  /**
945
954
  * @license lucide-react v0.515.0 - ISC
@@ -947,306 +956,324 @@ const Ht = (o, e) => {
947
956
  * This source code is licensed under the ISC license.
948
957
  * See the LICENSE file in the root directory of this source tree.
949
958
  */
950
- const Qt = [
959
+ const Yt = [
960
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
961
+ ["path", { d: "M12 5v14", key: "s699le" }]
962
+ ], yt = tt("plus", Yt);
963
+ /**
964
+ * @license lucide-react v0.515.0 - ISC
965
+ *
966
+ * This source code is licensed under the ISC license.
967
+ * See the LICENSE file in the root directory of this source tree.
968
+ */
969
+ const Xt = [
951
970
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
952
971
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
953
- ], Yt = Ht("search", Qt), Kt = "_backdrop_jhu8z_1", Xt = "_celebrationOverlay_jhu8z_14", Zt = "_celebrationChip_jhu8z_23", Jt = "_backdropOpen_jhu8z_74", en = "_backdropClosed_jhu8z_78", tn = "_panel_jhu8z_82", nn = "_panelOpen_jhu8z_102", rn = "_panelClosed_jhu8z_106", on = "_header_jhu8z_145", an = "_headerCenter_jhu8z_154", sn = "_title_jhu8z_162", cn = "_searchIconButton_jhu8z_171", ln = "_headerTitleWrap_jhu8z_193", un = "_headerSearchWrap_jhu8z_197", dn = "_headerSearchOpen_jhu8z_209", hn = "_searchBar_jhu8z_221", fn = "_searchInput_jhu8z_233", mn = "_searchClearButton_jhu8z_254", pn = "_closeButton_jhu8z_276", bn = "_body_jhu8z_309", _n = "_muted_jhu8z_314", wn = "_error_jhu8z_319", yn = "_variants_jhu8z_324", gn = "_variantList_jhu8z_328", vn = "_variantRow_jhu8z_336", xn = "_variantRowSoldOut_jhu8z_344", Cn = "_variantLeft_jhu8z_348", In = "_addToBundleButton_jhu8z_355", Sn = "_soldOutContainer_jhu8z_383", Bn = "_soldOut_jhu8z_383", Nn = "_variantThumb_jhu8z_400", Tn = "_variantThumbImg_jhu8z_410", On = "_variantThumbFallback_jhu8z_417", Pn = "_variantInfo_jhu8z_427", zn = "_variantName_jhu8z_431", kn = "_variantMeta_jhu8z_440", An = "_variantPriceRow_jhu8z_448", En = "_variantCompareAt_jhu8z_455", Rn = "_variantPrice_jhu8z_448", jn = "_qtyControls_jhu8z_466", Mn = "_qtyButton_jhu8z_472", Fn = "_qtyValue_jhu8z_497", Dn = "_footer_jhu8z_504", Ln = "_poweredBy_jhu8z_511", $n = "_boxSummaryWindow_jhu8z_523", Vn = "_boxSummaryRow_jhu8z_540", qn = "_boxSlot_jhu8z_548", Un = "_boxItem_jhu8z_557", Wn = "_boxItemClickable_jhu8z_569", Gn = "_boxThresholdLabel_jhu8z_578", Hn = "_boxItemPlaceholder_jhu8z_589", Qn = "_boxItemFilled_jhu8z_595", Yn = "_boxItemThreshold_jhu8z_601", Kn = "_boxItemDiscountText_jhu8z_609", Xn = "_boxItemPlus_jhu8z_617", Zn = "_boxItemImage_jhu8z_624", Jn = "_boxItemFallback_jhu8z_631", er = "_ctaButtonGroup_jhu8z_642", tr = "_ctaButtonGroupAnimating_jhu8z_649", nr = "_cta_jhu8z_642", rr = "_ctaDualLeft_jhu8z_677", ir = "_ctaDualLeftAnimating_jhu8z_695", or = "_ctaDualRight_jhu8z_708", ar = "_ctaDualRightAnimating_jhu8z_724", sr = "_ctaTotals_jhu8z_735", cr = "_ctaDiscountBadge_jhu8z_743", lr = "_ctaTotalsWrap_jhu8z_757", ur = "_ctaTotalsWrapVisible_jhu8z_770", dr = "_ctaTotalsStrike_jhu8z_777", hr = "_ctaTotalsPrice_jhu8z_784", l = {
954
- backdrop: Kt,
955
- celebrationOverlay: Xt,
956
- celebrationChip: Zt,
957
- backdropOpen: Jt,
958
- backdropClosed: en,
959
- panel: tn,
960
- panelOpen: nn,
961
- panelClosed: rn,
962
- header: on,
963
- headerCenter: an,
964
- title: sn,
965
- searchIconButton: cn,
966
- headerTitleWrap: ln,
967
- headerSearchWrap: un,
968
- headerSearchOpen: dn,
969
- searchBar: hn,
970
- searchInput: fn,
971
- searchClearButton: mn,
972
- closeButton: pn,
973
- body: bn,
974
- muted: _n,
975
- error: wn,
976
- variants: yn,
977
- variantList: gn,
978
- variantRow: vn,
979
- variantRowSoldOut: xn,
980
- variantLeft: Cn,
981
- addToBundleButton: In,
982
- soldOutContainer: Sn,
983
- soldOut: Bn,
984
- variantThumb: Nn,
985
- variantThumbImg: Tn,
986
- variantThumbFallback: On,
987
- variantInfo: Pn,
988
- variantName: zn,
989
- variantMeta: kn,
990
- variantPriceRow: An,
972
+ ], Zt = tt("search", Xt);
973
+ /**
974
+ * @license lucide-react v0.515.0 - ISC
975
+ *
976
+ * This source code is licensed under the ISC license.
977
+ * See the LICENSE file in the root directory of this source tree.
978
+ */
979
+ const Jt = [
980
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
981
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
982
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
983
+ ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
984
+ ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
985
+ ], en = tt("trash-2", Jt), tn = "_backdrop_i1rsh_1", nn = "_celebrationOverlay_i1rsh_14", rn = "_celebrationChip_i1rsh_23", an = "_backdropOpen_i1rsh_74", on = "_backdropClosed_i1rsh_78", sn = "_panel_i1rsh_82", ln = "_panelOpen_i1rsh_103", cn = "_panelClosed_i1rsh_107", un = "_header_i1rsh_146", dn = "_headerCenter_i1rsh_155", hn = "_title_i1rsh_163", mn = "_searchIconButton_i1rsh_172", fn = "_headerTitleWrap_i1rsh_194", pn = "_headerSearchWrap_i1rsh_198", _n = "_headerSearchOpen_i1rsh_210", bn = "_searchBar_i1rsh_222", yn = "_searchInput_i1rsh_234", vn = "_searchClearButton_i1rsh_255", wn = "_closeButton_i1rsh_277", gn = "_body_i1rsh_310", xn = "_muted_i1rsh_315", In = "_error_i1rsh_320", Cn = "_variants_i1rsh_325", Nn = "_variantList_i1rsh_329", Sn = "_variantRow_i1rsh_337", Bn = "_variantRowSoldOut_i1rsh_345", Tn = "_variantLeft_i1rsh_349", Rn = "_addToBundleButton_i1rsh_356", kn = "_soldOutContainer_i1rsh_384", Pn = "_soldOut_i1rsh_384", On = "_variantThumb_i1rsh_401", Mn = "_variantThumbImg_i1rsh_411", Fn = "_variantThumbFallback_i1rsh_418", An = "_variantInfo_i1rsh_428", Ln = "_variantName_i1rsh_432", Dn = "_variantMeta_i1rsh_441", $n = "_variantPriceRow_i1rsh_449", En = "_variantCompareAt_i1rsh_456", qn = "_variantPrice_i1rsh_449", Vn = "_qtyControls_i1rsh_467", zn = "_qtyButton_i1rsh_473", Wn = "_qtyValue_i1rsh_498", Un = "_footer_i1rsh_505", jn = "_poweredBy_i1rsh_513", Gn = "_boxSummaryWindow_i1rsh_525", Hn = "_boxSummaryRow_i1rsh_543", Qn = "_boxSlot_i1rsh_551", Kn = "_boxItem_i1rsh_560", Yn = "_boxItemClickable_i1rsh_572", Xn = "_boxThresholdLabel_i1rsh_581", Zn = "_boxItemPlaceholder_i1rsh_592", Jn = "_boxItemFilled_i1rsh_598", ei = "_boxItemThreshold_i1rsh_604", ti = "_boxItemDiscountText_i1rsh_612", ni = "_boxItemPlus_i1rsh_620", ii = "_boxItemImage_i1rsh_627", ri = "_boxItemFallback_i1rsh_634", ai = "_ctaButtonGroup_i1rsh_645", oi = "_ctaButtonGroupAnimating_i1rsh_652", si = "_cta_i1rsh_645", li = "_ctaDualLeft_i1rsh_680", ci = "_ctaDualLeftAnimating_i1rsh_698", ui = "_ctaDualRight_i1rsh_711", di = "_ctaDualRightAnimating_i1rsh_727", hi = "_ctaTotals_i1rsh_738", mi = "_ctaDiscountBadge_i1rsh_746", fi = "_ctaTotalsWrap_i1rsh_760", pi = "_ctaTotalsWrapVisible_i1rsh_773", _i = "_ctaTotalsStrike_i1rsh_780", bi = "_ctaTotalsPrice_i1rsh_787", h = {
986
+ backdrop: tn,
987
+ celebrationOverlay: nn,
988
+ celebrationChip: rn,
989
+ backdropOpen: an,
990
+ backdropClosed: on,
991
+ panel: sn,
992
+ panelOpen: ln,
993
+ panelClosed: cn,
994
+ header: un,
995
+ headerCenter: dn,
996
+ title: hn,
997
+ searchIconButton: mn,
998
+ headerTitleWrap: fn,
999
+ headerSearchWrap: pn,
1000
+ headerSearchOpen: _n,
1001
+ searchBar: bn,
1002
+ searchInput: yn,
1003
+ searchClearButton: vn,
1004
+ closeButton: wn,
1005
+ body: gn,
1006
+ muted: xn,
1007
+ error: In,
1008
+ variants: Cn,
1009
+ variantList: Nn,
1010
+ variantRow: Sn,
1011
+ variantRowSoldOut: Bn,
1012
+ variantLeft: Tn,
1013
+ addToBundleButton: Rn,
1014
+ soldOutContainer: kn,
1015
+ soldOut: Pn,
1016
+ variantThumb: On,
1017
+ variantThumbImg: Mn,
1018
+ variantThumbFallback: Fn,
1019
+ variantInfo: An,
1020
+ variantName: Ln,
1021
+ variantMeta: Dn,
1022
+ variantPriceRow: $n,
991
1023
  variantCompareAt: En,
992
- variantPrice: Rn,
993
- qtyControls: jn,
994
- qtyButton: Mn,
995
- qtyValue: Fn,
996
- footer: Dn,
997
- poweredBy: Ln,
998
- boxSummaryWindow: $n,
999
- boxSummaryRow: Vn,
1000
- boxSlot: qn,
1001
- boxItem: Un,
1002
- boxItemClickable: Wn,
1003
- boxThresholdLabel: Gn,
1004
- boxItemPlaceholder: Hn,
1005
- boxItemFilled: Qn,
1006
- boxItemThreshold: Yn,
1007
- boxItemDiscountText: Kn,
1008
- boxItemPlus: Xn,
1009
- boxItemImage: Zn,
1010
- boxItemFallback: Jn,
1011
- ctaButtonGroup: er,
1012
- ctaButtonGroupAnimating: tr,
1013
- cta: nr,
1014
- ctaDualLeft: rr,
1015
- ctaDualLeftAnimating: ir,
1016
- ctaDualRight: or,
1017
- ctaDualRightAnimating: ar,
1018
- ctaTotals: sr,
1019
- ctaDiscountBadge: cr,
1020
- ctaTotalsWrap: lr,
1021
- ctaTotalsWrapVisible: ur,
1022
- ctaTotalsStrike: dr,
1023
- ctaTotalsPrice: hr
1024
+ variantPrice: qn,
1025
+ qtyControls: Vn,
1026
+ qtyButton: zn,
1027
+ qtyValue: Wn,
1028
+ footer: Un,
1029
+ poweredBy: jn,
1030
+ boxSummaryWindow: Gn,
1031
+ boxSummaryRow: Hn,
1032
+ boxSlot: Qn,
1033
+ boxItem: Kn,
1034
+ boxItemClickable: Yn,
1035
+ boxThresholdLabel: Xn,
1036
+ boxItemPlaceholder: Zn,
1037
+ boxItemFilled: Jn,
1038
+ boxItemThreshold: ei,
1039
+ boxItemDiscountText: ti,
1040
+ boxItemPlus: ni,
1041
+ boxItemImage: ii,
1042
+ boxItemFallback: ri,
1043
+ ctaButtonGroup: ai,
1044
+ ctaButtonGroupAnimating: oi,
1045
+ cta: si,
1046
+ ctaDualLeft: li,
1047
+ ctaDualLeftAnimating: ci,
1048
+ ctaDualRight: ui,
1049
+ ctaDualRightAnimating: di,
1050
+ ctaTotals: hi,
1051
+ ctaDiscountBadge: mi,
1052
+ ctaTotalsWrap: fi,
1053
+ ctaTotalsWrapVisible: pi,
1054
+ ctaTotalsStrike: _i,
1055
+ ctaTotalsPrice: bi
1024
1056
  };
1025
- function yr(o) {
1026
- var at, st;
1057
+ function Dr(o) {
1058
+ var ct, ut;
1027
1059
  const {
1028
1060
  isOpen: e,
1029
1061
  close: t,
1030
- loading: i,
1031
- submitting: r,
1062
+ loading: r,
1063
+ submitting: i,
1032
1064
  error: n,
1033
- currencyCode: u,
1065
+ currencyCode: d,
1034
1066
  config: c,
1035
- eligibleVariants: b,
1036
- selections: H,
1067
+ eligibleVariants: I,
1068
+ selections: G,
1037
1069
  selectionOrder: x,
1038
- setQuantity: M,
1039
- bundleSize: B,
1040
- minRequired: Z,
1041
- canSubmit: L,
1042
- submit: Q,
1043
- submitAndCheckout: J
1044
- } = Ke(), [z, F] = A(!1), [V, Ie] = A(""), m = W(null), pe = W(null), ie = W(null), [Y, Pe] = A(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [ze, ke] = A(0), [be, te] = A(null), [Ae, Se] = A(!1), ee = W(null), ne = W(B), Be = 7e3, [_e, oe] = A(0), [we, ce] = A(null), [le, ye] = A(!1), ae = W(null), Ee = 2800, Re = [
1070
+ setQuantity: A,
1071
+ bundleSize: P,
1072
+ minRequired: z,
1073
+ canSubmit: H,
1074
+ submit: te,
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), [ie, oe] = j(null), [we, ge] = j(!1), X = J(null), se = J(P), ke = 7e3, [xe, he] = j(0), [ye, me] = j(null), [fe, pe] = j(!1), le = J(null), m = 2800, p = [
1045
1077
  "#2563eb",
1046
1078
  "#3b82f6",
1047
1079
  "#60a5fa",
1048
1080
  "#93c5fd",
1049
1081
  "#bae6fd",
1050
1082
  "#e0f2fe"
1051
- ], d = P(() => {
1052
- var s;
1053
- const a = (s = c == null ? void 0 : c.styleSettings) == null ? void 0 : s.confettiColors;
1054
- return Array.isArray(a) && a.length >= 6 ? a.slice(0, 6).map(
1055
- (h, w) => typeof h == "string" && h.trim() ? h : Re[w]
1056
- ) : [...Re];
1057
- }, [(at = c == null ? void 0 : c.styleSettings) == null ? void 0 : at.confettiColors]), y = (a) => {
1058
- const s = Number.parseFloat(a);
1059
- return Number.isFinite(s) ? String(Math.round(s)) : a;
1060
- }, E = (a) => {
1061
- const s = (a ?? []).filter((h) => {
1062
- var S, C;
1063
- const w = (S = h == null ? void 0 : h.name) == null ? void 0 : S.trim(), _ = (C = h == null ? void 0 : h.value) == null ? void 0 : C.trim();
1064
- return !(!w || !_ || w.toLowerCase() === "title");
1083
+ ], a = k(() => {
1084
+ var u;
1085
+ const l = (u = c == null ? void 0 : c.styleSettings) == null ? void 0 : u.confettiColors;
1086
+ return Array.isArray(l) && l.length >= 6 ? l.slice(0, 6).map(
1087
+ (v, N) => typeof v == "string" && v.trim() ? v : p[N]
1088
+ ) : [...p];
1089
+ }, [(ct = c == null ? void 0 : c.styleSettings) == null ? void 0 : ct.confettiColors]), _ = (l) => {
1090
+ const u = Number.parseFloat(l);
1091
+ return Number.isFinite(u) ? String(Math.round(u)) : l;
1092
+ }, g = (l) => {
1093
+ const u = (l ?? []).filter((v) => {
1094
+ var F, M;
1095
+ const N = (F = v == null ? void 0 : v.name) == null ? void 0 : F.trim(), C = (M = v == null ? void 0 : v.value) == null ? void 0 : M.trim();
1096
+ return !(!N || !C || N.toLowerCase() === "title");
1065
1097
  });
1066
- return s.length ? s.map((h) => `${h.name}: ${h.value}`).join(" · ") : null;
1067
- }, p = (a) => {
1068
- var s;
1069
- return ((s = a.product) == null ? void 0 : s.title) ?? a.displayName ?? a.title;
1070
- }, R = (a) => {
1071
- const s = p(a), h = E(a.selectedOptions);
1072
- return [s, h].filter(Boolean).join(" — ");
1073
- }, [T, q] = A(e), I = W(null), D = (a) => {
1074
- const s = Number(a);
1075
- if (!Number.isFinite(s)) return a;
1076
- if (u)
1098
+ return u.length ? u.map((v) => `${v.name}: ${v.value}`).join(" · ") : null;
1099
+ }, b = (l) => {
1100
+ var u;
1101
+ return ((u = l.product) == null ? void 0 : u.title) ?? l.displayName ?? l.title;
1102
+ }, y = (l) => {
1103
+ const u = b(l), v = g(l.selectedOptions);
1104
+ return [u, v].filter(Boolean).join(" — ");
1105
+ }, [R, U] = j(e), B = J(null), E = (l) => {
1106
+ const u = Number(l);
1107
+ if (!Number.isFinite(u)) return l;
1108
+ if (d)
1077
1109
  try {
1078
- return new Intl.NumberFormat(void 0, { style: "currency", currency: u }).format(s);
1110
+ return new Intl.NumberFormat(void 0, { style: "currency", currency: d }).format(u);
1079
1111
  } catch {
1080
1112
  }
1081
- return `$${s.toFixed(2)}`;
1082
- }, K = ((st = c == null ? void 0 : c.title) == null ? void 0 : st.trim()) || "Build your bundle", ue = P(() => {
1083
- const a = Number((c == null ? void 0 : c.maxBundleSize) ?? NaN), s = Number.isFinite(a) ? Math.floor(a) : 100;
1084
- return Math.max(2, Math.min(100, s));
1085
- }, [c == null ? void 0 : c.maxBundleSize]), ge = B >= ue, de = P(() => [...b].sort((a, s) => a.displayName.localeCompare(s.displayName)), [b]), U = P(() => {
1086
- const a = V.trim().toLowerCase();
1087
- if (!a) return de;
1088
- const s = a.split(/\s+/).filter(Boolean), h = (w) => {
1089
- var C;
1090
- const _ = [];
1091
- _.push(w.displayName), (C = w.product) != null && C.title && _.push(w.product.title);
1092
- for (const O of w.selectedOptions ?? [])
1093
- _.push(O.name), _.push(O.value);
1094
- const S = _.join(" ").toLowerCase();
1095
- return s.every((O) => S.includes(O));
1113
+ return `$${u.toFixed(2)}`;
1114
+ }, K = ((ut = c == null ? void 0 : c.title) == null ? void 0 : ut.trim()) || "Build your bundle", _e = k(() => {
1115
+ const l = Number((c == null ? void 0 : c.maxBundleSize) ?? NaN), u = Number.isFinite(l) ? Math.floor(l) : 100;
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]), re = k(() => {
1118
+ const l = ee.trim().toLowerCase();
1119
+ if (!l) return Se;
1120
+ const u = l.split(/\s+/).filter(Boolean), v = (N) => {
1121
+ var M;
1122
+ const C = [];
1123
+ C.push(N.displayName), (M = N.product) != null && M.title && C.push(N.product.title);
1124
+ for (const $ of N.selectedOptions ?? [])
1125
+ C.push($.name), C.push($.value);
1126
+ const F = C.join(" ").toLowerCase();
1127
+ return u.every(($) => F.includes($));
1096
1128
  };
1097
- return de.filter(h);
1098
- }, [V, de]), v = P(() => [...(c == null ? void 0 : c.rules) ?? []].sort((a, s) => a.minBundleSize - s.minBundleSize), [c == null ? void 0 : c.rules]), N = P(() => Math.max(0, Z - B), [B, Z]), g = P(() => {
1099
- let a = null;
1100
- for (const s of v)
1101
- B >= s.minBundleSize && (a = s);
1102
- return a;
1103
- }, [B, v]), $ = P(() => {
1104
- if (!g) return null;
1105
- const a = Number.parseFloat(g.discountPercent);
1106
- return !Number.isFinite(a) || a <= 0 ? null : a;
1107
- }, [g]), je = P(() => {
1108
- const a = v[0];
1109
- if (!a) return null;
1110
- const s = Number.parseFloat(a.discountPercent);
1111
- return !Number.isFinite(s) || s <= 0 ? null : s;
1112
- }, [v]), ve = $ ?? je, he = P(() => {
1113
- const a = new Map(b.map((h) => [h.id, h]));
1114
- let s = 0;
1115
- for (const [h, w] of Object.entries(H)) {
1116
- const _ = w ?? 0;
1117
- if (_ <= 0) continue;
1118
- const S = a.get(h), C = Number(S == null ? void 0 : S.price);
1119
- Number.isFinite(C) && (s += C * _);
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(() => {
1131
+ let l = null;
1132
+ for (const u of O)
1133
+ P >= u.minBundleSize && (l = u);
1134
+ return l;
1135
+ }, [P, O]), Z = k(() => {
1136
+ if (!T) return null;
1137
+ const l = Number.parseFloat(T.discountPercent);
1138
+ return !Number.isFinite(l) || l <= 0 ? null : l;
1139
+ }, [T]), Fe = O[0], Me = !!(Fe && P >= Fe.minBundleSize), Be = k(() => {
1140
+ const l = new Map(I.map((v) => [v.id, v]));
1141
+ let u = 0;
1142
+ for (const [v, N] of Object.entries(G)) {
1143
+ const C = N ?? 0;
1144
+ if (C <= 0) continue;
1145
+ const F = l.get(v), M = Number(F == null ? void 0 : F.price);
1146
+ Number.isFinite(M) && (u += M * C);
1120
1147
  }
1121
- return Math.round(s * 100) / 100;
1122
- }, [b, H]), yt = P(() => {
1123
- if (!$) return he;
1124
- const a = he * (1 - $ / 100);
1125
- return Math.round(a * 100) / 100;
1126
- }, [$, he]), Je = P(() => v.length ? Math.max(...v.map((a) => a.minBundleSize)) : 0, [v]), $e = P(() => {
1127
- const a = new Map(b.map((s) => [s.id, s]));
1128
- return x.map((s) => a.get(s)).filter((s) => !!s);
1129
- }, [b, x]), gt = P(() => {
1130
- var s;
1131
- const a = /* @__PURE__ */ new Map();
1132
- for (const h of v) {
1133
- const w = Math.max(0, h.minBundleSize - 1);
1134
- a.set(w, {
1135
- discountPercent: h.discountPercent,
1136
- minBundleSize: h.minBundleSize,
1137
- label: ((s = h.label) == null ? void 0 : s.trim()) || `Buy ${h.minBundleSize}+`
1148
+ return Math.round(u * 100) / 100;
1149
+ }, [I, G]), It = k(() => {
1150
+ if (!Z) return Be;
1151
+ const l = Be * (1 - Z / 100);
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(() => {
1154
+ const l = new Map(I.map((u) => [u.id, u]));
1155
+ return x.map((u) => l.get(u)).filter((u) => !!u);
1156
+ }, [I, x]), Ct = k(() => {
1157
+ var u;
1158
+ const l = /* @__PURE__ */ new Map();
1159
+ for (const v of O) {
1160
+ const N = Math.max(0, v.minBundleSize - 1);
1161
+ l.set(N, {
1162
+ discountPercent: v.discountPercent,
1163
+ minBundleSize: v.minBundleSize,
1164
+ label: ((u = v.label) == null ? void 0 : u.trim()) || `Buy ${v.minBundleSize}+`
1138
1165
  });
1139
1166
  }
1140
- return a;
1141
- }, [v]), vt = P(() => Math.max(Je || Z, $e.length), [$e.length, Je, Z]), [Ve, et] = A(!0), tt = W(N);
1142
- j(() => {
1167
+ return l;
1168
+ }, [O]), Nt = k(() => Math.max(nt || z, We.length), [We.length, nt, z]), [Ue, it] = j(!0), rt = J(q);
1169
+ V(() => {
1143
1170
  if (((c == null ? void 0 : c.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
1144
- const s = tt.current > 0;
1145
- et(!(s && N === 0));
1171
+ const u = rt.current > 0;
1172
+ it(!(u && q === 0));
1146
1173
  }
1147
- tt.current = N;
1148
- }, [N, c == null ? void 0 : c.ctaButtonMode]);
1149
- const qe = W(null), nt = W(null), rt = W(null), it = W(B), ot = (a) => {
1150
- const s = nt.current;
1151
- if (!s) return;
1152
- const h = s.querySelector(`[data-variant-row="${a}"]`);
1153
- if (!h) return;
1154
- const w = s.getBoundingClientRect(), _ = h.getBoundingClientRect(), S = 8;
1155
- if (_.top >= w.top + S && _.bottom <= w.bottom - S) return;
1156
- const O = Math.max(0, s.scrollHeight - s.clientHeight), X = _.top - w.top + _.height / 2, re = s.scrollTop + X - s.clientHeight / 2, se = Math.min(O, Math.max(0, re));
1157
- s.scrollTo({ top: se, behavior: "smooth" });
1174
+ rt.current = q;
1175
+ }, [q, c == null ? void 0 : c.ctaButtonMode]);
1176
+ const je = J(null), at = J(null), ot = J(null), st = J(P), lt = (l) => {
1177
+ const u = at.current;
1178
+ if (!u) return;
1179
+ const v = u.querySelector(`[data-variant-row="${l}"]`);
1180
+ if (!v) return;
1181
+ const N = u.getBoundingClientRect(), C = v.getBoundingClientRect(), F = 8;
1182
+ if (C.top >= N.top + F && C.bottom <= N.bottom - F) return;
1183
+ const $ = Math.max(0, u.scrollHeight - u.clientHeight), ce = C.top - N.top + C.height / 2, ve = u.scrollTop + ce - u.clientHeight / 2, Ie = Math.min($, Math.max(0, ve));
1184
+ u.scrollTo({ top: Ie, behavior: "smooth" });
1158
1185
  };
1159
- return j(() => {
1186
+ return V(() => {
1160
1187
  if (!e) return;
1161
- const a = (s) => {
1162
- s.key === "Escape" && t();
1188
+ const l = (u) => {
1189
+ u.key === "Escape" && t();
1163
1190
  };
1164
- return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
1165
- }, [t, e]), j(() => {
1191
+ return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
1192
+ }, [t, e]), V(() => {
1166
1193
  if (typeof window > "u") return;
1167
- const a = () => Pe({ width: window.innerWidth, height: window.innerHeight });
1168
- return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
1169
- }, []), j(() => {
1170
- if (I.current != null && (window.clearTimeout(I.current), I.current = null), e) {
1171
- q(!0);
1194
+ const l = () => de({ width: window.innerWidth, height: window.innerHeight });
1195
+ return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
1196
+ }, []), V(() => {
1197
+ if (B.current != null && (window.clearTimeout(B.current), B.current = null), e) {
1198
+ U(!0);
1172
1199
  return;
1173
1200
  }
1174
- I.current = window.setTimeout(() => {
1175
- q(!1), I.current = null;
1201
+ B.current = window.setTimeout(() => {
1202
+ U(!1), B.current = null;
1176
1203
  }, 220);
1177
- }, [e]), j(() => () => {
1178
- I.current != null && window.clearTimeout(I.current);
1179
- }, []), j(() => () => {
1180
- ee.current != null && window.clearTimeout(ee.current);
1181
- }, []), j(() => () => {
1182
- ae.current != null && window.clearTimeout(ae.current);
1183
- }, []), j(() => {
1184
- if (!e || !z) return;
1185
- const a = requestAnimationFrame(() => {
1186
- var s;
1187
- return (s = m.current) == null ? void 0 : s.focus();
1204
+ }, [e]), V(() => () => {
1205
+ B.current != null && window.clearTimeout(B.current);
1206
+ }, []), V(() => () => {
1207
+ X.current != null && window.clearTimeout(X.current);
1208
+ }, []), V(() => () => {
1209
+ le.current != null && window.clearTimeout(le.current);
1210
+ }, []), V(() => {
1211
+ if (!e || !L) return;
1212
+ const l = requestAnimationFrame(() => {
1213
+ var u;
1214
+ return (u = w.current) == null ? void 0 : u.focus();
1188
1215
  });
1189
- return () => cancelAnimationFrame(a);
1190
- }, [e, z]), j(() => {
1191
- const a = it.current;
1192
- if (it.current = B, B <= a) return;
1193
- const s = rt.current;
1194
- if (!s) return;
1195
- const h = v.some((C) => C.minBundleSize === B), w = v.find((C) => C.minBundleSize > B), _ = w && h ? w.minBundleSize - 1 : w ? null : B - 1;
1196
- if (_ == null || _ < 0) return;
1197
- const S = requestAnimationFrame(() => {
1198
- const C = s.querySelector(`[data-box-slot="${_}"]`);
1199
- if (!C) return;
1200
- const O = s.getBoundingClientRect(), re = C.getBoundingClientRect().right - O.right;
1201
- if (re <= 1) return;
1202
- const se = Math.max(0, s.scrollWidth - s.clientWidth), xe = Math.min(se, Math.max(0, s.scrollLeft + re));
1203
- s.scrollTo({ left: xe, behavior: "smooth" });
1216
+ return () => cancelAnimationFrame(l);
1217
+ }, [e, L]), V(() => {
1218
+ const l = st.current;
1219
+ if (st.current = P, P <= l) return;
1220
+ const u = ot.current;
1221
+ if (!u) return;
1222
+ const v = O.some((M) => M.minBundleSize === P), N = O.find((M) => M.minBundleSize > P), C = N && v ? N.minBundleSize - 1 : N ? null : P - 1;
1223
+ if (C == null || C < 0) return;
1224
+ const F = requestAnimationFrame(() => {
1225
+ const M = u.querySelector(`[data-box-slot="${C}"]`);
1226
+ if (!M) return;
1227
+ const $ = u.getBoundingClientRect(), ve = M.getBoundingClientRect().right - $.right;
1228
+ if (ve <= 1) return;
1229
+ const Ie = Math.max(0, u.scrollWidth - u.clientWidth), Pe = Math.min(Ie, Math.max(0, u.scrollLeft + ve));
1230
+ u.scrollTo({ left: Pe, behavior: "smooth" });
1204
1231
  });
1205
- return () => cancelAnimationFrame(S);
1206
- }, [B, v]), j(() => {
1232
+ return () => cancelAnimationFrame(F);
1233
+ }, [P, O]), V(() => {
1207
1234
  if (!e) return;
1208
- const a = ne.current;
1209
- if (ne.current = B, B <= a) return;
1210
- const s = v.find((h) => h.minBundleSize === B);
1211
- s && (ce(`You received a ${y(s.discountPercent)}% discount!`), oe((h) => h + 1), ye(!0), ae.current != null && window.clearTimeout(ae.current), ae.current = window.setTimeout(() => {
1212
- ye(!1), ae.current = null;
1213
- }, Ee));
1214
- }, [B, e, v]), j(() => {
1215
- if (!e || !le || !we) return;
1216
- const a = requestAnimationFrame(() => {
1217
- var O;
1218
- const s = ie.current, h = s == null ? void 0 : s.getBoundingClientRect(), w = (O = qe.current) == null ? void 0 : O.getBoundingClientRect(), _ = h ? h.left + h.width / 2 : w ? w.left + w.width / 2 : window.innerWidth / 2, S = h ? h.top + h.height / 2 : w ? w.top + w.height / 2 : window.innerHeight / 2, C = {
1219
- x: _ - 2,
1220
- y: S - 2,
1235
+ const l = se.current;
1236
+ if (se.current = P, P <= l) return;
1237
+ const u = O.find((v) => v.minBundleSize === P);
1238
+ u && (me(`You received a ${_(u.discountPercent)}% discount!`), he((v) => v + 1), pe(!0), le.current != null && window.clearTimeout(le.current), le.current = window.setTimeout(() => {
1239
+ pe(!1), le.current = null;
1240
+ }, m));
1241
+ }, [P, e, O]), V(() => {
1242
+ if (!e || !fe || !ye) return;
1243
+ const l = requestAnimationFrame(() => {
1244
+ var $;
1245
+ const u = W.current, v = u == null ? void 0 : u.getBoundingClientRect(), N = ($ = je.current) == null ? void 0 : $.getBoundingClientRect(), C = v ? v.left + v.width / 2 : N ? N.left + N.width / 2 : window.innerWidth / 2, F = v ? v.top + v.height / 2 : N ? N.top + N.height / 2 : window.innerHeight / 2, M = {
1246
+ x: C - 2,
1247
+ y: F - 2,
1221
1248
  w: 4,
1222
1249
  h: 4
1223
1250
  };
1224
- te(C), ke((X) => X + 1), Se(!0), ee.current != null && window.clearTimeout(ee.current), ee.current = window.setTimeout(() => {
1225
- Se(!1), ee.current = null;
1226
- }, Be);
1251
+ oe(M), Ne((ce) => ce + 1), ge(!0), X.current != null && window.clearTimeout(X.current), X.current = window.setTimeout(() => {
1252
+ ge(!1), X.current = null;
1253
+ }, ke);
1227
1254
  });
1228
- return () => cancelAnimationFrame(a);
1229
- }, [_e, we, Be, le, e]), j(() => {
1230
- var a;
1231
- e && ((a = qe.current) == null || a.focus());
1232
- }, [e]), T ? /* @__PURE__ */ k(
1255
+ return () => cancelAnimationFrame(l);
1256
+ }, [xe, ye, ke, fe, e]), V(() => {
1257
+ var l;
1258
+ e && ((l = je.current) == null || l.focus());
1259
+ }, [e]), R ? /* @__PURE__ */ S(
1233
1260
  "div",
1234
1261
  {
1235
1262
  role: "dialog",
1236
1263
  "aria-modal": "true",
1237
1264
  "aria-label": "Bundle builder",
1238
- className: [l.backdrop, e ? l.backdropOpen : l.backdropClosed, o.className].filter(Boolean).join(" "),
1239
- onMouseDown: (a) => {
1240
- a.target === a.currentTarget && t();
1265
+ className: [h.backdrop, e ? h.backdropOpen : h.backdropClosed, o.className].filter(Boolean).join(" "),
1266
+ onMouseDown: (l) => {
1267
+ l.target === l.currentTarget && t();
1241
1268
  },
1242
1269
  children: [
1243
- Ae && be && Y.width > 0 && Y.height > 0 ? /* @__PURE__ */ f(
1244
- $t,
1270
+ we && ie && Y.width > 0 && Y.height > 0 ? /* @__PURE__ */ s(
1271
+ Ut,
1245
1272
  {
1246
1273
  width: Y.width,
1247
1274
  height: Y.height,
1248
- confettiSource: be,
1249
- colors: d,
1275
+ confettiSource: ie,
1276
+ colors: a,
1250
1277
  recycle: !1,
1251
1278
  numberOfPieces: 70,
1252
1279
  tweenDuration: 100,
@@ -1255,52 +1282,52 @@ function yr(o) {
1255
1282
  initialVelocityX: { min: -6, max: 6 },
1256
1283
  style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 2147483646 }
1257
1284
  },
1258
- ze
1285
+ Ce
1259
1286
  ) : null,
1260
- /* @__PURE__ */ k("aside", { ref: qe, className: [l.panel, e ? l.panelOpen : l.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
1261
- le && we ? /* @__PURE__ */ f("div", { className: l.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ f("div", { ref: ie, className: l.celebrationChip, children: we }, _e) }) : null,
1262
- /* @__PURE__ */ k("header", { className: [l.header, z ? l.headerSearchOpen : null].filter(Boolean).join(" "), children: [
1263
- /* @__PURE__ */ f(
1287
+ /* @__PURE__ */ S("aside", { ref: je, className: [h.panel, e ? h.panelOpen : h.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
1288
+ fe && ye ? /* @__PURE__ */ s("div", { className: h.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { ref: W, className: h.celebrationChip, children: ye }, xe) }) : null,
1289
+ /* @__PURE__ */ S("header", { className: [h.header, L ? h.headerSearchOpen : null].filter(Boolean).join(" "), children: [
1290
+ /* @__PURE__ */ s(
1264
1291
  "button",
1265
1292
  {
1266
1293
  type: "button",
1267
- className: l.searchIconButton,
1268
- "aria-label": z ? "Search (expanded)" : "Search",
1269
- "aria-expanded": z,
1294
+ className: h.searchIconButton,
1295
+ "aria-label": L ? "Search (expanded)" : "Search",
1296
+ "aria-expanded": L,
1270
1297
  onClick: () => {
1271
- F(!0);
1298
+ Q(!0);
1272
1299
  },
1273
- children: /* @__PURE__ */ f(Yt, { size: 18, "aria-hidden": "true" })
1300
+ children: /* @__PURE__ */ s(Zt, { size: 18, "aria-hidden": "true" })
1274
1301
  }
1275
1302
  ),
1276
- /* @__PURE__ */ k("div", { className: l.headerCenter, children: [
1277
- /* @__PURE__ */ f("div", { className: l.headerTitleWrap, "aria-hidden": z, children: /* @__PURE__ */ f("h2", { className: l.title, children: K }) }),
1278
- /* @__PURE__ */ f("div", { className: l.headerSearchWrap, "aria-hidden": !z, children: /* @__PURE__ */ k("div", { className: l.searchBar, children: [
1279
- /* @__PURE__ */ f(
1303
+ /* @__PURE__ */ S("div", { className: h.headerCenter, children: [
1304
+ /* @__PURE__ */ s("div", { className: h.headerTitleWrap, "aria-hidden": L, children: /* @__PURE__ */ s("h2", { className: h.title, children: K }) }),
1305
+ /* @__PURE__ */ s("div", { className: h.headerSearchWrap, "aria-hidden": !L, children: /* @__PURE__ */ S("div", { className: h.searchBar, children: [
1306
+ /* @__PURE__ */ s(
1280
1307
  "input",
1281
1308
  {
1282
- ref: m,
1283
- className: l.searchInput,
1309
+ ref: w,
1310
+ className: h.searchInput,
1284
1311
  type: "search",
1285
- value: V,
1312
+ value: ee,
1286
1313
  placeholder: "Search",
1287
- onChange: (a) => Ie(a.target.value),
1314
+ onChange: (l) => ue(l.target.value),
1288
1315
  onBlur: () => {
1289
- V.trim() === "" && F(!1);
1316
+ ee.trim() === "" && Q(!1);
1290
1317
  }
1291
1318
  }
1292
1319
  ),
1293
- V.trim() ? /* @__PURE__ */ f(
1320
+ ee.trim() ? /* @__PURE__ */ s(
1294
1321
  "button",
1295
1322
  {
1296
1323
  type: "button",
1297
- className: l.searchClearButton,
1298
- onMouseDown: (a) => {
1299
- a.preventDefault();
1324
+ className: h.searchClearButton,
1325
+ onMouseDown: (l) => {
1326
+ l.preventDefault();
1300
1327
  },
1301
1328
  onClick: () => {
1302
- var a;
1303
- Ie(""), (a = m.current) == null || a.focus();
1329
+ var l;
1330
+ ue(""), (l = w.current) == null || l.focus();
1304
1331
  },
1305
1332
  "aria-label": "Clear search",
1306
1333
  children: "Clear"
@@ -1308,168 +1335,168 @@ function yr(o) {
1308
1335
  ) : null
1309
1336
  ] }) })
1310
1337
  ] }),
1311
- /* @__PURE__ */ f("button", { type: "button", onClick: t, disabled: r, className: l.closeButton, "aria-label": "Close", children: "×" })
1338
+ /* @__PURE__ */ s("button", { type: "button", onClick: t, disabled: i, className: h.closeButton, "aria-label": "Close", children: "×" })
1312
1339
  ] }),
1313
- /* @__PURE__ */ k("div", { className: l.body, ref: nt, children: [
1314
- i ? /* @__PURE__ */ f("p", { className: l.muted, children: "Loading…" }) : null,
1315
- n ? /* @__PURE__ */ f("p", { className: l.error, children: n }) : null,
1316
- /* @__PURE__ */ f("div", { className: l.variants, children: /* @__PURE__ */ f("ul", { className: l.variantList, children: U.map((a) => {
1317
- var re, se, xe, Ne;
1318
- const s = H[a.id] ?? 0, h = p(a), w = E(a.selectedOptions), _ = R(a), S = ve, C = Number(a.price), O = S != null && Number.isFinite(S) && S > 0 && Number.isFinite(C), X = O ? Math.round(C * (1 - S / 100) * 100) / 100 : null;
1319
- return /* @__PURE__ */ k(
1340
+ /* @__PURE__ */ S("div", { className: h.body, ref: at, children: [
1341
+ r ? /* @__PURE__ */ s("p", { className: h.muted, children: "Loading…" }) : null,
1342
+ n ? /* @__PURE__ */ s("p", { className: h.error, children: n }) : null,
1343
+ /* @__PURE__ */ s("div", { className: h.variants, children: /* @__PURE__ */ s("ul", { className: h.variantList, children: re.map((l) => {
1344
+ var ve, Ie, Pe, Ae;
1345
+ const u = G[l.id] ?? 0, v = b(l), N = g(l.selectedOptions), C = y(l), F = Z, M = Number(l.price), $ = F != null && Number.isFinite(F) && F > 0 && Number.isFinite(M), ce = $ ? Math.round(M * (1 - F / 100) * 100) / 100 : null;
1346
+ return /* @__PURE__ */ S(
1320
1347
  "li",
1321
1348
  {
1322
- className: [l.variantRow, a.availableForSale === !1 && l.variantRowSoldOut].filter(Boolean).join(" "),
1323
- "data-variant-row": a.id,
1349
+ className: [h.variantRow, l.availableForSale === !1 && h.variantRowSoldOut].filter(Boolean).join(" "),
1350
+ "data-variant-row": l.id,
1324
1351
  children: [
1325
- /* @__PURE__ */ k("div", { className: l.variantLeft, children: [
1326
- /* @__PURE__ */ f("div", { className: l.variantThumb, "aria-hidden": "true", children: (re = a.image) != null && re.url ? /* @__PURE__ */ f(
1352
+ /* @__PURE__ */ S("div", { className: h.variantLeft, children: [
1353
+ /* @__PURE__ */ s("div", { className: h.variantThumb, "aria-hidden": "true", children: (ve = l.image) != null && ve.url ? /* @__PURE__ */ s(
1327
1354
  "img",
1328
1355
  {
1329
- className: l.variantThumbImg,
1330
- src: a.image.url,
1331
- alt: a.image.altText ?? _,
1356
+ className: h.variantThumbImg,
1357
+ src: l.image.url,
1358
+ alt: l.image.altText ?? C,
1332
1359
  loading: "lazy"
1333
1360
  }
1334
- ) : /* @__PURE__ */ f("div", { className: l.variantThumbFallback, children: ((Ne = (xe = (se = a.product) == null ? void 0 : se.title) == null ? void 0 : xe.slice(0, 1)) == null ? void 0 : Ne.toUpperCase()) ?? "•" }) }),
1335
- /* @__PURE__ */ k("div", { className: l.variantInfo, children: [
1336
- /* @__PURE__ */ f("div", { className: l.variantName, children: h }),
1337
- w ? /* @__PURE__ */ f("div", { className: l.variantMeta, children: w }) : null,
1338
- /* @__PURE__ */ k("div", { className: l.variantPriceRow, children: [
1339
- O ? /* @__PURE__ */ f("span", { className: l.variantCompareAt, children: D(Number.isFinite(C) ? C.toFixed(2) : a.price) }) : null,
1340
- /* @__PURE__ */ f("span", { className: l.variantPrice, children: D(
1341
- X != null ? X.toFixed(2) : Number.isFinite(C) ? C.toFixed(2) : a.price
1361
+ ) : /* @__PURE__ */ s("div", { className: h.variantThumbFallback, children: ((Ae = (Pe = (Ie = l.product) == null ? void 0 : Ie.title) == null ? void 0 : Pe.slice(0, 1)) == null ? void 0 : Ae.toUpperCase()) ?? "•" }) }),
1362
+ /* @__PURE__ */ S("div", { className: h.variantInfo, children: [
1363
+ /* @__PURE__ */ s("div", { className: h.variantName, children: v }),
1364
+ N ? /* @__PURE__ */ s("div", { className: h.variantMeta, children: N }) : null,
1365
+ /* @__PURE__ */ S("div", { className: h.variantPriceRow, children: [
1366
+ $ ? /* @__PURE__ */ s("span", { className: h.variantCompareAt, children: E(Number.isFinite(M) ? M.toFixed(2) : l.price) }) : null,
1367
+ /* @__PURE__ */ s("span", { className: h.variantPrice, children: E(
1368
+ ce != null ? ce.toFixed(2) : Number.isFinite(M) ? M.toFixed(2) : l.price
1342
1369
  ) })
1343
1370
  ] })
1344
1371
  ] })
1345
1372
  ] }),
1346
- a.availableForSale === !1 ? /* @__PURE__ */ f("div", { className: l.soldOutContainer, children: /* @__PURE__ */ k("span", { className: l.soldOut, "aria-label": `${_} is sold out`, children: [
1373
+ l.availableForSale === !1 ? /* @__PURE__ */ s("div", { className: h.soldOutContainer, children: /* @__PURE__ */ S("span", { className: h.soldOut, "aria-label": `${C} is sold out`, children: [
1347
1374
  "Sold",
1348
- /* @__PURE__ */ f("br", {}),
1375
+ /* @__PURE__ */ s("br", {}),
1349
1376
  "Out"
1350
- ] }) }) : s <= 0 ? /* @__PURE__ */ f(
1377
+ ] }) }) : u <= 0 ? /* @__PURE__ */ s(
1351
1378
  "button",
1352
1379
  {
1353
1380
  type: "button",
1354
- onClick: () => M(a.id, 1),
1355
- disabled: r || ge,
1356
- className: l.addToBundleButton,
1357
- "aria-label": `Add ${_} to bundle`,
1381
+ onClick: () => A(l.id, 1),
1382
+ disabled: i || be,
1383
+ className: h.addToBundleButton,
1384
+ "aria-label": `Add ${C} to bundle`,
1358
1385
  children: "Add"
1359
1386
  }
1360
- ) : /* @__PURE__ */ k("div", { className: l.qtyControls, children: [
1361
- /* @__PURE__ */ f(
1387
+ ) : /* @__PURE__ */ S("div", { className: h.qtyControls, children: [
1388
+ /* @__PURE__ */ s(
1362
1389
  "button",
1363
1390
  {
1364
1391
  type: "button",
1365
- onClick: () => M(a.id, s - 1),
1366
- disabled: r || s <= 0,
1367
- className: l.qtyButton,
1368
- "aria-label": `Decrease ${_}`,
1392
+ onClick: () => A(l.id, u - 1),
1393
+ disabled: i || u <= 0,
1394
+ className: h.qtyButton,
1395
+ "aria-label": `Decrease ${C}`,
1369
1396
  children: "−"
1370
1397
  }
1371
1398
  ),
1372
- /* @__PURE__ */ f("span", { className: l.qtyValue, "aria-label": `Quantity ${s}`, children: s }),
1373
- /* @__PURE__ */ f(
1399
+ /* @__PURE__ */ s("span", { className: h.qtyValue, "aria-label": `Quantity ${u}`, children: u }),
1400
+ /* @__PURE__ */ s(
1374
1401
  "button",
1375
1402
  {
1376
1403
  type: "button",
1377
- onClick: () => M(a.id, s + 1),
1378
- disabled: r || ge,
1379
- className: l.qtyButton,
1380
- "aria-label": `Increase ${_}`,
1404
+ onClick: () => A(l.id, u + 1),
1405
+ disabled: i || be,
1406
+ className: h.qtyButton,
1407
+ "aria-label": `Increase ${C}`,
1381
1408
  children: "+"
1382
1409
  }
1383
1410
  )
1384
1411
  ] })
1385
1412
  ]
1386
1413
  },
1387
- a.id
1414
+ l.id
1388
1415
  );
1389
1416
  }) }) })
1390
1417
  ] }),
1391
- /* @__PURE__ */ k("footer", { className: l.footer, ref: pe, children: [
1392
- /* @__PURE__ */ f("div", { className: l.boxSummaryWindow, ref: rt, children: /* @__PURE__ */ f("div", { className: l.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: vt }).map((a, s) => {
1393
- var re, se, xe, Ne;
1394
- const h = $e[s], w = gt.get(s), _ = !!h, S = !!w, C = S && !_, O = w ? `${w.discountPercent}% off` : null, X = _ ? h.displayName : `Slot ${s + 1}`;
1395
- return /* @__PURE__ */ k("div", { "data-box-slot": s, className: l.boxSlot, children: [
1396
- /* @__PURE__ */ f(
1418
+ /* @__PURE__ */ S("footer", { className: h.footer, ref: D, children: [
1419
+ /* @__PURE__ */ s("div", { className: h.boxSummaryWindow, ref: ot, children: /* @__PURE__ */ s("div", { className: h.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: Nt }).map((l, u) => {
1420
+ var ve, Ie, Pe, Ae;
1421
+ const v = We[u], N = Ct.get(u), C = !!v, F = !!N, M = F && !C, $ = N ? `${N.discountPercent}% off` : null, ce = C ? v.displayName : `Slot ${u + 1}`;
1422
+ return /* @__PURE__ */ S("div", { "data-box-slot": u, className: h.boxSlot, children: [
1423
+ /* @__PURE__ */ s(
1397
1424
  "div",
1398
1425
  {
1399
1426
  className: [
1400
- l.boxItem,
1401
- _ ? l.boxItemFilled : l.boxItemPlaceholder,
1402
- S ? l.boxItemThreshold : null,
1403
- _ ? l.boxItemClickable : null
1427
+ h.boxItem,
1428
+ C ? h.boxItemFilled : h.boxItemPlaceholder,
1429
+ F ? h.boxItemThreshold : null,
1430
+ C ? h.boxItemClickable : null
1404
1431
  ].filter(Boolean).join(" "),
1405
- role: _ ? "button" : void 0,
1406
- tabIndex: _ ? 0 : void 0,
1407
- onClick: _ ? () => ot(h.id) : void 0,
1408
- onKeyDown: _ ? (Ue) => {
1409
- (Ue.key === "Enter" || Ue.key === " ") && (Ue.preventDefault(), ot(h.id));
1432
+ role: C ? "button" : void 0,
1433
+ tabIndex: C ? 0 : void 0,
1434
+ onClick: C ? () => lt(v.id) : void 0,
1435
+ onKeyDown: C ? (Ge) => {
1436
+ (Ge.key === "Enter" || Ge.key === " ") && (Ge.preventDefault(), lt(v.id));
1410
1437
  } : void 0,
1411
- "aria-label": C && O ? `${X}. Unlocks ${O}.` : X,
1412
- title: C && O ? `${X} • Unlocks ${O}` : X,
1413
- children: _ ? (re = h.image) != null && re.url ? /* @__PURE__ */ f(
1438
+ "aria-label": M && $ ? `${ce}. Unlocks ${$}.` : ce,
1439
+ title: M && $ ? `${ce} • Unlocks ${$}` : ce,
1440
+ children: C ? (ve = v.image) != null && ve.url ? /* @__PURE__ */ s(
1414
1441
  "img",
1415
1442
  {
1416
- className: l.boxItemImage,
1417
- src: h.image.url,
1418
- alt: h.image.altText ?? h.displayName,
1443
+ className: h.boxItemImage,
1444
+ src: v.image.url,
1445
+ alt: v.image.altText ?? v.displayName,
1419
1446
  loading: "lazy"
1420
1447
  }
1421
- ) : /* @__PURE__ */ f("div", { className: l.boxItemFallback, "aria-hidden": "true", children: ((Ne = (xe = (se = h.product) == null ? void 0 : se.title) == null ? void 0 : xe.slice(0, 1)) == null ? void 0 : Ne.toUpperCase()) ?? "•" }) : C && O ? /* @__PURE__ */ f("div", { className: l.boxItemDiscountText, children: O }) : /* @__PURE__ */ f("div", { className: l.boxItemPlus, "aria-hidden": "true", children: "+" })
1448
+ ) : /* @__PURE__ */ s("div", { className: h.boxItemFallback, "aria-hidden": "true", children: ((Ae = (Pe = (Ie = v.product) == null ? void 0 : Ie.title) == null ? void 0 : Pe.slice(0, 1)) == null ? void 0 : Ae.toUpperCase()) ?? "•" }) : M && $ ? /* @__PURE__ */ s("div", { className: h.boxItemDiscountText, children: $ }) : /* @__PURE__ */ s("div", { className: h.boxItemPlus, "aria-hidden": "true", children: "+" })
1422
1449
  }
1423
1450
  ),
1424
- S ? /* @__PURE__ */ f("div", { className: l.boxThresholdLabel, children: w.label }) : null
1425
- ] }, s);
1451
+ F ? /* @__PURE__ */ s("div", { className: h.boxThresholdLabel, children: N.label }) : null
1452
+ ] }, u);
1426
1453
  }) }) }),
1427
- /* @__PURE__ */ f(
1454
+ /* @__PURE__ */ s(
1428
1455
  "div",
1429
1456
  {
1430
- className: [l.ctaTotalsWrap, N <= 0 ? l.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
1431
- "aria-hidden": N > 0,
1432
- children: /* @__PURE__ */ k("div", { className: l.ctaTotals, "aria-label": "Totals", children: [
1433
- ve ? /* @__PURE__ */ k("span", { className: l.ctaDiscountBadge, children: [
1434
- ve,
1457
+ className: [h.ctaTotalsWrap, Me ? h.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
1458
+ "aria-hidden": !Me,
1459
+ children: /* @__PURE__ */ S("div", { className: h.ctaTotals, "aria-label": "Totals", children: [
1460
+ Z ? /* @__PURE__ */ S("span", { className: h.ctaDiscountBadge, children: [
1461
+ Z,
1435
1462
  "% Discount"
1436
- ] }) : /* @__PURE__ */ f("span", {}),
1437
- /* @__PURE__ */ f("span", { children: $ ? /* @__PURE__ */ k(xt, { children: [
1438
- /* @__PURE__ */ f("span", { className: l.ctaTotalsStrike, children: D(he.toFixed(2)) }),
1463
+ ] }) : /* @__PURE__ */ s("span", {}),
1464
+ /* @__PURE__ */ s("span", { children: Z ? /* @__PURE__ */ S(Xe, { children: [
1465
+ /* @__PURE__ */ s("span", { className: h.ctaTotalsStrike, children: E(Be.toFixed(2)) }),
1439
1466
  " ",
1440
- /* @__PURE__ */ f("span", { className: l.ctaTotalsPrice, children: D(yt.toFixed(2)) })
1441
- ] }) : /* @__PURE__ */ f("span", { className: l.ctaTotalsPrice, children: D(he.toFixed(2)) }) })
1467
+ /* @__PURE__ */ s("span", { className: h.ctaTotalsPrice, children: E(It.toFixed(2)) })
1468
+ ] }) : /* @__PURE__ */ s("span", { className: h.ctaTotalsPrice, children: E(Be.toFixed(2)) }) })
1442
1469
  ] })
1443
1470
  }
1444
1471
  ),
1445
1472
  (() => {
1446
- const a = (c == null ? void 0 : c.ctaButtonMode) || "add_to_cart";
1447
- return a === "add_to_cart_checkout" ? N > 0 ? /* @__PURE__ */ f("button", { type: "button", onClick: Q, disabled: !L, className: l.cta, children: r ? "Adding…" : `Add ${N} more product${N === 1 ? "" : "s"}` }) : /* @__PURE__ */ k("div", { className: `${l.ctaButtonGroup} ${Ve ? l.ctaButtonGroupAnimating : ""}`, children: [
1448
- /* @__PURE__ */ f(
1473
+ const l = (c == null ? void 0 : c.ctaButtonMode) || "add_to_cart";
1474
+ return l === "add_to_cart_checkout" ? q > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children: i ? "Adding…" : `Add ${q} more product${q === 1 ? "" : "s"}` }) : /* @__PURE__ */ S("div", { className: `${h.ctaButtonGroup} ${Ue ? h.ctaButtonGroupAnimating : ""}`, children: [
1475
+ /* @__PURE__ */ s(
1449
1476
  "button",
1450
1477
  {
1451
1478
  type: "button",
1452
- onClick: Q,
1453
- disabled: !L,
1454
- className: `${l.ctaDualLeft} ${Ve ? l.ctaDualLeftAnimating : ""}`,
1455
- children: /* @__PURE__ */ f("span", { children: r ? "Adding…" : "Add to Basket" })
1479
+ onClick: te,
1480
+ disabled: !H,
1481
+ className: `${h.ctaDualLeft} ${Ue ? h.ctaDualLeftAnimating : ""}`,
1482
+ children: /* @__PURE__ */ s("span", { children: i ? "Adding…" : "Add to Basket" })
1456
1483
  }
1457
1484
  ),
1458
- /* @__PURE__ */ f(
1485
+ /* @__PURE__ */ s(
1459
1486
  "button",
1460
1487
  {
1461
1488
  type: "button",
1462
- onClick: J,
1463
- disabled: !L,
1464
- className: `${l.ctaDualRight} ${Ve ? l.ctaDualRightAnimating : ""}`,
1465
- children: /* @__PURE__ */ f("span", { children: r ? "Processing…" : "Checkout" })
1489
+ onClick: ne,
1490
+ disabled: !H,
1491
+ className: `${h.ctaDualRight} ${Ue ? h.ctaDualRightAnimating : ""}`,
1492
+ children: /* @__PURE__ */ s("span", { children: i ? "Processing…" : "Checkout" })
1466
1493
  }
1467
1494
  )
1468
- ] }) : a === "checkout" ? /* @__PURE__ */ f("button", { type: "button", onClick: J, disabled: !L, className: l.cta, children: r ? "Processing…" : N > 0 ? `Add ${N} more product${N === 1 ? "" : "s"}` : "Checkout" }) : /* @__PURE__ */ f("button", { type: "button", onClick: Q, disabled: !L, className: l.cta, children: r ? "Adding…" : N > 0 ? `Add ${N} more product${N === 1 ? "" : "s"}` : "Add to Basket" });
1495
+ ] }) : l === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: ne, disabled: !H, className: h.cta, children: i ? "Processing…" : q > 0 ? `Add ${q} more product${q === 1 ? "" : "s"}` : "Checkout" }) : /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children: i ? "Adding…" : q > 0 ? `Add ${q} more product${q === 1 ? "" : "s"}` : "Add to Basket" });
1469
1496
  })(),
1470
- /* @__PURE__ */ k("div", { className: l.poweredBy, children: [
1497
+ /* @__PURE__ */ S("div", { className: h.poweredBy, children: [
1471
1498
  "powered by ",
1472
- /* @__PURE__ */ f("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
1499
+ /* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
1473
1500
  ] })
1474
1501
  ] })
1475
1502
  ] })
@@ -1477,18 +1504,388 @@ function yr(o) {
1477
1504
  }
1478
1505
  ) : null;
1479
1506
  }
1480
- function Qe(o) {
1507
+ const yi = "_panel_1n9m6_2", vi = "_header_1n9m6_20", wi = "_title_1n9m6_24", gi = "_status_1n9m6_32", xi = "_error_1n9m6_37", Ii = "_inactive_1n9m6_43", Ci = "_section_1n9m6_49", Ni = "_sectionTitle_1n9m6_54", Si = "_rulesVisual_1n9m6_107", Bi = "_rulesLabelsRow_1n9m6_114", Ti = "_rulesLinesRow_1n9m6_121", Ri = "_rulesLineLabelCell_1n9m6_128", ki = "_rulesLineLabel_1n9m6_128", Pi = "_rulesLine_1n9m6_121", Oi = "_rulesLineEmpty_1n9m6_162", Mi = "_rulesLineFilled_1n9m6_166", Fi = "_variants_1n9m6_170", Ai = "_variantList_1n9m6_178", Li = "_variantRow_1n9m6_186", Di = "_variantRowInteractive_1n9m6_198", $i = "_variantRowSelected_1n9m6_202", Ei = "_variantRowSoldOut_1n9m6_207", qi = "_variantMedia_1n9m6_211", Vi = "_variantContent_1n9m6_219", zi = "_variantHeader_1n9m6_227", Wi = "_variantTitle_1n9m6_233", Ui = "_variantImage_1n9m6_247", ji = "_variantImageFallback_1n9m6_255", Gi = "_variantMeta_1n9m6_268", Hi = "_variantPrice_1n9m6_273", Qi = "_variantFooterRow_1n9m6_279", Ki = "_variantActions_1n9m6_286", Yi = "_qtyActions_1n9m6_292", Xi = "_soldOut_1n9m6_343", Zi = "_qtyChip_1n9m6_351", Ji = "_qtyChipInteractive_1n9m6_366", er = "_qtyChipValue_1n9m6_370", tr = "_qtyChipPlus_1n9m6_376", nr = "_qtyChipClear_1n9m6_381", ir = "_qtyTrash_1n9m6_400", rr = "_footer_1n9m6_412", ar = "_boxSummaryWindow_1n9m6_417", or = "_boxSummaryRow_1n9m6_431", sr = "_boxSlot_1n9m6_439", lr = "_boxItem_1n9m6_448", cr = "_boxItemFilled_1n9m6_465", ur = "_boxItemPlaceholder_1n9m6_471", dr = "_boxItemThreshold_1n9m6_477", hr = "_boxItemClickable_1n9m6_485", mr = "_boxItemImage_1n9m6_494", fr = "_boxItemFallback_1n9m6_505", pr = "_boxItemPlus_1n9m6_518", _r = "_boxItemDiscountText_1n9m6_530", br = "_boxThresholdLabel_1n9m6_543", yr = "_totalsReveal_1n9m6_554", vr = "_totalsRevealOpen_1n9m6_562", wr = "_ctaTotalsWrap_1n9m6_567", gr = "_ctaTotalsWrapVisible_1n9m6_572", xr = "_ctaTotals_1n9m6_567", Ir = "_ctaDiscountBadge_1n9m6_587", Cr = "_ctaTotalsStrike_1n9m6_598", Nr = "_ctaTotalsPrice_1n9m6_604", Sr = "_cta_1n9m6_567", Br = "_ctaButtonGroup_1n9m6_636", Tr = "_ctaDualLeft_1n9m6_642", Rr = "_ctaDualRight_1n9m6_643", kr = "_poweredBy_1n9m6_670", f = {
1508
+ panel: yi,
1509
+ header: vi,
1510
+ title: wi,
1511
+ status: gi,
1512
+ error: xi,
1513
+ inactive: Ii,
1514
+ section: Ci,
1515
+ sectionTitle: Ni,
1516
+ rulesVisual: Si,
1517
+ rulesLabelsRow: Bi,
1518
+ rulesLinesRow: Ti,
1519
+ rulesLineLabelCell: Ri,
1520
+ rulesLineLabel: ki,
1521
+ rulesLine: Pi,
1522
+ rulesLineEmpty: Oi,
1523
+ rulesLineFilled: Mi,
1524
+ variants: Fi,
1525
+ variantList: Ai,
1526
+ variantRow: Li,
1527
+ variantRowInteractive: Di,
1528
+ variantRowSelected: $i,
1529
+ variantRowSoldOut: Ei,
1530
+ variantMedia: qi,
1531
+ variantContent: Vi,
1532
+ variantHeader: zi,
1533
+ variantTitle: Wi,
1534
+ variantImage: Ui,
1535
+ variantImageFallback: ji,
1536
+ variantMeta: Gi,
1537
+ variantPrice: Hi,
1538
+ variantFooterRow: Qi,
1539
+ variantActions: Ki,
1540
+ qtyActions: Yi,
1541
+ soldOut: Xi,
1542
+ qtyChip: Zi,
1543
+ qtyChipInteractive: Ji,
1544
+ qtyChipValue: er,
1545
+ qtyChipPlus: tr,
1546
+ qtyChipClear: nr,
1547
+ qtyTrash: ir,
1548
+ footer: rr,
1549
+ boxSummaryWindow: ar,
1550
+ boxSummaryRow: or,
1551
+ boxSlot: sr,
1552
+ boxItem: lr,
1553
+ boxItemFilled: cr,
1554
+ boxItemPlaceholder: ur,
1555
+ boxItemThreshold: dr,
1556
+ boxItemClickable: hr,
1557
+ boxItemImage: mr,
1558
+ boxItemFallback: fr,
1559
+ boxItemPlus: pr,
1560
+ boxItemDiscountText: _r,
1561
+ boxThresholdLabel: br,
1562
+ totalsReveal: yr,
1563
+ totalsRevealOpen: vr,
1564
+ ctaTotalsWrap: wr,
1565
+ ctaTotalsWrapVisible: gr,
1566
+ ctaTotals: xr,
1567
+ ctaDiscountBadge: Ir,
1568
+ ctaTotalsStrike: Cr,
1569
+ ctaTotalsPrice: Nr,
1570
+ cta: Sr,
1571
+ ctaButtonGroup: Br,
1572
+ ctaDualLeft: Tr,
1573
+ ctaDualRight: Rr,
1574
+ poweredBy: kr
1575
+ };
1576
+ function $r(o) {
1577
+ var le;
1578
+ const {
1579
+ loading: e,
1580
+ submitting: t,
1581
+ error: r,
1582
+ currencyCode: i,
1583
+ config: n,
1584
+ eligibleVariants: d,
1585
+ selections: c,
1586
+ selectionOrder: I,
1587
+ setQuantity: G,
1588
+ bundleSize: x,
1589
+ minRequired: A,
1590
+ canSubmit: P,
1591
+ submit: z,
1592
+ submitAndCheckout: H
1593
+ } = ze(), {
1594
+ className: te,
1595
+ showRules: ne = !0,
1596
+ showVariants: L = !0
1597
+ } = o, Q = (m) => {
1598
+ const p = Number.parseFloat(m);
1599
+ return Number.isFinite(p) ? String(Math.round(p)) : m;
1600
+ }, ee = (m) => {
1601
+ const p = (m ?? []).filter((a) => {
1602
+ var b, y;
1603
+ const _ = (b = a == null ? void 0 : a.name) == null ? void 0 : b.trim(), g = (y = a == null ? void 0 : a.value) == null ? void 0 : y.trim();
1604
+ return !(!_ || !g || _.toLowerCase() === "title");
1605
+ });
1606
+ return p.length ? p.map((a) => `${a.name}: ${a.value}`).join(" • ") : null;
1607
+ }, ue = (m) => {
1608
+ const p = Number(m);
1609
+ if (!Number.isFinite(p)) return m;
1610
+ if (i)
1611
+ try {
1612
+ return new Intl.NumberFormat(void 0, { style: "currency", currency: i }).format(p);
1613
+ } catch {
1614
+ }
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 - x), [x, A]), Y = k(() => {
1617
+ let m = null;
1618
+ for (const p of D)
1619
+ x >= p.minBundleSize && (m = p);
1620
+ return m;
1621
+ }, [x, D]), de = k(() => {
1622
+ if (!Y) return null;
1623
+ const m = Number.parseFloat(Y.discountPercent);
1624
+ return !Number.isFinite(m) || m <= 0 ? null : m;
1625
+ }, [Y]), Ce = D[0], Ne = !!(Ce && x >= Ce.minBundleSize), ie = k(() => {
1626
+ const m = new Map(d.map((a) => [a.id, a]));
1627
+ let p = 0;
1628
+ for (const [a, _] of Object.entries(c)) {
1629
+ const g = _ ?? 0;
1630
+ if (g <= 0) continue;
1631
+ const b = m.get(a), y = Number(b == null ? void 0 : b.price);
1632
+ Number.isFinite(y) && (p += y * g);
1633
+ }
1634
+ return Math.round(p * 100) / 100;
1635
+ }, [d, c]), oe = k(() => {
1636
+ if (!de) return ie;
1637
+ const m = ie * (1 - de / 100);
1638
+ return Math.round(m * 100) / 100;
1639
+ }, [de, ie]), we = k(() => D.length ? Math.max(...D.map((m) => m.minBundleSize)) : 0, [D]), ge = k(() => {
1640
+ const m = new Map(d.map((p) => [p.id, p]));
1641
+ return I.map((p) => m.get(p)).filter((p) => !!p);
1642
+ }, [d, I]), X = k(() => {
1643
+ var p;
1644
+ const m = /* @__PURE__ */ new Map();
1645
+ for (const a of D) {
1646
+ const _ = Math.max(0, a.minBundleSize - 1);
1647
+ m.set(_, {
1648
+ discountPercent: a.discountPercent,
1649
+ minBundleSize: a.minBundleSize,
1650
+ label: ((p = a.label) == null ? void 0 : p.trim()) || `Buy ${a.minBundleSize}+`
1651
+ });
1652
+ }
1653
+ return m;
1654
+ }, [D]), se = k(() => {
1655
+ const m = Number((n == null ? void 0 : n.maxBundleSize) ?? NaN), p = Number.isFinite(m) ? Math.floor(m) : 100;
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", xe = k(() => Math.max(we || A, ge.length), [ge.length, we, A]), he = x >= se, ye = J(null), me = J(null), fe = J(x);
1658
+ V(() => {
1659
+ const m = fe.current;
1660
+ if (fe.current = x, x <= m) return;
1661
+ const p = me.current;
1662
+ if (!p) return;
1663
+ const a = D.some((y) => y.minBundleSize === x), _ = D.find((y) => y.minBundleSize > x), g = _ && a ? _.minBundleSize - 1 : _ ? null : x - 1;
1664
+ if (g == null || g < 0) return;
1665
+ const b = requestAnimationFrame(() => {
1666
+ const y = p.querySelector(`[data-box-slot="${g}"]`);
1667
+ if (!y) return;
1668
+ const R = p.getBoundingClientRect(), B = y.getBoundingClientRect().right - R.right;
1669
+ if (B <= 1) return;
1670
+ const E = Math.max(0, p.scrollWidth - p.clientWidth), K = Math.min(E, Math.max(0, p.scrollLeft + B));
1671
+ p.scrollTo({ left: K, behavior: "smooth" });
1672
+ });
1673
+ return () => cancelAnimationFrame(b);
1674
+ }, [x, D]);
1675
+ const pe = (m) => {
1676
+ const p = ye.current;
1677
+ if (!p) return;
1678
+ const a = p.querySelector(`[data-variant-row="${m}"]`);
1679
+ a && a.scrollIntoView({ behavior: "smooth", block: "nearest" });
1680
+ };
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 }) }),
1683
+ e ? /* @__PURE__ */ s("div", { className: f.status, children: "Loading…" }) : null,
1684
+ r ? /* @__PURE__ */ s("div", { className: f.error, children: r }) : null,
1685
+ !e && n && !n.isActive ? /* @__PURE__ */ s("div", { className: f.inactive, children: "Bundles are not active." }) : null,
1686
+ ne && D.length ? /* @__PURE__ */ s("div", { className: f.section, children: /* @__PURE__ */ S("div", { className: f.rulesVisual, children: [
1687
+ /* @__PURE__ */ s("div", { className: f.rulesLabelsRow, children: Array.from({ length: we }).map((m, p) => {
1688
+ const a = p + 1, _ = D.find((b) => b.minBundleSize === a), g = _ ? `${Q(_.discountPercent)}% off` : null;
1689
+ return /* @__PURE__ */ s("div", { className: f.rulesLineLabelCell, children: g ? /* @__PURE__ */ s("span", { className: f.rulesLineLabel, children: g }) : null }, a);
1690
+ }) }),
1691
+ /* @__PURE__ */ s("div", { className: f.rulesLinesRow, children: Array.from({ length: we }).map((m, p) => {
1692
+ const a = p + 1, _ = x >= a;
1693
+ return /* @__PURE__ */ s(
1694
+ "div",
1695
+ {
1696
+ className: [
1697
+ f.rulesLine,
1698
+ _ ? f.rulesLineFilled : f.rulesLineEmpty
1699
+ ].filter(Boolean).join(" ")
1700
+ },
1701
+ a
1702
+ );
1703
+ }) })
1704
+ ] }) }) : null,
1705
+ L ? /* @__PURE__ */ S("div", { className: f.section, ref: ye, children: [
1706
+ /* @__PURE__ */ s("div", { className: f.sectionTitle, children: "Select items" }),
1707
+ /* @__PURE__ */ s("div", { className: f.variants, children: /* @__PURE__ */ s("ul", { className: f.variantList, children: w.map((m) => {
1708
+ var b;
1709
+ const p = c[m.id] ?? 0, a = ee(m.selectedOptions), _ = m.availableForSale === !1, g = !_ && !he;
1710
+ return /* @__PURE__ */ S(
1711
+ "li",
1712
+ {
1713
+ className: [
1714
+ f.variantRow,
1715
+ g ? f.variantRowInteractive : null,
1716
+ p > 0 ? f.variantRowSelected : null,
1717
+ _ ? f.variantRowSoldOut : null
1718
+ ].filter(Boolean).join(" "),
1719
+ "data-variant-row": m.id,
1720
+ role: g ? "button" : void 0,
1721
+ tabIndex: g ? 0 : void 0,
1722
+ onClick: g ? () => {
1723
+ G(m.id, p + 1);
1724
+ } : void 0,
1725
+ onKeyDown: g ? (y) => {
1726
+ (y.key === "Enter" || y.key === " ") && (y.preventDefault(), G(m.id, p + 1), pe(m.id));
1727
+ } : void 0,
1728
+ "aria-label": _ ? `${m.displayName} is sold out` : `Add ${m.displayName} to bundle`,
1729
+ children: [
1730
+ /* @__PURE__ */ s("div", { className: f.variantMedia, children: (b = m.image) != null && b.url ? /* @__PURE__ */ s(
1731
+ "img",
1732
+ {
1733
+ src: m.image.url,
1734
+ alt: m.image.altText ?? m.displayName,
1735
+ width: m.image.width ?? 64,
1736
+ height: m.image.height ?? 64,
1737
+ className: f.variantImage,
1738
+ loading: "lazy"
1739
+ }
1740
+ ) : /* @__PURE__ */ s("div", { className: f.variantImageFallback, children: "Item" }) }),
1741
+ /* @__PURE__ */ S("div", { className: f.variantContent, children: [
1742
+ /* @__PURE__ */ S("div", { className: f.variantHeader, children: [
1743
+ /* @__PURE__ */ s("div", { className: f.variantTitle, children: m.displayName }),
1744
+ a ? /* @__PURE__ */ s("div", { className: f.variantMeta, children: a }) : null
1745
+ ] }),
1746
+ /* @__PURE__ */ S("div", { className: f.variantFooterRow, children: [
1747
+ /* @__PURE__ */ s("div", { className: f.variantPrice, children: ue(m.price) }),
1748
+ /* @__PURE__ */ s("div", { className: f.variantActions, children: _ ? /* @__PURE__ */ s("div", { className: f.soldOut, "aria-label": `${m.displayName} is sold out`, children: "Sold Out" }) : /* @__PURE__ */ S("div", { className: f.qtyActions, children: [
1749
+ p > 0 ? /* @__PURE__ */ s(
1750
+ "button",
1751
+ {
1752
+ type: "button",
1753
+ className: f.qtyTrash,
1754
+ "aria-label": `Remove ${m.displayName} from bundle`,
1755
+ onClick: (y) => {
1756
+ y.stopPropagation(), G(m.id, 0);
1757
+ },
1758
+ onKeyDown: (y) => {
1759
+ y.stopPropagation();
1760
+ },
1761
+ children: /* @__PURE__ */ s(en, { size: 14 })
1762
+ }
1763
+ ) : null,
1764
+ /* @__PURE__ */ s(
1765
+ "div",
1766
+ {
1767
+ className: [f.qtyChip, p > 0 ? f.qtyChipInteractive : null].filter(Boolean).join(" "),
1768
+ "aria-label": `${m.displayName} quantity ${p}`,
1769
+ onClick: (y) => {
1770
+ y.stopPropagation(), G(m.id, p + 1);
1771
+ },
1772
+ onKeyDown: (y) => {
1773
+ y.stopPropagation();
1774
+ },
1775
+ role: "button",
1776
+ tabIndex: 0,
1777
+ children: p <= 0 ? /* @__PURE__ */ s("span", { className: f.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ s(yt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ S(Xe, { children: [
1778
+ /* @__PURE__ */ s("span", { className: f.qtyChipValue, children: p }),
1779
+ /* @__PURE__ */ s(
1780
+ "button",
1781
+ {
1782
+ type: "button",
1783
+ className: f.qtyChipClear,
1784
+ "aria-label": `Add ${m.displayName}`,
1785
+ onClick: (y) => {
1786
+ y.stopPropagation(), G(m.id, p + 1);
1787
+ },
1788
+ onKeyDown: (y) => {
1789
+ y.stopPropagation();
1790
+ },
1791
+ children: /* @__PURE__ */ s(yt, { size: 12, strokeWidth: 2 })
1792
+ }
1793
+ )
1794
+ ] })
1795
+ }
1796
+ )
1797
+ ] }) })
1798
+ ] })
1799
+ ] })
1800
+ ]
1801
+ },
1802
+ m.id
1803
+ );
1804
+ }) }) })
1805
+ ] }) : null,
1806
+ /* @__PURE__ */ S("footer", { className: f.footer, children: [
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: xe }).map((m, p) => {
1808
+ var B, E, K, _e;
1809
+ const a = ge[p], _ = X.get(p), g = !!a, b = !!_, y = b && !g, R = _ ? `${_.discountPercent}% off` : null, U = g ? a.displayName : `Slot ${p + 1}`;
1810
+ return /* @__PURE__ */ S("div", { "data-box-slot": p, className: f.boxSlot, children: [
1811
+ /* @__PURE__ */ s(
1812
+ "div",
1813
+ {
1814
+ className: [
1815
+ f.boxItem,
1816
+ g ? f.boxItemFilled : f.boxItemPlaceholder,
1817
+ b ? f.boxItemThreshold : null,
1818
+ g ? f.boxItemClickable : null
1819
+ ].filter(Boolean).join(" "),
1820
+ role: g ? "button" : void 0,
1821
+ tabIndex: g ? 0 : void 0,
1822
+ onClick: g ? () => pe(a.id) : void 0,
1823
+ onKeyDown: g ? (be) => {
1824
+ (be.key === "Enter" || be.key === " ") && (be.preventDefault(), pe(a.id));
1825
+ } : void 0,
1826
+ "aria-label": y && R ? `${U}. Unlocks ${R}.` : U,
1827
+ title: y && R ? `${U} • Unlocks ${R}` : U,
1828
+ children: g ? (B = a.image) != null && B.url ? /* @__PURE__ */ s(
1829
+ "img",
1830
+ {
1831
+ className: f.boxItemImage,
1832
+ src: a.image.url,
1833
+ alt: a.image.altText ?? a.displayName,
1834
+ width: 1,
1835
+ height: 1,
1836
+ loading: "lazy"
1837
+ }
1838
+ ) : /* @__PURE__ */ s("div", { className: f.boxItemFallback, "aria-hidden": "true", children: ((_e = (K = (E = a.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: "+" })
1839
+ }
1840
+ ),
1841
+ b ? /* @__PURE__ */ s("div", { className: f.boxThresholdLabel, children: _.label }) : null
1842
+ ] }, p);
1843
+ }) }) }),
1844
+ /* @__PURE__ */ s("div", { className: [f.totalsReveal, Ne ? f.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ s(
1845
+ "div",
1846
+ {
1847
+ className: [f.ctaTotalsWrap, Ne ? f.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
1848
+ "aria-hidden": !Ne,
1849
+ children: /* @__PURE__ */ S("div", { className: f.ctaTotals, "aria-label": "Totals", children: [
1850
+ de ? /* @__PURE__ */ S("span", { className: f.ctaDiscountBadge, children: [
1851
+ de,
1852
+ "% Discount"
1853
+ ] }) : /* @__PURE__ */ s("span", {}),
1854
+ /* @__PURE__ */ s("span", { children: de ? /* @__PURE__ */ S(Xe, { children: [
1855
+ /* @__PURE__ */ s("span", { className: f.ctaTotalsStrike, children: ue(ie.toFixed(2)) }),
1856
+ " ",
1857
+ /* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(oe.toFixed(2)) })
1858
+ ] }) : /* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(ie.toFixed(2)) }) })
1859
+ ] })
1860
+ }
1861
+ ) }),
1862
+ (() => {
1863
+ const m = (n == null ? void 0 : n.ctaButtonMode) || "add_to_cart";
1864
+ return m === "add_to_cart_checkout" ? W > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: z, disabled: !P, className: f.cta, children: t ? "Adding…" : `Add ${W} more product${W === 1 ? "" : "s"}` }) : /* @__PURE__ */ S("div", { className: f.ctaButtonGroup, children: [
1865
+ /* @__PURE__ */ s("button", { type: "button", onClick: z, disabled: !P, className: f.ctaDualLeft, children: /* @__PURE__ */ s("span", { children: t ? "Adding…" : "Add to Basket" }) }),
1866
+ /* @__PURE__ */ s("button", { type: "button", onClick: H, disabled: !P, className: f.ctaDualRight, children: /* @__PURE__ */ s("span", { children: t ? "Processing…" : "Checkout" }) })
1867
+ ] }) : m === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: H, disabled: !P, className: f.cta, children: t ? "Processing…" : W > 0 ? `Add ${W} more product${W === 1 ? "" : "s"}` : "Checkout" }) : /* @__PURE__ */ s("button", { type: "button", onClick: z, disabled: !P, className: f.cta, children: t ? "Adding…" : W > 0 ? `Add ${W} more product${W === 1 ? "" : "s"}` : "Add to Basket" });
1868
+ })(),
1869
+ /* @__PURE__ */ S("div", { className: f.poweredBy, children: [
1870
+ "powered by",
1871
+ " ",
1872
+ /* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
1873
+ ] })
1874
+ ] })
1875
+ ] });
1876
+ }
1877
+ function Ye(o) {
1481
1878
  if (o != null && o.length)
1482
1879
  return o.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
1483
1880
  }
1484
- function pt(o) {
1881
+ function vt(o) {
1485
1882
  const e = /\/(\d+)$/.exec(o);
1486
1883
  return e ? e[1] : o;
1487
1884
  }
1488
- function fr() {
1885
+ function Pr() {
1489
1886
  window.location.reload();
1490
1887
  }
1491
- async function Fe(o, e) {
1888
+ async function Ee(o, e) {
1492
1889
  const t = await fetch(o, {
1493
1890
  method: "POST",
1494
1891
  headers: {
@@ -1498,43 +1895,43 @@ async function Fe(o, e) {
1498
1895
  body: JSON.stringify(e)
1499
1896
  });
1500
1897
  if (!t.ok) {
1501
- const i = await t.text().catch(() => "");
1502
- throw new Error(i || `Cart request failed: ${t.status}`);
1898
+ const r = await t.text().catch(() => "");
1899
+ throw new Error(r || `Cart request failed: ${t.status}`);
1503
1900
  }
1504
1901
  return t.json().catch(() => null);
1505
1902
  }
1506
- function gr() {
1903
+ function Er() {
1507
1904
  return {
1508
1905
  async linesAdd(o) {
1509
1906
  const e = o.map((t) => ({
1510
- id: pt(t.merchandiseId),
1907
+ id: vt(t.merchandiseId),
1511
1908
  quantity: t.quantity,
1512
- properties: Qe(t.attributes)
1909
+ properties: Ye(t.attributes)
1513
1910
  }));
1514
- await Fe("/cart/add.js", { items: e });
1911
+ await Ee("/cart/add.js", { items: e });
1515
1912
  },
1516
1913
  async linesAddForCheckout(o) {
1517
1914
  const e = o.map((t) => ({
1518
- id: pt(t.merchandiseId),
1915
+ id: vt(t.merchandiseId),
1519
1916
  quantity: t.quantity,
1520
- properties: Qe(t.attributes)
1917
+ properties: Ye(t.attributes)
1521
1918
  }));
1522
- await Fe("/cart/add.js", { items: e });
1919
+ await Ee("/cart/add.js", { items: e });
1523
1920
  },
1524
1921
  async linesUpdate(o) {
1525
1922
  for (const e of o)
1526
- await Fe("/cart/change.js", {
1923
+ await Ee("/cart/change.js", {
1527
1924
  id: e.id,
1528
1925
  quantity: e.quantity,
1529
- properties: Qe(e.attributes)
1926
+ properties: Ye(e.attributes)
1530
1927
  });
1531
1928
  },
1532
1929
  async linesRemove(o) {
1533
1930
  for (const e of o)
1534
- await Fe("/cart/change.js", { id: e, quantity: 0 });
1931
+ await Ee("/cart/change.js", { id: e, quantity: 0 });
1535
1932
  },
1536
1933
  openCartUI() {
1537
- window.setTimeout(() => fr(), 0);
1934
+ window.setTimeout(() => Pr(), 0);
1538
1935
  },
1539
1936
  navigateToCheckout() {
1540
1937
  window.location.href = "/checkout";
@@ -1542,12 +1939,13 @@ function gr() {
1542
1939
  };
1543
1940
  }
1544
1941
  export {
1545
- yr as BundleBuilderDrawer,
1546
- wr as BundleButton,
1547
- Me as BundleLineAttributeKeys,
1548
- br as BundleProvider,
1549
- gr as createLiquidCartAdapter,
1550
- Ke as useBundleBuilder,
1551
- _r as useBundleBuilderDrawer
1942
+ Dr as BundleBuilderDrawer,
1943
+ $r as BundleBuilderPanel,
1944
+ Lr as BundleButton,
1945
+ $e as BundleLineAttributeKeys,
1946
+ Fr as BundleProvider,
1947
+ Er as createLiquidCartAdapter,
1948
+ ze as useBundleBuilder,
1949
+ Ar as useBundleBuilderDrawer
1552
1950
  };
1553
1951
  //# sourceMappingURL=index.js.map