import{b as h}from"./CircularProgress-1.0.74-QfwfRJ7i.js";import{r as f,d as E}from"./redux-1.0.74-D8bIc6ki.js";import{u as g}from"./Typography-1.0.74-B4mhsevh.js";import{g as Q}from"./getThemeProps-1.0.74-DOfDN6_V.js";import{u as S}from"./useEnhancedEffect-1.0.74-B56M26dS.js";function v(n,s,e,r,c){const[t,m]=f.useState(()=>c&&e?e(n).matches:r?r(n).matches:s);return S(()=>{if(!e)return;const o=e(n),u=()=>{m(o.matches)};return u(),o.addEventListener("change",u),()=>{o.removeEventListener("change",u)}},[n,e]),t}const w={...E},l=w.useSyncExternalStore;function y(n,s,e,r,c){const t=f.useCallback(()=>s,[s]),m=f.useMemo(()=>{if(c&&e)return()=>e(n).matches;if(r!==null){const{matches:a}=r(n);return()=>a}return t},[t,n,r,c,e]),[o,u]=f.useMemo(()=>{if(e===null)return[t,()=>()=>{}];const a=e(n);return[()=>a.matches,i=>(a.addEventListener("change",i),()=>{a.removeEventListener("change",i)})]},[t,e,n]);return l(u,o,m)}function p(n={}){const{themeId:s}=n;return function(r,c={}){let t=g();t&&s&&(t=t[s]||t);const m=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:u=m?window.matchMedia:null,ssrMatchMedia:d=null,noSsr:a=!1}=Q({name:"MuiUseMediaQuery",props:c,theme:t});let i=typeof r=="function"?r(t):r;return i=i.replace(/^@media( ?)/m,""),(l!==void 0?y:v)(i,o,u,d,a)}}p();const U=p({themeId:h});export{U as u};
