"use strict";exports.id=6393,exports.ids=[6393],exports.modules={66393:(e,t,r)=>{r.r(t),r.d(t,{ANALYTICS_EVENT_TYPE:()=>a.vi,STORE_EVENT_PREFIX:()=>a.Mi,SearchProvider:()=>l.z,UIContext:()=>E,UIProvider:()=>Provider_Provider,compose:()=>N.q,createBaseStore:()=>y.M,createCartStore:()=>M.n,createSessionStore:()=>C.S,createStore:()=>P.M,formatSearchState:()=>i.Z,initSearchState:()=>n.j,isSearchSort:()=>c.wb,optimistic:()=>f.A,parseSearchState:()=>s.Q,persisted:()=>h.R,removeFacet:()=>c.Ru,sendAnalyticsEvent:()=>sendAnalyticsEvent,setFacet:()=>c.uL,singleton:()=>A.r,toggleFacet:()=>c.wB,toggleFacets:()=>c.a2,useAnalyticsEvent:()=>o.W,useGlobalUIState:()=>useGlobalUIState,usePagination:()=>u.h,useSearch:()=>d.R});var a=r(14950);let sendAnalyticsEvent=e=>{try{window.postMessage((0,a.re)(e),window.origin)}catch(e){console.error(e)}};var o=r(28529),s=r(26142),i=r(72339),n=r(86878),c=r(9664),l=r(86763),d=r(69029),u=r(91341),S=r(16689),v=r.n(S);let E=(0,S.createContext)(void 0);E.displayName="UIContext";let p={displayMinicart:!1},reducer=e=>{let t={OPEN_MINICART:e=>({...e,displayMinicart:!0}),CLOSE_MINICART:e=>({...e,displayMinicart:!1}),...e};return(e,{type:r,data:a})=>{let o=t[r];if("function"==typeof o)return o(e,a);throw Error("Unknown UI state")}},defaultEffects=()=>({}),Provider_Provider=({children:e,actions:t={},effects:r=defaultEffects,initialState:a={}})=>{let[o,s]=(0,S.useReducer)(reducer(t),{...p,...a}),i=(0,S.useMemo)(()=>({...r(s),openMinicart:()=>s({type:"OPEN_MINICART"}),closeMinicart:()=>s({type:"CLOSE_MINICART"})}),[r]),n=(0,S.useMemo)(()=>({...o,...i}),[i,o]);return v().createElement(E.Provider,{value:n},e)};var I=r(12254);let useContext=e=>{let t=(0,S.useContext)(e);if(void 0===t)throw new I.q(`${e.displayName??"Context"} needs to be on the React tree`);return t},useGlobalUIState=()=>useContext(E);var C=r(88987),M=r(29380),y=r(73365),P=r(49578),f=r(25214),h=r(74375),A=r(78901),N=r(68956)}};