@magicx-eng/ai-autocomplete-react 0.65.1 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END as As,DATE_RANGE_META_START as Es,DEFAULT_OPTION_COUNT_UNIT as zs,dateCellMarks as Rs,formatDate as Os,formatDateRange as Ls,formatOptionCount as Ds,formatPlace as Ms,formatTime as Ns,isoDate as Hs,LOCATION_META_KEY as Fs,monthLabel as Bs,optionCountLabel as Ws,optionHasImage as Gs,optionImageSources as Ks,optionImageSrc as qs,optionLabel as Vs,optionsShowLeadingVisuals as _s,PRODUCT_PATH_PREFIX as Us,parseDate as Qs,parseLooseDate as Ys,parseLooseDateRange as js,parseTime as $s,productFromMatchedItem as Zs,productImageSources as Xs,productsFromCustomFields as Js,sanitizeOptionIconSvg as el,selectedRangeFor as tl,TIME_META_KEY as al,visibleDateRange as il,WEEKDAY_LABELS as ol,withSkippedParams as nl}from"@magicx-eng/ai-autocomplete-vanilla";import{forwardRef as cn,useCallback as zt,useEffect as Ut,useImperativeHandle as pn,useLayoutEffect as hn,useRef as pt}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-67791514")){let e=document.createElement("style");e.id="ac-style-67791514",e.textContent=`.aia-container-KKjFU {
1
+ import{buildSubmitResult as Ns,cellDay as Fs,cellIso as Hs,DATE_RANGE_META_END as Bs,DATE_RANGE_META_START as Ws,DEFAULT_OPTION_COUNT_UNIT as Gs,dateCellMarks as Ks,focusesInputOnSelect as qs,formatDate as _s,formatDateRange as Vs,formatOptionCount as Us,formatPlace as Qs,formatTime as Ys,isoDate as js,isTouchPrimary as $s,LOCATION_META_KEY as Zs,monthLabel as Xs,optionCountLabel as Js,optionHasImage as el,optionImageSources as tl,optionImageSrc as al,optionLabel as il,optionsShowLeadingVisuals as ol,PRODUCT_PATH_PREFIX as nl,parseDate as rl,parseLooseDate as sl,parseLooseDateRange as ll,parseTime as dl,productFromMatchedItem as cl,productImageSources as pl,productsFromCustomFields as hl,sanitizeOptionIconSvg as ul,selectedRangeFor as ml,TIME_META_KEY as gl,visibleDateRange as fl,WEEKDAY_LABELS as bl,withSkippedParams as wl}from"@magicx-eng/ai-autocomplete-vanilla";import{forwardRef as xn,useCallback as Dt,useEffect as Zt,useImperativeHandle as yn,useLayoutEffect as kn,useRef as ft}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-67791514")){let e=document.createElement("style");e.id="ac-style-67791514",e.textContent=`.aia-container-KKjFU {
2
2
  position: relative;
3
3
  /* Inherits the host page's font by default. Consumers can pin a specific
4
4
  font on the library via \`--aia-font-family: 'Custom Font'\` without
@@ -439,7 +439,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
439
439
  transition: none;
440
440
  }
441
441
  }
442
- `,document.head.appendChild(e)}var Ye={container:"aia-container-KKjFU",inputWrapper:"aia-inputWrapper-FLq1b",editorArea:"aia-editorArea-7rBWq",input:"aia-input-IW-P-",pillListContainer:"aia-pillListContainer-h92IA",submitSlot:"aia-submitSlot-GhuCM",aiaChipForm:"aia-aiaChipForm-tKbNc",aiaTileGrow:"aia-aiaTileGrow-j9Pat",aiaTileSpring:"aia-aiaTileSpring-FEwNg",aiaTileFade:"aia-aiaTileFade-H1LDQ",aiaImageGrow:"aia-aiaImageGrow-i9yw8"};import{attachScrollArrow as bo,attachViewportFit as wo,containScroll as vo,dateFloorFor as xo,destroyPanelMorph as yo,findMultiSelectDone as ko,fitMultiSelectDone as So,hasSkippablePill as Co,isCalendarFormat as To,labelTraditionalAutocomplete as Po,panelMorphKey as Io,queryLive as Ao,settlePanelMorph as Eo,syncPanelHug as zo,uiStringsFor as Ro}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as $e,useLayoutEffect as Gt,useRef as lt,useState as Oo}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-0ae03977")){let e=document.createElement("style");e.id="ac-style-0ae03977",e.textContent=`/*
442
+ `,document.head.appendChild(e)}var Je={container:"aia-container-KKjFU",inputWrapper:"aia-inputWrapper-FLq1b",editorArea:"aia-editorArea-7rBWq",input:"aia-input-IW-P-",pillListContainer:"aia-pillListContainer-h92IA",submitSlot:"aia-submitSlot-GhuCM",aiaChipForm:"aia-aiaChipForm-tKbNc",aiaTileGrow:"aia-aiaTileGrow-j9Pat",aiaTileSpring:"aia-aiaTileSpring-FEwNg",aiaTileFade:"aia-aiaTileFade-H1LDQ",aiaImageGrow:"aia-aiaImageGrow-i9yw8"};import{attachScrollArrow as So,attachViewportFit as Co,containScroll as To,dateFloorFor as Po,destroyPanelMorph as Io,findMultiSelectDone as Ao,fitMultiSelectDone as Eo,hasSkippablePill as Ro,isCalendarFormat as zo,labelTraditionalAutocomplete as Lo,panelMorphKey as Oo,queryLive as Do,settlePanelMorph as Mo,syncPanelHug as No,uiStringsFor as Fo}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as tt,useLayoutEffect as Ut,useRef as mt,useState as Ho}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-0ae03977")){let e=document.createElement("style");e.id="ac-style-0ae03977",e.textContent=`/*
443
443
  * Built-in appearance defaults \u2014 zero specificity via :where().
444
444
  * Consumer CSS always wins without !important.
445
445
  *
@@ -1811,7 +1811,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
1811
1811
  opacity: 1;
1812
1812
  }
1813
1813
  }
1814
- `,document.head.appendChild(e)}var pe={dropdown:"aia-dropdown-yz2KC",visible:"aia-visible-QCoXj",scrollArrow:"aia-scrollArrow-uUzV0","magicx-aia-scroll-arrow-bob":"aia-magicx-aia-scroll-arrow-bob-z-HXC",pillBar:"aia-pillBar-pwTXe",pillScroll:"aia-pillScroll-Tpzus",skip:"aia-skip-7-olS",skeletonBars:"aia-skeletonBars-HVr9C",skeletonBar:"aia-skeletonBar-O3xIx",multiDone:"aia-multiDone-y12U7",seeAllRow:"aia-seeAllRow-icrau",seeAll:"aia-seeAll-0Zbgc",seeAllSpin:"aia-seeAllSpin-jlsZP",multiActionsLoadingOut:"aia-multiActionsLoadingOut-lSdMh",multiActionsFadeIn:"aia-multiActionsFadeIn-zbGTG",seeAllLoadingOut:"aia-seeAllLoadingOut-THnrl",seeAllFadeIn:"aia-seeAllFadeIn-1GWpl"};import{cellDay as Xa,cellIso as vt,dateCellMarks as Ja,isDimmedDay as ei,isoDate as ti,monthLabel as ai,visibleDateRange as ii,WEEKDAY_LABELS as oi}from"@magicx-eng/ai-autocomplete-vanilla";import{useState as ni}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-f687bd03")){let e=document.createElement("style");e.id="ac-style-f687bd03",e.textContent=`/* --- Datepicker (replaces the options grid for date suggestions) ---
1814
+ `,document.head.appendChild(e)}var pe={dropdown:"aia-dropdown-yz2KC",visible:"aia-visible-QCoXj",scrollArrow:"aia-scrollArrow-uUzV0","magicx-aia-scroll-arrow-bob":"aia-magicx-aia-scroll-arrow-bob-z-HXC",pillBar:"aia-pillBar-pwTXe",pillScroll:"aia-pillScroll-Tpzus",skip:"aia-skip-7-olS",skeletonBars:"aia-skeletonBars-HVr9C",skeletonBar:"aia-skeletonBar-O3xIx",multiDone:"aia-multiDone-y12U7",seeAllRow:"aia-seeAllRow-icrau",seeAll:"aia-seeAll-0Zbgc",seeAllSpin:"aia-seeAllSpin-jlsZP",multiActionsLoadingOut:"aia-multiActionsLoadingOut-lSdMh",multiActionsFadeIn:"aia-multiActionsFadeIn-zbGTG",seeAllLoadingOut:"aia-seeAllLoadingOut-THnrl",seeAllFadeIn:"aia-seeAllFadeIn-1GWpl"};import{cellDay as oi,cellIso as yt,dateCellMarks as ni,isDimmedDay as ri,isoDate as si,monthLabel as li,visibleDateRange as di,WEEKDAY_LABELS as ci}from"@magicx-eng/ai-autocomplete-vanilla";import{useState as pi}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-f687bd03")){let e=document.createElement("style");e.id="ac-style-f687bd03",e.textContent=`/* --- Datepicker (replaces the options grid for date suggestions) ---
1815
1815
 
1816
1816
  One of three hand-maintained copies (vanilla styles.css, this file, Angular's
1817
1817
  date-grid.component.css). Only the class-naming layer differs \u2014 the
@@ -2008,7 +2008,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
2008
2008
  opacity: 0.8;
2009
2009
  background: rgba(var(--aia-streak-rgb, 255, 255, 255), 0.06);
2010
2010
  }
2011
- `,document.head.appendChild(e)}var K={datepicker:"aia-datepicker-6RrTs",header:"aia-header-z4LRk",month:"aia-month-urB2T",nav:"aia-nav-ap4AN",weekdays:"aia-weekdays-3EA3q",grid:"aia-grid-mQCgw",weekday:"aia-weekday-3lF4B",cell:"aia-cell-59k0y",number:"aia-number-aoT01",day:"aia-day-cB3u9",blank:"aia-blank-ivgRC",past:"aia-past-CEZsj",highlighted:"aia-highlighted-YIdtK",today:"aia-today-iI3ME",inRange:"aia-inRange-r9S2q",selected:"aia-selected-28KDn",reference:"aia-reference-Q5bXf",pressed:"aia-pressed-bEyyN"};import{jsx as Se,jsxs as ia}from"react/jsx-runtime";var ri=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function oa({options:e,activeIndex:n,listboxId:t,view:i,selection:o,onSelect:s,onHighlight:r,onUnhighlight:d,onPreviousMonth:w,onNextMonth:v}){let x=ti(new Date),m=ii({pendingStart:o.rangeStart,highlightedIso:vt(e[n]),selected:o.selectedRange,floor:o.floor});return ia("div",{className:K.datepicker,"data-aia-datepicker":"",children:[ia("div",{className:K.header,children:[Se("button",{type:"button",tabIndex:-1,className:K.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:p=>p.preventDefault(),onClick:w,children:"\u2039"}),Se("span",{className:K.month,"data-aia-date-month":"","aria-live":"polite",children:ai(i)}),Se("button",{type:"button",tabIndex:-1,className:K.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:p=>p.preventDefault(),onClick:v,children:"\u203A"})]}),Se("div",{className:K.weekdays,"aria-hidden":"true",children:oi.map((p,h)=>Se("span",{className:K.weekday,children:p},ri[h]))}),Se("div",{className:K.grid,"data-aia-date-grid":"",children:e.map((p,h)=>Se(si,{option:p,id:`${t}-option-${h}`,index:h,isHighlighted:h===n&&p.is_tappable,isToday:vt(p)===x,isPast:ei(vt(p),x,o.floor),marks:Ja(vt(p),{selectedIso:o.selectedIso,range:m,references:o.references}),onSelect:s,onHighlight:r,onUnhighlight:d},vt(p)??`pad-${h}`))})]})}function si({option:e,id:n,index:t,isHighlighted:i,isToday:o,isPast:s,marks:r,onSelect:d,onHighlight:w,onUnhighlight:v}){let[x,m]=ni(!1),p=Xa(e);if(p==null)return Se("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${K.cell} ${K.blank}`});let h=()=>{m(!0),d(e),setTimeout(()=>m(!1),170)},y=[K.cell,K.day,s?K.past:"",i?K.highlighted:"",o?K.today:"",r.inRange?K.inRange:"",r.selected?K.selected:"",r.reference?K.reference:"",x?K.pressed:""].filter(Boolean).join(" ");return Se("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":i,"aria-label":e.text,tabIndex:0,className:y,onClick:h,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),h())},onMouseEnter:()=>w(t),onMouseLeave:v?()=>v(t):void 0,children:Se("span",{className:K.number,children:p})})}import{ATTRIBUTION_URL as li,buildAttributionUrl as di,getFooterHint as ci,uiStringsFor as pi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as hi,useState as ui}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-5259a217")){let e=document.createElement("style");e.id="ac-style-5259a217",e.textContent=`.aia-cluster {
2011
+ `,document.head.appendChild(e)}var V={datepicker:"aia-datepicker-6RrTs",header:"aia-header-z4LRk",month:"aia-month-urB2T",nav:"aia-nav-ap4AN",weekdays:"aia-weekdays-3EA3q",grid:"aia-grid-mQCgw",weekday:"aia-weekday-3lF4B",cell:"aia-cell-59k0y",number:"aia-number-aoT01",day:"aia-day-cB3u9",blank:"aia-blank-ivgRC",past:"aia-past-CEZsj",highlighted:"aia-highlighted-YIdtK",today:"aia-today-iI3ME",inRange:"aia-inRange-r9S2q",selected:"aia-selected-28KDn",reference:"aia-reference-Q5bXf",pressed:"aia-pressed-bEyyN"};import{jsx as Te,jsxs as ca}from"react/jsx-runtime";var hi=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function pa({options:e,activeIndex:n,listboxId:t,view:i,selection:o,onSelect:l,onHighlight:r,onUnhighlight:d,onPreviousMonth:f,onNextMonth:v}){let x=si(new Date),m=di({pendingStart:o.rangeStart,highlightedIso:yt(e[n]),selected:o.selectedRange,floor:o.floor});return ca("div",{className:V.datepicker,"data-aia-datepicker":"",children:[ca("div",{className:V.header,children:[Te("button",{type:"button",tabIndex:-1,className:V.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:p=>p.preventDefault(),onClick:f,children:"\u2039"}),Te("span",{className:V.month,"data-aia-date-month":"","aria-live":"polite",children:li(i)}),Te("button",{type:"button",tabIndex:-1,className:V.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:p=>p.preventDefault(),onClick:v,children:"\u203A"})]}),Te("div",{className:V.weekdays,"aria-hidden":"true",children:ci.map((p,h)=>Te("span",{className:V.weekday,children:p},hi[h]))}),Te("div",{className:V.grid,"data-aia-date-grid":"",children:e.map((p,h)=>Te(ui,{option:p,id:`${t}-option-${h}`,index:h,isHighlighted:h===n&&p.is_tappable,isToday:yt(p)===x,isPast:ri(yt(p),x,o.floor),marks:ni(yt(p),{selectedIso:o.selectedIso,range:m,references:o.references}),onSelect:l,onHighlight:r,onUnhighlight:d},yt(p)??`pad-${h}`))})]})}function ui({option:e,id:n,index:t,isHighlighted:i,isToday:o,isPast:l,marks:r,onSelect:d,onHighlight:f,onUnhighlight:v}){let[x,m]=pi(!1),p=oi(e);if(p==null)return Te("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${V.cell} ${V.blank}`});let h=()=>{m(!0),d(e),setTimeout(()=>m(!1),170)},y=[V.cell,V.day,l?V.past:"",i?V.highlighted:"",o?V.today:"",r.inRange?V.inRange:"",r.selected?V.selected:"",r.reference?V.reference:"",x?V.pressed:""].filter(Boolean).join(" ");return Te("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":i,"aria-label":e.text,tabIndex:0,className:y,onClick:h,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},onMouseEnter:()=>f(t),onMouseLeave:v?()=>v(t):void 0,children:Te("span",{className:V.number,children:p})})}import{ATTRIBUTION_URL as mi,buildAttributionUrl as gi,getFooterHint as fi,uiStringsFor as bi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as wi,useState as vi}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-5259a217")){let e=document.createElement("style");e.id="ac-style-5259a217",e.textContent=`.aia-cluster {
2012
2012
  display: flex;
2013
2013
  flex-wrap: wrap;
2014
2014
  gap: var(--aia-cluster-gap, 0.5rem);
@@ -2048,7 +2048,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
2048
2048
  .aia-cluster[data-justify="around"] {
2049
2049
  justify-content: space-around;
2050
2050
  }
2051
- `,document.head.appendChild(e)}import{jsx as na}from"react/jsx-runtime";function xt({gap:e,align:n="center",justify:t="start",noWrap:i=!1,inline:o=!1,className:s,children:r,...d}){let w=e?{"--aia-cluster-gap":e}:void 0,v={className:s?`aia-cluster ${s}`:"aia-cluster","data-align":n,"data-justify":t,"data-nowrap":i||void 0,"data-inline":o||void 0,style:w,...d};return o?na("span",{...v,children:r}):na("div",{...v,children:r})}if(typeof document<"u"&&!document.getElementById("ac-style-56b0c577")){let e=document.createElement("style");e.id="ac-style-56b0c577",e.textContent=`/* The footer adds its own 8px horizontal inset so it stays clear of the
2051
+ `,document.head.appendChild(e)}import{jsx as ha}from"react/jsx-runtime";function kt({gap:e,align:n="center",justify:t="start",noWrap:i=!1,inline:o=!1,className:l,children:r,...d}){let f=e?{"--aia-cluster-gap":e}:void 0,v={className:l?`aia-cluster ${l}`:"aia-cluster","data-align":n,"data-justify":t,"data-nowrap":i||void 0,"data-inline":o||void 0,style:f,...d};return o?ha("span",{...v,children:r}):ha("div",{...v,children:r})}if(typeof document<"u"&&!document.getElementById("ac-style-56b0c577")){let e=document.createElement("style");e.id="ac-style-56b0c577",e.textContent=`/* The footer adds its own 8px horizontal inset so it stays clear of the
2052
2052
  dropdown's rounded edges. The top inset (--aia-footer-gap) adds breathing
2053
2053
  room above the hint/branding row so the footer doesn't butt against the last
2054
2054
  option row \u2014 additive to the dropdown's 8px section gap. */
@@ -2196,7 +2196,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
2196
2196
  justify-content: flex-end;
2197
2197
  }
2198
2198
  }
2199
- `,document.head.appendChild(e)}var Le={footer:"aia-footer-qQQ7x",row:"aia-row-BgZ6Q",hintGroup:"aia-hintGroup-ZzbPf",brandLink:"aia-brandLink-r4f3R",key:"aia-key-Bz1H-",hint:"aia-hint-GKEOH",brand:"aia-brand-Al-lR",badge:"aia-badge-Fk9vg"};import{jsx as rt,jsxs as ra}from"react/jsx-runtime";function sa({isOptionHighlighted:e=!1,isInputEmpty:n=!1,strings:t=pi()}){let{key:i,hint:o}=ci(e,n,t),[s,r]=ui(li);return hi(()=>{r(di())},[]),rt("footer",{className:Le.footer,"data-aia-footer":"",children:ra(xt,{justify:"between",noWrap:!0,className:Le.row,children:[ra(xt,{gap:"5px",className:Le.hintGroup,children:[rt("kbd",{className:Le.key,children:i}),rt("span",{className:Le.hint,children:o})]}),rt("a",{className:Le.brandLink,href:s,target:"_blank",rel:"noopener noreferrer",children:rt("span",{className:Le.badge,children:rt("span",{className:Le.brand,children:"Powered by Intent-1"})})})]})})}import{useEffect as la,useLayoutEffect as mi,useRef as he}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-2feec02e")){let e=document.createElement("style");e.id="ac-style-2feec02e",e.textContent=`/* Location search \u2014 React copy of the vanilla rules in styles.css (and of the
2199
+ `,document.head.appendChild(e)}var Me={footer:"aia-footer-qQQ7x",row:"aia-row-BgZ6Q",hintGroup:"aia-hintGroup-ZzbPf",brandLink:"aia-brandLink-r4f3R",key:"aia-key-Bz1H-",hint:"aia-hint-GKEOH",brand:"aia-brand-Al-lR",badge:"aia-badge-Fk9vg"};import{jsx as ht,jsxs as ua}from"react/jsx-runtime";function ma({isOptionHighlighted:e=!1,isInputEmpty:n=!1,strings:t=bi()}){let{key:i,hint:o}=fi(e,n,t),[l,r]=vi(mi);return wi(()=>{r(gi())},[]),ht("footer",{className:Me.footer,"data-aia-footer":"",children:ua(kt,{justify:"between",noWrap:!0,className:Me.row,children:[ua(kt,{gap:"5px",className:Me.hintGroup,children:[ht("kbd",{className:Me.key,children:i}),ht("span",{className:Me.hint,children:o})]}),ht("a",{className:Me.brandLink,href:l,target:"_blank",rel:"noopener noreferrer",children:ht("span",{className:Me.badge,children:ht("span",{className:Me.brand,children:"Powered by Intent-1"})})})]})})}import{useEffect as ga,useLayoutEffect as xi,useRef as he}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-2feec02e")){let e=document.createElement("style");e.id="ac-style-2feec02e",e.textContent=`/* Location search \u2014 React copy of the vanilla rules in styles.css (and of the
2200
2200
  Angular copy). The three are kept identical by
2201
2201
  packages/vanilla/tests/render/locationFieldParity.test.ts. */
2202
2202
  .aia-location-6-fsr {
@@ -2330,7 +2330,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
2330
2330
  .aia-loadingBar-OLCr4:nth-child(3) {
2331
2331
  width: 60%;
2332
2332
  }
2333
- `,document.head.appendChild(e)}var Q={location:"aia-location-6-fsr",field:"aia-field-xEzwi",icon:"aia-icon-czx6C",input:"aia-input-Yi9V-",results:"aia-results-C3O0V",row:"aia-row-Q9y8g",highlighted:"aia-highlighted-RJjPx",pin:"aia-pin-OjabL",text:"aia-text-Xs84O",name:"aia-name-Z-WJR",secondary:"aia-secondary-4sCT1",note:"aia-note-xCSvY",empty:"aia-empty-SYBzi",loading:"aia-loading-Ih1gi",loadingBar:"aia-loadingBar-OLCr4"};import{jsx as se,jsxs as Be}from"react/jsx-runtime";var gi=0;function yt(e){return e.getRootNode().activeElement??null}function pa(e){return e.getRootNode().getSelection?.()??document.getSelection()}function da(e){if(!e.isContentEditable)return null;let n=pa(e);if(!n||n.rangeCount===0)return null;let t=n.getRangeAt(0);return e.contains(t.startContainer)?t.cloneRange():null}function ca(e,n){if(e.focus({preventScroll:!0}),!e.isContentEditable)return;let t=pa(e);if(!t)return;let i=n;(!i||!i.startContainer.isConnected||!e.contains(i.startContainer))&&(i=document.createRange(),i.selectNodeContents(e),i.collapse(!1)),t.removeAllRanges(),t.addRange(i)}var fi=Be("svg",{className:Q.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[se("path",{d:"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z"}),se("circle",{cx:"12",cy:"9.5",r:"2.5"})]}),bi=Be("svg",{className:Q.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[se("circle",{cx:"11",cy:"11",r:"7"}),se("path",{d:"m20 20-3.5-3.5"})]});function ha({view:e,searchLabel:n,noResultsLabel:t,useTypedLabel:i,widgetFocused:o,reediting:s=!1,visible:r=!0,interactive:d=!0,onQuery:w,onMove:v,onCommit:x,onFocusChange:m}){let p=he(null),h=he(null),y=he(null),k=he(null),T=he(null),L=he(!1),O=he(!1),X=he(!1),W=he(!1),z=he(o);z.current=o;let N=he(m);N.current=m;let H=c=>{W.current=c,m(c)},G=()=>{let c=p.current;return c!=null&&yt(c)===c},j=()=>{let c=h.current;if(!c)return;let A=yt(c);A instanceof HTMLElement&&A!==p.current&&A!==document.body&&!c.contains(A)&&(k.current=A,T.current=da(A))},E=c=>{let A=h.current;!A||!(c instanceof HTMLElement)||c===k.current||c===document.body||A.contains(c)||(k.current=c,T.current=da(c))},ae=he(null);ae.current===null&&(ae.current=`aia-location-${++gi}`);let ne=`${ae.current}-row-`;la(()=>{let c=p.current;c&&c.value!==e.query&&yt(c)!==c&&(c.value=e.query)},[e.query]),la(()=>{o&&(s&&!X.current&&(O.current=!1),X.current=s);let c=p.current;if(c){if(!r&&G()){O.current=!0,V();return}if(!o){setTimeout(()=>{if(z.current)return;let A=k.current;A&&yt(A)===A||(O.current=!1)},0);return}if(!(!s||O.current||!d||G())){if(j(),H(!0),c.focus({preventScroll:!0}),!G()){O.current=!0,H(!1);return}c.value&&c.select()}}}),mi(()=>()=>{if(!W.current)return;let c=p.current,A=k.current;A?.isConnected&&c&&yt(c)===c&&(L.current=!0,ca(A,T.current),L.current=!1),W.current=!1,N.current(!1)},[]);let V=(c=!1)=>{c&&(O.current=!0);let A=k.current;A?.isConnected&&G()&&(L.current=!0,ca(A,T.current),L.current=!1),H(!1)},ie=e.query.trim(),S=e.highlighted>=0&&e.highlighted<e.places.length?`${ne}${e.highlighted}`:void 0,F=null;return e.places.length>0?F=e.places.map((c,A)=>Be("div",{id:`${ne}${A}`,role:"option","aria-selected":A===e.highlighted,className:A===e.highlighted?`${Q.row} ${Q.highlighted}`:Q.row,"data-aia-location-row":"","data-aia-index":A,onClick:()=>{d&&(V(!0),x(A))},children:[se("span",{className:Q.pin,children:fi}),Be("span",{className:Q.text,children:[se("span",{className:Q.name,children:c.name}),c.secondary&&se("span",{className:Q.secondary,children:c.secondary})]})]},c.id)):e.status==="loading"?F=Be("div",{className:Q.loading,"data-aia-location-loading":"",children:[se("span",{className:Q.loadingBar}),se("span",{className:Q.loadingBar}),se("span",{className:Q.loadingBar})]}):ie&&(F=Be("div",{className:Q.note,"data-aia-location-note":"",children:[e.status==="done"&&se("span",{className:Q.empty,children:t}),se("span",{children:i})]})),Be("div",{ref:h,className:Q.location,"data-aia-location":"",onMouseDown:c=>{!(c.target instanceof Node)||!y.current?.contains(c.target)||(c.stopPropagation(),j(),H(!0))},children:[Be("label",{ref:y,className:Q.field,children:[bi,se("input",{ref:p,type:"text",className:Q.input,"data-aia-location-input":"",defaultValue:e.query,placeholder:n,"aria-label":n,"aria-activedescendant":S,autoComplete:"off",autoCapitalize:"words",enterKeyHint:"done",spellCheck:!1,tabIndex:r?0:-1,onChange:c=>w(c.target.value),onFocus:c=>{E(c.relatedTarget),H(!0)},onBlur:()=>{L.current||(O.current=!0,H(!1))},onKeyDown:c=>{if(!c.nativeEvent.isComposing)switch(c.key){case"ArrowDown":case"ArrowUp":c.preventDefault(),v(c.key==="ArrowDown"?1:-1);return;case"Enter":if(c.preventDefault(),!d)return;V(!0),x();return;case"Escape":c.preventDefault(),c.stopPropagation(),O.current=!0,V();return;case"Backspace":if(c.currentTarget.value!=="")return;c.preventDefault(),O.current=!0,V();return}}})]}),se("div",{className:Q.results,"data-aia-location-results":"","aria-live":"polite",children:F})]})}import{isSmartSuggestion as yi,isTraditionalAutocompleteSuggestion as ki}from"@magicx-eng/ai-autocomplete-vanilla";import{SMART_SUGGESTION_SPARKLE_SVG as wi}from"@magicx-eng/ai-autocomplete-vanilla";if(typeof document<"u"&&!document.getElementById("ac-style-199d0432")){let e=document.createElement("style");e.id="ac-style-199d0432",e.textContent=`/* ParamPill (Figma "ParamPill") \u2014 unfilled suggestion pill: transparent fill,
2333
+ `,document.head.appendChild(e)}var Y={location:"aia-location-6-fsr",field:"aia-field-xEzwi",icon:"aia-icon-czx6C",input:"aia-input-Yi9V-",results:"aia-results-C3O0V",row:"aia-row-Q9y8g",highlighted:"aia-highlighted-RJjPx",pin:"aia-pin-OjabL",text:"aia-text-Xs84O",name:"aia-name-Z-WJR",secondary:"aia-secondary-4sCT1",note:"aia-note-xCSvY",empty:"aia-empty-SYBzi",loading:"aia-loading-Ih1gi",loadingBar:"aia-loadingBar-OLCr4"};import{jsx as oe,jsxs as Ge}from"react/jsx-runtime";var yi=0;function St(e){return e.getRootNode().activeElement??null}function wa(e){return e.getRootNode().getSelection?.()??document.getSelection()}function fa(e){if(!e.isContentEditable)return null;let n=wa(e);if(!n||n.rangeCount===0)return null;let t=n.getRangeAt(0);return e.contains(t.startContainer)?t.cloneRange():null}function ba(e,n){if(e.focus({preventScroll:!0}),!e.isContentEditable)return;let t=wa(e);if(!t)return;let i=n;(!i||!i.startContainer.isConnected||!e.contains(i.startContainer))&&(i=document.createRange(),i.selectNodeContents(e),i.collapse(!1)),t.removeAllRanges(),t.addRange(i)}var ki=Ge("svg",{className:Y.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[oe("path",{d:"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z"}),oe("circle",{cx:"12",cy:"9.5",r:"2.5"})]}),Si=Ge("svg",{className:Y.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[oe("circle",{cx:"11",cy:"11",r:"7"}),oe("path",{d:"m20 20-3.5-3.5"})]});function va({view:e,searchLabel:n,noResultsLabel:t,useTypedLabel:i,widgetFocused:o,reediting:l=!1,visible:r=!0,interactive:d=!0,onQuery:f,onMove:v,onCommit:x,onFocusChange:m}){let p=he(null),h=he(null),y=he(null),S=he(null),T=he(null),D=he(!1),O=he(!1),$=he(!1),F=he(!1),E=he(o);E.current=o;let M=he(m);M.current=m;let H=c=>{F.current=c,m(c)},K=()=>{let c=p.current;return c!=null&&St(c)===c},ne=()=>{let c=h.current;if(!c)return;let k=St(c);k instanceof HTMLElement&&k!==p.current&&k!==document.body&&!c.contains(k)&&(S.current=k,T.current=fa(k))},q=c=>{let k=h.current;!k||!(c instanceof HTMLElement)||c===S.current||c===document.body||k.contains(c)||(S.current=c,T.current=fa(c))},P=he(null);P.current===null&&(P.current=`aia-location-${++yi}`);let Z=`${P.current}-row-`;ga(()=>{let c=p.current;c&&c.value!==e.query&&St(c)!==c&&(c.value=e.query)},[e.query]),ga(()=>{o&&(l&&!$.current&&(O.current=!1),$.current=l);let c=p.current;if(c){if(!r&&K()){O.current=!0,_();return}if(!o){setTimeout(()=>{if(E.current)return;let k=S.current;k&&St(k)===k||(O.current=!1)},0);return}if(!(!l||O.current||!d||K())){if(ne(),H(!0),c.focus({preventScroll:!0}),!K()){O.current=!0,H(!1);return}c.value&&c.select()}}}),xi(()=>()=>{if(!F.current)return;let c=p.current,k=S.current;k?.isConnected&&c&&St(c)===c&&(D.current=!0,ba(k,T.current),D.current=!1),F.current=!1,M.current(!1)},[]);let _=(c=!1)=>{c&&(O.current=!0);let k=S.current;k?.isConnected&&K()&&(D.current=!0,ba(k,T.current),D.current=!1),H(!1)},se=e.query.trim(),A=e.highlighted>=0&&e.highlighted<e.places.length?`${Z}${e.highlighted}`:void 0,G=null;return e.places.length>0?G=e.places.map((c,k)=>Ge("div",{id:`${Z}${k}`,role:"option","aria-selected":k===e.highlighted,className:k===e.highlighted?`${Y.row} ${Y.highlighted}`:Y.row,"data-aia-location-row":"","data-aia-index":k,onClick:()=>{d&&(_(!0),x(k))},children:[oe("span",{className:Y.pin,children:ki}),Ge("span",{className:Y.text,children:[oe("span",{className:Y.name,children:c.name}),c.secondary&&oe("span",{className:Y.secondary,children:c.secondary})]})]},c.id)):e.status==="loading"?G=Ge("div",{className:Y.loading,"data-aia-location-loading":"",children:[oe("span",{className:Y.loadingBar}),oe("span",{className:Y.loadingBar}),oe("span",{className:Y.loadingBar})]}):se&&(G=Ge("div",{className:Y.note,"data-aia-location-note":"",children:[e.status==="done"&&oe("span",{className:Y.empty,children:t}),oe("span",{children:i})]})),Ge("div",{ref:h,className:Y.location,"data-aia-location":"",onMouseDown:c=>{!(c.target instanceof Node)||!y.current?.contains(c.target)||(c.stopPropagation(),ne(),H(!0))},children:[Ge("label",{ref:y,className:Y.field,children:[Si,oe("input",{ref:p,type:"text",className:Y.input,"data-aia-location-input":"",defaultValue:e.query,placeholder:n,"aria-label":n,"aria-activedescendant":A,autoComplete:"off",autoCapitalize:"words",enterKeyHint:"done",spellCheck:!1,tabIndex:r?0:-1,onChange:c=>f(c.target.value),onFocus:c=>{q(c.relatedTarget),H(!0)},onBlur:()=>{D.current||(O.current=!0,H(!1))},onKeyDown:c=>{if(!c.nativeEvent.isComposing)switch(c.key){case"ArrowDown":case"ArrowUp":c.preventDefault(),v(c.key==="ArrowDown"?1:-1);return;case"Enter":if(c.preventDefault(),!d)return;_(!0),x();return;case"Escape":c.preventDefault(),c.stopPropagation(),O.current=!0,_();return;case"Backspace":if(c.currentTarget.value!=="")return;c.preventDefault(),O.current=!0,_();return}}})]}),oe("div",{className:Y.results,"data-aia-location-results":"","aria-live":"polite",children:G})]})}import{isSmartSuggestion as Ii,isTraditionalAutocompleteSuggestion as Ai}from"@magicx-eng/ai-autocomplete-vanilla";import{SMART_SUGGESTION_SPARKLE_SVG as Ci}from"@magicx-eng/ai-autocomplete-vanilla";if(typeof document<"u"&&!document.getElementById("ac-style-199d0432")){let e=document.createElement("style");e.id="ac-style-199d0432",e.textContent=`/* ParamPill (Figma "ParamPill") \u2014 unfilled suggestion pill: transparent fill,
2334
2334
  no outline. ~28px via 6px padding + 14px text + the 1px border (border-box).
2335
2335
  The border is kept as a 1px transparent line so the box stays the same size
2336
2336
  as it was when the outline was dashed. */
@@ -2488,7 +2488,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
2488
2488
  opacity: 0;
2489
2489
  }
2490
2490
  }
2491
- `,document.head.appendChild(e)}var Ce={pill:"aia-pill-6Ga7S",fadeIn:"aia-fadeIn-Ux4eQ",rounded:"aia-rounded-y7xA9",smartText:"aia-smartText-R0cfw","smartSuggestion-shimmer":"aia-smartSuggestion-shimmer-F-yoD",smartSparkle:"aia-smartSparkle-IVabG","smartSuggestion-sparkle":"aia-smartSuggestion-sparkle-Wfj-4","smartSuggestion-sparkle-small":"aia-smartSuggestion-sparkle-small-3VsWJ",skeleton:"aia-skeleton-57P0T",loadingOut:"aia-loadingOut-Aj9xO"};import{Fragment as vi,jsx as Lt,jsxs as xi}from"react/jsx-runtime";var Dt={selected:1,first:.7,next:.4,last:.2};function ua({label:e,state:n,active:t,rounded:i,loading:o,smartSuggestion:s,completionHeader:r,onClick:d}){let w=[Ce.pill,i?Ce.rounded:"",o?Ce.skeleton:""].filter(Boolean).join(" ");return Lt("button",{type:"button","data-aia-pill":"","data-aia-pill-active":t?"":void 0,"data-aia-loading":o?"":void 0,"data-aia-smart-suggestion":s?r?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:w,style:{"--aia-pill-opacity":Dt[n]},onMouseDown:v=>v.preventDefault(),onClick:o?void 0:d,disabled:o,children:s?xi(vi,{children:[Lt("span",{className:`${Ce.smartText} magicx-aia-smart-suggestion-text`,children:e}),Lt("span",{className:`${Ce.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:wi}})]}):e})}if(typeof document<"u"&&!document.getElementById("ac-style-0fcb7940")){let e=document.createElement("style");e.id="ac-style-0fcb7940",e.textContent=`.aia-list-qvLqO {
2491
+ `,document.head.appendChild(e)}var Pe={pill:"aia-pill-6Ga7S",fadeIn:"aia-fadeIn-Ux4eQ",rounded:"aia-rounded-y7xA9",smartText:"aia-smartText-R0cfw","smartSuggestion-shimmer":"aia-smartSuggestion-shimmer-F-yoD",smartSparkle:"aia-smartSparkle-IVabG","smartSuggestion-sparkle":"aia-smartSuggestion-sparkle-Wfj-4","smartSuggestion-sparkle-small":"aia-smartSuggestion-sparkle-small-3VsWJ",skeleton:"aia-skeleton-57P0T",loadingOut:"aia-loadingOut-Aj9xO"};import{Fragment as Ti,jsx as Ht,jsxs as Pi}from"react/jsx-runtime";var Bt={selected:1,first:.7,next:.4,last:.2};function xa({label:e,state:n,active:t,rounded:i,loading:o,smartSuggestion:l,completionHeader:r,onClick:d}){let f=[Pe.pill,i?Pe.rounded:"",o?Pe.skeleton:""].filter(Boolean).join(" ");return Ht("button",{type:"button","data-aia-pill":"","data-aia-pill-active":t?"":void 0,"data-aia-loading":o?"":void 0,"data-aia-smart-suggestion":l?r?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:f,style:{"--aia-pill-opacity":Bt[n]},onMouseDown:v=>v.preventDefault(),onClick:o?void 0:d,disabled:o,children:l?Pi(Ti,{children:[Ht("span",{className:`${Pe.smartText} magicx-aia-smart-suggestion-text`,children:e}),Ht("span",{className:`${Pe.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:Ci}})]}):e})}if(typeof document<"u"&&!document.getElementById("ac-style-0fcb7940")){let e=document.createElement("style");e.id="ac-style-0fcb7940",e.textContent=`.aia-list-qvLqO {
2492
2492
  position: relative;
2493
2493
  z-index: 1;
2494
2494
  pointer-events: auto;
@@ -2498,7 +2498,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
2498
2498
  align-items: center;
2499
2499
  vertical-align: middle;
2500
2500
  }
2501
- `,document.head.appendChild(e)}var Mt={list:"aia-list-qvLqO"};import{jsx as Ct}from"react/jsx-runtime";var Si=[125,69];function ma(e){return e===0?"first":e===1?"next":"last"}function Tt({pills:e,activePillIndex:n,onSelectPill:t,activeSelected:i,rounded:o,loading:s}){return s&&e.length===0?Ct("span",{className:Mt.list,"data-aia-pill-list-loading":"",children:Si.map((r,d)=>Ct("span",{"data-aia-pill-skeleton":"",className:`${Ce.pill} ${o?Ce.rounded:""} ${Ce.skeleton}`,style:{width:r,"--aia-pill-opacity":Dt[ma(d)]}},`skel-${r}`))}):Ct("span",{className:Mt.list,"data-aia-pill-list-loading":s?"":void 0,children:e.map((r,d)=>{let w=!!i&&d===n;return Ct(ua,{label:r.text,state:w?"selected":ma(d),selected:w,active:d===n,rounded:o,loading:s,smartSuggestion:yi(r),completionHeader:ki(r),onClick:()=>t(d)},`${r.parameter}-${r.text}`)})})}import{attachProductRowWheel as Ci,productImageSources as Ti,productImageSrc as Pi,productInitial as Ii,productPhotoFill as Ai,uiStringsFor as Ei}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Nt,useRef as Pt,useState as It}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-fef1688d")){let e=document.createElement("style");e.id="ac-style-fef1688d",e.textContent=`/* Product strip \u2014 the React counterpart of the vanilla core's strip rules
2501
+ `,document.head.appendChild(e)}var Wt={list:"aia-list-qvLqO"};import{jsx as At}from"react/jsx-runtime";var Ei=[125,69];function ya(e){return e===0?"first":e===1?"next":"last"}function Et({pills:e,activePillIndex:n,onSelectPill:t,activeSelected:i,rounded:o,loading:l}){return l&&e.length===0?At("span",{className:Wt.list,"data-aia-pill-list-loading":"",children:Ei.map((r,d)=>At("span",{"data-aia-pill-skeleton":"",className:`${Pe.pill} ${o?Pe.rounded:""} ${Pe.skeleton}`,style:{width:r,"--aia-pill-opacity":Bt[ya(d)]}},`skel-${r}`))}):At("span",{className:Wt.list,"data-aia-pill-list-loading":l?"":void 0,children:e.map((r,d)=>{let f=!!i&&d===n;return At(xa,{label:r.text,state:f?"selected":ya(d),selected:f,active:d===n,rounded:o,loading:l,smartSuggestion:Ii(r),completionHeader:Ai(r),onClick:()=>t(d)},`${r.parameter}-${r.text}`)})})}import{attachProductRowWheel as Ri,productImageSources as zi,productImageSrc as Li,productInitial as Oi,productPhotoFill as Di,uiStringsFor as Mi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Gt,useRef as Rt,useState as zt}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-fef1688d")){let e=document.createElement("style");e.id="ac-style-fef1688d",e.textContent=`/* Product strip \u2014 the React counterpart of the vanilla core's strip rules
2502
2502
  (packages/vanilla/src/styles.css). Same tokens, same defaults, so a consumer
2503
2503
  theming one package sees the same result in the other.
2504
2504
 
@@ -3125,7 +3125,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
3125
3125
  opacity: 0.01;
3126
3126
  }
3127
3127
  }
3128
- `,document.head.appendChild(e)}var Y={section:"aia-section-Hugfg",label:"aia-label-nuc93",row:"aia-row-WDVBX",card:"aia-card-JBGYT",media:"aia-media-RrbGe",image:"aia-image-5pNL7",body:"aia-body-ly032",vendor:"aia-vendor-Gvu7G",title:"aia-title-gCNmq",price:"aia-price-gULcE",compareAt:"aia-compareAt-ewE54",badge:"aia-badge-j9Hcd",cart:"aia-cart-kSlqU",cartCheck:"aia-cartCheck-YTTQ6",cartGlyph:"aia-cartGlyph-cmqAk",cartSpinner:"aia-cartSpinner-442rc","magicx-aia-product-cart-spin":"aia-magicx-aia-product-cart-spin-x8mgr",stripLoadingOut:"aia-stripLoadingOut-0jOOQ",stripFadeIn:"aia-stripFadeIn-0p9qx"};import{jsx as oe,jsxs as st}from"react/jsx-runtime";function ga({products:e,listboxId:n,onSelect:t,busyProductId:i=null,onAddToCart:o,onFocusChange:s,focusable:r=!0,loading:d=!1,layout:w="row",imageFallback:v="image",showVendor:x=!0,strings:m=Ei()}){let p=e.length>0,h=Pt(null);if(Nt(()=>{let k=h.current;if(!(!p||!k))return Ci(k)},[p]),!p)return null;let y=`${n}-products-label`;return st("section",{className:Y.section,"data-aia-products":"","data-aia-loading":d?"":void 0,"data-aia-products-layout":w,role:"group","aria-labelledby":y,children:[oe("div",{className:Y.label,id:y,"data-aia-products-label":"",children:m.products}),oe("div",{ref:h,className:Y.row,"data-aia-products-row":"",children:e.map((k,T)=>oe(zi,{product:k,id:`${n}-product-${T}`,onSelect:t,busy:k.id===i,onAddToCart:o,onFocusChange:s,focusable:r,imageFallback:v,showVendor:x,soldOut:m.soldOut,addToCart:m.addToCart},k.id))})]})}function zi({product:e,id:n,onSelect:t,busy:i,onAddToCart:o,onFocusChange:s,focusable:r,imageFallback:d,showVendor:w,soldOut:v,addToCart:x}){let m=!!o&&e.available!==!1,[p,h]=It(null),y=T=>{T.relatedTarget?.closest("[data-aia-dropdown]")||s?.(!1)},k=T=>{T.metaKey||T.ctrlKey||T.shiftKey||T.altKey||T.button!==0||(T.preventDefault(),t(e))};return st("a",{id:n,className:Y.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":m?"":void 0,"data-aia-product-state":i?"busy":void 0,"aria-busy":i?!0:void 0,role:"option","aria-selected":!1,style:p?{"--aia-product-photo-fill-x":String(p.x),"--aia-product-photo-fill-y":String(p.y)}:void 0,href:e.url,tabIndex:r?0:-1,onClick:k,onKeyDown:T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),t(e))},onFocus:()=>s?.(!0),onBlur:y,children:[oe(Li,{sources:Ti(e.imageUrl),title:e.title,fallback:d,onPhotoFill:h},Pi(e.imageUrl)??""),st("span",{className:Y.body,children:[w&&e.vendor?oe("span",{className:Y.vendor,children:e.vendor}):null,oe("span",{className:Y.title,children:e.title}),e.price?st("span",{className:Y.price,children:[e.price,e.compareAtPrice?oe("s",{className:Y.compareAt,children:e.compareAtPrice}):null]}):null,e.available===!1?oe("span",{className:Y.badge,children:v}):null]}),m&&o?oe(Oi,{product:e,label:`${x}: ${e.title}`,focusable:r,onAddToCart:o,onFocus:()=>s?.(!0),onBlur:y},Ri(e)):null]})}function Ri(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(n=>n??"").join("\0")}function Oi({product:e,label:n,focusable:t,onAddToCart:i,onFocus:o,onBlur:s}){let[r,d]=It(null),w=Pt(null),v=Pt(e);v.current=e;let x=Pt(!0);Nt(()=>(x.current=!0,()=>{x.current=!1}),[]);let m=h=>{w.current=h,x.current&&d(h)},p=h=>{if(h.preventDefault(),h.stopPropagation(),w.current==="adding")return;m("adding");let y;try{y=Promise.resolve(i(v.current))}catch(k){y=Promise.reject(k)}y.then(()=>m("added"),()=>m(null))};return oe("span",{className:Y.cart,"data-aia-product-cart":"","data-aia-cart-state":r??void 0,"aria-busy":r==="adding"?!0:void 0,role:"button","aria-label":n,tabIndex:t?0:-1,onClick:p,onKeyDown:h=>{h.key!=="Enter"&&h.key!==" "||p(h)},onFocus:h=>{h.stopPropagation(),o()},onBlur:h=>{h.stopPropagation(),s(h)},children:st("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[oe("path",{className:Y.cartGlyph,d:"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6"}),oe("path",{className:Y.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),oe("path",{className:Y.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),oe("path",{className:Y.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),oe("circle",{className:Y.cartGlyph,cx:"9",cy:"20",r:"1.3"}),oe("circle",{className:Y.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function Li({sources:e,title:n,fallback:t,onPhotoFill:i}){let[o,s]=It(0),r=e[o],d=!!r,[w,v]=It(null),x=!d&&t==="initial";return Nt(()=>()=>i(null),[i]),st("span",{className:Y.media,"data-aia-product-media":"","aria-hidden":"true","data-aia-product-placeholder":!d&&!x?"":void 0,"data-aia-product-initial":x?"":void 0,"data-aia-image-loaded":d&&w===r?"":void 0,children:[d?oe("img",{className:Y.image,src:r,alt:"",loading:"lazy",decoding:"async",onLoad:m=>{v(r),i(Ai(m.currentTarget.naturalWidth,m.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&i(null),s(m=>m+1)}}):null,x?Ii(n):null]})}import{isOptionsGridMobileViewport as Qi,measureOptionsGrid as Yi,needsOptionsGridMeasurement as ji,OPTIONS_GRID_MOBILE_QUERY as $i,optionEnterDelayMs as Zi,optionsShowLeadingVisuals as Xi,planOptionsGrid as xa,pointerMayHighlight as ya,releasePanelHug as Ji,sameOptionRows as eo,syncHighlightScroll as to,syncPanelHug as ao}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as io,useLayoutEffect as Ft,useRef as ka,useState as Ca}from"react";import{optionsGridTemplateColumns as Di}from"@magicx-eng/ai-autocomplete-vanilla";import{useLayoutEffect as Mi,useRef as Ni}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-948e58da")){let e=document.createElement("style");e.id="ac-style-948e58da",e.textContent=`.aia-grid {
3128
+ `,document.head.appendChild(e)}var j={section:"aia-section-Hugfg",label:"aia-label-nuc93",row:"aia-row-WDVBX",card:"aia-card-JBGYT",media:"aia-media-RrbGe",image:"aia-image-5pNL7",body:"aia-body-ly032",vendor:"aia-vendor-Gvu7G",title:"aia-title-gCNmq",price:"aia-price-gULcE",compareAt:"aia-compareAt-ewE54",badge:"aia-badge-j9Hcd",cart:"aia-cart-kSlqU",cartCheck:"aia-cartCheck-YTTQ6",cartGlyph:"aia-cartGlyph-cmqAk",cartSpinner:"aia-cartSpinner-442rc","magicx-aia-product-cart-spin":"aia-magicx-aia-product-cart-spin-x8mgr",stripLoadingOut:"aia-stripLoadingOut-0jOOQ",stripFadeIn:"aia-stripFadeIn-0p9qx"};import{jsx as te,jsxs as ut}from"react/jsx-runtime";function ka({products:e,listboxId:n,onSelect:t,busyProductId:i=null,onAddToCart:o,onFocusChange:l,focusable:r=!0,loading:d=!1,layout:f="row",imageFallback:v="image",showVendor:x=!0,strings:m=Mi()}){let p=e.length>0,h=Rt(null);if(Gt(()=>{let S=h.current;if(!(!p||!S))return Ri(S)},[p]),!p)return null;let y=`${n}-products-label`;return ut("section",{className:j.section,"data-aia-products":"","data-aia-loading":d?"":void 0,"data-aia-products-layout":f,role:"group","aria-labelledby":y,children:[te("div",{className:j.label,id:y,"data-aia-products-label":"",children:m.products}),te("div",{ref:h,className:j.row,"data-aia-products-row":"",children:e.map((S,T)=>te(Ni,{product:S,id:`${n}-product-${T}`,onSelect:t,busy:S.id===i,onAddToCart:o,onFocusChange:l,focusable:r,imageFallback:v,showVendor:x,soldOut:m.soldOut,addToCart:m.addToCart},S.id))})]})}function Ni({product:e,id:n,onSelect:t,busy:i,onAddToCart:o,onFocusChange:l,focusable:r,imageFallback:d,showVendor:f,soldOut:v,addToCart:x}){let m=!!o&&e.available!==!1,[p,h]=zt(null),y=T=>{T.relatedTarget?.closest("[data-aia-dropdown]")||l?.(!1)},S=T=>{T.metaKey||T.ctrlKey||T.shiftKey||T.altKey||T.button!==0||(T.preventDefault(),t(e))};return ut("a",{id:n,className:j.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":m?"":void 0,"data-aia-product-state":i?"busy":void 0,"aria-busy":i?!0:void 0,role:"option","aria-selected":!1,style:p?{"--aia-product-photo-fill-x":String(p.x),"--aia-product-photo-fill-y":String(p.y)}:void 0,href:e.url,tabIndex:r?0:-1,onClick:S,onKeyDown:T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),t(e))},onFocus:()=>l?.(!0),onBlur:y,children:[te(Bi,{sources:zi(e.imageUrl),title:e.title,fallback:d,onPhotoFill:h},Li(e.imageUrl)??""),ut("span",{className:j.body,children:[f&&e.vendor?te("span",{className:j.vendor,children:e.vendor}):null,te("span",{className:j.title,children:e.title}),e.price?ut("span",{className:j.price,children:[e.price,e.compareAtPrice?te("s",{className:j.compareAt,children:e.compareAtPrice}):null]}):null,e.available===!1?te("span",{className:j.badge,children:v}):null]}),m&&o?te(Hi,{product:e,label:`${x}: ${e.title}`,focusable:r,onAddToCart:o,onFocus:()=>l?.(!0),onBlur:y},Fi(e)):null]})}function Fi(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(n=>n??"").join("\0")}function Hi({product:e,label:n,focusable:t,onAddToCart:i,onFocus:o,onBlur:l}){let[r,d]=zt(null),f=Rt(null),v=Rt(e);v.current=e;let x=Rt(!0);Gt(()=>(x.current=!0,()=>{x.current=!1}),[]);let m=h=>{f.current=h,x.current&&d(h)},p=h=>{if(h.preventDefault(),h.stopPropagation(),f.current==="adding")return;m("adding");let y;try{y=Promise.resolve(i(v.current))}catch(S){y=Promise.reject(S)}y.then(()=>m("added"),()=>m(null))};return te("span",{className:j.cart,"data-aia-product-cart":"","data-aia-cart-state":r??void 0,"aria-busy":r==="adding"?!0:void 0,role:"button","aria-label":n,tabIndex:t?0:-1,onClick:p,onKeyDown:h=>{h.key!=="Enter"&&h.key!==" "||p(h)},onFocus:h=>{h.stopPropagation(),o()},onBlur:h=>{h.stopPropagation(),l(h)},children:ut("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[te("path",{className:j.cartGlyph,d:"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6"}),te("path",{className:j.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),te("path",{className:j.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),te("path",{className:j.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),te("circle",{className:j.cartGlyph,cx:"9",cy:"20",r:"1.3"}),te("circle",{className:j.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function Bi({sources:e,title:n,fallback:t,onPhotoFill:i}){let[o,l]=zt(0),r=e[o],d=!!r,[f,v]=zt(null),x=!d&&t==="initial";return Gt(()=>()=>i(null),[i]),ut("span",{className:j.media,"data-aia-product-media":"","aria-hidden":"true","data-aia-product-placeholder":!d&&!x?"":void 0,"data-aia-product-initial":x?"":void 0,"data-aia-image-loaded":d&&f===r?"":void 0,children:[d?te("img",{className:j.image,src:r,alt:"",loading:"lazy",decoding:"async",onLoad:m=>{v(r),i(Di(m.currentTarget.naturalWidth,m.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&i(null),l(m=>m+1)}}):null,x?Oi(n):null]})}import{isOptionsGridMobileViewport as Ji,measureOptionsGrid as eo,needsOptionsGridMeasurement as to,OPTIONS_GRID_MOBILE_QUERY as ao,optionEnterDelayMs as io,optionsShowLeadingVisuals as oo,planOptionsGrid as Ia,pointerMayHighlight as Aa,releasePanelHug as no,sameOptionRows as ro,syncHighlightScroll as so,syncPanelHug as lo}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as co,useLayoutEffect as qt,useRef as Ea,useState as za}from"react";import{optionsGridTemplateColumns as Wi}from"@magicx-eng/ai-autocomplete-vanilla";import{useLayoutEffect as Gi,useRef as Ki}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-948e58da")){let e=document.createElement("style");e.id="ac-style-948e58da",e.textContent=`.aia-grid {
3129
3129
  display: grid;
3130
3130
  grid-template-columns: repeat(
3131
3131
  auto-fit,
@@ -3169,7 +3169,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
3169
3169
  :where([data-aia-options-style="classic"]) .aia-grid[data-scroll] {
3170
3170
  max-height: var(--aia-grid-max-height, 120px);
3171
3171
  }
3172
- `,document.head.appendChild(e)}import{jsx as Hi}from"react/jsx-runtime";function fa({min:e="16rem",max:n,gap:t,scroll:i=!1,maxHeight:o,scrollResetKey:s,cols:r,template:d,innerRef:w,className:v,children:x,...m}){let p=Ni(null);Mi(()=>{if(s===void 0)return;let y=p.current;y&&(y.scrollTop=0)},[s]);let h={"--aia-grid-min":e};return n&&(h["--aia-grid-max"]=n),t&&(h["--aia-grid-gap"]=t),o&&(h["--aia-grid-max-height"]=o),r&&(h.gridTemplateColumns=Di(r)),d&&(h.gridTemplateColumns=d),Hi("div",{ref:y=>{p.current=y,w?.(y)},className:v?`aia-grid ${v}`:"aia-grid","data-scroll":i||void 0,style:h,...m,children:x})}import{formatOptionCount as Fi,highlightParts as Bi,isMultiSelectToggleTap as Wi,OPTION_ENTER_DELAY_VAR as Gi,optionImageSources as ba,optionLabel as wa,sanitizeOptionIconSvg as Ki}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as qi,useMemo as Vi,useRef as _i,useState as kt}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-82820da7")){let e=document.createElement("style");e.id="ac-style-82820da7",e.textContent=`.aia-item-d4vpD {
3172
+ `,document.head.appendChild(e)}import{jsx as qi}from"react/jsx-runtime";function Sa({min:e="16rem",max:n,gap:t,scroll:i=!1,maxHeight:o,scrollResetKey:l,cols:r,template:d,innerRef:f,className:v,children:x,...m}){let p=Ki(null);Gi(()=>{if(l===void 0)return;let y=p.current;y&&(y.scrollTop=0)},[l]);let h={"--aia-grid-min":e};return n&&(h["--aia-grid-max"]=n),t&&(h["--aia-grid-gap"]=t),o&&(h["--aia-grid-max-height"]=o),r&&(h.gridTemplateColumns=Wi(r)),d&&(h.gridTemplateColumns=d),qi("div",{ref:y=>{p.current=y,f?.(y)},className:v?`aia-grid ${v}`:"aia-grid","data-scroll":i||void 0,style:h,...m,children:x})}import{formatOptionCount as _i,highlightParts as Vi,isMultiSelectToggleTap as Ui,OPTION_ENTER_DELAY_VAR as Qi,optionImageSources as Ca,optionLabel as Ta,sanitizeOptionIconSvg as Yi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as ji,useMemo as $i,useRef as Zi,useState as Ct}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-82820da7")){let e=document.createElement("style");e.id="ac-style-82820da7",e.textContent=`.aia-item-d4vpD {
3173
3173
  position: relative;
3174
3174
  /* Clip, not visible: the entrance rise below runs on the inner content,
3175
3175
  and a transformed box extends its scroll container's scrollable area.
@@ -3695,7 +3695,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
3695
3695
  border-radius: 6px;
3696
3696
  font-size: 11px;
3697
3697
  }
3698
- `,document.head.appendChild(e)}var ee={item:"aia-item-d4vpD",content:"aia-content-T-Qba",riseIn:"aia-riseIn-etXZT",fadeIn:"aia-fadeIn-I8u35",tappable:"aia-tappable-70KcX",nonTappable:"aia-nonTappable-xSZM-",highlighted:"aia-highlighted-Hb0SU",liveMatch:"aia-liveMatch--eYfs",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",pressCompress:"aia-pressCompress-ICV3q",scrollHint:"aia-scrollHint-xKXPt",loadingOut:"aia-loadingOut-hI-qI",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",text:"aia-text-yqoh9",checkbox:"aia-checkbox-KGRhg"};import{Fragment as Ui,jsx as ue,jsxs as Ht}from"react/jsx-runtime";function va({option:e,isHighlighted:n,checked:t,onSelect:i,onHighlight:o,onUnhighlight:s,id:r,loading:d,showIcon:w=!0,showImage:v=!0,showCount:x=!0,scrollHint:m,enterDelayMs:p=0}){let[h]=kt(p),[y,k]=kt(!1),T=v?ba(e.image_url):[],L=T[0]??null,[O,X]=kt([]),W=T.find(S=>!O.includes(S))??null,z=v?(e.imageCollage??[]).map(S=>ba(S)[0]).filter(S=>S!==void 0):[],[N,H]=kt(!1),[G,j]=kt(null),E=Vi(()=>!L&&w&&e.icon_svg?Ki(e.icon_svg):null,[L,w,e.icon_svg]),ae=x?Fi(e.item_count):null,ne=_i(void 0);qi(()=>()=>clearTimeout(ne.current),[]);let V=S=>{if(d||!e.is_tappable||y&&t===void 0)return;k(!0);let F=S?.currentTarget;t!==void 0&&F!==void 0&&S!==void 0&&!Wi(F,F.querySelector("[data-aia-checkbox]"),S)?i(e,{commit:!0}):i(e),clearTimeout(ne.current),ne.current=setTimeout(()=>k(!1),170)},ie=[ee.item,n&&!d?ee.highlighted:"",e.liveMatch&&!d?ee.liveMatch:"",e.is_tappable?ee.tappable:ee.nonTappable,y?ee.pressed:"",m?ee.scrollHint:""].filter(Boolean).join(" ");return ue("div",{id:r,role:"option","data-aia-option":"","data-aia-loading":d?"":void 0,"data-aia-icon":E&&e.icon?e.icon:void 0,"data-aia-image":L?"":void 0,"data-aia-item-count":ae!==null?e.item_count:void 0,"aria-selected":t??n,className:ie,style:{[Gi]:`${h}ms`},tabIndex:d||!e.is_tappable?-1:0,onClick:V,onKeyDown:S=>{!d&&e.is_tappable&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),V())},onMouseEnter:!d&&e.is_tappable?o:void 0,onMouseLeave:s,children:Ht("span",{className:ee.content,children:[t!==void 0&&e.is_tappable&&ue("span",{className:ee.checkbox,"aria-hidden":"true","data-aia-checkbox":"","data-checked":t,children:t?"\u2713":""}),L&&z.length>1&&ue("span",{className:`${ee.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-collage":z.length,"data-aia-image-loaded":N?"":void 0,children:z.map(S=>ue("img",{src:S,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,onLoad:()=>H(!0),onError:F=>{F.currentTarget.hidden=!0}},S))}),L&&z.length<=1&&ue("span",{className:`${ee.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":W!==null&&G===W?"":void 0,children:ue("img",{src:W??L,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:W===null,onLoad:()=>j(W),onError:()=>{W!==null&&X(S=>[...S,W])}})}),E&&ue("span",{className:`${ee.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:E}}),Ht("span",{className:ee.text,children:[e.matchedText?Bi(wa(e),e.matchedText).map((S,F)=>S.bold?ue("strong",{className:`${ee.match} magicx-aia-option-match`,"data-aia-match-partial":S.partial?"":void 0,children:S.text},F):S.text):wa(e),e.parameterLabel&&Ht(Ui,{children:[" ",ue("span",{className:`${ee.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&ue("span",{className:ee.tag,children:e.tag}),ae!==null&&ue("span",{className:`${ee.count} magicx-aia-option-count`,children:ae})]})})}import{jsx as Sa}from"react/jsx-runtime";function oo(){let[e,n]=Ca(Qi);return io(()=>{if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia($i),i=()=>n(t.matches);return i(),t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}function Ta({options:e,activeIndex:n,picked:t,onSelect:i,onHighlight:o,onUnhighlight:s,listboxId:r,loading:d,groupKey:w="",optionsPosition:v="below",showIcons:x=!0,showImages:m=!0,showCounts:p=!0}){let h=oo(),y=ka(null),[k,T]=Ca(null),L=ka(null);Ft(()=>{if(d&&eo(L.current,e))return;L.current=d?null:e;let z=y.current,N=z&&!d&&ji(e.length,h),H=z?.closest("[data-aia-dropdown]");N&&H&&Ji(H);let G=N?Yi(z):null;T(G?xa(e.length,h,G.rowWidths,G.gridWidth):null)},[e,h,d]);let O=k??xa(e.length,h,null,null);Ft(()=>{let z=y.current?.closest("[data-aia-dropdown]");z&&ao(z)},[O.template,h]);let X=d?-1:n;Ft(()=>{y.current&&to(y.current,X)},[X]);let W=Xi(e,x,m);return Sa(fa,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:w,template:O.template,maxHeight:O.maxHeight,innerRef:z=>{y.current=z},"data-aia-group":w,children:e.map((z,N)=>Sa(va,{option:z,isHighlighted:N===n,checked:t?t.includes(z.text):void 0,onSelect:i,onHighlight:H=>{ya(y.current,N,H)&&o(N)},onUnhighlight:s?H=>{ya(y.current,-1,H)&&s(N)}:void 0,id:`${r}-option-${N}`,loading:d,showIcon:x&&W,showImage:m&&W,showCount:p,scrollHint:!d&&O.scrollHintIndices.includes(N),enterDelayMs:d?0:Zi(N,O.cols,e.length,v)},`${w}\0${z.parameter??""}\0${z.text}`))})}import{formatTime as no,TIME_WHEEL_COLUMNS as ro,TIME_WHEEL_ROW_HEIGHT as so,timeWheelIndex as Pa,timeWheelIndexFromScroll as lo,timeWheelRows as co,withTimeWheelIndex as Ia}from"@magicx-eng/ai-autocomplete-vanilla";import{Fragment as po,useEffect as ho,useLayoutEffect as uo,useRef as At}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-52a922cb")){let e=document.createElement("style");e.id="ac-style-52a922cb",e.textContent=`/* --- Time wheel (replaces the options grid for time suggestions) ---
3698
+ `,document.head.appendChild(e)}var X={item:"aia-item-d4vpD",content:"aia-content-T-Qba",riseIn:"aia-riseIn-etXZT",fadeIn:"aia-fadeIn-I8u35",tappable:"aia-tappable-70KcX",nonTappable:"aia-nonTappable-xSZM-",highlighted:"aia-highlighted-Hb0SU",liveMatch:"aia-liveMatch--eYfs",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",pressCompress:"aia-pressCompress-ICV3q",scrollHint:"aia-scrollHint-xKXPt",loadingOut:"aia-loadingOut-hI-qI",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",text:"aia-text-yqoh9",checkbox:"aia-checkbox-KGRhg"};import{Fragment as Xi,jsx as we,jsxs as Kt}from"react/jsx-runtime";function Pa({option:e,isHighlighted:n,checked:t,onSelect:i,onHighlight:o,onUnhighlight:l,id:r,loading:d,showIcon:f=!0,showImage:v=!0,showCount:x=!0,scrollHint:m,enterDelayMs:p=0}){let[h]=Ct(p),[y,S]=Ct(!1),T=v?Ca(e.image_url):[],D=T[0]??null,[O,$]=Ct([]),F=T.find(A=>!O.includes(A))??null,E=v?(e.imageCollage??[]).map(A=>Ca(A)[0]).filter(A=>A!==void 0):[],[M,H]=Ct(!1),[K,ne]=Ct(null),q=$i(()=>!D&&f&&e.icon_svg?Yi(e.icon_svg):null,[D,f,e.icon_svg]),P=x?_i(e.item_count):null,Z=Zi(void 0);ji(()=>()=>clearTimeout(Z.current),[]);let _=A=>{if(d||!e.is_tappable||y&&t===void 0)return;S(!0);let G=A?.currentTarget;t!==void 0&&G!==void 0&&A!==void 0&&!Ui(G,G.querySelector("[data-aia-checkbox]"),A)?i(e,{commit:!0}):i(e),clearTimeout(Z.current),Z.current=setTimeout(()=>S(!1),170)},se=[X.item,n&&!d?X.highlighted:"",e.liveMatch&&!d?X.liveMatch:"",e.is_tappable?X.tappable:X.nonTappable,y?X.pressed:"",m?X.scrollHint:""].filter(Boolean).join(" ");return we("div",{id:r,role:"option","data-aia-option":"","data-aia-loading":d?"":void 0,"data-aia-icon":q&&e.icon?e.icon:void 0,"data-aia-image":D?"":void 0,"data-aia-item-count":P!==null?e.item_count:void 0,"aria-selected":t??n,className:se,style:{[Qi]:`${h}ms`},tabIndex:d||!e.is_tappable?-1:0,onClick:_,onKeyDown:A=>{!d&&e.is_tappable&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),_())},onMouseEnter:!d&&e.is_tappable?o:void 0,onMouseLeave:l,children:Kt("span",{className:X.content,children:[t!==void 0&&e.is_tappable&&we("span",{className:X.checkbox,"aria-hidden":"true","data-aia-checkbox":"","data-checked":t,children:t?"\u2713":""}),D&&E.length>1&&we("span",{className:`${X.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-collage":E.length,"data-aia-image-loaded":M?"":void 0,children:E.map(A=>we("img",{src:A,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,onLoad:()=>H(!0),onError:G=>{G.currentTarget.hidden=!0}},A))}),D&&E.length<=1&&we("span",{className:`${X.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":F!==null&&K===F?"":void 0,children:we("img",{src:F??D,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:F===null,onLoad:()=>ne(F),onError:()=>{F!==null&&$(A=>[...A,F])}})}),q&&we("span",{className:`${X.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:q}}),Kt("span",{className:X.text,children:[e.matchedText?Vi(Ta(e),e.matchedText).map((A,G)=>A.bold?we("strong",{className:`${X.match} magicx-aia-option-match`,"data-aia-match-partial":A.partial?"":void 0,children:A.text},G):A.text):Ta(e),e.parameterLabel&&Kt(Xi,{children:[" ",we("span",{className:`${X.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&we("span",{className:X.tag,children:e.tag}),P!==null&&we("span",{className:`${X.count} magicx-aia-option-count`,children:P})]})})}import{jsx as Ra}from"react/jsx-runtime";function po(){let[e,n]=za(Ji);return co(()=>{if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia(ao),i=()=>n(t.matches);return i(),t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}function La({options:e,activeIndex:n,picked:t,onSelect:i,onHighlight:o,onUnhighlight:l,listboxId:r,loading:d,groupKey:f="",optionsPosition:v="below",showIcons:x=!0,showImages:m=!0,showCounts:p=!0}){let h=po(),y=Ea(null),[S,T]=za(null),D=Ea(null);qt(()=>{if(d&&ro(D.current,e))return;D.current=d?null:e;let E=y.current,M=E&&!d&&to(e.length,h),H=E?.closest("[data-aia-dropdown]");M&&H&&no(H);let K=M?eo(E):null;T(K?Ia(e.length,h,K.rowWidths,K.gridWidth):null)},[e,h,d]);let O=S??Ia(e.length,h,null,null);qt(()=>{let E=y.current?.closest("[data-aia-dropdown]");E&&lo(E)},[O.template,h]);let $=d?-1:n;qt(()=>{y.current&&so(y.current,$)},[$]);let F=oo(e,x,m);return Ra(Sa,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:f,template:O.template,maxHeight:O.maxHeight,innerRef:E=>{y.current=E},"data-aia-group":f,children:e.map((E,M)=>Ra(Pa,{option:E,isHighlighted:M===n,checked:t?t.includes(E.text):void 0,onSelect:i,onHighlight:H=>{Aa(y.current,M,H)&&o(M)},onUnhighlight:l?H=>{Aa(y.current,-1,H)&&l(M)}:void 0,id:`${r}-option-${M}`,loading:d,showIcon:x&&F,showImage:m&&F,showCount:p,scrollHint:!d&&O.scrollHintIndices.includes(M),enterDelayMs:d?0:io(M,O.cols,e.length,v)},`${f}\0${E.parameter??""}\0${E.text}`))})}import{formatTime as ho,TIME_WHEEL_COLUMNS as uo,TIME_WHEEL_ROW_HEIGHT as mo,timeWheelIndex as Oa,timeWheelIndexFromScroll as go,timeWheelRows as fo,withTimeWheelIndex as Da}from"@magicx-eng/ai-autocomplete-vanilla";import{Fragment as bo,useEffect as wo,useLayoutEffect as vo,useRef as Lt}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-52a922cb")){let e=document.createElement("style");e.id="ac-style-52a922cb",e.textContent=`/* --- Time wheel (replaces the options grid for time suggestions) ---
3699
3699
 
3700
3700
  One of three hand-maintained copies (vanilla styles.css, this file, Angular's
3701
3701
  time-wheel.component.css). Only the class-naming layer differs \u2014 the
@@ -3817,7 +3817,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
3817
3817
  .aia-done-llNY5:hover {
3818
3818
  background: var(--aia-time-done-bg-hover, var(--aia-done-bg-hover, #d8dde8));
3819
3819
  }
3820
- `,document.head.appendChild(e)}var me={timeWheel:"aia-timeWheel-KdR4A",value:"aia-value--wqvm",columns:"aia-columns-TaD-f",band:"aia-band-pVy-f",column:"aia-column-lwtdd",row:"aia-row-A3pAx",selected:"aia-selected-xgOWY",separator:"aia-separator-kX9WO",done:"aia-done-llNY5"};import{jsx as je,jsxs as Bt}from"react/jsx-runtime";var mo=120;function Aa({view:e,label:n,doneLabel:t,interactive:i=!0,onTimeChange:o,onTimeCommit:s}){return Bt("div",{className:me.timeWheel,"data-aia-time-wheel":"",role:"group","aria-label":n,onMouseDown:r=>r.preventDefault(),children:[je("span",{className:me.value,"data-aia-time-value":"","aria-live":"polite",children:no(e.minutes)}),Bt("div",{className:me.columns,"aria-hidden":"true",children:[je("div",{className:me.band}),ro.map(r=>Bt(po,{children:[r==="minute"&&je("span",{className:me.separator,children:":"}),je(go,{column:r,minutes:e.minutes,interactive:i,onTimeChange:o})]},r))]}),je("button",{type:"button",tabIndex:-1,className:me.done,"data-aia-time-done":"",onClick:()=>{i&&s()},children:t})]})}function go({column:e,minutes:n,interactive:t,onTimeChange:i}){let o=At(null),s=At(null),r=At(null),d=At({minutes:n,interactive:t,onTimeChange:i});d.current={minutes:n,interactive:t,onTimeChange:i};let w=Pa(e,n);uo(()=>{let m=o.current;if(!m||r.current)return;let p=w*so;Math.abs(m.scrollTop-p)<1||(s.current=p,m.scrollTop=p)},[w]),ho(()=>()=>{r.current&&clearTimeout(r.current)},[]);let v=()=>{r.current=null;let m=o.current,p=d.current;if(!m||!p.interactive)return;let h=lo(e,m.scrollTop);h!==Pa(e,p.minutes)&&p.onTimeChange(Ia(e,p.minutes,h))},x=()=>{let m=o.current;if(m){if(s.current!=null&&Math.abs(m.scrollTop-s.current)<1){s.current=null;return}s.current=null,r.current&&clearTimeout(r.current),r.current=setTimeout(v,mo)}};return je("div",{ref:o,className:me.column,"data-aia-time-column":e,onScroll:x,children:co(e).map((m,p)=>je("div",{className:p===w?`${me.row} ${me.selected}`:me.row,"data-aia-time-row":"","data-aia-index":p,onClick:()=>{d.current.interactive&&i(Ia(e,d.current.minutes,p))},children:m.label},m.label))})}if(typeof document<"u"&&!document.getElementById("ac-style-8414cd5f")){let e=document.createElement("style");e.id="ac-style-8414cd5f",e.textContent=`.aia-stack {
3820
+ `,document.head.appendChild(e)}var ve={timeWheel:"aia-timeWheel-KdR4A",value:"aia-value--wqvm",columns:"aia-columns-TaD-f",band:"aia-band-pVy-f",column:"aia-column-lwtdd",row:"aia-row-A3pAx",selected:"aia-selected-xgOWY",separator:"aia-separator-kX9WO",done:"aia-done-llNY5"};import{jsx as et,jsxs as _t}from"react/jsx-runtime";var xo=120;function Ma({view:e,label:n,doneLabel:t,interactive:i=!0,onTimeChange:o,onTimeCommit:l}){return _t("div",{className:ve.timeWheel,"data-aia-time-wheel":"",role:"group","aria-label":n,onMouseDown:r=>r.preventDefault(),children:[et("span",{className:ve.value,"data-aia-time-value":"","aria-live":"polite",children:ho(e.minutes)}),_t("div",{className:ve.columns,"aria-hidden":"true",children:[et("div",{className:ve.band}),uo.map(r=>_t(bo,{children:[r==="minute"&&et("span",{className:ve.separator,children:":"}),et(yo,{column:r,minutes:e.minutes,interactive:i,onTimeChange:o})]},r))]}),et("button",{type:"button",tabIndex:-1,className:ve.done,"data-aia-time-done":"",onClick:()=>{i&&l()},children:t})]})}function yo({column:e,minutes:n,interactive:t,onTimeChange:i}){let o=Lt(null),l=Lt(null),r=Lt(null),d=Lt({minutes:n,interactive:t,onTimeChange:i});d.current={minutes:n,interactive:t,onTimeChange:i};let f=Oa(e,n);vo(()=>{let m=o.current;if(!m||r.current)return;let p=f*mo;Math.abs(m.scrollTop-p)<1||(l.current=p,m.scrollTop=p)},[f]),wo(()=>()=>{r.current&&clearTimeout(r.current)},[]);let v=()=>{r.current=null;let m=o.current,p=d.current;if(!m||!p.interactive)return;let h=go(e,m.scrollTop);h!==Oa(e,p.minutes)&&p.onTimeChange(Da(e,p.minutes,h))},x=()=>{let m=o.current;if(m){if(l.current!=null&&Math.abs(m.scrollTop-l.current)<1){l.current=null;return}l.current=null,r.current&&clearTimeout(r.current),r.current=setTimeout(v,xo)}};return et("div",{ref:o,className:ve.column,"data-aia-time-column":e,onScroll:x,children:fo(e).map((m,p)=>et("div",{className:p===f?`${ve.row} ${ve.selected}`:ve.row,"data-aia-time-row":"","data-aia-index":p,onClick:()=>{d.current.interactive&&i(Da(e,d.current.minutes,p))},children:m.label},m.label))})}if(typeof document<"u"&&!document.getElementById("ac-style-8414cd5f")){let e=document.createElement("style");e.id="ac-style-8414cd5f",e.textContent=`.aia-stack {
3821
3821
  display: flex;
3822
3822
  flex-direction: column;
3823
3823
  gap: var(--aia-stack-space, 0.5rem);
@@ -3832,7 +3832,7 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
3832
3832
  align-items: end;
3833
3833
  }
3834
3834
  /* data-align="stretch" is the flex default \u2014 no rule needed. */
3835
- `,document.head.appendChild(e)}import{jsx as fo}from"react/jsx-runtime";function Ea({space:e,align:n="stretch",className:t,children:i,...o}){let s=e?{"--aia-stack-space":e}:void 0;return fo("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":n,style:s,...o,children:i})}import{jsx as te,jsxs as Wt}from"react/jsx-runtime";var Lo=typeof window>"u"?$e:Gt,Do=[159,119,164],Mo=()=>{},za=()=>{},No=e=>{},Ho=()=>{},Fo=e=>{},Bo=e=>{},Wo=e=>{},Go=e=>{};function Ko(e){let n=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,i]=Oo(n);if($e(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>i(o.matches);return o.addEventListener("change",s),()=>o.removeEventListener("change",s)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function qo(e,n){let t=lt(null);$e(()=>{let i=e.current,o=n.current;if(!i||!o)return;let s=Ao(i,".aia-grid[data-scroll]");if(t.current&&t.current.grid!==s&&(t.current.controller.destroy(),t.current=null),s&&!t.current){t.current={grid:s,controller:bo({dropdown:i,grid:s,button:o})};return}t.current?.controller.update()}),$e(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function Vo(e,n){let t=lt(n);t.current=n;let i=lt(null);Gt(()=>{let o=e.current;if(o){if(!i.current){i.current=wo({dropdown:o,isOpen:()=>t.current});return}i.current.update()}}),$e(()=>()=>{i.current?.destroy(),i.current=null},[])}function Kt({suggestions:e,activeIndex:n,onSelect:t,onHighlight:i,onUnhighlight:o,isOpen:s,id:r,className:d,pills:w,onPillClick:v,showPills:x=!0,onSkip:m,showSkipButton:p=!0,showOptionIcons:h=!0,showOptionImages:y=!0,showOptionCounts:k=!0,skipDisabled:T=!1,activeSelected:L=!1,isLoading:O=!1,skeletonExiting:X=!1,isInputEmpty:W=!1,language:z,products:N,onProductSelect:H,onProductAddToCart:G,onProductFocusChange:j,productsLayout:E="row",productImageFallback:ae="image",showProductVendor:ne=!0,formatType:V="options",dateView:ie=null,selectedDateIso:S=null,selectedDateRange:F=null,dateRangeStart:c=null,dateReferences:A,onPreviousMonth:Te,onNextMonth:De,timeView:fe=null,multiSelectView:Ge=null,onMultiSelectCommit:Me,onSeeAllResults:u,seeAllBusy:Pe=!1,busyProductId:Ne=null,fullWidth:He=!1,onTimeChange:g,onTimeCommit:C,locationView:P=null,isReediting:R=!1,onLocationQuery:D,onLocationMove:$,onLocationCommit:le,onLocationFocusChange:de,isFocused:Ie=!1,optionsPosition:be="below",mode:Fe}){let ce=Ko(Fe),Ke=ce!==void 0,_=lt(null),Ae=lt(null);qo(_,Ae),$e(()=>{if(_.current)return vo(_.current)},[]);let Ze=e[0]?.options??[],ut=!!(w&&w.length>0&&v),we=!!(N&&N.length>0),qe=V==="time"&&fe!=null,Ve=V==="location"&&P!=null,J=s&&(Ze.length>0||x&&ut||O||we||qe||Ve);Vo(_,J),Lo(()=>{let I=_.current;I&&(So(I,ko(I)),zo(I))});let ve={suggestions:e,activeIndex:n,pills:w,showPills:x,showSkipButton:p,showOptionIcons:h,showOptionImages:y,showOptionCounts:k,skipDisabled:T,activeSelected:L,isLoading:O,skeletonExiting:X,isInputEmpty:W,products:N,formatType:V,dateView:ie,selectedDateIso:S,selectedDateRange:F,dateRangeStart:c,dateReferences:A,timeView:fe,multiSelectView:Ge,locationView:P,isReediting:R,showsSeeAll:!!u},_e=lt(ve);J&&(_e.current=ve);let a=J?ve:_e.current,Z=Ro(z),xe=a.suggestions[0],f=xe?.options??[],Ue=a.activeIndex>=0&&!!f[a.activeIndex]?.is_tappable,Ee=Po(a.pills??[],Z.keepTyping),ye=!!(Ee.length>0&&v),b=a.showPills&&ye,Xe=a.showPills&&!ye&&a.isLoading,Je=b||Xe,ze=ye&&Co(Ee)&&a.showSkipButton&&!a.isInputEmpty&&!!m,et=Ee[0]?.text,tt=To(a.formatType)&&a.dateView!=null,Re=f.length>0&&!tt,at=f.length>0&&tt&&!a.isLoading,Oe=a.formatType==="time"&&a.timeView!=null&&!a.isLoading,ke=a.formatType==="location"&&a.locationView!=null&&!a.isLoading,it=a.isLoading&&!Re&&!at&&!Oe&&!ke,Qe=a.products??[],ot=Io(b?Ee:[]);return Gt(()=>{_.current&&Eo(_.current,ot,{visible:J,anchorBottom:be==="above"})},[ot,J,be,a.suggestions,a.pills,a.isLoading,a.skeletonExiting,a.isInputEmpty,a.products,a.formatType,a.dateView,a.selectedDateIso,a.selectedDateRange,a.dateRangeStart,a.dateReferences,a.timeView,a.multiSelectView,a.locationView,a.showPills,a.showSkipButton,a.showOptionIcons,a.showOptionImages,a.showOptionCounts,a.showsSeeAll,E,z]),$e(()=>{let I=_.current;return()=>{I&&yo(I)}},[]),Wt("div",{ref:_,id:r,role:"listbox","aria-multiselectable":!!a.multiSelectView,"data-aia-dropdown":"","data-options-position":be,"data-mode":ce,"data-aia-loading":a.isLoading?"":void 0,"data-aia-skeleton-exiting":a.skeletonExiting?"":void 0,"data-aia-has-products":Qe.length>0?"":void 0,"data-aia-full-width":He?"":void 0,className:`${Ke?"magicx-aia ":""}${pe.dropdown} ${J?pe.visible:""} ${d??""}`,onMouseDown:I=>I.preventDefault(),children:[Wt(Ea,{space:"8px",children:[(Je||ze)&&Wt(xt,{noWrap:!0,className:pe.pillBar,"data-aia-pillbar":"",children:[Je&&te("span",{className:pe.pillScroll,"data-aia-pill-scroll":"",children:te(Tt,{pills:Ee,activePillIndex:0,activeSelected:a.activeSelected,onSelectPill:v??(()=>{}),rounded:!0,loading:a.isLoading})}),ze&&te("button",{type:"button",tabIndex:-1,className:pe.skip,"data-aia-skip":"",disabled:a.isLoading||a.skipDisabled,"aria-label":et?`${Z.skipLabel} ${et}`:Z.skipLabel,onClick:m,children:Z.skip})]}),Re&&te(Ta,{options:f,activeIndex:a.activeIndex,onSelect:t,onHighlight:i,onUnhighlight:o,listboxId:r,loading:a.isLoading,groupKey:xe?`${xe.parameter} ${xe.text}`:"",optionsPosition:be,showIcons:a.showOptionIcons,showImages:a.showOptionImages,showCounts:a.showOptionCounts,picked:a.multiSelectView?.picked}),a.multiSelectView&&te("div",{"data-aia-multi-actions":"",onClick:I=>{I.target.closest("[data-aia-multi-done]")&&!a.skipDisabled&&!a.isLoading&&Me?.()},children:te("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-multi-done":"",className:pe.multiDone,ref:I=>{I&&(I.disabled=!0,I.offsetHeight,I.disabled=a.skipDisabled||a.isLoading)},children:Z.done})}),at&&a.dateView&&te(oa,{options:f,activeIndex:a.activeIndex,listboxId:r,view:a.dateView,selection:{selectedIso:a.selectedDateIso??null,selectedRange:a.selectedDateRange??null,rangeStart:a.dateRangeStart??null,floor:xo(a.formatType,a.dateRangeStart),references:a.dateReferences??[]},onSelect:t,onHighlight:i,onUnhighlight:o,onPreviousMonth:Te??za,onNextMonth:De??za}),Oe&&a.timeView&&te(Aa,{view:a.timeView,label:Z.timeLabel,doneLabel:Z.done,interactive:!a.skipDisabled,onTimeChange:g??No,onTimeCommit:C??Ho}),ke&&a.locationView&&te(ha,{view:a.locationView,searchLabel:Z.locationSearch,noResultsLabel:Z.locationNoResults,useTypedLabel:Z.locationUseTyped,widgetFocused:Ie&&J,reediting:a.isReediting,visible:J,interactive:!a.skipDisabled,onQuery:D??Fo,onMove:$??Bo,onCommit:le??Wo,onFocusChange:de??Go}),it&&te("div",{className:pe.skeletonBars,"data-aia-skeleton-bars":"",children:Do.map(I=>te("span",{className:pe.skeletonBar,style:{width:I}},`bar-${I}`))}),te(ga,{products:Qe,listboxId:r,onSelect:H??Mo,busyProductId:Ne,onAddToCart:G,onFocusChange:j,focusable:J&&!a.isLoading,loading:a.isLoading,layout:E,imageFallback:ae,showVendor:ne,strings:Z}),a.showsSeeAll&&te("div",{className:pe.seeAllRow,"data-aia-see-all":"",onClick:I=>{I.target.closest("[data-aia-see-all-button]")&&(I.stopPropagation(),!(a.isLoading||Pe)&&u?.())},children:te("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-see-all-button":"","data-aia-see-all-state":Pe?"busy":void 0,"aria-busy":Pe?!0:void 0,className:pe.seeAll,ref:I=>{I&&(I.disabled=!0,I.offsetHeight,I.disabled=a.isLoading)},children:Z.seeAllResults})}),te(sa,{isOptionHighlighted:Ue,isInputEmpty:a.isInputEmpty,strings:Z})]}),te("button",{ref:Ae,type:"button",tabIndex:-1,className:pe.scrollArrow,"data-aia-scroll-arrow":"","aria-label":Z.scrollArrow,"aria-hidden":"true",children:te("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:te("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}import{buildSubmitResult as un,ModeController as mn,setCursorOffset as gn,uiStringsFor as fn,watchEditorHeight as bn}from"@magicx-eng/ai-autocomplete-vanilla";import{uiStringsFor as _o}from"@magicx-eng/ai-autocomplete-vanilla";if(typeof document<"u"&&!document.getElementById("ac-style-fdee06e6")){let e=document.createElement("style");e.id="ac-style-fdee06e6",e.textContent=`.aia-submitButton-otz7H {
3835
+ `,document.head.appendChild(e)}import{jsx as ko}from"react/jsx-runtime";function Na({space:e,align:n="stretch",className:t,children:i,...o}){let l=e?{"--aia-stack-space":e}:void 0;return ko("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":n,style:l,...o,children:i})}import{jsx as J,jsxs as Vt}from"react/jsx-runtime";var Bo=typeof window>"u"?tt:Ut,Wo=[159,119,164],Go=()=>{},Fa=()=>{},Ko=e=>{},qo=()=>{},_o=e=>{},Vo=e=>{},Uo=e=>{},Qo=e=>{};function Yo(e){let n=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,i]=Ho(n);if(tt(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>i(o.matches);return o.addEventListener("change",l),()=>o.removeEventListener("change",l)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function jo(e,n){let t=mt(null);tt(()=>{let i=e.current,o=n.current;if(!i||!o)return;let l=Do(i,".aia-grid[data-scroll]");if(t.current&&t.current.grid!==l&&(t.current.controller.destroy(),t.current=null),l&&!t.current){t.current={grid:l,controller:So({dropdown:i,grid:l,button:o})};return}t.current?.controller.update()}),tt(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function $o(e,n){let t=mt(n);t.current=n;let i=mt(null);Ut(()=>{let o=e.current;if(o){if(!i.current){i.current=Co({dropdown:o,isOpen:()=>t.current});return}i.current.update()}}),tt(()=>()=>{i.current?.destroy(),i.current=null},[])}function Qt({suggestions:e,activeIndex:n,onSelect:t,onHighlight:i,onUnhighlight:o,isOpen:l,id:r,className:d,pills:f,onPillClick:v,showPills:x=!0,onSkip:m,showSkipButton:p=!0,showOptionIcons:h=!0,showOptionImages:y=!0,showOptionCounts:S=!0,skipDisabled:T=!1,activeSelected:D=!1,isLoading:O=!1,skeletonExiting:$=!1,isInputEmpty:F=!1,language:E,products:M,onProductSelect:H,onProductAddToCart:K,onProductFocusChange:ne,productsLayout:q="row",productImageFallback:P="image",showProductVendor:Z=!0,formatType:_="options",dateView:se=null,selectedDateIso:A=null,selectedDateRange:G=null,dateRangeStart:c=null,dateReferences:k,onPreviousMonth:le,onNextMonth:Ne,timeView:ue=null,multiSelectView:qe=null,onMultiSelectCommit:Ie,onSeeAllResults:Ae,seeAllBusy:me=!1,busyProductId:_e=null,fullWidth:Fe=!1,onTimeChange:u,onTimeCommit:Ve,locationView:g=null,isReediting:C=!1,onLocationQuery:R,onLocationMove:z,onLocationCommit:N,onLocationFocusChange:ee,isFocused:ye=!1,optionsPosition:ae="below",mode:ke}){let Ee=Yo(ke),Ue=Ee!==void 0,ie=mt(null),Re=mt(null);jo(ie,Re),tt(()=>{if(ie.current)return To(ie.current)},[]);let ge=e[0]?.options??[],Qe=!!(f&&f.length>0&&v),de=!!(M&&M.length>0),He=_==="time"&&ue!=null,it=_==="location"&&g!=null,re=l&&(ge.length>0||x&&Qe||O||de||He||it);$o(ie,re),Bo(()=>{let I=ie.current;I&&(Eo(I,Ao(I)),No(I))});let ce={suggestions:e,activeIndex:n,pills:f,showPills:x,showSkipButton:p,showOptionIcons:h,showOptionImages:y,showOptionCounts:S,skipDisabled:T,activeSelected:D,isLoading:O,skeletonExiting:$,isInputEmpty:F,products:M,formatType:_,dateView:se,selectedDateIso:A,selectedDateRange:G,dateRangeStart:c,dateReferences:k,timeView:ue,multiSelectView:qe,locationView:g,isReediting:C,showsSeeAll:!!Ae},Be=mt(ce);re&&(Be.current=ce);let a=re?ce:Be.current,W=Fo(E),fe=a.suggestions[0],Se=fe?.options??[],Ye=a.activeIndex>=0&&!!Se[a.activeIndex]?.is_tappable,Ce=Lo(a.pills??[],W.keepTyping),ze=!!(Ce.length>0&&v),w=a.showPills&&ze,je=a.showPills&&!ze&&a.isLoading,ot=w||je,Le=ze&&Ro(Ce)&&a.showSkipButton&&!a.isInputEmpty&&!!m,b=Ce[0]?.text,$e=zo(a.formatType)&&a.dateView!=null,nt=Se.length>0&&!$e,Oe=Se.length>0&&$e&&!a.isLoading,rt=a.formatType==="time"&&a.timeView!=null&&!a.isLoading,st=a.formatType==="location"&&a.locationView!=null&&!a.isLoading,We=a.isLoading&&!nt&&!Oe&&!rt&&!st,lt=a.products??[],De=Oo(w?Ce:[]);return Ut(()=>{ie.current&&Mo(ie.current,De,{visible:re,anchorBottom:ae==="above"})},[De,re,ae,a.suggestions,a.pills,a.isLoading,a.skeletonExiting,a.isInputEmpty,a.products,a.formatType,a.dateView,a.selectedDateIso,a.selectedDateRange,a.dateRangeStart,a.dateReferences,a.timeView,a.multiSelectView,a.locationView,a.showPills,a.showSkipButton,a.showOptionIcons,a.showOptionImages,a.showOptionCounts,a.showsSeeAll,q,E]),tt(()=>{let I=ie.current;return()=>{I&&Io(I)}},[]),Vt("div",{ref:ie,id:r,role:"listbox","aria-multiselectable":!!a.multiSelectView,"data-aia-dropdown":"","data-options-position":ae,"data-mode":Ee,"data-aia-loading":a.isLoading?"":void 0,"data-aia-skeleton-exiting":a.skeletonExiting?"":void 0,"data-aia-has-products":lt.length>0?"":void 0,"data-aia-full-width":Fe?"":void 0,className:`${Ue?"magicx-aia ":""}${pe.dropdown} ${re?pe.visible:""} ${d??""}`,onMouseDown:I=>I.preventDefault(),children:[Vt(Na,{space:"8px",children:[(ot||Le)&&Vt(kt,{noWrap:!0,className:pe.pillBar,"data-aia-pillbar":"",children:[ot&&J("span",{className:pe.pillScroll,"data-aia-pill-scroll":"",children:J(Et,{pills:Ce,activePillIndex:0,activeSelected:a.activeSelected,onSelectPill:v??(()=>{}),rounded:!0,loading:a.isLoading})}),Le&&J("button",{type:"button",tabIndex:-1,className:pe.skip,"data-aia-skip":"",disabled:a.isLoading||a.skipDisabled,"aria-label":b?`${W.skipLabel} ${b}`:W.skipLabel,onClick:m,children:W.skip})]}),nt&&J(La,{options:Se,activeIndex:a.activeIndex,onSelect:t,onHighlight:i,onUnhighlight:o,listboxId:r,loading:a.isLoading,groupKey:fe?`${fe.parameter} ${fe.text}`:"",optionsPosition:ae,showIcons:a.showOptionIcons,showImages:a.showOptionImages,showCounts:a.showOptionCounts,picked:a.multiSelectView?.picked}),a.multiSelectView&&J("div",{"data-aia-multi-actions":"",onClick:I=>{I.target.closest("[data-aia-multi-done]")&&!a.skipDisabled&&!a.isLoading&&Ie?.()},children:J("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-multi-done":"",className:pe.multiDone,ref:I=>{I&&(I.disabled=!0,I.offsetHeight,I.disabled=a.skipDisabled||a.isLoading)},children:W.done})}),Oe&&a.dateView&&J(pa,{options:Se,activeIndex:a.activeIndex,listboxId:r,view:a.dateView,selection:{selectedIso:a.selectedDateIso??null,selectedRange:a.selectedDateRange??null,rangeStart:a.dateRangeStart??null,floor:Po(a.formatType,a.dateRangeStart),references:a.dateReferences??[]},onSelect:t,onHighlight:i,onUnhighlight:o,onPreviousMonth:le??Fa,onNextMonth:Ne??Fa}),rt&&a.timeView&&J(Ma,{view:a.timeView,label:W.timeLabel,doneLabel:W.done,interactive:!a.skipDisabled,onTimeChange:u??Ko,onTimeCommit:Ve??qo}),st&&a.locationView&&J(va,{view:a.locationView,searchLabel:W.locationSearch,noResultsLabel:W.locationNoResults,useTypedLabel:W.locationUseTyped,widgetFocused:ye&&re,reediting:a.isReediting,visible:re,interactive:!a.skipDisabled,onQuery:R??_o,onMove:z??Vo,onCommit:N??Uo,onFocusChange:ee??Qo}),We&&J("div",{className:pe.skeletonBars,"data-aia-skeleton-bars":"",children:Wo.map(I=>J("span",{className:pe.skeletonBar,style:{width:I}},`bar-${I}`))}),J(ka,{products:lt,listboxId:r,onSelect:H??Go,busyProductId:_e,onAddToCart:K,onFocusChange:ne,focusable:re&&!a.isLoading,loading:a.isLoading,layout:q,imageFallback:P,showVendor:Z,strings:W}),a.showsSeeAll&&J("div",{className:pe.seeAllRow,"data-aia-see-all":"",onClick:I=>{I.target.closest("[data-aia-see-all-button]")&&(I.stopPropagation(),!(a.isLoading||me)&&Ae?.())},children:J("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-see-all-button":"","data-aia-see-all-state":me?"busy":void 0,"aria-busy":me?!0:void 0,className:pe.seeAll,ref:I=>{I&&(I.disabled=!0,I.offsetHeight,I.disabled=a.isLoading)},children:W.seeAllResults})}),J(ma,{isOptionHighlighted:Ye,isInputEmpty:a.isInputEmpty,strings:W})]}),J("button",{ref:Re,type:"button",tabIndex:-1,className:pe.scrollArrow,"data-aia-scroll-arrow":"","aria-label":W.scrollArrow,"aria-hidden":"true",children:J("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:J("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}import{buildSubmitResult as Sn,focusEditorFromTap as Cn,ModeController as Tn,setCursorOffset as Pn,uiStringsFor as In,watchEditorHeight as An}from"@magicx-eng/ai-autocomplete-vanilla";import{uiStringsFor as Zo}from"@magicx-eng/ai-autocomplete-vanilla";if(typeof document<"u"&&!document.getElementById("ac-style-fdee06e6")){let e=document.createElement("style");e.id="ac-style-fdee06e6",e.textContent=`.aia-submitButton-otz7H {
3836
3836
  flex-shrink: 0;
3837
3837
  width: 32px;
3838
3838
  height: 32px;
@@ -3936,5 +3936,5 @@ import{buildSubmitResult as Ts,cellDay as Ps,cellIso as Is,DATE_RANGE_META_END a
3936
3936
  transition: none;
3937
3937
  }
3938
3938
  }
3939
- `,document.head.appendChild(e)}var Ra={submitButton:"aia-submitButton-otz7H",submitSpin:"aia-submitSpin-0llcF"};import{jsx as qt}from"react/jsx-runtime";function Oa({disabled:e,ready:n,busy:t=!1,onClick:i,label:o=_o().submit}){return qt("button",{type:"button","data-aia-submit":"",className:Ra.submitButton,disabled:e,"data-aia-ready":n?"":void 0,"data-aia-submit-state":t?"busy":void 0,"aria-busy":t?!0:void 0,onClick:s=>{s.stopPropagation(),i()},"aria-label":o,children:qt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":o,children:qt("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}import{AIAutocomplete as Uo,dateSelectionFor as Qo,dropdownPillsFor as Yo,editingSuggestion as jo,HANDOFF_NOT_HANDLED as $o,identifiedParamLabel as Zo,withoutTraditionalAutocomplete as Xo}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as Ha,useEffect as We,useMemo as Jo,useRef as q,useState as en}from"react";import{useRef as La}from"react";function Da(e){let n=La(e);n.current=e;let t=Object.keys(e??{}).sort().join("\0"),i=La({key:"",overrides:void 0});if(i.current.key!==t){let o={};for(let s of Object.keys(e??{})){let r=(d,w,v)=>{let x=n.current?.[s];return x?x(d,w,v):[]};o[s]=r}i.current={key:t,overrides:e?o:void 0}}return{overrides:i.current.overrides,key:t}}import{useRef as Ma}from"react";function Na(e){let n=Ma(e);n.current=e;let t=Ma(null);t.current===null&&(t.current={fetch:(o,s)=>{let r=n.current;return r?r.fetch(o,s):Promise.reject(new Error("products config removed"))},transform:o=>n.current?.transform(o)??[],get limit(){return n.current?.limit}});let i=e!==void 0;return{config:i?t.current:void 0,enabled:i}}var Fa={text:"",composing:null,completedParams:[],identifiedParams:[],skippedParams:[],pendingSpan:null,suggestions:[],products:[],traditionalAutocomplete:!1,customFields:null,optionSearch:null,activeDropdownIndex:-1,newParamId:null,isLoading:!0,isReady:!1,error:null,segments:[],actionableSuggestions:[],filteredOptions:[],dropdownLoading:!0,dropdownOptions:[],skeletonOptions:null,skeletonSuggestion:null,skeletonPicked:null,dropdownSuggestion:null,skeletonRequested:!1,skeletonExiting:!1,activeFormatType:"options",dateView:null,dateRangeStart:null,dateReferences:[],dateFloor:null,timeView:null,multiSelectView:null,dropdownMultiSelect:null,multiSelectDraft:null,locationView:null,locationSearch:null,locationAutocomplete:!0,locationFieldFocused:!1,isSubmitting:!1,selectingProductId:null,placeholderText:"",leadInText:"",optionQuery:"",isSearchingOptions:!1,isDropdownOpen:!1,isActivePillSelected:!1,filterBase:0,filterInProgress:!1,pillTapped:!1,skipNextFetch:!1,lastRawQuery:"",isFocused:!1,dropdownHeld:!1,editingParam:null,editingIdentified:null,editingAnchor:null,editingTail:null,caretOffset:null,inSelectionAnimation:!1,dateViewMonth:null,pendingRangeStart:null,timeDraft:null};function Vt({onSubmit:e,onResult:n,onError:t,optionOverrides:i,maskCompletedText:o,apiConfig:s,additionalContext:r,language:d,currency:w,productId:v,visitorId:x,analyticsConsent:m,columns:p=2,dropdownTrigger:h,optionsPosition:y,closeDropdownOnBlur:k,prependPlaceholder:T,allOption:L,showNonTappableOptions:O,locationSearch:X,showOptionIcons:W,showOptionImages:z,showOptionCounts:N,showSkipButton:H,showProducts:G,submitProgress:j,productImageFallback:E="image",showProductVendor:ae=!0,onFocus:ne,onBlur:V,value:ie,completedParams:S,onChange:F,onParamsChange:c,products:A,mapProducts:Te,onProductSelect:De,onProductAddToCart:fe,source:Ge,setCursor:Me}){let u=q(null),[Pe,Ne]=en(null),He=q(e);He.current=e;let g=q(n);g.current=n;let C=q(t);C.current=t;let P=q(F);P.current=F;let R=q(c);R.current=c;let D=q(ne);D.current=ne;let $=q(V);$.current=V;let le=q(Me);le.current=Me;let de=q(De);de.current=De;let Ie=q(fe);Ie.current=fe;let be=q(x);be.current=x;let Fe=q(()=>{let l=be.current;return typeof l=="function"?l():l}).current,ce=x!==void 0,Ke=q(m);Ke.current=m;let _=q(()=>{let l=Ke.current;return typeof l=="function"?l():l}).current,Ae=Na(A),Ze=q(Te);Ze.current=Te;let ut=q((l,U)=>{let B=Ze.current;return B?B(l,U):l}).current,we=Te?ut:void 0,qe=Da(i);We(()=>{if(typeof document>"u")return;let l=new Uo(document.createElement("div"),{renderMode:"headless",apiConfig:s,additionalContext:r,language:d,currency:w,productId:v,visitorId:ce?Fe:void 0,analyticsConsent:_,optionOverrides:qe.overrides,maskCompletedText:o,columns:p,dropdownTrigger:h,optionsPosition:y,closeDropdownOnBlur:k,prependPlaceholder:T,allOption:L,showNonTappableOptions:O,locationSearch:X,showProducts:G,submitProgress:j,source:Ge,value:ie,completedParams:S,onSubmit:(...B)=>He.current?.(...B),onResult:(...B)=>g.current?.(...B),onError:(...B)=>C.current?.(...B),onChange:(...B)=>P.current?.(...B),onParamsChange:(...B)=>R.current?.(...B),onFocus:()=>D.current?.(),onBlur:()=>$.current?.(),onProductSelect:B=>de.current?de.current(B):$o,onProductAddToCart:B=>Ie.current?.(B),setCursor:B=>le.current?.(B),products:Ae.config,mapProducts:we});u.current=l,Ne(l.getState());let U=l.subscribe(B=>Ne(B));return()=>{U(),l.destroy(),u.current===l&&(u.current=null)}},[]);let Ve=q(ce);We(()=>{Ve.current!==ce&&(Ve.current=ce,u.current?.update({visitorId:ce?Fe:void 0,analyticsConsent:_}))},[ce,Fe,_]);let J=typeof m=="function"?"function":m,ve=q(J);We(()=>{ve.current!==J&&(ve.current=J,u.current?.refreshAnalyticsConsent())},[J]),We(()=>{ie!==void 0&&u.current?.setValue(ie)},[ie]),We(()=>{S!==void 0&&u.current?.setCompletedParams(S)},[S]);let _e=JSON.stringify(s??null),a;try{a=JSON.stringify(r??null)}catch{a="[unstringifiable]"}We(()=>{u.current?.update({apiConfig:s,additionalContext:r,language:d,currency:w,productId:v,optionOverrides:qe.overrides,dropdownTrigger:h,optionsPosition:y,closeDropdownOnBlur:k,prependPlaceholder:T,allOption:L,showNonTappableOptions:O,locationSearch:X,showProducts:G,submitProgress:j})},[_e,a,d,w?.code,w?.rate,w?.country,v,qe.key,h,y,k,T,L,O,X,G,j]);let Z=q(!1);We(()=>{if(!Z.current){Z.current=!0;return}u.current?.update({products:Ae.config})},[Ae.enabled]),We(()=>{u.current?.update({mapProducts:we})},[we]);let xe=q(null);xe.current===null&&(xe.current={handleTextChange:l=>u.current?.handleTextChange(l),handleCompositionText:l=>u.current?.handleCompositionText(l),handleKeyDown:l=>{let U="nativeEvent"in l?l.nativeEvent:l;u.current?.handleKeyDown(U)},setFocused:l=>u.current?.setFocused(l),startEditingParam:l=>u.current?.startEditingParam(l),removeParam:l=>u.current?.removeParam(l)??!1,exitEditMode:()=>u.current?.exitEditMode(),handleCaretAfterInput:l=>u.current?.handleCaretAfterInput(l),handleCaretMove:l=>u.current?.handleCaretMove(l),replaceEditingRange:l=>u.current?.replaceEditingRange(l)??!1,setActivePill:l=>u.current?.setActivePill(l),skipActivePill:()=>u.current?.skipActivePill(),removeLastParam:()=>u.current?.removeLastParam(),clearNewParamId:()=>u.current?.clearNewParamId(),reset:()=>u.current?.reset(),refreshProducts:()=>u.current?.refreshProducts(),prepareSubmit:()=>u.current?.prepareSubmit(),getState:()=>u.current?.getState()??Fa,recordSubmit:l=>u.current?.recordSubmit(l),holdSubmit:l=>u.current?.holdSubmit(l),endSubmitProgress:()=>u.current?.endSubmitProgress(),getSearchId:()=>u.current?.getSearchId(),getVisitorId:()=>u.current?.getVisitorId(),refreshAnalyticsConsent:()=>u.current?.refreshAnalyticsConsent(),selectOption:(l,U)=>u.current?.selectOption(l,U),selectProduct:l=>u.current?.selectProduct(l),addProductToCart:l=>{let U=u.current;return!U||!Ie.current?Promise.resolve():U.addProductToCart(l)},setActiveDropdownIndex:l=>u.current?.setActiveDropdownIndex(l),clearHighlight:l=>u.current?.clearHighlight(l),showPreviousMonth:()=>u.current?.showPreviousMonth(),showNextMonth:()=>u.current?.showNextMonth(),setTime:l=>u.current?.setTime(l),commitTime:()=>u.current?.commitTime(),toggleMultiSelectOption:l=>u.current?.toggleMultiSelectOption(l),commitMultiSelect:()=>u.current?.commitMultiSelect(),setLocationQuery:l=>u.current?.setLocationQuery(l),moveLocationHighlight:l=>u.current?.moveLocationHighlight(l),commitLocation:l=>u.current?.commitLocation(l),setLocationFieldFocused:l=>u.current?.setLocationFieldFocused(l),handleFocus:()=>u.current?.setFocused(!0),handleBlur:()=>u.current?.setFocused(!1)});let f=xe.current,Ue=Ha(l=>{let U=l.target.value,gt=U.length>0&&!l.nativeEvent?.isComposing&&U[0]!==U[0].toUpperCase()?U[0].toUpperCase()+U.slice(1):U;u.current?.handleTextChange(gt)},[]),Ee=Ha(l=>{u.current?.handleKeyDown(l.nativeEvent)},[]),ye=u.current,b=Pe??Fa,Xe=ie!==void 0?ie:b.text,Je=S!==void 0?S:b.completedParams,ze=b.actionableSuggestions,et=ze[0],tt=Jo(()=>Xo(ze),[ze]),Re=ye?.listboxId??"",at=b.activeDropdownIndex>=0&&ye?`${Re}-option-${b.activeDropdownIndex}`:void 0,Oe=b.editingParam,ke=b.editingIdentified,it=Oe?jo(Oe):ke?{parameter:ke.parameter,text:Zo(ke.parameter),required:!0,options:[]}:null,Qe=b.dropdownSuggestion??it??et,ot=Yo(b.dropdownSuggestion,it,ze),I=Qo(b),mt=!ye||b.dropdownLoading;return{completedParams:Je,multiSelectView:b.multiSelectView,toggleMultiSelectOption:f.toggleMultiSelectOption,commitMultiSelect:f.commitMultiSelect,skippedParams:b.skippedParams,identifiedParams:b.identifiedParams,suggestionPills:tt,setActivePill:f.setActivePill,skipActivePill:f.skipActivePill,removeLastParam:f.removeLastParam,segments:b.segments,newParamId:b.newParamId,clearNewParamId:f.clearNewParamId,suggestions:b.suggestions,activeIndex:b.activeDropdownIndex,isReady:b.isReady,isLoading:mt,isFocused:b.isFocused,isDropdownOpen:b.isDropdownOpen,isActivePillSelected:b.isActivePillSelected,placeholderText:b.placeholderText,listboxId:Re,error:b.error,products:b.products,customFields:b.customFields,selectProduct:f.selectProduct,addProductToCart:f.addProductToCart,handleTextChange:f.handleTextChange,handleCompositionText:f.handleCompositionText,handleKeyDown:f.handleKeyDown,setFocused:f.setFocused,editingParam:Oe,editingIdentified:ke,editingAnchor:b.editingAnchor,caretOffset:b.caretOffset,startEditingParam:f.startEditingParam,removeParam:f.removeParam,exitEditMode:f.exitEditMode,handleCaretAfterInput:f.handleCaretAfterInput,handleCaretMove:f.handleCaretMove,replaceEditingRange:f.replaceEditingRange,inputProps:{value:Xe,placeholder:b.placeholderText||void 0,onChange:Ue,onKeyDown:Ee,onFocus:f.handleFocus,onBlur:f.handleBlur,role:"combobox","aria-expanded":b.isDropdownOpen,"aria-activedescendant":at,"aria-autocomplete":"list","aria-controls":Re},reset:f.reset,refreshProducts:f.refreshProducts,prepareSubmit:f.prepareSubmit,getState:f.getState,recordSubmit:f.recordSubmit,holdSubmit:f.holdSubmit,endSubmitProgress:f.endSubmitProgress,getSearchId:f.getSearchId,getVisitorId:f.getVisitorId,refreshAnalyticsConsent:f.refreshAnalyticsConsent,isSubmitting:b.isSubmitting,selectingProductId:b.selectingProductId,dropdownProps:{suggestions:Qe?[{...Qe,options:b.dropdownOptions}]:[],activeIndex:b.activeDropdownIndex,onSelect:f.selectOption,onHighlight:f.setActiveDropdownIndex,onUnhighlight:f.clearHighlight,isOpen:b.isDropdownOpen,id:Re,pills:ot,activeSelected:b.isActivePillSelected,onPillClick:f.setActivePill,onSkip:f.skipActivePill,showSkipButton:(H??!0)&&!Oe&&!ke,showOptionIcons:W??!0,showOptionImages:z??!0,showOptionCounts:N??!0,skipDisabled:b.inSelectionAnimation,isLoading:mt,skeletonExiting:b.skeletonExiting,isInputEmpty:Xe.trim().length===0,language:d,products:b.products,productImageFallback:E,showProductVendor:ae,onProductSelect:f.selectProduct,busyProductId:b.selectingProductId,seeAllBusy:b.isSubmitting,onProductAddToCart:fe?f.addProductToCart:void 0,onProductFocusChange:f.setFocused,formatType:b.activeFormatType,dateView:b.dateView,selectedDateIso:I.selectedIso,selectedDateRange:I.selectedRange,dateRangeStart:I.rangeStart,dateReferences:I.references,onPreviousMonth:f.showPreviousMonth,onNextMonth:f.showNextMonth,timeView:b.timeView,multiSelectView:b.dropdownMultiSelect,onMultiSelectCommit:f.commitMultiSelect,onTimeChange:f.setTime,onTimeCommit:f.commitTime,locationView:b.locationView,isReediting:b.editingParam!=null,onLocationQuery:f.setLocationQuery,onLocationMove:f.moveLocationHighlight,onLocationCommit:f.commitLocation,onLocationFocusChange:f.setLocationFieldFocused,isFocused:b.isFocused||b.locationFieldFocused,optionsPosition:y??"below"}}}import{attachChipRemove as tn,cancelStartingHint as an,chipIdFromTap as on,extractPlainText as Ba,getCursorOffset as Wa,keepCaretOnChip as nn,plainTextLength as rn,renderEditableContent as sn,setCursorOffset as Ga,startingHintOptions as ln}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as ge,useEffect as dt,useLayoutEffect as _t,useRef as ct}from"react";var Et;function dn(){if(Et!==void 0)return Et;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),Et=e.contentEditable==="plaintext-only",Et}function Ka(e){let{segments:n,showChipIcons:t=!0,showChipImages:i=!0,showChipRemove:o=!1,removeParam:s,newParamId:r,editingParam:d,editingIdentified:w,editingAnchor:v,caretOffset:x,placeholderText:m,hintSuggestions:p,isFocused:h,isDropdownOpen:y,listboxId:k,activeDescendantId:T,autoFocus:L,handleTextChange:O,handleCompositionText:X,handleKeyDown:W,handleCaretAfterInput:z,handleCaretMove:N,startEditingParam:H,replaceEditingRange:G,setFocused:j}=e,E=ct(null),ae=ct(!1),ne=ct(""),V=ct(""),ie=ct(null),S=ct(0);ie.current=x,dt(()=>{if(!L)return;let g=E.current;if(!g)return;document.activeElement===g?j(!0):g.focus();let C=g.ownerDocument??document,P=C.getSelection(),R=P&&P.rangeCount>0&&g.contains(P.anchorNode);if(P&&!R){let D=C.createRange();D.selectNodeContents(g),D.collapse(!0),P.removeAllRanges(),P.addRange(D)}},[L,j]),dt(()=>{let g=E.current;if(!g)return;let C=g.ownerDocument??document,P=()=>{let R=C.getSelection();if(!R||R.rangeCount===0||!R.anchorNode||!g.contains(R.anchorNode))return;let D=R.anchorNode,$=D.nodeType===Node.ELEMENT_NODE?D:D.parentElement,de=(R.isCollapsed?$?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,Ie=d?.id??w?.id??null;if(de&&de!==Ie){H(de);return}performance.now()-S.current<50||N(Wa(g))};return C.addEventListener("selectionchange",P),()=>C.removeEventListener("selectionchange",P)},[d,w,H,N]),dt(()=>{let g=E.current;if(!g)return;let C=P=>{let R=on(g,P.target);R&&(H(R),nn(g,R))};return g.addEventListener("click",C),()=>g.removeEventListener("click",C)},[H]),dt(()=>{let g=E.current;if(!(!g||!s||!o))return tn(g,s)},[s,o]),_t(()=>{let g=E.current;g&&sn({input:g,segments:n,newParamId:r,editingParamId:d?.id??null,placeholderText:m??"",isFocused:h,showChipIcons:t,showChipImages:i,showChipRemove:o,hintOptions:ln(p??[])})},[n,r,d,m,p,h,t,i,o]),dt(()=>{let g=E.current;return()=>{g&&an(g)}},[]),_t(()=>{let g=ne.current,C=r??"";if(ne.current=C,!C||C===g)return;let P=E.current;if(!P)return;P.focus();let R=ie.current??rn(P);Ga(P,R)},[r]),_t(()=>{let g=V.current,C=d?.id??"";if(V.current=C,!C||C===g||v==null)return;let P=E.current;P&&Ga(P,v)},[d,v]);let F=ge(()=>{let g=E.current;if(!g)return;let C=Ba(g),R=C.length>0&&C[0]!==C[0].toUpperCase()?C[0].toUpperCase()+C.slice(1):C;if(ae.current){X(R);return}O(R)},[O,X]),c=ge(()=>{S.current=performance.now(),F();let g=E.current;g&&z(Wa(g))},[F,z]);dt(()=>{let g=E.current;if(!g)return;let C=P=>{let R=P,D=R.inputType;if(D==="insertParagraph"||D==="insertLineBreak"||D==="insertFromDrop"){P.preventDefault();return}if(D.startsWith("insert")||D.startsWith("delete")){let $=D.startsWith("delete")?"":R.data??"";G($)&&P.preventDefault()}};return g.addEventListener("beforeinput",C),()=>g.removeEventListener("beforeinput",C)},[G]);let A=ge(()=>{ae.current=!0,E.current?.setAttribute("data-aia-composing","true")},[]),Te=ge(()=>{ae.current=!1,E.current?.removeAttribute("data-aia-composing"),F()},[F]),De=ge(g=>{g.preventDefault();let C=E.current;if(!C)return;let P=(g.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!P)return;let R=C.ownerDocument??document,D=R.getSelection();if(!D||D.rangeCount===0)return;let $=D.getRangeAt(0);if(!C.contains($.startContainer))return;$.deleteContents();let le=R.createTextNode(P);$.insertNode(le),$.setStartAfter(le),$.collapse(!0),D.removeAllRanges(),D.addRange($),F()},[F]),fe=ge(g=>W(g),[W]),Ge=ge(()=>j(!0),[j]),Me=ge(()=>j(!1),[j]),u=ge(()=>E.current?.focus(),[]),Pe=ge(()=>E.current?.blur(),[]),Ne=ge(()=>{let g=E.current;return g?Ba(g):""},[]),He=dn()?"plaintext-only":"true";return{inputRef:E,editorProps:{ref:E,contentEditable:He,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":k,"aria-expanded":y,"aria-activedescendant":T,spellCheck:!0,enterKeyHint:"send",onInput:c,onKeyDown:fe,onCompositionStart:A,onCompositionEnd:Te,onPaste:De,onFocus:Ge,onBlur:Me},getPlainText:Ne,focus:u,blur:Pe}}import{jsx as ht,jsxs as Qt}from"react/jsx-runtime";function wn(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var vn=cn(function({onSubmit:n,onResult:t,onError:i,optionOverrides:o,maskCompletedText:s,className:r,apiConfig:d,additionalContext:w,language:v,currency:x,productId:m,visitorId:p,analyticsConsent:h,columns:y,pillPlacement:k="dropdown",mode:T="auto",optionsPosition:L="below",animations:O=!0,optionsStyle:X="floating",dropdownTrigger:W,closeDropdownOnBlur:z,prependPlaceholder:N,allOption:H,showNonTappableOptions:G,locationSearch:j,showOptionIcons:E=!0,showChipIcons:ae=!0,showChipImages:ne=!0,showChipRemove:V=!1,showOptionImages:ie=!0,showOptionCounts:S=!0,showSkipButton:F,showProducts:c,submitProgress:A,productsLayout:Te,productImageFallback:De,showProductVendor:fe,autoFocus:Ge=!0,onFocus:Me,onBlur:u,value:Pe,completedParams:Ne,onChange:He,onParamsChange:g,products:C,mapProducts:P,onProductSelect:R,onProductAddToCart:D,submitButton:$,resetOnSubmit:le=!0,seeAllResults:de=!1},Ie){let be=pt(null),Fe=pt(null),ce=pt(null),Ke=pt(()=>{}),_=pt(null),Ae=pt(null);Ut(()=>{let M=be.current;if(M)return _.current?_.current.setMode(T):_.current=new mn(M,T),()=>{_.current?.destroy(),_.current=null}},[T]);let Ze=zt(M=>{let re=Ae.current?.current;re&&(re.focus(),gn(re,M))},[]),{completedParams:ut,suggestionPills:we,setActivePill:qe,skipActivePill:Ve,segments:J,newParamId:ve,clearNewParamId:_e,placeholderText:a,isFocused:Z,isDropdownOpen:xe,isActivePillSelected:f,isLoading:Ue,isReady:Ee,activeIndex:ye,listboxId:b,handleTextChange:Xe,handleCompositionText:Je,handleKeyDown:ze,setFocused:et,editingParam:tt,editingIdentified:Re,editingAnchor:at,caretOffset:Oe,startEditingParam:ke,removeParam:it,handleCaretAfterInput:Qe,handleCaretMove:ot,replaceEditingRange:I,dropdownProps:mt,reset:l,refreshProducts:U,prepareSubmit:B,getState:gt,recordSubmit:Yt,holdSubmit:jt,endSubmitProgress:$t,getSearchId:Zt,getVisitorId:Xt,refreshAnalyticsConsent:Jt,isSubmitting:Rt}=Vt({onSubmit:M=>Ke.current(M),onResult:t,onError:i,optionOverrides:o,maskCompletedText:s,apiConfig:d,additionalContext:w,language:v,currency:x,productId:m,visitorId:p,analyticsConsent:h,columns:y,dropdownTrigger:W,optionsPosition:L,closeDropdownOnBlur:z,prependPlaceholder:N,allOption:H,showNonTappableOptions:G,locationSearch:j,showOptionIcons:E,showOptionImages:ie,showOptionCounts:S,showSkipButton:F,showProducts:c,submitProgress:A,onFocus:Me,onBlur:u,value:Pe,completedParams:Ne,onChange:He,onParamsChange:g,products:C,mapProducts:P,onProductSelect:R,onProductAddToCart:D,source:"full-sdk",setCursor:Ze});Ut(()=>{if(!ve)return;let M=window.setTimeout(()=>_e(),650);return()=>window.clearTimeout(M)},[ve,_e]);let qa=ye>=0?`${b}-option-${ye}`:void 0,{inputRef:Ot,editorProps:Va,focus:St,blur:ea,getPlainText:ta}=Ka({segments:J,newParamId:ve,editingParam:tt,editingIdentified:Re,editingAnchor:at,caretOffset:Oe,placeholderText:a,hintSuggestions:k==="inline"?[]:we,isFocused:Z,showChipIcons:ae,showChipImages:ne,showChipRemove:V,removeParam:it,isDropdownOpen:xe,listboxId:b,activeDescendantId:qa,autoFocus:Ge,handleTextChange:Xe,handleCompositionText:Je,handleKeyDown:ze,handleCaretAfterInput:Qe,handleCaretMove:ot,startEditingParam:ke,replaceEditingRange:I,setFocused:et});Ae.current=Ot,hn(()=>{let M=Fe.current,re=Ot.current;if(!M||!re)return;let bt=()=>{let aa=M.firstElementChild;if(!aa)return;let $a=aa.getBoundingClientRect(),Za=re.getBoundingClientRect();$a.top>=Za.bottom-2?M.setAttribute("data-aia-pill-wrapped",""):M.removeAttribute("data-aia-pill-wrapped")};bt();let wt=new ResizeObserver(bt);return wt.observe(re),()=>wt.disconnect()},[J,we.length,Ue,Ot]),Ut(()=>{let M=ce.current;if(M)return bn(M)},[]),pn(Ie,()=>({focus:St,blur:ea,reset:l,refreshProducts:U,setMode:M=>_.current?.setMode(M),skipActivePill:Ve,endSubmitProgress:$t,getSearchId:Zt,getVisitorId:Xt,refreshAnalyticsConsent:Jt}),[St,ea,l,U,Ve,$t,Zt,Xt,Jt]);let nt=!!J.length||ut.length>0,ft=zt(M=>{if(!nt||M&&gt().isSubmitting)return;M&&B();let re=gt(),bt=un(ta(),re.completedParams,re.skippedParams,{identifiedParams:re.identifiedParams,isReady:re.isReady,customFields:re.customFields});M&&Yt(bt);let wt=n(bt);return M&&!le&&jt(wt),le&&l(),wt},[Yt,jt,le,nt,B,gt,n,l,ta]);Ke.current=()=>ft(!1);let _a=de&&!mt.isInputEmpty&&nt,Ua=zt(()=>ft(!0),[ft]),Qa=zt(M=>{M.target?.closest("[data-aia-pill]")||document.activeElement?.closest("[data-aia-location]")||St()},[St]),Ya=k==="inline",ja=k==="dropdown";return Qt("div",{ref:be,className:`magicx-aia ${Ye.container} ${r??""}`,"data-pill-placement":k,"data-options-position":L,"data-animations":O?"on":"off","data-aia-options-style":X,"data-mode":wn(T),children:[ht(Kt,{...mt,showPills:ja,productsLayout:Te,productImageFallback:De,showProductVendor:fe,onSeeAllResults:_a?Ua:void 0,fullWidth:de}),Qt("div",{className:Ye.inputWrapper,"data-aia-input-wrapper":"",onClick:Qa,children:[Qt("div",{ref:ce,className:Ye.editorArea,"data-aia-editor":"",children:[ht("div",{...Va,className:Ye.input,"data-aia-input":""}),Ya&&(Ue||we.length>0)&&ht("span",{ref:Fe,className:Ye.pillListContainer,"data-aia-pill-list-container":"",children:ht(Tt,{pills:we,activePillIndex:0,activeSelected:f,onSelectPill:qe,loading:Ue})})]}),$===null?null:$===void 0?ht(Oa,{disabled:!nt,ready:nt&&Ee,busy:Rt,onClick:()=>ft(!0),label:fn(v).submit}):ht("span",{"data-aia-submit":"","data-aia-submit-slot":"","data-aia-submit-state":Rt?"busy":void 0,"aria-busy":Rt?!0:void 0,className:Ye.submitSlot,onClick:M=>{nt&&(M.stopPropagation(),ft(!0))},children:$})]})]})});export{vn as AIAutocomplete,Kt as AIAutocompleteDropdown,As as DATE_RANGE_META_END,Es as DATE_RANGE_META_START,zs as DEFAULT_OPTION_COUNT_UNIT,Fs as LOCATION_META_KEY,Us as PRODUCT_PATH_PREFIX,al as TIME_META_KEY,ol as WEEKDAY_LABELS,Ts as buildSubmitResult,Ps as cellDay,Is as cellIso,Rs as dateCellMarks,Os as formatDate,Ls as formatDateRange,Ds as formatOptionCount,Ms as formatPlace,Ns as formatTime,Hs as isoDate,Bs as monthLabel,Ws as optionCountLabel,Gs as optionHasImage,Ks as optionImageSources,qs as optionImageSrc,Vs as optionLabel,_s as optionsShowLeadingVisuals,Qs as parseDate,Ys as parseLooseDate,js as parseLooseDateRange,$s as parseTime,Zs as productFromMatchedItem,Xs as productImageSources,Js as productsFromCustomFields,el as sanitizeOptionIconSvg,tl as selectedRangeFor,Vt as useAIAutocomplete,il as visibleDateRange,nl as withSkippedParams};
3939
+ `,document.head.appendChild(e)}var Ha={submitButton:"aia-submitButton-otz7H",submitSpin:"aia-submitSpin-0llcF"};import{jsx as Yt}from"react/jsx-runtime";function Ba({disabled:e,ready:n,busy:t=!1,onClick:i,label:o=Zo().submit}){return Yt("button",{type:"button","data-aia-submit":"",className:Ha.submitButton,disabled:e,"data-aia-ready":n?"":void 0,"data-aia-submit-state":t?"busy":void 0,"aria-busy":t?!0:void 0,onClick:l=>{l.stopPropagation(),i()},"aria-label":o,children:Yt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":o,children:Yt("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}import{AIAutocomplete as Xo,dateSelectionFor as Jo,dropdownPillsFor as en,editingSuggestion as tn,HANDOFF_NOT_HANDLED as an,identifiedParamLabel as on,withoutTraditionalAutocomplete as nn}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as _a,useEffect as Ke,useMemo as rn,useRef as U,useState as sn}from"react";import{useRef as Wa}from"react";function Ga(e){let n=Wa(e);n.current=e;let t=Object.keys(e??{}).sort().join("\0"),i=Wa({key:"",overrides:void 0});if(i.current.key!==t){let o={};for(let l of Object.keys(e??{})){let r=(d,f,v)=>{let x=n.current?.[l];return x?x(d,f,v):[]};o[l]=r}i.current={key:t,overrides:e?o:void 0}}return{overrides:i.current.overrides,key:t}}import{useRef as Ka}from"react";function qa(e){let n=Ka(e);n.current=e;let t=Ka(null);t.current===null&&(t.current={fetch:(o,l)=>{let r=n.current;return r?r.fetch(o,l):Promise.reject(new Error("products config removed"))},transform:o=>n.current?.transform(o)??[],get limit(){return n.current?.limit}});let i=e!==void 0;return{config:i?t.current:void 0,enabled:i}}var ln={query:"",raw_query:"",completed_params:[],identified_params:[],is_ready:!1},Va={text:"",composing:null,completedParams:[],identifiedParams:[],skippedParams:[],pendingSpan:null,suggestions:[],products:[],traditionalAutocomplete:!1,customFields:null,optionSearch:null,activeDropdownIndex:-1,newParamId:null,isLoading:!0,isReady:!1,error:null,segments:[],actionableSuggestions:[],filteredOptions:[],dropdownLoading:!0,dropdownOptions:[],skeletonOptions:null,skeletonSuggestion:null,skeletonPicked:null,dropdownSuggestion:null,skeletonRequested:!1,skeletonExiting:!1,activeFormatType:"options",dateView:null,dateRangeStart:null,dateReferences:[],dateFloor:null,timeView:null,multiSelectView:null,dropdownMultiSelect:null,multiSelectDraft:null,locationView:null,locationSearch:null,locationAutocomplete:!0,locationFieldFocused:!1,isSubmitting:!1,selectingProductId:null,placeholderText:"",leadInText:"",optionQuery:"",isSearchingOptions:!1,isDropdownOpen:!1,isActivePillSelected:!1,filterBase:0,filterInProgress:!1,pillTapped:!1,skipNextFetch:!1,lastRawQuery:"",isFocused:!1,dropdownHeld:!1,editingParam:null,editingIdentified:null,editingAnchor:null,editingTail:null,caretOffset:null,inSelectionAnimation:!1,dateViewMonth:null,pendingRangeStart:null,timeDraft:null};function jt({onSubmit:e,onResult:n,onError:t,optionOverrides:i,maskCompletedText:o,apiConfig:l,additionalContext:r,language:d,currency:f,productId:v,visitorId:x,analyticsConsent:m,columns:p=2,dropdownTrigger:h,optionsPosition:y,closeDropdownOnBlur:S,focusInputOnSelect:T,startingState:D,prependPlaceholder:O,allOption:$,showNonTappableOptions:F,locationSearch:E,showOptionIcons:M,showOptionImages:H,showOptionCounts:K,showSkipButton:ne,showProducts:q,submitProgress:P,awaitAnswerOnSubmit:Z,submitAnswerTimeoutMs:_,productImageFallback:se="image",showProductVendor:A=!0,onFocus:G,onBlur:c,value:k,completedParams:le,onChange:Ne,onParamsChange:ue,products:qe,mapProducts:Ie,onProductSelect:Ae,onProductAddToCart:me,source:_e,setCursor:Fe}){let u=U(null),[Ve,g]=sn(null),C=U(e);C.current=e;let R=U(n);R.current=n;let z=U(t);z.current=t;let N=U(Ne);N.current=Ne;let ee=U(ue);ee.current=ue;let ye=U(G);ye.current=G;let ae=U(c);ae.current=c;let ke=U(Fe);ke.current=Fe;let Ee=U(Ae);Ee.current=Ae;let Ue=U(me);Ue.current=me;let ie=U(x);ie.current=x;let Re=U(()=>{let s=ie.current;return typeof s=="function"?s():s}).current,ge=x!==void 0,Qe=U(m);Qe.current=m;let de=U(()=>{let s=Qe.current;return typeof s=="function"?s():s}).current,He=qa(qe),it=U(Ie);it.current=Ie;let re=U((s,Q)=>{let B=it.current;return B?B(s,Q):s}).current,ce=Ie?re:void 0,Be=Ga(i);Ke(()=>{if(typeof document>"u")return;let s=new Xo(document.createElement("div"),{renderMode:"headless",apiConfig:l,additionalContext:r,language:d,currency:f,productId:v,visitorId:ge?Re:void 0,analyticsConsent:de,optionOverrides:Be.overrides,maskCompletedText:o,columns:p,dropdownTrigger:h,optionsPosition:y,closeDropdownOnBlur:S,focusInputOnSelect:T,startingState:D,prependPlaceholder:O,allOption:$,showNonTappableOptions:F,locationSearch:E,showProducts:q,submitProgress:P,awaitAnswerOnSubmit:Z,submitAnswerTimeoutMs:_,source:_e,value:k,completedParams:le,onSubmit:(...B)=>C.current?.(...B),onResult:(...B)=>R.current?.(...B),onError:(...B)=>z.current?.(...B),onChange:(...B)=>N.current?.(...B),onParamsChange:(...B)=>ee.current?.(...B),onFocus:()=>ye.current?.(),onBlur:()=>ae.current?.(),onProductSelect:B=>Ee.current?Ee.current(B):an,onProductAddToCart:B=>Ue.current?.(B),setCursor:B=>ke.current?.(B),products:He.config,mapProducts:ce});u.current=s,g(s.getState());let Q=s.subscribe(B=>g(B));return()=>{Q(),s.destroy(),u.current===s&&(u.current=null)}},[]);let a=U(ge);Ke(()=>{a.current!==ge&&(a.current=ge,u.current?.update({visitorId:ge?Re:void 0,analyticsConsent:de}))},[ge,Re,de]);let W=typeof m=="function"?"function":m,fe=U(W);Ke(()=>{fe.current!==W&&(fe.current=W,u.current?.refreshAnalyticsConsent())},[W]),Ke(()=>{k!==void 0&&u.current?.setValue(k)},[k]),Ke(()=>{le!==void 0&&u.current?.setCompletedParams(le)},[le]);let Se=JSON.stringify(l??null),Ye;try{Ye=JSON.stringify(r??null)}catch{Ye="[unstringifiable]"}Ke(()=>{u.current?.update({apiConfig:l,additionalContext:r,language:d,currency:f,productId:v,optionOverrides:Be.overrides,dropdownTrigger:h,optionsPosition:y,closeDropdownOnBlur:S,focusInputOnSelect:T,startingState:D,prependPlaceholder:O,allOption:$,showNonTappableOptions:F,locationSearch:E,showProducts:q,submitProgress:P,awaitAnswerOnSubmit:Z,submitAnswerTimeoutMs:_})},[Se,Ye,d,f?.code,f?.rate,f?.country,v,Be.key,h,y,S,T,D,O,$,F,E,q,P,Z,_]);let Ce=U(!1);Ke(()=>{if(!Ce.current){Ce.current=!0;return}u.current?.update({products:He.config})},[He.enabled]),Ke(()=>{u.current?.update({mapProducts:ce})},[ce]);let ze=U(null);ze.current===null&&(ze.current={handleTextChange:s=>u.current?.handleTextChange(s),handleCompositionText:s=>u.current?.handleCompositionText(s),handleKeyDown:s=>{let Q="nativeEvent"in s?s.nativeEvent:s;u.current?.handleKeyDown(Q)},setFocused:s=>u.current?.setFocused(s),startEditingParam:s=>u.current?.startEditingParam(s),removeParam:s=>u.current?.removeParam(s)??!1,exitEditMode:()=>u.current?.exitEditMode(),handleCaretAfterInput:s=>u.current?.handleCaretAfterInput(s),handleCaretMove:s=>u.current?.handleCaretMove(s),replaceEditingRange:s=>u.current?.replaceEditingRange(s)??!1,setActivePill:s=>u.current?.setActivePill(s),skipActivePill:()=>u.current?.skipActivePill(),removeLastParam:()=>u.current?.removeLastParam(),clearNewParamId:()=>u.current?.clearNewParamId(),reset:()=>u.current?.reset(),refreshProducts:()=>u.current?.refreshProducts(),prepareSubmit:()=>u.current?.prepareSubmit(),getState:()=>u.current?.getState()??Va,getResult:()=>u.current?.getResult()??ln,awaitSubmitResult:()=>u.current?.awaitSubmitResult()??Promise.resolve(null),recordSubmit:s=>u.current?.recordSubmit(s),holdSubmit:s=>u.current?.holdSubmit(s),endSubmitProgress:()=>u.current?.endSubmitProgress(),getSearchId:()=>u.current?.getSearchId(),getVisitorId:()=>u.current?.getVisitorId(),refreshAnalyticsConsent:()=>u.current?.refreshAnalyticsConsent(),selectOption:(s,Q)=>u.current?.selectOption(s,Q),selectProduct:s=>u.current?.selectProduct(s),addProductToCart:s=>{let Q=u.current;return!Q||!Ue.current?Promise.resolve():Q.addProductToCart(s)},setActiveDropdownIndex:s=>u.current?.setActiveDropdownIndex(s),clearHighlight:s=>u.current?.clearHighlight(s),showPreviousMonth:()=>u.current?.showPreviousMonth(),showNextMonth:()=>u.current?.showNextMonth(),setTime:s=>u.current?.setTime(s),commitTime:()=>u.current?.commitTime(),toggleMultiSelectOption:s=>u.current?.toggleMultiSelectOption(s),commitMultiSelect:()=>u.current?.commitMultiSelect(),setLocationQuery:s=>u.current?.setLocationQuery(s),moveLocationHighlight:s=>u.current?.moveLocationHighlight(s),commitLocation:s=>u.current?.commitLocation(s),setLocationFieldFocused:s=>u.current?.setLocationFieldFocused(s),handleFocus:()=>u.current?.setFocused(!0),handleBlur:()=>u.current?.setFocused(!1)});let w=ze.current,je=_a(s=>{let Q=s.target.value,ct=Q.length>0&&!s.nativeEvent?.isComposing&&Q[0]!==Q[0].toUpperCase()?Q[0].toUpperCase()+Q.slice(1):Q;u.current?.handleTextChange(ct)},[]),ot=_a(s=>{u.current?.handleKeyDown(s.nativeEvent)},[]),Le=u.current,b=Ve??Va,$e=k!==void 0?k:b.text,nt=le!==void 0?le:b.completedParams,Oe=b.actionableSuggestions,rt=Oe[0],st=rn(()=>nn(Oe),[Oe]),We=Le?.listboxId??"",lt=b.activeDropdownIndex>=0&&Le?`${We}-option-${b.activeDropdownIndex}`:void 0,De=b.editingParam,I=b.editingIdentified,Tt=De?tn(De):I?{parameter:I.parameter,text:on(I.parameter),required:!0,options:[]}:null,Pt=b.dropdownSuggestion??Tt??rt,Mt=en(b.dropdownSuggestion,Tt,Oe),dt=Jo(b),wt=!Le||b.dropdownLoading;return{completedParams:nt,multiSelectView:b.multiSelectView,toggleMultiSelectOption:w.toggleMultiSelectOption,commitMultiSelect:w.commitMultiSelect,skippedParams:b.skippedParams,identifiedParams:b.identifiedParams,suggestionPills:st,setActivePill:w.setActivePill,skipActivePill:w.skipActivePill,removeLastParam:w.removeLastParam,segments:b.segments,newParamId:b.newParamId,clearNewParamId:w.clearNewParamId,suggestions:b.suggestions,activeIndex:b.activeDropdownIndex,isReady:b.isReady,isLoading:wt,isFocused:b.isFocused,isDropdownOpen:b.isDropdownOpen,isActivePillSelected:b.isActivePillSelected,placeholderText:b.placeholderText,listboxId:We,error:b.error,products:b.products,customFields:b.customFields,selectProduct:w.selectProduct,addProductToCart:w.addProductToCart,handleTextChange:w.handleTextChange,handleCompositionText:w.handleCompositionText,handleKeyDown:w.handleKeyDown,setFocused:w.setFocused,editingParam:De,editingIdentified:I,editingAnchor:b.editingAnchor,caretOffset:b.caretOffset,startEditingParam:w.startEditingParam,removeParam:w.removeParam,exitEditMode:w.exitEditMode,handleCaretAfterInput:w.handleCaretAfterInput,handleCaretMove:w.handleCaretMove,replaceEditingRange:w.replaceEditingRange,inputProps:{value:$e,placeholder:b.placeholderText||void 0,onChange:je,onKeyDown:ot,onFocus:w.handleFocus,onBlur:w.handleBlur,role:"combobox","aria-expanded":b.isDropdownOpen,"aria-activedescendant":lt,"aria-autocomplete":"list","aria-controls":We},reset:w.reset,refreshProducts:w.refreshProducts,prepareSubmit:w.prepareSubmit,getState:w.getState,getResult:w.getResult,awaitSubmitResult:w.awaitSubmitResult,recordSubmit:w.recordSubmit,holdSubmit:w.holdSubmit,endSubmitProgress:w.endSubmitProgress,getSearchId:w.getSearchId,getVisitorId:w.getVisitorId,refreshAnalyticsConsent:w.refreshAnalyticsConsent,isSubmitting:b.isSubmitting,selectingProductId:b.selectingProductId,dropdownProps:{suggestions:Pt?[{...Pt,options:b.dropdownOptions}]:[],activeIndex:b.activeDropdownIndex,onSelect:w.selectOption,onHighlight:w.setActiveDropdownIndex,onUnhighlight:w.clearHighlight,isOpen:b.isDropdownOpen,id:We,pills:Mt,activeSelected:b.isActivePillSelected,onPillClick:w.setActivePill,onSkip:w.skipActivePill,showSkipButton:(ne??!0)&&!De&&!I,showOptionIcons:M??!0,showOptionImages:H??!0,showOptionCounts:K??!0,skipDisabled:b.inSelectionAnimation,isLoading:wt,skeletonExiting:b.skeletonExiting,isInputEmpty:$e.trim().length===0,language:d,products:b.products,productImageFallback:se,showProductVendor:A,onProductSelect:w.selectProduct,busyProductId:b.selectingProductId,seeAllBusy:b.isSubmitting,onProductAddToCart:me?w.addProductToCart:void 0,onProductFocusChange:w.setFocused,formatType:b.activeFormatType,dateView:b.dateView,selectedDateIso:dt.selectedIso,selectedDateRange:dt.selectedRange,dateRangeStart:dt.rangeStart,dateReferences:dt.references,onPreviousMonth:w.showPreviousMonth,onNextMonth:w.showNextMonth,timeView:b.timeView,multiSelectView:b.dropdownMultiSelect,onMultiSelectCommit:w.commitMultiSelect,onTimeChange:w.setTime,onTimeCommit:w.commitTime,locationView:b.locationView,isReediting:b.editingParam!=null,onLocationQuery:w.setLocationQuery,onLocationMove:w.moveLocationHighlight,onLocationCommit:w.commitLocation,onLocationFocusChange:w.setLocationFieldFocused,isFocused:b.isFocused||b.locationFieldFocused,optionsPosition:y??"below"}}}import{attachChipRemove as dn,cancelStartingHint as cn,chipIdFromTap as pn,extractPlainText as Ua,focusesInputOnSelect as hn,getCursorOffset as Qa,keepCaretOnChip as un,plainTextLength as mn,renderEditableContent as gn,setCursorOffset as fn,settlePickFocus as bn,startingHintOptions as wn}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as xe,useEffect as gt,useLayoutEffect as $t,useRef as at}from"react";var Ot;function vn(){if(Ot!==void 0)return Ot;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),Ot=e.contentEditable==="plaintext-only",Ot}function Ya(e){let{segments:n,showChipIcons:t=!0,showChipImages:i=!0,showChipRemove:o=!1,focusInputOnSelect:l,removeParam:r,newParamId:d,editingParam:f,editingIdentified:v,editingAnchor:x,caretOffset:m,placeholderText:p,hintSuggestions:h,isFocused:y,isDropdownOpen:S,listboxId:T,activeDescendantId:D,autoFocus:O,handleTextChange:$,handleCompositionText:F,handleKeyDown:E,handleCaretAfterInput:M,handleCaretMove:H,startEditingParam:K,replaceEditingRange:ne,setFocused:q}=e,P=at(null),Z=at(!1),_=at(""),se=at(""),A=at(null),G=at(0);A.current=m;let c=at(l);c.current=l,gt(()=>{if(!O)return;let g=P.current;if(!g)return;document.activeElement===g?q(!0):g.focus();let C=g.ownerDocument??document,R=C.getSelection(),z=R&&R.rangeCount>0&&g.contains(R.anchorNode);if(R&&!z){let N=C.createRange();N.selectNodeContents(g),N.collapse(!0),R.removeAllRanges(),R.addRange(N)}},[O,q]),gt(()=>{let g=P.current;if(!g)return;let C=g.ownerDocument??document,R=()=>{let z=C.getSelection();if(!z||z.rangeCount===0||!z.anchorNode||!g.contains(z.anchorNode))return;let N=z.anchorNode,ee=N.nodeType===Node.ELEMENT_NODE?N:N.parentElement,ae=(z.isCollapsed?ee?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,ke=f?.id??v?.id??null;if(ae&&ae!==ke){K(ae);return}performance.now()-G.current<50||H(Qa(g))};return C.addEventListener("selectionchange",R),()=>C.removeEventListener("selectionchange",R)},[f,v,K,H]),gt(()=>{let g=P.current;if(!g)return;let C=R=>{let z=pn(g,R.target);z&&(K(z),un(g,z))};return g.addEventListener("click",C),()=>g.removeEventListener("click",C)},[K]),gt(()=>{let g=P.current;if(!(!g||!r||!o))return dn(g,r)},[r,o]),$t(()=>{let g=P.current;g&&gn({input:g,segments:n,newParamId:d,editingParamId:f?.id??null,placeholderText:p??"",isFocused:y,showChipIcons:t,showChipImages:i,showChipRemove:o,hintOptions:wn(h??[])})},[n,d,f,p,h,y,t,i,o]),gt(()=>{let g=P.current;return()=>{g&&cn(g)}},[]),$t(()=>{let g=_.current,C=d??"";if(_.current=C,!C||C===g)return;let R=P.current;if(!R)return;let z=A.current??mn(R);bn(R,z,hn(c.current))},[d]),$t(()=>{let g=se.current,C=f?.id??"";if(se.current=C,!C||C===g||x==null)return;let R=P.current;R&&fn(R,x)},[f,x]);let k=xe(()=>{let g=P.current;if(!g)return;let C=Ua(g),z=C.length>0&&C[0]!==C[0].toUpperCase()?C[0].toUpperCase()+C.slice(1):C;if(Z.current){F(z);return}$(z)},[$,F]),le=xe(()=>{G.current=performance.now(),k();let g=P.current;g&&M(Qa(g))},[k,M]);gt(()=>{let g=P.current;if(!g)return;let C=R=>{let z=R,N=z.inputType;if(N==="insertParagraph"||N==="insertLineBreak"||N==="insertFromDrop"){R.preventDefault();return}if(N.startsWith("insert")||N.startsWith("delete")){let ee=N.startsWith("delete")?"":z.data??"";ne(ee)&&R.preventDefault()}};return g.addEventListener("beforeinput",C),()=>g.removeEventListener("beforeinput",C)},[ne]);let Ne=xe(()=>{Z.current=!0,P.current?.setAttribute("data-aia-composing","true")},[]),ue=xe(()=>{Z.current=!1,P.current?.removeAttribute("data-aia-composing"),k()},[k]),qe=xe(g=>{g.preventDefault();let C=P.current;if(!C)return;let R=(g.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!R)return;let z=C.ownerDocument??document,N=z.getSelection();if(!N||N.rangeCount===0)return;let ee=N.getRangeAt(0);if(!C.contains(ee.startContainer))return;ee.deleteContents();let ye=z.createTextNode(R);ee.insertNode(ye),ee.setStartAfter(ye),ee.collapse(!0),N.removeAllRanges(),N.addRange(ee),k()},[k]),Ie=xe(g=>E(g),[E]),Ae=xe(()=>q(!0),[q]),me=xe(()=>q(!1),[q]),_e=xe(()=>P.current?.focus(),[]),Fe=xe(()=>P.current?.blur(),[]),u=xe(()=>{let g=P.current;return g?Ua(g):""},[]),Ve=vn()?"plaintext-only":"true";return{inputRef:P,editorProps:{ref:P,contentEditable:Ve,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":T,"aria-expanded":S,"aria-activedescendant":D,spellCheck:!0,enterKeyHint:"send",onInput:le,onKeyDown:Ie,onCompositionStart:Ne,onCompositionEnd:ue,onPaste:qe,onFocus:Ae,onBlur:me},getPlainText:u,focus:_e,blur:Fe}}import{jsx as bt,jsxs as Xt}from"react/jsx-runtime";function En(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var Rn=xn(function({onSubmit:n,onResult:t,onError:i,optionOverrides:o,maskCompletedText:l,className:r,apiConfig:d,additionalContext:f,language:v,currency:x,productId:m,visitorId:p,analyticsConsent:h,columns:y,pillPlacement:S="dropdown",mode:T="auto",optionsPosition:D="below",animations:O=!0,optionsStyle:$="floating",dropdownTrigger:F,closeDropdownOnBlur:E,focusInputOnSelect:M,startingState:H,prependPlaceholder:K,allOption:ne,showNonTappableOptions:q,locationSearch:P,showOptionIcons:Z=!0,showChipIcons:_=!0,showChipImages:se=!0,showChipRemove:A=!1,showOptionImages:G=!0,showOptionCounts:c=!0,showSkipButton:k,showProducts:le,submitProgress:Ne,awaitAnswerOnSubmit:ue,submitAnswerTimeoutMs:qe,productsLayout:Ie,productImageFallback:Ae,showProductVendor:me,autoFocus:_e=!0,onFocus:Fe,onBlur:u,value:Ve,completedParams:g,onChange:C,onParamsChange:R,products:z,mapProducts:N,onProductSelect:ee,onProductAddToCart:ye,submitButton:ae,resetOnSubmit:ke=!0,seeAllResults:Ee=!1},Ue){let ie=ft(null),Re=ft(null),ge=ft(null),Qe=ft(()=>{}),de=ft(null),He=ft(null);Zt(()=>{let L=ie.current;if(L)return de.current?de.current.setMode(T):de.current=new Tn(L,T),()=>{de.current?.destroy(),de.current=null}},[T]);let it=Dt(L=>{let be=He.current?.current;be&&(be.focus(),Pn(be,L))},[]),{completedParams:re,suggestionPills:ce,setActivePill:Be,skipActivePill:a,segments:W,newParamId:fe,clearNewParamId:Se,placeholderText:Ye,isFocused:Ce,isDropdownOpen:ze,isActivePillSelected:w,isLoading:je,isReady:ot,activeIndex:Le,listboxId:b,handleTextChange:$e,handleCompositionText:nt,handleKeyDown:Oe,setFocused:rt,editingParam:st,editingIdentified:We,editingAnchor:lt,caretOffset:De,startEditingParam:I,removeParam:Tt,handleCaretAfterInput:Pt,handleCaretMove:Mt,replaceEditingRange:dt,dropdownProps:wt,reset:s,refreshProducts:Q,prepareSubmit:B,getState:ct,getResult:Jt,awaitSubmitResult:ea,recordSubmit:ta,holdSubmit:aa,endSubmitProgress:ia,getSearchId:oa,getVisitorId:na,refreshAnalyticsConsent:ra,isSubmitting:Nt}=jt({onSubmit:L=>Qe.current(L),onResult:t,onError:i,optionOverrides:o,maskCompletedText:l,apiConfig:d,additionalContext:f,language:v,currency:x,productId:m,visitorId:p,analyticsConsent:h,columns:y,dropdownTrigger:F,optionsPosition:D,closeDropdownOnBlur:E,focusInputOnSelect:M,startingState:H,prependPlaceholder:K,allOption:ne,showNonTappableOptions:q,locationSearch:P,showOptionIcons:Z,showOptionImages:G,showOptionCounts:c,showSkipButton:k,showProducts:le,submitProgress:Ne,awaitAnswerOnSubmit:ue,submitAnswerTimeoutMs:qe,onFocus:Fe,onBlur:u,value:Ve,completedParams:g,onChange:C,onParamsChange:R,products:z,mapProducts:N,onProductSelect:ee,onProductAddToCart:ye,source:"full-sdk",setCursor:it});Zt(()=>{if(!fe)return;let L=window.setTimeout(()=>Se(),650);return()=>window.clearTimeout(L)},[fe,Se]);let ja=Le>=0?`${b}-option-${Le}`:void 0,{inputRef:pt,editorProps:$a,focus:sa,blur:la,getPlainText:da}=Ya({segments:W,newParamId:fe,editingParam:st,editingIdentified:We,editingAnchor:lt,caretOffset:De,placeholderText:Ye,hintSuggestions:S==="inline"?[]:ce,isFocused:Ce,showChipIcons:_,showChipImages:se,showChipRemove:A,removeParam:Tt,focusInputOnSelect:M,isDropdownOpen:ze,listboxId:b,activeDescendantId:ja,autoFocus:_e,handleTextChange:$e,handleCompositionText:nt,handleKeyDown:Oe,handleCaretAfterInput:Pt,handleCaretMove:Mt,startEditingParam:I,replaceEditingRange:dt,setFocused:rt});He.current=pt,kn(()=>{let L=Re.current,be=pt.current;if(!L||!be)return;let Xe=()=>{let xt=L.firstElementChild;if(!xt)return;let ai=xt.getBoundingClientRect(),ii=be.getBoundingClientRect();ai.top>=ii.bottom-2?L.setAttribute("data-aia-pill-wrapped",""):L.removeAttribute("data-aia-pill-wrapped")};Xe();let vt=new ResizeObserver(Xe);return vt.observe(be),()=>vt.disconnect()},[W,ce.length,je,pt]),Zt(()=>{let L=ge.current;if(L)return An(L)},[]),yn(Ue,()=>({focus:sa,blur:la,reset:s,refreshProducts:Q,setMode:L=>de.current?.setMode(L),skipActivePill:a,endSubmitProgress:ia,getSearchId:oa,getVisitorId:na,refreshAnalyticsConsent:ra}),[sa,la,s,Q,a,ia,oa,na,ra]);let Ze=!!W.length||re.length>0,It=Dt((L,be)=>{let Xe=ct(),vt=Sn(da(),Xe.completedParams,Xe.skippedParams,{identifiedParams:Xe.identifiedParams,isReady:Xe.isReady,customFields:be.custom_fields??null,customFieldsStale:be.custom_fields_stale===!0});L&&ta(vt);let xt=n(vt);return L&&!ke&&aa(xt),ke&&s(),xt},[ta,aa,ke,ct,n,s,da]),Ft=Dt(()=>{if(Ze&&!ct().isSubmitting){if(ue){ea().then(L=>{L&&It(!0,L)});return}B(),It(!0,Jt())}},[Ze,ct,ue,ea,B,Jt,It]);Qe.current=L=>Ze?It(!1,L):void 0;let Za=Ee&&!wt.isInputEmpty&&Ze,Xa=Ft,Ja=Dt(L=>{L.target?.closest("[data-aia-pill]")||document.activeElement?.closest("[data-aia-location]")||pt.current&&Cn(pt.current)},[pt]),ei=S==="inline",ti=S==="dropdown";return Xt("div",{ref:ie,className:`magicx-aia ${Je.container} ${r??""}`,"data-pill-placement":S,"data-options-position":D,"data-animations":O?"on":"off","data-aia-options-style":$,"data-mode":En(T),children:[bt(Qt,{...wt,showPills:ti,productsLayout:Ie,productImageFallback:Ae,showProductVendor:me,onSeeAllResults:Za?Xa:void 0,fullWidth:Ee}),Xt("div",{className:Je.inputWrapper,"data-aia-input-wrapper":"",onClick:Ja,children:[Xt("div",{ref:ge,className:Je.editorArea,"data-aia-editor":"",children:[bt("div",{...$a,className:Je.input,"data-aia-input":""}),ei&&(je||ce.length>0)&&bt("span",{ref:Re,className:Je.pillListContainer,"data-aia-pill-list-container":"",children:bt(Et,{pills:ce,activePillIndex:0,activeSelected:w,onSelectPill:Be,loading:je})})]}),ae===null?null:ae===void 0?bt(Ba,{disabled:!Ze,ready:Ze&&ot,busy:Nt,onClick:Ft,label:In(v).submit}):bt("span",{"data-aia-submit":"","data-aia-submit-slot":"","data-aia-submit-state":Nt?"busy":void 0,"aria-busy":Nt?!0:void 0,className:Je.submitSlot,onClick:L=>{Ze&&(L.stopPropagation(),Ft())},children:ae})]})]})});export{Rn as AIAutocomplete,Qt as AIAutocompleteDropdown,Bs as DATE_RANGE_META_END,Ws as DATE_RANGE_META_START,Gs as DEFAULT_OPTION_COUNT_UNIT,Zs as LOCATION_META_KEY,nl as PRODUCT_PATH_PREFIX,gl as TIME_META_KEY,bl as WEEKDAY_LABELS,Ns as buildSubmitResult,Fs as cellDay,Hs as cellIso,Ks as dateCellMarks,qs as focusesInputOnSelect,_s as formatDate,Vs as formatDateRange,Us as formatOptionCount,Qs as formatPlace,Ys as formatTime,$s as isTouchPrimary,js as isoDate,Xs as monthLabel,Js as optionCountLabel,el as optionHasImage,tl as optionImageSources,al as optionImageSrc,il as optionLabel,ol as optionsShowLeadingVisuals,rl as parseDate,sl as parseLooseDate,ll as parseLooseDateRange,dl as parseTime,cl as productFromMatchedItem,pl as productImageSources,hl as productsFromCustomFields,ul as sanitizeOptionIconSvg,ml as selectedRangeFor,jt as useAIAutocomplete,fl as visibleDateRange,wl as withSkippedParams};
3940
3940
  //# sourceMappingURL=index.mjs.map