rails-profiler 0.44.34 → 0.45.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/app/assets/builds/profiler-toolbar.js +2 -2
- data/app/assets/builds/profiler.css +1 -1
- data/app/assets/builds/profiler.js +5 -5
- data/lib/profiler/console_profiler.rb +12 -1
- data/lib/profiler/instrumentation/pry_instrumentation.rb +19 -0
- data/lib/profiler/middleware/toolbar_injector.rb +4 -0
- data/lib/profiler/railtie.rb +11 -2
- data/lib/profiler/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af2f64f9bd55d0aa4a85949ef9b1acd256be278cff05a4659541f270f8a6f7fa
|
|
4
|
+
data.tar.gz: 36ca8a5422e3fef0333d10b7d57a9c15cf9a66ac11fbe2daadc3a18685d95f8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9cb61932d90337b7428435ad21ebceb9ac29cb8c634c2ef61bfe2fbde6ea9330201286f54d3d0ddffe034158f8113650c52a1d3ea2b5ccc367c147859cea0be0
|
|
7
|
+
data.tar.gz: 327222d2579665d70af75527d59459aac46fbd454f5c94476cbda59d516fa314790a7575405c8145ea12023c6635a74bc59cafcdccc8e3e7f02ae2b4b82d029c
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,22 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.45.1] - 2026-10-27
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Console:** `rails console` no longer crashes at start with `uninitialized constant Profiler::Railtie::IRB` when the application uses Pry (`pry-rails`), and expressions evaluated in Pry are now profiled like those evaluated in IRB. When both are loaded, each expression is recorded once.
|
|
29
|
+
|
|
30
|
+
## [0.45.0] - 2026-10-27
|
|
31
|
+
|
|
32
|
+
<!-- stamped -->
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- The project logo (three amber bars, no tile) now replaces the text glyph in the toolbar and the emoji in the dashboard header, and tops the README.
|
|
37
|
+
|
|
22
38
|
## [0.44.34] - 2026-10-26
|
|
23
39
|
|
|
24
40
|
<!-- stamped -->
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{var Er=t=>{throw TypeError(t)};var St=(t,e,r)=>e.has(t)||Er("Cannot "+r);var a=(t,e,r)=>(St(t,e,"read from private field"),r?r.call(t):e.get(t)),g=(t,e,r)=>e.has(t)?Er("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),m=(t,e,r,n)=>(St(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),E=(t,e,r)=>(St(t,e,"access private method"),r);var Ye=(t,e,r,n)=>({set _(i){m(t,e,i,r)},get _(){return a(t,e,n)}});var xt,P,Ar,vn,ue,wr,qr,Qr,Or,Nt,Ut,kt,Mr,gt={},_t=[],xn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,bt=Array.isArray;function ne(t,e){for(var r in e)t[r]=e[r];return t}function Vt(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function bn(t,e,r){var n,i,s,u={};for(s in e)s=="key"?n=e[s]:s=="ref"?i=e[s]:u[s]=e[s];if(arguments.length>2&&(u.children=arguments.length>3?xt.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)u[s]===void 0&&(u[s]=t.defaultProps[s]);return Tt(t,u,n,i,null)}function Tt(t,e,r,n,i){var s={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Ar,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(s),s}function b(t){return t.children}function Me(t,e){this.props=t,this.context=e}function Ke(t,e){if(e==null)return t.__?Ke(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ke(t):null}function Rn(t){if(t.__P&&t.__d){var e=t.__v,r=e.__e,n=[],i=[],s=ne({},e);s.__v=e.__v+1,P.vnode&&P.vnode(s),Gt(t.__P,s,e,t.__n,t.__P.namespaceURI,32&e.__u?[r]:null,n,r??Ke(e),!!(32&e.__u),i),s.__v=e.__v,s.__.__k[s.__i]=s,Sr(n,s,i),e.__e=e.__=null,s.__e!=r&&Kr(s)}}function Kr(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Kr(t)}function Lt(t){(!t.__d&&(t.__d=!0)&&ue.push(t)&&!vt.__r++||wr!=P.debounceRendering)&&((wr=P.debounceRendering)||qr)(vt)}function vt(){try{for(var t,e=1;ue.length;)ue.length>e&&ue.sort(Qr),t=ue.shift(),e=ue.length,Rn(t)}finally{ue.length=vt.__r=0}}function Dr(t,e,r,n,i,s,u,p,f,c,d){var l,T,y,h,x,_,v,R=n&&n.__k||_t,O=e.length;for(f=En(r,e,R,f,O),l=0;l<O;l++)(y=r.__k[l])!=null&&(T=y.__i!=-1&&R[y.__i]||gt,y.__i=l,_=Gt(t,y,T,i,s,u,p,f,c,d),h=y.__e,y.ref&&T.ref!=y.ref&&(T.ref&&jt(T.ref,null,y),d.push(y.ref,y.__c||h,y)),x==null&&h!=null&&(x=h),(v=!!(4&y.__u))||T.__k===y.__k?f=Fr(y,f,t,v):typeof y.type=="function"&&_!==void 0?f=_:h&&(f=h.nextSibling),y.__u&=-7);return r.__e=x,f}function En(t,e,r,n,i){var s,u,p,f,c,d=r.length,l=d,T=0;for(t.__k=new Array(i),s=0;s<i;s++)(u=e[s])!=null&&typeof u!="boolean"&&typeof u!="function"?(typeof u=="string"||typeof u=="number"||typeof u=="bigint"||u.constructor==String?u=t.__k[s]=Tt(null,u,null,null,null):bt(u)?u=t.__k[s]=Tt(b,{children:u},null,null,null):u.constructor===void 0&&u.__b>0?u=t.__k[s]=Tt(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,f=s+T,u.__=t,u.__b=t.__b+1,p=null,(c=u.__i=wn(u,r,f,l))!=-1&&(l--,(p=r[c])&&(p.__u|=2)),p==null||p.__v==null?(c==-1&&(i>d?T--:i<d&&T++),typeof u.type!="function"&&(u.__u|=4)):c!=f&&(c==f-1?T--:c==f+1?T++:(c>f?T--:T++,u.__u|=4))):t.__k[s]=null;if(l)for(s=0;s<d;s++)(p=r[s])!=null&&(2&p.__u)==0&&(p.__e==n&&(n=Ke(p)),kr(p,p));return n}function Fr(t,e,r,n){var i,s;if(typeof t.type=="function"){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,e=Fr(i[s],e,r,n));return e}t.__e!=e&&(n&&(e&&t.type&&!e.parentNode&&(e=Ke(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function wn(t,e,r,n){var i,s,u,p=t.key,f=t.type,c=e[r],d=c!=null&&(2&c.__u)==0;if(c===null&&p==null||d&&p==c.key&&f==c.type)return r;if(n>(d?1:0)){for(i=r-1,s=r+1;i>=0||s<e.length;)if((c=e[u=i>=0?i--:s++])!=null&&(2&c.__u)==0&&p==c.key&&f==c.type)return u}return-1}function Cr(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||xn.test(e)?r:r+"px"}function ht(t,e,r,n,i){var s,u;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||Cr(t.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||Cr(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Or,"$1")),u=e.toLowerCase(),e=u in t||e=="onFocusOut"||e=="onFocusIn"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r.u=n.u:(r.u=Nt,t.addEventListener(e,s?kt:Ut,s)):t.removeEventListener(e,s?kt:Ut,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Pr(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=Nt++;else if(e.t<r.u)return;return r(P.event?P.event(e):e)}}}function Gt(t,e,r,n,i,s,u,p,f,c){var d,l,T,y,h,x,_,v,R,O,F,L,W,G,H,Q=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),s=[p=e.__e=r.__e]),(d=P.__b)&&d(e);e:if(typeof Q=="function")try{if(v=e.props,R=Q.prototype&&Q.prototype.render,O=(d=Q.contextType)&&n[d.__c],F=d?O?O.props.value:d.__:n,r.__c?_=(l=e.__c=r.__c).__=l.__E:(R?e.__c=l=new Q(v,F):(e.__c=l=new Me(v,F),l.constructor=Q,l.render=Pn),O&&O.sub(l),l.state||(l.state={}),l.__n=n,T=l.__d=!0,l.__h=[],l._sb=[]),R&&l.__s==null&&(l.__s=l.state),R&&Q.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ne({},l.__s)),ne(l.__s,Q.getDerivedStateFromProps(v,l.__s))),y=l.props,h=l.state,l.__v=e,T)R&&Q.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),R&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(R&&Q.getDerivedStateFromProps==null&&v!==y&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(v,F),e.__v==r.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(v,l.__s,F)===!1){e.__v!=r.__v&&(l.props=v,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(B){B&&(B.__=e)}),_t.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&u.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(v,l.__s,F),R&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(y,h,x)})}if(l.context=F,l.props=v,l.__P=t,l.__e=!1,L=P.__r,W=0,R)l.state=l.__s,l.__d=!1,L&&L(e),d=l.render(l.props,l.state,l.context),_t.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,L&&L(e),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++W<25);l.state=l.__s,l.getChildContext!=null&&(n=ne(ne({},n),l.getChildContext())),R&&!T&&l.getSnapshotBeforeUpdate!=null&&(x=l.getSnapshotBeforeUpdate(y,h)),G=d!=null&&d.type===b&&d.key==null?Ur(d.props.children):d,p=Dr(t,bt(G)?G:[G],e,r,n,i,s,u,p,f,c),l.base=e.__e,e.__u&=-161,l.__h.length&&u.push(l),_&&(l.__E=l.__=null)}catch(B){if(e.__v=null,f||s!=null)if(B.then){for(e.__u|=f?160:128;p&&p.nodeType==8&&p.nextSibling;)p=p.nextSibling;s[s.indexOf(p)]=null,e.__e=p}else{for(H=s.length;H--;)Vt(s[H]);It(e)}else e.__e=r.__e,e.__k=r.__k,B.then||It(e);P.__e(B,e,r)}else s==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):p=e.__e=Cn(r.__e,e,r,n,i,s,u,f,c);return(d=P.diffed)&&d(e),128&e.__u?void 0:p}function It(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(It))}function Sr(t,e,r){for(var n=0;n<r.length;n++)jt(r[n],r[++n],r[++n]);P.__c&&P.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){P.__e(s,i.__v)}})}function Ur(t){return typeof t!="object"||t==null||t.__b>0?t:bt(t)?t.map(Ur):ne({},t)}function Cn(t,e,r,n,i,s,u,p,f){var c,d,l,T,y,h,x,_=r.props||gt,v=e.props,R=e.type;if(R=="svg"?i="http://www.w3.org/2000/svg":R=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((y=s[c])&&"setAttribute"in y==!!R&&(R?y.localName==R:y.nodeType==3)){t=y,s[c]=null;break}}if(t==null){if(R==null)return document.createTextNode(v);t=document.createElementNS(i,R,v.is&&v),p&&(P.__m&&P.__m(e,s),p=!1),s=null}if(R==null)_===v||p&&t.data==v||(t.data=v);else{if(s=s&&xt.call(t.childNodes),!p&&s!=null)for(_={},c=0;c<t.attributes.length;c++)_[(y=t.attributes[c]).name]=y.value;for(c in _)y=_[c],c=="dangerouslySetInnerHTML"?l=y:c=="children"||c in v||c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v||ht(t,c,null,y,i);for(c in v)y=v[c],c=="children"?T=y:c=="dangerouslySetInnerHTML"?d=y:c=="value"?h=y:c=="checked"?x=y:p&&typeof y!="function"||_[c]===y||ht(t,c,y,_[c],i);if(d)p||l&&(d.__html==l.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(l&&(t.innerHTML=""),Dr(e.type=="template"?t.content:t,bt(T)?T:[T],e,r,n,R=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,u,s?s[0]:r.__k&&Ke(r,0),p,f),s!=null)for(c=s.length;c--;)Vt(s[c]);p||(c="value",R=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[c]||R=="progress"&&!h||R=="option"&&h!=_[c])&&ht(t,c,h,_[c],i),c="checked",x!=null&&x!=t[c]&&ht(t,c,x,_[c],i))}return t}function jt(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){P.__e(i,r)}}function kr(t,e,r){var n,i;if(P.unmount&&P.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||jt(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){P.__e(s,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&kr(n[i],e,r||typeof t.type!="function");r||Vt(t.__e),t.__c=t.__=t.__e=void 0}function Pn(t,e,r){return this.constructor(t,r)}function Ht(t,e,r){var n,i,s,u;e==document&&(e=document.documentElement),P.__&&P.__(t,e),i=(n=typeof r=="function")?null:r&&r.__k||e.__k,s=[],u=[],Gt(e,t=(!n&&r||e).__k=bn(b,null,[t]),i||gt,gt,e.namespaceURI,!n&&r?[r]:i?null:e.firstChild?xt.call(e.childNodes):null,s,!n&&r?r:i?i.__e:e.firstChild,n,u),Sr(s,t,u)}function De(t){function e(r){var n,i;return this.getChildContext||(n=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&n.forEach(function(u){u.__e=!0,Lt(u)})},this.sub=function(s){n.add(s);var u=s.componentWillUnmount;s.componentWillUnmount=function(){n&&n.delete(s),u&&u.call(s)}}),r.children}return e.__c="__cC"+Mr++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,n){return r.children(n)}).contextType=e,e}xt=_t.slice,P={__e:function(t,e,r,n){for(var i,s,u;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),u=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),u=i.__d),u)return i.__E=i}catch(p){t=p}throw t}},Ar=0,vn=function(t){return t!=null&&t.constructor===void 0},Me.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},r),this.props)),t&&ne(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Lt(this))},Me.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Lt(this))},Me.prototype.render=b,ue=[],qr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qr=function(t,e){return t.__v.__b-e.__v.__b},vt.__r=0,Or=/(PointerCapture)$|Capture$/i,Nt=0,Ut=Pr(!1),kt=Pr(!0),Mr=0;var Y=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var ge,le,Fe,Lr,An=(Lr=class extends Y{constructor(){super();g(this,ge);g(this,le);g(this,Fe);m(this,Fe,e=>{if(typeof window<"u"&&window.addEventListener){let r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){a(this,le)||this.setEventListener(a(this,Fe))}onUnsubscribe(){var e;this.hasListeners()||((e=a(this,le))==null||e.call(this),m(this,le,void 0))}setEventListener(e){var r;m(this,Fe,e),(r=a(this,le))==null||r.call(this),m(this,le,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){a(this,ge)!==e&&(m(this,ge,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof a(this,ge)=="boolean"?a(this,ge):globalThis.document?.visibilityState!=="hidden"}},ge=new WeakMap,le=new WeakMap,Fe=new WeakMap,Lr),Se=new An;var qn={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},pe,Bt,Ir,Qn=(Ir=class{constructor(){g(this,pe,qn);g(this,Bt,!1)}setTimeoutProvider(t){m(this,pe,t)}setTimeout(t,e){return a(this,pe).setTimeout(t,e)}clearTimeout(t){a(this,pe).clearTimeout(t)}setInterval(t,e){return a(this,pe).setInterval(t,e)}clearInterval(t){a(this,pe).clearInterval(t)}},pe=new WeakMap,Bt=new WeakMap,Ir),Z=new Qn;function Nr(t){setTimeout(t,0)}var $t=typeof window>"u"||"Deno"in globalThis;function D(){}function jr(t,e){return typeof t=="function"?t(e):t}function Ze(t){return typeof t=="number"&&t>=0&&t!==1/0}function Rt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function z(t,e){return typeof t=="function"?t(e):t}function I(t,e){return typeof t=="function"?t(e):t}function Et(t,e){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:u,stale:p}=t;if(u){if(n){if(e.queryHash!==et(u,e.options))return!1}else if(!ve(e.queryKey,u))return!1}if(r!=="all"){let f=e.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof p=="boolean"&&e.isStale()!==p||i&&i!==e.state.fetchStatus||s&&!s(e))}function wt(t,e){let{exact:r,status:n,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(r){if(_e(e.options.mutationKey)!==_e(s))return!1}else if(!ve(e.options.mutationKey,s))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function et(t,e){return(e?.queryKeyHashFn||_e)(t)}function _e(t){return JSON.stringify(t,(e,r)=>Jt(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ve(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>ve(t[r],e[r])):!1}var On=Object.prototype.hasOwnProperty;function Wt(t,e,r=0){if(t===e)return t;if(r>500)return e;let n=Vr(t)&&Vr(e);if(!n&&!(Jt(t)&&Jt(e)))return e;let s=(n?t:Object.keys(t)).length,u=n?e:Object.keys(e),p=u.length,f=n?new Array(p):{},c=0;for(let d=0;d<p;d++){let l=n?d:u[d],T=t[l],y=e[l];if(T===y){f[l]=T,(n?d<s:On.call(t,l))&&c++;continue}if(T===null||y===null||typeof T!="object"||typeof y!="object"){f[l]=y;continue}let h=Wt(T,y,r+1);f[l]=h,h===T&&c++}return s===p&&c===s?t:f}function Ct(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function Vr(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Jt(t){if(!Gr(t))return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(!Gr(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Gr(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hr(t){return new Promise(e=>{Z.setTimeout(e,t)})}function tt(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Wt(t,e):e}function Br(t,e,r=0){let n=[...t,e];return r&&n.length>r?n.slice(1):n}function Jr(t,e,r=0){let n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var Ue=Symbol();function Pt(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Ue?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function zt(t,e){return typeof t=="function"?t(...e):!!t}function $r(t,e,r){let n=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),t}var ee=(()=>{let t=()=>$t;return{isServer(){return t()},setIsServer(e){t=e}}})();function rt(){let t,e,r=new Promise((i,s)=>{t=i,e=s});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),t(i)},r.reject=i=>{n({status:"rejected",reason:i}),e(i)},r}var Wr=Nr;function Mn(){let t=[],e=0,r=p=>{p()},n=p=>{p()},i=Wr,s=p=>{e?t.push(p):i(()=>{r(p)})},u=()=>{let p=t;t=[],p.length&&i(()=>{n(()=>{p.forEach(f=>{r(f)})})})};return{batch:p=>{let f;e++;try{f=p()}finally{e--,e||u()}return f},batchCalls:p=>(...f)=>{s(()=>{p(...f)})},schedule:s,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{n=p},setScheduler:p=>{i=p}}}var A=Mn();var ke,ce,Le,zr,Kn=(zr=class extends Y{constructor(){super();g(this,ke,!0);g(this,ce);g(this,Le);m(this,Le,e=>{if(typeof window<"u"&&window.addEventListener){let r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){a(this,ce)||this.setEventListener(a(this,Le))}onUnsubscribe(){var e;this.hasListeners()||((e=a(this,ce))==null||e.call(this),m(this,ce,void 0))}setEventListener(e){var r;m(this,Le,e),(r=a(this,ce))==null||r.call(this),m(this,ce,e(this.setOnline.bind(this)))}setOnline(e){a(this,ke)!==e&&(m(this,ke,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return a(this,ke)}},ke=new WeakMap,ce=new WeakMap,Le=new WeakMap,zr),Ie=new Kn;function Dn(t){return Math.min(1e3*2**t,3e4)}function Xt(t){return(t??"online")==="online"?Ie.isOnline():!0}var At=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function qt(t){let e=!1,r=0,n,i=rt(),s=()=>i.status!=="pending",u=x=>{if(!s()){let _=new At(x);T(_),t.onCancel?.(_)}},p=()=>{e=!0},f=()=>{e=!1},c=()=>Se.isFocused()&&(t.networkMode==="always"||Ie.isOnline())&&t.canRun(),d=()=>Xt(t.networkMode)&&t.canRun(),l=x=>{s()||(n?.(),i.resolve(x))},T=x=>{s()||(n?.(),i.reject(x))},y=()=>new Promise(x=>{n=_=>{(s()||c())&&x(_)},t.onPause?.()}).then(()=>{n=void 0,s()||t.onContinue?.()}),h=()=>{if(s())return;let x,_=r===0?t.initialPromise:void 0;try{x=_??t.fn()}catch(v){x=Promise.reject(v)}Promise.resolve(x).then(l).catch(v=>{if(s())return;let R=t.retry??(ee.isServer()?0:3),O=t.retryDelay??Dn,F=typeof O=="function"?O(r,v):O,L=R===!0||typeof R=="number"&&r<R||typeof R=="function"&&R(r,v);if(e||!L){T(v);return}r++,t.onFail?.(r,v),Hr(F).then(()=>c()?void 0:y()).then(()=>{e?T(v):h()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(n?.(),i),cancelRetry:p,continueRetry:f,canStart:d,start:()=>(d()?h():y().then(h),i)}}var xe,Xr,Qt=(Xr=class{constructor(){g(this,xe)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ze(this.gcTime)&&m(this,xe,Z.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ee.isServer()?1/0:300*1e3))}clearGcTimeout(){a(this,xe)!==void 0&&(Z.clearTimeout(a(this,xe)),m(this,xe,void 0))}},xe=new WeakMap,Xr);function Zr(t){return{onFetch:(e,r)=>{let n=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],u=e.state.data?.pageParams||[],p={pages:[],pageParams:[]},f=0,c=async()=>{let d=!1,l=h=>{$r(h,()=>e.signal,()=>d=!0)},T=Pt(e.options,e.fetchOptions),y=async(h,x,_)=>{if(d)return Promise.reject(e.signal.reason);if(x==null&&h.pages.length)return Promise.resolve(h);let R=(()=>{let W={client:e.client,queryKey:e.queryKey,pageParam:x,direction:_?"backward":"forward",meta:e.options.meta};return l(W),W})(),O=await T(R),{maxPages:F}=e.options,L=_?Jr:Br;return{pages:L(h.pages,O,F),pageParams:L(h.pageParams,x,F)}};if(i&&s.length){let h=i==="backward",x=h?Fn:Yr,_={pages:s,pageParams:u},v=x(n,_);p=await y(_,v,h)}else{let h=t??s.length;do{let x=f===0?u[0]??n.initialPageParam:Yr(n,p);if(f>0&&x==null)break;p=await y(p,x),f++}while(f<h)}return p};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=c}}}function Yr(t,{pages:e,pageParams:r}){let n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function Fn(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var Ne,be,Ve,J,Re,S,ot,Ee,j,no,se,ro,oo=(ro=class extends Qt{constructor(e){super();g(this,j);g(this,Ne);g(this,be);g(this,Ve);g(this,J);g(this,Re);g(this,S);g(this,ot);g(this,Ee);m(this,Ee,!1),m(this,ot,e.defaultOptions),this.setOptions(e.options),this.observers=[],m(this,Re,e.client),m(this,J,a(this,Re).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,m(this,be,to(this.options)),this.state=e.state??a(this,be),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return a(this,Ne)}get promise(){return a(this,S)?.promise}setOptions(e){if(this.options={...a(this,ot),...e},e?._type&&m(this,Ne,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=to(this.options);r.data!==void 0&&(this.setState(eo(r.data,r.dataUpdatedAt)),m(this,be,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&a(this,J).remove(this)}setData(e,r){let n=tt(this.state.data,e,this.options);return E(this,j,se).call(this,{data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(e){E(this,j,se).call(this,{type:"setState",state:e})}cancel(e){let r=a(this,S)?.promise;return a(this,S)?.cancel(e),r?r.then(D).catch(D):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return a(this,be)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>I(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ue||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>z(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Rt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),a(this,S)?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),a(this,S)?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),a(this,J).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(a(this,S)&&(a(this,Ee)||E(this,j,no).call(this)?a(this,S).cancel({revert:!0}):a(this,S).cancelRetry()),this.scheduleGc()),a(this,J).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||E(this,j,se).call(this,{type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&a(this,S)?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(a(this,S))return a(this,S).continueRetry(),a(this,S).promise}if(e&&this.setOptions(e),!this.options.queryFn){let c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(m(this,Ee,!0),n.signal)})},s=()=>{let c=Pt(this.options,r),l=(()=>{let T={client:a(this,Re),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return m(this,Ee,!1),this.options.persister?this.options.persister(c,l,this):c(l)},p=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:a(this,Re),state:this.state,fetchFn:s};return i(c),c})();(a(this,Ne)==="infinite"?Zr(this.options.pages):this.options.behavior)?.onFetch(p,this),m(this,Ve,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==p.fetchOptions?.meta)&&E(this,j,se).call(this,{type:"fetch",meta:p.fetchOptions?.meta}),m(this,S,qt({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:c=>{c instanceof At&&c.revert&&this.setState({...a(this,Ve),fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{E(this,j,se).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{E(this,j,se).call(this,{type:"pause"})},onContinue:()=>{E(this,j,se).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{let c=await a(this,S).start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),a(this,J).config.onSuccess?.(c,this),a(this,J).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof At){if(c.silent)return a(this,S).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw E(this,j,se).call(this,{type:"error",error:c}),a(this,J).config.onError?.(c,this),a(this,J).config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}},Ne=new WeakMap,be=new WeakMap,Ve=new WeakMap,J=new WeakMap,Re=new WeakMap,S=new WeakMap,ot=new WeakMap,Ee=new WeakMap,j=new WeakSet,no=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},se=function(e){let r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Yt(n.data,this.options),fetchMeta:e.meta??null};case"success":let i={...n,...eo(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return m(this,Ve,e.manual?i:void 0),i;case"error":let s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),A.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),a(this,J).notify({query:this,type:"updated",action:e})})},ro);function Yt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function eo(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function to(t){let e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var V,w,st,N,we,Ge,ie,fe,it,je,He,Ce,Pe,ye,Be,C,nt,Zt,er,tr,rr,or,nr,sr,uo,ao,ar=(ao=class extends Y{constructor(e,r){super();g(this,C);g(this,V);g(this,w);g(this,st);g(this,N);g(this,we);g(this,Ge);g(this,ie);g(this,fe);g(this,it);g(this,je);g(this,He);g(this,Ce);g(this,Pe);g(this,ye);g(this,Be,new Set);this.options=r,m(this,V,e),m(this,fe,null),m(this,ie,rt()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(a(this,w).addObserver(this),so(a(this,w),this.options)?E(this,C,nt).call(this):this.updateResult(),E(this,C,rr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ir(a(this,w),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ir(a(this,w),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,E(this,C,or).call(this),E(this,C,nr).call(this),a(this,w).removeObserver(this)}setOptions(e){let r=this.options,n=a(this,w);if(this.options=a(this,V).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof I(this.options.enabled,a(this,w))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");E(this,C,sr).call(this),a(this,w).setOptions(this.options),r._defaulted&&!Ct(this.options,r)&&a(this,V).getQueryCache().notify({type:"observerOptionsUpdated",query:a(this,w),observer:this});let i=this.hasListeners();i&&io(a(this,w),n,this.options,r)&&E(this,C,nt).call(this),this.updateResult(),i&&(a(this,w)!==n||I(this.options.enabled,a(this,w))!==I(r.enabled,a(this,w))||z(this.options.staleTime,a(this,w))!==z(r.staleTime,a(this,w)))&&E(this,C,Zt).call(this);let s=E(this,C,er).call(this);i&&(a(this,w)!==n||I(this.options.enabled,a(this,w))!==I(r.enabled,a(this,w))||s!==a(this,ye))&&E(this,C,tr).call(this,s)}getOptimisticResult(e){let r=a(this,V).getQueryCache().build(a(this,V),e),n=this.createResult(r,e);return Un(this,n)&&(m(this,N,n),m(this,Ge,this.options),m(this,we,a(this,w).state)),n}getCurrentResult(){return a(this,N)}trackResult(e,r){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&a(this,ie).status==="pending"&&a(this,ie).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){a(this,Be).add(e)}getCurrentQuery(){return a(this,w)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let r=a(this,V).defaultQueryOptions(e),n=a(this,V).getQueryCache().build(a(this,V),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return E(this,C,nt).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),a(this,N)))}createResult(e,r){let n=a(this,w),i=this.options,s=a(this,N),u=a(this,we),p=a(this,Ge),c=e!==n?e.state:a(this,st),{state:d}=e,l={...d},T=!1,y;if(r._optimisticResults){let Q=this.hasListeners(),B=!Q&&so(e,r),yt=Q&&io(e,n,r,i);(B||yt)&&(l={...l,...Yt(d.data,e.options)}),r._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:h,errorUpdatedAt:x,status:_}=l;y=l.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&_==="pending"){let Q;s?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(Q=s.data,v=!0):Q=typeof r.placeholderData=="function"?r.placeholderData(a(this,He)?.state.data,a(this,He)):r.placeholderData,Q!==void 0&&(_="success",y=tt(s?.data,Q,r),T=!0)}if(r.select&&y!==void 0&&!v)if(s&&y===u?.data&&r.select===a(this,it))y=a(this,je);else try{m(this,it,r.select),y=r.select(y),y=tt(s?.data,y,r),m(this,je,y),m(this,fe,null)}catch(Q){m(this,fe,Q)}a(this,fe)&&(h=a(this,fe),y=a(this,je),x=Date.now(),_="error");let R=l.fetchStatus==="fetching",O=_==="pending",F=_==="error",L=O&&R,W=y!==void 0,H={status:_,fetchStatus:l.fetchStatus,isPending:O,isSuccess:_==="success",isError:F,isInitialLoading:L,isLoading:L,data:y,dataUpdatedAt:l.dataUpdatedAt,error:h,errorUpdatedAt:x,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:R,isRefetching:R&&!O,isLoadingError:F&&!W,isPaused:l.fetchStatus==="paused",isPlaceholderData:T,isRefetchError:F&&W,isStale:ur(e,r),refetch:this.refetch,promise:a(this,ie),isEnabled:I(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let Q=H.data!==void 0,B=H.status==="error"&&!Q,yt=mt=>{B?mt.reject(H.error):Q&&mt.resolve(H.data)},Rr=()=>{let mt=m(this,ie,H.promise=rt());yt(mt)},dt=a(this,ie);switch(dt.status){case"pending":e.queryHash===n.queryHash&&yt(dt);break;case"fulfilled":(B||H.data!==dt.value)&&Rr();break;case"rejected":(!B||H.error!==dt.reason)&&Rr();break}}return H}updateResult(){let e=a(this,N),r=this.createResult(a(this,w),this.options);if(m(this,we,a(this,w).state),m(this,Ge,this.options),a(this,we).data!==void 0&&m(this,He,a(this,w)),Ct(r,e))return;m(this,N,r);let n=()=>{if(!e)return!0;let{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!a(this,Be).size)return!0;let u=new Set(s??a(this,Be));return this.options.throwOnError&&u.add("error"),Object.keys(a(this,N)).some(p=>{let f=p;return a(this,N)[f]!==e[f]&&u.has(f)})};E(this,C,uo).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&E(this,C,rr).call(this)}},V=new WeakMap,w=new WeakMap,st=new WeakMap,N=new WeakMap,we=new WeakMap,Ge=new WeakMap,ie=new WeakMap,fe=new WeakMap,it=new WeakMap,je=new WeakMap,He=new WeakMap,Ce=new WeakMap,Pe=new WeakMap,ye=new WeakMap,Be=new WeakMap,C=new WeakSet,nt=function(e){E(this,C,sr).call(this);let r=a(this,w).fetch(this.options,e);return e?.throwOnError||(r=r.catch(D)),r},Zt=function(){E(this,C,or).call(this);let e=z(this.options.staleTime,a(this,w));if(ee.isServer()||a(this,N).isStale||!Ze(e))return;let n=Rt(a(this,N).dataUpdatedAt,e)+1;m(this,Ce,Z.setTimeout(()=>{a(this,N).isStale||this.updateResult()},n))},er=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(a(this,w)):this.options.refetchInterval)??!1},tr=function(e){E(this,C,nr).call(this),m(this,ye,e),!(ee.isServer()||I(this.options.enabled,a(this,w))===!1||!Ze(a(this,ye))||a(this,ye)===0)&&m(this,Pe,Z.setInterval(()=>{(this.options.refetchIntervalInBackground||Se.isFocused())&&E(this,C,nt).call(this)},a(this,ye)))},rr=function(){E(this,C,Zt).call(this),E(this,C,tr).call(this,E(this,C,er).call(this))},or=function(){a(this,Ce)!==void 0&&(Z.clearTimeout(a(this,Ce)),m(this,Ce,void 0))},nr=function(){a(this,Pe)!==void 0&&(Z.clearInterval(a(this,Pe)),m(this,Pe,void 0))},sr=function(){let e=a(this,V).getQueryCache().build(a(this,V),this.options);if(e===a(this,w))return;let r=a(this,w);m(this,w,e),m(this,st,e.state),this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))},uo=function(e){A.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(a(this,N))}),a(this,V).getQueryCache().notify({query:a(this,w),type:"observerResultsUpdated"})})},ao);function Sn(t,e){return I(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&I(e.retryOnMount,t)===!1)}function so(t,e){return Sn(t,e)||t.state.data!==void 0&&ir(t,e,e.refetchOnMount)}function ir(t,e,r){if(I(e.enabled,t)!==!1&&z(e.staleTime,t)!=="static"){let n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&ur(t,e)}return!1}function io(t,e,r,n){return(t!==e||I(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&ur(t,r)}function ur(t,e){return I(e.enabled,t)!==!1&&t.isStaleByTime(z(e.staleTime,t))}function Un(t,e){return!Ct(t.getCurrentResult(),e)}var at,te,k,Ae,re,de,lo,po=(lo=class extends Qt{constructor(e){super();g(this,re);g(this,at);g(this,te);g(this,k);g(this,Ae);m(this,at,e.client),this.mutationId=e.mutationId,m(this,k,e.mutationCache),m(this,te,[]),this.state=e.state||kn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){a(this,te).includes(e)||(a(this,te).push(e),this.clearGcTimeout(),a(this,k).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){m(this,te,a(this,te).filter(r=>r!==e)),this.scheduleGc(),a(this,k).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){a(this,te).length||(this.state.status==="pending"?this.scheduleGc():a(this,k).remove(this))}continue(){return a(this,Ae)?.continue()??this.execute(this.state.variables)}async execute(e){let r=()=>{E(this,re,de).call(this,{type:"continue"})},n={client:a(this,at),meta:this.options.meta,mutationKey:this.options.mutationKey};m(this,Ae,qt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(u,p)=>{E(this,re,de).call(this,{type:"failed",failureCount:u,error:p})},onPause:()=>{E(this,re,de).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>a(this,k).canRun(this)}));let i=this.state.status==="pending",s=!a(this,Ae).canStart();try{if(i)r();else{E(this,re,de).call(this,{type:"pending",variables:e,isPaused:s}),a(this,k).config.onMutate&&await a(this,k).config.onMutate(e,this,n);let p=await this.options.onMutate?.(e,n);p!==this.state.context&&E(this,re,de).call(this,{type:"pending",context:p,variables:e,isPaused:s})}let u=await a(this,Ae).start();return await a(this,k).config.onSuccess?.(u,e,this.state.context,this,n),await this.options.onSuccess?.(u,e,this.state.context,n),await a(this,k).config.onSettled?.(u,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(u,null,e,this.state.context,n),E(this,re,de).call(this,{type:"success",data:u}),u}catch(u){try{await a(this,k).config.onError?.(u,e,this.state.context,this,n)}catch(p){Promise.reject(p)}try{await this.options.onError?.(u,e,this.state.context,n)}catch(p){Promise.reject(p)}try{await a(this,k).config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,n)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,n)}catch(p){Promise.reject(p)}throw E(this,re,de).call(this,{type:"error",error:u}),u}finally{a(this,k).runNext(this)}}},at=new WeakMap,te=new WeakMap,k=new WeakMap,Ae=new WeakMap,re=new WeakSet,de=function(e){let r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),A.batch(()=>{a(this,te).forEach(n=>{n.onMutationUpdate(e)}),a(this,k).notify({mutation:this,type:"updated",action:e})})},lo);function kn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ae,X,ut,co,fo=(co=class extends Y{constructor(e={}){super();g(this,ae);g(this,X);g(this,ut);this.config=e,m(this,ae,new Set),m(this,X,new Map),m(this,ut,0)}build(e,r,n){let i=new po({client:e,mutationCache:this,mutationId:++Ye(this,ut)._,options:e.defaultMutationOptions(r),state:n});return this.add(i),i}add(e){a(this,ae).add(e);let r=Ot(e);if(typeof r=="string"){let n=a(this,X).get(r);n?n.push(e):a(this,X).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(a(this,ae).delete(e)){let r=Ot(e);if(typeof r=="string"){let n=a(this,X).get(r);if(n)if(n.length>1){let i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&a(this,X).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){let r=Ot(e);if(typeof r=="string"){let i=a(this,X).get(r)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){let r=Ot(e);return typeof r=="string"?a(this,X).get(r)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){A.batch(()=>{a(this,ae).forEach(e=>{this.notify({type:"removed",mutation:e})}),a(this,ae).clear(),a(this,X).clear()})}getAll(){return Array.from(a(this,ae))}find(e){let r={exact:!0,...e};return this.getAll().find(n=>wt(r,n))}findAll(e={}){return this.getAll().filter(r=>wt(e,r))}notify(e){A.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){let e=this.getAll().filter(r=>r.state.isPaused);return A.batch(()=>Promise.all(e.map(r=>r.continue().catch(D))))}},ae=new WeakMap,X=new WeakMap,ut=new WeakMap,co);function Ot(t){return t.options.scope?.id}var oe,yo,mo=(yo=class extends Y{constructor(e={}){super();g(this,oe);this.config=e,m(this,oe,new Map)}build(e,r,n){let i=r.queryKey,s=r.queryHash??et(i,r),u=this.get(s);return u||(u=new oo({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){a(this,oe).has(e.queryHash)||(a(this,oe).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let r=a(this,oe).get(e.queryHash);r&&(e.destroy(),r===e&&a(this,oe).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){A.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return a(this,oe).get(e)}getAll(){return[...a(this,oe).values()]}find(e){let r={exact:!0,...e};return this.getAll().find(n=>Et(r,n))}findAll(e={}){let r=this.getAll();return Object.keys(e).length>0?r.filter(n=>Et(e,n)):r}notify(e){A.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){A.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oe=new WeakMap,yo);var M,me,he,Je,$e,Te,We,ze,ho,lr=(ho=class{constructor(t={}){g(this,M);g(this,me);g(this,he);g(this,Je);g(this,$e);g(this,Te);g(this,We);g(this,ze);m(this,M,t.queryCache||new mo),m(this,me,t.mutationCache||new fo),m(this,he,t.defaultOptions||{}),m(this,Je,new Map),m(this,$e,new Map),m(this,Te,0)}mount(){Ye(this,Te)._++,a(this,Te)===1&&(m(this,We,Se.subscribe(async t=>{t&&(await this.resumePausedMutations(),a(this,M).onFocus())})),m(this,ze,Ie.subscribe(async t=>{t&&(await this.resumePausedMutations(),a(this,M).onOnline())})))}unmount(){var t,e;Ye(this,Te)._--,a(this,Te)===0&&((t=a(this,We))==null||t.call(this),m(this,We,void 0),(e=a(this,ze))==null||e.call(this),m(this,ze,void 0))}isFetching(t){return a(this,M).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return a(this,me).findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return a(this,M).get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),r=a(this,M).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(z(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return a(this,M).findAll(t).map(({queryKey:e,state:r})=>{let n=r.data;return[e,n]})}setQueryData(t,e,r){let n=this.defaultQueryOptions({queryKey:t}),s=a(this,M).get(n.queryHash)?.state.data,u=jr(e,s);if(u!==void 0)return a(this,M).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(t,e,r){return A.batch(()=>a(this,M).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return a(this,M).get(e.queryHash)?.state}removeQueries(t){let e=a(this,M);A.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){let r=a(this,M);return A.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let r={revert:!0,...e},n=A.batch(()=>a(this,M).findAll(t).map(i=>i.cancel(r)));return Promise.all(n).then(D).catch(D)}invalidateQueries(t,e={}){return A.batch(()=>(a(this,M).findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){let r={...e,cancelRefetch:e.cancelRefetch??!0},n=A.batch(()=>a(this,M).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(D)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(D)}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let r=a(this,M).build(this,e);return r.isStaleByTime(z(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(D).catch(D)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(D).catch(D)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Ie.isOnline()?a(this,me).resumePausedMutations():Promise.resolve()}getQueryCache(){return a(this,M)}getMutationCache(){return a(this,me)}getDefaultOptions(){return a(this,he)}setDefaultOptions(t){m(this,he,t)}setQueryDefaults(t,e){a(this,Je).set(_e(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...a(this,Je).values()],r={};return e.forEach(n=>{ve(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){a(this,$e).set(_e(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...a(this,$e).values()],r={};return e.forEach(n=>{ve(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;let e={...a(this,he).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=et(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ue&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...a(this,he).mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){a(this,M).clear(),a(this,me).clear()}},M=new WeakMap,me=new WeakMap,he=new WeakMap,Je=new WeakMap,$e=new WeakMap,Te=new WeakMap,We=new WeakMap,ze=new WeakMap,ho);var qe,q,pr,To,lt=0,wo=[],K=P,go=K.__b,_o=K.__r,vo=K.diffed,xo=K.__c,bo=K.unmount,Ro=K.__;function pt(t,e){K.__h&&K.__h(q,t,lt||e),lt=0;var r=q.__H||(q.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function Qe(t){return lt=1,Ln(Ao,t)}function Ln(t,e,r){var n=pt(qe++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):Ao(void 0,e),function(p){var f=n.__N?n.__N[0]:n.__[0],c=n.t(f,p);f!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=q,!q.__f)){var i=function(p,f,c){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(T){return T.__c});if(d.every(function(T){return!T.__N}))return!s||s.call(this,p,f,c);var l=n.__c.props!==p;return d.some(function(T){if(T.__N){var y=T.__[0];T.__=T.__N,T.__N=void 0,y!==T.__[0]&&(l=!0)}}),s&&s.call(this,p,f,c)||l};q.__f=!0;var s=q.shouldComponentUpdate,u=q.componentWillUpdate;q.componentWillUpdate=function(p,f,c){if(this.__e){var d=s;s=void 0,i(p,f,c),s=d}u&&u.call(this,p,f,c)},q.shouldComponentUpdate=i}return n.__N||n.__}function $(t,e){var r=pt(qe++,3);!K.__s&&fr(r.__H,e)&&(r.__=t,r.u=e,q.__H.__h.push(r))}function Kt(t,e){var r=pt(qe++,4);!K.__s&&fr(r.__H,e)&&(r.__=t,r.u=e,q.__h.push(r))}function Oe(t){return lt=5,Co(function(){return{current:t}},[])}function Co(t,e){var r=pt(qe++,7);return fr(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Po(t,e){return lt=8,Co(function(){return t},e)}function Xe(t){var e=q.context[t.__c],r=pt(qe++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(q)),e.props.value):t.__}function In(){for(var t;t=wo.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Mt),e.__h.some(cr),e.__h=[]}catch(r){e.__h=[],K.__e(r,t.__v)}}}K.__b=function(t){q=null,go&&go(t)},K.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ro&&Ro(t,e)},K.__r=function(t){_o&&_o(t),qe=0;var e=(q=t.__c).__H;e&&(pr===q?(e.__h=[],q.__h=[],e.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.some(Mt),e.__h.some(cr),e.__h=[],qe=0)),pr=q},K.diffed=function(t){vo&&vo(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(wo.push(e)!==1&&To===K.requestAnimationFrame||((To=K.requestAnimationFrame)||Nn)(In)),e.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),pr=q=null},K.__c=function(t,e){e.some(function(r){try{r.__h.some(Mt),r.__h=r.__h.filter(function(n){return!n.__||cr(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],K.__e(n,r.__v)}}),xo&&xo(t,e)},K.unmount=function(t){bo&&bo(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.some(function(n){try{Mt(n)}catch(i){e=i}}),r.__H=void 0,e&&K.__e(e,r.__v))};var Eo=typeof requestAnimationFrame=="function";function Nn(t){var e,r=function(){clearTimeout(n),Eo&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);Eo&&(e=requestAnimationFrame(r))}function Mt(t){var e=q,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),q=e}function cr(t){var e=q;t.__c=t.__(),q=e}function fr(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Ao(t,e){return typeof e=="function"?e(t):e}var qo=De(!1),Qo=()=>Xe(qo),la=qo.Provider;var Vn=0;function o(t,e,r,n,i,s){e||(e={});var u,p,f=e;if("ref"in f)for(p in f={},e)p=="ref"?u=e[p]:f[p]=e[p];var c={type:t,props:f,key:r,ref:u,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vn,__i:-1,__u:0,__source:i,__self:s};if(typeof t=="function"&&(u=t.defaultProps))for(p in u)f[p]===void 0&&(f[p]=u[p]);return P.vnode&&P.vnode(c),c}var yr=De(void 0),dr=t=>{let e=Xe(yr);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},mr=({client:t,children:e})=>($(()=>(t.mount(),()=>{t.unmount()}),[t]),o(yr.Provider,{value:t,children:e}));function Gn(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var jn=De(Gn()),Oo=()=>Xe(jn);var Mo=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},Ko=t=>{$(()=>{t.clearReset()},[t])},Do=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||zt(r,[t.error,n]));var Fo=t=>{if(t.suspense){let r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},So=(t,e)=>t.isLoading&&t.isFetching&&!e,Uo=(t,e)=>t?.suspense&&e.isPending,hr=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function ko(t,e){let r=e(),[{_instance:n},i]=Qe({_instance:{_value:r,_getSnapshot:e}});return Kt(()=>{n._value=r,n._getSnapshot=e,Tr(n)&&i({_instance:n})},[t,r,e]),$(()=>(Tr(n)&&i({_instance:n}),t(()=>{Tr(n)&&i({_instance:n})})),[t]),r}function Tr(t){let e=t._getSnapshot,r=t._value;try{let n=e();return!Object.is(r,n)}catch{return!0}}function Lo(t,e,r){let n=Qo(),i=Oo(),s=dr(r),u=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=n?"isRestoring":"optimistic",Fo(u),Mo(u,i),Ko(i);let p=!s.getQueryCache().get(u.queryHash),[f]=Qe(()=>new e(s,u)),c=f.getOptimisticResult(u),d=!n&&t.subscribed!==!1;if(ko(Po(l=>{let T=d?f.subscribe(A.batchCalls(l)):D;return f.updateResult(),T},[f,d]),()=>f.getCurrentResult()),$(()=>{f.setOptions(u)},[u,f]),Uo(u,c))throw hr(u,f,i);if(Do({result:c,errorResetBoundary:i,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw c.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(u,c),u.experimental_prefetchInRender&&!ee.isServer()&&So(c,n)&&(p?hr(u,f,i):s.getQueryCache().get(u.queryHash)?.promise)?.catch(D).finally(()=>{f.updateResult()}),u.notifyOnChangeProps?c:f.trackResult(c)}function Dt(t,e){return Lo(t,ar,e)}function U({children:t,panel:e,href:r,className:n,panelLarge:i}){let[s,u]=Qe(!1),p=Oe(null),f=Oe(null),c=Oe(null),d=()=>{c.current&&(clearTimeout(c.current),c.current=null),f.current=setTimeout(()=>u(!0),100)},l=()=>{f.current&&(clearTimeout(f.current),f.current=null),c.current=setTimeout(()=>u(!1),150)};Kt(()=>{if(s&&p.current){let h=p.current;h.style.left="50%",h.style.right="auto",h.style.transform="translateX(-50%)";let x=h.getBoundingClientRect();x.left<8?(h.style.left="0",h.style.transform="none"):x.right>window.innerWidth-8&&(h.style.left="auto",h.style.right="0",h.style.transform="none")}},[s]);let T=["profiler-toolbar-item",e?"profiler-toolbar-hoverable":"",n||""].filter(Boolean).join(" "),y=e?o("div",{ref:p,class:`profiler-toolbar-panel${i?" profiler-toolbar-panel-large":""}${s?" is-visible":""}`,onMouseEnter:d,onMouseLeave:l,children:e}):null;return r?o("a",{href:r,class:T,onMouseEnter:d,onMouseLeave:l,children:[t,y]}):o("span",{class:T,onMouseEnter:d,onMouseLeave:l,children:[t,y]})}function Hn(t){return t>=200&&t<300?"profiler-text--success":t>=300&&t<400?"profiler-text--warning":t>=400?"profiler-text--error":""}function Io({profile:t,requestData:e}){let r=Hn(t.status),n=e.controller_action,i=e.route_name,s=e.route_pattern,u=e.route_params;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Request & Response",o("span",{class:"profiler-float-right",children:t.path})]}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-section__header",children:"Request"}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Method"}),o("strong",{class:"profiler-text--accent",children:t.method})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Path"}),o("strong",{children:t.path})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Status"}),o("strong",{class:r,children:t.status})]}),n&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Controller#Action"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:n})]}),i&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Route Name"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:i})]}),s&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Route Pattern"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:s})]}),u&&Object.keys(u).length>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Route Params"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:Object.entries(u).map(([p,f])=>`${p}: ${f}`).join(", ")})]}),t.params&&Object.keys(t.params).length>0&&o(b,{children:[o("div",{class:"profiler-section__header profiler-mt-3",children:"Parameters"}),Object.entries(t.params).map(([p,f])=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs profiler-text--mono",children:p}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:String(f).substring(0,40)})]},p))]})]})]})}function No({dbData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Database",o("span",{class:"profiler-float-right",children:[t.total_queries," queries \xB7 ",t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.queries.slice(0,10).map((e,r)=>o("div",{class:`profiler-toolbar-panel-query${e.slow?" profiler-toolbar-panel-query-slow":""}`,children:[o("div",{class:"profiler-flex profiler-flex--between profiler-mb-1",children:[o("span",{class:"profiler-text--xs profiler-text--muted",children:["#",r+1," ",e.name]}),o("span",{class:`${e.slow?"profiler-text--error":"profiler-text--success"} profiler-text--xs`,children:[e.duration.toFixed(2)," ms"]})]}),o("code",{children:e.sql})]},r)),t.total_queries>10&&o("div",{class:"profiler-more",children:["+ ",t.total_queries-10," more queries"]})]})]})}function Bn(t){return{GET:"badge-info",POST:"badge-success",PUT:"badge-warning",PATCH:"badge-warning",DELETE:"badge-error"}[t]||""}var Jn={frame:"Turbo Frame request",stream:"Turbo Stream response"};function Vo({ajaxData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["AJAX",o("span",{class:"profiler-float-right",children:[t.total_requests," requests \xB7 ",t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.requests.slice(0,10).map((e,r)=>{let n=e.status>=200&&e.status<300?"profiler-ajax-card--success":"profiler-ajax-card--error";return o("div",{class:`profiler-ajax-card ${n}`,children:o("div",{class:"profiler-ajax-card__row",children:[o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`badge ${Bn(e.method)}`,children:e.method}),e.turbo&&o("span",{class:"badge badge-default",title:Jn[e.turbo],children:e.turbo.toUpperCase()}),o("span",{class:"profiler-text--xs profiler-text--truncate",children:e.path})]}),o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`profiler-text--xs ${e.status>=200&&e.status<300?"profiler-text--success":"profiler-text--error"}`,children:e.status}),o("span",{class:"profiler-text--xs profiler-text--muted",children:[e.duration.toFixed(2)," ms"]})]})]})},r)}),t.total_requests>10&&o("div",{class:"profiler-more",children:["+ ",t.total_requests-10," more"]})]})]})}function Go({perfData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:"Events"}),o("div",{class:"profiler-toolbar-panel-content",children:t.events.slice(0,8).map((e,r)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs",children:e.name}),o("strong",{class:"profiler-text--accent",children:[e.duration.toFixed(2)," ms"]})]},r))})]})}function jo({viewData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Views",o("span",{class:"profiler-float-right",children:[t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.views&&t.views.length>0&&o(b,{children:[o("div",{class:"profiler-section__header",children:"Templates"}),t.views.map((e,r)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs",children:e.identifier}),o("strong",{class:"profiler-text--success",children:[e.duration.toFixed(2)," ms"]})]},r))]}),t.partials&&t.partials.length>0&&o(b,{children:[o("div",{class:"profiler-section__header profiler-mt-3",children:"Partials"}),t.partials.map((e,r)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs",children:e.identifier}),o("strong",{class:"profiler-text--success",children:[e.duration.toFixed(2)," ms"]})]},r))]})]})]})}function Ho({cacheData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Cache",o("span",{class:"profiler-float-right",children:["Hit rate: ",t.hit_rate,"%"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Reads"}),o("strong",{children:t.total_reads})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Writes"}),o("strong",{children:t.total_writes})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Hits"}),o("strong",{class:"profiler-text--success",children:t.hits})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Misses"}),o("strong",{class:"profiler-text--error",children:t.misses})]})]})]})}var $n="profiler-active-slave",Wn=(()=>{try{let t=sessionStorage.getItem($n);return t?`/slaves/${t}`:""}catch{return""}})();function Bo(){return Wn}var zn=["/_profiler/api/cluster/","/_profiler/api/toolbar/","/_profiler/api/events/"];function Xn(t){return zn.some(e=>t.startsWith(e))}async function ct(t){let e=Xn(t.url)?"":Bo(),r=e?t.url.replace("/_profiler/api",`/_profiler/api${e}`):t.url,{method:n,params:i,data:s,headers:u={},signal:p}=t,f=r,c=i?"?"+new URLSearchParams(Object.entries(i).map(([y,h])=>[y,String(h)])).toString():"",d={"X-Profiler-Request":"1",...u},l=await fetch(f+c,{method:n,signal:p,headers:s!==void 0?{"Content-Type":"application/json",...d}:d,body:s!==void 0?JSON.stringify(s):void 0});if(l.status===204)return{};if(!l.ok){let y;try{y=await l.json()}catch{y={}}throw Object.assign(new Error(y?.error??`HTTP ${l.status}`),{status:l.status,data:y})}return await l.json()}var Jo=(t,e)=>{let r={queryKey:e};for(let n of Object.keys(t))n!=="queryKey"&&Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:()=>t[n]});return r};var Yn=t=>ct({url:"/_profiler/api/config",method:"GET",signal:t}),gr=()=>["/_profiler/api/config"],Zn=t=>{let{query:e}=t??{};return{queryKey:e?.queryKey??gr(),queryFn:({signal:i})=>Yn(i),...e}};function $o(t){let e=Zn(t),r=Dt(e);return Jo(r,e.queryKey)}var es=(t,e)=>ct({url:`/_profiler/api/toolbar/${t}`,method:"GET",signal:e}),ts=t=>[`/_profiler/api/toolbar/${t}`],rs=(t,e)=>{let{query:r}=e??{};return{queryKey:r?.queryKey??ts(t),queryFn:({signal:s})=>es(t,s),enabled:t!=null,...r}};function Wo(t,e){let r=rs(t,e),n=Dt(r);return Jo(n,r.queryKey)}function zo(){let{data:t,isError:e}=$o({query:{queryKey:gr(),staleTime:1/0,retry:!1}});return t?{scheme:t.editor_url_scheme,pathMap:t.editor_path_map}:e?{scheme:"vscode",pathMap:{}}:{scheme:null,pathMap:{}}}var os=["vscode","idea","cursor"];function ns(t){return typeof t=="string"&&os.includes(t)}var ss=/^[A-Za-z]:\//;function ft(t){return t.replace(/\\/g,"/")}function is(t,e){if(!e)return t;let r=null;for(let s of Object.keys(e)){let u=ft(s).replace(/\/+$/,"");(t===u||t.startsWith(u+"/"))&&(r===null||u.length>ft(r).replace(/\/+$/,"").length)&&(r=s)}if(r===null)return t;let n=ft(r).replace(/\/+$/,"");return ft(String(e[r])).replace(/\/+$/,"")+t.slice(n.length)}function as(t){return t.startsWith("/")||ss.test(t)}function us(t){return(t.startsWith("/")?t:"/"+t).split("/").map((r,n)=>n===1&&/^[A-Za-z]:$/.test(r)?r:encodeURIComponent(r)).join("/")}function Xo(t,e,r){let{scheme:n,pathMap:i}=r;if(!ns(n)||!Number.isInteger(e)||e<1||typeof t!="string"||t===""||t.includes("\0"))return null;let s=is(ft(t),i);return as(s)?n==="idea"?`idea://open?file=${encodeURIComponent(s)}&line=${e}`:`${n}://file${us(s)}:${e}`:null}function Yo({file:t,line:e,children:r,class:n}){let i=zo(),s=r??`${t}:${e}`,u=Xo(t,e,i);return u?o("a",{href:u,class:n,title:`Open ${t}:${e} in your editor`,rel:"noopener noreferrer","data-source-link":"",onClick:p=>p.stopPropagation(),children:s}):o("span",{class:n,children:s})}function Zo({dumpData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Dumps (",t.count,")"]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.dumps.slice(0,5).map((e,r)=>o("div",{class:"profiler-dump-card",children:[o("div",{class:"profiler-dump-card__header",children:[o("span",{class:"profiler-text--xs profiler-text--muted",children:["#",r+1,e.label&&o(b,{children:[" \xB7 ",o("strong",{class:"profiler-text--warning",children:e.label})]})]}),o("span",{class:"profiler-text--xs profiler-text--muted",children:o(Yo,{file:e.file,line:e.line,children:[e.file.split("/").pop(),":",e.line]})})]}),o("pre",{class:"profiler-text--xs profiler-text--truncate profiler-text--warning",style:{margin:0,background:"none",border:"none",padding:0},children:(e.formatted.split(`
|
|
2
|
-
`)[0]||e.formatted).trim()})]},r)),t.count>5&&o("div",{class:"profiler-more",children:["+ ",t.count-5," more dumps"]})]})]})}function ls(t){return{GET:"badge-info",POST:"badge-success",PUT:"badge-warning",PATCH:"badge-warning",DELETE:"badge-error"}[t]||""}function en({httpData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Outbound HTTP",o("span",{class:"profiler-float-right",children:[t.total_requests," requests \xB7 ",t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.requests.slice(0,10).map((r,n)=>{let i=r.status>=400||r.status===0,s=r.duration>=500,u=i?"profiler-ajax-card--error":s?"profiler-ajax-card--warning":"profiler-ajax-card--success",p=(()=>{try{return new URL(r.url).host}catch{return r.url}})();return o("div",{class:`profiler-ajax-card ${u}`,children:o("div",{class:"profiler-ajax-card__row",children:[o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`badge ${ls(r.method)}`,children:r.method}),o("span",{class:"profiler-text--xs profiler-text--truncate",children:p})]}),o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`profiler-text--xs ${i?"profiler-text--error":"profiler-text--success"}`,children:r.status===0?"ERR":r.status}),o("span",{class:`profiler-text--xs ${s?"profiler-text--error":"profiler-text--muted"}`,children:[r.duration.toFixed(2)," ms"]})]})]})},n)}),t.total_requests>10&&o("div",{class:"profiler-more",children:["+ ",t.total_requests-10," more"]})]})]})}function ps(t){switch(t){case"ERROR":case"FATAL":return"var(--profiler-error, #ef4444)";case"WARN":return"var(--profiler-warning, #f59e0b)";case"INFO":return"var(--profiler-success, #22c55e)";default:return"var(--profiler-muted, #6b7280)"}}function tn({logData:t}){let e=t.logs.slice(-5).reverse();return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Logs (",t.count,")",t.errors>0&&o("span",{style:"color:var(--profiler-error,#ef4444);margin-left:8px;",children:[t.errors," error",t.errors!==1?"s":""]}),t.warnings>0&&t.errors===0&&o("span",{style:"color:var(--profiler-warning,#f59e0b);margin-left:8px;",children:[t.warnings," warning",t.warnings!==1?"s":""]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[e.map((r,n)=>o("div",{class:"profiler-toolbar-panel-row",style:"align-items:flex-start;gap:6px;",children:[o("span",{class:"profiler-text--xs",style:`color:${ps(r.level)};font-weight:600;min-width:40px;`,children:r.level}),o("span",{class:"profiler-text--xs profiler-text--truncate",style:"flex:1;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",children:r.message})]},n)),t.count>5&&o("div",{class:"profiler-more",children:["+ ",t.count-5," more messages"]})]})]})}function rn({exceptionData:t}){let e=t.backtrace?.find(r=>r.app_frame);return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",style:"color:var(--profiler-error,#ef4444);",children:["\u{1F4A5} ",t.exception_class]}),o("div",{class:"profiler-toolbar-panel-content",children:o("div",{class:"profiler-toolbar-panel-row",style:"flex-direction:column;align-items:flex-start;gap:4px;",children:[o("span",{class:"profiler-text--xs",style:"max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",children:t.message}),e&&o("span",{class:"profiler-text--xs profiler-text--muted",style:"max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",children:e.location})]})})]})}function on({routesData:t}){let{total:e,matched:r}=t;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Routes",o("span",{class:"profiler-float-right",children:[e," routes"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:r?o(b,{children:[o("div",{class:"profiler-section__header",children:"Matched Route"}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Pattern"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:r.pattern})]}),r.name&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Name"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:[r.name,"_path"]})]}),r.controller_action&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Controller#Action"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:r.controller_action})]})]}):o("div",{class:"profiler-toolbar-panel-row",children:o("span",{class:"profiler-text--muted",children:"No route matched"})})})]})}function nn({i18nData:t}){let e=t.lookups.filter(s=>s.missing),r=t.lookups.filter(s=>!s.missing),n=[...e,...r].slice(0,5),i=t.total-5;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["I18n",o("span",{style:"margin-left:6px;font-weight:400;color:var(--profiler-muted,#6b7280);",children:["[",t.locale,"]"]}),t.missing_count>0&&o("span",{style:"color:var(--profiler-error,#ef4444);margin-left:8px;",children:[t.missing_count," missing"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[n.map((s,u)=>o("div",{class:"profiler-toolbar-panel-row",style:"align-items:flex-start;gap:6px;",children:[o("span",{class:"profiler-text--xs profiler-text--truncate",style:`flex:1;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;${s.missing?"color:var(--profiler-error,#ef4444);":""}`,children:s.key}),s.missing&&o("span",{class:"profiler-text--xs",style:"color:var(--profiler-error,#ef4444);font-weight:600;",children:"\u26A0"})]},u)),i>0&&o("div",{class:"profiler-more",children:["+ ",i," more keys"]})]})]})}function cs({job:t}){if(t.status==="running")return o("strong",{class:"profiler-text--xs profiler-text--mono profiler-text--info",children:[o("span",{class:"profiler-spinner","aria-hidden":"true",children:"\u25D0"})," running"]});let e=t.status==="failed";return o("strong",{class:`profiler-text--xs profiler-text--mono ${e?"profiler-text--error":"profiler-text--success"}`,children:[e?"\u2717":"\u2713"," ",t.duration?.toFixed(0),"ms"]})}function sn({jobs:t}){let e=t.filter(u=>u.status==="running").length,r=t.filter(u=>u.status==="completed").length,n=t.filter(u=>u.status==="failed").length,i=t.slice(0,5),s=t.length-5;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Background Jobs",o("span",{class:"profiler-float-right",children:[t.length," job",t.length!==1?"s":""]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-section__header",children:"Summary"}),e>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Running"}),o("strong",{class:"profiler-text--info",children:e})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Completed"}),o("strong",{class:r>0?"profiler-text--success":"profiler-text--muted",children:r})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Failed"}),o("strong",{class:n>0?"profiler-text--error":"profiler-text--muted",children:n})]}),o("div",{class:"profiler-section__header profiler-mt-3",children:"Last jobs"}),i.map((u,p)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs profiler-text--mono",children:u.job_class}),o(cs,{job:u})]},p)),s>0&&o("div",{class:"profiler-more",children:["+ ",s," more"]})]})]})}function an({envData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:"Environment"}),o("div",{class:"profiler-toolbar-panel-content",children:o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Variables"}),o("strong",{children:t.total})]})})]})}function un({mailerData:t}){let e=t.failed>0||t.loop_warnings.length>0;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Mailers",o("span",{class:"profiler-float-right",children:[t.total," email",t.total!==1?"s":""]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.deliver_now>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"deliver_now"}),o("strong",{children:t.deliver_now})]}),t.deliver_later>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"deliver_later"}),o("strong",{children:t.deliver_later})]}),(t.queued_count??0)>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Queued"}),o("strong",{children:t.queued_count})]}),t.multi_part_count>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Multi-part"}),o("strong",{children:t.multi_part_count})]}),t.failed>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Errors"}),o("strong",{class:"profiler-text--error",children:t.failed})]}),t.loop_warnings.length>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--warning",children:"\u26A0\uFE0F Loop detected"}),o("strong",{class:"profiler-text--warning",children:t.loop_warnings.length})]}),[...t.emails,...t.errors].slice(0,3).map((r,n)=>o("div",{class:"profiler-toolbar-panel-row profiler-text--sm",children:[o("span",{class:"profiler-text--muted",children:[r.mailer_class,"#",r.action]}),o("span",{class:r.error?"profiler-text--error":"profiler-text--success",children:r.error?"\u274C":"\u2705"})]},n)),t.total>3&&o("div",{class:"profiler-toolbar-panel-row profiler-text--muted profiler-text--xs",children:["+",t.total-3," more\u2026"]})]})]})}function _r(t){return t.allocated_objects!=null?t.allocated_objects:t.memory!=null?Math.round(t.memory/40):null}function ln(t){return t==null?"-":`${t.toLocaleString("en")} objects`}var pn="Objects allocated by the whole process while this ran: on a multi-threaded server, it includes what other threads allocated meanwhile.";function fs(t){return t>=200&&t<300?"profiler-text--success":t>=300&&t<400?"profiler-text--warning":t>=400?"profiler-text--error":""}function ys(t){return t<100?"profiler-text--success":t<500?"profiler-text--warning":"profiler-text--error"}function ds(t){return new Date(t).toLocaleTimeString("en",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function cn({profile:t,token:e}){let r=t.collectors_data||{},n=r.request,i=r.database,s=r.ajax,u=r.performance,p=r.view,f=r.cache,c=r.dump,d=r.http,l=r.logs,T=r.exception,y=r.routes,h=r.i18n,x=r.env,_=r.mailer,v=t.child_jobs??[],R=fs(t.status),O=ys(t.duration),F=(i?.slow_queries??0)>0?"profiler-text--error":"profiler-text--success",L=(s?.total_requests??0)>20?"profiler-text--error":"profiler-text--success",W=(f?.hit_rate??0)>80?"profiler-text--success":"profiler-text--warning";return o(b,{children:o("div",{class:"profiler-toolbar-container",children:[n&&o(b,{children:[o(U,{href:`/_profiler/profiles/${e}?tab=request`,className:R,panelLarge:!0,panel:o(Io,{profile:t,requestData:n}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:t.method}),o("span",{children:t.status})]}),o(U,{href:`/_profiler/profiles/${e}?tab=request`,className:O,panel:o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:"Performance"}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Duration"}),o("strong",{class:O,children:[t.duration.toFixed(2)," ms"]})]}),_r(t)!=null&&o("div",{class:"profiler-toolbar-panel-row",title:pn,children:[o("span",{children:"Allocations"}),o("strong",{children:ln(_r(t))})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Started"}),o("strong",{children:ds(t.started_at)})]})]})]}),children:[o("span",{class:O,children:t.duration.toFixed(2)}),o("span",{class:"profiler-text--muted profiler-text--xs",children:"ms"})]})]}),i?.total_queries!==void 0&&o(U,{href:`/_profiler/profiles/${e}?tab=database`,className:F,panelLarge:!0,panel:o(No,{dbData:i}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"DB"}),o("span",{children:i.total_queries}),(i.slow_queries??0)>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u25B2 ",i.slow_queries]}),o("span",{class:"profiler-text--muted profiler-text--xs",children:[i.total_duration.toFixed(1),"ms"]})]}),s&&s.total_requests>0&&o(U,{href:`/_profiler/profiles/${e}?tab=ajax`,className:L,panelLarge:!0,panel:o(Vo,{ajaxData:s}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"XHR"}),o("span",{children:s.total_requests}),o("span",{class:"profiler-text--muted profiler-text--xs",children:[s.total_duration.toFixed(1),"ms"]})]}),u?.events&&u.total_events>0&&o(U,{href:`/_profiler/profiles/${e}?tab=timeline`,panel:o(Go,{perfData:u}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"EVT"}),o("span",{children:u.total_events})]}),p?.total_views!==void 0&&o(U,{href:`/_profiler/profiles/${e}?tab=views`,panel:o(jo,{viewData:p}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"VIEW"}),o("span",{children:p.total_views}),p.total_partials>0&&o("span",{class:"profiler-text--muted profiler-text--xs",children:["+",p.total_partials,"p"]})]}),f&&f.total_reads>0&&o(U,{href:`/_profiler/profiles/${e}?tab=cache`,className:W,panel:o(Ho,{cacheData:f}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"CACHE"}),o("span",{class:W,children:[f.hit_rate,"%"]})]}),d&&d.total_requests>0&&o(U,{href:`/_profiler/profiles/${e}?tab=http`,className:d.error_requests>0||d.slow_requests>0?"profiler-text--error":"profiler-text--success",panelLarge:!0,panel:o(en,{httpData:d}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"HTTP"}),o("span",{children:d.total_requests}),d.slow_requests>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u25B2 ",d.slow_requests]}),o("span",{class:"profiler-text--muted profiler-text--xs",children:[d.total_duration.toFixed(1),"ms"]})]}),c&&c.count>0&&o(U,{href:`/_profiler/profiles/${e}?tab=dump`,className:"profiler-text--warning",panelLarge:!0,panel:o(Zo,{dumpData:c}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"DUMP"}),o("span",{class:"profiler-text--warning",children:c.count})]}),l&&l.count>0&&o(U,{href:`/_profiler/profiles/${e}?tab=logs`,className:l.errors>0?"profiler-text--error":l.warnings>0?"profiler-text--warning":"profiler-text--muted",panelLarge:!0,panel:o(tn,{logData:l}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"LOG"}),o("span",{class:l.errors>0?"profiler-text--error":l.warnings>0?"profiler-text--warning":"",children:l.errors>0?l.errors:l.warnings>0?l.warnings:l.count})]}),T&&T.exception_class&&o(U,{href:`/_profiler/profiles/${e}?tab=exception`,className:"profiler-text--error",panelLarge:!0,panel:o(rn,{exceptionData:T}),children:[o("span",{class:"profiler-text--error profiler-text--xs",children:"\u{1F4A5}"}),o("span",{class:"profiler-text--error profiler-text--xs",children:T.exception_class.split("::").pop()})]}),y&&y.total>0&&o(U,{href:`/_profiler/profiles/${e}?tab=routes`,panelLarge:!0,panel:o(on,{routesData:y}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"ROUTE"}),o("span",{class:"profiler-text--xs profiler-text--mono",children:y.matched?.pattern??"-"})]}),h&&h.total>0&&o(U,{href:`/_profiler/profiles/${e}?tab=i18n`,className:h.missing_count>0?"profiler-text--error":"profiler-text--muted",panel:o(nn,{i18nData:h}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"I18N"}),o("span",{class:"profiler-text--xs profiler-text--mono",children:h.locale}),h.missing_count>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u26A0 ",h.missing_count]})]}),v.length>0&&o(U,{href:`/_profiler/profiles/${e}?tab=jobs`,className:v.some(G=>G.status==="failed")?"profiler-text--error":v.some(G=>G.status==="running")?"profiler-text--info":"profiler-text--success",panelLarge:!0,panel:o(sn,{jobs:v}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"JOB"}),o("span",{children:v.length}),v.some(G=>G.status==="failed")&&o("span",{class:"profiler-text--error profiler-text--xs",children:"\u2717"}),v.some(G=>G.status==="running")&&o("span",{class:"profiler-spinner profiler-text--info profiler-text--xs","aria-hidden":"true",children:"\u25D0"})]}),_&&(_.total>0||(_.queued_count??0)>0)&&o(U,{href:`/_profiler/profiles/${e}?tab=mailer`,className:_.failed>0?"profiler-text--error":"profiler-text--success",panelLarge:!0,panel:o(un,{mailerData:_}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"MAIL"}),_.total>0&&o("span",{children:_.total}),_.total===0&&(_.queued_count??0)>0&&o("span",{class:"profiler-text--muted",children:[_.queued_count,"q"]}),_.total>0&&(_.queued_count??0)>0&&o("span",{class:"profiler-text--muted profiler-text--xs",children:["+",_.queued_count,"q"]}),_.failed>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u25B2 ",_.failed]})]}),x&&x.total>0&&o(U,{href:`/_profiler/profiles/${e}?tab=env`,panel:o(an,{envData:x}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"ENV"}),o("span",{class:"profiler-text--muted",children:x.total})]}),o("a",{href:"/_profiler/health",class:"profiler-toolbar-item",children:"Health"}),o("a",{href:"/_profiler",class:"profiler-toolbar-item profiler-toolbar-logo",children:"\u2B21 Profiler"})]})})}var fn=[1e3,1e3,2e3,2e3,4e3,4e3,8e3,8e3,15e3,15e3],ms=3e4,hs=10*6e4;function Ts(t){return typeof t=="object"&&t!==null&&Number.isFinite(t.cursor)}function yn(t){let e=t.now??(()=>Date.now()),r=t.setTimer??((h,x)=>setTimeout(h,x)),n=t.clearTimer??(h=>clearTimeout(h)),i=t.cursor,s=0,u=e(),p=null,f=!1,c=!1,d=!1,l=()=>{p!==null&&(n(p),p=null)},T=()=>{if(l(),c||f||e()-u>=hs)return;let h=s<fn.length?fn[s]:ms;s+=1,p=r(()=>{p=null,y()},h)},y=async()=>{if(!(c||d)){d=!0;try{let h=await t.check(i);if(c)return;Ts(h)&&(i=Math.max(i,h.cursor),h.updated===!0&&(s=0,u=e(),t.onUpdate()))}catch{}finally{d=!1}T()}};return T(),{pause(){f=!0,l()},resume(){c||(f=!1,l(),y())},stop(){c=!0,l()}}}var gs="/_profiler";function dn(t,e,r){let n=Oe(r);n.current=r,$(()=>{if(!t||e===void 0)return;let s=yn({cursor:e,check:p=>ct({url:`${gs}/api/events/${encodeURIComponent(t)}`,method:"GET",params:{since:p}}),onUpdate:()=>n.current()}),u=()=>{document.hidden?s.pause():s.resume()};return document.addEventListener("visibilitychange",u),document.hidden&&s.pause(),()=>{document.removeEventListener("visibilitychange",u),s.stop()}},[t,e!==void 0])}function mn({token:t}){let{data:e,refetch:r,isError:n,isFetching:i}=Wo(t,{query:{refetchOnWindowFocus:!1}});$(()=>{window.__PROFILER_REFRESH_TOOLBAR__=()=>{r()}},[r]),dn(t,e?.events_cursor,()=>{r()});let s=e?.profile??null;return s?o(cn,{profile:s,token:t}):n?o("div",{class:"profiler-toolbar-container",children:o("span",{class:"profiler-toolbar-error",role:"alert",children:[o("span",{class:"profiler-text--error",children:"Profiler data could not be loaded."}),o("button",{type:"button",class:"profiler-toolbar-retry",disabled:i,onClick:()=>{r()},children:i?"Retrying...":"Retry"})]})}):null}var Ft=class extends Me{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(r){console.error("[Profiler] The toolbar failed to render:",r)}render(){return this.state.failed?o("div",{class:"profiler-toolbar-container",children:o("span",{class:"profiler-toolbar-error",role:"alert",children:[o("span",{class:"profiler-text--error",children:"Profiler toolbar error."}),o("button",{type:"button",class:"profiler-toolbar-retry",onClick:()=>this.setState({failed:!1}),children:"Retry"})]})}):this.props.children}};function hn(t){return t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.code==="KeyP"}var vr=new Map;function xr(t){try{return localStorage.getItem(t)}catch{return vr.has(t)?vr.get(t):null}}function Tn(t,e){vr.set(t,e);try{localStorage.setItem(t,e)}catch{}}var br=280;function gn(t){let e=xr("profiler-theme"),r=e==="light"?"light":e==="dark"?"dark":window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";t.forEach(n=>n.setAttribute("data-theme",r))}var _s=new lr({defaultOptions:{queries:{staleTime:3e4,retry:1}}});function _n(){let t=document.getElementById("profiler-toolbar"),e=document.getElementById("profiler-toolbar-toggle");if(!t||!e)return;let r=t.dataset.token;if(!r)return;window.__PROFILER_TOOLBAR_TEARDOWN__?.();let n=new AbortController,{signal:i}=n,s=()=>{n.abort(),Ht(null,t),window.__PROFILER_TOOLBAR_TEARDOWN__===s&&delete window.__PROFILER_TOOLBAR_TEARDOWN__};window.__PROFILER_TOOLBAR_TEARDOWN__=s,document.addEventListener("turbo:load",()=>{t.isConnected||s()},{signal:i});let u=[t,e];gn(u),window.addEventListener("storage",c=>{c.key==="profiler-theme"&&gn(u)},{signal:i}),window.addEventListener("profiler:theme-change",(c=>{c.detail?.theme&&u.forEach(d=>d.setAttribute("data-theme",c.detail.theme))}),{signal:i});let p=xr("profiler-toolbar-collapsed")==="true";e.dataset.collapsed=String(p),p&&!t.style.transform&&(t.style.animation="none",t.style.transform="translateX(calc(100% + 44px))"),p||setTimeout(()=>{t.style.animation="none"},400);function f(){let c=!p;p=c,Tn("profiler-toolbar-collapsed",String(c)),e.dataset.collapsed=String(c),c?(t.style.transition=`transform ${br}ms cubic-bezier(0.4,0,0.2,1)`,t.style.transform="translateX(calc(100% + 44px))"):(t.style.transition="none",t.style.transform="translateX(calc(100% + 44px))",t.offsetWidth,t.style.transition=`transform ${br}ms cubic-bezier(0.4,0,0.2,1)`,t.style.transform="translateX(0)",setTimeout(()=>{t.style.transform="",t.style.transition=""},br+50))}e.addEventListener("click",f,{signal:i}),document.addEventListener("keydown",c=>{hn(c)&&(c.preventDefault(),f())},{signal:i}),Ht(o(mr,{client:_s,children:o(Ft,{children:o(mn,{token:r})})}),t)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_n):_n();})();
|
|
1
|
+
"use strict";(()=>{var Er=t=>{throw TypeError(t)};var St=(t,e,r)=>e.has(t)||Er("Cannot "+r);var a=(t,e,r)=>(St(t,e,"read from private field"),r?r.call(t):e.get(t)),g=(t,e,r)=>e.has(t)?Er("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),h=(t,e,r,n)=>(St(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),E=(t,e,r)=>(St(t,e,"access private method"),r);var Ye=(t,e,r,n)=>({set _(i){h(t,e,i,r)},get _(){return a(t,e,n)}});var xt,P,Ar,vn,ue,wr,qr,Qr,Or,Nt,Ut,kt,Mr,gt={},_t=[],xn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,bt=Array.isArray;function ne(t,e){for(var r in e)t[r]=e[r];return t}function Vt(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function bn(t,e,r){var n,i,s,u={};for(s in e)s=="key"?n=e[s]:s=="ref"?i=e[s]:u[s]=e[s];if(arguments.length>2&&(u.children=arguments.length>3?xt.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)u[s]===void 0&&(u[s]=t.defaultProps[s]);return Tt(t,u,n,i,null)}function Tt(t,e,r,n,i){var s={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Ar,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(s),s}function b(t){return t.children}function Me(t,e){this.props=t,this.context=e}function Ke(t,e){if(e==null)return t.__?Ke(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ke(t):null}function Rn(t){if(t.__P&&t.__d){var e=t.__v,r=e.__e,n=[],i=[],s=ne({},e);s.__v=e.__v+1,P.vnode&&P.vnode(s),Gt(t.__P,s,e,t.__n,t.__P.namespaceURI,32&e.__u?[r]:null,n,r??Ke(e),!!(32&e.__u),i),s.__v=e.__v,s.__.__k[s.__i]=s,Sr(n,s,i),e.__e=e.__=null,s.__e!=r&&Kr(s)}}function Kr(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Kr(t)}function Lt(t){(!t.__d&&(t.__d=!0)&&ue.push(t)&&!vt.__r++||wr!=P.debounceRendering)&&((wr=P.debounceRendering)||qr)(vt)}function vt(){try{for(var t,e=1;ue.length;)ue.length>e&&ue.sort(Qr),t=ue.shift(),e=ue.length,Rn(t)}finally{ue.length=vt.__r=0}}function Dr(t,e,r,n,i,s,u,p,f,c,d){var l,T,y,m,x,_,v,R=n&&n.__k||_t,O=e.length;for(f=En(r,e,R,f,O),l=0;l<O;l++)(y=r.__k[l])!=null&&(T=y.__i!=-1&&R[y.__i]||gt,y.__i=l,_=Gt(t,y,T,i,s,u,p,f,c,d),m=y.__e,y.ref&&T.ref!=y.ref&&(T.ref&&jt(T.ref,null,y),d.push(y.ref,y.__c||m,y)),x==null&&m!=null&&(x=m),(v=!!(4&y.__u))||T.__k===y.__k?f=Fr(y,f,t,v):typeof y.type=="function"&&_!==void 0?f=_:m&&(f=m.nextSibling),y.__u&=-7);return r.__e=x,f}function En(t,e,r,n,i){var s,u,p,f,c,d=r.length,l=d,T=0;for(t.__k=new Array(i),s=0;s<i;s++)(u=e[s])!=null&&typeof u!="boolean"&&typeof u!="function"?(typeof u=="string"||typeof u=="number"||typeof u=="bigint"||u.constructor==String?u=t.__k[s]=Tt(null,u,null,null,null):bt(u)?u=t.__k[s]=Tt(b,{children:u},null,null,null):u.constructor===void 0&&u.__b>0?u=t.__k[s]=Tt(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,f=s+T,u.__=t,u.__b=t.__b+1,p=null,(c=u.__i=wn(u,r,f,l))!=-1&&(l--,(p=r[c])&&(p.__u|=2)),p==null||p.__v==null?(c==-1&&(i>d?T--:i<d&&T++),typeof u.type!="function"&&(u.__u|=4)):c!=f&&(c==f-1?T--:c==f+1?T++:(c>f?T--:T++,u.__u|=4))):t.__k[s]=null;if(l)for(s=0;s<d;s++)(p=r[s])!=null&&(2&p.__u)==0&&(p.__e==n&&(n=Ke(p)),kr(p,p));return n}function Fr(t,e,r,n){var i,s;if(typeof t.type=="function"){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,e=Fr(i[s],e,r,n));return e}t.__e!=e&&(n&&(e&&t.type&&!e.parentNode&&(e=Ke(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function wn(t,e,r,n){var i,s,u,p=t.key,f=t.type,c=e[r],d=c!=null&&(2&c.__u)==0;if(c===null&&p==null||d&&p==c.key&&f==c.type)return r;if(n>(d?1:0)){for(i=r-1,s=r+1;i>=0||s<e.length;)if((c=e[u=i>=0?i--:s++])!=null&&(2&c.__u)==0&&p==c.key&&f==c.type)return u}return-1}function Cr(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||xn.test(e)?r:r+"px"}function mt(t,e,r,n,i){var s,u;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||Cr(t.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||Cr(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Or,"$1")),u=e.toLowerCase(),e=u in t||e=="onFocusOut"||e=="onFocusIn"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r.u=n.u:(r.u=Nt,t.addEventListener(e,s?kt:Ut,s)):t.removeEventListener(e,s?kt:Ut,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Pr(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=Nt++;else if(e.t<r.u)return;return r(P.event?P.event(e):e)}}}function Gt(t,e,r,n,i,s,u,p,f,c){var d,l,T,y,m,x,_,v,R,O,F,L,W,G,H,Q=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),s=[p=e.__e=r.__e]),(d=P.__b)&&d(e);e:if(typeof Q=="function")try{if(v=e.props,R=Q.prototype&&Q.prototype.render,O=(d=Q.contextType)&&n[d.__c],F=d?O?O.props.value:d.__:n,r.__c?_=(l=e.__c=r.__c).__=l.__E:(R?e.__c=l=new Q(v,F):(e.__c=l=new Me(v,F),l.constructor=Q,l.render=Pn),O&&O.sub(l),l.state||(l.state={}),l.__n=n,T=l.__d=!0,l.__h=[],l._sb=[]),R&&l.__s==null&&(l.__s=l.state),R&&Q.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ne({},l.__s)),ne(l.__s,Q.getDerivedStateFromProps(v,l.__s))),y=l.props,m=l.state,l.__v=e,T)R&&Q.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),R&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(R&&Q.getDerivedStateFromProps==null&&v!==y&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(v,F),e.__v==r.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(v,l.__s,F)===!1){e.__v!=r.__v&&(l.props=v,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(B){B&&(B.__=e)}),_t.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&u.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(v,l.__s,F),R&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(y,m,x)})}if(l.context=F,l.props=v,l.__P=t,l.__e=!1,L=P.__r,W=0,R)l.state=l.__s,l.__d=!1,L&&L(e),d=l.render(l.props,l.state,l.context),_t.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,L&&L(e),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++W<25);l.state=l.__s,l.getChildContext!=null&&(n=ne(ne({},n),l.getChildContext())),R&&!T&&l.getSnapshotBeforeUpdate!=null&&(x=l.getSnapshotBeforeUpdate(y,m)),G=d!=null&&d.type===b&&d.key==null?Ur(d.props.children):d,p=Dr(t,bt(G)?G:[G],e,r,n,i,s,u,p,f,c),l.base=e.__e,e.__u&=-161,l.__h.length&&u.push(l),_&&(l.__E=l.__=null)}catch(B){if(e.__v=null,f||s!=null)if(B.then){for(e.__u|=f?160:128;p&&p.nodeType==8&&p.nextSibling;)p=p.nextSibling;s[s.indexOf(p)]=null,e.__e=p}else{for(H=s.length;H--;)Vt(s[H]);It(e)}else e.__e=r.__e,e.__k=r.__k,B.then||It(e);P.__e(B,e,r)}else s==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):p=e.__e=Cn(r.__e,e,r,n,i,s,u,f,c);return(d=P.diffed)&&d(e),128&e.__u?void 0:p}function It(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(It))}function Sr(t,e,r){for(var n=0;n<r.length;n++)jt(r[n],r[++n],r[++n]);P.__c&&P.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){P.__e(s,i.__v)}})}function Ur(t){return typeof t!="object"||t==null||t.__b>0?t:bt(t)?t.map(Ur):ne({},t)}function Cn(t,e,r,n,i,s,u,p,f){var c,d,l,T,y,m,x,_=r.props||gt,v=e.props,R=e.type;if(R=="svg"?i="http://www.w3.org/2000/svg":R=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((y=s[c])&&"setAttribute"in y==!!R&&(R?y.localName==R:y.nodeType==3)){t=y,s[c]=null;break}}if(t==null){if(R==null)return document.createTextNode(v);t=document.createElementNS(i,R,v.is&&v),p&&(P.__m&&P.__m(e,s),p=!1),s=null}if(R==null)_===v||p&&t.data==v||(t.data=v);else{if(s=s&&xt.call(t.childNodes),!p&&s!=null)for(_={},c=0;c<t.attributes.length;c++)_[(y=t.attributes[c]).name]=y.value;for(c in _)y=_[c],c=="dangerouslySetInnerHTML"?l=y:c=="children"||c in v||c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v||mt(t,c,null,y,i);for(c in v)y=v[c],c=="children"?T=y:c=="dangerouslySetInnerHTML"?d=y:c=="value"?m=y:c=="checked"?x=y:p&&typeof y!="function"||_[c]===y||mt(t,c,y,_[c],i);if(d)p||l&&(d.__html==l.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(l&&(t.innerHTML=""),Dr(e.type=="template"?t.content:t,bt(T)?T:[T],e,r,n,R=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,u,s?s[0]:r.__k&&Ke(r,0),p,f),s!=null)for(c=s.length;c--;)Vt(s[c]);p||(c="value",R=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[c]||R=="progress"&&!m||R=="option"&&m!=_[c])&&mt(t,c,m,_[c],i),c="checked",x!=null&&x!=t[c]&&mt(t,c,x,_[c],i))}return t}function jt(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){P.__e(i,r)}}function kr(t,e,r){var n,i;if(P.unmount&&P.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||jt(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){P.__e(s,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&kr(n[i],e,r||typeof t.type!="function");r||Vt(t.__e),t.__c=t.__=t.__e=void 0}function Pn(t,e,r){return this.constructor(t,r)}function Ht(t,e,r){var n,i,s,u;e==document&&(e=document.documentElement),P.__&&P.__(t,e),i=(n=typeof r=="function")?null:r&&r.__k||e.__k,s=[],u=[],Gt(e,t=(!n&&r||e).__k=bn(b,null,[t]),i||gt,gt,e.namespaceURI,!n&&r?[r]:i?null:e.firstChild?xt.call(e.childNodes):null,s,!n&&r?r:i?i.__e:e.firstChild,n,u),Sr(s,t,u)}function De(t){function e(r){var n,i;return this.getChildContext||(n=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&n.forEach(function(u){u.__e=!0,Lt(u)})},this.sub=function(s){n.add(s);var u=s.componentWillUnmount;s.componentWillUnmount=function(){n&&n.delete(s),u&&u.call(s)}}),r.children}return e.__c="__cC"+Mr++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,n){return r.children(n)}).contextType=e,e}xt=_t.slice,P={__e:function(t,e,r,n){for(var i,s,u;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),u=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),u=i.__d),u)return i.__E=i}catch(p){t=p}throw t}},Ar=0,vn=function(t){return t!=null&&t.constructor===void 0},Me.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},r),this.props)),t&&ne(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Lt(this))},Me.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Lt(this))},Me.prototype.render=b,ue=[],qr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qr=function(t,e){return t.__v.__b-e.__v.__b},vt.__r=0,Or=/(PointerCapture)$|Capture$/i,Nt=0,Ut=Pr(!1),kt=Pr(!0),Mr=0;var Y=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var ge,le,Fe,Lr,An=(Lr=class extends Y{constructor(){super();g(this,ge);g(this,le);g(this,Fe);h(this,Fe,e=>{if(typeof window<"u"&&window.addEventListener){let r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){a(this,le)||this.setEventListener(a(this,Fe))}onUnsubscribe(){var e;this.hasListeners()||((e=a(this,le))==null||e.call(this),h(this,le,void 0))}setEventListener(e){var r;h(this,Fe,e),(r=a(this,le))==null||r.call(this),h(this,le,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){a(this,ge)!==e&&(h(this,ge,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof a(this,ge)=="boolean"?a(this,ge):globalThis.document?.visibilityState!=="hidden"}},ge=new WeakMap,le=new WeakMap,Fe=new WeakMap,Lr),Se=new An;var qn={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},pe,Bt,Ir,Qn=(Ir=class{constructor(){g(this,pe,qn);g(this,Bt,!1)}setTimeoutProvider(t){h(this,pe,t)}setTimeout(t,e){return a(this,pe).setTimeout(t,e)}clearTimeout(t){a(this,pe).clearTimeout(t)}setInterval(t,e){return a(this,pe).setInterval(t,e)}clearInterval(t){a(this,pe).clearInterval(t)}},pe=new WeakMap,Bt=new WeakMap,Ir),Z=new Qn;function Nr(t){setTimeout(t,0)}var $t=typeof window>"u"||"Deno"in globalThis;function D(){}function jr(t,e){return typeof t=="function"?t(e):t}function Ze(t){return typeof t=="number"&&t>=0&&t!==1/0}function Rt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function z(t,e){return typeof t=="function"?t(e):t}function I(t,e){return typeof t=="function"?t(e):t}function Et(t,e){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:u,stale:p}=t;if(u){if(n){if(e.queryHash!==et(u,e.options))return!1}else if(!ve(e.queryKey,u))return!1}if(r!=="all"){let f=e.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof p=="boolean"&&e.isStale()!==p||i&&i!==e.state.fetchStatus||s&&!s(e))}function wt(t,e){let{exact:r,status:n,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(r){if(_e(e.options.mutationKey)!==_e(s))return!1}else if(!ve(e.options.mutationKey,s))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function et(t,e){return(e?.queryKeyHashFn||_e)(t)}function _e(t){return JSON.stringify(t,(e,r)=>Jt(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ve(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>ve(t[r],e[r])):!1}var On=Object.prototype.hasOwnProperty;function Wt(t,e,r=0){if(t===e)return t;if(r>500)return e;let n=Vr(t)&&Vr(e);if(!n&&!(Jt(t)&&Jt(e)))return e;let s=(n?t:Object.keys(t)).length,u=n?e:Object.keys(e),p=u.length,f=n?new Array(p):{},c=0;for(let d=0;d<p;d++){let l=n?d:u[d],T=t[l],y=e[l];if(T===y){f[l]=T,(n?d<s:On.call(t,l))&&c++;continue}if(T===null||y===null||typeof T!="object"||typeof y!="object"){f[l]=y;continue}let m=Wt(T,y,r+1);f[l]=m,m===T&&c++}return s===p&&c===s?t:f}function Ct(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function Vr(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Jt(t){if(!Gr(t))return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(!Gr(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Gr(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hr(t){return new Promise(e=>{Z.setTimeout(e,t)})}function tt(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Wt(t,e):e}function Br(t,e,r=0){let n=[...t,e];return r&&n.length>r?n.slice(1):n}function Jr(t,e,r=0){let n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var Ue=Symbol();function Pt(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Ue?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function zt(t,e){return typeof t=="function"?t(...e):!!t}function $r(t,e,r){let n=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),t}var ee=(()=>{let t=()=>$t;return{isServer(){return t()},setIsServer(e){t=e}}})();function rt(){let t,e,r=new Promise((i,s)=>{t=i,e=s});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),t(i)},r.reject=i=>{n({status:"rejected",reason:i}),e(i)},r}var Wr=Nr;function Mn(){let t=[],e=0,r=p=>{p()},n=p=>{p()},i=Wr,s=p=>{e?t.push(p):i(()=>{r(p)})},u=()=>{let p=t;t=[],p.length&&i(()=>{n(()=>{p.forEach(f=>{r(f)})})})};return{batch:p=>{let f;e++;try{f=p()}finally{e--,e||u()}return f},batchCalls:p=>(...f)=>{s(()=>{p(...f)})},schedule:s,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{n=p},setScheduler:p=>{i=p}}}var A=Mn();var ke,ce,Le,zr,Kn=(zr=class extends Y{constructor(){super();g(this,ke,!0);g(this,ce);g(this,Le);h(this,Le,e=>{if(typeof window<"u"&&window.addEventListener){let r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){a(this,ce)||this.setEventListener(a(this,Le))}onUnsubscribe(){var e;this.hasListeners()||((e=a(this,ce))==null||e.call(this),h(this,ce,void 0))}setEventListener(e){var r;h(this,Le,e),(r=a(this,ce))==null||r.call(this),h(this,ce,e(this.setOnline.bind(this)))}setOnline(e){a(this,ke)!==e&&(h(this,ke,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return a(this,ke)}},ke=new WeakMap,ce=new WeakMap,Le=new WeakMap,zr),Ie=new Kn;function Dn(t){return Math.min(1e3*2**t,3e4)}function Xt(t){return(t??"online")==="online"?Ie.isOnline():!0}var At=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function qt(t){let e=!1,r=0,n,i=rt(),s=()=>i.status!=="pending",u=x=>{if(!s()){let _=new At(x);T(_),t.onCancel?.(_)}},p=()=>{e=!0},f=()=>{e=!1},c=()=>Se.isFocused()&&(t.networkMode==="always"||Ie.isOnline())&&t.canRun(),d=()=>Xt(t.networkMode)&&t.canRun(),l=x=>{s()||(n?.(),i.resolve(x))},T=x=>{s()||(n?.(),i.reject(x))},y=()=>new Promise(x=>{n=_=>{(s()||c())&&x(_)},t.onPause?.()}).then(()=>{n=void 0,s()||t.onContinue?.()}),m=()=>{if(s())return;let x,_=r===0?t.initialPromise:void 0;try{x=_??t.fn()}catch(v){x=Promise.reject(v)}Promise.resolve(x).then(l).catch(v=>{if(s())return;let R=t.retry??(ee.isServer()?0:3),O=t.retryDelay??Dn,F=typeof O=="function"?O(r,v):O,L=R===!0||typeof R=="number"&&r<R||typeof R=="function"&&R(r,v);if(e||!L){T(v);return}r++,t.onFail?.(r,v),Hr(F).then(()=>c()?void 0:y()).then(()=>{e?T(v):m()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(n?.(),i),cancelRetry:p,continueRetry:f,canStart:d,start:()=>(d()?m():y().then(m),i)}}var xe,Xr,Qt=(Xr=class{constructor(){g(this,xe)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ze(this.gcTime)&&h(this,xe,Z.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ee.isServer()?1/0:300*1e3))}clearGcTimeout(){a(this,xe)!==void 0&&(Z.clearTimeout(a(this,xe)),h(this,xe,void 0))}},xe=new WeakMap,Xr);function Zr(t){return{onFetch:(e,r)=>{let n=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],u=e.state.data?.pageParams||[],p={pages:[],pageParams:[]},f=0,c=async()=>{let d=!1,l=m=>{$r(m,()=>e.signal,()=>d=!0)},T=Pt(e.options,e.fetchOptions),y=async(m,x,_)=>{if(d)return Promise.reject(e.signal.reason);if(x==null&&m.pages.length)return Promise.resolve(m);let R=(()=>{let W={client:e.client,queryKey:e.queryKey,pageParam:x,direction:_?"backward":"forward",meta:e.options.meta};return l(W),W})(),O=await T(R),{maxPages:F}=e.options,L=_?Jr:Br;return{pages:L(m.pages,O,F),pageParams:L(m.pageParams,x,F)}};if(i&&s.length){let m=i==="backward",x=m?Fn:Yr,_={pages:s,pageParams:u},v=x(n,_);p=await y(_,v,m)}else{let m=t??s.length;do{let x=f===0?u[0]??n.initialPageParam:Yr(n,p);if(f>0&&x==null)break;p=await y(p,x),f++}while(f<m)}return p};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=c}}}function Yr(t,{pages:e,pageParams:r}){let n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function Fn(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var Ne,be,Ve,J,Re,S,ot,Ee,j,no,se,ro,oo=(ro=class extends Qt{constructor(e){super();g(this,j);g(this,Ne);g(this,be);g(this,Ve);g(this,J);g(this,Re);g(this,S);g(this,ot);g(this,Ee);h(this,Ee,!1),h(this,ot,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(this,Re,e.client),h(this,J,a(this,Re).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h(this,be,to(this.options)),this.state=e.state??a(this,be),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return a(this,Ne)}get promise(){return a(this,S)?.promise}setOptions(e){if(this.options={...a(this,ot),...e},e?._type&&h(this,Ne,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=to(this.options);r.data!==void 0&&(this.setState(eo(r.data,r.dataUpdatedAt)),h(this,be,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&a(this,J).remove(this)}setData(e,r){let n=tt(this.state.data,e,this.options);return E(this,j,se).call(this,{data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(e){E(this,j,se).call(this,{type:"setState",state:e})}cancel(e){let r=a(this,S)?.promise;return a(this,S)?.cancel(e),r?r.then(D).catch(D):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return a(this,be)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>I(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ue||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>z(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Rt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),a(this,S)?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),a(this,S)?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),a(this,J).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(a(this,S)&&(a(this,Ee)||E(this,j,no).call(this)?a(this,S).cancel({revert:!0}):a(this,S).cancelRetry()),this.scheduleGc()),a(this,J).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||E(this,j,se).call(this,{type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&a(this,S)?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(a(this,S))return a(this,S).continueRetry(),a(this,S).promise}if(e&&this.setOptions(e),!this.options.queryFn){let c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(h(this,Ee,!0),n.signal)})},s=()=>{let c=Pt(this.options,r),l=(()=>{let T={client:a(this,Re),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return h(this,Ee,!1),this.options.persister?this.options.persister(c,l,this):c(l)},p=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:a(this,Re),state:this.state,fetchFn:s};return i(c),c})();(a(this,Ne)==="infinite"?Zr(this.options.pages):this.options.behavior)?.onFetch(p,this),h(this,Ve,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==p.fetchOptions?.meta)&&E(this,j,se).call(this,{type:"fetch",meta:p.fetchOptions?.meta}),h(this,S,qt({initialPromise:r?.initialPromise,fn:p.fetchFn,onCancel:c=>{c instanceof At&&c.revert&&this.setState({...a(this,Ve),fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{E(this,j,se).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{E(this,j,se).call(this,{type:"pause"})},onContinue:()=>{E(this,j,se).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{let c=await a(this,S).start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),a(this,J).config.onSuccess?.(c,this),a(this,J).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof At){if(c.silent)return a(this,S).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw E(this,j,se).call(this,{type:"error",error:c}),a(this,J).config.onError?.(c,this),a(this,J).config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}},Ne=new WeakMap,be=new WeakMap,Ve=new WeakMap,J=new WeakMap,Re=new WeakMap,S=new WeakMap,ot=new WeakMap,Ee=new WeakMap,j=new WeakSet,no=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},se=function(e){let r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Yt(n.data,this.options),fetchMeta:e.meta??null};case"success":let i={...n,...eo(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return h(this,Ve,e.manual?i:void 0),i;case"error":let s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),A.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),a(this,J).notify({query:this,type:"updated",action:e})})},ro);function Yt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function eo(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function to(t){let e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var V,w,st,N,we,Ge,ie,fe,it,je,He,Ce,Pe,ye,Be,C,nt,Zt,er,tr,rr,or,nr,sr,uo,ao,ar=(ao=class extends Y{constructor(e,r){super();g(this,C);g(this,V);g(this,w);g(this,st);g(this,N);g(this,we);g(this,Ge);g(this,ie);g(this,fe);g(this,it);g(this,je);g(this,He);g(this,Ce);g(this,Pe);g(this,ye);g(this,Be,new Set);this.options=r,h(this,V,e),h(this,fe,null),h(this,ie,rt()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(a(this,w).addObserver(this),so(a(this,w),this.options)?E(this,C,nt).call(this):this.updateResult(),E(this,C,rr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ir(a(this,w),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ir(a(this,w),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,E(this,C,or).call(this),E(this,C,nr).call(this),a(this,w).removeObserver(this)}setOptions(e){let r=this.options,n=a(this,w);if(this.options=a(this,V).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof I(this.options.enabled,a(this,w))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");E(this,C,sr).call(this),a(this,w).setOptions(this.options),r._defaulted&&!Ct(this.options,r)&&a(this,V).getQueryCache().notify({type:"observerOptionsUpdated",query:a(this,w),observer:this});let i=this.hasListeners();i&&io(a(this,w),n,this.options,r)&&E(this,C,nt).call(this),this.updateResult(),i&&(a(this,w)!==n||I(this.options.enabled,a(this,w))!==I(r.enabled,a(this,w))||z(this.options.staleTime,a(this,w))!==z(r.staleTime,a(this,w)))&&E(this,C,Zt).call(this);let s=E(this,C,er).call(this);i&&(a(this,w)!==n||I(this.options.enabled,a(this,w))!==I(r.enabled,a(this,w))||s!==a(this,ye))&&E(this,C,tr).call(this,s)}getOptimisticResult(e){let r=a(this,V).getQueryCache().build(a(this,V),e),n=this.createResult(r,e);return Un(this,n)&&(h(this,N,n),h(this,Ge,this.options),h(this,we,a(this,w).state)),n}getCurrentResult(){return a(this,N)}trackResult(e,r){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&a(this,ie).status==="pending"&&a(this,ie).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){a(this,Be).add(e)}getCurrentQuery(){return a(this,w)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let r=a(this,V).defaultQueryOptions(e),n=a(this,V).getQueryCache().build(a(this,V),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return E(this,C,nt).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),a(this,N)))}createResult(e,r){let n=a(this,w),i=this.options,s=a(this,N),u=a(this,we),p=a(this,Ge),c=e!==n?e.state:a(this,st),{state:d}=e,l={...d},T=!1,y;if(r._optimisticResults){let Q=this.hasListeners(),B=!Q&&so(e,r),yt=Q&&io(e,n,r,i);(B||yt)&&(l={...l,...Yt(d.data,e.options)}),r._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:_}=l;y=l.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&_==="pending"){let Q;s?.isPlaceholderData&&r.placeholderData===p?.placeholderData?(Q=s.data,v=!0):Q=typeof r.placeholderData=="function"?r.placeholderData(a(this,He)?.state.data,a(this,He)):r.placeholderData,Q!==void 0&&(_="success",y=tt(s?.data,Q,r),T=!0)}if(r.select&&y!==void 0&&!v)if(s&&y===u?.data&&r.select===a(this,it))y=a(this,je);else try{h(this,it,r.select),y=r.select(y),y=tt(s?.data,y,r),h(this,je,y),h(this,fe,null)}catch(Q){h(this,fe,Q)}a(this,fe)&&(m=a(this,fe),y=a(this,je),x=Date.now(),_="error");let R=l.fetchStatus==="fetching",O=_==="pending",F=_==="error",L=O&&R,W=y!==void 0,H={status:_,fetchStatus:l.fetchStatus,isPending:O,isSuccess:_==="success",isError:F,isInitialLoading:L,isLoading:L,data:y,dataUpdatedAt:l.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:R,isRefetching:R&&!O,isLoadingError:F&&!W,isPaused:l.fetchStatus==="paused",isPlaceholderData:T,isRefetchError:F&&W,isStale:ur(e,r),refetch:this.refetch,promise:a(this,ie),isEnabled:I(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let Q=H.data!==void 0,B=H.status==="error"&&!Q,yt=ht=>{B?ht.reject(H.error):Q&&ht.resolve(H.data)},Rr=()=>{let ht=h(this,ie,H.promise=rt());yt(ht)},dt=a(this,ie);switch(dt.status){case"pending":e.queryHash===n.queryHash&&yt(dt);break;case"fulfilled":(B||H.data!==dt.value)&&Rr();break;case"rejected":(!B||H.error!==dt.reason)&&Rr();break}}return H}updateResult(){let e=a(this,N),r=this.createResult(a(this,w),this.options);if(h(this,we,a(this,w).state),h(this,Ge,this.options),a(this,we).data!==void 0&&h(this,He,a(this,w)),Ct(r,e))return;h(this,N,r);let n=()=>{if(!e)return!0;let{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!a(this,Be).size)return!0;let u=new Set(s??a(this,Be));return this.options.throwOnError&&u.add("error"),Object.keys(a(this,N)).some(p=>{let f=p;return a(this,N)[f]!==e[f]&&u.has(f)})};E(this,C,uo).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&E(this,C,rr).call(this)}},V=new WeakMap,w=new WeakMap,st=new WeakMap,N=new WeakMap,we=new WeakMap,Ge=new WeakMap,ie=new WeakMap,fe=new WeakMap,it=new WeakMap,je=new WeakMap,He=new WeakMap,Ce=new WeakMap,Pe=new WeakMap,ye=new WeakMap,Be=new WeakMap,C=new WeakSet,nt=function(e){E(this,C,sr).call(this);let r=a(this,w).fetch(this.options,e);return e?.throwOnError||(r=r.catch(D)),r},Zt=function(){E(this,C,or).call(this);let e=z(this.options.staleTime,a(this,w));if(ee.isServer()||a(this,N).isStale||!Ze(e))return;let n=Rt(a(this,N).dataUpdatedAt,e)+1;h(this,Ce,Z.setTimeout(()=>{a(this,N).isStale||this.updateResult()},n))},er=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(a(this,w)):this.options.refetchInterval)??!1},tr=function(e){E(this,C,nr).call(this),h(this,ye,e),!(ee.isServer()||I(this.options.enabled,a(this,w))===!1||!Ze(a(this,ye))||a(this,ye)===0)&&h(this,Pe,Z.setInterval(()=>{(this.options.refetchIntervalInBackground||Se.isFocused())&&E(this,C,nt).call(this)},a(this,ye)))},rr=function(){E(this,C,Zt).call(this),E(this,C,tr).call(this,E(this,C,er).call(this))},or=function(){a(this,Ce)!==void 0&&(Z.clearTimeout(a(this,Ce)),h(this,Ce,void 0))},nr=function(){a(this,Pe)!==void 0&&(Z.clearInterval(a(this,Pe)),h(this,Pe,void 0))},sr=function(){let e=a(this,V).getQueryCache().build(a(this,V),this.options);if(e===a(this,w))return;let r=a(this,w);h(this,w,e),h(this,st,e.state),this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))},uo=function(e){A.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(a(this,N))}),a(this,V).getQueryCache().notify({query:a(this,w),type:"observerResultsUpdated"})})},ao);function Sn(t,e){return I(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&I(e.retryOnMount,t)===!1)}function so(t,e){return Sn(t,e)||t.state.data!==void 0&&ir(t,e,e.refetchOnMount)}function ir(t,e,r){if(I(e.enabled,t)!==!1&&z(e.staleTime,t)!=="static"){let n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&ur(t,e)}return!1}function io(t,e,r,n){return(t!==e||I(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&ur(t,r)}function ur(t,e){return I(e.enabled,t)!==!1&&t.isStaleByTime(z(e.staleTime,t))}function Un(t,e){return!Ct(t.getCurrentResult(),e)}var at,te,k,Ae,re,de,lo,po=(lo=class extends Qt{constructor(e){super();g(this,re);g(this,at);g(this,te);g(this,k);g(this,Ae);h(this,at,e.client),this.mutationId=e.mutationId,h(this,k,e.mutationCache),h(this,te,[]),this.state=e.state||kn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){a(this,te).includes(e)||(a(this,te).push(e),this.clearGcTimeout(),a(this,k).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){h(this,te,a(this,te).filter(r=>r!==e)),this.scheduleGc(),a(this,k).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){a(this,te).length||(this.state.status==="pending"?this.scheduleGc():a(this,k).remove(this))}continue(){return a(this,Ae)?.continue()??this.execute(this.state.variables)}async execute(e){let r=()=>{E(this,re,de).call(this,{type:"continue"})},n={client:a(this,at),meta:this.options.meta,mutationKey:this.options.mutationKey};h(this,Ae,qt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(u,p)=>{E(this,re,de).call(this,{type:"failed",failureCount:u,error:p})},onPause:()=>{E(this,re,de).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>a(this,k).canRun(this)}));let i=this.state.status==="pending",s=!a(this,Ae).canStart();try{if(i)r();else{E(this,re,de).call(this,{type:"pending",variables:e,isPaused:s}),a(this,k).config.onMutate&&await a(this,k).config.onMutate(e,this,n);let p=await this.options.onMutate?.(e,n);p!==this.state.context&&E(this,re,de).call(this,{type:"pending",context:p,variables:e,isPaused:s})}let u=await a(this,Ae).start();return await a(this,k).config.onSuccess?.(u,e,this.state.context,this,n),await this.options.onSuccess?.(u,e,this.state.context,n),await a(this,k).config.onSettled?.(u,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(u,null,e,this.state.context,n),E(this,re,de).call(this,{type:"success",data:u}),u}catch(u){try{await a(this,k).config.onError?.(u,e,this.state.context,this,n)}catch(p){Promise.reject(p)}try{await this.options.onError?.(u,e,this.state.context,n)}catch(p){Promise.reject(p)}try{await a(this,k).config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,n)}catch(p){Promise.reject(p)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,n)}catch(p){Promise.reject(p)}throw E(this,re,de).call(this,{type:"error",error:u}),u}finally{a(this,k).runNext(this)}}},at=new WeakMap,te=new WeakMap,k=new WeakMap,Ae=new WeakMap,re=new WeakSet,de=function(e){let r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),A.batch(()=>{a(this,te).forEach(n=>{n.onMutationUpdate(e)}),a(this,k).notify({mutation:this,type:"updated",action:e})})},lo);function kn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ae,X,ut,co,fo=(co=class extends Y{constructor(e={}){super();g(this,ae);g(this,X);g(this,ut);this.config=e,h(this,ae,new Set),h(this,X,new Map),h(this,ut,0)}build(e,r,n){let i=new po({client:e,mutationCache:this,mutationId:++Ye(this,ut)._,options:e.defaultMutationOptions(r),state:n});return this.add(i),i}add(e){a(this,ae).add(e);let r=Ot(e);if(typeof r=="string"){let n=a(this,X).get(r);n?n.push(e):a(this,X).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(a(this,ae).delete(e)){let r=Ot(e);if(typeof r=="string"){let n=a(this,X).get(r);if(n)if(n.length>1){let i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&a(this,X).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){let r=Ot(e);if(typeof r=="string"){let i=a(this,X).get(r)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){let r=Ot(e);return typeof r=="string"?a(this,X).get(r)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){A.batch(()=>{a(this,ae).forEach(e=>{this.notify({type:"removed",mutation:e})}),a(this,ae).clear(),a(this,X).clear()})}getAll(){return Array.from(a(this,ae))}find(e){let r={exact:!0,...e};return this.getAll().find(n=>wt(r,n))}findAll(e={}){return this.getAll().filter(r=>wt(e,r))}notify(e){A.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){let e=this.getAll().filter(r=>r.state.isPaused);return A.batch(()=>Promise.all(e.map(r=>r.continue().catch(D))))}},ae=new WeakMap,X=new WeakMap,ut=new WeakMap,co);function Ot(t){return t.options.scope?.id}var oe,yo,ho=(yo=class extends Y{constructor(e={}){super();g(this,oe);this.config=e,h(this,oe,new Map)}build(e,r,n){let i=r.queryKey,s=r.queryHash??et(i,r),u=this.get(s);return u||(u=new oo({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){a(this,oe).has(e.queryHash)||(a(this,oe).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let r=a(this,oe).get(e.queryHash);r&&(e.destroy(),r===e&&a(this,oe).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){A.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return a(this,oe).get(e)}getAll(){return[...a(this,oe).values()]}find(e){let r={exact:!0,...e};return this.getAll().find(n=>Et(r,n))}findAll(e={}){let r=this.getAll();return Object.keys(e).length>0?r.filter(n=>Et(e,n)):r}notify(e){A.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){A.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oe=new WeakMap,yo);var M,he,me,Je,$e,Te,We,ze,mo,lr=(mo=class{constructor(t={}){g(this,M);g(this,he);g(this,me);g(this,Je);g(this,$e);g(this,Te);g(this,We);g(this,ze);h(this,M,t.queryCache||new ho),h(this,he,t.mutationCache||new fo),h(this,me,t.defaultOptions||{}),h(this,Je,new Map),h(this,$e,new Map),h(this,Te,0)}mount(){Ye(this,Te)._++,a(this,Te)===1&&(h(this,We,Se.subscribe(async t=>{t&&(await this.resumePausedMutations(),a(this,M).onFocus())})),h(this,ze,Ie.subscribe(async t=>{t&&(await this.resumePausedMutations(),a(this,M).onOnline())})))}unmount(){var t,e;Ye(this,Te)._--,a(this,Te)===0&&((t=a(this,We))==null||t.call(this),h(this,We,void 0),(e=a(this,ze))==null||e.call(this),h(this,ze,void 0))}isFetching(t){return a(this,M).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return a(this,he).findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return a(this,M).get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),r=a(this,M).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(z(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return a(this,M).findAll(t).map(({queryKey:e,state:r})=>{let n=r.data;return[e,n]})}setQueryData(t,e,r){let n=this.defaultQueryOptions({queryKey:t}),s=a(this,M).get(n.queryHash)?.state.data,u=jr(e,s);if(u!==void 0)return a(this,M).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(t,e,r){return A.batch(()=>a(this,M).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return a(this,M).get(e.queryHash)?.state}removeQueries(t){let e=a(this,M);A.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){let r=a(this,M);return A.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let r={revert:!0,...e},n=A.batch(()=>a(this,M).findAll(t).map(i=>i.cancel(r)));return Promise.all(n).then(D).catch(D)}invalidateQueries(t,e={}){return A.batch(()=>(a(this,M).findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){let r={...e,cancelRefetch:e.cancelRefetch??!0},n=A.batch(()=>a(this,M).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(D)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(D)}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let r=a(this,M).build(this,e);return r.isStaleByTime(z(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(D).catch(D)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(D).catch(D)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Ie.isOnline()?a(this,he).resumePausedMutations():Promise.resolve()}getQueryCache(){return a(this,M)}getMutationCache(){return a(this,he)}getDefaultOptions(){return a(this,me)}setDefaultOptions(t){h(this,me,t)}setQueryDefaults(t,e){a(this,Je).set(_e(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...a(this,Je).values()],r={};return e.forEach(n=>{ve(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){a(this,$e).set(_e(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...a(this,$e).values()],r={};return e.forEach(n=>{ve(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;let e={...a(this,me).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=et(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ue&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...a(this,me).mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){a(this,M).clear(),a(this,he).clear()}},M=new WeakMap,he=new WeakMap,me=new WeakMap,Je=new WeakMap,$e=new WeakMap,Te=new WeakMap,We=new WeakMap,ze=new WeakMap,mo);var qe,q,pr,To,lt=0,wo=[],K=P,go=K.__b,_o=K.__r,vo=K.diffed,xo=K.__c,bo=K.unmount,Ro=K.__;function pt(t,e){K.__h&&K.__h(q,t,lt||e),lt=0;var r=q.__H||(q.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function Qe(t){return lt=1,Ln(Ao,t)}function Ln(t,e,r){var n=pt(qe++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):Ao(void 0,e),function(p){var f=n.__N?n.__N[0]:n.__[0],c=n.t(f,p);f!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=q,!q.__f)){var i=function(p,f,c){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(T){return T.__c});if(d.every(function(T){return!T.__N}))return!s||s.call(this,p,f,c);var l=n.__c.props!==p;return d.some(function(T){if(T.__N){var y=T.__[0];T.__=T.__N,T.__N=void 0,y!==T.__[0]&&(l=!0)}}),s&&s.call(this,p,f,c)||l};q.__f=!0;var s=q.shouldComponentUpdate,u=q.componentWillUpdate;q.componentWillUpdate=function(p,f,c){if(this.__e){var d=s;s=void 0,i(p,f,c),s=d}u&&u.call(this,p,f,c)},q.shouldComponentUpdate=i}return n.__N||n.__}function $(t,e){var r=pt(qe++,3);!K.__s&&fr(r.__H,e)&&(r.__=t,r.u=e,q.__H.__h.push(r))}function Kt(t,e){var r=pt(qe++,4);!K.__s&&fr(r.__H,e)&&(r.__=t,r.u=e,q.__h.push(r))}function Oe(t){return lt=5,Co(function(){return{current:t}},[])}function Co(t,e){var r=pt(qe++,7);return fr(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Po(t,e){return lt=8,Co(function(){return t},e)}function Xe(t){var e=q.context[t.__c],r=pt(qe++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(q)),e.props.value):t.__}function In(){for(var t;t=wo.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Mt),e.__h.some(cr),e.__h=[]}catch(r){e.__h=[],K.__e(r,t.__v)}}}K.__b=function(t){q=null,go&&go(t)},K.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ro&&Ro(t,e)},K.__r=function(t){_o&&_o(t),qe=0;var e=(q=t.__c).__H;e&&(pr===q?(e.__h=[],q.__h=[],e.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.some(Mt),e.__h.some(cr),e.__h=[],qe=0)),pr=q},K.diffed=function(t){vo&&vo(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(wo.push(e)!==1&&To===K.requestAnimationFrame||((To=K.requestAnimationFrame)||Nn)(In)),e.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),pr=q=null},K.__c=function(t,e){e.some(function(r){try{r.__h.some(Mt),r.__h=r.__h.filter(function(n){return!n.__||cr(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],K.__e(n,r.__v)}}),xo&&xo(t,e)},K.unmount=function(t){bo&&bo(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.some(function(n){try{Mt(n)}catch(i){e=i}}),r.__H=void 0,e&&K.__e(e,r.__v))};var Eo=typeof requestAnimationFrame=="function";function Nn(t){var e,r=function(){clearTimeout(n),Eo&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);Eo&&(e=requestAnimationFrame(r))}function Mt(t){var e=q,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),q=e}function cr(t){var e=q;t.__c=t.__(),q=e}function fr(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Ao(t,e){return typeof e=="function"?e(t):e}var qo=De(!1),Qo=()=>Xe(qo),la=qo.Provider;var Vn=0;function o(t,e,r,n,i,s){e||(e={});var u,p,f=e;if("ref"in f)for(p in f={},e)p=="ref"?u=e[p]:f[p]=e[p];var c={type:t,props:f,key:r,ref:u,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vn,__i:-1,__u:0,__source:i,__self:s};if(typeof t=="function"&&(u=t.defaultProps))for(p in u)f[p]===void 0&&(f[p]=u[p]);return P.vnode&&P.vnode(c),c}var yr=De(void 0),dr=t=>{let e=Xe(yr);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hr=({client:t,children:e})=>($(()=>(t.mount(),()=>{t.unmount()}),[t]),o(yr.Provider,{value:t,children:e}));function Gn(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var jn=De(Gn()),Oo=()=>Xe(jn);var Mo=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},Ko=t=>{$(()=>{t.clearReset()},[t])},Do=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||zt(r,[t.error,n]));var Fo=t=>{if(t.suspense){let r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},So=(t,e)=>t.isLoading&&t.isFetching&&!e,Uo=(t,e)=>t?.suspense&&e.isPending,mr=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function ko(t,e){let r=e(),[{_instance:n},i]=Qe({_instance:{_value:r,_getSnapshot:e}});return Kt(()=>{n._value=r,n._getSnapshot=e,Tr(n)&&i({_instance:n})},[t,r,e]),$(()=>(Tr(n)&&i({_instance:n}),t(()=>{Tr(n)&&i({_instance:n})})),[t]),r}function Tr(t){let e=t._getSnapshot,r=t._value;try{let n=e();return!Object.is(r,n)}catch{return!0}}function Lo(t,e,r){let n=Qo(),i=Oo(),s=dr(r),u=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=n?"isRestoring":"optimistic",Fo(u),Mo(u,i),Ko(i);let p=!s.getQueryCache().get(u.queryHash),[f]=Qe(()=>new e(s,u)),c=f.getOptimisticResult(u),d=!n&&t.subscribed!==!1;if(ko(Po(l=>{let T=d?f.subscribe(A.batchCalls(l)):D;return f.updateResult(),T},[f,d]),()=>f.getCurrentResult()),$(()=>{f.setOptions(u)},[u,f]),Uo(u,c))throw mr(u,f,i);if(Do({result:c,errorResetBoundary:i,throwOnError:u.throwOnError,query:s.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw c.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(u,c),u.experimental_prefetchInRender&&!ee.isServer()&&So(c,n)&&(p?mr(u,f,i):s.getQueryCache().get(u.queryHash)?.promise)?.catch(D).finally(()=>{f.updateResult()}),u.notifyOnChangeProps?c:f.trackResult(c)}function Dt(t,e){return Lo(t,ar,e)}function U({children:t,panel:e,href:r,className:n,panelLarge:i}){let[s,u]=Qe(!1),p=Oe(null),f=Oe(null),c=Oe(null),d=()=>{c.current&&(clearTimeout(c.current),c.current=null),f.current=setTimeout(()=>u(!0),100)},l=()=>{f.current&&(clearTimeout(f.current),f.current=null),c.current=setTimeout(()=>u(!1),150)};Kt(()=>{if(s&&p.current){let m=p.current;m.style.left="50%",m.style.right="auto",m.style.transform="translateX(-50%)";let x=m.getBoundingClientRect();x.left<8?(m.style.left="0",m.style.transform="none"):x.right>window.innerWidth-8&&(m.style.left="auto",m.style.right="0",m.style.transform="none")}},[s]);let T=["profiler-toolbar-item",e?"profiler-toolbar-hoverable":"",n||""].filter(Boolean).join(" "),y=e?o("div",{ref:p,class:`profiler-toolbar-panel${i?" profiler-toolbar-panel-large":""}${s?" is-visible":""}`,onMouseEnter:d,onMouseLeave:l,children:e}):null;return r?o("a",{href:r,class:T,onMouseEnter:d,onMouseLeave:l,children:[t,y]}):o("span",{class:T,onMouseEnter:d,onMouseLeave:l,children:[t,y]})}function Hn(t){return t>=200&&t<300?"profiler-text--success":t>=300&&t<400?"profiler-text--warning":t>=400?"profiler-text--error":""}function Io({profile:t,requestData:e}){let r=Hn(t.status),n=e.controller_action,i=e.route_name,s=e.route_pattern,u=e.route_params;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Request & Response",o("span",{class:"profiler-float-right",children:t.path})]}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-section__header",children:"Request"}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Method"}),o("strong",{class:"profiler-text--accent",children:t.method})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Path"}),o("strong",{children:t.path})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Status"}),o("strong",{class:r,children:t.status})]}),n&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Controller#Action"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:n})]}),i&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Route Name"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:i})]}),s&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Route Pattern"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:s})]}),u&&Object.keys(u).length>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Route Params"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:Object.entries(u).map(([p,f])=>`${p}: ${f}`).join(", ")})]}),t.params&&Object.keys(t.params).length>0&&o(b,{children:[o("div",{class:"profiler-section__header profiler-mt-3",children:"Parameters"}),Object.entries(t.params).map(([p,f])=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs profiler-text--mono",children:p}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:String(f).substring(0,40)})]},p))]})]})]})}function No({dbData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Database",o("span",{class:"profiler-float-right",children:[t.total_queries," queries \xB7 ",t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.queries.slice(0,10).map((e,r)=>o("div",{class:`profiler-toolbar-panel-query${e.slow?" profiler-toolbar-panel-query-slow":""}`,children:[o("div",{class:"profiler-flex profiler-flex--between profiler-mb-1",children:[o("span",{class:"profiler-text--xs profiler-text--muted",children:["#",r+1," ",e.name]}),o("span",{class:`${e.slow?"profiler-text--error":"profiler-text--success"} profiler-text--xs`,children:[e.duration.toFixed(2)," ms"]})]}),o("code",{children:e.sql})]},r)),t.total_queries>10&&o("div",{class:"profiler-more",children:["+ ",t.total_queries-10," more queries"]})]})]})}function Bn(t){return{GET:"badge-info",POST:"badge-success",PUT:"badge-warning",PATCH:"badge-warning",DELETE:"badge-error"}[t]||""}var Jn={frame:"Turbo Frame request",stream:"Turbo Stream response"};function Vo({ajaxData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["AJAX",o("span",{class:"profiler-float-right",children:[t.total_requests," requests \xB7 ",t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.requests.slice(0,10).map((e,r)=>{let n=e.status>=200&&e.status<300?"profiler-ajax-card--success":"profiler-ajax-card--error";return o("div",{class:`profiler-ajax-card ${n}`,children:o("div",{class:"profiler-ajax-card__row",children:[o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`badge ${Bn(e.method)}`,children:e.method}),e.turbo&&o("span",{class:"badge badge-default",title:Jn[e.turbo],children:e.turbo.toUpperCase()}),o("span",{class:"profiler-text--xs profiler-text--truncate",children:e.path})]}),o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`profiler-text--xs ${e.status>=200&&e.status<300?"profiler-text--success":"profiler-text--error"}`,children:e.status}),o("span",{class:"profiler-text--xs profiler-text--muted",children:[e.duration.toFixed(2)," ms"]})]})]})},r)}),t.total_requests>10&&o("div",{class:"profiler-more",children:["+ ",t.total_requests-10," more"]})]})]})}function Go({perfData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:"Events"}),o("div",{class:"profiler-toolbar-panel-content",children:t.events.slice(0,8).map((e,r)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs",children:e.name}),o("strong",{class:"profiler-text--accent",children:[e.duration.toFixed(2)," ms"]})]},r))})]})}function jo({viewData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Views",o("span",{class:"profiler-float-right",children:[t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.views&&t.views.length>0&&o(b,{children:[o("div",{class:"profiler-section__header",children:"Templates"}),t.views.map((e,r)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs",children:e.identifier}),o("strong",{class:"profiler-text--success",children:[e.duration.toFixed(2)," ms"]})]},r))]}),t.partials&&t.partials.length>0&&o(b,{children:[o("div",{class:"profiler-section__header profiler-mt-3",children:"Partials"}),t.partials.map((e,r)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs",children:e.identifier}),o("strong",{class:"profiler-text--success",children:[e.duration.toFixed(2)," ms"]})]},r))]})]})]})}function Ho({cacheData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Cache",o("span",{class:"profiler-float-right",children:["Hit rate: ",t.hit_rate,"%"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Reads"}),o("strong",{children:t.total_reads})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Writes"}),o("strong",{children:t.total_writes})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Hits"}),o("strong",{class:"profiler-text--success",children:t.hits})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Misses"}),o("strong",{class:"profiler-text--error",children:t.misses})]})]})]})}var $n="profiler-active-slave",Wn=(()=>{try{let t=sessionStorage.getItem($n);return t?`/slaves/${t}`:""}catch{return""}})();function Bo(){return Wn}var zn=["/_profiler/api/cluster/","/_profiler/api/toolbar/","/_profiler/api/events/"];function Xn(t){return zn.some(e=>t.startsWith(e))}async function ct(t){let e=Xn(t.url)?"":Bo(),r=e?t.url.replace("/_profiler/api",`/_profiler/api${e}`):t.url,{method:n,params:i,data:s,headers:u={},signal:p}=t,f=r,c=i?"?"+new URLSearchParams(Object.entries(i).map(([y,m])=>[y,String(m)])).toString():"",d={"X-Profiler-Request":"1",...u},l=await fetch(f+c,{method:n,signal:p,headers:s!==void 0?{"Content-Type":"application/json",...d}:d,body:s!==void 0?JSON.stringify(s):void 0});if(l.status===204)return{};if(!l.ok){let y;try{y=await l.json()}catch{y={}}throw Object.assign(new Error(y?.error??`HTTP ${l.status}`),{status:l.status,data:y})}return await l.json()}var Jo=(t,e)=>{let r={queryKey:e};for(let n of Object.keys(t))n!=="queryKey"&&Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:()=>t[n]});return r};var Yn=t=>ct({url:"/_profiler/api/config",method:"GET",signal:t}),gr=()=>["/_profiler/api/config"],Zn=t=>{let{query:e}=t??{};return{queryKey:e?.queryKey??gr(),queryFn:({signal:i})=>Yn(i),...e}};function $o(t){let e=Zn(t),r=Dt(e);return Jo(r,e.queryKey)}var es=(t,e)=>ct({url:`/_profiler/api/toolbar/${t}`,method:"GET",signal:e}),ts=t=>[`/_profiler/api/toolbar/${t}`],rs=(t,e)=>{let{query:r}=e??{};return{queryKey:r?.queryKey??ts(t),queryFn:({signal:s})=>es(t,s),enabled:t!=null,...r}};function Wo(t,e){let r=rs(t,e),n=Dt(r);return Jo(n,r.queryKey)}function zo(){let{data:t,isError:e}=$o({query:{queryKey:gr(),staleTime:1/0,retry:!1}});return t?{scheme:t.editor_url_scheme,pathMap:t.editor_path_map}:e?{scheme:"vscode",pathMap:{}}:{scheme:null,pathMap:{}}}var os=["vscode","idea","cursor"];function ns(t){return typeof t=="string"&&os.includes(t)}var ss=/^[A-Za-z]:\//;function ft(t){return t.replace(/\\/g,"/")}function is(t,e){if(!e)return t;let r=null;for(let s of Object.keys(e)){let u=ft(s).replace(/\/+$/,"");(t===u||t.startsWith(u+"/"))&&(r===null||u.length>ft(r).replace(/\/+$/,"").length)&&(r=s)}if(r===null)return t;let n=ft(r).replace(/\/+$/,"");return ft(String(e[r])).replace(/\/+$/,"")+t.slice(n.length)}function as(t){return t.startsWith("/")||ss.test(t)}function us(t){return(t.startsWith("/")?t:"/"+t).split("/").map((r,n)=>n===1&&/^[A-Za-z]:$/.test(r)?r:encodeURIComponent(r)).join("/")}function Xo(t,e,r){let{scheme:n,pathMap:i}=r;if(!ns(n)||!Number.isInteger(e)||e<1||typeof t!="string"||t===""||t.includes("\0"))return null;let s=is(ft(t),i);return as(s)?n==="idea"?`idea://open?file=${encodeURIComponent(s)}&line=${e}`:`${n}://file${us(s)}:${e}`:null}function Yo({file:t,line:e,children:r,class:n}){let i=zo(),s=r??`${t}:${e}`,u=Xo(t,e,i);return u?o("a",{href:u,class:n,title:`Open ${t}:${e} in your editor`,rel:"noopener noreferrer","data-source-link":"",onClick:p=>p.stopPropagation(),children:s}):o("span",{class:n,children:s})}function Zo({dumpData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Dumps (",t.count,")"]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.dumps.slice(0,5).map((e,r)=>o("div",{class:"profiler-dump-card",children:[o("div",{class:"profiler-dump-card__header",children:[o("span",{class:"profiler-text--xs profiler-text--muted",children:["#",r+1,e.label&&o(b,{children:[" \xB7 ",o("strong",{class:"profiler-text--warning",children:e.label})]})]}),o("span",{class:"profiler-text--xs profiler-text--muted",children:o(Yo,{file:e.file,line:e.line,children:[e.file.split("/").pop(),":",e.line]})})]}),o("pre",{class:"profiler-text--xs profiler-text--truncate profiler-text--warning",style:{margin:0,background:"none",border:"none",padding:0},children:(e.formatted.split(`
|
|
2
|
+
`)[0]||e.formatted).trim()})]},r)),t.count>5&&o("div",{class:"profiler-more",children:["+ ",t.count-5," more dumps"]})]})]})}function ls(t){return{GET:"badge-info",POST:"badge-success",PUT:"badge-warning",PATCH:"badge-warning",DELETE:"badge-error"}[t]||""}function en({httpData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Outbound HTTP",o("span",{class:"profiler-float-right",children:[t.total_requests," requests \xB7 ",t.total_duration.toFixed(2)," ms"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.requests.slice(0,10).map((r,n)=>{let i=r.status>=400||r.status===0,s=r.duration>=500,u=i?"profiler-ajax-card--error":s?"profiler-ajax-card--warning":"profiler-ajax-card--success",p=(()=>{try{return new URL(r.url).host}catch{return r.url}})();return o("div",{class:`profiler-ajax-card ${u}`,children:o("div",{class:"profiler-ajax-card__row",children:[o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`badge ${ls(r.method)}`,children:r.method}),o("span",{class:"profiler-text--xs profiler-text--truncate",children:p})]}),o("div",{class:"profiler-flex profiler-flex--gap-2",children:[o("span",{class:`profiler-text--xs ${i?"profiler-text--error":"profiler-text--success"}`,children:r.status===0?"ERR":r.status}),o("span",{class:`profiler-text--xs ${s?"profiler-text--error":"profiler-text--muted"}`,children:[r.duration.toFixed(2)," ms"]})]})]})},n)}),t.total_requests>10&&o("div",{class:"profiler-more",children:["+ ",t.total_requests-10," more"]})]})]})}function ps(t){switch(t){case"ERROR":case"FATAL":return"var(--profiler-error, #ef4444)";case"WARN":return"var(--profiler-warning, #f59e0b)";case"INFO":return"var(--profiler-success, #22c55e)";default:return"var(--profiler-muted, #6b7280)"}}function tn({logData:t}){let e=t.logs.slice(-5).reverse();return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Logs (",t.count,")",t.errors>0&&o("span",{style:"color:var(--profiler-error,#ef4444);margin-left:8px;",children:[t.errors," error",t.errors!==1?"s":""]}),t.warnings>0&&t.errors===0&&o("span",{style:"color:var(--profiler-warning,#f59e0b);margin-left:8px;",children:[t.warnings," warning",t.warnings!==1?"s":""]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[e.map((r,n)=>o("div",{class:"profiler-toolbar-panel-row",style:"align-items:flex-start;gap:6px;",children:[o("span",{class:"profiler-text--xs",style:`color:${ps(r.level)};font-weight:600;min-width:40px;`,children:r.level}),o("span",{class:"profiler-text--xs profiler-text--truncate",style:"flex:1;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",children:r.message})]},n)),t.count>5&&o("div",{class:"profiler-more",children:["+ ",t.count-5," more messages"]})]})]})}function rn({exceptionData:t}){let e=t.backtrace?.find(r=>r.app_frame);return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",style:"color:var(--profiler-error,#ef4444);",children:["\u{1F4A5} ",t.exception_class]}),o("div",{class:"profiler-toolbar-panel-content",children:o("div",{class:"profiler-toolbar-panel-row",style:"flex-direction:column;align-items:flex-start;gap:4px;",children:[o("span",{class:"profiler-text--xs",style:"max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",children:t.message}),e&&o("span",{class:"profiler-text--xs profiler-text--muted",style:"max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",children:e.location})]})})]})}function on({routesData:t}){let{total:e,matched:r}=t;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Routes",o("span",{class:"profiler-float-right",children:[e," routes"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:r?o(b,{children:[o("div",{class:"profiler-section__header",children:"Matched Route"}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Pattern"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:r.pattern})]}),r.name&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Name"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:[r.name,"_path"]})]}),r.controller_action&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Controller#Action"}),o("strong",{class:"profiler-text--xs profiler-text--mono",children:r.controller_action})]})]}):o("div",{class:"profiler-toolbar-panel-row",children:o("span",{class:"profiler-text--muted",children:"No route matched"})})})]})}function nn({i18nData:t}){let e=t.lookups.filter(s=>s.missing),r=t.lookups.filter(s=>!s.missing),n=[...e,...r].slice(0,5),i=t.total-5;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["I18n",o("span",{style:"margin-left:6px;font-weight:400;color:var(--profiler-muted,#6b7280);",children:["[",t.locale,"]"]}),t.missing_count>0&&o("span",{style:"color:var(--profiler-error,#ef4444);margin-left:8px;",children:[t.missing_count," missing"]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[n.map((s,u)=>o("div",{class:"profiler-toolbar-panel-row",style:"align-items:flex-start;gap:6px;",children:[o("span",{class:"profiler-text--xs profiler-text--truncate",style:`flex:1;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;${s.missing?"color:var(--profiler-error,#ef4444);":""}`,children:s.key}),s.missing&&o("span",{class:"profiler-text--xs",style:"color:var(--profiler-error,#ef4444);font-weight:600;",children:"\u26A0"})]},u)),i>0&&o("div",{class:"profiler-more",children:["+ ",i," more keys"]})]})]})}function cs({job:t}){if(t.status==="running")return o("strong",{class:"profiler-text--xs profiler-text--mono profiler-text--info",children:[o("span",{class:"profiler-spinner","aria-hidden":"true",children:"\u25D0"})," running"]});let e=t.status==="failed";return o("strong",{class:`profiler-text--xs profiler-text--mono ${e?"profiler-text--error":"profiler-text--success"}`,children:[e?"\u2717":"\u2713"," ",t.duration?.toFixed(0),"ms"]})}function sn({jobs:t}){let e=t.filter(u=>u.status==="running").length,r=t.filter(u=>u.status==="completed").length,n=t.filter(u=>u.status==="failed").length,i=t.slice(0,5),s=t.length-5;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Background Jobs",o("span",{class:"profiler-float-right",children:[t.length," job",t.length!==1?"s":""]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-section__header",children:"Summary"}),e>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Running"}),o("strong",{class:"profiler-text--info",children:e})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Completed"}),o("strong",{class:r>0?"profiler-text--success":"profiler-text--muted",children:r})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Failed"}),o("strong",{class:n>0?"profiler-text--error":"profiler-text--muted",children:n})]}),o("div",{class:"profiler-section__header profiler-mt-3",children:"Last jobs"}),i.map((u,p)=>o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--xs profiler-text--mono",children:u.job_class}),o(cs,{job:u})]},p)),s>0&&o("div",{class:"profiler-more",children:["+ ",s," more"]})]})]})}function an({envData:t}){return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:"Environment"}),o("div",{class:"profiler-toolbar-panel-content",children:o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Variables"}),o("strong",{children:t.total})]})})]})}function un({mailerData:t}){let e=t.failed>0||t.loop_warnings.length>0;return o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:["Mailers",o("span",{class:"profiler-float-right",children:[t.total," email",t.total!==1?"s":""]})]}),o("div",{class:"profiler-toolbar-panel-content",children:[t.deliver_now>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"deliver_now"}),o("strong",{children:t.deliver_now})]}),t.deliver_later>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"deliver_later"}),o("strong",{children:t.deliver_later})]}),(t.queued_count??0)>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Queued"}),o("strong",{children:t.queued_count})]}),t.multi_part_count>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Multi-part"}),o("strong",{children:t.multi_part_count})]}),t.failed>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Errors"}),o("strong",{class:"profiler-text--error",children:t.failed})]}),t.loop_warnings.length>0&&o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{class:"profiler-text--warning",children:"\u26A0\uFE0F Loop detected"}),o("strong",{class:"profiler-text--warning",children:t.loop_warnings.length})]}),[...t.emails,...t.errors].slice(0,3).map((r,n)=>o("div",{class:"profiler-toolbar-panel-row profiler-text--sm",children:[o("span",{class:"profiler-text--muted",children:[r.mailer_class,"#",r.action]}),o("span",{class:r.error?"profiler-text--error":"profiler-text--success",children:r.error?"\u274C":"\u2705"})]},n)),t.total>3&&o("div",{class:"profiler-toolbar-panel-row profiler-text--muted profiler-text--xs",children:["+",t.total-3," more\u2026"]})]})]})}function _r(t){return t.allocated_objects!=null?t.allocated_objects:t.memory!=null?Math.round(t.memory/40):null}function ln(t){return t==null?"-":`${t.toLocaleString("en")} objects`}var pn="Objects allocated by the whole process while this ran: on a multi-threaded server, it includes what other threads allocated meanwhile.";function fs(t){return t>=200&&t<300?"profiler-text--success":t>=300&&t<400?"profiler-text--warning":t>=400?"profiler-text--error":""}function ys(t){return t<100?"profiler-text--success":t<500?"profiler-text--warning":"profiler-text--error"}function ds(t){return new Date(t).toLocaleTimeString("en",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function cn({profile:t,token:e}){let r=t.collectors_data||{},n=r.request,i=r.database,s=r.ajax,u=r.performance,p=r.view,f=r.cache,c=r.dump,d=r.http,l=r.logs,T=r.exception,y=r.routes,m=r.i18n,x=r.env,_=r.mailer,v=t.child_jobs??[],R=fs(t.status),O=ys(t.duration),F=(i?.slow_queries??0)>0?"profiler-text--error":"profiler-text--success",L=(s?.total_requests??0)>20?"profiler-text--error":"profiler-text--success",W=(f?.hit_rate??0)>80?"profiler-text--success":"profiler-text--warning";return o(b,{children:o("div",{class:"profiler-toolbar-container",children:[n&&o(b,{children:[o(U,{href:`/_profiler/profiles/${e}?tab=request`,className:R,panelLarge:!0,panel:o(Io,{profile:t,requestData:n}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:t.method}),o("span",{children:t.status})]}),o(U,{href:`/_profiler/profiles/${e}?tab=request`,className:O,panel:o(b,{children:[o("div",{class:"profiler-toolbar-panel-header",children:"Performance"}),o("div",{class:"profiler-toolbar-panel-content",children:[o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Duration"}),o("strong",{class:O,children:[t.duration.toFixed(2)," ms"]})]}),_r(t)!=null&&o("div",{class:"profiler-toolbar-panel-row",title:pn,children:[o("span",{children:"Allocations"}),o("strong",{children:ln(_r(t))})]}),o("div",{class:"profiler-toolbar-panel-row",children:[o("span",{children:"Started"}),o("strong",{children:ds(t.started_at)})]})]})]}),children:[o("span",{class:O,children:t.duration.toFixed(2)}),o("span",{class:"profiler-text--muted profiler-text--xs",children:"ms"})]})]}),i?.total_queries!==void 0&&o(U,{href:`/_profiler/profiles/${e}?tab=database`,className:F,panelLarge:!0,panel:o(No,{dbData:i}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"DB"}),o("span",{children:i.total_queries}),(i.slow_queries??0)>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u25B2 ",i.slow_queries]}),o("span",{class:"profiler-text--muted profiler-text--xs",children:[i.total_duration.toFixed(1),"ms"]})]}),s&&s.total_requests>0&&o(U,{href:`/_profiler/profiles/${e}?tab=ajax`,className:L,panelLarge:!0,panel:o(Vo,{ajaxData:s}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"XHR"}),o("span",{children:s.total_requests}),o("span",{class:"profiler-text--muted profiler-text--xs",children:[s.total_duration.toFixed(1),"ms"]})]}),u?.events&&u.total_events>0&&o(U,{href:`/_profiler/profiles/${e}?tab=timeline`,panel:o(Go,{perfData:u}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"EVT"}),o("span",{children:u.total_events})]}),p?.total_views!==void 0&&o(U,{href:`/_profiler/profiles/${e}?tab=views`,panel:o(jo,{viewData:p}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"VIEW"}),o("span",{children:p.total_views}),p.total_partials>0&&o("span",{class:"profiler-text--muted profiler-text--xs",children:["+",p.total_partials,"p"]})]}),f&&f.total_reads>0&&o(U,{href:`/_profiler/profiles/${e}?tab=cache`,className:W,panel:o(Ho,{cacheData:f}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"CACHE"}),o("span",{class:W,children:[f.hit_rate,"%"]})]}),d&&d.total_requests>0&&o(U,{href:`/_profiler/profiles/${e}?tab=http`,className:d.error_requests>0||d.slow_requests>0?"profiler-text--error":"profiler-text--success",panelLarge:!0,panel:o(en,{httpData:d}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"HTTP"}),o("span",{children:d.total_requests}),d.slow_requests>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u25B2 ",d.slow_requests]}),o("span",{class:"profiler-text--muted profiler-text--xs",children:[d.total_duration.toFixed(1),"ms"]})]}),c&&c.count>0&&o(U,{href:`/_profiler/profiles/${e}?tab=dump`,className:"profiler-text--warning",panelLarge:!0,panel:o(Zo,{dumpData:c}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"DUMP"}),o("span",{class:"profiler-text--warning",children:c.count})]}),l&&l.count>0&&o(U,{href:`/_profiler/profiles/${e}?tab=logs`,className:l.errors>0?"profiler-text--error":l.warnings>0?"profiler-text--warning":"profiler-text--muted",panelLarge:!0,panel:o(tn,{logData:l}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"LOG"}),o("span",{class:l.errors>0?"profiler-text--error":l.warnings>0?"profiler-text--warning":"",children:l.errors>0?l.errors:l.warnings>0?l.warnings:l.count})]}),T&&T.exception_class&&o(U,{href:`/_profiler/profiles/${e}?tab=exception`,className:"profiler-text--error",panelLarge:!0,panel:o(rn,{exceptionData:T}),children:[o("span",{class:"profiler-text--error profiler-text--xs",children:"\u{1F4A5}"}),o("span",{class:"profiler-text--error profiler-text--xs",children:T.exception_class.split("::").pop()})]}),y&&y.total>0&&o(U,{href:`/_profiler/profiles/${e}?tab=routes`,panelLarge:!0,panel:o(on,{routesData:y}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"ROUTE"}),o("span",{class:"profiler-text--xs profiler-text--mono",children:y.matched?.pattern??"-"})]}),m&&m.total>0&&o(U,{href:`/_profiler/profiles/${e}?tab=i18n`,className:m.missing_count>0?"profiler-text--error":"profiler-text--muted",panel:o(nn,{i18nData:m}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"I18N"}),o("span",{class:"profiler-text--xs profiler-text--mono",children:m.locale}),m.missing_count>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u26A0 ",m.missing_count]})]}),v.length>0&&o(U,{href:`/_profiler/profiles/${e}?tab=jobs`,className:v.some(G=>G.status==="failed")?"profiler-text--error":v.some(G=>G.status==="running")?"profiler-text--info":"profiler-text--success",panelLarge:!0,panel:o(sn,{jobs:v}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"JOB"}),o("span",{children:v.length}),v.some(G=>G.status==="failed")&&o("span",{class:"profiler-text--error profiler-text--xs",children:"\u2717"}),v.some(G=>G.status==="running")&&o("span",{class:"profiler-spinner profiler-text--info profiler-text--xs","aria-hidden":"true",children:"\u25D0"})]}),_&&(_.total>0||(_.queued_count??0)>0)&&o(U,{href:`/_profiler/profiles/${e}?tab=mailer`,className:_.failed>0?"profiler-text--error":"profiler-text--success",panelLarge:!0,panel:o(un,{mailerData:_}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"MAIL"}),_.total>0&&o("span",{children:_.total}),_.total===0&&(_.queued_count??0)>0&&o("span",{class:"profiler-text--muted",children:[_.queued_count,"q"]}),_.total>0&&(_.queued_count??0)>0&&o("span",{class:"profiler-text--muted profiler-text--xs",children:["+",_.queued_count,"q"]}),_.failed>0&&o("span",{class:"profiler-text--error profiler-text--xs",children:["\u25B2 ",_.failed]})]}),x&&x.total>0&&o(U,{href:`/_profiler/profiles/${e}?tab=env`,panel:o(an,{envData:x}),children:[o("span",{class:"profiler-text--muted profiler-text--xs",children:"ENV"}),o("span",{class:"profiler-text--muted",children:x.total})]}),o("a",{href:"/_profiler/health",class:"profiler-toolbar-item",children:"Health"}),o("a",{href:"/_profiler",class:"profiler-toolbar-item profiler-toolbar-logo",children:[o("svg",{class:"profiler-toolbar-logo-mark",viewBox:"24 32 80 64",width:"16",height:"13","aria-hidden":"true",focusable:"false",children:o("g",{fill:"currentColor",children:[o("rect",{x:"24",y:"32",width:"80",height:"16"}),o("rect",{x:"32",y:"56",width:"40",height:"16"}),o("rect",{x:"48",y:"80",width:"48",height:"16"})]})}),"Profiler"]})]})})}var fn=[1e3,1e3,2e3,2e3,4e3,4e3,8e3,8e3,15e3,15e3],hs=3e4,ms=10*6e4;function Ts(t){return typeof t=="object"&&t!==null&&Number.isFinite(t.cursor)}function yn(t){let e=t.now??(()=>Date.now()),r=t.setTimer??((m,x)=>setTimeout(m,x)),n=t.clearTimer??(m=>clearTimeout(m)),i=t.cursor,s=0,u=e(),p=null,f=!1,c=!1,d=!1,l=()=>{p!==null&&(n(p),p=null)},T=()=>{if(l(),c||f||e()-u>=ms)return;let m=s<fn.length?fn[s]:hs;s+=1,p=r(()=>{p=null,y()},m)},y=async()=>{if(!(c||d)){d=!0;try{let m=await t.check(i);if(c)return;Ts(m)&&(i=Math.max(i,m.cursor),m.updated===!0&&(s=0,u=e(),t.onUpdate()))}catch{}finally{d=!1}T()}};return T(),{pause(){f=!0,l()},resume(){c||(f=!1,l(),y())},stop(){c=!0,l()}}}var gs="/_profiler";function dn(t,e,r){let n=Oe(r);n.current=r,$(()=>{if(!t||e===void 0)return;let s=yn({cursor:e,check:p=>ct({url:`${gs}/api/events/${encodeURIComponent(t)}`,method:"GET",params:{since:p}}),onUpdate:()=>n.current()}),u=()=>{document.hidden?s.pause():s.resume()};return document.addEventListener("visibilitychange",u),document.hidden&&s.pause(),()=>{document.removeEventListener("visibilitychange",u),s.stop()}},[t,e!==void 0])}function hn({token:t}){let{data:e,refetch:r,isError:n,isFetching:i}=Wo(t,{query:{refetchOnWindowFocus:!1}});$(()=>{window.__PROFILER_REFRESH_TOOLBAR__=()=>{r()}},[r]),dn(t,e?.events_cursor,()=>{r()});let s=e?.profile??null;return s?o(cn,{profile:s,token:t}):n?o("div",{class:"profiler-toolbar-container",children:o("span",{class:"profiler-toolbar-error",role:"alert",children:[o("span",{class:"profiler-text--error",children:"Profiler data could not be loaded."}),o("button",{type:"button",class:"profiler-toolbar-retry",disabled:i,onClick:()=>{r()},children:i?"Retrying...":"Retry"})]})}):null}var Ft=class extends Me{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(r){console.error("[Profiler] The toolbar failed to render:",r)}render(){return this.state.failed?o("div",{class:"profiler-toolbar-container",children:o("span",{class:"profiler-toolbar-error",role:"alert",children:[o("span",{class:"profiler-text--error",children:"Profiler toolbar error."}),o("button",{type:"button",class:"profiler-toolbar-retry",onClick:()=>this.setState({failed:!1}),children:"Retry"})]})}):this.props.children}};function mn(t){return t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.code==="KeyP"}var vr=new Map;function xr(t){try{return localStorage.getItem(t)}catch{return vr.has(t)?vr.get(t):null}}function Tn(t,e){vr.set(t,e);try{localStorage.setItem(t,e)}catch{}}var br=280;function gn(t){let e=xr("profiler-theme"),r=e==="light"?"light":e==="dark"?"dark":window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";t.forEach(n=>n.setAttribute("data-theme",r))}var _s=new lr({defaultOptions:{queries:{staleTime:3e4,retry:1}}});function _n(){let t=document.getElementById("profiler-toolbar"),e=document.getElementById("profiler-toolbar-toggle");if(!t||!e)return;let r=t.dataset.token;if(!r)return;window.__PROFILER_TOOLBAR_TEARDOWN__?.();let n=new AbortController,{signal:i}=n,s=()=>{n.abort(),Ht(null,t),window.__PROFILER_TOOLBAR_TEARDOWN__===s&&delete window.__PROFILER_TOOLBAR_TEARDOWN__};window.__PROFILER_TOOLBAR_TEARDOWN__=s,document.addEventListener("turbo:load",()=>{t.isConnected||s()},{signal:i});let u=[t,e];gn(u),window.addEventListener("storage",c=>{c.key==="profiler-theme"&&gn(u)},{signal:i}),window.addEventListener("profiler:theme-change",(c=>{c.detail?.theme&&u.forEach(d=>d.setAttribute("data-theme",c.detail.theme))}),{signal:i});let p=xr("profiler-toolbar-collapsed")==="true";e.dataset.collapsed=String(p),p&&!t.style.transform&&(t.style.animation="none",t.style.transform="translateX(calc(100% + 44px))"),p||setTimeout(()=>{t.style.animation="none"},400);function f(){let c=!p;p=c,Tn("profiler-toolbar-collapsed",String(c)),e.dataset.collapsed=String(c),c?(t.style.transition=`transform ${br}ms cubic-bezier(0.4,0,0.2,1)`,t.style.transform="translateX(calc(100% + 44px))"):(t.style.transition="none",t.style.transform="translateX(calc(100% + 44px))",t.offsetWidth,t.style.transition=`transform ${br}ms cubic-bezier(0.4,0,0.2,1)`,t.style.transform="translateX(0)",setTimeout(()=>{t.style.transform="",t.style.transition=""},br+50))}e.addEventListener("click",f,{signal:i}),document.addEventListener("keydown",c=>{mn(c)&&(c.preventDefault(),f())},{signal:i}),Ht(o(hr,{client:_s,children:o(Ft,{children:o(hn,{token:r})})}),t)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_n):_n();})();
|