The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
import{r as di}from"../chunks/hp4PFHFv.js";import{a as Rn,c as vi}from"../chunks/h7yRWCtK.js";import"../chunks/DsnmJJEf.js";import{p as De,c as zt,f as q,s as Un,x as Xn,d as b,a as ke,j as N,k as bt,b as Qe,g as i,l as m,ac as mi,e as B,h as V,m as $,n as $t,r as z,o as ct,u as k,i as pi,v as gi,aa as bn,q as yt,t as Ot,y as _i,z as yi}from"../chunks/BKFspo1J.js";import{i as pt}from"../chunks/COK9M2N0.js";import{e as Ce}from"../chunks/DpeZtIXD.js";import{c as ut}from"../chunks/CWm9VMfX.js";import{b as en,s as rt,a as wi}from"../chunks/DwMHXN8q.js";import{a as xi,g as bi}from"../chunks/CqMCVSVw.js";import{p as Pn,a as de,t as ir}from"../chunks/BrdmM8Kw.js";import{B as se}from"../chunks/DY5VVhnr.js";import{L as $i}from"../chunks/CN84UmjY.js";import{T as ar}from"../chunks/D63hXAj-.js";import{E as or}from"../chunks/NVaYW5lc.js";import{a as Nn,b as En,S as Fn,c as Ke}from"../chunks/XUo-32-X.js";import{r as Si}from"../chunks/UDuKBjKQ.js";import{P as Ti}from"../chunks/N0z9j_AG.js";import{P as Mi}from"../chunks/0jiPxuJt.js";import{S as Ci,a as sr}from"../chunks/DLM4tGGX.js";import{C as Ai}from"../chunks/CMTAbOXv.js";import{f as me,a as Tr,E as Di,d as ki,h as lr,i as Pi}from"../chunks/8SLJ7m_-.js";import{s as qn,r as Gn,p as xe,b as Mr}from"../chunks/CARHnQ8P.js";import{d as Me,e as ur,f as Ni,g as cr,h as fr,l as hr,j as Ei}from"../chunks/DL0LKnr3.js";import{I as Fi}from"../chunks/DGTs9ijT.js";import{I as Jn}from"../chunks/CM27iA0o.js";import{D as Ri,g as In}from"../chunks/qSFdVk7G.js";import{T as dr,b as Ii,a as Ne,c as Li}from"../chunks/v9anb0q3.js";import{T as Oi}from"../chunks/BWW_Bja4.js";import{S as zi}from"../chunks/8zLz30Kn.js";import{T as Ee}from"../chunks/D2DsoUX_.js";import{g as Hi,h as Vi,s as Bi}from"../chunks/X-i49s3k.js";import{T as Ui}from"../chunks/Dba_4Bc-.js";import{d as ae,a as oe,b as Fe,c as vr,u as Xi}from"../chunks/BYJ4QaOY.js";import{p as Re,c as fn,t as hn}from"../chunks/DbaB4N6s.js";import{G as qi}from"../chunks/BaS_DC-x.js";import{L as Gi}from"../chunks/mseZxTDV.js";import{D as Ji}from"../chunks/CcrBbJku.js";import{X as Yi}from"../chunks/BJl12sfz.js";function Zi(t,e){De(e,!0);let n=Gn(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m17 3-5 5-5-5h10"}],["path",{d:"m17 21-5-5-5 5h10"}],["path",{d:"M4 12H2"}],["path",{d:"M10 12H8"}],["path",{d:"M16 12h-2"}],["path",{d:"M22 12h-2"}]];Jn(t,qn({name:"flip-vertical-2"},()=>n,{get iconNode(){return r},children:(a,s)=>{var o=zt(),u=q(o);Un(u,()=>e.children??Xn),b(a,o)},$$slots:{default:!0}})),ke()}function Ki(t,e){De(e,!0);let n=Gn(e,["$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"5",cy:"6",r:"3"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7"}],["path",{d:"m15 9-3-3 3-3"}],["circle",{cx:"19",cy:"18",r:"3"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9"}],["path",{d:"m9 15 3 3-3 3"}]];Jn(t,qn({name:"git-compare-arrows"},()=>n,{get iconNode(){return r},children:(a,s)=>{var o=zt(),u=q(o);Un(u,()=>e.children??Xn),b(a,o)},$$slots:{default:!0}})),ke()}function Wi(t,e){De(e,!0);let n=Gn(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];Jn(t,qn({name:"rotate-ccw"},()=>n,{get iconNode(){return r},children:(a,s)=>{var o=zt(),u=q(o);Un(u,()=>e.children??Xn),b(a,o)},$$slots:{default:!0}})),ke()}var mr=180/Math.PI,Ln={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cr(t,e,n,r,a,s){var o,u,f;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(f=t*n+e*r)&&(n-=t*f,r-=e*f),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,f/=u),t*r<e*n&&(t=-t,e=-e,f=-f,o=-o),{translateX:a,translateY:s,rotate:Math.atan2(e,t)*mr,skewX:Math.atan(f)*mr,scaleX:o,scaleY:u}}var dn;function Qi(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ln:Cr(e.a,e.b,e.c,e.d,e.e,e.f)}function ji(t){return t==null||(dn||(dn=document.createElementNS("http://www.w3.org/2000/svg","g")),dn.setAttribute("transform",t),!(t=dn.transform.baseVal.consolidate()))?Ln:(t=t.matrix,Cr(t.a,t.b,t.c,t.d,t.e,t.f))}function Ar(t,e,n,r){function a(c){return c.length?c.pop()+" ":""}function s(c,h,g,w,_,R){if(c!==g||h!==w){var Y=_.push("translate(",null,e,null,n);R.push({i:Y-4,x:Me(c,g)},{i:Y-2,x:Me(h,w)})}else(g||w)&&_.push("translate("+g+e+w+n)}function o(c,h,g,w){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),w.push({i:g.push(a(g)+"rotate(",null,r)-2,x:Me(c,h)})):h&&g.push(a(g)+"rotate("+h+r)}function u(c,h,g,w){c!==h?w.push({i:g.push(a(g)+"skewX(",null,r)-2,x:Me(c,h)}):h&&g.push(a(g)+"skewX("+h+r)}function f(c,h,g,w,_,R){if(c!==g||h!==w){var Y=_.push(a(_)+"scale(",null,",",null,")");R.push({i:Y-4,x:Me(c,g)},{i:Y-2,x:Me(h,w)})}else(g!==1||w!==1)&&_.push(a(_)+"scale("+g+","+w+")")}return function(c,h){var g=[],w=[];return c=t(c),h=t(h),s(c.translateX,c.translateY,h.translateX,h.translateY,g,w),o(c.rotate,h.rotate,g,w),u(c.skewX,h.skewX,g,w),f(c.scaleX,c.scaleY,h.scaleX,h.scaleY,g,w),c=h=null,function(_){for(var R=-1,Y=w.length,U;++R<Y;)g[(U=w[R]).i]=U.x(_);return g.join("")}}}var ta=Ar(Qi,"px, ","px)","deg)"),ea=Ar(ji,", ",")",")");const na=!1,ra=({params:t,url:e})=>{if(!Rn.isAuthenticated)throw di(302,"/login");return{service:t.service,type:e.searchParams.get("type"),preset:e.searchParams.get("preset")||null,from:e.searchParams.get("from")||null,to:e.searchParams.get("to")||null}},ec=Object.freeze(Object.defineProperty({__proto__:null,load:ra,prerender:na},Symbol.toStringTag,{value:"Module"}));var On="http://www.w3.org/1999/xhtml";const pr={svg:"http://www.w3.org/2000/svg",xhtml:On,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $n(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),pr.hasOwnProperty(e)?{space:pr[e],local:t}:t}function ia(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===On&&e.documentElement.namespaceURI===On?e.createElement(t):e.createElementNS(n,t)}}function aa(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Dr(t){var e=$n(t);return(e.local?aa:ia)(e)}function oa(){}function Yn(t){return t==null?oa:function(){return this.querySelector(t)}}function sa(t){typeof t!="function"&&(t=Yn(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var s=e[a],o=s.length,u=r[a]=new Array(o),f,c,h=0;h<o;++h)(f=s[h])&&(c=t.call(f,f.__data__,h,s))&&("__data__"in f&&(c.__data__=f.__data__),u[h]=c);return new Jt(r,this._parents)}function la(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function ua(){return[]}function kr(t){return t==null?ua:function(){return this.querySelectorAll(t)}}function ca(t){return function(){return la(t.apply(this,arguments))}}function fa(t){typeof t=="function"?t=ca(t):t=kr(t);for(var e=this._groups,n=e.length,r=[],a=[],s=0;s<n;++s)for(var o=e[s],u=o.length,f,c=0;c<u;++c)(f=o[c])&&(r.push(t.call(f,f.__data__,c,o)),a.push(f));return new Jt(r,a)}function Pr(t){return function(){return this.matches(t)}}function Nr(t){return function(e){return e.matches(t)}}var ha=Array.prototype.find;function da(t){return function(){return ha.call(this.children,t)}}function va(){return this.firstElementChild}function ma(t){return this.select(t==null?va:da(typeof t=="function"?t:Nr(t)))}var pa=Array.prototype.filter;function ga(){return Array.from(this.children)}function _a(t){return function(){return pa.call(this.children,t)}}function ya(t){return this.selectAll(t==null?ga:_a(typeof t=="function"?t:Nr(t)))}function wa(t){typeof t!="function"&&(t=Pr(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var s=e[a],o=s.length,u=r[a]=[],f,c=0;c<o;++c)(f=s[c])&&t.call(f,f.__data__,c,s)&&u.push(f);return new Jt(r,this._parents)}function Er(t){return new Array(t.length)}function xa(){return new Jt(this._enter||this._groups.map(Er),this._parents)}function gn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}gn.prototype={constructor:gn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ba(t){return function(){return t}}function $a(t,e,n,r,a,s){for(var o=0,u,f=e.length,c=s.length;o<c;++o)(u=e[o])?(u.__data__=s[o],r[o]=u):n[o]=new gn(t,s[o]);for(;o<f;++o)(u=e[o])&&(a[o]=u)}function Sa(t,e,n,r,a,s,o){var u,f,c=new Map,h=e.length,g=s.length,w=new Array(h),_;for(u=0;u<h;++u)(f=e[u])&&(w[u]=_=o.call(f,f.__data__,u,e)+"",c.has(_)?a[u]=f:c.set(_,f));for(u=0;u<g;++u)_=o.call(t,s[u],u,s)+"",(f=c.get(_))?(r[u]=f,f.__data__=s[u],c.delete(_)):n[u]=new gn(t,s[u]);for(u=0;u<h;++u)(f=e[u])&&c.get(w[u])===f&&(a[u]=f)}function Ta(t){return t.__data__}function Ma(t,e){if(!arguments.length)return Array.from(this,Ta);var n=e?Sa:$a,r=this._parents,a=this._groups;typeof t!="function"&&(t=ba(t));for(var s=a.length,o=new Array(s),u=new Array(s),f=new Array(s),c=0;c<s;++c){var h=r[c],g=a[c],w=g.length,_=Ca(t.call(h,h&&h.__data__,c,r)),R=_.length,Y=u[c]=new Array(R),U=o[c]=new Array(R),L=f[c]=new Array(w);n(h,g,Y,U,L,_,e);for(var T=0,P=0,I,X;T<R;++T)if(I=Y[T]){for(T>=P&&(P=T+1);!(X=U[P])&&++P<R;);I._next=X||null}}return o=new Jt(o,r),o._enter=u,o._exit=f,o}function Ca(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Aa(){return new Jt(this._exit||this._groups.map(Er),this._parents)}function Da(t,e,n){var r=this.enter(),a=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),n==null?s.remove():n(s),r&&a?r.merge(a).order():a}function ka(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,a=n.length,s=r.length,o=Math.min(a,s),u=new Array(a),f=0;f<o;++f)for(var c=n[f],h=r[f],g=c.length,w=u[f]=new Array(g),_,R=0;R<g;++R)(_=c[R]||h[R])&&(w[R]=_);for(;f<a;++f)u[f]=n[f];return new Jt(u,this._parents)}function Pa(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],a=r.length-1,s=r[a],o;--a>=0;)(o=r[a])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function Na(t){t||(t=Ea);function e(g,w){return g&&w?t(g.__data__,w.__data__):!g-!w}for(var n=this._groups,r=n.length,a=new Array(r),s=0;s<r;++s){for(var o=n[s],u=o.length,f=a[s]=new Array(u),c,h=0;h<u;++h)(c=o[h])&&(f[h]=c);f.sort(e)}return new Jt(a,this._parents).order()}function Ea(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Fa(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ra(){return Array.from(this)}function Ia(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,s=r.length;a<s;++a){var o=r[a];if(o)return o}return null}function La(){let t=0;for(const e of this)++t;return t}function Oa(){return!this.node()}function za(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a=e[n],s=0,o=a.length,u;s<o;++s)(u=a[s])&&t.call(u,u.__data__,s,a);return this}function Ha(t){return function(){this.removeAttribute(t)}}function Va(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ba(t,e){return function(){this.setAttribute(t,e)}}function Ua(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xa(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function qa(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ga(t,e){var n=$n(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Va:Ha:typeof e=="function"?n.local?qa:Xa:n.local?Ua:Ba)(n,e))}function Fr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ja(t){return function(){this.style.removeProperty(t)}}function Ya(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Za(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ka(t,e,n){return arguments.length>1?this.each((e==null?Ja:typeof e=="function"?Za:Ya)(t,e,n??"")):Oe(this.node(),t)}function Oe(t,e){return t.style.getPropertyValue(e)||Fr(t).getComputedStyle(t,null).getPropertyValue(e)}function Wa(t){return function(){delete this[t]}}function Qa(t,e){return function(){this[t]=e}}function ja(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function to(t,e){return arguments.length>1?this.each((e==null?Wa:typeof e=="function"?ja:Qa)(t,e)):this.node()[t]}function Rr(t){return t.trim().split(/^|\s+/)}function Zn(t){return t.classList||new Ir(t)}function Ir(t){this._node=t,this._names=Rr(t.getAttribute("class")||"")}Ir.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Lr(t,e){for(var n=Zn(t),r=-1,a=e.length;++r<a;)n.add(e[r])}function Or(t,e){for(var n=Zn(t),r=-1,a=e.length;++r<a;)n.remove(e[r])}function eo(t){return function(){Lr(this,t)}}function no(t){return function(){Or(this,t)}}function ro(t,e){return function(){(e.apply(this,arguments)?Lr:Or)(this,t)}}function io(t,e){var n=Rr(t+"");if(arguments.length<2){for(var r=Zn(this.node()),a=-1,s=n.length;++a<s;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof e=="function"?ro:e?eo:no)(n,e))}function ao(){this.textContent=""}function oo(t){return function(){this.textContent=t}}function so(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function lo(t){return arguments.length?this.each(t==null?ao:(typeof t=="function"?so:oo)(t)):this.node().textContent}function uo(){this.innerHTML=""}function co(t){return function(){this.innerHTML=t}}function fo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function ho(t){return arguments.length?this.each(t==null?uo:(typeof t=="function"?fo:co)(t)):this.node().innerHTML}function vo(){this.nextSibling&&this.parentNode.appendChild(this)}function mo(){return this.each(vo)}function po(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function go(){return this.each(po)}function _o(t){var e=typeof t=="function"?t:Dr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function yo(){return null}function wo(t,e){var n=typeof t=="function"?t:Dr(t),r=e==null?yo:typeof e=="function"?e:Yn(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function xo(){var t=this.parentNode;t&&t.removeChild(this)}function bo(){return this.each(xo)}function $o(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function So(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function To(t){return this.select(t?So:$o)}function Mo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Co(t){return function(e){t.call(this,e,this.__data__)}}function Ao(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Do(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,a=e.length,s;n<a;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function ko(t,e,n){return function(){var r=this.__on,a,s=Co(e);if(r){for(var o=0,u=r.length;o<u;++o)if((a=r[o]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=n),a.value=e;return}}this.addEventListener(t.type,s,n),a={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(a):this.__on=[a]}}function Po(t,e,n){var r=Ao(t+""),a,s=r.length,o;if(arguments.length<2){var u=this.node().__on;if(u){for(var f=0,c=u.length,h;f<c;++f)for(a=0,h=u[f];a<s;++a)if((o=r[a]).type===h.type&&o.name===h.name)return h.value}return}for(u=e?ko:Do,a=0;a<s;++a)this.each(u(r[a],e,n));return this}function zr(t,e,n){var r=Fr(t),a=r.CustomEvent;typeof a=="function"?a=new a(e,n):(a=r.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function No(t,e){return function(){return zr(this,t,e)}}function Eo(t,e){return function(){return zr(this,t,e.apply(this,arguments))}}function Fo(t,e){return this.each((typeof e=="function"?Eo:No)(t,e))}function*Ro(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,s=r.length,o;a<s;++a)(o=r[a])&&(yield o)}var Hr=[null];function Jt(t,e){this._groups=t,this._parents=e}function rn(){return new Jt([[document.documentElement]],Hr)}function Io(){return this}Jt.prototype=rn.prototype={constructor:Jt,select:sa,selectAll:fa,selectChild:ma,selectChildren:ya,filter:wa,data:Ma,enter:xa,exit:Aa,join:Da,merge:ka,selection:Io,order:Pa,sort:Na,call:Fa,nodes:Ra,node:Ia,size:La,empty:Oa,each:za,attr:Ga,style:Ka,property:to,classed:io,text:lo,html:ho,raise:mo,lower:go,append:_o,insert:wo,remove:bo,clone:To,datum:Mo,on:Po,dispatch:Fo,[Symbol.iterator]:Ro};function Le(t){return typeof t=="string"?new Jt([[document.querySelector(t)]],[document.documentElement]):new Jt([[t]],Hr)}function Lo(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function Oo(){return this.eachAfter(Lo)}function zo(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function Ho(t,e){for(var n=this,r=[n],a,s,o=-1;n=r.pop();)if(t.call(e,n,++o,this),a=n.children)for(s=a.length-1;s>=0;--s)r.push(a[s]);return this}function Vo(t,e){for(var n=this,r=[n],a=[],s,o,u,f=-1;n=r.pop();)if(a.push(n),s=n.children)for(o=0,u=s.length;o<u;++o)r.push(s[o]);for(;n=a.pop();)t.call(e,n,++f,this);return this}function Bo(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function Uo(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,a=r&&r.length;--a>=0;)n+=r[a].value;e.value=n})}function Xo(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function qo(t){for(var e=this,n=Go(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var a=r.length;t!==n;)r.splice(a,0,t),t=t.parent;return r}function Go(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),a=null;for(t=n.pop(),e=r.pop();t===e;)a=t,t=n.pop(),e=r.pop();return a}function Jo(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function Yo(){return Array.from(this)}function Zo(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function Ko(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*Wo(){var t=this,e,n=[t],r,a,s;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(a=0,s=r.length;a<s;++a)n.push(r[a]);while(n.length)}function Kn(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=ts)):e===void 0&&(e=jo);for(var n=new _n(t),r,a=[n],s,o,u,f;r=a.pop();)if((o=e(r.data))&&(f=(o=Array.from(o)).length))for(r.children=o,u=f-1;u>=0;--u)a.push(s=o[u]=new _n(o[u])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(ns)}function Qo(){return Kn(this).eachBefore(es)}function jo(t){return t.children}function ts(t){return Array.isArray(t)?t[1]:null}function es(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ns(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function _n(t){this.data=t,this.depth=this.height=0,this.parent=null}_n.prototype=Kn.prototype={constructor:_n,count:Oo,each:zo,eachAfter:Vo,eachBefore:Ho,find:Bo,sum:Uo,sort:Xo,path:qo,ancestors:Jo,descendants:Yo,leaves:Zo,links:Ko,copy:Qo,[Symbol.iterator]:Wo};function rs(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function is(t,e,n,r,a){for(var s=t.children,o,u=-1,f=s.length,c=t.value&&(r-e)/t.value;++u<f;)o=s[u],o.y0=n,o.y1=a,o.x0=e,o.x1=e+=o.value*c}function as(){var t=1,e=1,n=0,r=!1;function a(o){var u=o.height+1;return o.x0=o.y0=n,o.x1=t,o.y1=e/u,o.eachBefore(s(e,u)),r&&o.eachBefore(rs),o}function s(o,u){return function(f){f.children&&is(f,f.x0,o*(f.depth+1)/u,f.x1,o*(f.depth+2)/u);var c=f.x0,h=f.y0,g=f.x1-n,w=f.y1-n;g<c&&(c=g=(c+g)/2),w<h&&(h=w=(h+w)/2),f.x0=c,f.y0=h,f.x1=g,f.y1=w}}return a.round=function(o){return arguments.length?(r=!!o,a):r},a.size=function(o){return arguments.length?(t=+o[0],e=+o[1],a):[t,e]},a.padding=function(o){return arguments.length?(n=+o,a):n},a}function Vr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var os={value:()=>{}};function Br(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new vn(n)}function vn(t){this._=t}function ss(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}vn.prototype=Br.prototype={constructor:vn,on:function(t,e){var n=this._,r=ss(t+"",n),a,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((a=(t=r[s]).type)&&(a=ls(n[a],t.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(a=(t=r[s]).type)n[a]=gr(n[a],t.name,e);else if(e==null)for(a in n)n[a]=gr(n[a],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new vn(t)},call:function(t,e){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,s;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,a=s.length;r<a;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],a=0,s=r.length;a<s;++a)r[a].value.apply(e,n)}};function ls(t,e){for(var n=0,r=t.length,a;n<r;++n)if((a=t[n]).name===e)return a.value}function gr(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=os,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ze=0,je=0,We=0,Ur=1e3,yn,tn,wn=0,Ae=0,Sn=0,nn=typeof performance=="object"&&performance.now?performance:Date,Xr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wn(){return Ae||(Xr(us),Ae=nn.now()+Sn)}function us(){Ae=0}function xn(){this._call=this._time=this._next=null}xn.prototype=qr.prototype={constructor:xn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Wn():+n)+(e==null?0:+e),!this._next&&tn!==this&&(tn?tn._next=this:yn=this,tn=this),this._call=t,this._time=n,zn()},stop:function(){this._call&&(this._call=null,this._time=1/0,zn())}};function qr(t,e,n){var r=new xn;return r.restart(t,e,n),r}function cs(){Wn(),++ze;for(var t=yn,e;t;)(e=Ae-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ze}function _r(){Ae=(wn=nn.now())+Sn,ze=je=0;try{cs()}finally{ze=0,hs(),Ae=0}}function fs(){var t=nn.now(),e=t-wn;e>Ur&&(Sn-=e,wn=t)}function hs(){for(var t,e=yn,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:yn=n);tn=t,zn(r)}function zn(t){if(!ze){je&&(je=clearTimeout(je));var e=t-Ae;e>24?(t<1/0&&(je=setTimeout(_r,t-nn.now()-Sn)),We&&(We=clearInterval(We))):(We||(wn=nn.now(),We=setInterval(fs,Ur)),ze=1,Xr(_r))}}function yr(t,e,n){var r=new xn;return e=e==null?0:+e,r.restart(a=>{r.stop(),t(a+e)},e,n),r}var ds=Br("start","end","cancel","interrupt"),vs=[],Gr=0,wr=1,Hn=2,mn=3,xr=4,Vn=5,pn=6;function Tn(t,e,n,r,a,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;ms(t,n,{name:e,index:r,group:a,on:ds,tween:vs,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Gr})}function Qn(t,e){var n=Qt(t,e);if(n.state>Gr)throw new Error("too late; already scheduled");return n}function le(t,e){var n=Qt(t,e);if(n.state>mn)throw new Error("too late; already running");return n}function Qt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ms(t,e,n){var r=t.__transition,a;r[e]=n,n.timer=qr(s,0,n.time);function s(c){n.state=wr,n.timer.restart(o,n.delay,n.time),n.delay<=c&&o(c-n.delay)}function o(c){var h,g,w,_;if(n.state!==wr)return f();for(h in r)if(_=r[h],_.name===n.name){if(_.state===mn)return yr(o);_.state===xr?(_.state=pn,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[h]):+h<e&&(_.state=pn,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete r[h])}if(yr(function(){n.state===mn&&(n.state=xr,n.timer.restart(u,n.delay,n.time),u(c))}),n.state=Hn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Hn){for(n.state=mn,a=new Array(w=n.tween.length),h=0,g=-1;h<w;++h)(_=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(a[++g]=_);a.length=g+1}}function u(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(f),n.state=Vn,1),g=-1,w=a.length;++g<w;)a[g].call(t,h);n.state===Vn&&(n.on.call("end",t,t.__data__,n.index,n.group),f())}function f(){n.state=pn,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function ps(t,e){var n=t.__transition,r,a,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}a=r.state>Hn&&r.state<Vn,r.state=pn,r.timer.stop(),r.on.call(a?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function gs(t){return this.each(function(){ps(this,t)})}function _s(t,e){var n,r;return function(){var a=le(this,t),s=a.tween;if(s!==n){r=n=s;for(var o=0,u=r.length;o<u;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}a.tween=r}}function ys(t,e,n){var r,a;if(typeof n!="function")throw new Error;return function(){var s=le(this,t),o=s.tween;if(o!==r){a=(r=o).slice();for(var u={name:e,value:n},f=0,c=a.length;f<c;++f)if(a[f].name===e){a[f]=u;break}f===c&&a.push(u)}s.tween=a}}function ws(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Qt(this.node(),n).tween,a=0,s=r.length,o;a<s;++a)if((o=r[a]).name===t)return o.value;return null}return this.each((e==null?_s:ys)(n,t,e))}function jn(t,e,n){var r=t._id;return t.each(function(){var a=le(this,r);(a.value||(a.value={}))[e]=n.apply(this,arguments)}),function(a){return Qt(a,r).value[e]}}function Jr(t,e){var n;return(typeof e=="number"?Me:e instanceof cr?ur:(n=cr(e))?(e=n,ur):Ni)(t,e)}function xs(t){return function(){this.removeAttribute(t)}}function bs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $s(t,e,n){var r,a=n+"",s;return function(){var o=this.getAttribute(t);return o===a?null:o===r?s:s=e(r=o,n)}}function Ss(t,e,n){var r,a=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?s:s=e(r=o,n)}}function Ts(t,e,n){var r,a,s;return function(){var o,u=n(this),f;return u==null?void this.removeAttribute(t):(o=this.getAttribute(t),f=u+"",o===f?null:o===r&&f===a?s:(a=f,s=e(r=o,u)))}}function Ms(t,e,n){var r,a,s;return function(){var o,u=n(this),f;return u==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),f=u+"",o===f?null:o===r&&f===a?s:(a=f,s=e(r=o,u)))}}function Cs(t,e){var n=$n(t),r=n==="transform"?ea:Jr;return this.attrTween(t,typeof e=="function"?(n.local?Ms:Ts)(n,r,jn(this,"attr."+t,e)):e==null?(n.local?bs:xs)(n):(n.local?Ss:$s)(n,r,e))}function As(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ds(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ks(t,e){var n,r;function a(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Ds(t,s)),n}return a._value=e,a}function Ps(t,e){var n,r;function a(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&As(t,s)),n}return a._value=e,a}function Ns(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=$n(t);return this.tween(n,(r.local?ks:Ps)(r,e))}function Es(t,e){return function(){Qn(this,t).delay=+e.apply(this,arguments)}}function Fs(t,e){return e=+e,function(){Qn(this,t).delay=e}}function Rs(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Es:Fs)(e,t)):Qt(this.node(),e).delay}function Is(t,e){return function(){le(this,t).duration=+e.apply(this,arguments)}}function Ls(t,e){return e=+e,function(){le(this,t).duration=e}}function Os(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Is:Ls)(e,t)):Qt(this.node(),e).duration}function zs(t,e){if(typeof e!="function")throw new Error;return function(){le(this,t).ease=e}}function Hs(t){var e=this._id;return arguments.length?this.each(zs(e,t)):Qt(this.node(),e).ease}function Vs(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;le(this,t).ease=n}}function Bs(t){if(typeof t!="function")throw new Error;return this.each(Vs(this._id,t))}function Us(t){typeof t!="function"&&(t=Pr(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var s=e[a],o=s.length,u=r[a]=[],f,c=0;c<o;++c)(f=s[c])&&t.call(f,f.__data__,c,s)&&u.push(f);return new pe(r,this._parents,this._name,this._id)}function Xs(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,a=n.length,s=Math.min(r,a),o=new Array(r),u=0;u<s;++u)for(var f=e[u],c=n[u],h=f.length,g=o[u]=new Array(h),w,_=0;_<h;++_)(w=f[_]||c[_])&&(g[_]=w);for(;u<r;++u)o[u]=e[u];return new pe(o,this._parents,this._name,this._id)}function qs(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Gs(t,e,n){var r,a,s=qs(e)?Qn:le;return function(){var o=s(this,t),u=o.on;u!==r&&(a=(r=u).copy()).on(e,n),o.on=a}}function Js(t,e){var n=this._id;return arguments.length<2?Qt(this.node(),n).on.on(t):this.each(Gs(n,t,e))}function Ys(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Zs(){return this.on("end.remove",Ys(this._id))}function Ks(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Yn(t));for(var r=this._groups,a=r.length,s=new Array(a),o=0;o<a;++o)for(var u=r[o],f=u.length,c=s[o]=new Array(f),h,g,w=0;w<f;++w)(h=u[w])&&(g=t.call(h,h.__data__,w,u))&&("__data__"in h&&(g.__data__=h.__data__),c[w]=g,Tn(c[w],e,n,w,c,Qt(h,n)));return new pe(s,this._parents,e,n)}function Ws(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kr(t));for(var r=this._groups,a=r.length,s=[],o=[],u=0;u<a;++u)for(var f=r[u],c=f.length,h,g=0;g<c;++g)if(h=f[g]){for(var w=t.call(h,h.__data__,g,f),_,R=Qt(h,n),Y=0,U=w.length;Y<U;++Y)(_=w[Y])&&Tn(_,e,n,Y,w,R);s.push(w),o.push(h)}return new pe(s,o,e,n)}var Qs=rn.prototype.constructor;function js(){return new Qs(this._groups,this._parents)}function tl(t,e){var n,r,a;return function(){var s=Oe(this,t),o=(this.style.removeProperty(t),Oe(this,t));return s===o?null:s===n&&o===r?a:a=e(n=s,r=o)}}function Yr(t){return function(){this.style.removeProperty(t)}}function el(t,e,n){var r,a=n+"",s;return function(){var o=Oe(this,t);return o===a?null:o===r?s:s=e(r=o,n)}}function nl(t,e,n){var r,a,s;return function(){var o=Oe(this,t),u=n(this),f=u+"";return u==null&&(f=u=(this.style.removeProperty(t),Oe(this,t))),o===f?null:o===r&&f===a?s:(a=f,s=e(r=o,u))}}function rl(t,e){var n,r,a,s="style."+e,o="end."+s,u;return function(){var f=le(this,t),c=f.on,h=f.value[s]==null?u||(u=Yr(e)):void 0;(c!==n||a!==h)&&(r=(n=c).copy()).on(o,a=h),f.on=r}}function il(t,e,n){var r=(t+="")=="transform"?ta:Jr;return e==null?this.styleTween(t,tl(t,r)).on("end.style."+t,Yr(t)):typeof e=="function"?this.styleTween(t,nl(t,r,jn(this,"style."+t,e))).each(rl(this._id,t)):this.styleTween(t,el(t,r,e),n).on("end.style."+t,null)}function al(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ol(t,e,n){var r,a;function s(){var o=e.apply(this,arguments);return o!==a&&(r=(a=o)&&al(t,o,n)),r}return s._value=e,s}function sl(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ol(t,e,n??""))}function ll(t){return function(){this.textContent=t}}function ul(t){return function(){var e=t(this);this.textContent=e??""}}function cl(t){return this.tween("text",typeof t=="function"?ul(jn(this,"text",t)):ll(t==null?"":t+""))}function fl(t){return function(e){this.textContent=t.call(this,e)}}function hl(t){var e,n;function r(){var a=t.apply(this,arguments);return a!==n&&(e=(n=a)&&fl(a)),e}return r._value=t,r}function dl(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,hl(t))}function vl(){for(var t=this._name,e=this._id,n=Zr(),r=this._groups,a=r.length,s=0;s<a;++s)for(var o=r[s],u=o.length,f,c=0;c<u;++c)if(f=o[c]){var h=Qt(f,e);Tn(f,t,n,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new pe(r,this._parents,t,n)}function ml(){var t,e,n=this,r=n._id,a=n.size();return new Promise(function(s,o){var u={value:o},f={value:function(){--a===0&&s()}};n.each(function(){var c=le(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(f)),c.on=e}),a===0&&s()})}var pl=0;function pe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Zr(){return++pl}var ve=rn.prototype;pe.prototype={constructor:pe,select:Ks,selectAll:Ws,selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:Us,merge:Xs,selection:js,transition:vl,call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:Js,attr:Cs,attrTween:Ns,style:il,styleTween:sl,text:cl,textTween:dl,remove:Zs,tween:ws,delay:Rs,duration:Os,ease:Hs,easeVarying:Bs,end:ml,[Symbol.iterator]:ve[Symbol.iterator]};var gl={time:null,delay:0,duration:250,ease:Vr};function _l(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function yl(t){var e,n;t instanceof pe?(e=t._id,t=t._name):(e=Zr(),(n=gl).time=Wn(),t=t==null?null:t+"");for(var r=this._groups,a=r.length,s=0;s<a;++s)for(var o=r[s],u=o.length,f,c=0;c<u;++c)(f=o[c])&&Tn(f,t,e,c,o,n||_l(f,e));return new pe(r,this._parents,t,e)}rn.prototype.interrupt=gs;rn.prototype.transition=yl;function wl(t){let n=0,r=0,a=1;const s=10;if(t){for(let o=0;o<t.length&&!(o>6);o++)n+=a*(t.charCodeAt(o)%s),r+=a*(s-1),a*=.7;r>0&&(n=n/r)}return n}function xl(t){let e=0;if(t){const n=t.split("`");n.length>1&&(t=n[n.length-1]),t=t.split("(")[0],e=wl(t)}return e}function bl(t,e){let n,r,a;return t==="red"?(n=200+Math.round(55*e),r=50+Math.round(80*e),a=r):t==="orange"?(n=190+Math.round(65*e),r=90+Math.round(65*e),a=0):t==="yellow"?(n=175+Math.round(55*e),r=n,a=50+Math.round(20*e)):t==="green"?(n=50+Math.round(60*e),r=200+Math.round(55*e),a=n):t==="pastelgreen"?(n=163+Math.round(75*e),r=195+Math.round(49*e),a=72+Math.round(149*e)):t==="blue"?(n=91+Math.round(126*e),r=156+Math.round(76*e),a=221+Math.round(26*e)):t==="aqua"?(n=50+Math.round(60*e),r=165+Math.round(55*e),a=r):t==="cold"?(n=0+Math.round(55*(1-e)),r=0+Math.round(230*(1-e)),a=200+Math.round(55*e)):(n=200+Math.round(55*e),r=0+Math.round(230*(1-e)),a=0+Math.round(55*(1-e))),"rgb("+n+","+r+","+a+")"}function $l(){let t=960,e=null,n=18,r=null,a=null,s="",o=750,u=Vr,f=!1,c=!1,h=null,g=null,w=0,_=null,R=null,Y=!1,U=!1,L=!1,T=null,P=!1,I=null,X=function(l){return l.data.n||l.data.name},ft=function(l){return"v"in l?l.v:l.value},et=function(l){return l.c||l.children},Rt=function(l){return l.data.l||l.data.libtype},kt=function(l){return"d"in l.data?l.data.d:l.data.delta},ot=function(l,p,d){R=()=>{_&&(_.textContent="search: "+p+" of "+d+" total samples ( "+fr(".3f")(100*(p/d),3)+"%)")},R()};const K=ot;let ht=(l,p,d=!1)=>{if(!p)return!1;let S=X(l);d&&(p=p.toLowerCase(),S=S.toLowerCase());const M=new RegExp(p);return typeof S<"u"&&S&&S.match(M)};const j=ht;let Ct=function(l){_&&(l?_.textContent=l:typeof R=="function"?R():_.textContent="")};const It=Ct;let wt=function(l){return X(l)+" ("+fr(".3f")(100*(l.x1-l.x0),3)+"%, "+ft(l)+" samples)"},gt=function(l){return l.highlight?"#E600E6":Tt(X(l),Rt(l))};const dt=gt;function Tt(l,p){let d=I||"warm";!I&&!(typeof p>"u"||p==="")&&(d="red",typeof l<"u"&&l&&l.match(/::/)&&(d="yellow"),p==="kernel"?d="orange":p==="jit"?d="green":p==="inlined"&&(d="aqua"));const S=xl(l);return bl(d,S)}function Z(l){l.data.fade=!1,l.data.hide=!1,l.children&&l.children.forEach(Z)}function Xt(l){let p=l,d=p.parent,S,M,D;for(;d;){for(S=d.children,M=S.length;M--;)D=S[M],D!==p&&(D.data.hide=!0);p=d,d=p.parent}}function Ht(l){l.parent&&(l.parent.data.fade=!0,Ht(l.parent))}function Pt(l,p){if(a&&a.hide(),Xt(l),Z(l),Ht(l),O(),L){const d=p.parentNode.offsetTop,S=(window.innerHeight-d)/n,M=(l.height-S+10)*n;window.scrollTo({top:d+M,left:0,behavior:"smooth"})}typeof h=="function"&&h(l)}function Lt(l,p){const d=[];let S=0;function M(D,nt){let G=!1;ht(D,p)?(D.highlight=!0,G=!0,nt||(S+=ft(D)),d.push(D)):D.highlight=!1,D.children&&D.children.forEach(function(At){M(At,nt||G)})}return M(l,!1),[d,S]}function Vt(l,p){if(l.id===p)return l;{const d=l.children;if(d)for(let S=0;S<d.length;S++){const M=Vt(d[S],p);if(M)return M}}}function Bt(l){l.highlight=!1,l.children&&l.children.forEach(function(p){Bt(p)})}function Yt(l,p){if(typeof f=="function")return f(l,p);if(f)return Ei(X(l),X(p))}const y=as();function E(l){let p=l.descendants();if(w>0){const d=t/(l.x1-l.x0);p=p.filter(function(S){return(S.x1-S.x0)*d>w})}return p}function O(){r.each(function(l){const p=hr().range([0,t]),d=hr().range([0,n]);f&&l.sort(Yt),qt(l),y(l);const S=t/(l.x1-l.x0);function M(C){return(C.x1-C.x0)*S}const D=E(l),nt=Le(this).select("svg");nt.attr("width",t);let G=nt.selectAll("g").data(D,function(C){return C.id});if(!e||U){let C=0;for(let J=0;J<D.length;++J)D[J].depth>C&&(C=D[J].depth);e=(C+3)*n,e<T&&(e=T),nt.attr("height",e)}G.transition().duration(o).ease(u).attr("transform",function(C){return"translate("+p(C.x0)+","+(c?d(C.depth):e-d(C.depth)-n)+")"}),G.select("rect").transition().duration(o).ease(u).attr("width",M);const At=G.enter().append("svg:g").attr("transform",function(C){return"translate("+p(C.x0)+","+(c?d(C.depth):e-d(C.depth)-n)+")"});At.append("svg:rect").transition().delay(o/2).attr("width",M),a||At.append("svg:title"),At.append("foreignObject").append("xhtml:div"),G=nt.selectAll("g").data(D,function(C){return C.id}),G.attr("width",M).attr("height",function(C){return n}).attr("name",function(C){return X(C)}).attr("class",function(C){return C.data.fade?"frame fade":"frame"}),G.select("rect").attr("height",function(C){return n}).attr("fill",function(C){return gt(C)}),a||G.select("title").text(wt),G.select("foreignObject").attr("width",M).attr("height",function(C){return n}).style("pointer-events","none").select("div").attr("class","d3-flame-graph-label").style("display",function(C){return M(C)<35?"none":"block"}).transition().delay(o).text(X),G.on("click",function(C,J){Pt(J,this)}),G.exit().remove(),G.on("mouseover",function(C,J){a&&a.show(C,J),Ct(wt(J)),typeof g=="function"&&g(J)}).on("mouseout",function(){a&&a.hide(),Ct(null)})})}function tt(l,p){p.forEach(function(d){const S=l.find(function(M){return M.name===d.name});S?(S.value+=d.value,d.children&&(S.children||(S.children=[]),tt(S.children,d.children))):l.push(d)})}function it(l,p){p(l);let d=l.children;if(d){const S=[d];let M,D,nt;for(;S.length;)for(d=S.pop(),M=d.length;M--;)D=d[M],p(D),nt=D.children,nt&&S.push(nt)}}function Nt(l){let p=0;it(l,function(d){d.id=p++})}function qt(l){let p,d,S,M,D,nt,G,At;const C=[],J=[],st=[],_t=!Y;let Gt=l.data;for(Gt.hide?(l.value=0,d=l.children,d&&st.push(d)):(l.value=Gt.fade?0:ft(Gt),C.push(l));p=C.pop();)if(d=p.children,d&&(D=d.length)){for(M=0;D--;){if(G=d[D],Gt=G.data,Gt.hide){G.value=0,S=G.children,S&&st.push(S);continue}Gt.fade?G.value=0:(At=ft(Gt),G.value=At,M+=At),C.push(G)}_t&&p.value&&(p.value-=M),J.push(d)}for(D=J.length;D--;){for(d=J[D],M=0,nt=d.length;nt--;)M+=d[nt].value;d[0].parent.value+=M}for(;st.length;)for(d=st.pop(),nt=d.length;nt--;)G=d[nt],G.value=0,S=G.children,S&&st.push(S)}function Et(){r.datum(l=>{if(l.constructor.name!=="Node"){const p=Kn(l,et);return Nt(p),qt(p),p.originalValue=p.value,P&&p.eachAfter(d=>{let S=kt(d);const M=d.children;let D=M&&M.length;for(;--D>=0;)S+=M[D].delta;d.delta=S}),p}})}function v(l){if(!arguments.length)return v;r=l,Et(),r.each(function(p){if(Le(this).select("svg").size()===0){const d=Le(this).append("svg:svg").attr("width",t).attr("class","partition d3-flame-graph");e&&(e<T&&(e=T),d.attr("height",e)),d.append("svg:text").attr("class","title").attr("text-anchor","middle").attr("y","25").attr("x",t/2).attr("fill","#808080").text(s),a&&d.call(a)}}),O()}return v.height=function(l){return arguments.length?(e=l,v):e},v.minHeight=function(l){return arguments.length?(T=l,v):T},v.width=function(l){return arguments.length?(t=l,v):t},v.cellHeight=function(l){return arguments.length?(n=l,v):n},v.tooltip=function(l){return arguments.length?(typeof l=="function"&&(a=l),v):a},v.title=function(l){return arguments.length?(s=l,v):s},v.transitionDuration=function(l){return arguments.length?(o=l,v):o},v.transitionEase=function(l){return arguments.length?(u=l,v):u},v.sort=function(l){return arguments.length?(f=l,v):f},v.inverted=function(l){return arguments.length?(c=l,v):c},v.computeDelta=function(l){return arguments.length?(P=l,v):P},v.setLabelHandler=function(l){return arguments.length?(wt=l,v):wt},v.label=v.setLabelHandler,v.search=function(l){const p=[];let d=0,S=0;r.each(function(M){const D=Lt(M,l);p.push(...D[0]),d+=D[1],S+=M.originalValue}),ot(p,d,S),O()},v.findById=function(l){if(typeof l>"u"||l===null)return null;let p=null;return r.each(function(d){p===null&&(p=Vt(d,l))}),p},v.clear=function(){Ct(null),r.each(function(l){Bt(l),O()})},v.zoomTo=function(l){Pt(l,r.node())},v.resetZoom=function(){r.each(function(l){Pt(l,r.node())})},v.onClick=function(l){return arguments.length?(h=l,v):h},v.onHover=function(l){return arguments.length?(g=l,v):g},v.merge=function(l){return r&&(this.resetZoom(),R=null,Ct(null),r.datum(p=>(tt([p.data],[l]),p.data)),Et(),O()),v},v.update=function(l){return r&&(l&&(r.datum(l),Et()),O()),v},v.destroy=function(){return r&&(a&&(a.hide(),typeof a.destroy=="function"&&a.destroy()),r.selectAll("svg").remove()),v},v.setColorMapper=function(l){return arguments.length?(gt=p=>{const d=dt(p);return l(p,d)},v):(gt=dt,v)},v.color=v.setColorMapper,v.setColorHue=function(l){return arguments.length?(I=l,v):(I=null,v)},v.minFrameSize=function(l){return arguments.length?(w=l,v):w},v.setDetailsElement=function(l){return arguments.length?(_=l,v):_},v.details=v.setDetailsElement,v.selfValue=function(l){return arguments.length?(Y=l,v):Y},v.resetHeightOnZoom=function(l){return arguments.length?(U=l,v):U},v.scrollOnZoom=function(l){return arguments.length?(L=l,v):L},v.getName=function(l){return arguments.length?(X=l,v):X},v.getValue=function(l){return arguments.length?(ft=l,v):ft},v.getChildren=function(l){return arguments.length?(et=l,v):et},v.getLibtype=function(l){return arguments.length?(Rt=l,v):Rt},v.getDelta=function(l){return arguments.length?(kt=l,v):kt},v.setSearchHandler=function(l){return arguments.length?(ot=l,v):(ot=K,v)},v.setDetailsHandler=function(l){return arguments.length?(Ct=l,v):(Ct=It,v)},v.setSearchMatch=function(l){return arguments.length?(ht=l,v):(ht=j,v)},v}function br(t){return Number(t.toFixed(1)).toString()}function Sl(t,e,n,r,a,s){const o=a>0?e/a*100:0,u=[t,`${me(s,e)} (${br(o)}% of total)`];return r>0&&r!==e&&u.push(`${br(e/r*100)}% of parent`),n>0&&n!==e&&u.push(`self ${me(s,n)}`),u.join(" · ")}function Tl(t){const e=Math.min(1,Math.abs(t));return t>.001?`hsl(8, ${Math.round(45+e*45)}%, ${Math.round(68-e*22)}%)`:t<-.001?`hsl(140, ${Math.round(40+e*45)}%, ${Math.round(66-e*20)}%)`:"hsl(220, 6%, 78%)"}function Kr(t){if(!t.children||t.children.length===0)return 0;let e=0;for(const n of t.children){const r=Kr(n);r>e&&(e=r)}return e+1}var Ml=B('<div class="flex h-48 items-center justify-center rounded-md border text-sm text-muted-foreground">No flame graph data for this range.</div>'),Cl=B("<!> Reset",1),Al=B("<!> Icicle",1),Dl=B('<div class="mb-3 flex flex-wrap items-center gap-2"><!> <div class="flex-1"></div> <!> <!></div> <div class="flame-graph w-full overflow-hidden"></div>',1);function Ie(t,e){De(e,!0);let n=xe(e,"diff",3,!1),r=xe(e,"controls",3,!0),a=xe(e,"searchTerm",15,""),s=xe(e,"inverted",3,!1);const o=20;let u=N(void 0),f=N(0),c=null,h=N(bt(s()));const g=k(()=>e.data?(Kr(e.data)+1)*o:0),w=k(()=>i(h)?0:-2*o);Qe(()=>{const T=i(u);if(!T||typeof ResizeObserver>"u")return;const P=new ResizeObserver(I=>{m(f,I[0].contentRect.width,!0)});return P.observe(T),()=>P.disconnect()}),Qe(()=>{const T=i(u);if(!T||!e.data)return;const P=e.data.value||0,I=e.unit,X=$l().width(T.clientWidth||960).cellHeight(o).minFrameSize(1).transitionDuration(200).sort(!0).selfValue(!1).inverted(i(h)).label(et=>Sl(et.data.name,et.data.value,et.data.self??0,et.parent?.data.value??0,P,I));n()&&X.setColorMapper(et=>Tl(et.data.delta??0)),e.onFrameSelect&&X.onClick(et=>e.onFrameSelect(et.data.name)),Le(T).datum(e.data).call(X),c=X;const ft=mi(()=>a()).trim();return ft&&X.search(ft),()=>{try{X.destroy()}catch{Le(T).selectAll("*").remove()}Le(T).selectAll("*").remove(),c=null}}),Qe(()=>{const T=i(f);if(!(!c||!T))try{c.width(T),c.update()}catch{}}),Qe(()=>{const T=a().trim();e.data,c&&(T?c.search(T):c.clear())});function _(){c?.resetZoom()}var R=zt(),Y=q(R);{var U=T=>{var P=Ml();b(T,P)},L=T=>{var P=Dl(),I=q(P),X=V(I);{var ft=K=>{Fi(K,{type:"text",placeholder:"Search frames…","data-testid":"flame-search",class:"h-8 w-56",get value(){return a()},set value(ht){a(ht)}})};pt(X,K=>{r()&&K(ft)})}var et=$(X,4);se(et,{variant:"outline",size:"sm",onclick:_,"data-testid":"flame-reset",title:"Reset zoom",children:(K,ht)=>{var j=Cl(),Ct=q(j);Wi(Ct,{class:"h-4 w-4"}),$t(),b(K,j)},$$slots:{default:!0}});var Rt=$(et,2);{var kt=K=>{{let ht=k(()=>i(h)?"secondary":"outline");se(K,{get variant(){return i(ht)},size:"sm",get"aria-pressed"(){return i(h)},onclick:()=>m(h,!i(h)),"data-testid":"flame-icicle",title:"Toggle icicle (top-down) view",children:(j,Ct)=>{var It=Al(),wt=q(It);Zi(wt,{class:"h-4 w-4"}),$t(),b(j,It)},$$slots:{default:!0}})}};pt(Rt,K=>{r()&&K(kt)})}z(I);var ot=$(I,2);Mr(ot,K=>m(u,K),()=>i(u)),ct(()=>en(ot,`height: ${i(g)??""}px; --flame-svg-shift: ${i(w)??""}px`)),b(T,P)};pt(Y,T=>{e.data?T(L,!1):T(U)})}b(t,R),ke()}const $r=["hsl(217, 91%, 60%)","hsl(160, 60%, 45%)","hsl(35, 92%, 55%)","hsl(280, 65%, 60%)","hsl(0, 72%, 58%)","hsl(190, 80%, 45%)","hsl(50, 90%, 50%)","hsl(330, 70%, 60%)"];function kl(t){return $r[t%$r.length]}function Sr(t,e,n){return Math.max(e,Math.min(n,t))}var Pl=B('<div class="flex h-full items-center justify-center text-sm text-muted-foreground">Not enough data in this range.</div>'),Nl=bn('<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>'),El=bn('<line class="stroke-muted-foreground/40" stroke-width="1"></line>'),Fl=bn('<rect class="fill-primary/15 stroke-primary/50" stroke-width="1"></rect>'),Rl=B('<span class="text-muted-foreground"> </span>'),Il=B('<div class="flex items-center gap-1.5 tabular-nums"><span class="inline-block h-2 w-2 rounded-sm"></span> <!> <span> </span></div>'),Ll=B('<div class="pointer-events-none absolute top-1 right-1 rounded border bg-popover px-2 py-1 text-xs text-popover-foreground shadow-sm"><div class="text-muted-foreground"> </div> <!></div>'),Ol=bn('<svg><line class="stroke-border" stroke-width="1"></line><line class="stroke-border" stroke-width="1"></line><!><!><!><text class="fill-muted-foreground" style="font-size: 10px;"> </text><text class="fill-muted-foreground" style="font-size: 10px;"> </text><text text-anchor="end" class="fill-muted-foreground" style="font-size: 10px;"> </text></svg><!>',1),zl=B('<span class="inline-flex items-center gap-1.5 text-xs text-muted-foreground"><span class="inline-block h-2 w-2 rounded-sm"></span> <span class="max-w-[12rem] truncate"> </span></span>'),Hl=B('<div class="mt-1 flex flex-wrap gap-x-3 gap-y-1"></div>'),Vl=B('<div class="mt-1 text-center text-[11px] text-muted-foreground">Drag to zoom into a time range</div>'),Bl=B('<div class="w-full"><div class="relative w-full select-none" role="presentation"><!></div> <!> <!></div>');function Ul(t,e){De(e,!0);let n=xe(e,"series",19,()=>[]),r=xe(e,"groups",19,()=>[]),a=xe(e,"isRate",3,!1),s=xe(e,"height",3,140);const o=k(In);let u=N(void 0),f=N(0);Qe(()=>{const y=i(u);if(!y||typeof ResizeObserver>"u")return;const E=new ResizeObserver(O=>{m(f,O[0].contentRect.width,!0)});return E.observe(y),m(f,y.clientWidth,!0),()=>E.disconnect()});const c=6,h=6,g=10,w=20,_=k(()=>r().length?r().map((y,E)=>({key:y.key,points:y.points,color:kl(E)})):n().length?[{key:"",points:n(),color:"var(--primary)"}]:[]),R=k(()=>i(_).flatMap(y=>y.points)),Y=k(()=>i(R).map(y=>new Date(y.timestamp).getTime())),U=k(()=>i(Y).length?Math.min(...i(Y)):0),L=k(()=>i(Y).length?Math.max(...i(Y)):0),T=k(()=>Math.max(1,...i(R).map(y=>y.value))),P=k(()=>Math.max(0,i(f)-c-h)),I=k(()=>Math.max(0,s()-g-w));function X(y){return i(L)===i(U)?c:c+(y-i(U))/(i(L)-i(U))*i(P)}function ft(y){return g+i(I)-y/i(T)*i(I)}function et(y){return y.map((E,O)=>`${O===0?"M":"L"} ${X(new Date(E.timestamp).getTime()).toFixed(1)} ${ft(E.value).toFixed(1)}`).join(" ")}function Rt(y){return a()?Tr(e.unit,y):me(e.unit,y)}function kt(y){const E=i(L)-i(U),O=Ri.fromMillis(y).setZone(i(o));return E>2160*60*1e3?O.toFormat("MMM d HH:mm"):O.toFormat("HH:mm")}let ot=N(null),K=N(null),ht=N(null);function j(y){const E=i(u).getBoundingClientRect();return y.clientX-E.left}function Ct(y){!i(u)||!e.onSelectRange||(m(ot,j(y),!0),m(K,i(ot),!0),y.currentTarget.setPointerCapture?.(y.pointerId))}function It(y){i(u)&&(m(ht,j(y),!0),i(ot)!==null&&m(K,i(ht),!0))}function wt(){const y=i(ot),E=i(K);if(m(ot,null),m(K,null),y===null||E===null||!e.onSelectRange||i(L)===i(U))return;const O=Math.min(y,E),tt=Math.max(y,E);if(tt-O<5)return;const it=Nt=>i(U)+(Sr(Nt,c,c+i(P))-c)/i(P)*(i(L)-i(U));e.onSelectRange(new Date(it(O)).toISOString(),new Date(it(tt)).toISOString())}function gt(){m(ht,null)}const dt=k(()=>{if(i(ht)===null||!i(_).length||i(L)===i(U))return-1;const y=i(U)+(Sr(i(ht),c,c+i(P))-c)/i(P)*(i(L)-i(U)),E=i(_)[0].points;let O=0,tt=1/0;for(let it=0;it<E.length;it++){const Nt=Math.abs(new Date(E[it].timestamp).getTime()-y);Nt<tt&&(tt=Nt,O=it)}return O});var Tt=Bl(),Z=V(Tt);Z.__pointerdown=Ct,Z.__pointermove=It,Z.__pointerup=wt;var Xt=V(Z);{var Ht=y=>{var E=Pl();b(y,E)},Pt=y=>{var E=Ol(),O=q(E),tt=V(O);rt(tt,"x1",c),rt(tt,"y1",g),rt(tt,"x2",c);var it=$(tt);rt(it,"x1",c);var Nt=$(it);Ce(Nt,17,()=>i(_),C=>C.key,(C,J)=>{var st=Nl();ct(_t=>{rt(st,"d",_t),rt(st,"stroke",i(J).color)},[()=>et(i(J).points)]),b(C,st)});var qt=$(Nt);{var Et=C=>{const J=k(()=>X(new Date(i(_)[0].points[i(dt)].timestamp).getTime()));var st=El();rt(st,"y1",g),ct(()=>{rt(st,"x1",i(J)),rt(st,"x2",i(J)),rt(st,"y2",g+i(I))}),b(C,st)};pt(qt,C=>{i(dt)>=0&&i(_)[0]?.points[i(dt)]&&C(Et)})}var v=$(qt);{var l=C=>{const J=k(()=>Math.min(i(ot),i(K))),st=k(()=>Math.max(i(ot),i(K)));var _t=Fl();rt(_t,"y",g),ct(Gt=>{rt(_t,"x",i(J)),rt(_t,"width",Gt),rt(_t,"height",i(I))},[()=>Math.max(0,i(st)-i(J))]),b(C,_t)};pt(v,C=>{i(ot)!==null&&i(K)!==null&&C(l)})}var p=$(v);rt(p,"x",c),rt(p,"y",g-2);var d=V(p,!0);z(p);var S=$(p);rt(S,"x",c);var M=V(S,!0);z(S);var D=$(S),nt=V(D,!0);z(D),z(O);var G=$(O);{var At=C=>{var J=Ll(),st=V(J),_t=V(st,!0);z(st);var Gt=$(st,2);Ce(Gt,17,()=>i(_),be=>be.key,(be,jt)=>{var He=Il(),an=V(He),on=$(an,2);{var Ve=ge=>{var Ue=Rl(),Xe=V(Ue,!0);z(Ue),ct(()=>yt(Xe,i(jt).key)),b(ge,Ue)};pt(on,ge=>{i(jt).key&&ge(Ve)})}var Be=$(on,2),sn=V(Be,!0);z(Be),z(He),ct(ge=>{en(an,`background: ${i(jt).color??""}`),yt(sn,ge)},[()=>Rt(i(jt).points[i(dt)]?.value??0)]),b(be,He)}),z(J),ct(be=>yt(_t,be),[()=>kt(new Date(i(_)[0].points[i(dt)].timestamp).getTime())]),b(C,J)};pt(G,C=>{i(dt)>=0&&i(_)[0]?.points[i(dt)]&&C(At)})}ct((C,J,st)=>{rt(O,"width",i(f)),rt(O,"height",s()),wi(O,0,`block ${e.onSelectRange?"cursor-crosshair":""}`),rt(tt,"y2",g+i(I)),rt(it,"y1",g+i(I)),rt(it,"x2",c+i(P)),rt(it,"y2",g+i(I)),yt(d,C),rt(S,"y",s()-6),yt(M,J),rt(D,"x",c+i(P)),rt(D,"y",s()-6),yt(nt,st)},[()=>Rt(i(T)),()=>kt(i(U)),()=>kt(i(L))]),b(y,E)};pt(Xt,y=>{i(R).length<2?y(Ht):y(Pt,!1)})}z(Z),Mr(Z,y=>m(u,y),()=>i(u));var Lt=$(Z,2);{var Vt=y=>{var E=Hl();Ce(E,21,()=>i(_),O=>O.key,(O,tt)=>{var it=zl(),Nt=V(it),qt=$(Nt,2),Et=V(qt,!0);z(qt),z(it),ct(()=>{en(Nt,`background: ${i(tt).color??""}`),yt(Et,i(tt).key||"(empty)")}),b(O,it)}),z(E),b(y,E)};pt(Lt,y=>{r().length&&y(Vt)})}var Bt=$(Lt,2);{var Yt=y=>{var E=Vl();b(y,E)};pt(Bt,y=>{e.onSelectRange&&i(R).length>=2&&y(Yt)})}z(Tt),ct(()=>en(Z,`height: ${s()??""}px; touch-action: none;`)),gi("pointerleave",Z,gt),b(t,Tt),ke()}pi(["pointerdown","pointermove","pointerup"]);var Xl=B("<!> <!> <!> <!> <!> <!>",1),ql=B('<div class="flex items-center justify-end gap-2"><div class="h-1.5 w-16 shrink-0 overflow-hidden rounded bg-muted"><div class="h-full bg-primary"></div></div> <span class="w-12 text-right text-muted-foreground tabular-nums"> </span></div>'),Gl=B("<!> <!> <!> <!> <!> <!>",1),Jl=B("<!> <!>",1),Yl=B('<div class="border-t p-2 text-center"><!></div>'),Zl=B('<div class="overflow-hidden rounded-md border" data-testid="top-functions"><!> <!></div>');function Kl(t,e){De(e,!0);const n="profile_functions",r=Hi(n,{field:"flat",direction:"desc"});let a=N(bt(r.field==="cum"?"cum":"flat")),s=N(bt(r.direction)),o=N(!1);const u=15,f=k(()=>{const L=new zi;for(const T of e.baselineRows??[])L.set(T.name,T.flat);return L});function c(L){const T=Vi(L,i(a),i(s));m(a,T.field==="cum"?"cum":"flat",!0),m(s,T.direction,!0),Bi(n,T)}const h=k(()=>{const L=[...e.rows];return L.sort((T,P)=>i(s)==="desc"?P[i(a)]-T[i(a)]:T[i(a)]-P[i(a)]),L}),g=k(()=>i(o)?i(h):i(h).slice(0,u));function w(L){return`${Number(L.toFixed(1))}%`}function _(L){const T=i(f).get(L.name)??0,P=L.flat-T;if(P===0)return{text:"—",cls:"text-muted-foreground"};const I=P>0?"+":"−",X=P>0?"text-rose-600 dark:text-rose-400":"text-emerald-600 dark:text-emerald-400";return{text:`${I}${me(e.unit,Math.abs(P))}`,cls:X}}var R=zt(),Y=q(R);{var U=L=>{var T=Zl(),P=V(T);ut(P,()=>Li,(ft,et)=>{et(ft,{children:(Rt,kt)=>{var ot=Jl(),K=q(ot);ut(K,()=>Oi,(j,Ct)=>{Ct(j,{children:(It,wt)=>{var gt=zt(),dt=q(gt);ut(dt,()=>dr,(Tt,Z)=>{Z(Tt,{children:(Xt,Ht)=>{var Pt=Xl(),Lt=q(Pt);Ee(Lt,{label:"Function"});var Vt=$(Lt,2);Ee(Vt,{label:"Flat",tooltip:"Time spent inside this function itself (self)",align:"right",sortField:"flat",get currentSortField(){return i(a)},get sortDirection(){return i(s)},onSort:c});var Bt=$(Vt,2);Ee(Bt,{label:"Flat %",align:"right"});var Yt=$(Bt,2);{var y=tt=>{Ee(tt,{label:"Δ Flat",tooltip:"Change in flat vs baseline",align:"right"})};pt(Yt,tt=>{e.baselineRows&&tt(y)})}var E=$(Yt,2);Ee(E,{label:"Cumulative",tooltip:"Time spent in this function and everything it calls",align:"right",sortField:"cum",get currentSortField(){return i(a)},get sortDirection(){return i(s)},onSort:c});var O=$(E,2);Ee(O,{label:"Cum %",align:"right"}),b(Xt,Pt)},$$slots:{default:!0}})}),b(It,gt)},$$slots:{default:!0}})});var ht=$(K,2);ut(ht,()=>Ii,(j,Ct)=>{Ct(j,{children:(It,wt)=>{var gt=zt(),dt=q(gt);Ce(dt,17,()=>i(g),Tt=>Tt.name,(Tt,Z)=>{var Xt=zt(),Ht=q(Xt);{let Pt=k(()=>e.onSelect?"cursor-pointer":""),Lt=k(()=>e.onSelect?()=>e.onSelect(i(Z).name):void 0);ut(Ht,()=>dr,(Vt,Bt)=>{Bt(Vt,{get class(){return i(Pt)},get onclick(){return i(Lt)},children:(Yt,y)=>{var E=Gl(),O=q(E);ut(O,()=>Ne,(l,p)=>{p(l,{class:"max-w-[28rem] truncate font-mono text-xs",get title(){return i(Z).name},children:(d,S)=>{$t();var M=Ot();ct(()=>yt(M,i(Z).name)),b(d,M)},$$slots:{default:!0}})});var tt=$(O,2);ut(tt,()=>Ne,(l,p)=>{p(l,{class:"text-right tabular-nums",children:(d,S)=>{$t();var M=Ot();ct(D=>yt(M,D),[()=>me(e.unit,i(Z).flat)]),b(d,M)},$$slots:{default:!0}})});var it=$(tt,2);ut(it,()=>Ne,(l,p)=>{p(l,{class:"text-right text-muted-foreground tabular-nums",children:(d,S)=>{$t();var M=Ot();ct(D=>yt(M,D),[()=>w(i(Z).flatPct)]),b(d,M)},$$slots:{default:!0}})});var Nt=$(it,2);{var qt=l=>{const p=k(()=>_(i(Z)));var d=zt(),S=q(d);ut(S,()=>Ne,(M,D)=>{D(M,{get class(){return`text-right tabular-nums ${i(p).cls??""}`},children:(nt,G)=>{$t();var At=Ot();ct(()=>yt(At,i(p).text)),b(nt,At)},$$slots:{default:!0}})}),b(l,d)};pt(Nt,l=>{e.baselineRows&&l(qt)})}var Et=$(Nt,2);ut(Et,()=>Ne,(l,p)=>{p(l,{class:"text-right tabular-nums",children:(d,S)=>{$t();var M=Ot();ct(D=>yt(M,D),[()=>me(e.unit,i(Z).cum)]),b(d,M)},$$slots:{default:!0}})});var v=$(Et,2);ut(v,()=>Ne,(l,p)=>{p(l,{children:(d,S)=>{var M=ql(),D=V(M),nt=V(D);z(D);var G=$(D,2),At=V(G,!0);z(G),z(M),ct((C,J)=>{en(nt,`width: ${C??""}%`),yt(At,J)},[()=>Math.min(100,i(Z).cumPct),()=>w(i(Z).cumPct)]),b(d,M)},$$slots:{default:!0}})}),b(Yt,E)},$$slots:{default:!0}})})}b(Tt,Xt)}),b(It,gt)},$$slots:{default:!0}})}),b(Rt,ot)},$$slots:{default:!0}})});var I=$(P,2);{var X=ft=>{var et=Yl(),Rt=V(et);se(Rt,{variant:"ghost",size:"sm",onclick:()=>m(o,!i(o)),children:(kt,ot)=>{$t();var K=Ot();ct(()=>yt(K,i(o)?"Show less":`Show all ${i(h).length}`)),b(kt,K)},$$slots:{default:!0}}),z(et),b(ft,et)};pt(I,ft=>{i(h).length>u&&ft(X)})}z(T),b(L,T)};pt(Y,L=>{e.rows.length&&L(U)})}b(t,R),ke()}function Wr(t,e,n,r){const a=n>0?t.value/n:0,s=e&&r>0?e.value/r:0,o=new Map;for(const u of e?.children??[])o.set(u.name,u);return{name:t.name,value:t.value,self:t.self,delta:a-s,children:(t.children??[]).map(u=>Wr(u,o.get(u.name),n,r))}}function Wl(t,e){return e?Wr(e,t??void 0,e.value||0,t?.value||0):null}function Qr(t){return{name:t.name,value:t.value,self:t.self??0,children:(t.children??[]).map(Qr)}}function Bn(t){if(t.children){t.children.sort((e,n)=>n.value-e.value||e.name.localeCompare(n.name));for(const e of t.children)Bn(e)}}function jr(t){const e={name:t.name,value:t.value,self:t.self??0,children:[]},n=new Map,r=a=>{if(a.name===e.name){e.self=(e.self??0)+(a.self??0);for(const o of a.children??[])r(o);return}const s=n.get(a.name);if(s)s.value+=a.value,s.self=(s.self??0)+(a.self??0),s.children=[...s.children??[],...a.children??[]];else{const o={name:a.name,value:a.value,self:a.self??0,children:[...a.children??[]]};n.set(a.name,o),e.children.push(o)}};for(const a of t.children??[])r(a);return e.children=e.children.map(jr),e}function ti(t,e){t.value+=e.value,t.self=(t.self??0)+(e.self??0);const n=new Map;for(const r of t.children??[])n.set(r.name,r);for(const r of e.children??[]){const a=n.get(r.name);if(a)ti(a,r);else{const s=Qr(r);n.set(r.name,s),(t.children??=[]).push(s)}}}function Ql(t,e){if(!t)return null;const n={name:e,value:0,self:0,children:[]},r={name:e,value:0,self:0,children:[]},a=(s,o)=>{if(s.name===e){ti(n,{value:s.value,self:s.self??0,children:s.children??[]});let u=r;u.value+=s.value;for(let f=o.length-1;f>=0;f--){const c=o[f];let h=(u.children??[]).find(g=>g.name===c.name);h||(h={name:c.name,value:0,self:0,children:[]},(u.children??=[]).push(h)),h.value+=s.value,u=h}return}for(const u of s.children??[])a(u,[...o,s])};return a(t,[]),n.value===0?null:(Bn(r),Bn(n),{fn:e,callers:r,callees:n,total:n.value})}var jl=B("<!> <!>",1),tu=B("<!> ",1),eu=B('<div class="flex items-center justify-center py-20"><!></div>'),nu=B("<!> <!>",1),ru=B("<!> Compare",1),iu=B("<!> Collapse recursion",1),au=B('<div class="flex gap-1"><!> <!></div>'),ou=B("<!> Download .pprof",1),su=B("<!> <!>",1),lu=B("<!> <!>",1),uu=B("<!> <!>",1),cu=B("<!> <!>",1),fu=B('<div class="flex flex-wrap items-center gap-2 rounded-md bg-muted/40 p-2"><span class="text-xs font-medium text-muted-foreground">Baseline:</span> <!> <!> <!></div>'),hu=B('<div class="flex items-center gap-4 text-xs text-muted-foreground"><span class="inline-flex items-center gap-1.5"><span class="h-2.5 w-3.5 rounded-sm" style="background: hsl(8, 70%, 55%)"></span> hotter than baseline</span> <span class="inline-flex items-center gap-1.5"><span class="h-2.5 w-3.5 rounded-sm" style="background: hsl(140, 60%, 50%)"></span> cooler than baseline</span></div> <!>',1),du=B('<div class="grid gap-4 lg:grid-cols-2"><div><div class="mb-1 text-xs font-medium text-muted-foreground">Baseline</div> <!></div> <div><div class="mb-1 text-xs font-medium text-muted-foreground">Current</div> <!></div></div>'),vu=B('<div class="space-y-3 rounded-md border p-4"><div class="flex items-center justify-between gap-2"><div class="min-w-0"><div class="text-sm font-medium">Function detail</div> <div class="truncate font-mono text-xs text-muted-foreground"> </div></div> <!></div> <div class="grid gap-4 lg:grid-cols-2"><div><div class="mb-1 text-xs font-medium text-muted-foreground">Callers</div> <!></div> <div><div class="mb-1 text-xs font-medium text-muted-foreground">Callees</div> <!></div></div></div>'),mu=B('<!> <!> <div class="space-y-3 rounded-md border p-4"><div class="flex flex-wrap items-center gap-2"><!> <!> <div class="flex-1"></div> <!> <!></div> <!> <!></div> <!> <!>',1),pu=B('<div class="space-y-4"><!> <!> <!> <div class="flex flex-wrap items-center gap-2"><!> <div class="flex-1"></div> <!> <!></div> <!></div>');function nc(t,e){De(e,!0);const n=k(In),r=In();let a=N(null),s=N(bt([])),o=N(bt([])),u=N(0),f=N(bt({})),c=N(bt({})),h=N(bt([])),g=N(bt({appVersions:[],serverNames:[]})),w=N(!0),_=N(""),R=N(!1),Y=N(""),U=N(null),L=N(!1),T=N(!1),P=N(""),I=N(!1),X=N("differential"),ft=N(null),et=N(bt([])),Rt=N(null),kt=N(""),ot=N(""),K=N(!1),ht=N(bt([])),j=N(bt(e.data.type??""));function Ct(){if(e.data.preset&&vr[e.data.preset]){const A=Fe(e.data.preset,i(n));return{preset:e.data.preset,from:A.from,to:A.to}}if(e.data.from&&e.data.to){const A=Re(e.data.from,i(n)),F=Re(e.data.to,i(n));if(A.isValid&&F.isValid)return{preset:null,from:A.toJSDate(),to:F.toJSDate()}}const x=Fe("24h",i(n));return{preset:"24h",from:x.from,to:x.to}}const It=Ct();let wt=N(bt(It.preset)),gt=N(bt(ae(It.from,r))),dt=N(bt(ae(It.to,r))),Tt=N(bt(oe(It.from,r))),Z=N(bt(oe(It.to,r)));const Xt=Fe("7d",r);let Ht=N("7d"),Pt=N(bt(ae(Xt.from,r))),Lt=N(bt(ae(Xt.to,r))),Vt=N(bt(oe(Xt.from,r))),Bt=N(bt(oe(Xt.to,r)));const Yt=k(()=>i(ht).find(x=>x.type===i(j))),y=k(()=>i(Yt)?.unit??""),E=k(()=>i(Yt)?.isGauge??!1),O=k(()=>i(s).reduce((x,A)=>Math.max(x,A.value),0)),tt=k(()=>i(T)&&!i(E)),it=k(()=>Pi(i(y))),Nt=k(()=>i(it)?"Cores":"Per second"),qt=k(()=>i(L)&&i(a)?jr(i(a)):i(a)),Et=k(()=>i(U)?Ql(i(a),i(U)):null),v=k(()=>[{value:"",label:"No grouping"},{value:"app_version",label:"App version"},{value:"server_name",label:"Server"},...Object.keys(i(f)).map(x=>({value:`label:${x}`,label:x}))]),l=k(()=>i(v).find(x=>x.value===i(P))?.label??"No grouping");function p(x=!0){const A=i(wt)?{preset:i(wt)}:{from:d(),to:S()};A.type=i(j),Xi(A,{pushToHistory:x})}function d(){const[x,A]=(i(Tt)||"00:00").split(":").map(Number),F=fn({year:i(gt).year,month:i(gt).month,day:i(gt).day,hour:x,minute:A},i(n)).startOf("minute");return hn(F)}function S(){const[x,A]=(i(Z)||"23:59").split(":").map(Number),F=fn({year:i(dt).year,month:i(dt).month,day:i(dt).day,hour:x,minute:A},i(n)).endOf("minute");return hn(F)}function M(x,A){const F=Math.max(1,Math.round((new Date(A).getTime()-new Date(x).getTime())/6e4));return Math.max(1,Math.round(F/60))}function D(){if(typeof window>"u")return!1;const x=new URLSearchParams(window.location.search),A=x.get("preset"),F=x.get("from"),H=x.get("to"),vt=x.get("type");if(vt&&m(j,vt,!0),A&&vr[A])return m(wt,A,!0),!0;if(F&&H){const lt=Re(F,i(n)),Ft=Re(H,i(n));if(lt.isValid&&Ft.isValid)return m(wt,null),m(gt,ae(lt.toJSDate(),i(n)),!0),m(Tt,oe(lt.toJSDate(),i(n)),!0),m(dt,ae(Ft.toJSDate(),i(n)),!0),m(Z,oe(Ft.toJSDate(),i(n)),!0),!0}return!0}function nt(){D(),_t(!1)}function G(x,A,F){m(gt,x.date,!0),m(Tt,x.time,!0),m(dt,A.date,!0),m(Z,A.time,!0),m(wt,F,!0),_t(!0)}function At(x,A){const F=Re(x,i(n)),H=Re(A,i(n));!F.isValid||!H.isValid||(m(wt,null),m(gt,ae(F.toJSDate(),i(n)),!0),m(Tt,oe(F.toJSDate(),i(n)),!0),m(dt,ae(H.toJSDate(),i(n)),!0),m(Z,oe(H.toJSDate(),i(n)),!0),_t(!0))}function C(x){m(j,x,!0),m(c,{},!0),m(P,""),m(U,null),_t(!0)}function J(x){m(c,x,!0),_t(!0)}function st(x){m(Y,x,!0)}async function _t(x=!0){if(m(w,!0),m(_,""),m(R,!1),i(wt)){const vt=Fe(i(wt),i(n));m(gt,ae(vt.from,i(n)),!0),m(dt,ae(vt.to,i(n)),!0),m(Tt,oe(vt.from,i(n)),!0),m(Z,oe(vt.to,i(n)),!0)}const A=d(),F=S(),H=Pn.currentProjectId??void 0;try{const vt=await de.post("/profiles/types",{fromDate:A,toDate:F,serviceName:e.data.service},{projectId:H}).catch(()=>[]);m(ht,vt||[],!0);const lt=i(ht).map(ne=>ne.type);(!i(j)||!lt.includes(i(j)))&&m(j,ki(lt),!0);const Ft=i(ht).find(ne=>ne.type===i(j))?.isGauge??!1;p(x);const Ut={fromDate:A,toDate:F,serviceName:e.data.service,type:i(j)},_e=M(A,F),[ue,te,ee,Pe,ce,ye]=await Promise.all([de.post("/profiles/flamegraph",{...Ut,isGauge:Ft,labels:i(c)},{projectId:H}),de.post("/profiles/series",{...Ut,isGauge:Ft,intervalMinutes:_e,labels:i(c),normalize:i(T)},{projectId:H}),de.post("/profiles/labels",Ut,{projectId:H}).catch(()=>({})),de.post("/profiles/top",{...Ut,isGauge:Ft,labels:i(c),limit:100},{projectId:H}).catch(()=>[]),de.post("/profiles/dimensions",Ut,{projectId:H}).catch(()=>({})),i(P)?de.post("/profiles/series/breakdown",{...Ut,isGauge:Ft,intervalMinutes:_e,labels:i(c),normalize:i(T),dimension:i(P),limit:8},{projectId:H}).catch(()=>[]):Promise.resolve([])]);m(u,ue?.value??0,!0),m(a,ue?.children?.length?ue:null,!0),m(s,te||[],!0),m(f,ee||{},!0),m(h,Pe||[],!0),m(g,{appVersions:ce?.appVersions??[],serverNames:ce?.serverNames??[]},!0),m(o,ye||[],!0),i(U)&&!i(a)&&m(U,null),i(I)&&await jt(Ft)}catch(vt){xi(vt)===404?m(R,!0):(console.error(vt),m(_,bi(vt)||"Failed to load profile",!0))}finally{m(w,!1)}}function Gt(){if(i(Ht))return Fe(i(Ht),i(n)).from.toISOString();const[x,A]=(i(Vt)||"00:00").split(":").map(Number);return hn(fn({year:i(Pt).year,month:i(Pt).month,day:i(Pt).day,hour:x,minute:A},i(n)).startOf("minute"))}function be(){if(i(Ht))return Fe(i(Ht),i(n)).to.toISOString();const[x,A]=(i(Bt)||"23:59").split(":").map(Number);return hn(fn({year:i(Lt).year,month:i(Lt).month,day:i(Lt).day,hour:x,minute:A},i(n)).endOf("minute"))}async function jt(x){const A=Pn.currentProjectId??void 0,F={fromDate:Gt(),toDate:be(),serviceName:e.data.service,type:i(j),isGauge:x,labels:i(c),appVersion:i(kt),serverName:i(ot)};try{const[H,vt]=await Promise.all([de.post("/profiles/flamegraph",F,{projectId:A}),de.post("/profiles/top",{...F,limit:100},{projectId:A}).catch(()=>[])]);m(ft,H?.children?.length?H:null,!0),m(et,vt||[],!0),m(Rt,Wl(i(ft),i(a)),!0)}catch(H){console.error(H),m(ft,null),m(et,[],!0),m(Rt,null)}}function He(){m(I,!i(I)),i(I)&&jt(i(E))}function an(x,A,F){m(Pt,x.date,!0),m(Vt,x.time,!0),m(Lt,A.date,!0),m(Bt,A.time,!0),m(Ht,F,!0),jt(i(E))}async function on(){if(i(a)){m(K,!0);try{const x=Pn.currentProjectId,A=`/api/profiles/pprof${x?`?projectId=${x}`:""}`,F=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json",...Rn.token?{Authorization:`Bearer ${Rn.token}`}:{}},body:JSON.stringify({fromDate:d(),toDate:S(),serviceName:e.data.service,type:i(j),unit:i(y),isGauge:i(E),labels:i(c)})});if(!F.ok){ir.error("Failed to export profile");return}const H=await F.blob(),vt=URL.createObjectURL(H),lt=document.createElement("a");lt.href=vt,lt.download=`${e.data.service}-${i(j).replace(/[^a-zA-Z0-9-_]/g,"_")}.pprof`,document.body.appendChild(lt),lt.click(),lt.remove(),URL.revokeObjectURL(vt)}catch(x){console.error(x),ir.error("Failed to export profile")}finally{m(K,!1)}}}_i(()=>{window.addEventListener("popstate",nt),_t(!1)}),yi(()=>{typeof window<"u"&&window.removeEventListener("popstate",nt)});var Ve=pu(),Be=V(Ve);{const x=F=>{ar(F,{onApply:G,get fromDate(){return i(gt)},set fromDate(H){m(gt,H,!0)},get toDate(){return i(dt)},set toDate(H){m(dt,H,!0)},get fromTime(){return i(Tt)},set fromTime(H){m(Tt,H,!0)},get toTime(){return i(Z)},set toTime(H){m(Z,H,!0)},get preset(){return i(wt)},set preset(H){m(wt,H,!0)}})};let A=k(()=>vi({fallbackPath:Si("/profiles")}));Ti(Be,{get title(){return e.data.service},get onBack(){return i(A)},actions:x})}var sn=$(Be,2);Di(sn);var ge=$(sn,2);{var Ue=x=>{{let A=k(()=>i(ht).map(F=>({value:F.type,label:lr(F.type)})));Mi(x,{get tabs(){return i(A)},get activeTab(){return i(j)},onTabChange:C})}};pt(ge,x=>{i(ht).length&&x(Ue)})}var Xe=$(ge,2),tr=V(Xe);{let x=k(()=>Object.keys(i(f)));Ui(tr,{get tagKeys(){return i(x)},get activeFilters(){return i(c)},onFilterChange:J,onLoadTagValues:A=>Promise.resolve(i(f)[A]??[])})}var er=$(tr,4);ut(er,()=>Fn,(x,A)=>{A(x,{type:"single",get value(){return i(P)},onValueChange:F=>{m(P,F??"",!0),_t(!1)},children:(F,H)=>{var vt=jl(),lt=q(vt);ut(lt,()=>Nn,(Ut,_e)=>{_e(Ut,{size:"sm",class:"w-44","data-testid":"group-by-select",children:(ue,te)=>{$t();var ee=Ot();ct(()=>yt(ee,`Group by: ${i(l)??""}`)),b(ue,ee)},$$slots:{default:!0}})});var Ft=$(lt,2);ut(Ft,()=>En,(Ut,_e)=>{_e(Ut,{children:(ue,te)=>{var ee=zt(),Pe=q(ee);Ce(Pe,17,()=>i(v),ce=>ce.value,(ce,ye)=>{var ne=zt(),ln=q(ne);ut(ln,()=>Ke,(un,cn)=>{cn(un,{get value(){return i(ye).value},children:(Mn,nr)=>{$t();var qe=Ot();ct(()=>yt(qe,i(ye).label)),b(Mn,qe)},$$slots:{default:!0}})}),b(ce,ne)}),b(ue,ee)},$$slots:{default:!0}})}),b(F,vt)},$$slots:{default:!0}})});var ei=$(er,2);{var ni=x=>{{let A=k(()=>i(T)?"secondary":"outline"),F=k(()=>i(it)?"Show CPU as cores in use (CPU time per wall-second)":"Show as a per-second rate");se(x,{get variant(){return i(A)},size:"sm",get"aria-pressed"(){return i(T)},onclick:()=>{m(T,!i(T)),_t(!1)},"data-testid":"normalize-toggle",get title(){return i(F)},children:(H,vt)=>{var lt=tu(),Ft=q(lt);qi(Ft,{class:"h-4 w-4"});var Ut=$(Ft);ct(()=>yt(Ut,` ${i(Nt)??""}`)),b(H,lt)},$$slots:{default:!0}})}};pt(ei,x=>{i(E)||x(ni)})}z(Xe);var ri=$(Xe,2);{var ii=x=>{var A=eu(),F=V(A);$i(F,{size:"xlg"}),z(A),b(x,A)},ai=x=>{var A=zt(),F=q(A);{var H=lt=>{or(lt,{status:404,title:"Not Found",description:"No profiles found for this service.",onRetry:()=>_t()})},vt=lt=>{var Ft=zt(),Ut=q(Ft);{var _e=te=>{or(te,{status:400,title:"Error",get description(){return i(_)},onRetry:()=>_t()})},ue=te=>{var ee=mu(),Pe=q(ee);Ci(Pe,{columns:2,children:(W,at)=>{var St=nu(),mt=q(St);{let Q=k(()=>i(j)?`Total ${lr(i(j))}`:"Total"),Mt=k(()=>me(i(y),i(u)));sr(mt,{get label(){return i(Q)},get value(){return i(Mt)}})}var xt=$(mt,2);{let Q=k(()=>`Peak ${i(tt)?i(it)?"(utilization)":"(rate)":i(E)?"(avg/bucket)":"(sum/bucket)"}`),Mt=k(()=>i(tt)?Tr(i(y),i(O)):me(i(y),i(O)));sr(xt,{get label(){return i(Q)},get value(){return i(Mt)}})}b(W,St)},$$slots:{default:!0}});var ce=$(Pe,2);{let W=k(()=>`Trend${i(P)?` · by ${i(l).toLowerCase()}`:""}`);Ai(ce,{get title(){return i(W)},children:(at,St)=>{{let mt=k(()=>i(P)?[]:i(s)),xt=k(()=>i(P)?i(o):[]);Ul(at,{get series(){return i(mt)},get groups(){return i(xt)},get unit(){return i(y)},get isRate(){return i(tt)},onSelectRange:At})}},$$slots:{default:!0}})}var ye=$(ce,2),ne=V(ye),ln=V(ne);{let W=k(()=>i(I)?"secondary":"outline");se(ln,{get variant(){return i(W)},size:"sm",get"aria-pressed"(){return i(I)},onclick:He,"data-testid":"compare-toggle",children:(at,St)=>{var mt=ru(),xt=q(mt);Ki(xt,{class:"h-4 w-4"}),$t(),b(at,mt)},$$slots:{default:!0}})}var un=$(ln,2);{let W=k(()=>i(L)?"secondary":"outline");se(un,{get variant(){return i(W)},size:"sm",get"aria-pressed"(){return i(L)},onclick:()=>m(L,!i(L)),"data-testid":"collapse-recursion",title:"Collapse direct recursion in the flame graph",children:(at,St)=>{var mt=iu(),xt=q(mt);Gi(xt,{class:"h-4 w-4"}),$t(),b(at,mt)},$$slots:{default:!0}})}var cn=$(un,4);{var Mn=W=>{var at=au(),St=V(at);{let xt=k(()=>i(X)==="differential"?"secondary":"outline");se(St,{get variant(){return i(xt)},size:"sm",onclick:()=>m(X,"differential"),"data-testid":"diff-differential",children:(Q,Mt)=>{$t();var Dt=Ot("Differential");b(Q,Dt)},$$slots:{default:!0}})}var mt=$(St,2);{let xt=k(()=>i(X)==="sidebyside"?"secondary":"outline");se(mt,{get variant(){return i(xt)},size:"sm",onclick:()=>m(X,"sidebyside"),"data-testid":"diff-sidebyside",children:(Q,Mt)=>{$t();var Dt=Ot("Side by side");b(Q,Dt)},$$slots:{default:!0}})}z(at),b(W,at)};pt(cn,W=>{i(I)&&W(Mn)})}var nr=$(cn,2);{let W=k(()=>i(K)||!i(a));se(nr,{variant:"outline",size:"sm",onclick:on,get disabled(){return i(W)},"data-testid":"download-pprof",children:(at,St)=>{var mt=ou(),xt=q(mt);Ji(xt,{class:"h-4 w-4"}),$t(),b(at,mt)},$$slots:{default:!0}})}z(ne);var qe=$(ne,2);{var oi=W=>{var at=fu(),St=$(V(at),2);ar(St,{onApply:an,get fromDate(){return i(Pt)},set fromDate(Q){m(Pt,Q,!0)},get toDate(){return i(Lt)},set toDate(Q){m(Lt,Q,!0)},get fromTime(){return i(Vt)},set fromTime(Q){m(Vt,Q,!0)},get toTime(){return i(Bt)},set toTime(Q){m(Bt,Q,!0)},get preset(){return i(Ht)},set preset(Q){m(Ht,Q,!0)}});var mt=$(St,2);ut(mt,()=>Fn,(Q,Mt)=>{Mt(Q,{type:"single",get value(){return i(kt)},onValueChange:Dt=>{m(kt,Dt??"",!0),jt(i(E))},children:(Dt,$e)=>{var re=lu(),ie=q(re);ut(ie,()=>Nn,(Zt,we)=>{we(Zt,{size:"sm",class:"w-40","data-testid":"base-app-version",children:(Se,Cn)=>{$t();var Kt=Ot();ct(()=>yt(Kt,i(kt)||"All versions")),b(Se,Kt)},$$slots:{default:!0}})});var Ge=$(ie,2);ut(Ge,()=>En,(Zt,we)=>{we(Zt,{children:(Se,Cn)=>{var Kt=su(),Je=q(Kt);ut(Je,()=>Ke,(Wt,fe)=>{fe(Wt,{value:"",children:(he,Ye)=>{$t();var Te=Ot("All versions");b(he,Te)},$$slots:{default:!0}})});var An=$(Je,2);Ce(An,16,()=>i(g).appVersions,Wt=>Wt,(Wt,fe)=>{var he=zt(),Ye=q(he);ut(Ye,()=>Ke,(Te,Dn)=>{Dn(Te,{get value(){return fe},children:(kn,hi)=>{$t();var Ze=Ot();ct(()=>yt(Ze,fe)),b(kn,Ze)},$$slots:{default:!0}})}),b(Wt,he)}),b(Se,Kt)},$$slots:{default:!0}})}),b(Dt,re)},$$slots:{default:!0}})});var xt=$(mt,2);ut(xt,()=>Fn,(Q,Mt)=>{Mt(Q,{type:"single",get value(){return i(ot)},onValueChange:Dt=>{m(ot,Dt??"",!0),jt(i(E))},children:(Dt,$e)=>{var re=cu(),ie=q(re);ut(ie,()=>Nn,(Zt,we)=>{we(Zt,{size:"sm",class:"w-40","data-testid":"base-server",children:(Se,Cn)=>{$t();var Kt=Ot();ct(()=>yt(Kt,i(ot)||"All servers")),b(Se,Kt)},$$slots:{default:!0}})});var Ge=$(ie,2);ut(Ge,()=>En,(Zt,we)=>{we(Zt,{children:(Se,Cn)=>{var Kt=uu(),Je=q(Kt);ut(Je,()=>Ke,(Wt,fe)=>{fe(Wt,{value:"",children:(he,Ye)=>{$t();var Te=Ot("All servers");b(he,Te)},$$slots:{default:!0}})});var An=$(Je,2);Ce(An,16,()=>i(g).serverNames,Wt=>Wt,(Wt,fe)=>{var he=zt(),Ye=q(he);ut(Ye,()=>Ke,(Te,Dn)=>{Dn(Te,{get value(){return fe},children:(kn,hi)=>{$t();var Ze=Ot();ct(()=>yt(Ze,fe)),b(kn,Ze)},$$slots:{default:!0}})}),b(Wt,he)}),b(Se,Kt)},$$slots:{default:!0}})}),b(Dt,re)},$$slots:{default:!0}})}),z(at),b(W,at)};pt(qe,W=>{i(I)&&W(oi)})}var si=$(qe,2);{var li=W=>{var at=hu(),St=$(q(at),2);Ie(St,{get data(){return i(Rt)},get unit(){return i(y)},diff:!0}),b(W,at)},ui=W=>{var at=zt(),St=q(at);{var mt=Q=>{var Mt=du(),Dt=V(Mt),$e=$(V(Dt),2);Ie($e,{get data(){return i(ft)},get unit(){return i(y)},controls:!1}),z(Dt);var re=$(Dt,2),ie=$(V(re),2);Ie(ie,{get data(){return i(qt)},get unit(){return i(y)},controls:!1}),z(re),z(Mt),b(Q,Mt)},xt=Q=>{Ie(Q,{get data(){return i(qt)},get unit(){return i(y)},onFrameSelect:Mt=>m(U,Mt,!0),get searchTerm(){return i(Y)},set searchTerm(Mt){m(Y,Mt,!0)}})};pt(St,Q=>{i(I)?Q(mt):Q(xt,!1)},!0)}b(W,at)};pt(si,W=>{i(I)&&i(X)==="differential"?W(li):W(ui,!1)})}z(ye);var rr=$(ye,2);{var ci=W=>{var at=vu(),St=V(at),mt=V(St),xt=$(V(mt),2),Q=V(xt);z(xt),z(mt);var Mt=$(mt,2);se(Mt,{variant:"ghost",size:"sm",onclick:()=>m(U,null),title:"Close",children:(Zt,we)=>{Yi(Zt,{class:"h-4 w-4"})},$$slots:{default:!0}}),z(St);var Dt=$(St,2),$e=V(Dt),re=$(V($e),2);Ie(re,{get data(){return i(Et).callers},get unit(){return i(y)},controls:!1,inverted:!0}),z($e);var ie=$($e,2),Ge=$(V(ie),2);Ie(Ge,{get data(){return i(Et).callees},get unit(){return i(y)},controls:!1}),z(ie),z(Dt),z(at),ct(Zt=>{rt(xt,"title",i(Et).fn),yt(Q,`${i(Et).fn??""} · ${Zt??""}`)},[()=>me(i(y),i(Et).total)]),b(W,at)};pt(rr,W=>{i(Et)&&!i(I)&&W(ci)})}var fi=$(rr,2);{let W=k(()=>i(I)?i(et):void 0);Kl(fi,{get rows(){return i(h)},get unit(){return i(y)},onSelect:st,get baselineRows(){return i(W)}})}b(te,ee)};pt(Ut,te=>{i(_)?te(_e):te(ue,!1)},!0)}b(lt,Ft)};pt(F,lt=>{i(R)?lt(H):lt(vt,!1)},!0)}b(x,A)};pt(ri,x=>{i(w)?x(ii):x(ai,!1)})}z(Ve),b(t,Ve),ke()}export{nc as component,ec as universal};