const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/VLTTJS3N-oecwr6eh.js","assets/rolldown-runtime-eb2nym32.js","assets/entry.client-dr7r6s9a.js","assets/EIDV623S-dtkajrto.js","assets/MIMHJGAX-z8d5n2fr.js"])))=>i.map(i=>d[i]);
try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`352856be-59eb-4cc0-9001-940a17faa515`,e._sentryDebugIdIdentifier=`sentry-dbid-352856be-59eb-4cc0-9001-940a17faa515`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Ig as n,Jh as r,jg as i,kg as a}from"./entry.client-dr7r6s9a.js";import{I as o,P as s,V as c,W as l,m as u,x as d}from"./EIDV623S-dtkajrto.js";var f=e(n(),1),p=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(e){let{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:a,position:o,initialIsOpen:s,errorTypes:c,styleNonce:l,shadowDOMTarget:u,onClose:f,hideDisabledQueries:p,theme:m}=e;this.#e=d(t),this.#n=n,this.#r=r,this.#t=i,this.#a=l,this.#o=u,this.#s=d(a),this.#c=d(o),this.#l=d(s),this.#u=d(c),this.#d=d(p),this.#f=d(f),this.#m=d(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(e){if(this.#i)throw Error(`Devtools is already mounted`);let t=c(()=>{let e=this,[t]=this.#s,[n]=this.#c,[i]=this.#l,[a]=this.#u,[c]=this.#d,[d]=this.#e,[f]=this.#f,[p]=this.#m,m;return this.#p?m=this.#p:(m=s(()=>r(()=>import(`./VLTTJS3N-oecwr6eh.js`),__vite__mapDeps([0,1,2,3,4]))),this.#p=m),l(this.#a,this.#o),u(m,o({get queryFlavor(){return e.#n},get version(){return e.#r},get onlineManager(){return e.#t},get shadowDOMTarget(){return e.#o}},{get client(){return d()},get buttonPosition(){return t()},get position(){return n()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return c()},get onClose(){return f()},get theme(){return p()}}))},e);this.#i=!0,this.#h=t}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}},m=t();function h(e){let t=a(e.client),n=f.useRef(null),{errorTypes:r,styleNonce:o,shadowDOMTarget:s,hideDisabledQueries:c,theme:l}=e,[u]=f.useState(new p({client:t,queryFlavor:`React Query`,version:`5`,onlineManager:i,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:r,styleNonce:o,shadowDOMTarget:s,onClose:e.onClose,hideDisabledQueries:c,theme:l}));return f.useEffect(()=>{u.setClient(t)},[t,u]),f.useEffect(()=>{u.setOnClose(e.onClose??(()=>{}))},[e.onClose,u]),f.useEffect(()=>{u.setErrorTypes(r||[])},[r,u]),f.useEffect(()=>{u.setTheme(l)},[l,u]),f.useEffect(()=>(n.current&&u.mount(n.current),()=>{u.unmount()}),[u]),(0,m.jsx)(`div`,{style:{height:`500px`,...e.style},className:`tsqd-parent-container`,ref:n})}var g=h;export{g as ReactQueryDevtoolsPanel};